~technomancy

WA, USA

https://technomancy.us

tryin' to catch the last train out of Omelas

~technomancy/fennel

Last active 17 days ago
View more

Recent activity

Re: Fennel -> Hammerspoon repl 19 days 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 22 days 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 25 days 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 26 days 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 28 days 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 29 days 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 29 days 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

[PATCH] Add plugin system, take 2. 30 days ago

From Phil Hagelberg to ~technomancy/fennel

This is roughly the same as the previous take on the plugin system,
which was based on the pre-self-hosted compiler.

Each plugin is a module which contains functions for various extension
points within the compiler. Each field in the module is named after an
extension point and should be a function that takes AST arguments and
a scope table. Current supported extension points are:

* symbol-to-expression
* call
* destructure
* do
* fn
[message trimmed]

The next Fennel version a month ago

From Phil Hagelberg to ~technomancy/fennel

Hello Fennelers!

I wanted to write up what I've been thinking about the next
release. There have been a few nice bug fixes on the main branch
recently, but there are two main big new features that will be the
highlights of 0.6.0:

The first is something we've been thinking about for a while: the plugin
API. We want a way to extend the compiler beyond just macros. With the
plugin API, you can define callbacks which will get hit at certain
points in the compilation cycle.

One example of how that could be used is for linting. This module shows
how a linter could check for certain problems like unused locals or

[PATCH] First pass of restricted compiler environment. a month ago

From Phil Hagelberg to ~technomancy/fennel

This patch adds support for sandboxing the compiler as well as regular
execution. Previously there was no way to safely accept arbitrary
input since sandboxing would only apply to the compiled code, not to
macros and eval-compiler.

However, suddenly disallowing access to globals in compiler scope
would be a breaking change, so instead what we're doing is allowing
unsafe things thru but emitting a warning. In the future once we can
make a breaking change, (maybe for 1.0?) that warning will be changed
to an error.

The most awkward part about this change is that we have to allow
`require` because of a quirk in how we compile metadata; the compiled
code requires the fennel module and sets the docstring on the metadata
[message trimmed]