When you write an ugly program, you make Donald Knuth cry!
from SamiDena@programming.dev to programming@programming.dev on 16 Aug 2024 18:38
https://programming.dev/post/18212899

#programming

threaded - newest

mox@lemmy.sdf.org on 16 Aug 2024 19:25 next collapse

Indeed.

Still, I wonder what Knuth would think of pasting screen shots of text into a text forum. :P

SamiDena@programming.dev on 16 Aug 2024 19:52 collapse

I don’t know how these fora work yet lol. I’m an old 31yo man. These fora are getting to complex. Back in my day we had bulletin board systems.

I always wonder why BBS systems were cut off from Lee’s URI vision. dl.acm.org/doi/pdf/10.1145/179606.179671

This is the original ‘web paper’. The authors might have dismissed BBS systems as too ‘toxic’? Not sure. Or maybe they did have an URI identifier, like HTTP’s is http:// and FTP’s is ftp://. Why could BBS not be ‘bbs://’.

I dunno. I did not make the web, I just cringe that Lee got knighted for what is essentially Englebert’s On-Line system re-packaged for the go-go nighties.

Crackhappy@lemmy.world on 16 Aug 2024 21:43 next collapse

“back in my day” - 31 year old… lol

SamiDena@programming.dev on 16 Aug 2024 22:08 collapse

Well I remember most stuff most kids don’t remember. Does your avergage TikTok teenager remember actually having fun with a software that is not a game? I used to love messing around with ‘acquired’ versions of a lot of weird software. Kids these days gotta be super-weird to consider Blender a non-game software they’d like to mess with .Right?

mox@lemmy.sdf.org on 17 Aug 2024 00:22 collapse

If you don’t mind sharing, how old were you when using BBS? I don’t think I’ve heard someone your age bring them up before.

SamiDena@programming.dev on 17 Aug 2024 00:44 next collapse

Oh I’m just a poseur! As it is my understanding, Usenet was for ‘grownup people’ (like Larry Wall, check the interview with him I just posted!) and BBS was for ‘hacker scene kids’. I started using the internet in 2005 when I was 12 (I did use it sparingly before though) and back in 2005 the ‘web-ization of the internet’ was not as pronounced as it is now, but it was strong enough that I had issues understanding where the interned ends, and the web begins! But well, it’s in the name, is it not? :D

trolololol@lemmy.world on 18 Aug 2024 01:00 collapse

I decided it’s a bot 2 messages ago

FizzyOrange@programming.dev on 17 Aug 2024 21:03 collapse

I’m an old 31yo man. These fora are getting to complex. Back in my day we had bulletin board systems.

Lol bullshit. BBSs were completely obsolete by like 1997 when you were 4.

nerdovic@discuss.tchncs.de on 16 Aug 2024 20:06 collapse

Straight Up! I don’t program but do a lot of stuff in Ansible, seeing some really clever use of inventories/lookups/etc. always makes me happy.

SamiDena@programming.dev on 16 Aug 2024 20:35 collapse

Just remember that back when Knuth wrote this, there was no such thing as ‘scripting’. So if you don’t necessarily ‘program’ but ‘script’ a lot, that’s the same. With scripting, the cleverness is not in algorithms you use or stuff like that, it’s as you said, clever use of resources. I have a story to tell:

A few hours ago my brother showed me this guy on Twitter telling people that, he’s asked people to ‘partition an array of numbers and null on null’ (in JS) and he showed his original solution, which was an iterative solution, very non-functional in style, and I kinda don’t like code that is just “too” imperative you know? Then my brother showed me someone’s solution.

const arr = [21, 242, 1135, null, 1341, null, 2424, 11, 22, 444 ];
// solution
arr.join(',').split(',,').map(subarray => subarray.split(','))

Golfing like this is exactly what would make Knuth cry! I wish people understood that golfing is not very readable! But understanding why this happens is what makes you more endearing, to me at least! This happens because of Javascript’s orthogonality, a remnant of Smalltalk-80 being retrofitted into a prototype-based system! Also, this is because ECMA-262 has specified ‘join’ to ignore ‘null’. Because ‘null’ is not a prototype, it’s baked into the grammar! It has no way to respond to ‘join’ so it gets left out! This is because of how Smalltalk-80-based languages are just “always communicating”. “null” is part of grammar, it does not communicate, so it gets left out.

Now, knowing that, this code looks more beautiful right?