ZH version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
63% Positive
Analyzed from 771 words in the discussion.
Trending Topics
#basic#more#code#thing#line#touch#print#hello#world#random

Discussion (19 Comments)Read Original on HackerNews
I have memories of ‘poke’ as well. On the Atari 800 you could poke memory to change the keystroke repeat rate and delay before repeat started, so obviously we would turn down the delay to zero and turn up the repeat to max (it was maybe 60 characters per second), so anyone trying to type couldn’t hit the keys quickly enough to avoid repeating. You’d have to power-cycle the machine to fix it, so it was hilarious to 11 year old me.
Similar to his description of ‘poke’, but different mechanism - using debug.com on an IBM PC jr to edit the Ultimate III save files, and give myself maximum money and lives.
Good times!
The first one runs on an ESP32 that I plan to use as a watch. The software works, I just need to finish the 3D printed case.
The second runs on an RP2350 connected to my living room TV via an HDMI cord.
I have so much appreciation for these old machines I grew up with.
I think my second BASIC program was the "guess a number" one -- that seemed really popular in intro basic programming things in the 80s also since it showed keyboard input and conditionals and was, uh, fun-adjacent.
Then:
The moment Yacc clicked for me; that line was profound but a more accurate depiction of the moment was realizing that all you were doing with the parser generator was building a tree, and that's what the side effects of each production were for: returning and plugging in tree nodes.If there was a single line I could come up with for "double the size of the hash table when it fills up", that'd deserve a slot here.
Then, of course (we get to cheat because assembly):
The "delta offset" trick, which I believe came from x86 virus culture but was universal in 90s overflow exploits as a way to get position-independent references to strings and other memory things.For sure:
I should figure out a way to fit a write-select(2) into a line because that's another "oh shit" moment for me.Similarly: when Vern Paxson explained to me that he'd implemented TCP reassembly by simply opening up a file and using "seek" to place incoming segments in the right position. I could probably golf that down to a line! But it would be an annoying line.
I'm partially more in favor of "red" instead of "hotpink" for CSS, but that's just me.
(){ :|:& };:
:(){ :|:& };:
———————
(defmacro twice (form)
(twice (print "Reality"))———————
twice doesn’t execute its argument twice. It rewrites the program itself before execution into:
(progn
This is funny to me, because I associate touch more with updating the timestamp of an existing file, and that script would miserably (destructively) be failing at that.
Exercise to the reader is to turn the above into a javascript bookmarklet toggle, and to add support for shading margins and padding.