<hunar>
Hello :) I checked out OOP in Pil and I have two questions: I made this https://pastebin.com/tM279n0E ... when creating objects, what is the difference between (new '(+Ball)) and (new +Ball) , and I wanted to call the method constrain> within the method update> but couldn't figure out how
<Regenaxer>
Hi Hunar!
<Regenaxer>
(new +Ball) is not correct, 'new' needs a "Type" which is a list of classes
<Regenaxer>
You can call (update> This) inside the method
<hunar>
Thanks :D didn't know This
<Regenaxer>
ok
<Regenaxer>
'This' is a normal symbol, automatically bound inside methods
<Regenaxer>
or explicitly with (with (xxx) ... This ...)
<Regenaxer>
So what (new +Ball) actually does is (new NIL)
<Regenaxer>
cause +Ball has no (super)class(es)
razzy has quit [Ping timeout: 265 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 245 seconds]
razzy has joined #picolisp
<razzy>
Good day i wish to all! I solved my (in) troubles. I think PilCon about (in) (out), streams, files handling, would still have value for me.
<Regenaxer>
razzy, your problem was not specifically 'in'
<Regenaxer>
You do perhaps not understand how evaluation works?
<razzy>
Question: do we have function that print string into pil-REPL-command-line but does not eval it? "without pressing enter"? So i can manually edit it?
<razzy>
Regenaxer: my problem was that i did not read (doc 'in) enough. and i did not expect so many functionality in (in)
<Regenaxer>
ok
<razzy>
Regenaxer: do we have function that print string into pil-REPL-command-line but does not eval it? "without pressing enter"? So i can manually edit it and than send with enter?
<Regenaxer>
This question makes no sense to me
<razzy>
Regenaxer: thank you, no problem. i think i found workaround
razzy has quit [Ping timeout: 265 seconds]
razzy has joined #picolisp
<razzy>
just curious, Why is (history) compiled function and not global list *History?
<Regenaxer>
It is *inside* readline(), not in PicoLisp
<razzy>
ah i forgot. thank you. sorry
<razzy>
written as note for future me!
<Regenaxer>
:)
razzy has quit [Ping timeout: 260 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 265 seconds]
<hunar>
Thanks Regenaxer :) I was very busy and couldn't reply ... one more question.. I tried to dynamically get the terminal resolution with (call 'tput "lines") but tput lines only prints the result, not returning it.. How can I get the printed result
<Regenaxer>
With a pipe: (in '(tput "lines") ... (line T) or (read) etc. )
<hunar>
That worked :D thanks
<Regenaxer>
:)
razzy has joined #picolisp
razzy has quit [Ping timeout: 245 seconds]
<Regenaxer>
In Vip I first also used tput
<Regenaxer>
But now I think I do all by "hand"
<Regenaxer>
Lines and colums are retrieved by an "ioctl" call
<hunar>
I just googled ioctl and didn't understand how to use it :/ ... By the way, since you know muuuch more than me, what do you suggest someone use if they want to draw ascii graphics fast, something like this https://www.youtube.com/watch?v=DEqXNfs_HhY
<hunar>
Is tput fast enough?
<Regenaxer>
The animation in the video is very fast! No way with tput, you need to write directly into the framebuffer
<Regenaxer>
PilOS does something like that
<Regenaxer>
Directly writes chars into video memory
<Regenaxer>
tput is very slow, as it starts a procees each time
<Regenaxer>
Vip is in between, it writes to the terminal window
<Regenaxer>
'prin' basically
<Regenaxer>
and does cursor movements with escape sequences
<hunar>
what should I read to get more familiar with (write directly into the framebuffer) :) Is it done with a library?
<Regenaxer>
"Vip is in between" in terms of speed I mean
<Regenaxer>
Yes, there are libraries, but I have never investigated
<Regenaxer>
PilOS is low level, so there it is easy
<hunar>
Cool :)
<Regenaxer>
Do you need such fast animations?
<hunar>
I don't need it actually.. just curious how people do stuff
<hunar>
I saw it before :) it's amazing .. but didn't understand (writes directly to an XWindow) that is different than opengl right?
<Regenaxer>
yes, it does not use any library like OpenGL
<Regenaxer>
Directly draws pixels
<hunar>
I'll try running it now :)
<Regenaxer>
ok
<Regenaxer>
hmm, maybe I messed it up?
<Regenaxer>
The key controls are for Penti now
<Regenaxer>
I hope I did not release that (?)
<Regenaxer>
Seems I did :(
<Regenaxer>
What can we do next PilCon?
<Regenaxer>
Day after tomorrow morning
<hunar>
How can I run the rcsim? I copied the library to pil21/lib and run :pil misc/rcsim.l -go it keeps printing ? !? (sim> *Scene)
<hunar>
sim> -- Bad message
<Regenaxer>
You need also -main
<Regenaxer>
./pil misc/rcsim.l -main -go +
<hunar>
Oh, I didn't realize 10th Sep is that soon :/
<Regenaxer>
yeah, me too
<hunar>
It's running :) what are the controls?
<Regenaxer>
Do you have time to attend?
<Regenaxer>
It is Friday, your holiday :)
<Regenaxer>
The controls are the probleon
<Regenaxer>
problem
<Regenaxer>
I did something stupid
<Regenaxer>
changed them
<Regenaxer>
At the end of rcsim.l
<Regenaxer>
"+" "-" etc.
<Regenaxer>
It used to be keys from the numpad
<hunar>
My life is kinda complex right now, I'll see my first child next month :) I'll try to attend it, but I may not talk (mic and camera) because my laptop has a horrible webcam and a broken microphone.. how to attend by the way?
<Regenaxer>
No problem! Congrats for your child!! :)
<hunar>
Thanks :D
<Regenaxer>
Lets postpone rcsim for the moment? I don`t have access to the old version here