Login
You're viewing the code4lib.social public feed.
  • DJ Seedy!TwoThousandStu@fwoof.space
    May 27, 2025, 7:40 AM

    Scenario: a web development class is charged with writing a basic account registration page that will commit the user's details to a MySQL database.

    Mark, a student: Hey, Mr. V, my page is complete.
    Mr. V: *Views the page* You used hCAPTCHA! Detention!
    Mark: But it's for security and privacy!
    Mr. V: You want privacy? Stay behind after school for 2 hours. You shall sit in this room, all by yourself, and write me a 6502 Assembly program that displays Shakespeare's Julius Caesar in its entirety, under my close supervision.
    Mark: But Mr. V! I don't know 65...
    Mr. V: No ifs, no buts! You shall stay with me for 2 hours, every day after school, until this program is complete and runs flawlessly! I have a great book on C64 programming you can read. See me at 3:00 PM sharp!
    Mark: *Sighs loudly, lowers his head and cries*
    Mr. V (to the rest of the class): Don't wanna meet the same fate as young Mark here? Then do not, I repeat, do not, use hCAPTCHA in your pages! Use a solution that actually works without giving the illusion of privacy and accessibility while forcing blind users to disable cookie blocking in their browser and give out their email address for a tiny little file that's supposed to help them bypass the test but is only valid for a few days and doesn't even work half the time.

    💬 1🔄 1⭐ 0

Replies

  • May 27, 2025, 1:17 PM

    @TwoThousandStu LOL you would mention 6502 assembly language. I've been dabblling in 6502 assembly for a few years now since that's the processor the Apple II line of computers uses. And yet, I doubt I could write such a program given my current knowledge. My half-asleep brain at first thought, "Yeah, just store the text of the play in memory, then have a loop load each byte into the accumulator and JSR to $FDED which is the Apple's Cout routine to print a character to the screen." But then I got to thinking, "No that won't work, you have to deal with word wrap, waiting for a keypress after every screen so the user can actually read the text, and I bet the play's too big to fit into 48K of RAM so we have to either use DOS to load files from disk or have a custom formatted disk and load the text directly from disk."

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • May 27, 2025, 9:08 PM

    @TwoThousandStu Okay, I just downloaded Shakespeare's Julius Caesar as text, and my analysis of it is that given the size, I could get it onto an Apple II DOS 3.3 floppy disk alongside probably a machine language routine to display it, and the disk could be bootable. This would probably be a tight squeeze but could most likely be done. Using data compression would add to the size and complexity of the machine language routine but would almost certainly cut down on the size of the text. However, I couldn't boot fresh from this disk myself as there wouldn't be room for Textalker, the Echo speech synthesizer driver software. I can't believe I've even gone this far with this. Also @matt should be amused.

    💬 1🔄 0⭐ 0
  • May 27, 2025, 9:11 PM

    @jaybird110127 @TwoThousandStu I haven't done any 6502 assembly programming in over 30 years. Really, the most I've done in this decade is boot an Apple II emulator, play with some programs, and write a few lines of BASIC.

    💬 1🔄 0⭐ 0
  • May 27, 2025, 9:13 PM

    @matt @TwoThousandStu Amazingly, I've dabbled a bit in 6502 assembly some even this year. I wrote a routine to print the contents of the main 48K of RAM on an Apple II, stripping out certain characters such as those used for Echo commands, etc.

    💬 1🔄 0⭐ 0
  • DJ Seedy!TwoThousandStu@fwoof.space
    May 27, 2025, 9:17 PM

    @jaybird110127 @matt I'd love to be able to get something 6502 running in MAME myself, but I believe it requires screwing around with MAME's inaccessible UI.

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 2🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • May 27, 2025, 9:27 PM

    @jaybird110127 @TwoThousandStu OK, I think we definitely want to use compression. On the assumption that even gzip might be too advanced, I tried creating a ShrinkIt archive (with CiderPress), and that came out as 63,639 bytes. Now, we probably wouldn't want to use the actual ShrinkIt format, but assuming a comparable decompression algorithm comes out to a few kilobytes (or less) of machine code, that would leave plenty of room for DOS 3.3, Textalker, our display program, and the compressed text

    💬 1🔄 0⭐ 0
  • May 27, 2025, 9:30 PM

    @matt @TwoThousandStu And even if not, if we allow ourselves the luxury of running this on an IIe with extended 80 column card, we can almost certainly store the compressed text in the extended memory and pull portions into main memory as needed.

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0