~technomancy

~technomancy/fennel

Last active 2 days ago
View more

Recent activity

Re: [PATCH fnlfmt 1/1] make cli standalone 2 days ago

From Phil Hagelberg to ~technomancy/fennel

~jaawerth <jaawerth@git.sr.ht> writes:

> This makes the fnlfmt executable standalone, so it can be moved or
> symlinked to without having to mess with package.path.
>
> The executable here was compiled with a Fennel 0.4.1-dev version with
> the recent changes to `include`, which gives more readable output than
> older versions.

Thanks! Applied and pushed.

-Phil

Re: [ANN] Fennel 0.4.0 released! 12 days ago

From Phil Hagelberg to ~technomancy/fennel

Phil Hagelberg <phil@hagelb.org> writes:

> Happy Fennel 0.4.0 release day everybody!
>
> If there's a theme to this release, it's being more friendly.

One more thing I forgot to mention: if you've been hesitant to join the
chat on IRC, we now have it bridged thru to Matrix, so all our
discussion now should be a bit more accessible to folks who may not be
as comfortable with older protocols:

    https://matrix.to/#/!rnpLWzzTijEUDhhtjW:matrix.org?via=matrix.org

See you there.

[ANN] Fennel 0.4.0 released! 12 days ago

From Phil Hagelberg to ~technomancy/fennel

Happy Fennel 0.4.0 release day everybody!

If there's a theme to this release, it's being more friendly. For
starters, the compile errors now pinpoint where the problem happened
and provide suggestions for how to fix them:

    Compile error in test/bad/expected-even-bindings.fnl:1
      expected even number of name/value bindings

    (let [x 1 y] x)
         ^^^^^^^
    * Try finding where the identifier or value is missing.

We also have a brand-new setup guide for new users that covers

Re: setup.md draft 20 days ago

From Phil Hagelberg to ~technomancy/fennel

Jesse laprade <jesselaprade@gmail.com> writes:

> Hey technomancy, here's that setup.md file. You can find it in the
> attachment!

Thanks! This is a good start.

> # Requirements
>
> * Access to a UNIX-like environment, such as Ubuntu, Debian, Arch
>   Linux, Windows Subsystem for Linux, Homebrew, scoop.sh, etc.
> * LuaRocks
> * Git

Re: [PATCH] Don't emit headers twice 23 days ago

From Phil Hagelberg to ~technomancy/fennel

Benaiah Mischenko <benaiah@mischenko.com> writes:

> ---
> Fixes a small issue with the last patch I sent in. Also corrects the comment.

Nice catch; thanks. Applied and deployed.

-Phil

Re: [PATCH] fennel-lang.org - table of contents 24 days ago

From Phil Hagelberg to ~technomancy/fennel

Benaiah Mischenko <benaiah@mischenko.com> writes:

> I can rewrite the filter in Fennel and compile it to Lua in the makefile
> if that would be preferable to people.

Nah let's keep it simple.

Thanks for this! It looks great.

-Phil

Next Fennel release 24 days ago

From Phil Hagelberg to ~technomancy/fennel

Hello!

If you didn't see it, Fennel made a great showing at the recent Lisp
Game Jam, so nice work to everyone who submitted:

    https://itch.io/jam/spring-lisp-game-jam-2020/results

Now that the jam is over, I'm looking over the work we've got in
progress and coming up to try to plan the next release.

Yesterday I implemented a feature called "fennelfriend" which enhances
the compiler errors by pinpointing the problem and offering suggestions:

    Compile error in test/bad/set-local.fnl:2

[PATCH] Implement macro expander. 2 months ago

From Phil Hagelberg to ~technomancy/fennel

This implements a macro expander which is exposed in the compiler
scope by removing the macro->special transformation and storing all
the macros in a new table on the scope table.

One gotcha is that in order to use it, you must print or fennelview
the result, otherwise you get a strange error.

    (eval-compiler (macroexpand '(when x (print x))))
    Compile error: ./fennel.lua:923: invalid value (table) at index 3 in table for 'concat'

    (eval-compiler (print (macroexpand '(when x (print x)))))
    (if x (do (print x)))

It would probably be good to make it clearer what you need to do
[message trimmed]

Table macros 4 months ago

From Phil Hagelberg to ~technomancy/fennel

One common pain point with Fennel is that it's missing certain helper
functions you'd expect around tables, like map/filter/etc. This is done
because a key design goal of Fennel is to have no runtime overhead, so
introducing new functions is not possible.

However, this doesn't mean that we can't add them as macros; it would
just turn into a `let`+`each` form at compile-time.

We recently introduced `map` and `kvmap` to the compiler internals,
and it's helped clean up a fair bit of code. We could also expose it
in Fennel code itself, although it would have to me a macro which
would expand to an `each` call because of the restriction of having no
runtime.

[PATCH] Port the repl over to Fennel instead of Lua. 4 months ago

From Phil Hagelberg to ~technomancy/fennel

This ports over the repl function from Lua to Fennel in an effort to
start getting a little more self-hosty, incrementally. I had to expose
a few internal compiler bits to the Fennel code that aren't already
part of Fennel's API; see the `internals' table near the bottom, but
it wasn't too bad. We also change the makeScope function to default to
GLOBAL_SCOPE as the parent to avoid needing to expose more internals.

We got a line reduction from 156 lines to 125, which isn't quite as
much as I'd expected but isn't too bad.

---
 api.md     |  11 ++
 fennel.lua | 342 ++++++++++++++++++++++++++++---------------------------------
 2 files changed, 168 insertions(+), 185 deletions(-)
[message trimmed]