~technomancy

WA, USA

https://technomancy.us

tryin' to catch the last train out of Omelas

Trackers

~technomancy/fennel

Last active a day ago

#228 Parse without load 18 days ago

Comment by ~technomancy on ~technomancy/fennel

You're right; great catch. I've merged the parse-no-load branch and applied the suggested change. Benchmarking does not appear to show any noticeable difference between the two strategies. Thanks for your help here!

REPORTED RESOLVED IMPLEMENTED

#228 Parse without load 19 days ago

Comment by ~technomancy on ~technomancy/fennel

Aha, yeah of course. That makes sense.

However, I've merged in the latest main, and there is still a test failure:

(parse= "\x7F" "\"\\u{7f}\"")

I've pushed the merged branch out to parse-no-load if you want to take a look. If not, I'll see about getting to it later! Thanks.

#47 unnecessary-tset lint is hard to understand 21 days ago

Comment by ~technomancy on ~xerool/fennel-ls

Oh cool; yeah that is a good idea to have a kind of lint index page.

#47 unnecessary-tset lint is hard to understand 21 days ago

Comment by ~technomancy on ~xerool/fennel-ls

When you're using it in --lint mode, we need to keep things on one line. We could improve the description, but adding an example is probably not viable in that context.

When you're using it as an LSP server, the code actions system demonstrates what the fix looks like, so that should help.

#247 Accessing the AST of the current macro and its uses (`assert-compile`) 21 days ago

Comment by ~technomancy on ~technomancy/fennel

I think this is actually already done. But if I'm wrong, we can reopen if there's more to discuss.

REPORTED RESOLVED CLOSED

#258 Errors from macros include compiler in trace 21 days ago

Comment by ~technomancy on ~technomancy/fennel

Fixed in 32ce78e.

REPORTED RESOLVED FIXED

#255 Support loading macros from .fnlm files 24 days ago

Comment by ~technomancy on ~technomancy/fennel

Implemented in acbdc71.

REPORTED RESOLVED IMPLEMENTED

#258 Errors from macros include compiler in trace 24 days ago

enhancement added by ~technomancy on ~technomancy/fennel

#258 Errors from macros include compiler in trace 24 days ago

macros added by ~technomancy on ~technomancy/fennel

#258 Errors from macros include compiler in trace 24 days ago

Ticket created by ~technomancy on ~technomancy/fennel

m.fnl:

{:f (fn [x]
      (assert-compile x.y "oh no" x)
      "hey")}

scratch.fnl:

(import-macros m :m)

(print (m.f {}))
scratch.fnl:3:7: Compile error: scratch.fnl:3:12: Compile error: oh no

(print (m.f {}))
stack traceback:
	[C]: in function 'error'
	/home/phil/bin/fennel:4310: in function 'fennel.friend.assert-compile'
	/home/phil/bin/fennel:2860: in function 'fennel.compiler.assert'
	./m.fnl:2: in function <./m.fnl:1>
	(...tail calls...)
	[C]: in function 'xpcall'
	/home/phil/bin/fennel:3403: in function 'fennel.compiler.macroexpand'
	/home/phil/bin/fennel:3610: in function 'fennel.compiler.compile1'
	/home/phil/bin/fennel:3466: in function </home/phil/bin/fennel:3452>
	(...tail calls...)
	/home/phil/bin/fennel:3943: in function </home/phil/bin/fennel:3922>
	(...tail calls...)
	/home/phil/bin/fennel:6093: in function 'fennel.eval'
	(...tail calls...)
	[C]: in function 'xpcall'
	/home/phil/bin/fennel:6989: in function </home/phil/bin/fennel:6983>
	(...tail calls...)
	[C]: in ?

(print (m.f {}))

We want to see some level of stack trace, but littering it with compiler internals obscures the real problem.