Live data from Hacker News

Niklaus Wirth has died

twitter.com

351–360 of 412 posts

Re: Niklaus Wirth has died

#351
post #89
post #31

Besides all his innumerable accomplishments he was also a hero to Joe Armstrong and a big influence on his brand of simplicity. Joe would often quote Wirth as saying that yes, overlapping windows might be better than tiled ones, but not better enough to justify their cost in implementation complexity. RIP. He is also a hero for me for his 80th birthday symposium at ETH where he showed off his new port of Oberon to a…

> not _better enough_ Wirth was such a legend on this particular aspect. His stance on compiler optimizations is another example: only add optimization passes if they improve the compiler's self-compilation time. Oberon also, (and also deliberately) only supported cooperative multitasking.

That's fascinating. I'd imagine there are actually two equilibria/stable states possible under this rule: a small codebase with only the most effective optimization passes, or a large codebase that incorporates pretty much any optimization pass.

A marginally useful optimization pass would not pull its weight when added to the first code base, but could in the second code base because it would optimize the run time spent on all the other marginal optimizations.

Though the compiler would start out closer to the small equilibrium in its initial version, and there might not be a way to incrementally move towards the large equilibrium from there under Wirth's rule.

Re: Niklaus Wirth has died

#352
post #312

Earlier quoted context omitted.

The k solution is ,/+|(8#2)\textb k doesn't have a right shift operator, but you don't need that, you can use the base encoding operator instead Personally I think this is clearer than both the array-ish python and the list comp. https://ngn.codeberg.page/k/#eJwrSa0oSbJSCs9ILFEA4gyFkoxUBbe...

I'm sitting here with the K reference manual, and I still can't decode this. I'm wildly guessing that your approach somehow ends doing something closer to this: textb.bytes.flat_map{_1.digits(2)} Which I must admit it took me embarrassingly long to think of.

If you go to the link and press 'help' you'll see some docs for ngn/k

The relevant line is

I\ encode 24 60 60\3723 -> 1 2 3 2\13 -> 1 1 0 1

So (8#2)\x encodes x in binary, with 8 positions. And because k is an array language, you don't need to do any mapping, it's automatic.

,/+|x is concat(transpose(reverse(x))) (,/ literally being 'reduce with concat')

Re: Niklaus Wirth has died

#353
post #320
post #312

Earlier quoted context omitted.

I'm sitting here with the K reference manual, and I still can't decode this. I'm wildly guessing that your approach somehow ends doing something closer to this: textb.bytes.flat_map{_1.digits(2)} Which I must admit it took me embarrassingly long to think of.

i can't decode it either but i think you're right. note that this probably gives the bits in big-endian order rather than little-endian order like my original, but for my purposes in that notebook either one would be fine as long as i'm consistent encoding and decoding

It would do if it the bits weren't reversed, which is done with |

Re: Niklaus Wirth has died

#354

Earlier quoted context omitted.

Exactly. The way I think about it, the "async" keyword transforms function code so that local variables are no longer bound to the stack, making it possible to pause function execution (using "await") and resume it at an arbitrary time. Performing that transformation manually is a fair amount of work and it's prone to errors, but that's what we did when we wrote cooperatively multitasked code.

> when we wrote cooperatively multitasked code That's my point, we still do that. And based on your phrasing we're forgetting it :)

Sure, that's a good way to look at it. Another way to look at it: because the process of transforming code for cooperative multitasking is now much cleaner and simpler, it's fine to use new words to describe what to do and how to do it.

Re: Niklaus Wirth has died

#355

Earlier quoted context omitted.

I was considering making a startup out of my simple C++ STM[0], but the fact that, as you point out, the transactional paradigm is viral and can't be added incrementally to existing lock-based programs was enough to dissuade me. [0] https://senderista.github.io/atomik-website/

Sound’s nifty. Did this take advantage of those Intel (maybe others?) STM opcodes? For a while I was stoked on CL-STMX which did (as well as implementing non-native version to the same interface)

No, not at all. I'm pretty familiar with the STM literature by this point, but I basically just took the DB I'd already developed and slapped an STM API on top. Given that it can do 4.8M update TPS on a single thread, it's plenty fast enough already (although scalability isn't quite there yet; I have plenty of ideas on how to fix that but no time to implement them).

