seninha_ has quit [Remote host closed the connection]
aw- has left #picolisp [#picolisp]
aw- has joined #picolisp
Regenaxer has quit [Ping timeout: 260 seconds]
<tankf33der>
hi all
<Hunar>
Hello tankf33der
<tankf33der>
i have implement fermat prime test using **Mod function, fast now
<tankf33der>
found the 2152302898747 is passes fermat test and **not** prime at the same time.
<tankf33der>
do not understand math background about this
<abu[m]>
Me neither
<abu[m]>
@Hunar I could not locate the drawCanvas issue yet
<abu[m]>
Has to do with POST
<abu[m]>
seems to post always the last URL
<abu[m]>
A note about your code: (local) (*drawCanvas) makes no sense
<abu[m]>
And (setq pico~drawCanvas drawCanvas) is not needed, both symbols are the same
<Hunar>
Hi abu, I modified demo/canvas.l and removed what I though was not needed, I forgot about those, you're right they don't make sense
<abu[m]>
No problem
<abu[m]>
I'm busy with a customer atm, will look at Canvas later
<Hunar>
The current situation when using (unless F (make... is that (click,double click,move) are ignored and fine, but releasing the click while moving triggers sonething that updates the canvas +1 times each frame .. so if I move and release again it updates 3times each frame etc...
<Hunar>
No problem, I'm also busy atm
<abu[m]>
I think the (unless F ) does not change anything. At least not in the Zappel demo
<abu[m]>
The problem is deeper
<abu[m]>
The POST somehow depends on what was POSTed before
<Hunar>
one more info, we draw when F is NIL and when it's not NIL we return NIL in drawCanvas .. but if I return a list instead of NIL the every update messes with the canvas .. so (if F NIL (make ... is fine but (if F (1) (make... messes with the animation on all updates (click double click move release)
<abu[m]>
Yes, as I said. The problem is at a different place. (unless F) is not relevant
<abu[m]>
ok, sorry, later. Must hurry
<Hunar>
No problem :)
seninha has joined #picolisp
<abu[m]>
@Hunar One minor thing, which has nothing to do with our problem, just a minor improvement:
<abu[m]>
(<canvas> "screen" ..) (javascript ... 1000)") now can be simply (<drawCanvas> "screen" *W *H 1000)
<abu[m]>
But I still had no time to investigate the POST issue
<abu[m]>
And: I thing reading a Camera stream on Android is not trivial
<abu[m]>
At least I do not know how to do it. Do you have any example?
seninha has quit [Quit: Leaving]
<Hunar>
That's great to know :D thanks .. I guess the PilBox examples need updating :)
<abu[m]>
Yes. I think I uploaded it back then
<abu[m]>
i.e. demo/canvas.l
<abu[m]>
in PilBox demos
<abu[m]>
also chess/gui.l
<Hunar>
Great, I will update them now :D
<abu[m]>
Just cosmetics though ;)
<abu[m]>
I'm back at @lib/canvas.js now
<Hunar>
Can I open PilBox in a desktop browser? if yes then I guess we could debug it from the browser terminal
<abu[m]>
Not in a browser I think
<abu[m]>
Not PilBox directly
<abu[m]>
But apps like chess work in the browser too
<abu[m]>
I'm trying with the Zappel demo
<abu[m]>
I think I'm getting near to understand the problem
<abu[m]>
It is not the canvas libs
<abu[m]>
The demo does not distinguish between normal drawing and plot operation
<abu[m]>
Normal drawing also occurs upon certain events, like the mouse leaving the canvas
<abu[m]>
i.e. onmouseout
<abu[m]>
or ontouchend or onmouseup
<Hunar>
good luck :) I wish i could help
<abu[m]>
These events should pass another 'Dly' argument. I think this is the problem.
<abu[m]>
in @lib/canvas.js
<abu[m]>
Was interrupted again
<abu[m]>
But now I changed @lib/canvas.js
<abu[m]>
Now it works in Zappel, if I change in drawCanvas the line (when (>= Dly -1) to (unless (=0 Dly)
<abu[m]>
No need for checking 'F'
<abu[m]>
Grr, no
<abu[m]>
Now other things like chess don't work any more
<abu[m]>
I revert the changes :(
clacke has joined #picolisp
seninha has joined #picolisp
chexum has quit [Remote host closed the connection]
chexum has joined #picolisp
chexum has quit [Remote host closed the connection]
chexum has joined #picolisp
<abu[m]>
I think I have an idea now
<beneroth>
:)
<beneroth>
you need to add a new variable/hook deciding if every fingertap triggers a request or not?
<abu[m]>
Similar, yes, pass more info
<abu[m]>
It is a little more involved, because the drawing occurs indirectly
<abu[m]>
Triggered by setTimeout or in response to events
<abu[m]>
And also in these cases the drawing must be done
<abu[m]>
But the animation calculation should not be done then
<abu[m]>
My idea is to overload the third arrg
<abu[m]>
Now it is either NIL, or a signed number
<abu[m]>
Now I'll pass 'T' in certain cases
<abu[m]>
'T' does not interfer with existing logic, but can be checked for
<beneroth>
nice
<abu[m]>
But it is very tricky. drawCanvas goes ping-pong several times, passing args like Dly and F back and forth
<abu[m]>
And I must be careful not to break gt applications
<abu[m]>
s/gt/not
<Hunar>
Sounds good :)
Nistur has quit [*.net *.split]
Nistur has joined #picolisp
<abu[m]>
I need a few days to test it
clacke has quit [Remote host closed the connection]