Live data from Hacker News

Ask HN: What are your favorite examples of elegant software?

news.ycombinator.com

191–200 of 422 posts

Re: Ask HN: What are your favorite examples of elegant software?

#192

Git is the first example that comes to my mind. I'm aware that the concept can be difficult to grasp and that the cli commands seem weird at first. Once it clicks however, it's an absolutely fantastic tool. I'm still often amazed by what is possible with selective resets, diffs, greps, and most impressively interactive rebases. It makes a lot of otherwise difficult tasks much easier, and more elegant. Git is IMO one…

You might get a kick out of this. Tech Talk by Linus Torvalds at Google presenting Git: https://www.youtube.com/watch?v=4XpnKHJAok8 . He goes into his thought process of the pains with existing version control systems and how Git goes to address their shortcomings.

Re: Ask HN: What are your favorite examples of elegant software?

#195
post #77

Earlier quoted context omitted.

In what way do you feel V8 is not "embeddable on its own"?

Wasn't Node basically created to make V8 embedding feasible? Just by looking at the answer in this example, the idea of isolates seems pretty complicated https://stackoverflow.com/questions/67041878/how-do-i-embed-...

That definitely isn't why Node was created... Node is a standalone programming environment that embeds V8, it doesn't somehow help you embed V8 in one of your projects or make that "feasible". In fact, one of the issues with Node for a long time was that every Node plug-in was expected to directly use the embedding API from V8--in no small part as it is actually a pretty easy-to-use API--and that made the entire ecosystem lock-step on V8 API changes (which got tied to major Node versions).

Much later, Node added two little abstraction layer over V8's APIs: one that is mostly done in some header files (to deal with the occasional backwards compatibility issue) and another which actually wraps V8; and, even then, AFAIK the latter was mostly done to allow entirely replacing V8 with ChakraCore. But neither of these abstractions are designed to be used by others outside of Node's cosebase (something I almost sort of got working once, but not really): they don't help you embed V8... V8 is already easy to embed.

Notably: V8's embedding API isn't particularly more complicated than the API of any other engine: it is simply more templated. If you sit around with SpiderMonkey, JavaScriptCore, or even DukTape, you will find yourself allocating machines, managing handles, converting strings, and checking types of values. This is of course going to be verbose, in the same way that using JNI to call into Java is verbose, or generally accessing any embedded VM from a language like C/C++ is verbose (and for all the same reasons).

Post reply on HN