~technomancy

~technomancy/fennel

Last active 2 days ago
View more

Recent activity

[ANN] Fennel 0.4.2 released! 2 days ago

From Phil Hagelberg to ~technomancy/fennel

Greetings Fennelers.

I've just released version 0.4.2 of Fennel. Here are the relevant changes:

* Fix a bug where multiple `include` calls would splice locals incorrectly
* Support varargs in hashfn with `$...` (#298)
* Add `with-open` macro for auto-closing file handles (#295)
* Add `--native-module` and `--native-library` to `--compile-binary` command
* Make autogensym symbols omit "#" when appending unique suffix
* Fix a bug where autogensyms (using `#`) couldn't be used as multisyms (#294)
* Add `fennel.searchModule` function to module API
* Fix a bug causing `include` to ignore compiler options
* Fix a bug causing the repl to fail when `$HOME` env var was not set

Re: The road to self-hosting 14 days ago

From Phil Hagelberg to ~technomancy/fennel

Phil Hagelberg <phil@hagelb.org> writes:

> I have a branch in which I've separated out the compiler into four
> distinct "pseudo-modules". It's all still in one file, but I've used
> inline functions to isolate each module's scope so that its internals
> aren't visible to other sections, and it's very explicit about what it
> exports by returning a table from the inline function.

Great progress on the self-hosting front: I wrote a Lua->Fennel compiler
(the opposite of Fennel which compiles from Fennel->Lua) called Antifennel:

    https://git.sr.ht/~technomancy/antifennel/

Even though it is pretty immature, it quickly became capable of

The road to self-hosting 20 days ago

From Phil Hagelberg to ~technomancy/fennel

Hello Fennelers!

One of the longer-term goals of Fennel has been to achieve self-hosting;
that is, we want Fennel's compiler to be written in Fennel. This is
commonly seen as a big milestone among languages; it's a sign of
maturity if the language can achieve it. But it's often tricky for
reasons that have less to do with language maturity and more to do with
practicality. As you can imagine, there are some serious circularity
puzzles you need to solve in order for a compiler to be implemented in
itself. But I think I have the beginnings of a plan.

The first step is to ensure the compiler is modularized. Right now
fennel.lua is just one big file, which makes it easy for anyone to embed
Fennel in their programs. This is a really important property that we

[ANN] Fennel 0.4.1 released! a month ago

From Phil Hagelberg to ~technomancy/fennel

Hello everybody.

I just pushed out the release of Fennel 0.4.1. Most of it is fixing
small bugs that we found in the 0.4.0 release:

* Fix a bug where included modules could get included twice (#278)
* Fix a 0.4.0 bug where macros can't expand to string/boolean/number primitives (#279)
* Fix a bug in macros returning forms of a different length from their input (#276)
* Support shebang in all contexts, not just dofile.
* Pinpoint source in compile errors even when loading from a string

We snuck in one new feature in, and while it's something quite
experimental, I'm excited about the possibilities it opens up. In Fennel
0.4.0, we made it so Fennel itself is compiled to a single all-in-one

Re: [PATCH fnlfmt 1/1] make cli standalone a month 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! 2 months 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! 2 months 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 2 months 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 2 months 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 2 months 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