~andreyorst

Moscow

https://andreyorst.gitlab.io/

I love Lisp and text editors!


#91 ,complete command is finicky 8 days ago

Comment by ~andreyorst on ~technomancy/fennel

I remember now - it was the opposite on the main branch: complete knew about the symbol, but the REPL was unable resolve it. Sorry for mixing up

#81 if returns zero values in case false branch is not specified 9 days ago

Comment by ~andreyorst on ~technomancy/fennel

Did a bit of testing, everything that uses if internally seems to work fine

#91 ,complete command is finicky 9 days ago

Comment by ~andreyorst on ~technomancy/fennel

So in this case the repl can successfully see the locals; it's just the completion doesn't see them?

Yes, seems like it.

And it happens to the same kind of modules as the other bug?

Yes, tested on the same module as in #85:

Welcome to Fennel 1.0.0-dev on Lua 5.4!
Use ,help to see available commands.
>> (local {: foo &as bug} (require :bug))
nil
>> ,complete f
for	fn
>> ,complete b
bor	bnot	bxor	band

After a bit more testing on main I wasn't able to reproduce it. Perhpaps it was fixed indirectly in some commit on main branch, so yeah, this is all on new-locals-saving

#91 ,complete command is finicky 9 days ago

Comment by ~andreyorst on ~technomancy/fennel

yes, the outputs up there are from that branch, I think I saw this on main branch as well though, but testing it now shows no issue on main. It's a bit weird, as I surely remember encountering it before

#91 ,complete command is finicky 9 days ago

Ticket created by ~andreyorst on ~technomancy/fennel

I've noticed that not all locals are being available to the ,complete command.

For example:

Welcome to Fennel 1.0.0-dev on Lua 5.4!
Use ,help to see available commands.
>> (local lazy (require :lazy-seq))
nil
>> ,complete l
lua	length	local	let	lshift	lambda	load	loadfile
>> ,complete la
lambda

I can't figure out what's causing it, but some times it just works, and some times it don't.

Welcome to Fennel 1.0.0-dev on Lua 5.4!
Use ,help to see available commands.
>> (local {: map : filter &as lazy} (require :lazy-seq))
nil
>> ,complete m
macros	macrodebug	macro	match	map	math
>> ,complete f
fn	for	filter
>> ,complete l
lua	length	let	lshift	local	lambda	loadfile	load
>> (local {: map : filter : doall &as lazy} (require :lazy-seq))
nil
>> ,complete do
doc	do	doto	dofile

For example, this time there was map and filter, but no lazy and doall

#85 locals are lost in the repl after 2b4b31c6 9 days ago

Comment by ~andreyorst on ~technomancy/fennel

this branch seems working fine!

#85 locals are lost in the repl after 2b4b31c6 10 days ago

Comment by ~andreyorst on ~technomancy/fennel

For me the minimal repro was to require a file with the following contents:

(fn foo [] :foo)

{: foo}

As per:

Welcome to Fennel 0.10.1-dev on Lua 5.4!
Use ,help to see available commands.
Try installing readline via luarocks for a better repl experience.
>> (local {: foo} (require :bug))
nil
>> foo
nil

I believe that's as minimal as it can get.

Interestingly enough, this doesn't happen if I put {:foo (fn [] :foo)} into that file instead, or if I put (local ns {}) (fn ns.foo [] :foo) ns into that file.

#85 locals are lost in the repl after 2b4b31c6 11 days ago

Comment by ~andreyorst on ~technomancy/fennel

~technomancy, what do we need to fix this?

#83 (values) gives weird results on boolean operators 19 days ago

Comment by ~andreyorst on ~technomancy/fennel

probably

(and 1 (values 2 3) 4) -> (and 1 2 4)

edit:

huh apparently it works as expected:

>> (and true (values true true false) true true)
false

I've confused this with unpack behavior in operators

>> (and true (table.unpack [true false]) true)
true

#76 complete command returns unrelated items 19 days ago

Comment by ~andreyorst on ~technomancy/fennel

just realized that when parser macros would be a thing, writing @something would trigger the expansion in the repl process?