News for hackers. Stuff that matters.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by TheDong on Wednesday December 07, 2022 @12:43AM (#33891028)
If working in the modern software industry has taught me anything, it's that developers can figure out how to write slow janky UIs no matter how powerful the processor.

I'd go so far as to say there's an inverse correlation here. My 100Mhz desktop had a more responsive UI than any computer I've used in the last 5 years.

Text editing on that 100Mhz computer felt responsive, typing characters had them appear on the screen instantly, I could copy+paste 100s of lines of text without a problem. Now, I load notion.so on a 4Ghz cpu, and typing is sluggish, scrolling has severe lag, and pasting 100 lines of text sometimes takes several seconds.

All this is me saying that I'm more inclined to blame software than to blame the hardware for UI lag.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by onion2k on Wednesday December 07, 2022 @05:00AM (#33892573)
Text editing on that 100Mhz computer felt responsive...

Of course it did, because you were only editing the text. If you switch off syntax highlighting, linting, autocomplete, type checking, git integration, spell checking, grammar checking, and everything else your editor is doing then you can experience the joy of fast typing again.

A 4GHz CPU is only 40 times faster than a 100MHz CPU (not that clock speed is the important bit here, but whatever), but you're asking it to do probably about 20,000 times more computation every time you press a key. And then you complain that it's too slow!

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by ptero on Wednesday December 07, 2022 @07:28AM (#33893565)
Emacs on my first computer, an i486 with a whopping 33 MHz of compute power had no trouble with syntax highlighting, autocomplete and spell checking.

The problem with slowness is in the design, not inproved functionality. The root cause is that modern software runs a ton of checks for every keystroke, tries to talk to the mothership every second and is designed to advertise and upsell instead of solving actual user problems.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by cogman10 on Wednesday December 07, 2022 @12:11PM (#33897004)
TBF, Emacs/vim today with pretty much every feature turned on also don't feel sluggish.

I think the 2 issues hitting modern text editors are they are FAR too synchronous (they are doing the syntax highlighting, fonts, etc, with every keystroke rather than in the background).

And rendering has gotten WAY too nuts. Seems like all modern text editors are full blown web browsers, usually so they can be easily cross platform.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by TheDong on Wednesday December 07, 2022 @05:17AM (#33892698)
There's not an option to switch various features off in many contexts.

It is a requirement imposed upon me that I write documents in notion, and that text editor doesn't let me import locally written files since it doesn't have any lossless textual representation. I can't avoid the laggy text editor. It's a requirement that I use slack, and no combination of settings for the browser or desktop client seems to stop massive input lag.

Typing into iOS or android's keyboard, in any text box, is an experience with very noticeable lag.

I know that the computer is doing thousands of times more things than my older computer did, but I don't want it to do that stuff and there's no way to turn it off while still participating in modern society (i.e. using a cell phone and working at a company).

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by beezlebroxxxxxx on Wednesday December 07, 2022 @08:13AM (#33893941)
I don't know if you've tried this, and it might very well not be easier per se, but you can separate writing your text from the "typesetting" by composing in a barebones editor and then pasting that text into wherever you need to display the text. I don't know if something as barebones as notepad exists for phones, but the method I've described might make your experience better on a desktop.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by tashbarg on Wednesday December 07, 2022 @08:31AM (#33894109)
A modern 4GHz CPU is not only 40 times faster. It is a few thousand times faster than a 100MHz CPU back from the days. Probably not 20,000, but at least 2,000 times faster seems reasonable.

And responsiveness back then was so good, because your program was very close to hardware with very little in between if not running completely free from OS abstractions.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by jameshart on Wednesday December 07, 2022 @01:46PM (#33898393)
Can you show your working on this? Because a 100MHz CPU can do 100,000,000 things a second, and a 4GHz CPU can do 4,000,000,000 things a second, and if my math's right, that means the 4GHz CPU can do 40 times as many things a second at the 100MHz CPU.

Now, you might argue 'the 4GHz CPU is multicore!', and so sure, maybe we're up to 8 times 40, which is, I'm pretty sure, 320. And maybe you'll say that the cache is bigger, so you'll be able to keep the data pipelines full and get more done on the faster CPU. But how are you getting to 'at least 2,000'?

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by tashbarg on Wednesday December 07, 2022 @04:53PM (#33900827)
Sure. I'll oversimplify a lot, but the feeling of how things work should be correct.

The clock frequency is not a good way of measuring performance. Never was. Even earlier designs as the 8086 did not do one thing (instruction) every cycle. They did far less.

Modern CPUs are extremely complex beasts that can take in a lot of instructions. They take a good look on those instructions, change them in a way that does not alter the result but makes some optimizations possible and then distribute those instruction to a bunch of internal workers that can work on those at the same time. More on this can be found in the wikipedia rabbit hole starting with instruction level parallelism.

One way to measure this is to look at how many of a selected set of instructions per cycle can be done. An 8086 could do 0.066. A 386DX did 0.134, a 486 could do 0.7. A Pentium 100 already could do 1.88, and so on. Modern CPUs get to 10, per core.

But wait, there's more. This comparison gives only a very rough idea of a CPUs capabilities since it focuses on a very specific thing that might have little to do with actual observed performance. Especially since modern CPUs have extremely specialized instructions that can do enormous amount of computations on enormous amounts of data in little time. And there we are in the wonderful world of benchmarks that may or may not reflect reality by measuring execution time of a defined workload.

Passmark does CPU benchmarks and their weakest CPU in the database seems to be a Pentium 4 @ 1.3GHz. Single Core, single thread. It comes in at 77 (passmarks?). An i7-13700 is rated with 34,431. Does that make it 500 times faster than the 1.3GHz P4? Hard to tell, but its a hell of a difference. And from the P4 to a Pentium or even a 486 running at 100Hz ... at least another hell of a difference.

We can also try Dhrystone MIPS, another benchmark. Wikipedia has - strangely enough - numbers for the Pentium and the 486 at 100MHz: 188 MIPS for the Pentium, 70 MIPS for the 486. The most modern (2019!) desktop cpu entry comes in around 750,000 MIPS. A Threadripper from 2020 over 2,300,000 MIPS.

So, how much more can a modern CPU do than an ancient one? A lot. And especially a lot more than you would expect from the faster frequency alone. Even with only one core, it can do several hundred times the workload. And we got a lot of cores.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by seized on Wednesday December 07, 2022 @02:02PM (#33898638)
While it's harder to calculate, that 4Ghz CPU comes with vastly faster RAM, busses, and disk. Not many 100 MHz systems around with NVMe or even SATA...
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by ChuckNorris89 on Wednesday December 07, 2022 @10:19AM (#33895326)
>your program was very close to hardware with very little in between if not running completely free from OS abstractions

This! It also meant that it was very very easy for any program or misbehaving driver to completely crash your system. Not to mention all the security implications of every app having direct hardware access.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by Dylan16807 on Wednesday December 07, 2022 @12:51PM (#33897590)
But when I go look at my text editor being slow, I can see that the amount of CPU time spent dealing with the kernel is less than a tenth of it. So that's not the reason.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by tashbarg on Wednesday December 07, 2022 @05:19PM (#33901149)
That's not how latency or responsiveness works.

Dan Luu did cool experiments with input lag (https://danluu.com/input-lag/).

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by Dylan16807 on Wednesday December 07, 2022 @06:03PM (#33901652)
It's a much better estimate than hand waving about memory isolation.

If we want to talk about how things work directly, my program can get things to the GPU in far less than a millisecond. The safety layers are not the problem.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by Dylan16807 on Wednesday December 07, 2022 @12:47PM (#33897551)
No excuse for any of those things to slow down the actual typing.

And a lot of those computers did do fancy checking, and a modern CPU can do ten times the instructions per clock on top of having 6-8 cores.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by TheBigSalad on Wednesday December 07, 2022 @11:48AM (#33896652)
40 times faster seems fast on paper, but honestly I would love a CPU 4 million times faster.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by goodpoint on Wednesday December 07, 2022 @08:44AM (#33894242)
> you're asking it to do probably about 20,000 times more computation every time you press a key

If hinting, spellchecker and autocompletion takes so much computation you have terrible tooling. This kind of functions existed 25 years ago and they were real-time.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by dmitriid on Wednesday December 07, 2022 @07:16AM (#33893466)
> but you're asking it to do probably about 20,000 times more computation every time you press a key.

[citation needed]

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by Thorrez on Wednesday December 07, 2022 @02:07AM (#33891533)
Here's a table with the input lag and release date of various computers: https://danluu.com/input-lag/

It seems like there might be a slight negative correlation (newer is worse). The data is fairly all over the place though.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by thechao on Wednesday December 07, 2022 @08:50AM (#33894290)
I seem to remember that a good pencil has lag on the order of 1ms (how long it takes the tip to settle out after high speed motion), but I don't remember where this number came from, so it's untrustworthy.

I always view the IBM selectric as "beyond the horizon" in terms of responsiveness: that's 25–30ms.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by TeMPOraL on Wednesday December 07, 2022 @09:18AM (#33894567)
> I seem to remember that a good pencil has lag on the order of 1ms (how long it takes the tip to settle out after high speed motion), but I don't remember where this number came from, so it's untrustworthy.

Not sure what lag there is on actual pencil, but there's this somewhat famous video[0] from Microsoft Research, where they test various values of input lag on a touch screen, and demonstrate that even 10ms is noticeable - but 1ms is about enough for it to feel instant. With 1ms lag, drawing on a tablet seems to feel just like drawing on paper (I personally haven't had an opportunity to test a tablet with 1ms lag, so I can't tell).

--

[0] - https://www.youtube.com/watch?v=vOvQCPLkPt4

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by goodpoint on Wednesday December 07, 2022 @08:41AM (#33894198)
...until you start comparing lag and CPU performance. Then it becomes obvious what kind of bloated software the world is producing.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by TeMPOraL on Wednesday December 07, 2022 @09:22AM (#33894605)
And then you notice that recently there was an article pointing out that "software is IO-bound anyway" is no longer true, and this claim - for the first time since I remember - wasn't laughed out of the room. I await a more detailed study, but it seems quite likely the article was correct: IO is quite fast these days, and software is likely to be CPU-bound, particularly on parsing stuff as it's being read and operated on.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by tormeh on Wednesday December 07, 2022 @11:07AM (#33896000)
Wasn't the limiting factor RAM latency? Anyway, yes, computers parse way too much JSON, SQL, and whatever else. I've recently started working with gRPC, and boy is it nice. The current paradigm where every action requires a text blob to be written, compressed, then sent to a server that decompresses it, parses it, acts on it, then creates a new text blob that is compressed and sent out... It's a bit much. And that's before ypu add load balancers and microservices. gRPC cuts down on the parsing and compressing bits, but it's still quite wasteful.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by tstrimple on Wednesday December 07, 2022 @01:17AM (#33891228)
I'm going on record to suggest that people who have used computers from the 80's and 90's have rose tinted glasses on when remembering their experiences. Nostalgia is a bitch and lies to us all the time. Just loading a fucking program from a spinning disk hard drive adds a significant amount of startup time to programs that we've completely imagined away from the "golden age" of our computer usage. At this point I'm convinced it's just a natural extension of "they don't make it like they used to" which has plagued mankind for basically every generation ever which completely ignores survivor bias. I distinctly remember experiencing *major* performance gains when moving to more memory than my system and apps needed to use and the move to solid state drives. None of the "programmer's don't know how to code today" nonsense even comes close to eclipsing the performance gains from those two changes.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by extropy on Wednesday December 07, 2022 @02:13AM (#33891569)
DOS programs loaded fast, since there was around 1MB of working memory. Granted they did not do much, but where responsive, except when needed to do real compute, then you just waited forever.

Windows 3x/9x with first real multitasking and swap - things got quite sluggish. Early browsers were particularly eager of gulping ram and bringing everything to halt.

Nowdays it feels somewhere in the middle with copious amounts of ram stuff can be fast once up and running, but it seems every app either wants to load from web on every step or tries to index your drive on every keypress.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by TheDong on Wednesday December 07, 2022 @01:58AM (#33891475)
Part of it is rose-tinted glasses, sure, but it's not entirely rose-tinted glasses.

The "Living Computer Museum" in Seattle was (up until covid closed it) an excellent way to experience the past.

I had this same insight and feeling then. The old machines, running their old operating system versions, felt responsive and crisp compared to performing similar tasks on modern machines with modern software equivalents.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by foepys on Wednesday December 07, 2022 @01:26AM (#33891290)
Both can be true at the same time. You can have a very slow program startup time but once it is up, it's very responsive to inputs.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by Karunamon on Wednesday December 07, 2022 @09:37AM (#33894763)
So it's funny you mention that. I own a couple of decidedly retro machines from the 90s, one runs DOS and the other runs Windows 98. These are used both for gaming and for productivity, both are equipped with solid-state drives as of late (I still have the original spinning rust.)

Both of these machines are many times more responsive than any thing put out in the last decade despite being thousands of times less powerful. The applications they run are made to serve my needs as a user 1st. It gets out of my way. The user interface is clearly designed for the mouse and keyboard I am obviously using. It is made to help me accomplish tasks more efficiently rather than stroking some designer's ego or chasing some fad. Most of the software I use was released "done" rather than released half-baked with the hope of future updates. I don't have to worry about having my privacy invaded.

It's not rose tinted glasses when I'm not wearing any and can look behind me and see the color. Modern mass-market technology is "worse is better" writ large.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by A4ET8a8uTh0 on Wednesday December 07, 2022 @09:58AM (#33895021)
Yes and no. I am now running an equivalent of a computer power that was once reserved for some dedicated government agency in early 90s[1]. I accept that some of that power is put to good use, but I do see wasted power in OS [2] and even games [3] on a semi-regular basis.

For the record, "they don't make em' like they used to" is an absolutely valid complaint. Note that now even with SSD, ridiculous memory and cpu, websites still manage to stutter ( but I accept online is its own animal ). Part of me wants to go over Windows releases as an example of resource use across generations ( and how they leaped ).

<<I distinctly remember experiencing major performance gains when moving to more memory than my system and apps needed to use and the move to solid state drives.

But do you still see it or is that performance assumed now ( making lazy design decisions easier )?

[1]https://www.reddit.com/r/Amd/comments/kdr3p6/how_would_amds_... [2]https://www.youtube.com/watch?v=hxM8QmyZXtg [3]https://arstechnica.com/gaming/2021/03/hacker-reduces-gta-on...

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by WalterBright on Wednesday December 07, 2022 @04:58AM (#33892560)
Some things were better, some things worse. For example, I hated the thousand pound CRT monitors and love my thin LED hi res.

I also hated floppies. Squeek, squeek, grind, grind.

The old hard drives were fine, though.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by colordrops on Wednesday December 07, 2022 @01:31AM (#33891321)
But you are forgetting that you used to be able to smell your computer.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by everdrive on Wednesday December 07, 2022 @06:50AM (#33893316)
It's just not monolithic. We've made serious improvements in a number of areas, but there are a few areas where we've clearly stepped backwards. Neither opinion really contradicts the other.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by aaronbrethorst on Wednesday December 07, 2022 @01:42AM (#33891392)
Try a text editor that isn’t built on top of Electron, perhaps.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by jchw on Wednesday December 07, 2022 @01:52AM (#33891451)
That's kind of the point isn't it?

Personally, I would be ecstatic to ditch VSCode for some super fast native code thingy, but the truth is that it's often just a better experience. The ecosystem is big, and the performance is not all bad news (the ripgrep-based search is pretty damn impressive, and beyond that, it feels like VSCode has less issues with performance cliffs in normal use cases that I've encountered than a lot of older editors, including KDE's Kwrite and GNOME's Gedit, but even other Electron editors like Atom, too. It's not perfect, but there are times when I left Kate to VSCode because opening some file made Kate way too unresponsive.)

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by aaronbrethorst on Wednesday December 07, 2022 @02:01AM (#33891496)
I just moved from VSCode to RubyMine for my Rails work because I was finding the Ruby plug-in ecosystem for VSCode to be too flaky. Performance in both have been fine for me, despite being built in JS and Java.

All that said, I really do miss TextMate.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by jchw on Wednesday December 07, 2022 @02:05AM (#33891525)
OK, I will give you one thing: I do love Jetbrains IDEs. That said, I don't use them for everything. They use a lot of RAM for me when loading large projects, and they feel a bit awkward outside of "traditional" project structures that work well with VS Code.

I know Jetbrains is making a text editor, too. It does look very nice, but I have yet to try it.

This all being said, Jetbrains IDEs do still feel less responsive than more native stuff like Kwrite or Notepad++. It can be forgiven of course, but I think it's a valid point to note down, especially given how often people bring up that article comparing latency of desktop computers over time.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by darkwater on Wednesday December 07, 2022 @05:59AM (#33892964)
> All that said, I really do miss TextMate.

It's still there, no? https://macromates.com/

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by aaronbrethorst on Wednesday December 07, 2022 @09:49AM (#33894907)
It is there, but seems to be essentially abandonware. The ‘mate’ command line tool to launch the app fails more than half the time on Apple Silicon, the plugins and bundles that exist are years out of date for Ruby and Rails, and I don’t expect it’ll ever get support for LSP.

So, sure, TextMate still exists. It’s still my default scratchpad for modifying text, and I even use it for some light scripting from time to time, but I don’t actually use it to build and maintain complex software any longer.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by ge96 on Wednesday December 07, 2022 @02:41AM (#33891701)
Looks like some people tried to port it to Tauri/Rust. I'm sold on VSC personally. Got my configs all setup. Runs on a phone (Mobian) ha.

Edit: I'm aware there's the browser one now built into GitHub.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by jameshart on Wednesday December 07, 2022 @02:12PM (#33898776)
100MHz, so to be clear, we're talking about like an early Pentium. 1995ish.

So that 100MHz computer had maybe 8 or 16MB of RAM - it was struggling to run anything other than the text editor you were using - no, you aren't running an MP3 player in the background, winamp has not been released yet; no you are not running your email client in the background, you're on a 28.8K dialup modem and you are not hanging on the line on the offchance that mail arrives - you are dialing up, waiting 30 seconds for the modem to handshake, then watching your emails trickle in at a rate of one every few seconds.

The machine took noticeable time to seek and load or save to the hard disk, so it made up for that by trying to keep everything in RAM all the time, with the downside that if it crashed (and it frequently crashed) you would lose all your work since you last hit save.

So yes, the cursor responded right away when you pressed a key. But other than that, golden days, those were not.

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by midoridensha on Wednesday December 07, 2022 @01:52AM (#33891448)
The microcomputers I used in the 1980s, running on ~1MHz CPUs, were more responsive than everything that came after.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by WalterBright on Wednesday December 07, 2022 @04:55AM (#33892539)
The text editor on my DOS machine would load instantly. It was also only 56K in size.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by laweijfmvo on Wednesday December 07, 2022 @12:46PM (#33897536)
It still would, if you were willing to use a text editor in DOS.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by WalterBright on Wednesday December 07, 2022 @03:01PM (#33899428)
Actually, the same editor recompiled for modern machines also loads instantly!

https://github.com/DigitalMars/me

Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by criddell on Wednesday December 07, 2022 @12:09PM (#33896984)
Edlin was 2K and for a year or two was my main editor.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by WalterBright on Wednesday December 07, 2022 @03:01PM (#33899437)
I wasn't willing to go that far!
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by qikInNdOutReply on Wednesday December 07, 2022 @04:20AM (#33892321)
Its whoever wins, forces his policies on the other department. If controlls team buys the cheapest hardware, the force the dev team to be competent economic wise, else the software team can hire jsunior and get away with it.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by BMc2020 on Wednesday December 07, 2022 @08:35AM (#33894138)
A thousand times this. I die a thousand times a day waiting for software.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by Aperocky on Wednesday December 07, 2022 @01:05AM (#33891163)
I've always used vim for text editing (and programming languages that do not use JVM), never had a problem with responsiveness regardless of computer spec.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by scifibestfi on Wednesday December 07, 2022 @01:24PM (#33898028)
Exactly. Hardware was fast enough in 1969 to put men on the moon. In 2022 we have laggy text editors. That's not a hardware problem.
Re:Driving Amazon’s electric delivery vehicle: Rivian EDV [v... by seized on Wednesday December 07, 2022 @02:08PM (#33898720)
But that 1969 hardware did that one exact thing and nothing but. No networking, no displays beyond some digits, etc. It was a calculator. No one's calculator is running that large text editor, 20 Chrome tabs, Teams/Slack, Spotify... Yeah, nothing should lag these days but it's not really a valid comparison between today and the Apollo computer.