wisp-lang / wisp

A little Clojure-like LISP in JavaScript

Home Page:https://gozala.github.io/wisp/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Analyzer unit tests are currently ignored.

hughfenghen opened this issue · comments

Hi, i want try add new feature syntax to the wisp, but I found that the unit test of the analyzer module is ignored. https://github.com/Gozala/wisp/blob/master/test/test.wisp#L10

Is there any reason?

I think I turned them off when I implemented CI. There was some bug preventing those from passing which was beyond my understanding, but I thought that having most of the codebase tested was better than not turning on tests at all.

Would be good to get this fixed if you or somebody else has the expertise. CC: @LeXofLeviafan @rcarmo

@chr15m I'll probably check it out later
@hughfenghen What kind of syntax are you thinking of implementing, BTW? I think Wisp has more or less everything that Clojure supports, syntax-wise; and most other things can be covered by either macros or reader-macros (that's how you normally extend a Lisp ;-) ).

@LeXofLeviafan Thanks.

I am a js developer and don't have an in-depth understanding of wisp or coljure.
I want try Implement destructuring to learn related knowledge.

@LeXofLeviafan I personally value stable software quite highly and would tend towards being conservative about merging new features that stray too far from the core of what Wisp does.

@hughfenghen destructuring would be amazing.

@hughfenghen Destructuring is implemented here.

…And yes, it's not "new syntax", it's macros – a compile-time function that takes code as input and produces code as output. That's how you add new syntactic constructs into Lisp (so, defn – or its equivalent – has not been a word recognized by any Lisp parser since probably the 60s; instead, it produces code that creates a function and sets it to value: (defn foo [bar] (baz))(def foo (fn foo [bar] (baz)))).

As for reader-macros, they're basically markers that convert the following S-expression: 'x(quote x); Clojure support for custom reader-macros is (intentionally) limited but if you need any you can register a tag (like #inst, which is a standard one: #inst "foo"(Date. "foo"))

Wow nice work implementing destructuring! 🌟 💯