Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 03 2018 22:30
    PrimordialHelios closed #55
  • Dec 03 2018 22:30
    PrimordialHelios commented #55
  • Dec 03 2018 21:57
    PrimordialHelios commented #55
  • Dec 03 2018 21:22
    PrimordialHelios opened #55
  • Sep 21 2018 23:49
    0xflotus opened #54
  • Sep 21 2018 23:49
  • Jun 21 2018 13:28
  • Apr 05 2018 01:02
  • Jan 29 2018 18:29

    anko on master

    Downgrade source-map to ^0.6.0 … (compare)

  • Jan 24 2018 00:30

    anko on master

    Cleanup: rearranging for ease o… Travis: Test on Node v9, stop t… Update npm dependencies (compare)

  • Jul 30 2017 15:49
    alandipert commented #53
  • Jul 30 2017 11:33

    anko on master

    Travis: Test on Node 8, drop 0.… Use prepare npm script instead … (compare)

  • Jul 30 2017 11:24
    anko commented #53
  • Jul 30 2017 11:20
    anko commented #53
  • Jul 30 2017 11:18

    anko on master

    0.7.6 (compare)

  • Jul 30 2017 11:18

    anko on v0.7.6

    (compare)

  • Jul 30 2017 11:13
    anko closed #53
  • Jul 30 2017 11:13

    anko on master

    Let `return` take 0 arguments … (compare)

  • Jul 30 2017 05:59
    alandipert opened #53
Isiah Meadows
@isiahmeadows
I was mostly asking in case it was just a language agnostic programming error.
Matthew
@Hedgepig
ah fair enough
thanks anyway
Isiah Meadows
@isiahmeadows
:smile:
Antti Korpi
@anko

Sorry for the ridiculous delay, and for being indistinguishable from dead. :smile:

@Hedgepig This works for me:

(macro v
    (lambda (name val)
      (return (array
        `(var one "test")
        `(var another "test"))
      )))

(v)

I just removed the , before the first "test", assuming it was a typo. If it was intentional, what output did you expect?

The relevant unit test is here.

Matthew
@Hedgepig
No problem, I will give it a go when I have time. Just a shame this does not use es6 constructs, let and const would be useful.
Antti Korpi
@anko

