▲ 5 r/Forth

Case sensitivity

I haven't used a case sensitive Forth, but I think about the ramifications. My thoughts are:

  1. visually, IF stands out more than if

  2. Rect.area seems like a variable name while Rect.Area seems like a function call

  3. Rect seems like a structure name while rect seems like a variable name

  4. Everything with the CAPS LOCK key on?

  5. Can make it opt in like icase on/icase off

  6. Syntax highlighting could key on case

reddit.com
u/mykesx — 3 days ago
▲ 24 r/Forth

Why Forth? What is it?

In order to help get people interested in Forth and how it works, I would like to ask you what you define as Forth, how you got into it, and why Forth instead of some other language?

Ideally we share links to our projects and to others that are interesting. Also to sites, sources, and documents about Forth.

I am encouraging links to your projects so people can see how you are using Forth.

reddit.com
u/mykesx — 4 days ago
▲ 32 r/Forth

We have a new moderator

Me!

I am not into a power trip... My focus will be to share information with you that I see as moderator and to work for your interests more than my own. For example, I can pin posts that you all recommend (like this one initially), edit the wiki?, set rules you all agree on, etc.

I don't want to ban anyone. I don't want to remove anything but spam. I won't do anything official about AI or vibe coding, unless someone posts about the vibe coded app in a spam manner. If you report a post, I will definitely look into it.

I am still going through the additional UI elements to figure out how to do things. I want to recruit as many people as possible to also moderate. My philosophy is that we generally know each other fairly well, and there's no lack of trust on my part.

In the spirit of sharing information and being open about what I do...

There is a moderator queue which has a list of threads and posts that are recommended for analysis. It marks at least 10 going back a month or two as spam and rules violations by a single person. It marked one from many months ago by r/TABEMAN that was removed by reddit algorithms that I would have approved/override the algorithm. I deleted only the most recent thread marked as spam. Otherwise, the remaining posts and comments marked as spam are years old.

NOTE that I enabled the ability to post images in comments, not just the opening post. It seems like a better user experience. Let's see how that goes!

I will also post analytics about the sub, so you can judge how much reach your posts can potentially have.

reddit.com
u/mykesx — 4 days ago

Sharing analytics

I just took over as mod for r/forth which wasn't being moderated for a few months.

Is it against the rules to share analytics information, like weekly visitors and activity? I mean to share with a post in r/forth, not anywhere else.

reddit.com
u/mykesx — 4 days ago
▲ 15 r/Forth

Where are the moderators?

This sub is being swamped with spam and the moderators are nowhere to be found. I don’t recognize the two moderators’ user names because they don’t post here at all that I have seen. I checked the moderators’ post histories and they haven’t been active anywhere on Reddit for months.

I’m ready to leave the sub. I want to evangelize for Forth and it’s not worthwhile when people see 5 of the last 10 posts are spam, literally spam. The signal to noise ratio is becoming more noise than signal. Ignoring the spammer won’t change the signal to noise problem. The spammer violates a number of community and Reddit rules, including spam, disruptive use of AI, self promotion, karma farming…

I truly feel for the guys posting about 8th releases and zepto releases. These are quality projects by smart programmers. Lost in the noise…

My project is Inspiration, if you have followed the progress posts.

Is there a way to get the moderators replaced? Is it worthwhile to start a r/forthlang sub and ditch this one?

Like I said, I am ready to leave the sub for good.

Update

https://www.reddit.com/r/redditrequest/s/HYafxlSY4z

Please upvote the post at the above link.

reddit.com
u/mykesx — 6 days ago

Amos2 progress

What you see here is initialization boot messages. IdleTask is spawned and it spawns FSTask.

FSTask prints the two directory listings from a FAT32 formatted volume.

AMOS2 is currently a microkernel design with a single address space.

No AI assist of any kind used. It's all my work, unless indicated in comments - I am using someone else's sprintf implementation for now.

REPO LINK: https://codeberg.org/mschwartz/amos2

PROJECT BOARD LINK: https://codeberg.org/mschwartz/amos2/projects/62870

NOTES:

**Threading implementation:**

* MMU is not being used. Currently the identity mapping set up by limine is used.

* Tasks(threads) are kept in a running tasks doubly linked list. The list is sorted by priority. So remove the head and add back sorted effects round robin task switching at the same priority. Lower level priority tasks won't run until all higher priority tasks exit or are blocking.

* SpinLock is used around accessing the threads lists.

* Tasks have their own stack. Task state is pushed on this stack in ISR handlers.

* Task switch is as simple as changing the RSP register to the next Task's stack.

