Live data from Hacker News

How might software development have unfolded if CPU speeds were 20x slower?

news.ycombinator.com

71–80 of 161 posts

Re: How might software development have unfolded if CPU speeds were 20x slower?

#71

Earlier quoted context omitted.

> Honestly I’m really tempted to try to throw together a 90s style fantasy desktop environment and widget library and make some apps for it. There’s something about that era of computing that feels great. SerenityOS might be exactly what you're looking for. Join the community and make some apps, it's great (both the community and the OS/dev experience)!

Is there any way to run something like "serenity's WM and file manager, but on my favorite linux distro?" Or is it all more tightly coupled than that?

It's a Unix like OS with great separation of concerns. There probably is a way - their browser runs on Linux - but I don't think anyone has done it yet. Could be a fun project to look into!

Re: How might software development have unfolded if CPU speeds were 20x slower?

#72
post #19
post #13

I'm not sure I understand the premise, because CPU speeds were 20x slower. Just go back a decade or two. They weren't some halcyon days of bug-free software back then, quite the opposite.

Software wasn't bug-free, but it was responsive.

That's why I use vim!

Re: How might software development have unfolded if CPU speeds were 20x slower?

#73

I feel like every time CPU speeds double, someone comes up with a Web UI framework that has twice as much indirection. With 20x slower compute, we might not have UIs that fire off an event and maybe trigger an asynchronous network request every time you type a character in a box, for example. Windows 95 could do a decently responsive desktop UI on an 80386. Coding was a lot less elegant in one way - C code that retur…

It’s an evolving economics problem. Very few (I mean super extremely few) people really know how the web UI works without a framework and there is no incentive to know this because the more skilled a person becomes in that regard the less employable they become.

As a 15 year former JavaScript developer I can see that things are changing in this regard with hiring slowing down, but there remains close to no incentive to be good at any of this. Even if you are good at this and defy all extreme expectations by finding a job that values bleeding edge performance over hiring you won’t be paid any more for the rarity of your talent/experience so why bother?

Re: How might software development have unfolded if CPU speeds were 20x slower?

#74
post #68
post #36

Earlier quoted context omitted.

I saw a talk about tigerbeetle the other day - which is a small, fast database for handling financial transactions that apparenty runs orders of magnitude faster than Postgres. The database binary has no dependencies and compiles to 500kb. Its authors were joking they could distribute it on floppy disks if they wanted. It’s written in Zig, not C. But that style of programming is still available to us if we want it. E…

if [ "$os" = "Darwin" ]; then arch="universal" os="macos" elif [ "$os" = "Linux" ]; then os="linux" else echo "Unsupported OS." exit 1 fi This is nothing to emulate.

Why not? Does everything really need to be built in a cross platform way? I feel like that’s how we got into this mess.

Re: How might software development have unfolded if CPU speeds were 20x slower?

#75
Problem is one of mentality, imho.

See eg. the countless HN posts "hey look! I've used X to do Y" showing off some cool concept.

The proper thing would be to take it as that: a concept. Play with it, mod it, test varieties.

Like it? Then take the essential functionality, and implement in resource-efficient manner using appropriate programming language(s). And take a looong, hard look at "is this necessary?" before forcing it onto everyone's PCs/mobile devices.

But what happens in practice? Proof-of-concept gets modded, extended, integrated as-is into other projects, resource frugality be damned. GHz cpus & gobs of RAM crunch trough it anyway, right? And before you know it, Y built on top of X is a staple building brick that 1001 other projects sit on top of. Rinse & repeat.

A factor 20 is 'nothing'. And certainly not the issue here. Just look what was already possible (and done!) when 300 MHz cpus were state-of-the-art.

Wirth's law very much applies.

Re: How might software development have unfolded if CPU speeds were 20x slower?

#76
post #62

Earlier quoted context omitted.

I feel that way about the old Interface Builder for macos, back in the Xcode 3.x days. VB6 was pretty good too.

Yeah, the interface builders back then are also unsurpassed to this day. Much as I have my issues with VB as a language, the way you could build a GUI with a GUI was amazing. Better still, it worked back on school computers that of course didn't have any "programming" tools, but did come with MS office and the full VB "experience" installed for some reason.

Visual Studio's wpf editor and Avalonia are beyond vb6 interface builders!

Re: How might software development have unfolded if CPU speeds were 20x slower?

