Front-end antics and typographic mischievousness

142 points•dimonomid•4 days ago•43 comments•

43 comments

dahart3 days ago
The BASIC print+goto loop might have been my first ever program too (in the 80s) but one thing for sure for me: it was definitely not “Hello, World”. I and others filled the screen with any number of silly things, random words, jokes and juvenile phrases, whatever, but for some reason, “Hello, World!” was a C thing, and I remember seeing it for the first time in a C class in high school, and then much more often in college.

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!

mcherm3 days ago
The reason that "Hello, World" is a C thing is that C is the source of the tradition around that phrase. In Kernighan and Richie's "The C Programming Language" printing "Hello, World" is the very first exercise.
dgacmu3 days ago
Most definitely the juvenile phrases.

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.

codazoda3 days ago
I have been building BASIC32, a ROM BASIC like the ones I grew up with.

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.

    BASIC32
    
    Ready.
animal5313 days ago
On my Spectrum I came up with: 10 GOTO 20 20 GOTO 10

It would start the Spectrum's "loading screen" border which would then scroll infinitely.

At some point I also opened it up to see what it looked like on the inside, but I managed to damage the keyboard in the process. Thereafter whenever I wanted to play a game (via joystick) I would have to use a piece of wire to manually select the rows/columns of the matching keys to enter the load command.

whartung3 days ago
In high school, my friend and I were demonstrating to Fred the magic powers of our IMSAI 8080 with ye olde:

  10 PRINT "FRED IS A GEEK"
  20 GOTO 10
To wit my friend and I would giggle and taunt.

Undaunted, Fred took a look around, found the power button, and turned the machine off. Yes, that power button next to the "DO NOT TURN OFF" sign.

As the monitor and LEDs faded to black, the giggling stopped and my friend and I stood aghast at Fred's treachery.

Fred left, and we were tasked with restarting the machine, getting to the monitor, keying in the hex code of the cassette loader, and reloading BASIC from cassette.

Got it to work on our second try!

andsoitis3 days ago
Here are 3 lines that capture something profound about Lisp: code can manufacture code that manufactures code:

———————

(defmacro twice (form)

  `(progn ,form ,form))
(twice (print "Reality"))

———————

twice doesn’t execute its argument twice. It rewrites the program itself before execution into:

(progn

    (print "Reality") 

    (print "Reality"))
throw348893 days ago
For debugging CSS, I prefer something along the lines of:

    * {
      outline: 1px solid hotpink !important;
      outline-offset: -1px !important;
    }
As in most cases the above snippet doesn't reflow content.

Exercise to the reader is to turn the above into a javascript bookmarklet toggle, and to add support for shading margins and padding.

chias3 days ago
if you're using firefox, you can generally juts ctrl-click on the page. It'll draw outlines around every child element without reflowing.
probably_wrong3 days ago
I have been collecting small code snippets that would make for good tattoos and I have to say, some of these ones would probably make a good addition to the collection.

I'm partially more in favor of "red" instead of "hotpink" for CSS, but that's just me.

apsurd3 days ago
mine would be something like

    p { color: red; }
as a teenager my mind was blown as I reloaded the page and there it was; text now in red. I did that!
thenthenthen3 days ago
You have this one right?

(){ :|:& };:

mattrighetti3 days ago
Don’t forget the function name at the very beginning!

:(){ :|:& };:

layer83 days ago
> This tiny batch script allowed for a poor man’s `touch` on Windows, which I used extensively from Windows NT to Windows 7. I typed `touch filename.txt` in the Total Commander mini-shell to quickly generate new, empty files.

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.

xp843 days ago
yeah i get the utility for the 'making new file' use case, but aliasing this as touch if you're used to touch for both uses scares me!

Read the full thread on Hacker News →

Related stories