Live data from Hacker News

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

news.ycombinator.com

81–90 of 422 posts

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

#81

SolidWorks Altium Comsol Proprietary yes, but I’ve used all three over the last few years and found them each to be very streamlined, productive, and elegant after a fashion.

IMHO SolidWorks is terrible. Single core performance limitation, huge disk IO, no out of box support for STEP GD&T export, ridiculous drawing-oriented BOM export UX, half-measure built-in RCS/VCS system, collision-prone namespace, etc.

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

#85
post #66
post #34

Keyboard Maestro. It’s a tool for automating common tasks on a Mac. A real programming language is certainly more elegant for writing programs. But what I find elegant about Keyboard Maestro is that it lets me add programming logic to any application on my Mac, quick and dirty.

I love Keyboard Maestro's "Click on Found Image" action. Definitely quick and dirty, but it's great for ad-hoc web page automation when I can't be bothered to knock something up in puppeteer etc.

Exactly!

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

#86
post #79

The Tokio async stack for Rust ( https://tokio.rs ). They did a really nice job of building thin layers up the stack from byte buffers (bytes), to async-friendly logging (tracing), basic IO (mio), async runtime (tokio), generic request/response services (tower), HTTP (hyper), and a web framework (axum). Each of the layers are useful independent of the other layers above, and every one is has a thoughtfully designed,…

I believe I read that Tokio was a "hacky" way to add async to Rust - similar to the solution in the Python space... - is this not the case?

It could be an elegant, hacky solution :)

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

#87
post #79

The Tokio async stack for Rust ( https://tokio.rs ). They did a really nice job of building thin layers up the stack from byte buffers (bytes), to async-friendly logging (tracing), basic IO (mio), async runtime (tokio), generic request/response services (tower), HTTP (hyper), and a web framework (axum). Each of the layers are useful independent of the other layers above, and every one is has a thoughtfully designed,…

I believe I read that Tokio was a "hacky" way to add async to Rust - similar to the solution in the Python space... - is this not the case?

I think this argument refers more to Rust not having built-in support for async from the language’s v1.0 rather than the design of the Tokio stack. That has definitely led to unfortunate incompatibilities between libraries built for the different runtimes. However, the Rust language team took a super methodical approach to async support and the way that more async-related traits are slowly being standardized (first Futures and hopefully Stream, AsyncRead / AsyncWrite at some point in the not too distant future) seems like a long-term-great way of building into the language the abstractions everyone can get behind while leaving room for experimentation. I’m sure others would have different takes but I’m a fan.

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

#88
post #79

The Tokio async stack for Rust ( https://tokio.rs ). They did a really nice job of building thin layers up the stack from byte buffers (bytes), to async-friendly logging (tracing), basic IO (mio), async runtime (tokio), generic request/response services (tower), HTTP (hyper), and a web framework (axum). Each of the layers are useful independent of the other layers above, and every one is has a thoughtfully designed,…

I believe I read that Tokio was a "hacky" way to add async to Rust - similar to the solution in the Python space... - is this not the case?

It's not standard library, which makes some believe it is of lesser quality (not fit for stl?). Tokio works splendidly and I don't think it's a common belief that it's hacky. That being said, language-wide, async is a bit less focused upon (not in stl, trait fns cannot be async, etc) but otherwise the integration is very good.

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

#89
post #41

After 50 years it doesn't seem like it, but C has managed to survive this long because it's a solid all-round player from the bare metal to web servers. It's simple enough that you could probably implement a fairly capable C compiler in assembler.

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 from the CPU's perspective.

- The pointer syntax sucks.

- Casting does weird stuff sometimes.

- Bool - how hard is it to get true and false right?

- Everything being an operator leads to the confusion between assignment and equality which is inelegant. It was cute in the 70's when you had limited disk space but sucks now.

- `void *` being used for function pointers is not elegant.

- Threads and any notion of multiple CPUs doesn't work well without a lot of libraries or help.

- An elegant language would have not cared about the underlying CPU memory model, but C had to be enhanced for 16-bit x86 segmented memory models.

- If you are using intrinsics or whatever to generate assembly opcodes (e.g. vector instructions) because your language doesn't support them, you are surpassing the limitation of your language in an inelegant way.

- An elegant language makes things like the IOCCC impossible.

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

#90
post #77

SpiderMonkey, while it isn’t the best performing, its code is pretty straightforward. It also seems to be embeddable on its own, unlike V8.

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

Post reply on HN