Live data from Hacker News

Handmade: A Community for Self-Rolled Performant Software (2016)

handmade.network

81–90 of 96 posts

Re: Handmade: A Community for Self-Rolled Performant Software (2016)

#81

What people don't realize is that modern, high-level languages and abstractions give you much more than just speed of development. If you use a garbage collector, you don't have to do manual memory management, which is amazing for security. You also don't need to worry about buffer overflows and weird pointer exploits. If you use web tech, you get a lot of important stuff, like sandboxing, handling of esoteric keyboa…

Doesn’t the ImGUI UI library have pretty good accessibility now without sacrificing on memory consumption and performance?

JavaScript is difficult to program in a safe way, so I’m going to assume the Messenger app is written in something safer too.

Re: Handmade: A Community for Self-Rolled Performant Software (2016)

#82

TL,Dr : knowledgeable, skilled programmers writing semi-confidential software in C for mostly a single OS, by themselves, with total control of the feature set and release schedule, can produce pretty fast binaries. Which is great ! I just don't know how to transfer that to building software as a team with multiple skillsets, unknown feature set (because market feet is still searched for) aggressive schedule, (We don…

Speed is a very real selling point for software though. If your competitor takes 6 months to get to market, and then is locked-in to a bloated, sluggish, badly-architected codebase made from 50 abstraction layers, you have plenty of time to come in later and steal their userbase, when your project is done and can do things in 1/10th the time.

Re: Handmade: A Community for Self-Rolled Performant Software (2016)

#83

I've been writing C code for more than 30 years, C++ for 27. I've written code at every level of "the stack", from kernels of several nix-related operating systems to application GUIs. I've worked on "plumbing", on libraries, and on applications. And here's the thing: I understand, at a very very deep level, precisely why my application is slow to start up. I understand it at every level from the semiconductor gates…

Let’s call 1 second the threshold for a bare system with an SSD and 4 core CPU at 2Ghz. That gives you 8 billion cycles to start up, trading off with file access, so maybe only 4 billion of those have access to all the data you need in memory (modern ssd loads what, 400 MB/s?).

So all the startup code and initial assets are larger than 200 megabytes and take more than 2 billion cycles to prep? Computers are fast, software is slow. Sure, things aren’t trivial to always fit in that package, but it’s disingenuous to say you need to take many seconds to start up.

Look at a giant piece of software that was built for more limited times: Visual Studio. It used to start up in milliseconds back in 2000. Now it takes 30 seconds. Did it really improve things so much to justify that in the intervening years? I’d go with no.

You know what else has an amazing set of features and capabilities including internationalization and accessibility and all those other complicated things? Web browsers. And there’s not a browser on the market that doesn’t start up in more than a couple of seconds, including loading a full webpage and rendering it from the internet.

Re: Handmade: A Community for Self-Rolled Performant Software (2016)

#84
post #13

Why is that we praise hand-crafted objects in the real world while at the same time deriding such hand-crafted code as a quaint curiosity that can only make sense as a hobby of the hopelessly romantic? Do we compare your local carpenter with IKEA, or that delicious, nutritive and healthly meal you cooked with McDonald's, in terms of pure (developer) performance? Do we obsess over how a handmade jewelrer can't scale o…

We don't universally praise hand-crafted objects in the real world. We only praise it in situations where the resulting object is significantly aesthetically or functionally unique. In all other cases hand crafting is absolutely considered a quaint curiosity. A good way of thinking of this:

* Mass produced bread * Small local bakery * Making your own bread at home with store bought flour * Making your own bread with wheat you grew in your backyard and hand shaped stone tools <- quaint curiosity

Re: Handmade: A Community for Self-Rolled Performant Software (2016)

#85
post #83

I've been writing C code for more than 30 years, C++ for 27. I've written code at every level of "the stack", from kernels of several nix-related operating systems to application GUIs. I've worked on "plumbing", on libraries, and on applications. And here's the thing: I understand, at a very very deep level, precisely why my application is slow to start up. I understand it at every level from the semiconductor gates…

Let’s call 1 second the threshold for a bare system with an SSD and 4 core CPU at 2Ghz. That gives you 8 billion cycles to start up, trading off with file access, so maybe only 4 billion of those have access to all the data you need in memory (modern ssd loads what, 400 MB/s?). So all the startup code and initial assets are larger than 200 megabytes and take more than 2 billion cycles to prep? Computers are fast, sof…