Since I've given up on monetizing this project, I may as well just link to its current state (which is very rough, the STM API described in the website is only partly implemented, and there's lots of cruft from its previous life that I haven't ripped out yet). Note that this is a fork of the previous (now MIT-licensed) Gaia programming platform (https://gaia-platform.github.io/gaia-platform-docs.io/index....).

https://github.com/senderista/nextdb/tree/main/production/db...

The version of this code previously released under the Gaia programming platform is here: https://github.com/gaia-platform/GaiaPlatform/blob/main/prod.... (Note that this predates my removal of IPC from the transaction critical path, so it's about 100x slower.) A design doc from the very beginning of my work on the project that explains the client-server protocol is here (but completely outdated; IPC is no longer used for anything but session open and failure detection): https://github.com/gaia-platform/GaiaPlatform/blob/main/prod....

Re: Niklaus Wirth has died

#356

Earlier quoted context omitted.

> when we wrote cooperatively multitasked code That's my point, we still do that. And based on your phrasing we're forgetting it :)

Sure, that's a good way to look at it. Another way to look at it: because the process of transforming code for cooperative multitasking is now much cleaner and simpler, it's fine to use new words to describe what to do and how to do it.

cooperative multitasking, as i use the term, keeps you from having to transform your code. it maintains a separate stack per task, just like preemptive multitasking. so async/await isn't cooperative multitasking, though it can achieve similar goals

possibly you are using the terms in subtly different ways so it appears that we disagree when we do not

Re: Niklaus Wirth has died

#357

Earlier quoted context omitted.

Sound’s nifty. Did this take advantage of those Intel (maybe others?) STM opcodes? For a while I was stoked on CL-STMX which did (as well as implementing non-native version to the same interface)

No, not at all. I'm pretty familiar with the STM literature by this point, but I basically just took the DB I'd already developed and slapped an STM API on top. Given that it can do 4.8M update TPS on a single thread, it's plenty fast enough already (although scalability isn't quite there yet; I have plenty of ideas on how to fix that but no time to implement them). Since I've given up on monetizing this project, I m…

this is pretty exciting! successfully git cloned!

Re: Niklaus Wirth has died

#358

Earlier quoted context omitted.

Lords of the Rising Sun was written in Modula2 on the Amiga https://www.google.com/search?q=lords+of+the+rising+sun My understanding (please correct me) is that Turbo Pascal on PC was actually Modula2 ?

The recent discussion here about Turbo Pascal commenters said it was written in assembly. Seems to be supported by https://en.wikipedia.org/wiki/Turbo_Pascal

I'm not suggesting Turbo Pascal was written in Modula2, I'm saying it implemented Modula2, not Pascal. Modula2 is a superset of Pascal. Pascal never had modules AFAIK but Turbo Pascal did.

https://en.wikipedia.org/wiki/Modula-2

Re: Niklaus Wirth has died

#359
post #265

Earlier quoted context omitted.

Sort of and sort of not. The key thing about 2023-era asynchronous versus 1995-era cooperative multitasking is code readability and conciseness. Under the hood, I'm expressing the same thing, but Windows 3.1 code was not fun to write. Python / JavaScript, once you wrap your head around it, is. The new semantics are very readable, and rapidly improving too. The old ones were impossible to make readable. You could argu…

Coroutines are better than both. Particularly in reasoning about code.

which kind of coroutines do you mean and how are they better

Re: Niklaus Wirth has died

#360
post #320

Earlier quoted context omitted.

i can't decode it either but i think you're right. note that this probably gives the bits in big-endian order rather than little-endian order like my original, but for my purposes in that notebook either one would be fine as long as i'm consistent encoding and decoding

It would do if it the bits weren't reversed, which is done with |

thank you for the correction! and the explanation
Post reply on HN