NOT IMPLEMENTED YET:

* blocking Tasks list

* Device tasks (to implement blocking I/O)

* Kill/exit Tasks

u/mykesx — 6 days ago

Amos2 update

I originally posted about Amos2 as a sort of seed for this sub. An all man-made (no AI) work in progress.

I intended this to be a rather small repo with just enough code to demonstrate how to create a C++ kernel using limine to boot. Once I got a dumb kernel to boot and set the framebuffer to a color, the logical next steps were to set up GDT, IDT, PS/2, Keyboard, timer, etc. All these functions require a bit of code, so the repo is growing.

I updated the README with a bit more documentation, and added comments to the top of the Makefile with much better build and run instructions.

What you see in the screenshot is text rendered by my code using a PSF font. A FAT32 volume is mounted from the disk image and the root directory and the BOOT directory listings are printed. If I had hit a key, the contents of README.md are dumped to the screen. The read bits of FAT32 are working...

I built this on my MacBook Pro - qemu is emulating the X64 CPU, and it's quite fast. I haven't tried to build on a Linux host.

I spent some time researching how to set up dockcross dockerized cross compiler to build amos2. If all OS Dev projects used a docker cross compiler, nobody would need to compile gcc to make a cross toolchain, and anyone can git clone the repo and build the project without any dependencies aside from docker.

The repo:

https://codeberg.org/mschwartz/amos2

There is no such thing as human slop. Trial and error is how humans learn and improve.

u/mykesx — 11 days ago

Amos2 - a C++ kernel, boots from limine

Amos2 is hardly from my first OSDev work. I started it with the intent of providing a sort of bare bones repo for using limine and C++.

I started with the limine bare bones in the osdev wiki, and gutted the main() to just call kmain() which is written in C++. The code now barely resembles that bare bones code.

The trick to using C++ is to collect the global constructors via the linker .ld script and to call those at startup. Also, global operator new and delete and associates need to be implemented.

Writing in C++ is not like using desktop C++. I use C++ classes, but no copy constructors or anything that does allocation behind the scenes. It's object based programming, not OOP. The code I write is C like, but it uses Objects. I also take advantage of things like how C++ inlines class member functions defined in headers. In some cases, I create static singleton classes for things like IDT and GDT.

The problem with global constructors is you cannot control the order they are called - so you can't rely on a global IDT class constructor to be called after the GDT one.

The bare bones idea kind of went out the window when I started working with the hardware.

What's done is boot, C++ initialization, GDT, IDT, PIC... I made a base Device class and Timer, keyboard, ATA, and console inherit from it and work. I am working on FAT32 filesystem, which I have done before in another project.

The repo is at https://codeberg.org/mschwartz/amos2

I didn't use AI to generate any code or to explain anything. I don't see the point - I would rather beat my head against the wall until I figure out what I might be stuck on. The object of these projects is to learn, not to finish and run Doom in a few days.

u/mykesx — 16 days ago
▲ 58 r/osdevel+1 crossposts

The last straw

The moderator of r/osdev has lost it. He has a bot that replies to a post by HIS users calling out AI slop that is overwhelming the sub with "human slop.". Someone posted about the bot and I posted I was leaving and r/osdvel link. I got 24 upvotes in about 15 minutes along with others posting about how horrendous the sub has become. Tim Schwartz's response was to close the thread. What a loser.

Anyhow, I really did leave the sub, and I will be posting my non AI slop work here.

reddit.com
u/27CF — 15 days ago
▲ 52 r/Assembly_language+2 crossposts

6502 assembler/debugger for Inspiration Forth

I wrote (no LLMs) a 6502 assembler, disassembler, and debugger in pure Forth. The assembler is dasm compatible with some additional aliases.

The debugger lets you set breakpoints, single step, display memory, etc. It has a teletype mode and a visual mode.

The assembler generates 64K raw binaries and a separate .sym file for symbols. The tools all read or write these binaries and .sym files. The assembler and debugger support expressions that can include symbols. Like

= start + $20

Reading from $01 calls KEY -> A register, writing to $01 calls A register -> EMIT.

I took a week off, so I estimate this took me maybe 50 man hours.

There is documentation for the 6502 tools as well:

https://gitlab.com/mschwartz/inspiration/-/blob/main/manual/65c02.md?ref_type=heads

The main repo:

https://gitlab.com/mschwartz/inspiration

u/mykesx — 1 month ago
▲ 48 r/sdl+1 crossposts

Inspiration Forth Update

https://gitlab.com/mschwartz/inspiration