Well, maybe I'm being too harsh on myself. Timing Ardour on my machine (Ryzen 2950X with 64GB of RAM), it has something on-screen is less than 1 second. But actually loading a "significant" session is more like 6 seconds. There's approximately 300MB of data in the session in total, but most of that is audio data that isn't being read at startup.

I've seen DAWs start up massively faster than this, though. And also slower. Essentially I have some intuition that "correct" software design would appear to the user as a more incremental startup: the window would appear as rapidly as xterm does, and would slowly fill with everything that makes up the actual program. I personally find this hard to design for. Could be me, or the GUI toolkit I use or maybe it just is pretty hard.

As for browsers, "a couple of seconds" has some slop. When I restart Firefox here, with typically 100-200 tabs and the main/primary/#1 tab being gmail (unfair! i hear you cry), I'd say it was more like 5-10 seconds until it is usable.

Re: Handmade: A Community for Self-Rolled Performant Software (2016)

#86

TL,Dr : knowledgeable, skilled programmers writing semi-confidential software in C for mostly a single OS, by themselves, with total control of the feature set and release schedule, can produce pretty fast binaries. Which is great ! I just don't know how to transfer that to building software as a team with multiple skillsets, unknown feature set (because market feet is still searched for) aggressive schedule, (We don…

Speed is a very real selling point for software though. If your competitor takes 6 months to get to market, and then is locked-in to a bloated, sluggish, badly-architected codebase made from 50 abstraction layers, you have plenty of time to come in later and steal their userbase, when your project is done and can do things in 1/10th the time.

My prior in such a situation would be to assume that "stealing userbase" is very hard. It depends on the kind of application, of course, but once you have paying / committed user, I'd assume the friction to change (and natural risk/change aversion )would be in favor of the incumbent.

That being said, arriving afterwards with a message of "we're like X,but faster" could be a good marketing catch, but probably not for any kind of enterprise app. (The only good marketing catch in this case would be "we're like X, but cheaper.")

No idea how such an hypothesis could be tested. We would need records of user switching from an app to another.

Re: Handmade: A Community for Self-Rolled Performant Software (2016)

#87

Earlier quoted context omitted.

> If you go the handcrafted, lightweight and fast route, you're sacrificing a lot of features, possibly without even being aware of what you lose until it's too late. The notion that an engineer signing on to make high-performance software in 2020 doesn't know what they're "sacrificing" is a little unreasonable. Conversely, it seems unlikely most people developing the kind of software you're advocating for understand…

You make good points. And I do think miki123211 is conflating memory safety with GC. But the concerns about Handmade software lacking important user-facing things like accessibility and internationalization are real. TO take one particularly ironic example, lots of tools in the field of audio production roll their own GUIs, and invariably, these UIs are completely inaccessible to screen reader users. I say this is ir…

What do you think about the following trade-off? (a) make a software accessible to 99.9% of the population with base-level quality-of-life (b) only be accessible to 98% but increase quality-of-life by 5% for the rest

(I am not trying to make a point, just curious.)

Re: Handmade: A Community for Self-Rolled Performant Software (2016)

#88

Earlier quoted context omitted.

Not everything needs to prioritize accessibility. This page is mostly tools for video games which typically have no accessibility. I think you may be bringing a pet concern into an area that isn't relevant.

What we, or at least I, want to ensure is that developers outside of the gaming context don't get too fired up by this manifesto, develop non-game-related tools in that spirit, and thereby block someone from doing their job because the tool is inaccessible.

[deleted]

Re: Handmade: A Community for Self-Rolled Performant Software (2016)

#89
post #75

Earlier quoted context omitted.

Nobody writing in C has "bug free" as their highest priority. Reducing dependencies is good though.

SQLite is written in C.

And SQLite has a page on why [1] that explicitly lists the benefits of C for the project. Not on that list: bug reduction. Moreover, it has an almost superhuman level of effort put into testing and verification.

SQLite is just one piece of a broader argument that C's inherent risks aren't completely unmanageable. All it takes is an incredible amount of diligence, tooling, expertise, and money.

[1] https://www.sqlite.org/whyc.html

Re: Handmade: A Community for Self-Rolled Performant Software (2016)

#90

Earlier quoted context omitted.

Yeah, ok, but the problem is the same: even though accessibility APIs might be provided (this time by Electron, not the OS), applications don't make use of them.

Sure, we still have to fight that uphill battle. But it's way easier for a web application to implement ARIA than for a Win32 application with a custom control to implement UI Automation. Maybe that problem is unique to Windows.

[deleted]
Post reply on HN