4 ms·
Seems like a perfect use-case for Janet. (https://janet-lang.org/ https://janet-lang.org/) A fast minimal VM like Lua, but even more extensible than Lua by bein
by netbioserror 2y ago
Seems like a perfect use-case for Janet. (https://janet-lang.org/ https://janet-lang.org/) A fast minimal VM like Lua, but even more extensible than Lua by being a "Lisp" with macro and C extension capabilities. Not a true Lisp, it's very pragmatic and performance-oriented. But it keeps the good stuff. Composing OS extensions with something like that would be downright joyous.
- sourcepluck 2y agoA lovely idea. I'd been trying to find an excuse to mess with Janet, because so many of the decisions seem nice, but hadn't figured out where it wanted to be. That idea sounds compelling, though!
- ranger_danger 2y agoI know this is a highly subjective and controversial opinion, but to me this syntax looks even worse than Rust, which I already can't read.
- netbioserror 2y agoYou must be fairly new to the wider language space. Admittedly, the example Janet presents on their frontpage doesn't at all demonstrate the strengths of S-expression syntax. I highly recommend taking a look at Clojure or Racket to get a sense of what Lisp syntax can do. A lot of what you'll find would be very easily portable to Janet.
- ranger_danger 2y agoActually I have seen many Lisp-style languages and I do not like any of them, I simply cannot stand the syntax.
- DonHopkins 2y agoWhat a silly reason to be afraid of Lisp. The simple s-expression syntax is the source of Lisp-like language's homoiconic power, and the syntax of most other languages is just as terrible if not worse, but you're just so used to it you don't notice. If you're a professional programmer, then you regularly put up with vastly worse syntax than Lisp every day without realizing it, I bet, like bash nonsense, or yaml and its templating languages, or Perl acoustic coupler modem line noise, or C preprocessor macros, or C++ and its delightful templates, or TypeScript shape declarations, for example (I could go on and on naming popular languages with terrible syntax, but you get my point). If you don't understand the power and uses of homoiconicity and metaprogramming, then of course you're not going to understand or appreciate why Lisp has that syntax. PostScript is also homoiconic and jsonically polymorphic (i.e. it has essentially the same data types as JSON, just decades earlier), but if you can't deal with Lisp's parenthetical syntax, then PostScript's reverse polish notation syntax will probably be too much for you too. The Shape of PSIBER Space: PostScript Interactive Bug Eradication Routines — October 1989: https://donhopkins.medium.com/the-shape-of-psiber-space-october-1989-19e2dfa4d91e https://donhopkins.medium.com/the-shape-of-psiber-space-octo... Homoiconicity: https://en.wikipedia.org/wiki/Homoiconicity https://en.wikipedia.org/wiki/Homoiconicity >In computer programming, homoiconicity (from the Greek words homo- meaning "the same" and icon meaning "representation") is a property of some programming languages. A language is homoiconic if a program written in it can be manipulated as data using the language.[1] The program's internal representation can thus be inferred just by reading the program itself. This property is often summarized by saying that the language treats code as data. >In a homoiconic language, the primary representation of programs is also a data structure in a primitive type of the language itself.[1] This makes metaprogramming easier than in a language without this property: reflection in the language (examining the program's entities at runtime) depends on a single, homogeneous structure, and it does not have to handle several different structures that would appear in a complex syntax. Homoiconic languages typically include full support of syntactic macros, allowing the programmer to express transformations of programs in a concise way. >A commonly cited example is Lisp, which was created to allow for easy list manipulations and where the structure is given by S-expressions that take the form of nested lists, and can be manipulated by other Lisp code.[2] Other examples are the programming languages Clojure (a contemporary dialect of Lisp), Rebol (also its successor Red), Refal, Prolog, and possibly Julia (see the section “Implementation methods” for more details).
- netbioserror 2y agoYour loss.