The built-in macros don't support ES6 yet, because I haven't figured out some details (like #23 on dynamic property names in property expressions). I'd rather only add them all at once, to keep things clear.

However, you can add them yourself if you want them. If you write a macro that returns a valid estree object (including the ES6 extensions), then eslisp will happily compile it:

(macro const
    (lambda (name val)
      (return (object
                "type" "VariableDeclaration"
                "kind" "const"
                "declarations" (array
                                 (object
                                   "type" "VariableDeclarator"
                                   "id" ((. this compile) name)
                                   "init" ((. this compile) val)))))))

(const a 5)

That outputs const a = 5;.

For a let, change "kind" "const" to "kind" "let". You might find this JS-to-estree parser sandbox helpful if you'd like to play with ES6 features more complex than let and const.

Relevant tests here. This is exactly how the built-in macros work internally too.

Isiah Meadows
@isiahmeadows
@anko Optimally, that should be compile-time checked, but that's non-trivial to do. (You have to address scoping, but you already kind of have to when dealing with function-scoped macros that shadow an outer one.)
ven
@vendethiel
(macro defn (name params body)
  `(set ,name (lambda ,params (return body))
:P
Antti Korpi
@anko
@isiahmeadows What do you mean should be compile-time checked? Guessing you mean validity of the given estree object should be compile-time checked: eslisp currently runs the final AST through esvalid as a sanity check before compiling to JS, and throws any errors it reports. Esvalid's ES6-support is unfortunately incomplete though: estools/esvalid#7
Isiah Meadows
@isiahmeadows
Not exactly (but that would be nice). I was specifically referring to let and const should be checked - duplicate declarations are errors, and const bindings are read-only.
ven
@vendethiel
@anko Really happy to see you back to working on the project :D.
Antti Korpi
@anko
@vendethiel :+1:. I took a break and have some new ideas now, I'll probably be breaking everything.
Antti Korpi
@anko
In fact, I already did: #50. :sweat_smile:
Raymond W. Ko
@raymond-w-ko
Doesn't matter, I'll still use it in production :shipit:
;-)
Antti Korpi
@anko
Open source is Schrödinger's Volunteering. It always surprises me to find people are using my random code and libraries. The only window I have into it is when I break them and get bug reports, or when I check npm dependents for fun. I've been doing this for a while but it still feels strange. How many eyes are on me right now? Am I on someone's Twitch stream? Aaaaaaa.
Raymond W. Ko
@raymond-w-ko
Twitch Plays eslisp :clap:
Antti Korpi
@anko
One day :pray:
Isiah Meadows
@isiahmeadows

@anko

Open source is Schrödinger's Volunteering.

This is so true... :smile:

Matthew
@Hedgepig
I am also glad you're still working at this, I have yet to see a js lisp implementation that inspires me as much.
Alan Dipert
@alandipert
just showed up to say, <3 eslisp. brilliant idea, execution
also really happy to see how straightforward it is to add support for e.g. const in userland
i am curious to see how others set up their esl applications. i have begun to experiment here: https://github.com/alandipert/esl-lab
Antti Korpi
@anko
Thanks for your words @Hedgepig and @alandipert. :bow: I hope my slow pace of progress isn't too disappointing.
Alan Dipert
@alandipert
to the contrary, the slow pace makes it easy to keep up :smile:
Daniel Rodríguez Rivero
@danielo515
Hello
What is the status of this project?
Antti Korpi
@anko

@danielo515 Hi! It has stalled, because of me. I want to continue, but I've
had a years-long stretch of depression (generally feeling like shit, with
occasional okay parts), which has made it next to impossible to work on huge
ambitious optimistic stuff like eslisp most days. I've finally managed to drag
myself to a therapist, so treatment starts next week. It might help? Or not?

I have no certainty to offer unfortunately.

ven
@vendethiel
Sucks to hear... Hopefully it gets better! Been following this for quite a while, but nothing is worth burning out for.
Daniel Rodríguez Rivero
@danielo515
Sorry to hear taht
I know that this is easy to say and hard to do, but think that depression is not your fault. Is another chemical disorder like diabetes or hypothyroidism
don't feel bad about it
Just try to deal with it
ven
@vendethiel
??
Sean Lynch
@seepel_gitlab
Hi @anko I've been lurking the last couple months after writing a quick prototype of a very similar project, trying to gear myself up to try to contribute to the project. I wasn't planning to reach out until I had a contribution to make (almost got eslisp building on windows the other weekend, only thing I haven't fixed yet is piping txm to head), but wanted to chime in to offer what support I can as an internet stranger. Not depression, but I have suffered from anxiety and for me therapy did help a lot. For what it's worth, I think what you've done here is pretty fantastic! My plan was basically to continue to play around with eslisp by basically working haphazardly towards things that I've seen mentioned in some of the issues around eslisp and sexpr-plus (eslisp macros for built-ins, extensible parser combinator reader, ES6+ stuff), which incidentally are the same goals I originally had in mind for my own project before I found eslisp. I wouldn't want to pressure you, but if it would help I'd be happy to work on things in a more directed effort.
Leo Thorp
@leothorp
Wow, just wanted to say this is an extremely cool project, and just what I was looking for. Thanks!
Asheera Dolinsky
@asheera-dolinsky

Hey @anko

Same as Leo, I'd like to thank you for eslisp. It inspired a lot in me. I've been tinkering with my own language for a year now, scrapping it multiple times, using all sorts of parser generators ranging from ohm to chevrotain (this one is a'ight) to nearley (it used to be JS). Now I have finally figured out the philosophy, the syntax, the tooling, and the primary target.

The compiler is written in Lua and it will compile to Lua.
It uses LPeg, because LPeg is mighty brilliant.
It's written in a continuation-passing style for both elegance and performance.
It will have compile-time macros, both the old boring kind and reader (with minimal pain).

It's nice to look back at eslisp, and all these years in which I didn't have the confidence to go through with it, and that I finally do.

Wish me luck! And from myself I wish for you to keep on fighting, even if it feels difficult sometimes.

lagleki
@lagleki
@asheera-dolinsky link?
Asheera Dolinsky
@asheera-dolinsky

@lagleki https://github.com/asheera-dolinsky/Sin

WIP, still a lot of work to do, much of what I did in the JS version translates though.

lagleki
@lagleki
@asheera-dolinsky you did a js version as well? Is it public?
Asheera Dolinsky
@asheera-dolinsky
I'll put it on github later, it's not really that interesting @lagleki
it could never support something like reader macros for instance
I'll ping you once I do, it's still on a thumb stick somewhere
It mostly works, I just had to write all the constructs that Babel supports, but then I got bored
I wasn't happy with the syntax either, but I learned a lot from my mistakes with it
The syntax in Sin is much cleaner
lagleki
@lagleki
np. I guess Lua still compiles to js if that matters
Asheera Dolinsky
@asheera-dolinsky
Indeed, I will make a version that compiles to JS as well, the only problem is that the compiler interface is obviously going to be in Lua, but Lua and the vanilla ES3 have a lot of overlap. @lagleki
I'll take some time off at the end of the year so that I can work on Sin not distracted. Working full time puts a toll on my ability to do my own projects unfortunately, you know how it is.