Earlier quoted context omitted.
LuaJIT is, indeed, a genius masterwork, but it's also very intricate and complex. I'm not entirely sure anyone other than Mike Pall could understand it completely. On the other hand Lua (The Original™) is also a beautiful bit of programming, and much more approachable. If you've ever wondered what it means when people talk about "Stack-based VMs", reading through the Lua source is an excellent way to learn more.
But... Lua is a register-based VM since like Lua 5. Not disputing that Rio Lua is also an excellent work though. Lua 5.1 only has 38 opcodes total. A complete description of how the VM works fits on a page or so.
Ask HN: What are some examples of beautiful software?
201–210 of 262 posts
Re: Ask HN: What are some examples of beautiful software?
#202http://www.eurogamer.net/articles/2016-03-03-a-big-interview...
and
Re: Ask HN: What are some examples of beautiful software?
#203C: anything by antirez (redis, etc...) Redis is the epitome of well written understandable C. Ruby: anything written by _why (if you can find the source) He once gave a whole presentation on the splat operator and it's bizarre uses that gave me goosebumps. A true artist. The code twists and contorts ruby in unimaginable ways. JS: anything written by TJ hollwaychuck (express, mocha, etc...) Express is so simple but po…
The first file I opened has 3 gotos but maybe it's pure randomness... ;p
Re: Ask HN: What are some examples of beautiful software?
#204I'm seeing a lot of meanings to "beautiful" here, please, let's define what we're talking about. Does "beautiful" means "the code is clean"? If so, the Quake source code is "beautiful", while Duke3D Build engine is "ugly". Does "beaufitul" means "the code is clever"? If so, gcc, ffmpeg and ODE are "beautiful", and Google's Ninja is "tasteless". Does "beautiful" means "the code is modular" (I mean "open-closed" here)?…
Re: Ask HN: What are some examples of beautiful software?
#205Re: Ask HN: What are some examples of beautiful software?
#206It's funny to read what people think are beautiful apps here. IMHO, the most beautiful software are always games and entertainment titles... After all that is the purpose. Office 2013? It's very useful! I use a classic menu template and got rid of the ribbon, since the functionality is the same, but in my preferred format. Beauty does not come into play with office... I can use it for creating beautiful PowerPoint an…
> Code is never 'beautiful'. It's either concise, well-written and formatted well, or it isn't. This is not true. You may not value beauty as a characteristic of code, but there are people who do. Also, you could say the same thing about novels. "concise, well-written and formatted well" are features of most published novels; does it mean they all are the same in terms of beauty? Beauty is inherently subjective and r…
Re: Ask HN: What are some examples of beautiful software?
#207C: anything by antirez (redis, etc...) Redis is the epitome of well written understandable C. Ruby: anything written by _why (if you can find the source) He once gave a whole presentation on the splat operator and it's bizarre uses that gave me goosebumps. A true artist. The code twists and contorts ruby in unimaginable ways. JS: anything written by TJ hollwaychuck (express, mocha, etc...) Express is so simple but po…
Too bad TJ stopped writing JS and started writing Go.
Re: Ask HN: What are some examples of beautiful software?
#208I'm seeing a lot of meanings to "beautiful" here, please, let's define what we're talking about. Does "beautiful" means "the code is clean"? If so, the Quake source code is "beautiful", while Duke3D Build engine is "ugly". Does "beaufitul" means "the code is clever"? If so, gcc, ffmpeg and ODE are "beautiful", and Google's Ninja is "tasteless". Does "beautiful" means "the code is modular" (I mean "open-closed" here)?…
> ... and what makes it beautiful.
makes this clear. It's a subjective question deliberately looking to elicit subjective answers, with the point of interest being the individual justifications behind those answers.
However, despite my disagreement with your sentiment (calling for a more objective question), you did actually answer the question as well. Thanks for the list.
Re: Ask HN: What are some examples of beautiful software?
#209Earlier quoted context omitted.
Can you provide some more context? > JSON.stringify(1) "1" Stored without a decimal for free, seems like it'd be up to the receiver to interpret it correctly. What if you receive it in JS? JSON.parse(JSON.stringify(1)) > 1 Ok, so it parses an int for free too... thus my confusion. Regardless, you can still override anything it does considering the second argument to both `JSON.parse()` and `JSON.stringify()` allows y…
JSON.stringify(9223372036854775807) "9223372036854776000" JSON.stringify(9007199254740993) "9007199254740992" JSON doesn't support integers for example on my 64bit system it can't support INT_MAX as a value and anything greater then 9007199254740993 might just come out as wrong.
It's absolutely valid JSON. What you're seeing happen is that the JavaScript language parses the Numeric Literal 9007199254740993 to a value of the Number type, and this value does not accurately represent the intended number. This is a feature of JavaScript, not JSON.
You can see the JSON spec here: http://json.org It does not talk about number size or type - simply that a number is a series of digits(and other symbols).
The JSON library for JavaScript has an inherent limitation when parsing JSON formatted numbers, because it tries to represent them as the Number type, and the Number type cannot represent large numbers. It is absolutely possible to write a JSON parsing library that parses JSON numbers into strings(example - http://php.net/manual/en/function.json-decode.php with the JSON_BIGINT_AS_STRING option). This does not change what kind of numbers JSON supports(any decimal).
Re: Ask HN: What are some examples of beautiful software?
#210Earlier quoted context omitted.
"The code twists and contorts ruby in unimaginable ways." Doesn't sound like my idea of beautiful software.
I completely agree. It sounds like the opposite of beautiful software if you ask me. Maybe it's interesting, thought-provoking, or amusing code, but not beautiful.