Bash fork bomb (do not run, this will crash your system if it's not configured properly): :(){ :|:& };:
That got my unix account suspended at university....
Ask HN: What is the most beautiful piece of code you've ever read?
391–394 of 394 posts
Re: Ask HN: What is the most beautiful piece of code you've ever read?
#392John Carmack's Fast Inverse Square Root: https://en.wikipedia.org/wiki/Fast_inverse_square_root#Overv... . The first time I really and truly felt that people approach problems differently from how I, by default, go about them.
If you enjoy this sort of thing, this book is full of bit twiddling algorithms you never thought possible: https://www.amazon.com/Hackers-Delight-2nd-Henry-Warren/dp/0...
Re: Ask HN: What is the most beautiful piece of code you've ever read?
#393Curiously Recurring Template Pattern (CRTP) [0] in C++. class Derived : public Base [0] https://en.wikipedia.org/wiki/Curiously_recurring_template_p...
That's awesome. I ran into this situation in C#, and looks like it is useful in some cases. https://zpbappi.com/curiously-recurring-template-pattern-in-...
Re: Ask HN: What is the most beautiful piece of code you've ever read?
#394Earlier quoted context omitted.
Rebol was closed source back when open source was really starting to take off with Perl and Linux. It is seriously cool (I agree), but the interpreter is a little slow. Red still has a little ways to go, but could be a game changer some day. The project is insanely ambitious, but I'm optimistic.
The main (IMO sad) reason REBOL sits in a weird half-life position of "not quite dead, but..." is that, while REBOL Core is open, the GUI parts (which are crossplatform, and run on Linux) are still closed source. It's a bit like .NET Core. Great to base a business on... not so great to tinker around with. Arguably the second (tinkering, learning) comes before the first (using what you've learned to build a business).…
Rebol 3 is open-sourced along with the GUI (R3-GUI)....
* https://github.com/rebol/rebol
* https://github.com/metaeducation/ren-c (community fork)
* https://github.com/zsx/r3-gui (Atronix fork)