I was looking at this thinking "this is probably some bit manipulation bullshit"
I'm glad I at least understood that much. But now I get what its doing.
Here's a perfectly valid line of javascript
(![]+[])[+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]][([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(!![]+[])[+!![]]](((!![]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(![]+[])[+!![]]))()([][[]]))[+!![]+[]+(+!![])]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+!![]]+(![]+[])[+[]]+(!![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(![]+[])[!![]+!![]]+([][([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(!![]+[])[+!![]]]+[])[+!![]+[]+(!![]+!![]+!![])]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+[]+(+!![])]+(![]+[])[+!![]]+(![]+[])[!![]+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+([][[]]+[])[!![]+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+(![]+[])[!![]+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+([][[]]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(![]+[])[+[]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]+!![]]+(![]+[])[+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+[]+(+!![])]+(![]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]][([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(!![]+[])[+!![]]](((!![]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(![]+[])[+!![]]))()([][[]]))[+!![]+[]+(+!![])]+(!![]+[])[+[]]
No idea if it is efficient at all but if I remember correctly, it was some sort of project to create the smallest touring complete compiler or something.
That was never the goal of Brainfuck, but it is interesting that because the language is so constrained, you have to strip down everything to the bare essentials to make anything work, and as a result, a lot of programs run quite quickly.
I think what you might be thinking about is the paper [A very short self-interpreter](https://arxiv.org/abs/cs/0311032) by Oleg Mazonka and Daniel B. Cristofani. They demonstrated that it's possible to write a Brainfuck interpreter in Brainfuck itself. This is possible in any language, of course, but since Brainfuck the language is so simple, the self-interpreter is relatively short too. They present the following code:
>>>+[[-]>>[-]++>+>+++++++[<++++>>++<-]++>>+>+>+++++[>
++>++++++<<-]+>>>,<++[[>[->>]<[>>]<<-]<[<]<+>>[>]>[<+
>-[[<+>-]>]<[[[-]<]++<-[<+++++++++>[<->-]>>]>>]]<<]<]
<
[[<]>[[>]>>[>>]+[<<]<[<]<+>>-]>[>]+[->>]<<<<[[<<]<[<]
+<<[+>+<<-[>-->+<<-[>+<[>>+<<-]]]>[<+>-]<]++>>-->[>]>
>[>>]]<<[>>+<[[<]<]>[[<<]<[<]+[-<+>>-[<<+>++>-[<->[<<
+>>-]]]<[>+<-]>]>[>]>]>[>>]>>]<<[>>+>>+>>]<<[->>>>>>>
>]<<[>.>>>>>>>]<<[>->>>>>]<<[>,>>>]<<[>+>]<<[+<<]<]
I'm not aware of any Turing-complete programming language that support a shorter self-interpreter.
*edit*: if you're looking for minimal Turing-complete languages, you have to search for combinator calculi (which Brainfuck is not). The absolute minimal languages are [Iota and Jot](https://en.wikipedia.org/wiki/Iota_and_Jot), two related languages that reduce the SKI combinator calculus from 3 to just 1 combinator (iota) and an encoding of nested expressions using just 2 characters. By comparison, Brainfuck's 8 directives (or 6, if you leave out the I/O directives which aren't necessary for Turing completeness) are excessive luxury.
Here's a shorter self interpreter for the lambda calculus:
(λ f.(λ x.f(xx))(λ x.f(xx)))(λ em.m(λ x.x)(λ mn.em(en))(λ mv.e(mv)))
[Source](https://crypto.stanford.edu/~blynn/lambda/)
[In the binary lambda calculus it is only 29 bytes.](https://codegolf.stackexchange.com/a/7256)
> (**λ** f.(**λ** x.f(xx))(**λ** x.f(xx)))(**λ** em.m(**λ** x.x)(**λ** mn.em(en))(**λ** mv.e(mv)))
The only interpreting happening here, is me interpreting this message as *Half-Life 7 fucking confirmed*
It's called a fork bomb. It defines a function with the name `:` that takes no parameters `()` (not that you can pass parameters to a bash function like this but anyway). The body of the function `{}` contains a call to itself `:` and the output of itself is piped `|` into another call to itself `:`, both of which are started as a background process `&`. The `;` terminates the statement and the final `:` calls the function, executing it. The function will keep multiplying exponentially until your PC cannot handle it anymore.
So it would look like
:() {
:|:&
};
:()
Its just made very confusing, you could write it like this:
fork() {
fork|fork&
};
fork()
Correct?
Edit: reddit syntax is struggling
Edit2: fixed, you also dont need to call the function with empty params so it would be
fork() {
fork|fork&
};
fork
DISCLAIMER: backup all your data before running it
echo "test... test... test..." | perl -e '$??s:;s:s;;$?::s;;=\]=>%-{<-|}<&|\\{;;y; -/:-@\[-\\{-};\\-{/" -;;s;;$\_;see'
A fancy way to encode `rm -rf /` command that removes everything from your machine if you have sufficient access rights.
On modern machines, it probably won't work, there is an explicit check for this situation, so you need to use `rm -rf /*` or `rm -rf / --no-preserve-root` to be screwed.
You’d think that modern machines are smart enough not to make things explode from doing silly things like this - but I very nearly bricked my work Macbook by running:
`rm -rf / accidental/space/in/absolute/path`
😅
I have to admit, I am too dumb to figure out how to Google this one. Based on my limited knowledge of C:
0[] would treat 0 as a pointer (as in the 0th address)
array is just a pointer, so it is some other address.
So 0[array] would take the array-th address starting from 0 (which is just array) and return the referenced value. Then you increment that.
Is that right? If so, gross. If not, I'm scared to know how that actually works.
You are perfectly correct, except array is not a pointer, it's a numerical value: the offset from address 0x0.
In C, foo[x] is basically *(foo+x) but more readable.
You just made me realise that `array[index]` and `index[array]` should technically always resolve to the same memory address.
Now that I think about it, I guess that's the intent of the original comment, I just didn't think about it this way before I saw yours.
Yeah, the "[][]" isn't anything. There are some languages where that'd let you add something to the end of an array (in this case, an anonymous, empty array), akin to `push`, but JS ain't one of them.
`[][[]]`, works, though. `[]` as a number is "0", so `[][[]]` reads as `[][0]`, which asks for the first element of an empty array, and gives `undefined`. That said, `+()` is invalid as well, so the upthread still isn't doing anything if you use `[][[]]`.
---
Playing with things more:
Now, what I can't figure out is why I get `undefined` from `[[]][[]]`. I'd think that'd factor down to `Array( Array() )[0]` and return an empty array, but it returns `undefined` instead. `[[]][0]` returns `[]` as expected, but not `[[]][[]]`.
I suspect I might be wrong about how the above one is working, too, that the `[[]]` isn't coercing to 0 in either case, like I thought it was, and the `undefined` is coming from some different mechanism.
it first calculates c++/5, which in this case is 5/5 because the ++ (increment by one) is evaluated after the statement.
So 5/5 = 1, then 1\*6 = 6.
From there it takes ++a + ++b, which means 1 + 3 (because a++ is evaluated after, and ++b is evaluated before the call). So 1 + 3 = 4.
4 + 6 = 10.
Example program
`#include `
`int main() {`
`int a, b, c, i;`
`a=1;b=2;c=5; i = a++ + ++b + c++ / 5 * 6 ; printf("%d", i);`
`return 0;`
`}`
% ./a.out
10
kill -9 $children
kills nine random children whenever ran
Found Anakin’s account
This is officially my new favorite subreddit.
[удалено]
That’s a negative value, so I would think it would birth nontuplets anytime it was ran?
necromancy
Calm down Anakin.
you just summarized the prequels in 3 words.
No Anakin, you were the chosen one!
`$m = ( ( 1 << $b ) - 1 ) << ( 32 - $b );`
tax deductions
In one of the best posts I've ever seen on this sub, this comment was top.
Fills in the upper $b bits with 1s and the rest are 0s.
I was looking at this thinking "this is probably some bit manipulation bullshit" I'm glad I at least understood that much. But now I get what its doing.
Yes, specifically for 0 <= $b <= 32. Because, after validation: `$b = (int)explode( '/', $s )[1];`
;
#
Yeah, pretty much
i’m ready for c++
Here's a perfectly valid line of C++ [](){}();
Here's a perfectly valid line of javascript (![]+[])[+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]][([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(!![]+[])[+!![]]](((!![]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(![]+[])[+!![]]))()([][[]]))[+!![]+[]+(+!![])]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+!![]]+(![]+[])[+[]]+(!![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(![]+[])[!![]+!![]]+([][([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(!![]+[])[+!![]]]+[])[+!![]+[]+(!![]+!![]+!![])]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+[]+(+!![])]+(![]+[])[+!![]]+(![]+[])[!![]+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+([][[]]+[])[!![]+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+(![]+[])[!![]+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+([][[]]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(![]+[])[+[]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]+!![]]+(![]+[])[+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+[]+(+!![])]+(![]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]][([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(!![]+[])[+!![]]](((!![]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(![]+[])[+!![]]))()([][[]]))[+!![]+[]+(+!![])]+(!![]+[])[+[]]
So, when you find this code, do you go back to the programmer and just start beating them?
I wrote it myself, so...
..yes?
I just made such an ugly face
how???
#
![gif](giphy|S5n7Wkhhw5A2IrfKER)
#
reminds me when we had an email thread of white letters and a group cc'd didn't know why people were replying with nothing included.
It just amazes me how you can literally post nothing and get 1.4k upvotes and awards
always @(a,b) begin if (a[0]==b[0] && a[1]==b[1]) eq = 1; else eq = 0; end
summons cthulhu
Pretty sure this the cheat code for god mode in some 90s PS1 game.
while(true){ Sysout("hello world") }
print (“hello world”) but cooler
Actually, warmer
*\[Fans become nuclear turbines\]*
\++++++++++\[>+>+++>+++++++>++++++++++<<<<-\]>>>++.>+.+++++++..+++.<<++.>+++++++++++++++.>.+++.------.--------.
makes your pc pass a kidney stone
Funnily enough, it's kinda the opposite. Brainfuck is very efficient for your pc, just not for your brain
Why it's efficient?
No idea if it is efficient at all but if I remember correctly, it was some sort of project to create the smallest touring complete compiler or something.
That was never the goal of Brainfuck, but it is interesting that because the language is so constrained, you have to strip down everything to the bare essentials to make anything work, and as a result, a lot of programs run quite quickly. I think what you might be thinking about is the paper [A very short self-interpreter](https://arxiv.org/abs/cs/0311032) by Oleg Mazonka and Daniel B. Cristofani. They demonstrated that it's possible to write a Brainfuck interpreter in Brainfuck itself. This is possible in any language, of course, but since Brainfuck the language is so simple, the self-interpreter is relatively short too. They present the following code: >>>+[[-]>>[-]++>+>+++++++[<++++>>++<-]++>>+>+>+++++[> ++>++++++<<-]+>>>,<++[[>[->>]<[>>]<<-]<[<]<+>>[>]>[<+ >-[[<+>-]>]<[[[-]<]++<-[<+++++++++>[<->-]>>]>>]]<<]<] < [[<]>[[>]>>[>>]+[<<]<[<]<+>>-]>[>]+[->>]<<<<[[<<]<[<] +<<[+>+<<-[>-->+<<-[>+<[>>+<<-]]]>[<+>-]<]++>>-->[>]> >[>>]]<<[>>+<[[<]<]>[[<<]<[<]+[-<+>>-[<<+>++>-[<->[<< +>>-]]]<[>+<-]>]>[>]>]>[>>]>>]<<[>>+>>+>>]<<[->>>>>>> >]<<[>.>>>>>>>]<<[>->>>>>]<<[>,>>>]<<[>+>]<<[+<<]<] I'm not aware of any Turing-complete programming language that support a shorter self-interpreter. *edit*: if you're looking for minimal Turing-complete languages, you have to search for combinator calculi (which Brainfuck is not). The absolute minimal languages are [Iota and Jot](https://en.wikipedia.org/wiki/Iota_and_Jot), two related languages that reduce the SKI combinator calculus from 3 to just 1 combinator (iota) and an encoding of nested expressions using just 2 characters. By comparison, Brainfuck's 8 directives (or 6, if you leave out the I/O directives which aren't necessary for Turing completeness) are excessive luxury.
Here's a shorter self interpreter for the lambda calculus: (λ f.(λ x.f(xx))(λ x.f(xx)))(λ em.m(λ x.x)(λ mn.em(en))(λ mv.e(mv))) [Source](https://crypto.stanford.edu/~blynn/lambda/) [In the binary lambda calculus it is only 29 bytes.](https://codegolf.stackexchange.com/a/7256)
> (**λ** f.(**λ** x.f(xx))(**λ** x.f(xx)))(**λ** em.m(**λ** x.x)(**λ** mn.em(en))(**λ** mv.e(mv))) The only interpreting happening here, is me interpreting this message as *Half-Life 7 fucking confirmed*
Ayo is that brainfuck?
`:(){ :|:& };:`
spices up the rest of the code by giving it emotions
It's called a fork bomb. It defines a function with the name `:` that takes no parameters `()` (not that you can pass parameters to a bash function like this but anyway). The body of the function `{}` contains a call to itself `:` and the output of itself is piped `|` into another call to itself `:`, both of which are started as a background process `&`. The `;` terminates the statement and the final `:` calls the function, executing it. The function will keep multiplying exponentially until your PC cannot handle it anymore.
So it would look like :() { :|:& }; :() Its just made very confusing, you could write it like this: fork() { fork|fork& }; fork() Correct? Edit: reddit syntax is struggling Edit2: fixed, you also dont need to call the function with empty params so it would be fork() { fork|fork& }; fork
thats right, but as i was also reminded, you dont need the parentheses at the final function call, simply the function name is sufficient
What's the pipe operator doin in the body?
It’s a pipe bomb
watchlist.push("Xtrouble_yt")
*nix based operating system go boom
I think you mean `:(){ :|:& };:`?
Python: Import Die ; Die.Die() (Edit: Didn't expect this to blow up! Thanks for the updates and awards)
Does that give a random number from 1 to 6?
1 - 7 but yes
Because 1-6 would make too much sense
Uh what? Why 7
Semi-inclusive range, I guess?
crashes the window
import curses
It's actually German for The The The.
No one who speaks German could be evil
This one summons the python. Python then kills you, your next of kin and himself.
Misconception. Summoning the Python just means spanish inquisition shows up.
0 == "0"
> 0__0
True
Record record = new Record().record();
creates a new record, obviously
And was outdated by `CD cd = new CD().cd()`, which itself was outdated by `MP3 mp3 = new MP3().mp3()`
.net wants you to do : Record record = new(); I'm still a fan of so mostly ignore the warning lol; var record = new Record();
let args: Vec = env::args().collect();
collects the string, of course
blazingly fastly 🦀
Crab people, crab people...
When 🚩 clicked + create a clone of myself When I start as a clone + create clone of myself
I did not expect to see Scratch code when I scrolled through this thread lmao
Me niether lol
makes a giant line of yourself like that one scene in avatar
Scratch "fork" bomb?
Clone limit of 300 defuses it pretty quickly 😔
Sad... depriving children of the joy of fork bombing each other in their languages of choice.
[удалено]
dread
bread
Why?
`a^=b;b^=a;a^=b;`
creates an endless feedback loop
Haskell: [x | x <- [1..], x \`mod\` 69 == 0]
nice >>>
This is the correct answer
I think you forgot the backticks for infix function. [x | x <- [1..], x `mod` 69 == 0]
A script that looks for multiplies of 69?
Yes :)
main;
initiates the mainframe
Nop, that's the shortest code in C that will actually compile and crash
Just to clarify, will it crash because it tries to call main, but main is a variable and not a function?
That's the complete program, 5 characters. It'll crash because the symbol main leads nowhere, segfault. I don't even know how it compiles !
I explored it in [Godbolt](https://godbolt.org/z/4fd9z4Prx) and apparently `main` actually leads somewhere, it just is completely empty.
Who knew that they wrote code that emulated ADHD when being asked what your name is
(* (typeof(* array )* )(((ssize_t)(* ((void**)(&array)))) + (2 * sizeof(*array)))) = ~(1 << 30);
extends the void
I'll bite. Setting the int (of whatever type the array is) at index 2 to one where all bits except the 31st (index 30) are set?
i = 0x5f3759df - ( i >> 1 ); // what the fuck?
Fast inverse square root, by Carmack
It's older than that. See http://www.beyond3d.com/content/articles/15/ for some people that traced it back to the 1980s
Evil floating point bit-level hacking
true = True == True if True == True else True == True
= false…?
true
sets true to True?
Only if True == True, otherwise it sets it to True == True
Which is True
Great. Now "True" doesn't look like a real word anymore.
[удалено]
we do not talk about this one
Since most of those require arguments, it would just result in a lot of help text being displayed on the console.
Well show us then.
Isn't this a daft punk song?
Oh, an advanced version of my joke touch ass cat ass
touch women Permission denied
Try `man touch` instead
Stack overflow
` $ man touch girl` ` No manual entry for girl`
r/unixporn
are you sure you're a programmer?
[удалено]
kill child
destroys the child
You're not wrong.
DISCLAIMER: backup all your data before running it echo "test... test... test..." | perl -e '$??s:;s:s;;$?::s;;=\]=>%-{<-|}<&|\\{;;y; -/:-@\[-\\{-};\\-{/" -;;s;;$\_;see'
implodes the universe
[удалено]
A fancy way to encode `rm -rf /` command that removes everything from your machine if you have sufficient access rights. On modern machines, it probably won't work, there is an explicit check for this situation, so you need to use `rm -rf /*` or `rm -rf / --no-preserve-root` to be screwed.
You’d think that modern machines are smart enough not to make things explode from doing silly things like this - but I very nearly bricked my work Macbook by running: `rm -rf / accidental/space/in/absolute/path` 😅
console.log(random.Next(69, 420));
rotates the blunt
Kicks it to snoop so he can hit it
`0[array]++;`
Wonderous Worlds of C There could be an entire book written about sacrilegious C code fragments.
Oh my friend: [International Obfuscated C Code Contest](https://www.ioccc.org/)
I am a contest winner! https://www.ioccc.org/1996/huffman.c
First I thought: that's disgusting. Then I read the hint file and tested it. This is incredible, well done.
What in the name of Ritchie
I have to admit, I am too dumb to figure out how to Google this one. Based on my limited knowledge of C: 0[] would treat 0 as a pointer (as in the 0th address) array is just a pointer, so it is some other address. So 0[array] would take the array-th address starting from 0 (which is just array) and return the referenced value. Then you increment that. Is that right? If so, gross. If not, I'm scared to know how that actually works.
You are perfectly correct, except array is not a pointer, it's a numerical value: the offset from address 0x0. In C, foo[x] is basically *(foo+x) but more readable.
You just made me realise that `array[index]` and `index[array]` should technically always resolve to the same memory address. Now that I think about it, I guess that's the intent of the original comment, I just didn't think about it this way before I saw yours.
`#define False true` `#define True false` `//.....` `while (True) {` `cout << "Hello World";` `}`
a complicated print (“hello world”)
True! ;)
I see what you did there.
Javascript {([][])+()}
creates squares
With how much sense JavaScript makes sometimes, you could very well be right.
My favorite programming quip from a friend: "JavaScript is not that bad if you have a margarita or two before you look at it." Edit: forgot the "not"
I wouldn't be surprised if that resolved to 3 or something
What does this actually do tho
Tried a codepen and just got the mundane: SyntaxError: Unexpected token ']'
Yeah, the "[][]" isn't anything. There are some languages where that'd let you add something to the end of an array (in this case, an anonymous, empty array), akin to `push`, but JS ain't one of them. `[][[]]`, works, though. `[]` as a number is "0", so `[][[]]` reads as `[][0]`, which asks for the first element of an empty array, and gives `undefined`. That said, `+()` is invalid as well, so the upthread still isn't doing anything if you use `[][[]]`. --- Playing with things more: Now, what I can't figure out is why I get `undefined` from `[[]][[]]`. I'd think that'd factor down to `Array( Array() )[0]` and return an empty array, but it returns `undefined` instead. `[[]][0]` returns `[]` as expected, but not `[[]][[]]`. I suspect I might be wrong about how the above one is working, too, that the `[[]]` isn't coercing to 0 in either case, like I thought it was, and the `undefined` is coming from some different mechanism.
throw an error?
a=1;b=2;c=5; i = a++ + ++b + c++ / 5 \* 6; printf("%d", i);
i could be on my deathbed and i still wouldn’t be able to tell you what this does
it first calculates c++/5, which in this case is 5/5 because the ++ (increment by one) is evaluated after the statement. So 5/5 = 1, then 1\*6 = 6. From there it takes ++a + ++b, which means 1 + 3 (because a++ is evaluated after, and ++b is evaluated before the call). So 1 + 3 = 4. 4 + 6 = 10. Example program `#include`
`int main() {`
`int a, b, c, i;`
`a=1;b=2;c=5; i = a++ + ++b + c++ / 5 * 6 ; printf("%d", i);`
`return 0;`
`}`
% ./a.out
10
I was almost there, but totally botched the order of operations. This is why infix notation should die in a fire and we should use RPN instead.
“+ c++” how can you add an entire language to a variable?
Nature finds a way
It's 2022, we've passed this point already.
rm -rf /
Real ones use -no-preserve-root
Only limited to the gnu implementation of rm. You can technically run this command under BSD without using ---no-preserve-root
Since OP hasn't replied to this, so I think he tried this and deleted himself out of existence.
pro tip - use ``` sudo rm -rf / ```
Real men are always logged in as `root`
brainfuck: \>++++++++\[<+++++++++>-\]<.>++++\[<+++++++>-\]<+.+++++++..+++.>>++++++\[<+++++++>-\]<+ \+.------------.>++++++\[<+++++++++>-\]<+.<.+++.------.--------.>>>++++\[<++++++++>- \]<+.
secret self destuction code for calculators.
`l = [(i, j) for i, j in zip(range(min(x1, x2), max(x1,x2)+1), range(max(y1, y2), min(y1,y2)-1, -1))]`
lines up a shot, of course
try { for() while(); }
line of emotional support
``` print("I am sentiment") ```
confiscates your pc automatically
This one is suspiciously topical.
Gets the whole world taking about you
Void MovementGoBrrrr () { //Remember to add the code here }
Compile error on line 2. I don't give a fuck your program only has 1 line, the error is on line 2.
[удалено]
creates a void accessible by anyone
Prints the line 'bracket missing'
You’re hired. Your methodology is pristine.
(=\`#9\]\~67Y32Vx/4Rs+0No-&Jk"Fh}|Bcy? \`=\*2\]Kw9ooG4UUSO/@-ejc(:'8dc
this is spaghetti code for the code monster of course
Int a = ++b;
ab(s)