<Nistur>
(if you couldn't guess, the last bits were typed with the prototype :P
<Nistur>
)
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
<Regenaxer>
Wow! So fast!
<Regenaxer>
impressing :)
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
<Nistur>
:P The code is currently the most naive C code I've ever written, and just checks the rising edge of the buttons and outputs the basic keys. So next I have to figure out how I'm going to do chords... and arpeggios on a device where I Cannot time things properly
<Regenaxer>
Cool
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
<Nistur>
chords work :P
<Nistur>
feeeeeeeeee
<Nistur>
I just need to set them all up :P
<Regenaxer>
:)
<Nistur>
... but I need to do actual work now :P
<Regenaxer>
That's life
orivej has quit [Quit: No Ping reply in 180 seconds.]
<beneroth>
Nistur, impressive, really cool :)
<beneroth>
wow :D
orivej has joined #picolisp
<beneroth>
Regenaxer, (let (A NIL B NIL C NIL) ...) or (use (A B C) (off A B C) ...)
<beneroth>
?
<Regenaxer>
I also often wonder ...
<Regenaxer>
I use the first usually
<beneroth>
I would say let, should be one cell less
<Regenaxer>
yes
<beneroth>
but the second might be more readable, sometimes...
<Regenaxer>
And the rule is, less cells is better
<Regenaxer>
8 vs. 10
<beneroth>
I have rarely use for (use), it happens, but 90% or so I need (let)
<Regenaxer>
Same here
<beneroth>
alright
<Nistur>
beneroth: \o/
<beneroth>
\o/
orivej has quit [Ping timeout: 265 seconds]
<Nistur>
and... just because... sein rad flog zum pkw
orivej has joined #picolisp
<Regenaxer>
Perfect
<Nistur>
typing 3+ keys on these tiny buttons is near impossible though :P
<Nistur>
but it works
<Nistur>
I'm looking forward to getting the actual keyswitches I'll be using :P
<Regenaxer>
tankf33der, the problem with pil21 on 32 bits is the same as with pil32 on 64 bits etc.
<Regenaxer>
It is the assumption of word size equals pointer size in PicoLisp
<Regenaxer>
the 'any' data type
<Regenaxer>
all uniform
<beneroth>
so pil21 only runs on 64bit architectures, I understand correctly?
<beneroth>
I guess we sill have emu for 32bit
<Regenaxer>
Yes, a pity, but I see no good way
<beneroth>
only other way would mean to have two llvm implementations?
<beneroth>
a llvm emu, kinda?
<Regenaxer>
Emu works, but I want to stop support for pil64 in the long range
<Regenaxer>
hmm, not sure
orivej_ has joined #picolisp
orivej has quit [Ping timeout: 272 seconds]
<beneroth>
just theorizing
<Regenaxer>
Best would be to fix pil21 in a way that the size issue is taken care of
<beneroth>
yeah well maybe we can keep pil64 maintained, but maybe you don't have to do it
<beneroth>
for better performance / green IT reasons :P
<Regenaxer>
The question is also if we need emu
<beneroth>
T
<Regenaxer>
in the long range
<beneroth>
hard to say yet
<Regenaxer>
I needed it only for PilBox
<beneroth>
other question
<Regenaxer>
but now all devices are 64 bit
<beneroth>
when using (catch) to catch an error issued with (quit Arg1 Arg2), we can get Arg1 from *Msg
<beneroth>
but we cannot get Arg2, Arg2 is lost, right?
<Regenaxer>
Not sure atm, how about the value of '^'?
<Regenaxer>
It has the full expression
<Regenaxer>
and bt / trail also has infos and bindings
m_mans2 has joined #picolisp
<Regenaxer>
Forgot the details atm
m_mans2 has left #picolisp [#picolisp]
<beneroth>
^ seems to be NIL
m_mans has joined #picolisp
<beneroth>
after catching
<Regenaxer>
But as you use 'quit' (not a normal error), you can save it in a global
<Regenaxer>
^ is NIL sometimes, and sometimes not
<beneroth>
what should I use for normal errors instead of (quit) ?
<beneroth>
but right, I should use it for event handling..
<beneroth>
use case is a validation function
<Regenaxer>
(quit) is fine
<Regenaxer>
"normal" meant thrown by the runtime system
<beneroth>
ah okay
<Regenaxer>
not explicitly
<beneroth>
I have two use cases where this validation function is called, one where we want to quit directly, and one where we want to quit but with (file) as second argument to quit
<beneroth>
(once to validate REPL input, once to validate file content)
<Regenaxer>
ok
<beneroth>
so in the case where I catch the error, I'm not interested in the Arg2 anyway
<beneroth>
just wanted to ask that it is really the case that Arg2 cannot be accessed after (catch)ing
<beneroth>
seems so
<Regenaxer>
yes, I checked the source, it is only printed
<beneroth>
thank you for checking! :)
<beneroth>
Regenaxer, I guess neither (throw) nor (quit) are especially expensive in picolisp (especially when not in debug mode) ?
<Regenaxer>
Debug mode does not influence it
<Regenaxer>
and yes, not expensive
<beneroth>
asking because in other languages "exception handling" is deemed pretty expensive, because they carry the stacktrace around
<Regenaxer>
what is expensive is 'catch'
<Regenaxer>
yes
<beneroth>
<Regenaxer> what is expensive is 'catch'
<Regenaxer>
'catch' builds a stack frame
<Regenaxer>
it copies memory ranges
<beneroth>
because of setting up the checking all errors environment?
<Regenaxer>
yes
<beneroth>
yeah, necessary
<Regenaxer>
setting up
<Regenaxer>
no special checks
<Regenaxer>
but still it is fast
<beneroth>
yeah I see
<Regenaxer>
processors have a memcpy instruction
<Regenaxer>
Starting a coroutine is similar
<Regenaxer>
and yield too
<Regenaxer>
similar to catch
<beneroth>
I guess (catch) could be made (relatively) cheaper by extra permanent overhead (that is what most runtimes do)
<beneroth>
ah I see
<beneroth>
most of those memcpy will probably be implemented as copy-on-write anyway
<Regenaxer>
I think it cannot be made cheaper
<Regenaxer>
copy-on-write is system
<Regenaxer>
here we are in user space
<Regenaxer>
so it is indeed copied
<beneroth>
yes I'm aware
<Regenaxer>
to/from stack
<beneroth>
ah
<beneroth>
in our vm stack
<beneroth>
ok I see
<beneroth>
thanks!
<Regenaxer>
Throw is also expensive
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
<Regenaxer>
it closes files and unbinds variables
<Regenaxer>
(if necessary only)
<beneroth>
well the intended usage for throw is to goto out of deep nesting, like goto is used in nested loops in C
<beneroth>
right?
<beneroth>
ah right
<beneroth>
finally
<beneroth>
it is handy :)
<Regenaxer>
It is more like long jump in C
orivej has joined #picolisp
<Regenaxer>
finally is in addition to that, yes
<Regenaxer>
but closing files etc is implicit
<beneroth>
yes and I think it is beautiful
<Regenaxer>
(catch ... (in ... (out ... (throw
<beneroth>
I think I only used (finally) once yet, in combination with (abort)
<beneroth>
if I remember correctly, unsure
<Regenaxer>
yes, abort has it implicit
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
aw- has quit [Quit: Leaving.]
aw- has joined #picolisp
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
<Nistur>
I just had my daily zoom meeting, in which one of my colleagues was rambling on about something non-work related... so...
<Nistur>
I implemented arpeggios, and shift mode :P
orivej has quit [Quit: No Ping reply in 180 seconds.]
<Nistur>
it doesn't detect _which_ arpeggios yet, just that one occurred, and assumes it's shift
orivej has joined #picolisp
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
<beneroth>
:)
<beneroth>
good way of working
<Nistur>
the code is currently _very_ hacky :P
<beneroth>
natural Work In Progress :-)
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
<tankf33der>
pil21 passed tests on centos8 under llvm8
<Regenaxer>
Great!
<tankf33der>
whats does it mean selfboot strap ?
<tankf33der>
it needs picolisp to generate .ll files.
<Regenaxer>
right
<Regenaxer>
src/Makefile now calls ../pil
<tankf33der>
ok
orivej has quit [Ping timeout: 246 seconds]
<Regenaxer>
before it was the global pil, assuming an installation
<Regenaxer>
hehe, what I said yesterday. Had that too, but could not reproduce. A character is lost
<Regenaxer>
Probably it was "any"
<Regenaxer>
Bug in pil21
<Regenaxer>
No idea where exactly
<Regenaxer>
Ha!! Now I found the problem with .inputrc
<Regenaxer>
If I have "set keymap vi-command" and then "TAB: menu-complete", the latter is ignored
<Regenaxer>
I debug the "ny" issue
<Regenaxer>
Happened here toi
<Regenaxer>
too
<Regenaxer>
always line 508 in big.l
<Regenaxer>
Hmm, disappears when I try to trace it
<Regenaxer>
Heisenbug
<tankf33der>
i can find the commit when it appears
<Regenaxer>
Doesnt help
<Regenaxer>
It is the commit when Makefiles uses pil21
<Regenaxer>
It is a bug in pil21 of course
<Regenaxer>
With global pil it builds
<Regenaxer>
I cannot find it
<tankf33der>
no, i compile pil21 everyday
<Regenaxer>
pil21 has no debugging functions yet
<tankf33der>
first time for me it appears today
<Regenaxer>
Does not help
<Regenaxer>
This bug disappears
<Regenaxer>
Insert a line somewhere, and it disappears
<Regenaxer>
or start with pil +
<Regenaxer>
or anything
<Regenaxer>
It is a Heisenbug
orivej_ has joined #picolisp
<Regenaxer>
OK, perhaps we are now ready to tackle tankf33der's bug list
<Regenaxer>
'match' indeed hangs
<tankf33der>
please test first
<tankf33der>
very nasty
<Regenaxer>
Which one?
<tankf33der>
i meant test function hang
<Regenaxer>
yes, it is 'match' which hangs
<Regenaxer>
not 'test' itself
<tankf33der>
yes
<tankf33der>
this one
<tankf33der>
first block in file
<Regenaxer>
T
<tankf33der>
thanks
<Regenaxer>
Thanks for the reports!
<Regenaxer>
'match' should be easy to find
<Regenaxer>
not so long and rather simple
<tankf33der>
they are all simple
<Regenaxer>
Not sure
<Regenaxer>
You can try too
<Regenaxer>
OK, I know the reason for match
<Regenaxer>
match is tricky
<tankf33der>
i tried pils 64 and 21
<tankf33der>
impossible to understand details and code
<tankf33der>
any picolisp is hard.
<Regenaxer>
'match' fixed
<Regenaxer>
Next 'meta'
<Regenaxer>
(not important atm though, we should better fix the "ny" bug)
<tankf33der>
why i cant reproduce it on manjaro
<tankf33der>
centos ok
<Regenaxer>
I also can't reproduce it any more
<tankf33der>
void - bug
<Regenaxer>
It depends on some internal pointer perhaps
<Regenaxer>
Does not depend on cpu, os or such
<Regenaxer>
or llvm version
<tankf33der>
how it could be :)
<Regenaxer>
yeah
<Regenaxer>
really nasty
<Regenaxer>
cause we have no debug mode yet
<Regenaxer>
So I even don't know where it happens
<Regenaxer>
It is definitely in src/lib/llvm.l
<Regenaxer>
but "Bad type" is issued in many places
<Regenaxer>
One way is to modify 'quit', and use (up) to find out where it happened
<Regenaxer>
'meta' seems to work
<Regenaxer>
ok, have some other duty now
<Regenaxer>
will search for "ny" later
<Nistur>
Regenaxer: it looks like the AltGr mode might be difficult to support as-is. I might leave it out for now
<Regenaxer>
Is it different from the other modifiers?
<Nistur>
the other keys come down to two different types, simple characters, which are all single byte, or physical keys (ie home, insert etc)
<Nistur>
all the ones in AltGr seem to be multibyte
<Nistur>
and I cannot get the teensy keyboard library to do that... so I might need to do some coercion to get it to work
<Nistur>
at the same time, looking at them, I cannot see me using any of them any time soon. Maybe a few of them if I start typing in German, but that's not likely to be often :P
<Nistur>
so I'm wondering if I don't worry about it for now and just ensure everything else is working as expected
orivej_ has quit [Ping timeout: 265 seconds]
orivej has joined #picolisp
<Regenaxer>
Nistur, the Alt keys are also all single-char
<Regenaxer>
What *is* multi-char (string) is the Candidates stuff (Kanji input)
<Regenaxer>
The one you get with Ctrl-Space
<Regenaxer>
I just notice that PASTE does not repeat in Penti. Will fix that, don't know why I explicitly excluded these keys >= 0x100000
orivej_ has joined #picolisp
orivej has quit [Read error: Connection reset by peer]
orivej has joined #picolisp
orivej_ has quit [Read error: Connection reset by peer]
<Regenaxer>
Tomorrow I'l first implement (trail), so that we can behaps locate the "ny" bug when it happens again
<Regenaxer>
At the moment it is invisible again
orivej has quit [Quit: No Ping reply in 180 seconds.]