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.

programmerhumor

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

Kajika , in Why would anyone want to own the libs?

Tldr => Twitter Link Didn’t Read

Is this really interesting?

possum ,

why does everyone want to own the libs
as an open source developer i own multiple libs
i would happily pay people to take them from me
you do not want to own libs. its so much work

Maybe one day these Twitter links will be replaced by Mastodon cross-posts

sovietknuckles , in so scary

<C-z>
kill %

TheElectroness ,
<pre style="background-color:#ffffff;">
<span style="color:#323232;">[1] + suspended (tty output) vim
</span>
DerPapa69 , in Typescript is strongly typed
@DerPapa69@lemmy.ml avatar

I don’t really get the point of this. Of course the function will accept the value as a string if you specifically tell it to treat it as such (which wouldn’t even be possible without casting it to unknown first)?

Ephera ,

I guess the point is, it’s not strongly typed during runtime. In other strongly typed languages, that cast would fail, since the underlying memory layout of some random class does not fit to that of a string.

But yeah, as soon as you break out as, you’re telling the type system to fuck off. So, while it does look freaky to me, too, it doesn’t dispell that TypeScript is strongly typed…

DerPapa69 ,
@DerPapa69@lemmy.ml avatar

Yeah, I do agree that it’s a bit weird with TS. It’s fully understandable though, since it just transpiles to JS, which doesn’t have any type information during runtime. I think as far as webdev goes though, TS makes it at least somewhat bearable.

Sorry for the downvote btw - that wasn’t me!

anders , in Optimized Code

@yogthos What. That's not possible? 😃

yogthos OP ,
@yogthos@lemmy.ml avatar

my guess is the optimizer detects the infinite loop and removes it

aspensmonster , in A helpful mnemonic
@aspensmonster@lemmygrad.ml avatar

Nooooo! One of my favourite XKCDs is now ruined!

https://lemmygrad.ml/pictrs/image/16a275e9-92d1-4f64-b7fc-e223cc5ab99d.png

AgreeableLandscape , in Silicon Sorcery
@AgreeableLandscape@lemmy.ml avatar
cypherpunks , in I'm a wizard
@cypherpunks@lemmy.ml avatar

<span style="color:#323232;">add = (
</span><span style="color:#323232;">    lambda f: (lambda g: f(lambda *h: g(g)(*h)))(
</span><span style="color:#323232;">               lambda g: f(lambda *h: g(g)(*h))
</span><span style="color:#323232;">    )
</span><span style="color:#323232;">)((lambda _add: lambda a, b: _add(a ^ b, c << 1) if (c := a & b) else a ^ b))
</span>
southerntofu , in Programming languages like PHP and JavaScript get a lot of valid criticism, but I feel that we do have to consider the fact that their ease of use got A LOT of people into programming.

That’s also why i love the rust ecosystem. If you have rust installed and have your local dependencies (or only use the standard library), the docs can be generated locally (cargo doc). I certainly remember local manuals helping me out more than once over the years :)

ladydascalie ,

Go does this too, and I believe a couple other modern languages do too. Seems like the need for it is real and has been recognised by language authors

ksynwa , in What working as an adult would be like according to your third grade writing teacher.
@ksynwa@lemmy.ml avatar

Wondering if there is a monospace cursive font.

Some fonts express cursive elements whem italisised though.

Ephera ,

I mean, are we sure the font used in that screenshot isn’t monospace?
If you compare the two lines after the first comment, the columns seem to align quite well (though I cannot read some of that)…

Cwilliams ,

Wait, you can read any of that? Impressive

Ephera ,

Well, it helps a lot that I can guess the words from just knowing roughly what C looks like.

For example, the first line, I’m rather sure, reads:


<span style="font-weight:bold;color:#a71d5d;">static</span><span style="color:#323232;"> Chain </span><span style="font-weight:bold;color:#a71d5d;">*</span><span style="font-weight:bold;color:#795da3;">create_chain</span><span style="color:#323232;">(</span><span style="font-weight:bold;color:#a71d5d;">char *</span><span style="color:#323232;">name)
</span>

The only word I’m truly sure about, is “Chain”, and I can mostly read “name”.
The “static” and ”char", I would not be able to make out, without knowing that they’re keywords in C.
And the “create” is pretty much unreadable to me, but it would make sense to be “create_chain”, since it returns a Chain object.

Cwilliams ,

Ah, I see. My C skills could use some brushing up

AgreeableLandscape , in Lady Gaga using PGP
@AgreeableLandscape@lemmy.ml avatar

That’s a really short private key though. Anyone want to do a feasibility analysis on brute forcing it?

gary_host_laptop , in How we see strings Rust/C
@gary_host_laptop@lemmy.ml avatar

All those are ways of calling string in C? Why are there so many?

gun ,
@gun@lemmy.ml avatar

In Rust, and I don’t know

gary_host_laptop ,
@gary_host_laptop@lemmy.ml avatar

Isn’t it a bad thing?

jet ,

Not necessarily a bad thing. If your method of invocation gives context about its possible use cases. You can make the program more safe because you know it’s being used appropriately. If you’re just passing a pointer around anything could happen to it. So it’s hard to help the programmer not make mistakes

bilb , in Someone has high expectations of their users' capabilities
@bilb@lemmy.ml avatar

Man, I’ve been a programmer for over a decade now and my eyes still glaze over when I read regex.

Matheo_bis , in It's really just as good when you think about

Non fungible Tolkien

jonahhw ,
@jonahhw@lemmy.ml avatar

That implies the existance of a fungible Tolkien

TheAnonymouseJoker , in Class.struggle()
@TheAnonymouseJoker@lemmy.ml avatar

return based;

ChinaNumberOne , in There is an imposter among us

https://149351115.v2.pressablecdn.com/wp-content/uploads/2017/06/tabs-spaces-featured.png

using spaces: google, microsoft, apple

using tabs: linux, gnu

MarcellusDrum OP ,

Why is this a line graph? What’s on the X axis?

kakes ,

Casualties.

ksynwa ,
@ksynwa@lemmy.ml avatar

Who tf uses both?

lightsecond ,

Google employees who work on the Linux kernel.

kakes ,

Just a heads up: You and I have fallen for the classic blunder on replying to a 1-year-old thread.

lightsecond ,

Classic lemmy

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