<Regenaxer>
(pop 'L) is now shorter and faster (++ L)
<Regenaxer>
cause it is so often needed
<aw->
(++ L) ?
<Regenaxer>
yes :)
<Regenaxer>
24nov16
<Regenaxer>
src/sym.c
<Regenaxer>
{src64,pilos/src}/glob.l
<Regenaxer>
{src64,pilos/src}/sym.l
<Regenaxer>
'++' function
<Regenaxer>
src/pico.h
<Regenaxer>
src/tab.c
<Regenaxer>
mini/src/sym.c
<Regenaxer>
mini/src/init.s
<Regenaxer>
ersatz/fun.src
<Regenaxer>
doc/ref.html
<Regenaxer>
...
<aw->
new function?
<Regenaxer>
Not so new
<aw->
ok..
<aw->
i don't understand what you're trying to say
<aw->
i should use (++ L) instead of (pop 'L) ?
<Regenaxer>
Exactly, that's what '++' is for
<Regenaxer>
Smaller and faster
<Regenaxer>
2 cells vs. 3 cells
<Regenaxer>
No evaluation
<aw->
hmm
<aw->
but the doc says "(++ Lst) is equivalent to (pop 'Lst)"
<Regenaxer>
Yes. But in fact it works also with 'L' instead of 'Lst'
<aw->
ok
<Regenaxer>
No big thing
<aw->
what's the fastest way to count the number of occurrences of a char in a list ?
<aw->
(cnt ... Lst) ?
<Regenaxer>
'sum'
<Regenaxer>
yes
<Regenaxer>
'cnt' is better
<aw->
(cnt '((N) (= N "a")) Lst) ?
<aw->
doesn't feel right
<Regenaxer>
yes, or (cnt = List '("a"))
<Regenaxer>
oops
<Regenaxer>
(cnt = List '("a" .)) I mean
<aw->
interesting
<aw->
that's a bit faster
<Regenaxer>
yes, because no additional function call overhead
<Regenaxer>
'((N) ..) is quite expensive
<aw->
i see
<aw->
ok thanks! time to go home now :)
<Regenaxer>
Good night! :)
<aw->
should probably take a day off... haha
<Regenaxer>
Always a good idea
aw- has quit [Quit: Leaving.]
alexshendi has joined #picolisp
orivej has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
alexshendi has quit [Ping timeout: 256 seconds]
<beneroth>
tankf33der, thanks! seems interesting.
<beneroth>
@CSV parsing: yeah, (split) and (line) is only good for pretty small imports. for large imports with possibly hundreds of columns, I'm also using (till) and (peek) and a short FSM using (state)