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.

HiddenLayer5 , in Handle your errors properly

Just ship it with debug flags so your program always generates a stack trace to the user!

PokestarFan , in (Deprecated)

The class is a stupid question

MajorHavoc ,

And the other answers are worthless (and those who posted them equally worthless) because they tried to help without paying anal attention to the exact amount of water in the glass. /s

leachim6 , in (Deprecated)

Your glass has been drained as a duplicate

Elbullazul , in is Your Child Texting About Programming Languages?
@Elbullazul@lemmy.ml avatar

Abhorrent kafkaesque arithmetic

TIL that kafkaesque is a real word

i_love_FFT ,
@i_love_FFT@lemmy.ml avatar

aka: all my code

elouboub , in Handle your errors properly
@elouboub@kbin.social avatar

Makes me think of devs who debug with print statements instead of a debugger and breakpoints.

Fabiozeh ,

Well, Kernighan himself said “The most effective debugging tool is still careful thought, coupled with judiciously placed print statements.”

If it was good enough for him…

CannotSleep420 , in is Your Child Texting About Programming Languages?

“Bad recursion brb” is a good one.

TheElectroness , in so scary

If you think vim is bad for this, try dte :P

FirstWizardZorander , in so scary

When I first started my Linux journey about 23 years ago, I only ran it in text mode, since my computer didn’t have the disk space for X. I remember using Vim, and whenever I wanted to close it I would hit Alt-F4, which of course performed a VT switch.

When I inevitably launched Vim again on VT4 and wanted to close it, I obviously coudn’t, but I got the idea that Alt-F5 was a more powerful Alt-F4, so I used that.

After that I figured I was stuck and rebooted the machine.

TheElectroness , in Bleeding edge technology

Wait, when did they get past 1.4 ? /s

Also, could Oracle/Sun ever get around to not changing the numbering system on a product midway through a product life. I mean, Java 1.21 is great and all, but you know…

TheElectroness , in Optimized Code

I assumed, at first, that it was somehow falling through the infinite loop and accidentally runnning the unreachable function, but it clearly explicitly runs it in the assembler generated…

<pre style="background-color:#ffffff;">
<span style="color:#323232;">10f4: 48 8d 3d d5 00 00 00  lea    0xd5(%rip),%rdi        # 11d0 <_Z11unreachablev>
</span><span style="color:#323232;">10fb: ff 15 b7 2e 00 00     call   *0x2eb7(%rip)        # 3fb8 <__libc_start_main@GLIBC_2.34>
</span>

how odd.

edit: ah, it’s called from __start, which suggests that main is being elided entirely by the optimiser, and somehow ‘unreachable’ is simply becoming a defacto ‘main’

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

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