💾 Archived View for arcanesciences.com › gemlog › 22-06-05 captured on 2024-05-12 at 15:16:45. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-06-11)
-=-=-=-=-=-=-
Rather than doing the kernel work I was planning on this weekend, I spent a few quality hours doing a clone of Wordle in Pascal on Multics. It was both
a) surprisingly fun
and
b) a massive pain in the butt.
I learned some valuable things in the process, however. First, I learned that ISO Pascal actually has no primitives for reading of arbitrary files. That strikes me, a self-described Pascal fangirl, as really painful. Thankfully, Multics provides Pascal extensions for runtime access of files, so all was well in the end. I also learned that Multics, while a very clear ancestor of VOS, is less documented, less functional, and less friendly than VOS could dream of being. That being said, by the standards of a late 60s OS - the compare here would be very early TSO or CMS and almost nothing else - it absolutely smells like roses. Its error messages are generally good, it has a real hierarchical FS with stream and record files, and it overall does not suck to use - warts and all. I can see why early UNIX felt like a downgrade. I was vaguely annoyed to find that the Pascal compiler breaks in unintuitive ways with over 1000 locals - something I learned when I tried specifying the valid-words list as a Pascal include file to avoid having to read the documentation on Multics Pascal's file I/O functionality.
Other than the file management issue, there were a couple of surprises I encountered. One is that ReadLn on this Pascal compiler actually can't handle strings - which seems like a huge omission. The fix was painless, but it was still unexpected.
Anyway, the source is below, as is the words list it consumes. Remember to use the -interactive flag when compiling. Shoot me an email at kira@arcanesciences.com if you give it a try~!
Here's a sample session:
r 19:45 0.061 0 wordmul Enter a guess: ?weigh w <e> i g h Enter a guess: ?steam s t <e><a><m> Enter a guess: ?marry <m><a> r r y Enter a guess: ?lymph <l> y <m><p> h Enter a guess: ?amend [a][m]<e> n d Enter a guess: ?ample [a][m][p][l][e] Word successfully guessed! Have a nice day~!
To quit before the word is guessed, enter "iquit" as the guess. [] denotes a complete match, <> denotes a partial match. The one major difference from original Wordle is that right now Wordmul uses the allowed-solutions list for both solutions and guesses, whereas the original has a larger list for allowed guesses. It would be trivial to use an expanded guesses list, but transferring large files onto Multics isn't very much fun.