I have been following this project closely for a while as it is simular to an imaginary language I've always wanted (and have been slowly working on myself). Whereas Kitten comes from a Haskell heritage (thus functionally pure), mine comes from a Forth hertiage (it is a true Forth). Kitten, as it seems to me, is a potentially awesome hybrid of Haskell, C (more under the hood) and Forth and I am very much looking forward to seeing its fruition. It's about time concatinative languages got their modern, mainstream turn in the sun.
I really appreciate your ongoing support! :) I know we have different visions of the languages we want to build and use, but your suggestions have been very helpful because they’ve challenged me to think critically about the semantics & syntax of Kitten, particularly from a Forth perspective.
The "point-free" form (of concatinative languages) is amenable to being evaluated over different Categories (in the sense of Category Theory) to get a variety of valid computations from the same code.
Eh, as always, it goes in fits and starts. I quit my job a few months ago and spent longer than expected to recover from burnout, now I’m trying to do a release before returning to work.
I sort of painted myself into a corner with some aspects of the last compiler design, so I rearchitected things again to unblock some missing features, fix type system bugs, and make it easier to integrate with editors and such. None of this is really online yet—I haven’t been working in public that much, so the progress of the past few months, such as it is, isn’t very visible.
Anyway, I rewrote the typechecker based on “Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism”—great paper, btw—and lately I’ve been working on various things:
• Unboxed arrays, closures, and existential types. (Similar motivations to the “impl Trait” work over in Rust.)
• Standard-library design around smart pointers and low-level code, since I’m trying to write a small kernel in Kitten as an example application.
• Extensions to the permission system to give the compiler more knowledge about optimisations, make it easier to write allocation-free code, that sort of thing.
• Taking advantage of types to avoid the need to represent the data stack in memory at runtime—instead the compiler will do register allocation like a conventional C-like language compiler.
• Finally, a proper x86-64 backend—someone’s also recently expressed interest in helping with a wasm backend, which I’d like to get to.
Basically, progress continues to happen slowly. For the past few weeks it’s mostly been planning and writing my thoughts down for whenever I actually have the energy to write the code. I’ve tried to stick to a weekly schedule, but that’s been disrupted since I went and visited my family for a couple weeks. The next step, I think, is to find some source of external accountability like giving talks or committing to a release date so I have more consistent motivation to work on it.
If you want to chat about it, come hang out on the Gitter channel[1], or follow @evincarofautumn on Twitter for updates.
I like that concatenation works with space instead of more verbose operators like for example Elixir's |>
It basically turns space into the dot of most object oriented languages. It would be ok to use a dot too, but the space looks better and leaves the option of using the dot inside function names. I wish they could change the syntax of Elixir to look like that.
I probably missed it, but how do we import functions from another file / module? And how about multi-line concatenations?
> how do we import functions from another file / module?
Currently everything is public, so you can just give multiple files to the compiler and it ought to work. I’m working on a more structured module system right now. As a first step, definitions will be private to the vocab (namespace) in which they’re defined by default, and adding an “export” annotation will make them visible from other vocabs. “import” will be sugar for introducing local synonyms (aliases) of definitions in other vocabs.