~technomancy

WA, USA

https://technomancy.us

tryin' to catch the last train out of Omelas

~technomancy/fennel

Last active 5 days ago
View more

Recent activity

[ANN] See Fennel launched 5 days ago

From Phil Hagelberg to ~technomancy/fennel

Hello Fennel friends!

Tonight I just launched what I call See Fennel. It's a page on the
Fennel web site where you can get a better feel for the relationship
between Fennel and Lua. The compiler output is shown side-by-side with
the input, and thanks to the magic of Antifennel it is bidirectional.

Try it for yourself:

    https://fennel-lang.org/see

I'm hoping this can be useful for folks to better understand what it is
that Fennel does. There are some example snippets of code just to get
you started, tho those are currently chosen somewhat haphazardly. If you

[PATCH] Add comma-commands to repl. 16 days ago

From Phil Hagelberg to ~technomancy/fennel

The commands in the repl are "metacommands" in that they live
"outside" the environment of the repl, invoked by prefixing them with a
comma. This allows us to define commands in a way that we don't have
to worry about conflicts with user code, since the comma prefix is
normally only valid within the context of a quoted form.

The interface is inspired by a similar construct in SLIME's repl:

https://common-lisp.net/project/slime/doc/html/Shortcuts.html

Currently we have:

* exit
* reset
[message trimmed]

Re: [PATCH 2/2] fix macrodebug sandboxing regression 22 days ago

From Phil Hagelberg to ~technomancy/fennel

Jesse Wertheim <jaawerth@gmail.com> writes:

> Addresses [sourcehut issue 11](https://todo.sr.ht/~technomancy/fennel/11).
>
> Macrodebug was failing to require fennelview in the standalone CLI due
> to the use of `package.preload` generated from --require-as-include.
>
> To address this, added the native `require` to the compiler-env for
> built-in macros.

Thanks for looking into this! I've applied and pushed these patches.

For clarity, was the raw* change needed to fix the bug, or was that an
unrelated change that you just happened to notice while working on this?

Re: Fennel -> Hammerspoon repl a month ago

From Phil Hagelberg to ~technomancy/fennel

Hey, I was asked to pass this on re: Jeejah in hammerspoon.

I can't debug anything myself since that program won't run on my system,
but others seem to have it working here:

  https://github.com/Hammerspoon/hammerspoon/issues/2377#issuecomment-687708178

-Phil

Ag Ibragimov <agzam.ibragimov@gmail.com> writes:

> I'm sorry, but I still can't figure it out. I think JeeJah is my best option here. Can you please guide me,
> so I can build a trivial sample REPL. I was able to run JeeJah from the command line like this:
>

[ANN] Fennel 0.6.0 released a month ago

From Phil Hagelberg to ~technomancy/fennel

Hello Fennelers!

I've just pushed out a new 0.6.0 release.

The biggest change here is that macros are loaded in a sandbox which
emits a warning if they access anything outside a small list of allowed
functions. This should set us on the path for safer code loading in the
long run, though today it does not actually block access to these
things.

The idea is that macros should default to not needing to do any I/O or
system-level things; they should just be about transforming code and
nothing else. Right now if you try to do other things, you will get a
warning, but in the future these operations will be blocked

Re: [PATCH] Update sourcehut link to project URL a month ago

From Phil Hagelberg to ~technomancy/fennel

Drew DeVault <sir@cmpwn.com> writes:

> Instead of repository URL.

Makes sense; thanks. I've applied and deployed the change.

-Phil

Re: [PATCH] migrating repl to a web worker with fallback a month ago

From Phil Hagelberg to ~technomancy/fennel

gbaptista <gbaptistas@protonmail.com> writes:

> This patch suggests using a Web Worker for the web REPL. We had an issue
> with the last one (https://lists.sr.ht/~technomancy/fennel/patches/12080).
>
> The problem was that we had missing files in the upload process inside
> the makefile. This patch solves these problems, and I improved it to
> ensure a compatible fallback for browsers that do not support Web
> Workers. Also, the shim.lua test still works.

Thanks for the fix! Turned out last time I mistakenly reported this as
working in Blink but it was probably because I forgot to clear the cache
and it was working with the previous version of some of the files.

Re: [PATCH] Handle Fedora Lua's different error truncation behavior a month ago

From Phil Hagelberg to ~technomancy/fennel

Michel Alexandre Salim <michel@michel-slm.name> writes:

> One of the Fennel core tests intentionally throws an error and tries
> to match it against an expected value.
>
> This breaks on Fedora's `lua` (but works with `luajit`) since the
> truncation behavior is different.

Thanks; applied and pushed!

Good luck with your packaging efforts.

-Phil

Re: Fwd: [PATCH] migrating repl to a web worker a month ago

From Phil Hagelberg to ~technomancy/fennel

Phil Hagelberg <phil@hagelb.org> writes:

>> This patch suggests using a Web Worker for the web REPL. I tried to
>> modify as little code as possible.
>
> Hey sorry for the delay on this; I'm not too savvy about web workers and
> stuff but I don't know if we'll get any other review so I just went
> ahead and applied it; we'll see how it goes.

Shoot; actually I spoke too soon--this causes the repl to break in
Luakit, so I had to revert it. I don't see any errors or anything; it
just shows "Loading..." and climbs up to 99% but never gets beyond that.

Not sure what's going on.

Re: Fwd: [PATCH] migrating repl to a web worker a month ago

From Phil Hagelberg to ~technomancy/fennel

> This patch suggests using a Web Worker for the web REPL. I tried to
> modify as little code as possible.

Hey sorry for the delay on this; I'm not too savvy about web workers and
stuff but I don't know if we'll get any other review so I just went
ahead and applied it; we'll see how it goes.

Thanks!

-Phil