bahmanm
Husband, father, kabab lover, history buff, chess fan and software engineer. Believes creating software must resemble art: intuitive creation and joyful discovery.
Views are my own.
- 108 Posts
- 208 Comments
Besides the fun of stretching your mental muscles to think in a different paradigm, Forth is usually used in the embedded devices domain (like that of the earlier Mars rover I forgot the name of).
This project for me is mostly for the excitement and joy I get out of implementing a Forth (which is usually done in Assembler and C) on the JVM. While I managed to keep the semantics the same the underlying machinery is vastly different from, say, GForth. I find this quite a pleasing exercise.
Last but not least, if you like concatenative but were unable to practice fun on the JVM, bjForth may be what you’re looking for.
Hope this answers your question.
Whoa! This is pretty rad! Thanks for sharing!
That’s definitely an interesting idea. Thanks for sharing.
Though it means that someone down the line must have written a bootstrap programme with C/Assembler to run the host forth.
In case of jbForth, I decided to write the bootstrap too.
That’s impossible unless you’ve got a Forth machine.
Where the OS native API is accessible via C API, you’re bound to write, using C/C++/Rust/etc, a small bootstrap programme to then write your Forth on top of. That’s essentially what bjForth is at the moment: the bootstrap using JVM native API.
Currently I’m working on a set of libraries to augment the 80-something words bjForth bootstrap provides. These libraries will be, as you suggested, written in Forth not Java because they can tap into the power of JVM via the abstraction API that bootstrap primitives provide.
Hope this makes sense.
Haha…good point! That said bjForth is still a fully indirect threaded Forth. It’s just that instead of assembler and C/C++ it calls Java API to do its job.
Thanks. Bookmarked the site. Also noted RE age.
Thanks. I’d go the online route if my kid was a few years older but given the age, I believe in-person lessons are the best for now.
Thanks. Bookmarked.
bahmanm@lemmy.mlOPtolemmy.ml meta@lemmy.ml•Would you be interested in opting-in to lemmy-meter?English1·2 years agoUPDATE: lemmy.ml is now on lemmy-meter 🥳
Good question!
IMO a good way to help a FOSS maintainer is to actually use the software (esp pre-release) and report bugs instead of working around them. Besides helping the project quality, I’d find it very heart-warming to receive feedback from users; it means people out there are actually not only using the software but care enough for it to take their time, report bugs and test patches.
“Announcment”
It used to be quite common on mailing lists to categorise/tag threads by using subject prefixes such as “ANN”, “HELP”, “BUG” and “RESOLVED”.
It’s just an old habit but I feel my messages/posts lack some clarity if I don’t do it 😅
bahmanm@lemmy.mlOPtoLemmy.ca Support / Questions@lemmy.ca•Would you be interested in opting-in to lemmy-meter?English1·2 years agoOh, neat!
On another note: ~2 mins looks like rather a “long” window of maintenance/disruption for what Cloudflare is 🙈
bahmanm@lemmy.mlto Chess@lemmy.ml•Sicilian Defense: Hyperaccelerated Dragon, Fianchetto, Pterodactyl DefenseEnglish3·2 years agoI’m not an 1.e4 or Sicilian player but this smells like wild tactical variations early in the game.
bahmanm@lemmy.mlOPto Blahaj Lemmy Meta@lemmy.blahaj.zone•Would you be interested in opting-in to lemmy-meter?English3·2 years agoDone ✅
Thanks for your interest 🙏
Please do drop a line in either !lemmy_meter@lemmy.ml or #lemmy-meter:matrix.org if you’ve got feedback/ideas for a better lemmy-meter. I’d love to hear them!
Oh and feel free to link back to lemmy-meter from Blåhaj if you’d like to, in case you’d prefer the community to know about it.
bahmanm@lemmy.mlOPto Community Meta Discussion@ttrpg.network•Would you be interested in opting-in to lemmy-meter.info?English1·2 years agoUpdate 1
ttrpg.network is now on lemmy-meter 🥳 Thanks for your interest 🙏
bahmanm@lemmy.mlOPto Community Meta Discussion@ttrpg.network•Would you be interested in opting-in to lemmy-meter.info?English1·2 years agoTo be precise, it’s not 4 requests to the same endpoint.
lemmy-meter probes 4 endpoints each once per minute:
- The landing page
api.getPosts
(limit=1
)api.getComments
(limit=1
)api.getCommunities
(limit=1
)
That’s b/c I’ve frequently experienced cases when the landing page works but some mobile APIs don’t and vice versa.
Hope that makes sense.
As I said, if after some time you feel like this is too much load, reach out to me and I can easily configure lemmy-meter to probe less frequently.
bahmanm@lemmy.mlOPto Meta (lemmy.one)@lemmy.one•Would you be interested in opting-in to lemmy-meter.info?English1·2 years agoUpdate 1
lemmy.one is added to lemmy-meter 🥳
Please do reach out if you’ve got feedback/suggestions/ideas for a better lemmy-meter 🙏
You can always find me and other interested folks in
bahmanm@lemmy.mlOPto Meta (lemmy.one)@lemmy.one•Would you be interested in opting-in to lemmy-meter.info?English2·2 years agoOh, sorry to hear that 😕
I think I’ll just go ahead and add you folks to lemmy-meter for now. In case you want to be removed, it should take only a few minutes.
I’ll keep this thread posted once things are done.
bahmanm@lemmy.mlOPtoLemmy.ca Support / Questions@lemmy.ca•Would you be interested in opting-in to lemmy-meter?English2·2 years agoIt’s on 🥳
If you’ve got questions/feedback/ideas please drop a line in either
Thanks for showing interest 🙏
Not really I’m afraid. Effects can be anywhere and they are not wrapped at all.
In technical terms it’s stack-oriented meaning the only way for functions (called “words”) to interact with each other is via a parameter stack.
Here’s an example:
TIMES-10
is a word which pops one parameter from stack and pushes the result of its calculation onto stack. The( x -- y)
is a comment which conventionally documents the “stack effect” of the word.Now when you type
12
and press RETURN, the integer 12 is pushed onto stack. ThenTIMES-10
is called which in turn pushes10
onto stack and invokes*
which pops two values from stack and multiplies them and pushes the result onto stack.That’s why when type
.S
to see the contents of the stack, you get120
in response.Another example is
This simple example demonstrates the reverse Polish notation (RPN) Forth uses. The arithmetic expression is equal to
5 * (20 - 10)
the result of which is pushed onto stack.PS: One of the strengths of Forth is the ability to build a vocabulary (of words) around a particular problem in bottom-to-top fashion, much like Lisp. PPS: If you’re ever interested to learn Forth, Starting Forth is a fantastic resource.