Live data from Hacker News

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

news.ycombinator.com

331–340 of 422 posts

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

#331

Earlier quoted context omitted.

I use emacs, but would love to see a from scratch modern rebuild which deals with rough edges like threading and performance.

Emacs is quite popular and has some of the most skilled programmers I know using it. I'm really surprised that there hasn't been a neovim-equivalent project for emacs. Or maybe it's out there and I just don't know about it?

Spacemacs had some Neovim-like fame at some point. I don't see it promoted that much anymore.

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

#333

Vary random but these are stuff which impressed me on first try and never let me down: Kitty, the terminal emulator by Kovid Goyal wouter, a minimal JS routing library espanso, a text expansion program KDE Connect Tailscale The last 2 together curl

Some more. These are so good that I forgot I used them:

Bitwarden

Linux Mint

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

#335

Earlier quoted context omitted.

> One interesting choice is the decision to compute the number of observed words, N, as the default value of an optional argument, thereby ensuring that it is only computed once You're saying python computes an expression that's part of a default value when the code defining the function is run? I guess it makes sense now that i say it, I wouldn't have automatically assumed that. That's an interesting one to remember…

Python's default arguments are evaluated and stored once. This can cause issues, for example the naive "default to []" program: >>> def function(b, a=[]): ... a.append(b) ... print(a) ... ... >>> function(1) [1] >>> function(2) [1, 2] >>> function(3, [4]) [4, 3] >>> function(5) [1, 2, 5] A correct implementation would be: >>> def function2(b, a=None): ... if a is None: a = [] ... a.append(b) ... print(a)

Surprised to see this works for list() as well.

  >>> def func(b, a=list()):
  ...     a.append(b)
  ...     print(a)
  ...
  >>> func(3)
  [3]
  >>> func(3)
  [3, 3]
Honestly surprised this quirk hasn't bit me yet

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

#336
post #100

Earlier quoted context omitted.

C has managed to survive this long because of: - Unix and its inertia - Licensing of Unix allowing it to proliferate to the masses and being used for education - because it is simple enough that a compiler can be quickly brought up for any new ISA that appears, as long as it looks enough like a 70's-80's CPU architecture enough for pointers to work. Elegant? No. - Making pointers and arrays synonymous is elegant only…

> - Bool - how hard is it to get true and false right? I think this is actually much more complicated than it seems at first thought. There are a lot of different ways to represent booleans, each with their own advantages, and then the hardware has it's own ideas that might need to be considered. I'm not sure that there's any way to do bool that doesn't lead to pain somewhere.

C23 is making true and false _Bool typed values.

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

#337

First coming to mind, HackerNews. No images, no ads, no complex settings UI, no complex points/karma system. Just text and links, it does what it's built for and does it well.

yes, but the user experience is highly related to the awesome work that the moderators do...

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

#338
post #45

Not sure if games count as software but if they do - Factorio. I don't play much these days but I'm still utterly stunned how a relatively small, humble team of developers can build something so robust and performant. Granted, I've never really tried pushing the limits, but not once have I felt like the game is even breaking a sweat while processing thousands of machines, belts, and bots. It's a miracle to me. Their…

Factorio really is a bit of a modern marvel, even HUGE factories don't seem to run poorly at all and I genuinely have no idea how. Other similar games made since (Satisfactory comes to mind) seem to struggle with things like keeping track of resources on belts at scale, which IMO is a perfectly understandable problem to have but still makes factorio that much more impressive.

You can definitely hit the limits of Factorio. My largest base runs at ~10fps which is how I know it's time to start a new game. Egregious use of copy/pasting and an automated robot production will get you there.

It's still leagues ahead of any other game I've played though.

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

#339

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…

The CLI is so confusing that Stackoverflow has a bunch of questions for things that should be easy or trivial by default. Last thing I would call git is "elegant".

https://stackoverflow.com/questions/tagged/git?tab=Votes

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

#340

Emacs - although there's a lot of accumulated cruft in the form of whacky APIs and elisp functions, the design of Emacs is stunningly effective. The way that minor modes and keymaps are composed to customize the interaction mode for each individual buffer is clever and beautiful, to name just one thing out of many. And, as janky as elisp is, it's one of the few extension languages that's actually good at its job, and…

I use emacs, but would love to see a from scratch modern rebuild which deals with rough edges like threading and performance.

And to be clear, I don’t know of many 40 year old projects without warts, emacs has done incredibly well
Post reply on HN