I made some YouTube videos so you can see Inspiration in action.

https://youtube.com/playlist?list=PLRYxtMZb7Qy2wuArGURPCkXkxwK7tnT48&si=ZgRRLVrfLLnhLcj4

It's been about 6 weeks since my last update, and there is a lot of new code and programs implemented.

I am working on a music program and it's coming along nicely. The logic to align the notes on the staff wasn't easy!

After reading a thread about how to implement cards in r/cplusplus, I got inspired to implement a Blackjack game, with casino rules. You can split hands, double bet, 5 card charlies, buy insurance if dealer shows an Ace, etc. The game implements a shoe which is made of 4 decks.

Here's the trick with cards. A card is a random number between 0 and 51. The suit is card mod 13 and the rank is card / 13. I use a 52 byte array to keep track of what cards in a deck have been dealt. Shoe logic draws a card randomly from one of the 4 decks.

The cards, decks, hands, shoe, etc., are general purpose so I can later make a Klondike solitaire game.

I also finished the Evade2 game. It is a first person space shooter with music and sound effects. It is a game I made for Modus Create several years ago, so it was a port. It only took a few days. The music and art and logic in C++ was already done, so I just translated from C++ to Forth in the editor.

I got sidetracked again from the Music program. This time guys on the Forth discord channel were talking about 6502. Turns out I made games for the 2600, C64, and other 6502 based systems. I also made the 6502 Artist Workstation for Electronic Arts in the mid 1980s, which included an assembler and debugger.

In about 20 man hours, I made a dasm (written by my friend Matt Dillon!) 6502 assembler workalike, a 6502 disassembler, and a 6502 debugger/emulator. You can see these in the screen shots.

I never use claude or codex or any other LLM to generate any code. All of Inspiration originated with me and was coded by me. I did use a random number generator I found in a Usenet chain by the author of GForth. The repo was started in October 2025 and has hundreds of commits and merges. Proper PRs! You can view the issue boards at the URL to see how I track TODO and done work items.

The artwork (cards, icons, window decorations, etc.) are images I found on the Internet and are royalty free and free to use. I am not an artist, or I would have made the images myself.

Inspiration is a multithreaded (pthreads) Forth implementation that has a graphical desktop, windows, icons, and so on. I was inspired to make a Forth where you can type in the terminal at the Ok prompt and have graphics rendered. All threads share the one dictionary. All programs have access to all those words.

The threads allow multiple "applications" to be running at the same time, as you would with any desktop environment. Every pixel in these images are rendered by Inspiration.

A trick I found is that I can use C++ try/catch around EXECUTE and anything that throws a C++ exception is caught. I tested on a dozen or so operating systems including FreeBSD, MacOS, Linux distros, on X64, ARM, and even Raspberry Pi. What I found is that in a signal handler (e.g. SEGFAULT), I can throw an exception and it is caught by the try/catch around EXECUTE. So at the OK prompt or in any word, I can do something incredibly stupid like:

OK> 100 0 !
OK> 100 EXECUTE

And I catch the SEGFAULT or SIGBUS errors and print an error message and ABORT. Inspiration should not crash as I installed signal handlers for all the signals.

The rendering engine is based on SDL2. SDL2 gets me fonts with antialiased text, bitmaps for my code to manipulate images at the pixel level, and GPU acceleration where I can take advantage of it.

I envision a Forth with native graphics capabilities. I didn't see the point in making another Forth that runs in the terminal window. There are so many good ones already. What makes Inspiration different is you can do this:

Ok> 10 10 100 100 $ ffffff draw-line \ no set up, white line in your console

You can see the graphics capabilities in the screenshots.

Why am I making this? I want a project I can work on for years to come. I am not close to running out of programs to implement and enhance. The music program alone is one that I may end up working on and enhancing for years.

My Forth coding style relies heavily on structures and local variables. Here is a sample of the logic for the deck of cards.

STRUCT| _Deck
WORD| Deck.number // deck number (in shoe)
WORD| Deck.remaining
52 BYTES| Deck.dealt
|STRUCT

: Deck.Shuffle { deck -- , shuffle the deck }
52 0 do
0 deck s& Deck.dealt i + c!
loop
52 deck s! Deck.remaining
;

u/mykesx — 1 month ago

NUCi7BEH installs, but black screen at boot

The very latest ISO. The NUC is on the older side but still a quite capable miniPC.

The USB boot worked perfectly fine. The only non default install choice I made was to install Gnome.

