There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

onlinepersona , in average day in NPM land

440GB weekly for “is number”. What in the world is that package doing?

Anti Commercial-AI license

GammaGames ,

It handles a few weird edge cases, mostly. Only 7 meaningful lines of code and almost 70M downloads week!

nickwitha_k , (edited )

I don’t get the concept that depending on 7 lines of code from a third-party package is remotely acceptable. It’s expanding the potential attack surface to save a dev from templating 7 lines of boilerplate. There’s no net benefit or appreciable time saved.

I’m glad I don’t have to deal with this regularly.

ETA: The package is even MIT licensed! There’s no excuse but laziness and not wanting to understand the code to import this rather than inlining or implementing a novel version. If I can spend the time to write:


<span style="color:#323232;">if err != nil {
</span><span style="color:#323232;">  slog.Warn("well shit", "error", err)
</span><span style="color:#323232;">  return err
</span><span style="color:#323232;">}
</span>

after every function call…I just didn’t get it.

GammaGames ,

You’re right, it’s not sane! The js ecosystem is hell

sus OP ,

is-number is a one-line function. (though it’s debatable if a function that complex should be compressed to one line)

You may have heard of a similar if more extreme “microdependency” called is-even. When you use an NPM package, you also need all the dependencies of that package, and the dependencies of those dependencies recursively. Each package has some overhead, eventually leading to this moment in time.

sparkle ,

Web bloat in a nutshell and why we need to switch to things like Web Assembly more than ever. It’s not WASM, but I used Laminar which is a Scala.js library, and it’s the absolute pinnacle of (frontend) web development. Scala in general is just really great for idiomatic web code, its flexibility is unbeatable.

Another amazing alternative would be anything Rust. In fact I’ve used that much more than Scala for web. I’ve mainly used Leptos for full-stack and and Actix for backend, but I’ve seen Dioxus and Axum in good use and they both seem really great too.

Apparently Lemmy uses Leptos for its UI so… that’s a +1.

Auzy ,

I feel like this is completely avoidable bloat.

You could quite easily create this bloat in any language

sukhmel ,

I’m not sure, this is a valid estimate. If they were to replace is-number with its contents, that would mean that the economy is only in HTTP-related overhead.

It maybe will make difference because of building phase, lock-files, package-files, but I am not sure that data-traffic difference is that big

bjoern_tantau , in average day in NPM land
@bjoern_tantau@swg-empire.de avatar

Link to the PR? The PR description and the comment somehow contradict each other. Or I am stupid. Or the commenter.

sus OP ,

I tried to edit the ‘highlights’ into a single image, the top is the description of the PR, the middle is a comment replying to another comment

github.com/micromatch/to-regex-range/pull/17

bjoern_tantau ,
@bjoern_tantau@swg-empire.de avatar

Thanks!

What a shit show.

dosuser123456 , in HTML with Excel
@dosuser123456@lemmy.sdf.org avatar

why

dosuser123456 , in Update Faker - Fake a system update
@dosuser123456@lemmy.sdf.org avatar

how to troll it dept:

  1. be a win9x/xp user in 2024
  2. U P D A T E
ponzuscheme , in When your shower uses GitHub more than you

I don’t think I can see tiles with shades of green the same ever again…

tatterdemalion , in True?
@tatterdemalion@programming.dev avatar

How Linux Fanboys see Linux:

image

Alexstarfire , in Brace Style
JimVanDeventer , in Brace Style

Don’t threaten me with a good time.

zbyte64 ,

Python Black for Java. Just a thought…

dosuser123456 , in <br>
@dosuser123456@lemmy.sdf.org avatar

&NewLine; go <br>

kamen , in Brace Style

What amazes me is that someone either did that manually or wrote a formatter to do that - I doubt that any standard style config would do this.

OhStopYellingAtMe , in Brace Style
@OhStopYellingAtMe@lemmy.world avatar

Damn. That’s tidy to the point of inconvenience.

MystikIncarnate , in Brace Style

I’m not a coder, and… Well… Thanks, I hate it.

Even I know this is horrific. Where the fuck does this statement end? Which of these brackets refer to this section of other brackets. Idfk.

I could give a shit less if it was just for a single block per or something but “;}}}” hurts me.

velvetThunder ,

Well the code indentation explains that, like python. The issue is not reading it. You would rather quit your job than edit this.

hglman ,

tooling would have to do it all after the fact or something

demizerone , in Brace Style

Auto formatter as part of the expected language tooling is Go’s greatest move, even if their formatter doesn’t go far enough.

PlexSheep ,

Rust does this too I think (or just everyone uses rustfmt).

JackbyDev ,

But I want my bike shed blue…

dosuser123456 , (edited ) in *pulls up custom glittery myspace page from 2006*
@dosuser123456@lemmy.sdf.org avatar

i know HyperText Markup Language but not How To Meet Ladies

bruhduh , in When your shower uses GitHub more than you
@bruhduh@lemmy.world avatar

Cool idea tho, it’ll help redditors to maintain hygiene

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines