<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...
<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)
<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>
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))