Install from SSD was only a black screen after boot splash. I added nomodeset to the kernel command line and it showed the CachyOS logo (Plymouth?) And then black screen.

Network not up, couldn't ping the machine. Unable to switch to any virtual console.

I have CachyOS running on multiple machines in my lab, including an old MacBook Pro 11,1.

I ended up installing Debian, which worked without a hitch.

reddit.com
u/mykesx — 2 months ago
▲ 0 r/rush

Share of the take

I wonder what Anika's deal is with Rush. Does she get 1/3 (or 1/4 now) like how it was split before Neil died. The split is what the guys have said allowed them to stay together, unlike other bands where credit and share of the take split the group.

They are potentially paying Peart's estate as well.

Did they give the two new players a paycheck while they practiced for the tour? If so, Rush is taking the risk and should get more of the take.

It matters if they are going to make a new album. Anika is an accomplished writer on her own! Mixing that style with new Rush music seems like what it should be. If so, she might deserve writing credit, maybe a larger stake in the business.

Whatever the deal, it seems to be agreed to for the tour.

reddit.com
u/mykesx — 2 months ago
▲ 1 r/lupus

Trends in Multiple Chronic Conditions Among US Adults, By Life Stage, Behavioral Risk Factor Surveillance System, 2013–2023

Lupus didn’t qualify for this study (it’s never lupus), though it likely fits under the arthritis condition.

cdc.gov
u/mykesx — 3 months ago
▲ 21 r/Forth

Inspiration Forth, my view of AI

I was recently accused of using AI to make some of inspiration Forth, which isn’t true. The reason I was accused is that I didn’t completely edit the default README file created by gitlab when I made the repo. The README described what makes for a good README and had headers/sections pre made with instructions on what kind of things to add there. Both github and gitlab have had this sort of thing for years - I have maybe 50 or even 100 repos I made over the years. The README is a template, created by humans. They also have optional templates for issues to force people to add things like steps to reproduce and so on. I didn’t choose to use these.

I cannot stand the use of AI to make code, period. When I was working on the Console logic for Inspiration, it took several feature branches to move it along. The first being to just render individual characters on the screen, then colorized text, then cursor addressing, then (partial) ANSI escape sequence support, then ability to scroll back and view all the text printed to the console. These feature branches weren’t consecutive efforts. It took me a lot of thought to figure out the scroll back logic, and more than one aborted feature branch. So I worked on other things in the meanwhile.

The only time I used AI was a horrifying experience. I asked copilot to make a console with ANSI and scrollback support. It made it in seconds. When I looked at it, I saw someone else’s variable names. Logic that would take me days to get into before even trying to assess if it was even working code. I stopped looking at it after a few seconds. I felt like that code was lifted from someone else, without attribution. None of that code or any of its ideas has anything to do with Inspiration.

The Phred editor is something I worked on in my previous Forth implementations, and once in C++. Made from scratch, but patterned after vim. The Evade2 game is one I made 7 years ago for the company I worked for at the time. Originally in C++, I ported it in Forth to Inspiration.

Inspiration is a different animal as Forths go. It is graphics first, not console first. The concept of how C++ functions can be subroutine threaded is unique. The pthread ability is my own idea and creation. Every code word I made are either mine or from the 2012 Forth Standard.

I have no use for AI. The beauty of a desktop Forth is that my dictionary has thousands of words I already made and debugged to make new things from. And rapidly. I probably get more done in 2 days than I would with AI. It helps that I have been writing code since the early 1970s. I’ll let the features/issue board and over 800 commits to Inspiration speak for themselves.

Beyond this, I think AI slop is garbage and spam. It’s turning works of art into someone else’s trash. GitHub is becoming a landfill. Why GitHub? Because that’s where the chat bots tell people to upload their one day untested creations.

reddit.com
u/mykesx — 3 months ago
▲ 22 r/Forth

Inspiration on Raspberry Pi 4

It took about 2 hours to install a fresh Alpine Linux on the Pi 4, along with my dotfiles, neovim, g++, make, git, and the SDL2 libraries. It took 1-2 minutes, maybe, to compile. I didn’t time it.

I had to remove one CODEWORD so I could eliminate libbsd and it compiled. Ran first time!

What this video shows is performance on the Pi 4. It “feels” 80-90% as fast as on my MBP.

https://gitlab.com/mschwartz/inspiration

u/mykesx — 3 months ago
▲ 20 r/Forth

Another Game Engine Demo for Inspiration Forth

Inspiration's game engine is general purpose. The last update, I posted a 2D x/y scrolling space game with planets you could fly to.

This update, I'm using the same game engine to show this 2.5D FPS type game.

