<Hunar>
Regenaxer I only meant to install pil64 for a minute, I saw that length of (all) in pil21 is more than double the length of (all) in the old pil64..
<Regenaxer>
razzy, good!
<Regenaxer>
Hunar, I see :)
<Regenaxer>
Really such a diff in length?
<Regenaxer>
Must be debug stuff
<razzy>
I could show web search from vip and we could do some funny advent of code task.
<Regenaxer>
o
<Regenaxer>
ok
<razzy>
have some eggnog :]
<Regenaxer>
eggnog? ;)
<razzy>
Regenaxer: alcoholic beverage known in christmas theme.
<Regenaxer>
Ah
<Regenaxer>
good idea ;)
<Hunar>
Question :) I'm testing/editing some canvas examples but the process is very tedious .. I change something in the code (for now I prefer editing a file instead of using repl) , then stop the server and restart it .. then change the address from localhost:alotofothernumbers to localhost:8000 then I see my update .. I thought it automatically
<Hunar>
updates when I change/save the source file :(
<Regenaxer>
Usually yes, but some files are loaded at startup
<Regenaxer>
in main.l
<Regenaxer>
Do you use the "zappel" example?
<Hunar>
No, I used (A Minimal Example)
<Hunar>
Is there a way I can make the edit-file/see-update loop easier?
<Regenaxer>
yes, 'load' the file you changed
<Regenaxer>
or ^E in Vip
<Regenaxer>
:l loads the file, and ^E on a (de ...) redefines that function
<Regenaxer>
What do you mean with the minimal example?
<Regenaxer>
"A Minimal PicoLisp DB/GUI Application" in the wiki?
<Hunar>
I tried vip canvas.l and ^E on the lines that start a server but didn't work .. then opened vip and :l canvas.l but it didn't find the file
<Regenaxer>
(de canvasTest
<Regenaxer>
:l takes no args
<Regenaxer>
ok
<Regenaxer>
when you have the prompt in the running app
<Regenaxer>
then do (vi 'canvasTest)
<Regenaxer>
modify it
<Regenaxer>
then ^E
<Regenaxer>
and reload the browser window
<Hunar>
:D
<Regenaxer>
This example is minimal, so not conveneit for debugging perhaps
<Hunar>
I didn't even need to reload the browser
<Regenaxer>
ok :)
<Hunar>
It worked :)
<Regenaxer>
great
<Regenaxer>
Normally simply loading the whole file works
<Regenaxer>
but here it starts 'server' in the end
<Regenaxer>
so not a good idea
<Regenaxer>
to load all I mean
<Hunar>
What would be a good idea :) since I couldn't start the server inside vip canvas.l
<Regenaxer>
Look at normal applications
<Regenaxer>
separating into files
<Regenaxer>
with 'main' and 'go' functions etc
<Hunar>
Ah ok
<Hunar>
one extra question, I thought (vi 'canvasTest) would only open that function, but it opened the whole file
<Regenaxer>
Editing is always on a file
<Regenaxer>
but (v canvasTest) makes a temp file
<Regenaxer>
same as (vi '(canvasTest))
<Hunar>
Thanks :)
<Regenaxer>
So (v canvasTest) is perhaps even better for short tests
<Hunar>
Is there a profiler for pil? I never used it in any language but it looks cool, the thing that tells you how much time was spent on each line of code to see bottlenecks
<Regenaxer>
There *was* one in pil32/pil64 in pico/lib/prof.l
<Regenaxer>
I never found it really useful
<Regenaxer>
It profiles function calls of course, not "lines" ;)
<Hunar>
:)
schulze has joined #picolisp
razzy has quit [Ping timeout: 268 seconds]
razzy has joined #picolisp
<Hunar>
A problem occurred :( I have this http://ix.io/3IVm opened it with pil canvas.l + then in browser opened localhost:8000 then (vi 'move) the problem here occurs when I try to edit anything, press i and as soon as the drawCanvas updates (which in this example is every 1 second) the screen fills with a (chop)ed version of
<Hunar>
the drawCanvas function and the server stops
<Regenaxer>
No idea, haven't tried to debug canvas running in the background
<Regenaxer>
Generally I do qz before I run a gui update
<Regenaxer>
and (v) to continue
<Regenaxer>
We could look at that in PilCon
<Regenaxer>
I don't have time now
<Hunar>
No problem i'm not in hurry .. I almost never have time for pilcon :(
<Regenaxer>
:(
<Regenaxer>
I'm with customer atm
<Regenaxer>
Try to find out what goes wrong
<Regenaxer>
As I said, better suspend Vip when refreshing the GUI in general
<Hunar>
Good luck :)
<Regenaxer>
It always overwrites stuff with "redefined" messages etc.
<Regenaxer>
Also (debug 'foo) works only in the real REPL
<Regenaxer>
anyway, good luck for you too! :)
<Regenaxer>
You will find out ;)
<Hunar>
I found something.. this problem occurs only when I have a function call from within drawCanvas so (csFillRect 10 10 10 30) is fine but (csFillRect (move) 10 10 30) is bad .. I'll be back in an hour
razzy has quit [Ping timeout: 240 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 268 seconds]
<Regenaxer>
Hmm, beneroth's server is still down (?)
razzy has joined #picolisp
<Regenaxer>
Can we do PilCon then?
<Regenaxer>
or go to the default server meet.jit.si?
beneroth has joined #picolisp
<Regenaxer>
Ah, hi beneroth!
<Regenaxer>
(I just wrote a mail ;)
<beneroth>
heya
<Regenaxer>
o/
<beneroth>
yeah, it is still down. Should be ready for PilCon though
<Regenaxer>
Great! Thanks
<beneroth>
updating it (log4j) did break it, and yesterday I was traveling around :(
<Regenaxer>
oh
beneroth has quit [Quit: Leaving]
beneroth has joined #picolisp
<Regenaxer>
Thanks beneroth, seems to work! :)
<beneroth>
great!
<beneroth>
could you test with someone else or with two devices?
<Regenaxer>
See you in PilCon today?
<Regenaxer>
yes
<beneroth>
probably yes
<beneroth>
good, thank you!
<Regenaxer>
razzy here?
<Regenaxer>
or, even betterq I try with 2 clients
<Regenaxer>
hmm, Jitsi/Android does not seem to work
<Regenaxer>
Firefox/Debian seems ok
<beneroth>
hmmm ok
<beneroth>
afaik Firefox works currently best, there were some issues with chrome and screen sharing, but might be changed again now with updates
Hunar has quit [Quit: Client closed]
<beneroth>
I'll try to look into the android issue later
<beneroth>
thank you
<Regenaxer>
Jitsi changes a lot
<Regenaxer>
(good thing)
<beneroth>
well.. it's the only software I have trouble with when updating...
<Regenaxer>
oha ;)
razzy has quit [Ping timeout: 245 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 260 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 240 seconds]
razzy has joined #picolisp
<Regenaxer>
razzy: Can you try to connect to PilCon?
<Regenaxer>
beneroth changed the server
razzy has quit [Ping timeout: 260 seconds]
razzy has joined #picolisp
<razzy>
Regenaxer: here. will try
<Regenaxer>
thanks
<razzy>
am I alone?
<Regenaxer>
hmm, me too :(
<Regenaxer>
Same Link as always
<razzy>
link as in mail
<Regenaxer>
yes
<razzy>
I am from debian phone. i will switch to proper desktop.
<Regenaxer>
I also try with Android client again
<Regenaxer>
it just hangs
<razzy>
I also installed many firewals :D
<Regenaxer>
I think this is not the problem
<Regenaxer>
We will have to wait for beneroth a little
<razzy>
yep
<Regenaxer>
still enough time
<razzy>
I am bragging about my setup
<Regenaxer>
problem?
<razzy>
no problem
<Regenaxer>
ok :)
rob_w has quit [Ping timeout: 256 seconds]
aw- has quit [Quit: Leaving.]
<beneroth>
Regenaxer, razzy in firefox it works, only using the android app is not working, correct?
<Regenaxer>
Probably because libraries from GNU are used
<Regenaxer>
the runtime libs
<Regenaxer>
this must be the reason, yes
<Regenaxer>
Excuse my bad memory
<Hunar>
yeah, I agree
<Hunar>
no worries
<Regenaxer>
:)
<Regenaxer>
MIT would be better, but here GPL is needed
<Hunar>
Cool :)
<Hunar>
I'll go now, This pilcon was nice... Good night :D
<Regenaxer>
Good night Hunar! :)
Hunar has quit [Quit: Client closed]
<Regenaxer>
I stop for today too
razzy has quit [Ping timeout: 252 seconds]
razzy has joined #picolisp
<Regenaxer>
Ah, now the best solution for the 3-sums came to me!
<Regenaxer>
We *can* use 'cnt'! :)
<Regenaxer>
(cnt '((A B C D E F) (> (+ D E F) (+ A B C))) A (cdr A) (cddr A) (cdr A) (cddr A) (cdddr A))
<Regenaxer>
This is much nicer :)
<razzy>
I am thinking about using nth.
<Regenaxer>
I think nth is not helpful here
<Regenaxer>
and very expensive if you traverse the lists many times
<Regenaxer>
What I wanted is to use 'cnt' directly, because a count is what we need
<Regenaxer>
And with 6 separate traversals above we avoid the 'head' and the 'apply' which are both expensive
<Regenaxer>
Would be interesting to 'bench' the individual soulutions
<Regenaxer>
I think the 'cnt' above is fastest and smallest
<razzy>
i am thinking pop and nth on lisp
<razzy>
*list
<Regenaxer>
good, you should try it
<Regenaxer>
But 'pop' is also slower that direct mapping I think
<Regenaxer>
Can you once try the cnt above if it is at least correct? I have no test data
<Regenaxer>
I think it can be simplified
<razzy>
too many A i think.
<Regenaxer>
4 instead of 6 arguments
<Regenaxer>
yes
<Regenaxer>
'A' was not good for the list
<Regenaxer>
should be 'L'
<razzy>
will test
<Regenaxer>
Let me rewrite first
<Regenaxer>
(cnt '((A B C D) (> (+ B C D) (+ A B C))) L (cdr L) (cddr L) (cdddr L))
<Regenaxer>
This looks best :)
<Regenaxer>
I think it will be the shortest of all adventOfCode solutions ;)
<Regenaxer>
Surround this by (let L
<Regenaxer>
(let L (in "file" (make (while (read) (link @)))) (cnt ... (cdddr L)))
<razzy>
Regenaxer: people solve it with 7 characters in custom languages :]
<Regenaxer>
ok, very specialized
<Regenaxer>
Kind of byte code?
<razzy>
overfitted
<razzy>
i think so
<razzy>
Regenaxer: you are correct.
<Regenaxer>
for the speed?
<razzy>
you code gives correct answer.
<Regenaxer>
ah, cool, thanks!
<razzy>
I was afraid that adventofcode was bad idea at PilCon :]
<Regenaxer>
It was very interesting
<Regenaxer>
We could do next time again, if the tasks are not getting too difficult
<razzy>
I will prepare it better, maybe hilight best solutions from last time. I think advent goes to core competence at programming. speed when you got results.