<Hunar>
Good morning :) In this code http://ix.io/3J40 the variables F L U X Y don't work if i used them in drawCanvas .. I checked out @lib/canvas.l and there is also X2 Y2 that can't be used .. but why? shouldn't the variables be named differently within the library to avoid conflicts? like a special naming sytnax for example common
<Hunar>
lisp would use .X. for internal use
<Regenaxer>
Good morning Hunar
<Regenaxer>
As far as I see, 'Z' does not conflict anywhere
<Hunar>
no, only F L U X X2 Y Y2
<Regenaxer>
But anyway you are breaking the naming conventions
<Regenaxer>
ah
<Regenaxer>
ok
<Regenaxer>
so why use 'Z' and not '*Z' or so?
<Regenaxer>
There are reasons for the naming conventions in the docs
<Regenaxer>
'Z' is a typical "locally bound" symbol
<Regenaxer>
of course you could also do "(private) Z"
<Regenaxer>
but it is bad style
<Hunar>
:)
<Hunar>
I read the naming conventions before many times but didn't use them .. this was my first encounter with the problem :)
<Hunar>
I'll try to change my habits
<Regenaxer>
:)
<Regenaxer>
The rest of your code follows the conventions I think
<Regenaxer>
For example, 'U' is locally bound in the 'http' function
<Regenaxer>
So when 'drawCanvas' is called inside a http transaction, it is locally bound there at that moment
<Hunar>
Ah, that (who 'U) would have been much easier way to debug my problem
<Regenaxer>
Well, the easiest is to stick with the namings ;)
<Hunar>
I will :)
<Regenaxer>
:)
aw- has joined #picolisp
rob_w has joined #picolisp
schulze has joined #picolisp
<razzy>
good morning everyone
<Regenaxer>
Hi razzy!
<beneroth>
Good morning razzy, Regenaxer :)
<Regenaxer>
Hi beneroth!
aw- has quit [Ping timeout: 240 seconds]
<razzy>
can i check for NIL in list?
<razzy>
i am thinking (filter nil? A)
<Regenaxer>
'not'
<razzy>
thx
<Regenaxer>
You just want to find out *if* there is a NIL?
<Regenaxer>
then 'filter' would be too expensive
<Regenaxer>
better (memq NIL Lst)
Hunar has quit [Ping timeout: 256 seconds]
<Regenaxer>
or (find not Lst) but this is also slower than 'memq'
<Regenaxer>
(filter not Lst) sounds a bit useless, as it gives a new list of only NILs
<razzy>
your better
<razzy>
thx
<Regenaxer>
:)
<Regenaxer>
The opposite is sometimes neded
<Regenaxer>
needed
<Regenaxer>
i.e. get all non-NIL elements
<Regenaxer>
Then I do (filter prog Lst)
<Regenaxer>
or better (filter bool Lst)
Hunar has joined #picolisp
rob_w has quit [Ping timeout: 240 seconds]
rob_w has joined #picolisp
Hunar has quit [Ping timeout: 256 seconds]
rob_w has quit [Remote host closed the connection]
Hunar has joined #picolisp
<Hunar>
What would be an elegant/short way to do this I have a list (X Y Xold Yold) I want the old xy to become the new xy ... and at the same time the new xy increased by the difference between new and old xy .. so turns (100 100 90 95) into (110 105 100 100) .. I currently have this which I'm not happy with, I think