It's not quite ready to beta test, I just thought the game looks neat.

Repo is at https://gitlab.com/mschwartz/inspiration. Tested on Mac and Linux.

ZERO AI used to make any of part of Inspiration or its Forth implementation.

To give you an idea of what the Forth source looks like, here's the entirety of the Bullet logic.

require Games/img/bullet.4ti

private{

2f 2f + 2f + CONSTANT BULLET-ROTATE

: Bullet.Run { me | spr -- , Move Bullet }
    me s@ Process.sprite -> spr
    spr s@ Sprite.rz BULLET-ROTATE + spr s! Sprite.rz
    spr s@ Sprite.z CameraZ - fixed>int 512 > if 
        spr Sprite.Free
        nullptr me s! Process.sprite
        me Process.Suicide
    then
    ;

}private

: Bullet.New { | p spr -- , Fire bullet }
    0 PTYPE-USER Process.New -> p
    ['] Bullet.Run p Process.SetState
    1 p s! Process.timer

    STYPE-PBULLET bullet_img   VectorSprite.New -> spr
    STYPE-ENEMY spr s! Sprite.cmask

    bullet_img 1+ c@ spr s! Sprite.height
    bullet_img c@ spr s! Sprite.width
    bullet_img c@ spr s! Sprite.depth

    spr p s! Process.Sprite
    $ ffff0000 spr s! Sprite.color

    p
    ;

privatize

And this is the player controls logic that handles firing the bullet:

: Player.FireBullet { pf me | p spr -- , fire bullet }
    Bullet.New -> p
    p s@ Process.sprite -> spr


    // alternate bullets fired from left then right
    me s@ Process.user-data 1 and if
        pf s@ Playfield.worldX BULLETDX + spr s! Sprite.x
    else
        pf s@ Playfield.worldX BULLETDX - spr s! Sprite.x
    then
    me s@ Process.user-data 1+ me s! Process.user-data


    CameraY spr s! Sprite.y
    CameraZ 1f + spr s! Sprite.z


    pf s@ Playfield.worldVZ BULLET-VELOCITY + spr s! Sprite.vz


    p GameEngine.Birth
    ;


: Player.Run { me | ch pf p spr -- , Player logic }
    GameEngine.playfield @ -> pf
    KEY_QUIT    Controls.KeyPressed? if Evade2.Quit then
    ascii q     Controls.KeyPressed? if Evade2.Quit then


    KEY_LEFT Controls.KeyDown? if pf me Player.ControlLeft then
    KEY_RIGHT Controls.KeyDown? if pf me Player.ControlRight then
    KEY_UP Controls.keyDown? if pf me Player.ControlUp then
    KEY_DOWN Controls.KeyDown? if pf me Player.ControlDown then
    BL Controls.KeyPressed? if pf me Player.FireBullet then
    KEY_ESC Controls.KeyPressed? if GameOver then


    Player.RenderCrosshairs
    ;
u/mykesx — 3 months ago

Installer question

The installer automatically can install lamine and snapshot facility, which is a manual thing on Arch. I love it, but wonder if the installer couldn't do much more?

Some combination of dmidecode, lspci, dmesg, etc., should allow things like Nvidia card, laptop brand, and more to be detected and user asked if the current best driver and/or packages to be installed.

Examples,

dmidecode on my 2014 MBP returns MacBook11,1. Based on that, mbpfan and whatever other MacBook utilities could be installed and configured. The BCM WiFi driver also needs to be installed for WiFi to work.

Asus and Dell have similar brand specific fan and other utilities.

Newer Nvidia drivers don't work on older cards, so the old driver should be installed.

For dual display adapters, auto switching software can be installed automatically.

Maybe it's beyond the scope of what CachyOS philosophy is?

I don't think it's that easy to get perfect, and there are a lot of permutations of hardware configurations. But over time, the installer would evolve to cover most things. And anything it would install would require user to approve.

Thoughts?

reddit.com
u/mykesx — 3 months ago
▲ 22 r/Forth

Notepad clone for Inspiration

I made this Notepad.exe (windows-like) app for Inspiration. It's written in Forth, including the Menu system. It's not 100% complete, but close. The only remaining task is to implement selection and cut/copy/paste. The selection logic is in progress, but you can see what it's going to look like.

It does feature undo/redo.

Time spent making this app was about 2 days.

No AI ever used to make any of Inspiration. None ever will.

The License is MIT Non-AI

The repo:

https://gitlab.com/mschwartz/inspiration

u/mykesx — 3 months ago