~xordspar0

Minneapolis, MN

Recent activity

Re: what are the dependencies? build not working 5 months ago

From Jordan Christiansen to ~sircmpwn/public-inbox

 > /usr/bin/ld: cannot find -lc: No such file or directory

-lc is for linking to the standard C library. Something must be wrong 
with your build setup. What system are you using? On Debian you can 
just do `apt install build-essential`.

[PATCH antifennel v2] Mangle early returns in more cases. 7 months ago

From Jordan Christiansen to ~technomancy/fennel

Antifennel does not mangle variables in cases that it considers simple. This
previously included all identifiers. But some identifiers need to be mangled.
For example, antifennel will convert a Lua variable called someVar to some-var
in the Fennel output. An early return that refers to some-var will need to
re-mangle this variable to make it valid in Lua. See the new test case for a
full example.
---

This revision leaves out test/fennel.lua, which had autogenerated
changes unrelated to the patch.

 anticompiler.fnl  |  4 ++--
 test.lua          |  9 +++++++++
 test_expected.fnl | 10 ++++++++++
[message trimmed]

[PATCH antifennel] Mangle early returns in more cases. 7 months ago

From Jordan Christiansen to ~technomancy/fennel

Antifennel does not mangle variables in cases that it considers simple. This
previously included all identifiers. But some identifiers need to be mangled.
For example, antifennel will convert a Lua variable called someVar to some-var
in the Fennel output. An early return that refers to some-var will need to
re-mangle this variable to make it valid in Lua. See the new test case for a
full example.
---

Should I have committed this autogenerated change to test/fennel.lua? I think
it's only table field order changes. I can leave that out and submit a v2
patch if necessary.

 anticompiler.fnl  |  4 +--
 test.lua          |  9 +++++
[message trimmed]

Re: [PATCH antifennel] Fix reserved word mangling 7 months ago

From Jordan Christiansen to ~technomancy/fennel

On Fri, Jan 7, 2022 at 10:06 pm, Phil Hagelberg <phil@hagelb.org> wrote:

> Great catch; thanks! Applied and pushed, with a little tweak to the 
> test
> to make it a little more thorough.

That is a good addition to the test. Thanks for the review and merge!

[PATCH fennel] Add an example of (lua ...) with mangling 7 months ago

From Jordan Christiansen to ~technomancy/fennel

---
 reference.md | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/reference.md b/reference.md
index cb64ef5..2dea3e0 100644
--- a/reference.md
+++ b/reference.md
@@ -1370,7 +1370,20 @@ however note that it must refer to the names after mangling has been
done, because the identifiers must be valid Lua. The Fennel compiler
will emit `foo-bar` as `foo_bar` in the Lua output in order for it to
be valid. When in doubt, inspect the compiler output to see what it
looks like.
looks like. For example the following Fennel code:
[message trimmed]

[PATCH antifennel] Fix reserved word mangling 7 months ago

From Jordan Christiansen to ~technomancy/fennel

Previously, reserved words like match would get mangled to ___match-__.
While this is technically valid, it's a really strange variable name.
The new mangling logic produces the intended ___match___.
---
 antifennel.lua          | 7 +++++--
 antifennel_expected.fnl | 7 ++++---
 test.lua                | 5 +++++
 test_expected.fnl       | 5 +++++
 4 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/antifennel.lua b/antifennel.lua
index 680473b..593bbe4 100644
--- a/antifennel.lua
+++ b/antifennel.lua
[message trimmed]

Re: [fennel/patches/.build.yml] build failed 7 months ago

From Jordan Christiansen to ~technomancy/fennel

Sorry, wrong subject line. I'll resubmit this.

[PATCH fennel] Fix reserved word mangling 7 months ago

From Jordan Christiansen to ~technomancy/fennel

Previously, reserved words like match would get mangled to ___match-__.
While this is technically valid, it's a really strange variable name.
The new mangling logic produces the intended ___match___.
---
 antifennel.lua          | 7 +++++--
 antifennel_expected.fnl | 7 ++++---
 test.lua                | 5 +++++
 test_expected.fnl       | 5 +++++
 4 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/antifennel.lua b/antifennel.lua
index 680473b..593bbe4 100644
--- a/antifennel.lua
+++ b/antifennel.lua
[message trimmed]

Re: [PATCH fennel v2] Add an error message to fennel.searcher 7 months ago

From Jordan Christiansen to ~technomancy/fennel

On Wed, Jan 5, 2022 at 8:14 am, Phil Hagelberg <phil@hagelb.org> wrote:

> The nested match makes me think it could be a good use case for the
> nested error handling variant of match we've been talking about.

Yes, I noticed that too!

> I've applied and pushed.

Thanks!

[PATCH fennel v2] Add an error message to fennel.searcher 7 months ago

From Jordan Christiansen to ~technomancy/fennel

This adds the paths that Fennel checked to the error output if a module
is not found:

    >> (require :nope)
    runtime error: module 'nope' not found:
    	no field package.preload['nope']
    	no file '/usr/local/share/lua/5.3/nope.lua'
    	no file '/usr/local/share/lua/5.3/nope/init.lua'
    	...
    	no file './nope.fnl'
    	no file './nope/init.fnl'
---
This revision fixes inconsistencies between Lua versions and adds a test.
[message trimmed]