~xordspar0

Minneapolis, MN

Recent activity

Re: defer and @noreturn 1 year, 25 days ago

From Jordan Christiansen to ~sircmpwn/hare-users

Ok, thanks for the clarification! Also, for anyone else reading this, I 
think 6.6.22.10 is the relevant part of the spec:

If the invoked function’s result type has the @noreturn attribute, 
the call expression is considered to terminate.

defer and @noreturn 1 year, 29 days ago

From Jordan Christiansen to ~sircmpwn/hare-users

Does a deferred expression happen before calling into a @noreturn 
function, and if so, is this explicit in the spec? For instance, this 
program

	use bufio;
	use fmt;
	use os;
	use strings;

	export fn main() void = {
		const line = bufio::scanline(os::stdin)! as []u8;
		defer free(line);

		const line = strings::fromutf8(line);

Re: what are the dependencies? build not working 1 year, 6 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. 1 year, 8 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. 1 year, 8 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 1 year, 8 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 1 year, 8 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 1 year, 8 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 1 year, 8 months ago

From Jordan Christiansen to ~technomancy/fennel

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

[PATCH fennel] Fix reserved word mangling 1 year, 8 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]