8 ms·
This looks so awesome! It's got the best parts of a lot of languages. This is what sticks out to me: - Really simple lisp like scheme, but reminds me of lua (a
by ristos 6y ago
This looks so awesome! It's got the best parts of a lot of languages. This is what sticks out to me:
- Really simple lisp like scheme, but reminds me of lua (and not bloated like CL)
- Has resumable fibers, no callcc like scheme
- Not missing the lack of lists tbh
- A module system that doesn't feel awkward like CL
- A built-in package manager (unlike CL)
- Good lua and C support
- Threads have a shared-nothing approach with message passing (reminds me of Erlang actors)
- Destructuring
- Good PEG support, encourages it over regex
- (Im)mutable versions of data structures (ie tuples vs arrays, structs vs tables) for maximum flexibility
- Prototypal inheritance
- Docs are clean and easy to read
I'll definitely have to try this out, it looks really cool.
Some stuff I'd like to see:
- Pattern matching support (could be a library I guess)
- Multimethods
- Full numeric tower with arbitrary precision types
- Javascript compilation -- I could see this language being really useful for web and game dev
Does it have good debugging support?
I'm thinking of something like slime, swank, etc. Can I set up emacs and/or vim to work the same way I can use CL with slime + swank?
I'm also wondering about the stack traces -- one of the downsides to CL is sometimes the stack traces are nasty to read
- ristos 6y agoWhy was this downvoted? I don't get it :/
- lispm 6y agoCategory error maybe: CL is a language standard with several very extremely different implementations and a diverse tool landscape. Janet OTOH is a single language&implementation.
- carapace 6y agoLikely for bashing CL (however lightly). People get tetchy.
- deleted 6y ago[deleted]
- nromiun 6y agoSee some previous HN threads on Common Lisp.
- jonstaab 6y agoI wrote a tiny multimethod library for Janet: https://github.com/staab/janet-multimethod https://github.com/staab/janet-multimethod The stack traces have so far been really clean and helpful.
- nathcd 6y ago> stuff I'd like to see [...] Pattern matching support It looks like it does have a match macro, and it does destructuring and _: https://janet-lang.org/api/index.html#match https://janet-lang.org/api/index.html#match
- tomcam 6y agoCan someone explain why this comment was downvoted?
- armitron 6y agoI never thought I'd see a Lisp without lists. Oh wait, I didn't because this isn't a Lisp. I know naming is hard, but this is getting out of hand. Don't say you're a Lisp when you're clearly not. Say Lisp-inspired. Don't use the term 'modern Lisp', 9/10 it's signaling the wrong thing.
- MaysonL 6y agoFrom the examples: # A simple fizz buzz example (loop [i :range [1 101] :let [fizz (zero? (% i 3)) buzz (zero? (% i 5))]] (print (cond (and fizz buzz) "fizzbuzz" fizz "fizz" buzz "buzz" i))) Is this not lisp?
- nonbirithm 6y agoI'm not clear on the exact reasons, but I think some people see it as "Python with S-expressions" rather than "Lisp". I think it's because Janet does not use lists implemented with cons cells and historically that's just what Lisp always used. (Janet uses arrays instead.) But by that logic Clojure isn't a Lisp, if has no cons cells... Another criteria used is homoiconicity. I think the argument is about if a language satisfies the historical definition of "Lisp" rathen than being a Lisp-inspired language with parens.
- yarrel 6y agoClojure isn't a Lisp, and really screws up some of the concepts.
- oalae5niMiel7qu 6y agoA good reason to regard this as "Python with parentheses" is because not only does it use arrays instead of cons cells, but there's no non-mutating `append` function. Instead, Janet has an `array/concat` function that behaves like a Python array's `.append` method, and that's it. And no, Clojure isn't a Lisp. Perhaps it would be appropriate to say that Janet is "a Clojure".
- zdragnar 6y ago