ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Picolisp latest found at http://www.software-lab.de/down.html | check also http://www.picolisp.com for more information
pierpal has quit [Ping timeout: 240 seconds]
franco_ has joined #picolisp
<franco_> Hey! There has been some talk about doing tutorials on picolisp, so I wondered what part of picolisp was the hardest for you to understand? And maybe what are you struggling with right now?
orivej has quit [Ping timeout: 264 seconds]
pierpal has joined #picolisp
karswell has quit [Read error: Connection reset by peer]
karswell_ has joined #picolisp
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
karswell_ has quit [Remote host closed the connection]
karswell has joined #picolisp
orivej has joined #picolisp
aw- has joined #picolisp
franco_ has quit [Ping timeout: 252 seconds]
u0_a183 has joined #picolisp
<u0_a183> hello
<Regenaxer> Hi u0_a183
<Regenaxer> hehe, you want to address the question "does the termux community have any programming clubs", right? ;)
<Regenaxer> (just saw it in the other channel :)
<u0_a183> yes, that was me
<Regenaxer> ok :)
<u0_a183> i have no tech friends irl :(
<Regenaxer> Well, I would not say we have a programming club here
<Regenaxer> But we discuss programming issuse, yes
<u0_a183> i should install picolisp and learn it lol
<Regenaxer> yep :)
<Regenaxer> Easy on termux, apt install picolisp
<u0_a183> i've actually been using termux less... transfered some binaries to another terminal app
<u0_a183> time to read a tutorial i guess
<Regenaxer> u0_a183, what kind of programming do you want to do?
orivej has quit [Ping timeout: 260 seconds]
<u0_a183> hey. most my coding is C or simple scripts... i would like to learn lisp and other things...
<Regenaxer> good
<u0_a183> as a termux user not doing graphics has been a frustration... lol
<u0_a183> there was something called "pil" but i couldn't get it to run in the other ter,
<Regenaxer> Yes, pil is the startup script for picolisp. A simple wrapper
<Regenaxer> $ man pil
<Regenaxer> Normally you start it with '+' for debug mode:
<Regenaxer> $ pil +
<Regenaxer> You get an error message?
<u0_a183> i have to edit all those load paths, not just exec paths...
<Regenaxer> Why that? Because of the other terminal app?
<u0_a183> i'll run it undr termux for now!
<Regenaxer> That's the easiest, yes ;)
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
rob_w has joined #picolisp
<u0_a183> the manpage mentions (doc 'vi) but doc is undefined :/
<Regenaxer> You did not start in debug mode. Don't forget the '+' (see above)
<u0_a183> it works if you invoke with an "+" arg... that's weird
<Regenaxer> 'doc' is not needed in non-debug mode of course
<u0_a183> it works with pil + but not picolisp +
<Regenaxer> As I said, 'pil' is the wrapper startup script
<Regenaxer> you can't expect things to work if you do it differently as documented
<u0_a183> (version) works when invoked in different ways
<Regenaxer> T
<Regenaxer> built-in
<u0_a183> experimenting is kind of tiring...
<Regenaxer> What do you expect? Immediate enlightment?
<u0_a183> i better look at the actual intro again...
<Regenaxer> yeah, or the tutorial at https://software-lab.de/doc/tut.html
<u0_a183> strangely enough the official tutorial claims to not be a proper tutorial, more of a reference document... :/
<Regenaxer> :)
rob_w has quit [Remote host closed the connection]
beneroth has joined #picolisp
<aw-> "Immediate enlightment"
<aw-> i except this
<aw-> err
<aw-> damnit i totally blew my chance to be funny.
<aw-> carry-on
<Regenaxer> Hi aw-! :)
<u0_a183> nice to make your aquantaince
karswell has quit [Remote host closed the connection]
karswell has joined #picolisp
<aw-> hi
<u0_a183> hello aw-
<aw-> u0_a183: the problem with tech friends irl is you then learn to vocalize your complaints about tech. That's when your beard starts to turn grey.
<u0_a183> i tried reaching out to an older newbie on my shell account, but he got irritating for being a newbie...
<u0_a183> now, in regards to picolisp, i'm the annoying newbie!
<aw-> u0_a183: no worries
<aw-> beneroth can teach you a lot, he's patient and quite knowledgeable. Regenaxer as well
<aw-> Regenaxer: just curious, what is the price of 5KG rice in Germany? your wife must know
<u0_a183> picolisp is used to make webapps or something?
<Regenaxer> Yes, everything
<u0_a183> i've been using busybox httpd, android browsers with localhost bookmark, and simple scripts to view images/video/audio sometimes...
<cess11> Read up on 'in and 'out and leverage what you already know about POSIX shells and applications.
<beneroth> oh thanks aw-
<beneroth> hi u0_a183, welcome here :)
<u0_a183> speak of the devil, they say you know your stuff
<beneroth> it's Regenaxer stuff, to be precise
<beneroth> I just talk to lot here.
<beneroth> btw. will be on vacation the next two weeks
<beneroth> whats your fields of interests, u0_a183 ?
<u0_a183> uhh... i'm pretty useless really...
<beneroth> sounds more like lack of self-confidence, dude
<u0_a183> well, not for good reason :/
<u0_a183> *without
orivej has joined #picolisp
<beneroth> u0_a183, papperlapapp. don't give yourself up, create the opportunities you need.
<beneroth> Regenaxer, aw-, apparently the Japanese emperor (correct title?) changes end of 2018, which also resets the Japanese calendar, creating IT problems?
<Regenaxer> yes
<Regenaxer> So they think of keeping the Heisei era forever! Ugly
<Regenaxer> They should really use Gregorian calender fully
<aw-> it's not the first time the calendar resets.. and it's only the year, they can handle it
<aw-> what worries me more if they want to create another "official holiday" during Golden Week.. creating possibly 2 full weeks of golden week vacation.
<aw-> the holiday to celebrate the emperor who's stepping down
<beneroth> so given enough emperors passed, it is holidays all year? :D
rob_w has joined #picolisp
<Regenaxer> haha, yesss
<aw-> beneroth: exactly
<aw-> "golden week" is already a mess.. it's now almost 2 weeks
<Regenaxer> When I was in Japan, it used to be exactly 5 days
<aw-> so with this emperor's decision to make a holiday in between that, we could end up with 2 weeks without access to Banks, Govnt, Heathcare, and other services..
<u0_a183> don't you love your emperor?
<aw-> Regenaxer: sales tax rate will also be 10% next year.. double from a few years ago
<Regenaxer> I see. Started with 3% initially
<aw-> they promised it was temporary increase ;)
<Regenaxer> haha
<u0_a183> would you rather have a sales tax or income tax... :/
<aw-> u0_a183: we have both
<Regenaxer> In Germany we have a special tax on Champain, which was "temporarily" intrduced after first world war
<u0_a183> darn
<aw-> haha the key word is "temporary"
<Regenaxer> T
rob_w has quit [Quit: Leaving]
<yunfan> Regenaxer: you'd live in japan?
<Regenaxer> Not now, but many years ago
<Regenaxer> aw- does
<yunfan> in tokyo?
<beneroth> all federal taxes in Switzerland are "temporary" (since WWII). we just had to vote for prolonging them last year.
<Regenaxer> Half a year in Osaka, more than 5 in Sapporo
<yunfan> ok.
<beneroth> the emergency laws in France we're also temporary (since the terrorist attacks years ago). now they're just made into normal laws. and turkey copies them.
<yunfan> beneroth: welcom to china, we have a temporary state :D
<beneroth> hm.. you kinda have the oldest state of all
<beneroth> :P
<beneroth> you basically invented bureaucracy while rest of the world was throwing stones and bad spears at each other
<yunfan> beneroth: i was intersting how can you feed youself in europe for a month
<yunfan> i mean the food fee
<yunfan> beneroth: yes we were too good at ruling
<beneroth> in Switzerland we earn high salaries but have to spend a lot for basic living. works out, usually.
<yunfan> for eg?
<beneroth> 1/3 of the income goes out for flat/house, then a good amount into health insurance, rest is mostly food and some cloths/luxuries/whatever
<yunfan> how was the meat price ?
<yunfan> and big mac in mcdonna
<yunfan> i jus had a burgking at highway station
<beneroth> 12-15 Swiss Francs or US Dollars (exchange rate is 1:1 currently, afaik)
<beneroth> for big mac menu
<beneroth> something like that
<yunfan> you mean 12 swiss francs for a big mac??
<yunfan> that's toooooo expensive i think
<beneroth> menu
<beneroth> not only the burger
<yunfan> what about a bucket meat?
<yunfan> looks like your price is 2 times of us
<yunfan> then why wont someone import US meat directly and cook themself?
<beneroth> import taxes, to protect our farmers.
<yunfan> it looks like netherland has very high tech of agriculture
<yunfan> lots of the intersting changing happens there
pierpal has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 256 seconds]
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 264 seconds]
jibanes has joined #picolisp
pierpal has joined #picolisp
<beneroth> cu
beneroth has quit [Quit: Farewell]
alexshendi has joined #picolisp
sriram has joined #picolisp
<sriram> Hi Regenaxer...just to continue on yesterdays discussion....one mistake i think was putting drawCanvas in both onload and in onresize
<sriram> so i deleted from onresize..
<Regenaxer> Hi sriram!
<Regenaxer> Does it work now?
<sriram> no :(.....i experimented with different delays...at 30 sec....it seems to
<sriram> correct itself
<Regenaxer> cool
<sriram> not at 40msec...drawCanvas is being called...but not cssDrawImage
<Regenaxer> Ah, "no", didn't see that
<sriram> ah even at 30 sec it does not work ..
<Regenaxer> Why should it depend on the value of the delay?
<sriram> it does not depend on delay i think
<Regenaxer> You can take 1 ms, it just wont reach that speed
<sriram> but wanted to slow it down so i can see the diff between max/min and the actual drawCanvas event
<sriram> right now i see no more drawcanvas events
<Regenaxer> Like in the canvas demo
<Regenaxer> "Zappel"
<sriram> yes there it was 40ms
<Regenaxer> you have "faster" and "slower" buttons
<Regenaxer> T
<sriram> i just made it 30sec..so i can see the trace for max/min and drawCanvas JS timer event
<Regenaxer> ok, good
<sriram> right now drawCanvas JS events seem to have stoppped entirely
<Regenaxer> Same problem as yesterday?
<sriram> outcome is same....though yesterday i was "reinstalling" the js timer on onresize event also...incorrectly and unnecessarily i think
<sriram> i mean reinstalling by calling drawCanvas...
<Regenaxer> Hmm, can't you start with something simple like zappel and go bottom-up?
<Regenaxer> The current is too complicated
<sriram> ok...will try to restart but wont be able to get rid of much...maybe instead of drawing tiles..i can just draw a single square..
<sriram> but the main part (the onload, onresize, drawcanvas, drawImage) will remain same
<Regenaxer> Ah, I forgot! zappel is even online: https://picolisp.com/canvas
<sriram> (i did start initially with a single square and was building bottom up :) )
<Regenaxer> ok
<sriram> nice..i tried zappel..it looks good...problem i was trying to solve is making the canvas a percentage
<Regenaxer> yes, I remember
<sriram> and also resizing it correctly when the overall browser window changes,,zappel has a fixed canvas window so does not need to handle this part
<Regenaxer> not sure if this is a good idea
<Regenaxer> yes, I always use fixed canvas sizes
<Regenaxer> more clear :)
<sriram> this is because i need my game to work across all screen sizes (phone as well)
<sriram> yes :)
<sriram> i think i got the percentage part correct but the resize is giving trouble.,.
<Regenaxer> First the animation must work
<sriram> yes...thats the issue..(if the paste bin is there...is it too much to ask to load into a file and try? perhaps you may be able to see the problem i am facing when maximize/unmaximize...not sure if this is ok to to ask...)
<sriram> (or can repaste)
<Regenaxer> np
<sriram> (if time permits for you to try)
<Regenaxer> you changed the code?
<sriram> yes..will repaste..
<Regenaxer> good
<Regenaxer> no worry
<sriram> sorry about . at beginning
<sriram> i had started typinng the line
<Regenaxer> no problem, got it already
<Regenaxer> cool, nice picture!
<sriram> i put colors for the form and the div so can see it
<sriram> form is blue (100%)
<sriram> div is orange (80%)
<sriram> canvas is 100% of div
<sriram> these numbers are dynamically calculated using read macros in ondirect event
<sriram> sorry...maybe stating what is obvious to you :)
<Regenaxer> not at all :)
<Regenaxer> So where is the problem now?
<sriram> not sure how you can reproduce on tablet
<sriram> on laptop i make browser window smaller than max
<Regenaxer> I resized by dragging up
<sriram> then when i go between "maximize" and "unmaximize" after
<Regenaxer> Took a few seconds, when it redraw
<sriram> two or three times...you can only see the orange and blue window
<sriram> (30 sec)
<sriram> and not the tiles anymore
<Regenaxer> yes, exactly
<sriram> i drawcanvas not working
<sriram> i.e drawCanvas not working
<Regenaxer> Now it refreshed
<Regenaxer> is bigger now
<sriram> one more toggle?
<sriram> it stops refreshing at some point
<Regenaxer> worked
<Regenaxer> I made small now, 1/4 of the screen size
<sriram> oh....sometimes it took me 3 times (back forth) to reprodice....hope not issue with my chrome
<sriram> or os
<Regenaxer> not refreshed yet
<sriram> ah good :)
<Regenaxer> still not, already 30 secs?
<sriram> like going to doctor and not being able to show the symptom anymore otherwise
<Regenaxer> yes, or car mechanics
<sriram> yes....also if you see console....no further output
<Regenaxer> I increased size now
<Regenaxer> still no redraw
<sriram> yes...
<sriram> good....thats the thing i was puzzled by...and struggling to debug...
<sriram> at least its not my browser or os alone
<Regenaxer> Right
<Regenaxer> Is it always a fixed number of successful runs?
<sriram> no i have
<sriram> seen it happen even after just one max/min
<sriram> and its not on one direction also as far as i can tell
<sriram> i.e max to min or min to max
<sriram> (i use min instead of saying unmax :) )
<Regenaxer> I'm tracing
<sriram> part of my trouble is it starts on the java script side..through drawCanvas
orivej has joined #picolisp
<sriram> (had to change the <svg> function to <mysvg> to allow the use of viewbox correctly...)
<Regenaxer> ok
<Regenaxer> Now it hangs, and traceAll shows nothing because the JS on the client doesn't fire
<sriram> (just an aside :) ..was just checking sure to make sure i did not change any lib files)
<Regenaxer> ok
<Regenaxer> So it seems to be a problem on the JS side. It is not hanging in Lisp
<sriram> yes....maybe in drawCanvas? or is there some html caching etc
<sriram> not sure if i am using the counter properly
<Regenaxer> The counter does not matter I think
<sriram> adding lisp(null, console, 'msg') in drawCanvas
<Regenaxer> The calls to the canvas functions look good
<Regenaxer> Not much that can be done wrong
<sriram> ah good.....i see the js message
<sriram> the drawCanvas is being called but after that nothing
<sriram> the lisp side not being called
<Regenaxer> It must have to do with the resizing
<Regenaxer> this kills the timer somehow
<sriram> the timer is working...something inside drawCanvas.js
<Regenaxer> lib/canvas.js ?
<sriram> will trace it further now....and update you in a bit....yes lib/canvas.js..put .js to distinguish from drawCanvas(lisp)
<sriram> i.e tracing drawCanvas(JS) now....
<sriram> i see the message from drawCanvas(JS) at outset..but no corresponding call to drawCanvas(lisp)
<Regenaxer> It should first go to 'jsDraw' in lib/canvas.l
<sriram> normally (console "js drawcanvas") "Draw canvas start" "Draw image start" "Draw canvas done" "mk.svg "
<Regenaxer> But you say drawCanvas is called anyway
<sriram> but this time silence after (console "js drawcanvas")
<sriram> i mean the javascript side drawCanvas is called
<sriram> it usually calls the lisp side (user defined)drawCanvas
<Regenaxer> yes
<sriram> but in this case silence after the javascript drawCanvas is called
<Regenaxer> so the timer does not trigger
<Regenaxer> This: setTimeout(function() {drawCanvas(id, dly)}, dly);
<sriram> if (dly == 0) requestAnimationFrame(function() {drawCanvas(id, 0)}); else if (dly > 0) setTimeout(function() {drawCanvas(id, dly)}, dly);
<Regenaxer> It should fire after 'dly'
<Regenaxer> yes
<sriram> but that setTimeoutfunction was perhaps called only the very first time?
<sriram> or is it called every time
<Regenaxer> Must be every time
<Regenaxer> otherwise zappel won't work
<sriram> ok...adding a few traces in it
<Regenaxer> :)
<Regenaxer> The resize and onload somehow interfer?
<Regenaxer> oh
<sriram> i see that on the resize
<Regenaxer> I just see that *Cnt is always zero
<Regenaxer> How come
<Regenaxer> ?
<sriram> i am surpriseed
<sriram> ah i should inc '*Cnt
<sriram> did i inc *Cnt?
<Regenaxer> haha
<Regenaxer> no :)
<Regenaxer> (inc *Cnt)
<Regenaxer> must be (inc '*Cnt)
<sriram> yes
<sriram> exactly....that trips me up
<Regenaxer> I would simply do:
<sriram> (no?)
<sriram> (not sure what you said no for...)
<Regenaxer> (csDrawImage (sesId (pack "!mk.svg?" (ht:Fmt This (inc (0))))))
<Regenaxer> It is not incremented
<sriram> yes..i did inc *Cnt when I should have done inc '*Cnt
<sriram> :)
<Regenaxer> (inc *Cnt) *returns* (+ *Cnt I)
<sriram> yes..its like updating a copy instead of by reference
<Regenaxer> I would simply use the above (inc (0))))
<Regenaxer> no global
<sriram> so (0) is a constant list
<Regenaxer> yes, inline
<sriram> what if there are two uses of (0) in program...do both exist separtely
<Regenaxer> and a "var" in the sense of the references
<sriram> a new copy everytime?
<Regenaxer> yes, separate
<sriram> ah ok perect
<Regenaxer> yep, done by the reader
<sriram> using the fact that "value" of a list is in its car
<Regenaxer> correct
<sriram> so inc will update the 'value' of the variable (in this case a list)...very nice....
<sriram> will update the code and see..but you felt the counter did not matter?
<Regenaxer> I changed the delay to 40
<Regenaxer> Hmm, hangs again after a few times
<Regenaxer> So this was not the reason :(
<sriram> i do see a call to (console "js drawcanvas trying set timeout with dly")
<sriram> before it hangs
<Regenaxer> ok, but then the timeout never fires?
<sriram> so you are correct...the resize somehow destroys the timeout
<sriram> yes..then the timeout never fires
<Regenaxer> So it just needs a drawCanvas also in onresize
<sriram> hmmm I had that earlier...and commented it out
<Regenaxer> The question is more why it worked *sometimes*
<sriram> put it back and see?
<sriram> yes...that also
<Regenaxer> yes, I do it too
<Regenaxer> Hangs again
<Regenaxer> no, works
<Regenaxer> (?)
<sriram> still hangs
<Regenaxer> I just had it hanging, but when I touched the screen it refreshed
<sriram> oh
<Regenaxer> But only once
<Regenaxer> very strang!
<Regenaxer> Now it hangs completely again
<sriram> no mine is permanently hung
<sriram> last message (console "js drawcanvas trying set timeout with dly")
<Regenaxer> Last here was "Draw canvas done"
<Regenaxer> It is your new msg
<sriram> yes Draw canvas done is from lisp side
<sriram> but i added js messages also in drawCanvas (js)
<sriram> "Draw canvas done" (console "js drawcanvas after post") (console "js drawcanvas sent request") (console "js drawcanvas trying set timeout") (console "js drawcanvas trying set timeout with dly")
<sriram> at different places in drawCanvas(js)
<sriram> ah i wonder if
<sriram> must delete the timeout when resizing...and put back the timeout?
<Regenaxer> I would not think so
<Regenaxer> I don't know what exactly happens on a resize
<Regenaxer> A completer rebuild of the whole page?
<Regenaxer> complete
<sriram> one idea...i think the timer goes off only one time..checking this
<Regenaxer> yes
<Regenaxer> without aninmation frame it is always a single-shot
<sriram> because delay>0 it happens over and over
<Regenaxer> should be so
<Regenaxer> Within the same page
<Regenaxer> but if resize makes a new page ...
<Regenaxer> Sorry, I must help Masako. Sushi-course is finished ;)
<sriram> np :)
<sriram> i think the problem is the timeout is ok
<Regenaxer> Too bad, really nasty
<sriram> but the post does not actually work
<sriram> yes
<sriram> np...can continue later :)
<sriram> post does not get a reply i think
<Regenaxer> Something of the context must be lost
<Regenaxer> Best is perhaps to start with a new GET upon a resize
<Regenaxer> new page
<sriram> how?
<sriram> dont want to hold you up
<Regenaxer> Reload everything
<sriram> maybe a quick hint before you go
<Regenaxer> np :)
<sriram> reload everything?
<Regenaxer> the rough way would be to 'redirec'
<Regenaxer> but really ugly
<sriram> oh ok...np...its a little more diffiicult than i thought..need more input and dont wish to delay you now
<sriram> perhaps can ask you when i see you online next :)
<Regenaxer> ok, yeah, must go
<Regenaxer> see you! :
<Regenaxer> )
<sriram> have a nice eveninng :)
<sriram> bye :)
<Regenaxer> you too!
<Regenaxer> :)
alexshendi has quit [Ping timeout: 260 seconds]
alexshendi has joined #picolisp
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
sriram has quit [Ping timeout: 252 seconds]
alexshendi has joined #picolisp
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
orivej has quit [Ping timeout: 268 seconds]
karswell has quit [Remote host closed the connection]
karswell has joined #picolisp
styx has joined #picolisp
karswell_ has joined #picolisp
karswell has quit [Remote host closed the connection]
<N3k0> Hi, if i wanted to rearrange a 1 diensional list into N dimensions, what would be the prettiest lispy way? e.g: '(3 2) and '(1 2 3 4 5 6) --> '((1 2) (3 4) (5 6))
styx has quit [Quit: styx]