Live data from Hacker News

Ask HN: What are some examples of beautiful software?

news.ycombinator.com

201–210 of 262 posts

Re: Ask HN: What are some examples of beautiful software?

#201
post #155

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.

D'oh, my mistake. The VM is, indeed, register-based. The C API is stack-based. But yes, a very lovely bit of code all together.

Re: Ask HN: What are some examples of beautiful software?

#203
post #101

C: 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…

>C: anything by antirez (redis, etc...) Redis is the epitome of well written understandable C.

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?

#204
post #190

I'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)?…

What if OP wanted different examples and the explanation why they are beautiful in the posters opinion? Seems like it would get more interesting submission than simply asking for "small" software.

Re: Ask HN: What are some examples of beautiful software?

#205
"If Hemingway Wrote Javascript" (https://www.nostarch.com/hemingway, see also https://javascriptweblog.wordpress.com/2015/01/05/if-hemingw...), in which five short programs are each written in five different styles (all in Javascript). It shows how different programming styles can be used in the same language to solve the same problem. It's unlikely that you'll start writing in the style of Borges or Austen after reading this, but it is entertaining and amusing.

Re: Ask HN: What are some examples of beautiful software?

#206

It'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…

In my opinion it depends on the type of code. It's unlikely to find beauty in a run-of-the-mill CRUD app; it can be nice and neat at best. Beautiful code is possible when there's creativity involved - there should be some conceptual originality to the code in question. Of course it's not physically impossible to bury some brilliancy in a bank transaction processing script, it's just a less probable place to find one.

Re: Ask HN: What are some examples of beautiful software?

#207
post #101

C: 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.

And now he is writing a language https://github.com/tj/luna

Re: Ask HN: What are some examples of beautiful software?

#208
post #190

I'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)?…

I completely agree with wingerlang here, and I think the fact that the OP ends with

> ... 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?

#209
post #185
post #153

Earlier 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.

You haven't demonstrated your premise. JSON is a format for storing data, completely separate from the JavaScript language. Try validating this in a JSON validator: { "number" : 9007199254740993 }

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?

#210

Earlier 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.

It's more enlightenment / thinking out of the box / less is more beauty.
Post reply on HN