Email or username:

Password:

Forgot your password?
62 comments
Tenacious B (twoot.site edition)

@luna you know, sometimes I'm really in awe at how adept people can become at cursed C.

aoanla

@bean @luna the "exponential" is particularly full of evil, I "enjoyed" the minute or so I needed to fully appreciate it.
Possibly not portable to all architectures, though?

Steven Reed

@aoanla @bean @luna definitely won't work on EBCDIC machines ...

aoanla

@srtcd424 @bean @luna that was my first thought, yes! (I think the first number would have to be 242 maybe for it to work on EBCDIC?)

Luna, but on a new instance

@aoanla @srtcd424 @bean I put it to the both of you that using an EBCDIC machine in 2024 is far worse than anything I've written.

aoanla

@luna @srtcd424 @bean I think horrifying the horror counts as a win, right?

Steve Canon

@luna @aoanla @srtcd424 @bean right, everyone should be using UTF-EBCDIC instead so they can represent all of Unicode.

greeeeen :v_alloaro_2: (sometimes clover)

@luna@pony.social wait,, what would ** even do in C? it's not an operator,, right?

edit: i got it now. thanks everyone. can you stop explaining the joke now?

tekhedd

@luna I'm not sure how I feel about this.

Shane Celis

@me Omg, is ‘2’ 50 in ascii? Yes. Yes, it is.

Natty :butterflyN:

@luna@pony.social how the fuck does it deref to that perfect point in memory

koorogi

@luna that's very cute, but not strictly guaranteed to work because C doesn't assume ASCII compatible encodings.

James 🌈💜

@koorogi @luna

5.2.1.3 of ISO/IEC 9899 does actually define the character set as ASCII compatible.

koorogi

@shaknais @luna I don't think so. That specifies a set of characters that must exist, that they must fit in a byte, and that characters 0-9 must be consecutive and in order. It doesn't mandate that their values match ASCII.

I believe EBCDIC would meet the requirements, and it is not ASCII compatible.

James 🌈💜

@koorogi @luna

Not just characters 0-9, but every character in the original ASCII set must exist, and in order, and be represented by a single increment, beginning with 0.

EBCDIC compatibility was dropped in C17, as the standards body couldn't find any still in use.

phooky

@luna this one makes me irrationally angry for reasons i do not fully understand, thank you

Sigma

@luna@pony.social That's really cool! What does the ** do in this case?

cliffle

@luna oh my god this is amazing

I wish we had this in Rust 😭 😉

Anselm Schüler

@cliffle @luna you can modify your std to implement dereferencing for integers to return a proxy object that can be multiplied to exponentiate, no-one’s stopping you!

cliffle

@anselmschueler ...so I know that was a joke but that's actually really hard to achieve without replacing the Deref trait, because of its return type

Ok I will stop over thinking this now 😁

40whirl

@luna thanks i hate this :blobcathissing:

Andres Moreno

@luna

Running to the sink with my hair on fire!

UnknownSilicon

@luna Wow that is some of the most cursed C code I've seen LOL

scarcraft

@luna What font are you using in this capture?

Thanks

Moritz Poldrack :arch:

@luna no offence but I feel the urge to punch your computer.

Marc

@luna outch this one hurts. Congrats.

Félix

@luna from now on I want to see all programming shitposts in Comic Sans Mono

Luna, but on a new instance

@fay59 oh this is just the font I use for my shell anyways, I didn't choose it for the shitpost

Félix

@luna I figured that might be the case but I think you really stumbled onto something big here

Sam Brown

@luna Your revenge on the C programming language will never be complete, will it? :)

jadedctrl :programo:

@luna totally unrelated, sorry, but I’ve gotta ask — what font’re you using? :anja_adormiras:

Schaf

@luna not sure is this is even legal

Dag Ågren ↙︎↙︎↙︎

@schaf @luna It's legal by the C language standard, but not by the church.

Schaf

@WAHa_06x36 @luna ah, so it's legal for all relevant authorities.

серафими многоꙮчитїи

@luna brb trying to explain to the villagers why they need to bring flaming torches and pitchforks

(brilliant work, so underhanded it does exactly what you expect it to)

Matthew Garrett

@luna Staring at this very confused until I realised I was thinking in hex and not decimal

Pffff...

@luna Please, please, don't ever show this to my students! 😭

Florian 'floe' Echtler

@luna yegads, I'm on my phone and now I'm trying to simulate a C compiler in my head, make it stooooop 😵‍💫

Go Up