~technomancy

~technomancy/fennel

Last active 4 days ago
View more

Recent activity

Re: help getting readline working in repl 4 days ago

From Phil Hagelberg to ~technomancy/fennel

John Gabriele <jgabriele@fastmail.fm> writes:

> There's a new readline.lua at luarocks (2.7-0). Readline support for
> fennel is working for me now.

Cool; thanks for reporting that upstream. Glad it's working now!

-Phil

Re: help getting readline working in repl 5 days ago

From Phil Hagelberg to ~technomancy/fennel

John Gabriele <jgabriele@fastmail.fm> writes:

>> I don't actually use readline for my repls,
>
> I don't understand. Do you mean for fennel?

For anything pretty much; I either use language-specific Emacs modes or
run them in an M-x shell buffer so I get all the nice history/bindings
for free.

> I just learned that in pre 5.4, Lua built with readline by default, and
> would not build without it. As of v5.4, the default for building on Linux
> (`make linux`) will not give you readline support --- you need to explicitly
> ask for it via `make linux-readline`.

Re: Moving off GitHub & renaming main development branch 5 days ago

From Phil Hagelberg to ~technomancy/fennel

Noah Swainland <noah@distinctly.pink> writes:

>> https://codeberg.org/ seems to look like a possible free/libre candidate.
>
> Codeberg is a great project, but is still just a gitea instance, and so
> as far as I can tell doesn't solve the previously mentioned Yet Another
> Account issue, nor unify the mailing list location with the source code.

I think I may have overblown the importance of the account problem; so
far everyone who has spoken up has said that it would not be an
important consideration for them.

What I really like about Codeberg is that it seems to be structured as a
non-profit.

Re: help getting readline working in repl 5 days ago

From Phil Hagelberg to ~technomancy/fennel

John Gabriele <jgabriele@fastmail.fm> writes:

> I'm on Debian Testing. I just installed Lua 5.4 into /usr/local, and then luarocks there as well.
>
> When I built Lua 5.4, I used linux-readline as the platform (rather than just linux).

I don't actually use readline for my repls, but it may be that our docs
are out of date. I didn't know that Lua 5.4 could be compiled with
built-in readline support. I wonder if this is a new feature in 5.4?

I think the Fennel setup instructions assume that you have not done
this and are pulling in readline externally. Maybe the built-in readline
support conflicts with the luarocks-installed version?

Re: parens instead of brackets for destructuring? 5 days ago

From Phil Hagelberg to ~technomancy/fennel

John Gabriele <jgabriele@fastmail.fm> writes:

> "You can interact with this style of function in Fennel by
> destructuring with parens instead of square brackets"
>
>     (let [(f msg) (io.open "file" "rb")]  ; snip
>
> Why would you do that instead of using square brackets around "f msg"?
> Using parens makes it look like a function call, no?

That's a great question--the use of parens does have that downside of
making it look like a function call. The reason we can't use [] or {} is
that those already have a distinct meaning in this context.

Re: Moving off GitHub & renaming main development branch 9 days ago

From Phil Hagelberg to ~technomancy/fennel

Benaiah Mischenko <benaiah@mischenko.com> writes:

> In light of GitHub's repeated refusals to divest themselves from ICE
> (see [1]), i think it's past time we move language development to a
> platform that does not go out of its way to support concentration
> camps.

I would like to see this move happen, but of course I want to hear other
peoples' input as well. I think there's really four concerns we should
talk about that can mostly be considered independently:

A. the location of the canonical git repository
B. where users go to report issues
C. how we accept code contributions

[ANN] Fennel 0.4.2 released! 25 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 a month 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 a month 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! 2 months 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