💾 Archived View for gemlog.blue › users › sloum › 1595814554.gmi captured on 2022-03-01 at 15:18:20. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2020-09-24)

-=-=-=-=-=-=-

I have been almost completely absent from gemini/gopher of late. I check in on a few pubnixes each day like normal, but that is about it for community endeavours. All of my free time has gone to the interpreter/language I am writing: nimf (nimf is mostly forth; or nimf is more-or-less forth).

I now have branching, loops, variables, string literals, input (that writes to the same temporary string buffer as the string literals), and file inlining. The last I just got working today. It allows you to inline (think import) libs into your current working space. Files inlined should be similar to header files in C and just have functions and vars declared (consts too). The stack is of course working and I have a decent number of builtins as well as small standard lib of things coded directly in nimf (including printing strings from memory). Everything is set up with two stacks (though only one truly exposed to the programmer, the other is used for tracking if/loop status and some other system functions) and an int array for memory. I _am_ taking a few shortcuts within the host language to make things easier on me so I am not fully modelling an actual system architecture... It is also really weird to make an interpreter for a language that handles memory manually in a language that is garbage collected (C probably would have been a better choice here... but I'm just better with Go).

I believe my wife will be glad when I take a break from this project as I have been quite obsessive about it (thus not being on gopher/gemini much). I'd like to get a few things cleaned up (right now you cannot declare a variable from within a subroutine declaration, ie. local variables, and I would like to fix that).

I have been able to write simple programs (`What is your name? <input> Hello {value of input}` sort of stuff, or very math oriented things) and have been having fun. I'd like to come up with a project for this lang. There is no file reading interface within the language itself at present so to be particularly useful I'll have to figure something out for that... but working with strings sucks here (they are int arrays with the first array space being used to store the length of the string that follows). So splitting, comparing, etc. is cumbersome and I will be working on subroutines (in nimf itself if possible - I mostly want to focus on using the primitives I coded in go to create higher level abstractions in nimf itself) to ease that.

At present a good amount of the language is based on forth 'words' and functions in the style of forth. I think I may split from the words used and some of the way forth works to play around with other concepts within the concatenative language space.

Time to put the baby to bed in a few so I will sign off now, but felt like updating really quickly.