Live data from Hacker News

Niklaus Wirth was right and that is a problem

bowero.nl

101–110 of 198 posts

Re: Niklaus Wirth was right and that is a problem

#101

Earlier quoted context omitted.

Networking isn't the bottleneck. As John Carmack quipped, "I can send an IP packet to Europe faster than I can send a pixel to the screen. How f’d up is that?" Usually if there is latency caused by networking in an application it's usually unneeded roundtrips caused by inefficient programmers or inefficient layers in the software stack. It's insane how much overhead there is.

I am completely baffled by this quip. At speed of light in a vacuum, from New York to London is 19ms. That's the physical limit of what a network could ever hope to accomplish, but in reality in fiber it's apparently about 28ms. At 60fps we need to present a new set of pixels to the screen every 16ms. So in the time that a packet goes in one direction to Europe we could have presented almost two full frames of pixels…

A new set of pixels every 16ms is about throughput and we do have that. But the latency today is worse than in the VGA era.

If you have a completely black screen and want to draw a tiny white circle in the middle of it, it will take your processor or GPU less than a microsecond to change the bytes. Less than 16 milliseconds later (an average of 8ms, actually) the updated bytes will be flowing through the HDMI wires and into the monitor. There they will be stored into a local buffer. If there is a mismatch between the image format and the LCD panel then it will probably be copied to a second buffer. Some DMA hardware will then send the bytes to the drivers for the LCD and the light going through those pixels will change. All that can easily add up to 50ms or more.

Re: Niklaus Wirth was right and that is a problem

#102
post #81

> About 25 years ago, an interactive text editor could be designed with as little as 8,000 bytes of storage. That would be in 1970, but my guess is that "ed" would be a hard sell today. There is plenty of bloat to go around these days and I think we could do a lot more to address that. But we've all got too much skin in the web game to own up to the embarrassing fact that a chat program that's basically IRC with pict…

Maybe ed would be a difficult sell today, but vi came out in 1976, the essence of which is still in use.

What we'd recognize as vi was first called "ex" - and since it was more featureful than ed, it was also a larger program [0]

The essence of BSD is also still in use, but I'm willing to bet that once this essence - much like that of ex - has been expanded into something we'd consider a capable system today, it's also going to require a lot more resources.

[0] https://minnie.tuhs.org/cgi-bin/utree.pl?file=2BSD/src/ex/RE...

Re: Niklaus Wirth was right and that is a problem

#103

Earlier quoted context omitted.

Networking isn't the bottleneck. As John Carmack quipped, "I can send an IP packet to Europe faster than I can send a pixel to the screen. How f’d up is that?" Usually if there is latency caused by networking in an application it's usually unneeded roundtrips caused by inefficient programmers or inefficient layers in the software stack. It's insane how much overhead there is.

I am completely baffled by this quip. At speed of light in a vacuum, from New York to London is 19ms. That's the physical limit of what a network could ever hope to accomplish, but in reality in fiber it's apparently about 28ms. At 60fps we need to present a new set of pixels to the screen every 16ms. So in the time that a packet goes in one direction to Europe we could have presented almost two full frames of pixels…

Here’s his reasoning: https://superuser.com/a/419167

“ The bad performance on the Sony is due to poor software engineering. Some TV features, like motion interpolation, require buffering at least one frame, and may benefit from more. Other features, like floating menus, format conversions, content protection, and so on, could be implemented in a streaming manner, but the easy way out is to just buffer between each subsystem, which can pile up to a half dozen frames in some systems.”

What he’s talking about is (in his opinion) unnecessary buffering that causes a delay in the pixel actually appearing on screen.

He blames the driver and the display’s internal software, so his argument could be made out to support OP, but I think the situation is a bit more complex than Wirth’s law here.

Re: Niklaus Wirth was right and that is a problem

#104

Earlier quoted context omitted.

Networking isn't the bottleneck. As John Carmack quipped, "I can send an IP packet to Europe faster than I can send a pixel to the screen. How f’d up is that?" Usually if there is latency caused by networking in an application it's usually unneeded roundtrips caused by inefficient programmers or inefficient layers in the software stack. It's insane how much overhead there is.

I am completely baffled by this quip. At speed of light in a vacuum, from New York to London is 19ms. That's the physical limit of what a network could ever hope to accomplish, but in reality in fiber it's apparently about 28ms. At 60fps we need to present a new set of pixels to the screen every 16ms. So in the time that a packet goes in one direction to Europe we could have presented almost two full frames of pixels…

You have presented almost 2 full frames of pixels in 28ms, but how many frames out of date were they when they made it to a human's retina?

Re: Niklaus Wirth was right and that is a problem

#105
post #49

Earlier quoted context omitted.

you should include a reference: https://danluu.com/input-lag/

Well, that is an awesome read, thanks!

For a more succinct tldr of the same thing:

https://mobile.twitter.com/id_aa_carmack/status/193480622533...

Re: Niklaus Wirth was right and that is a problem

#106
> 1995 was the year in which programmers stopped thinking about the quality of their programs.

Oh, please. There are some good points in the article but that hyperbole was unnecessary. I was programming in 1995, and nobody stopped thinking about the quality of their software.

Re: Niklaus Wirth was right and that is a problem

#107

> 1995 was the year in which programmers stopped thinking about the quality of their programs. Oh, please. There are some good points in the article but that hyperbole was unnecessary. I was programming in 1995, and nobody stopped thinking about the quality of their software.

Proliferation of hyperboles has gone out of control, hard to read news, and watch YouTube videos without writers/content creators, or even normal people speak in daily life without this very annoying pattern. I think problem is worse among our American cousins, than elsewhere in the English speaking world.

Re: Niklaus Wirth was right and that is a problem

#108
post #63

What gets me is part of the '95 quote about computing in the 70s "About 25 years ago, an interactive text editor could be designed with as little as 8,000 bytes of storage" Such a text editor likely couldn't handle lowercase in English, let alone any other Latin script language, let alone cjkv or bi-di. The bloat in software of 95 and the present day is real, but there is no real effort to make an apples to apples co…

http://www.texteditors.org/cgi-bin/wiki.pl?TinyEditors

A lot of these are less than 8K, none of them can't handle lowercase, and I bet the majority of them will be fine with "high CP437" bytes (so other Latin languages.)

Re: Niklaus Wirth was right and that is a problem

#109

> 1995 was the year in which programmers stopped thinking about the quality of their programs. Oh, please. There are some good points in the article but that hyperbole was unnecessary. I was programming in 1995, and nobody stopped thinking about the quality of their software.

I’ve been programming since 1965, read Dijkstra, Niklaus Wirth. And these days I break software at people’s request. There is in fact much less concern and emphasis on quality these days.

It is also interesting to note that Knuth also does not do libraries

Re: Niklaus Wirth was right and that is a problem

#110
Incentives are often a big part of the problem. In many cases, people are writing software that will run on someone else's hardware. This applies to basically all front-end web development, all mobile apps, and all software licensed to someone else.

That means the programmer (or their employer) doesn't pay for the electricity it uses (or battery it drains), the RAM it allocates, the disk space it wastes, or the hardware upgrades necessary to make it run acceptably.

Why conserve a resource that you're not paying for? Especially if you have to expend your own resources to do it.

I'm not defending crappy software (nor, apparently, offering a solution), but if a programmer's personal sense of honor is the only weapon in this fight, then it's not a great formula for winning the fight.

Post reply on HN