Posts by vertigo@hackers.town
 (DIR) Post #AX1Ky0ixD58bfVWiTw by vertigo@hackers.town
       2023-06-24T15:28:40Z
       
       1 likes, 0 repeats
       
       @xerz Looks like Verge hit a little too close to home.  😆​
       
 (DIR) Post #AX4rptYCMU6F7pmtyC by vertigo@hackers.town
       2023-06-26T04:28:58Z
       
       1 likes, 1 repeats
       
       I'm happy to report that Shoehorn V2.0 is now pushed to my SourceHut repo.Shoehorn is a #Forth subset bootstrap compiler for use in bringing up new hardware completely from scratch.I'm currently using it to write my own Forth interpreter/compiler for my homebrew 65816-based computer design, proving that it's not just a toy.  (If you are lost figuring out where to start, look in mkdisk0 and sysf.f)This version introduces support for CREATE, DO/?DO, LOOP/+LOOP, and a new way of supporting primitives that allows them to be linked into the dictionary hash chain.
       
 (DIR) Post #AXBJW3yTrLI9KOAkYS by vertigo@hackers.town
       2023-06-29T01:28:10Z
       
       1 likes, 0 repeats
       
       I just realized, now that I have all the primitives working in my System Forth environment, the next logical step is the colon compiler itself.Gaining the ability to create new words interactively will essentially be a phase change event for the interpreter.After the colon compiler, comes block storage.  After blocks are done, I'll rev the version from 0.0 to 0.1.
       
 (DIR) Post #AXBpMmbMHNLHNDyYyW by vertigo@hackers.town
       2023-06-29T15:02:29Z
       
       1 likes, 0 repeats
       
       The idea of abstractions as lies which you must maintain using ever more clever lies is an interesting analogy I'd never used before, but it makes perfect sense.It really also ties in with John Osterhout's views on "deep modules."  A perfect example of an interface that is deep (in Osterhout's sense of the term) is the Unix file I/O API.  Another, albeit to a lesser extent, would be #Forth's block storage wordset.But, comparing the two is enlightening.  Forth's blocks provides only the barest essentials for accessing mass storage devices in a device independent manner.  You assign a range of 1KiB blocks to a specific device, and now you have full access to that storage.  It works like demand paging, except with 1KiB pages and "demand" is driven by software explicitly, not implicitly.  The interface is really deep: BLOCK, BUFFER, UPDATE, FLUSH, and EMPTY-BUFFERS.  That's it (and 99.999999% of the time you will only ever use BLOCK and UPDATE).But, in exchange for this simplicity, you lose the notion of a filesystem.  You're managing space on a volume explicitly.  I've found that, for most applications, you can get away with this no problem.  It is actually pretty rare that one needs anything more than this.The moment you introduce character stream support, though, this interface suddenly becomes inadequate.  Now you need a completely new abstraction, where Unix's I/O calls fit more naturally.  But, that is unarguably a more complicated stack of software to maintain, with many more interface points to maintain (open, read, write, close, seek, mkdir, unlink, mknod, etc.).  But, it's a useful abstraction; that's why it (in some form or another and with varying degrees of completeness) has become so universal across different platforms.  Including, ironically, in Forth itself.But like all lies, you can only support them with more clever lies.  Hence, why we have libraries that abstract other libraries, sometimes several layers deep.  (Looking at you, SDL!)  And while each claims to simplify some aspect of programming, I find usually it's just the opposite; they actually (sometimes greatly) complect the software as a whole.This is one of those "I don't have the answer" type of posts.  I'm not sure how one could arrive at the ideal "deep modules interface" for, say, something like SDL.  I'm not even sure it's possible.  But, maybe, just maybe, I can inspire someone somewhere to think about giving it a try for their software architecture.  If you insist on making a lie, at least make it a good one.
       
 (DIR) Post #AXF4KwvezbOBbww3fM by vertigo@hackers.town
       2023-07-01T02:56:16Z
       
       1 likes, 0 repeats
       
       System #Forth executes its first natively compiled word.SYSTEM FORTH V0.0PARSE-NAME NOOP hdr,  OKHEX 60 C,  OKDECIMAL HERE .4107  OK4106 PARSE-NAME NOOP linknt  OKNOOP  OK ( <--- didn't crash!! )
       
 (DIR) Post #AXFwvFboPi2nUmPVWC by vertigo@hackers.town
       2023-07-01T15:44:55Z
       
       0 likes, 0 repeats
       
       @twylo I imagine the book on installing VMS has about three orders of magnitude more endings.
       
 (DIR) Post #AXFzFBPdvOnKBHLnVo by vertigo@hackers.town
       2023-07-01T17:08:56Z
       
       0 likes, 0 repeats
       
       @tek Remember when you could actually name your volumes?Gosh, those sure were the days.
       
 (DIR) Post #AXNC9tx04zMY5PU6MK by vertigo@hackers.town
       2023-07-05T01:33:07Z
       
       1 likes, 0 repeats
       
       Despite the difficulties Vice's built-in debugger presented for me, I can now reliably print a string to the screen via KERNAL calls from 65816-native mode with KERNAL mapped out.I think I'm going to call it for today though.  Getting this far took a lot out of me, and IM/C64 will need to be refactored a bit to clean the current state of the code up.I don't yet support interrupts though, so while you're running in native-mode, all IRQs are disabled, and NMIs will cause a trap into the IM debugger (well, it will once the debugger is fully ported over).
       
 (DIR) Post #AXNCMNoEtKFgANL2A4 by vertigo@hackers.town
       2023-07-05T01:41:44Z
       
       0 likes, 0 repeats
       
       Maybe, based on my experience with xscpu64's built-in debugger, I should make IM as close to a world-class 65816 machine language monitor and development tool as I can make it.
       
 (DIR) Post #AXNCMOsstXYtV4WG2a by vertigo@hackers.town
       2023-07-05T01:46:51Z
       
       1 likes, 0 repeats
       
       If anyone wants to see the patch that made all this possible, here it is.
       
 (DIR) Post #AXRG62tbetXsPgUdea by vertigo@hackers.town
       2023-07-07T03:03:26Z
       
       0 likes, 0 repeats
       
       @twylo I'd say what counts as indie web is the content not as presentation. So I would say yes.
       
 (DIR) Post #AXc90cfIFIVIyeZE7k by vertigo@hackers.town
       2023-07-12T01:45:22Z
       
       0 likes, 0 repeats
       
       @xerz :blobthinkingglare:​ Taps the sign.Get some rest, before rest gets you!
       
 (DIR) Post #AXdpGfroV0dMm3ih6G by vertigo@hackers.town
       2023-07-13T02:14:03Z
       
       1 likes, 0 repeats
       
       @SmudgeTheInsultCat Truth.
       
 (DIR) Post #AXf1TCJL5mVzTqID8C by vertigo@hackers.town
       2023-07-13T18:06:17Z
       
       0 likes, 0 repeats
       
       Really getting sick and tired of the "you can't share code if it's statically linked" mantra.It's a lie that has been spoken so many times that it has taken on the status of truth.But there exists one very significant falsification to that mantra -- AmigaOS.This is my yearly reminder to people, it seems, to study exec.library and how OpenLibrary() works.  Everything's there.
       
 (DIR) Post #AXh4X6Q5cqTQXvvKjY by vertigo@hackers.town
       2023-07-13T18:33:30Z
       
       0 likes, 0 repeats
       
       @enkiv2 It's the same principle as how COM interfaces and C++ v-tables work.A library exposes a jump-table to other programs.  Clients of a library invoke OpenLibrary() to get a pointer to what's called a "library base" pointer.  Hence why in AmigaOS programs, you find variables like IntuitionBase, GraphicsBase, or DosBase, etc.  Once you have this base pointer, you can invoke library functions by relative displacement from this pointer.  In assembly language, this would look like this:move.l param1,a0move.l param2,d0move.l myLibraryBase,a6jsr _LVOmyProcedure(a6)LVO stands for Library Vector Offset.One way or another, a library constructs this jump table relative to this base pointer at start-up.  This can be done at run-time (with some difficulty), but 99.9999% of libraries just embed this jump table as a static code chunk which is relocated at load-time.  You almost never have to think about it.The only reason it's not 100% of the time is because expansion.library has some runtime constraints which aren't satisfied until the whole kernel is up and running (since it technically runs before the kernel is fully up).In this way, programs are statically linked.  The libraries are statically linked.  But they cooperate at run-time via jump-tables that are established (almost always) at module load time.
       
 (DIR) Post #AXh4X7xnsz2HKmhlvE by vertigo@hackers.town
       2023-07-13T18:42:06Z
       
       0 likes, 0 repeats
       
       @enkiv2 The distinction, really, is that the ABI is 100% independent of any particular programming language.  All languages are equally disadvantaged when invoking a library's services, so there's no favoritism.  This is what allows ARexx and AmigaBASIC to call upon library functions, relying on a more or less generic "FFI"-like facility (before we gave FFI a name) unique to that language.
       
 (DIR) Post #AXh6yxftvsLjROjP0a by vertigo@hackers.town
       2023-07-14T19:12:53Z
       
       0 likes, 0 repeats
       
       @WomanCorn @enkiv2 AmigaOS had no explicit standard.  Most libraries used NUL-terminated strings, but dos.library used BCPL style strings, which resemble Pascal-formatted strings.
       
 (DIR) Post #AXjdmS7h6JO8uhIIVM by vertigo@hackers.town
       2023-07-16T00:14:08Z
       
       2 likes, 0 repeats
       
       System #Forth update:I've written a model of BLOCK, BUFFER, FLUSH, UPDATE, SAVE-BUFFERS, and EMPTY-BUFFERS.  The model code runs in GForth.It is far from optimal.  But right now, I care more about it working than being the best possible.My block words seem to properly manage a cache of four 1KB blocks of memory, and should be easy to port over to System Forth.I'm hoping by the end of next week, I'll have persistent storage in System Forth on the Kestrel-1/ForthBox emulator.  If I'm lucky, I'll have it integrated by end of the day tomorrow, but I'm less confident about that schedule.
       
 (DIR) Post #AXjtBm4nYCV9LjTKAy by vertigo@hackers.town
       2023-07-16T02:38:06Z
       
       1 likes, 0 repeats
       
       Time to re-install my VIBE block editor so I can test my block I/O driver words.
       
 (DIR) Post #AXjtBmy6Eajm7FLUNE by vertigo@hackers.town
       2023-07-16T03:13:42Z
       
       1 likes, 0 repeats
       
       And they work!!I have persistent storage of data from within System Forth (albeit restricted only to disk 0).