last day (163 days later) » 

19:07

Cursed programming language features

21 mins ago, 11 minutes total – 61 messages, 4 users, 0 stars

Bookmarked 8 mins ago by Redwolf Programs

2
Ooh can I be an RO?
Thanks! Proceeds to 12 you off the face of the earth :p
:(
Hah, 12'd you first
Goto statements
@AaronMiller Comefrom
19:09
yes.
How cursed is cursed?
wait wat
Is "in my opinion this is a poor design choice" cursed enough to put here?
19:09
@pxeger Much
@pxeger Yes
Can the 12'ing stop now? It's a bit disruptive.
Sure
I accidentally added an extra Aaron Miller lol
For some reason I can't move these messages out :/
They're audit messages, I guess?
19:11
How does one move messages, anyway?
Go to the room dropdown
Hit room, and you'll see move messages
@user oh hey look at that
6 messages moved to Sandbox
@pxeger What was the poor design choice, anyway?
Using the ' character for anything other than punctuation of identifiers
(as you can in Haskell) (even though Haskell also uses it for character literals)
19:15
Ooh, changing operator precedence based on how many spaces there are on each side of the operator (and the operator can have a different number of spaces on either side)
does any language do that?
room topic changed to Cursed language features: Cursed language features (no tags)
Error messages that tell you only the approximate area where an error happened or smth like that
Python 3.11 will help with that!
19:19
room topic changed to Cursed language features: Cursed language features [cursed] [js] [language] [php] [python]
Just because
thx
@pxeger The column recording thingy?
19:21
@user "Yeah, that didn't work. Maybe you're missing a semicolon? Or maybe there's unmatched parentheses? Who knows?"
Zsh's parse error near }. Tells you the token it failed on; not where, not why, no further details at all
When it comes across an error, it prints that error and continues with the rest of the program instead of failing
@pxeger It's more informative than Segmentation fault (core dumped) ¯\_(ツ)_/¯
@user well at least you can attach a debugger and work that out
Oh right
@user sometimes, at least
19:23
"Arbitrary precision" math that chooses an arbitrary number of digits for the precision to use each time it does some operation :P
That thing where adding floats adds an extra like 0.0000000000001, except it does it on purpose, and only sometimes, and by a random amount
While we're on this, opinions on using x : T instead of x: T for types?
@pxeger I use x: T for Scala/Kotlin myself, but x : T seems to make more sense for Idris, which kinda borrows it from Haskell
class X : T also makes more sense than class X: T if you're using Kotlin/C#, but that's different, I guess
I do use x : T for type ascriptions in Scala
19:46
The program is read right-to-left, bottom-to-top. But not every single character, like backwards words and stuff, every single word, e.g. Hello World! becomes World! Hello
It'd be even more cursed if there were exceptions for certain things, such as strings
Randomness is done by having a delimiter that means "the code in here is optional" so it might get executed or it might not.
Some commands treat the stack as LIFO, whereas some treat the stack as FIFO.
It's a stack...it's a queue...it's a LinkedList!
the stack is an unordered set, where values are popped based on hash order
And the number of buckets in the set keeps resetting as it grows bigger or smaller
19:56
You push to the stack just like normal, but you can only pop stack[ceil(len(stack)/2)], or the middle value in the stack.
Or even better, you don't have buckets and allow hash collisions
Or even better, you don't have hashes and just retrieve a random value
That, and the random value depends on the architecture that you run your program on
Or the program just chooses a random fetch modus every time it runs
Or the program just does something random every time it runs
20:00
Or the program just randomly rewrites itself every time it runs, as well as while it's running.
Or the program just randomly makes a copy of you that randomly writes a new program in a random language to do a random task. Then the copy puts you in your basement and replaces you
The trick is to cause a non-halting program to be generated, which means your copy never gets around to replacing you
Genius
I think we're straying from cursed language features and going more towards unusable language features. Not that that's a bad thing.
Malbolge could teach you a lot here :P
The only loops available are do...while loops, which means that the stuff in the loops will always be executed at least once, no matter what. But the condition is ran before each iteration, including the first, so whenever the loop is broken, it will still run an extra time, or if it evaluates to false before looping and then the loop makes it evaluate true, it will still break the loop, since it already evaluated to false.
Or, put more simply, it's a while loop, but evaluating to false means the loop will break after this iteration.
20:14
Or perhaps even worse, the program wants to make sure that you intended to break the loop, so if it evaluates to false, it runs again, and then if it is still false, then it breaks the loop, but if it has changed to true, it keeps going.
"You wanna break? Are you absolutely sure? Lemme just run that again for you"
exactly

  last day (163 days later) »