Fennel is a neat Lisp-flavored Lua language that I've been using for around 2 years now.
HN user
qgc
The comparison with Perfetto in the video is pretty damn impressive. So nice to have another player in the profiler space. Iteration time is unfortunately (and inexplicably) undervalued. My short time messing around with SpeedScope was more promising, but profiling in general has been pretty painful with all of the tools I've tried that ingest auto-traced input.
You mention in the "For Everyone Else" section that you have an auto-tracer system to instrument all your tracing. Aside from being very handy, how does it compare to [1] which you mention right after?
The idea here is adaptive traits becoming maladaptive over time as a situation changes. So you develop a coping mechanism that, temporarily, is better than not coping with the situation you're in, but as either the situation changes or becomes long-term, it ends up disrupting your ability to engage in higher-order functioning or pursue "happiness" or "meaning" in your life.
The fact that stuff happens in life that makes you suffer is something you generally learn to deal with early on, and most people can handle a bit of suffering, but where things get challenging is when the "second order" stuff stops you from being able to see the goal you're shooting for, the light at the end what makes the suffering something you were able to tolerate.
It's really not.
This isn't a difference of opinion that looks like "well some thing x is better at doing y than z" It's a fundamental disagreement on the purpose and practice of the language. For regular Forth users, the high and low level sit together with Forth, you don't experience a sense of any kind of "layers" of abstraction over the fundamentals of what the machine is and does. One can dispute whether Forth has this property, but it's really not an overstatement to say that regular Forth users feel this sense deeply and share this subjective experience.
The capabilities of processors change a ton over time, which is the most damning aspect of ANS Forth, it is simply outdated!
--
The "major forths" you speak of are exactly what is antithetical to the general forth philosophy of implementing only what is necessary above the lowest level. Even the term "major forth" really speaks to the bias that popular programming languages and their users have. And there's a really good reason for this, standard Forth words really just don't make any sense unless they give you access to the hardware in a way that cross platform software is largely antithetical to. Cross platform components in software fundamentally act as either a service to a platform layer or otherwise provide an abstracted interface to a varying implementations.
The whole point of a language like Forth is to turn the lights on, to play the audio and to drive the car. Chuck was wholly aware of higher level systems like Lisp when he created Forth and purposefully developed a tool that made it easy to start from first principles and develop a Forth system to suit your needs on a domain specific level. That is, the domain of the device and it's capabilities.
The closest thing to a de-facto standard is more like eForth.
"eForth allows me to make a complete Forth system with about 30 very simple machine code routines. With so few words to code, I could do the coding by hand, that is, without the need to write an assembler first. After this simple model is running, it is desirable to code much of the rest in assembly." http://www.forth.org/eforth.html
Notably it is reasonable to have portable forths, in that some of the same patterns may emerge, (some primitives are obviously going to be the same, you'll always need dup), but they aren't cross platform in that the code simply doesn't translate. The words needed just aren't the same. You don't want to write reusable code, you should just rewrite it.
It's actually hard to overstate how disliked ANS Forth is, not only by it's creator but by the active community (there aren't many avid, regular users who aren't a part of some kind of interest group.)
I really do recommend 1x Forth which I posted in response to your first comment to get at the kind of simplicity that the Forth philosophy targets.
"The ANS Forth standard is at least one, maybe two orders of magnitude more complex than Mr. Moore's approach to Forth. He says that code should be so simple that most type of errors simply can't happen. In the late eighties and early nineties Chuck quit writing code in Forth and experimented with sourceless programming. His first versions of his VLSI CAD software, OKAD, were constructed without source using his tools in his OK operating system. Later he return to Forth programming and rewrote OKAD II under his new colorForth. [Moore, 2000] In the chat session Chuck was asked, 'How did you come to the conclusion that Forth was too complex, and that sourceless programming was your next move?'
His reply was, 'Maybe by reading the Forth Standard.'" http://www.ultratechnology.com/levels.htm
In Chuck's conception, it's the kind of simplicity that's necessary if you want to start putting computers in your eye. https://youtu.be/0PclgBd6_Zs
If you want to see Chuck talk about these kinds of things "1x Forth" [1] is a great talk from him on these kinds of things.
Many of the words in the ANS Forth standard consume more than one element from the data stack
ANS generally frowned upon by Forthers, the idea of having a standard, cross-platform Forth is something of an insult the Forth philosophy. If you check out something like the Silicon Valley Forth Interest Group guys, they all make their own Forths, or use one specific to the platform they're using (such as Brad Nelson's Forth for the ESP32, if they're using that device.)
Additionally, I don't agree you should never use more than one, but the majority should only take one, the cases where you do take 2 or 3 should be either primitive words or fit the style and form of primitives that take in 2 or 3. (for instance we might see `cells!` take in 2 variables just like `!`, but it's styled like said primitive so it's behavior is clear and follows known patterns.)
It would be more helpful/accurate, to say that one should only have a maximum of 3 items on the stack at a time (which is what Chuck suggests) and so any time where a word takes in 3, it should be consuming the stack and replacing it with either zero or one items in return.
roll
It is most certainly inspired, in style, by JonesForth [1] which is a classic moment in the "Programming Pedagogy Hall of Fame."
[1] https://github.com/nornagon/jonesforth/blob/master/jonesfort...
[2] https://github.com/nornagon/jonesforth/blob/master/jonesfort...
It would be more accurate to describe a metacompiler as a cross compiler to the machine an interpreted Forth is implemented on.
I recommend Moving Forth [1] for the full explanation. (That's the part that addresses metacompliers, the rest is still quite a great book.)
People may be interested in James' other stuff
https://howerj.github.io/libforth/libforth.htm
Although Embed is the more mature project than libforth.
I really liked having a full explanation line-by-line. If you're interested in Forth, JonesForth is another classic literate program: https://github.com/nornagon/jonesforth/blob/master/jonesfort...
They have some great live coding demos [0] on their blog [1].
[0] https://blog.asrpo.com/jit_programming [1] https://blog.asrpo.com/