#77
post #5

> If human cognition were say, 20x faster relative to the speed of light What would that even mean, being 20x faster than the speed of light? What does it imply?

'Relative to' rather than 'faster than', as in the speed of light being 20x slower or human perception and reflexes being 20x faster, or some mix of the two. If people were thinking way faster then the lag would be unbearable, and there would be no way around it.

[deleted]

Re: How might software development have unfolded if CPU speeds were 20x slower?

#79
post #19
post #13

I'm not sure I understand the premise, because CPU speeds were 20x slower. Just go back a decade or two. They weren't some halcyon days of bug-free software back then, quite the opposite.

Software wasn't bug-free, but it was responsive.

It may seem responsive if you run old software on modern hardware.

It was always slow on contemporary hardware. On affordable PCs Win 3.1 was so slow you could see it redrawing windows and menus. Win 95 was so resource hungry, people wrote songs about it (https://www.youtube.com/watch?v=DOwQKWiRJAA). XP seemed fast only at the end of its very long life, due to Longhorn project failing and delaying its famously shitty successor.

It wasn't just Windows. Classic MacOS for most of its life could not drag windows with their contents in real time. Mac OS X was a slideshow before 10.4, and Macs kept frequently beachballing until they got SSDs.

Re: How might software development have unfolded if CPU speeds were 20x slower?

#80

Earlier quoted context omitted.

Do you happen to have any pointers or recommendations regarding C++ for desktop applications? Especially towards state-management and user-interaction? I am primarily doing game development and HPC; I am decently familiar with C++, but desktop UI has been a pain point for me so far. Most GUI tools I write in C++ are using ImGui, or they are written in C#.

Desktop UI is painful. It doesn't help that Microsoft is seems to have quite a few competing UI frameworks and technologies these days. 1. What is your goal? Do you need to run on Windows and Linux? QT isn't bad, although I personally think the UI looks a little weird. It is definitely highly opinionated and parts of it are quite strange IMHO. There's probably lots of jobs writing with QT, which might be a nice side…

The primary goal is building tools that other (typically less tech-savvy) people can use to create various types of content (often video game related) and to semi-automate repetitive tasks. An example here would be our texture selection / marking tool [1]. As a more advanced example, think of an editor found in most modern game engines, like Flax Engine [2].

Windows is the primary target for these tools, but I'd really like them to be also available on Linux to lessen our Windows dependency. I've used Qt in the past, before they introduced Qt Quick. I also heard about complicated licensing changes when they moved to Qt6, which made a lot of KDE devs worry. And stuff like not being able to download Qt without an account; or the framework coming with everything and the kitchen think nowadays, where I am only interested in desktop UI; no networking, no JavaScript-like scripting language, etc.

I don't want to build a complete UI system from the ground up, but there are certain points where I'd like to be able to customize things, like adding new widgets and having some way to render 2D things without needing a graphics API surface -- think HTML canvas. I feel like ImGui does a pretty good job here, giving you drawing primitives.

For state management I am mostly concerned with the life-time, ownership, and connections between objects. Where other languages, like C#, don't really have to worry about this due to garbage collection, in C++ you typically want things to be more strictly organized. I'd prefer a UI framework to facility object life-time management in a streamlined manner. Like, if it opts to use shared_ptr for everything, that's fine, but it also needs to prevent me from accidentally building cycles and provide a way to dump the dependence graph so I can see directly why a certain object is retained (and by whom).

To clarify the difference between C# and C++ here, think about how the implementation of an observer pattern is vastly more complicated in C++ to be safe as object life-time is not managed automatically for you. Copy & move semantics only adds to this in terms of complexity.

State management and user interaction are closely related here, as almost all user interaction results in state modification. Looking at HTML/JS frameworks, some leverage a 2-way data binding approach, where others bind data only 1-way and use events for the other way. In immediate mode GUIs I am updating the underlying state directly -- practically having the view and model tightly coupled. Here I'd like for a framework to be explicit about what is happening, without being too cumbersome to extend a UI with new functionality. E.g. I don't like signals that can be used across the whole code-base, where suddenly a function executes and you have no idea what originally triggered it. On the other hand, having to handle and forward every basic event from one component to its parent isn't an option either. If that makes any sense.

[1] https://github.com/ph3at/image_tool [2] https://flaxengine.com/features/editor/

Post reply on HN