beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: https://libera.irclog.whitequark.org/picolisp | Check www.picolisp.com for more information
aw- has quit [Quit: Leaving.]
aw- has joined #picolisp
alexshendi has joined #picolisp
alexshe40 has joined #picolisp
alexshe97 has quit [Ping timeout: 272 seconds]
alexshendi has quit [Ping timeout: 244 seconds]
alexshe40 has quit [Ping timeout: 244 seconds]
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshe99 has joined #picolisp
alexshe99 has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshe12 has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshe12 has quit [Read error: Connection reset by peer]
alexshe10 has joined #picolisp
alexshe10 has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
theruran has quit [Quit: Connection closed for inactivity]
alexshe4 has joined #picolisp
alexshendi has joined #picolisp
alexshe4 has quit [Read error: Connection reset by peer]
alexshe40 has joined #picolisp
alexshendi has quit [Ping timeout: 244 seconds]
alexshe40 has quit [Quit: -a- Connection Timed Out]
alexshendi has joined #picolisp
razzy has joined #picolisp
<razzy> abu[m]: i am looking for pernament history and history log.
<abu[m]> ok
<abu[m]> Vip is not a good REPL, it just has a very rudimentary one.
<abu[m]> In the normal REPL you implemented saving your history?
<abu[m]> Something like: (push1 '*Bye '(out "file" (mapc prinl (history))))
razzy has quit [Ping timeout: 244 seconds]
razzy has joined #picolisp
razzy_ has joined #picolisp
<razzy_> abu[m]: yes i implemented saving my history. I want to save all my executed code. i do not want to invest much. if it is not suporrted, ok. i wanted to ask if there is easy way. :] I live in vip, i rarely use REPL now.
razzy has quit [Ping timeout: 276 seconds]
<abu[m]> ok
<abu[m]> But, as you know, I think you waste a lot of power if you do everything only in Vip
<abu[m]> It makes sense only for trivial code snippets
<razzy_> I like when all code is made from trivial testable code snipets.
<abu[m]> This is not possible. A real-world application needs more than isolated code snippets
<abu[m]> You have a state of global environment, database, namespaces etc.
<abu[m]> If you are *in* an application in the REPL and start from there, you have access to everything from iside Vip then
<abu[m]> But the REPL is the driving environment still
<abu[m]> For example, an application consists of many source files
<abu[m]> They all must be loaded first
<razzy_> i see your point.
<abu[m]> Then you can start Vip inside this
<abu[m]> "They all must be loaded first" was wrong. Most of them are *not* loaded ;)
<abu[m]> only on demand
<abu[m]> But it is good that you explore the other direction too
<razzy_> but i was not forced to live in REPL yet.
<abu[m]> 👍
Nistur has quit [Ping timeout: 240 seconds]
Nistur has joined #picolisp
<razzy_> thank you for answers :]
razzy_ has quit [Quit: leaving]
<abu[m]> Was not so helpful I think
Nistur has quit [Ping timeout: 244 seconds]
Nistur has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshe31 has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshe31 has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshe8 has joined #picolisp
alexshendi has joined #picolisp
alexshe8 has quit [Ping timeout: 260 seconds]
alexshendi has quit [Ping timeout: 240 seconds]
alexshe76 has joined #picolisp
alexshendi has joined #picolisp
alexshe76 has quit [Ping timeout: 268 seconds]
alexshendi has quit [Ping timeout: 268 seconds]
alexshe7 has joined #picolisp
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshe7 has quit [Ping timeout: 272 seconds]
alexshendi has joined #picolisp
<beneroth> razzy, if you want to have a complete log (input and output) of your repl interactions... then check out the unix command 'script' made for that purpose
<beneroth> script -c pil logfile.log
<beneroth> 'script' is part of util-linux package and therefore most likely already installed on your system
alexshendi has quit [Read error: Connection reset by peer]
<abu[m]> The problem is that razzy wants to do it all from inside Vip
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
<abu[m]> Vip is very good for browsing, navigating and editing sources, and for some quick execution of code snippets, but it is not a replacement for the full REPL
<abu[m]> I have a .pilrc file in the working directories of each project, and thus always have a history suitable for that project
<abu[m]> I edit these .pilrc (and sometimes .viprc) files manually, so I can quickly start, stop and restart test environments and have always the matching commands and test cases in the REPL history
alexshendi has quit [Read error: Connection reset by peer]
<abu[m]> If you start Vip stand-alone, you don't have the right env and namespaces
<abu[m]> But if you start Vip from the REPL of the application, all is there, and you can click on symbols and edit them too, always with correct namespaces set up
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshe9 has joined #picolisp
alexshe9 has quit [Read error: Connection reset by peer]
alexshe43 has joined #picolisp
alexshe43 has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshe34 has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshe34 has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshe81 has joined #picolisp
alexshe81 has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
<tankf33der> after several days of coding i closed the project to rewrite isprime without catch-throw.
<abu[m]> oh
<tankf33der> first i can not correctly rewrite it, secondly i became a monster.
<tankf33der> third it is fast anyway.
<abu[m]> What kind of monster? ;)
<tankf33der> non trivial branching to cut do-loop exits
<tankf33der> tests shows pil21 is faster than pil64
<abu[m]> I believed my pseudo-proposal was close
<tankf33der> my tests fails for two days, enough.
<abu[m]> I will check later
<tankf33der> pil21 - 12secs
<tankf33der> pil64 - 40secs
<abu[m]> Strange, why such a big diff?
<tankf33der> the same code
<tankf33der> maybe catch-throw
<abu[m]> interesting
<abu[m]> I would have expected that pil64 is a little faster
<abu[m]> catch/throw too
<tankf33der> code became strange and ugly when you must immediately exits from two loops
<tankf33der> much longer
<abu[m]> But here only one loop remains. The 'do'
<tankf33der> no, i believe they must be two.
<tankf33der> all my implementations were only on two
<abu[m]> The 'loop' is not needed
<abu[m]> And your throw exits only the outer 'do'
<tankf33der> i refactored from scratch
<abu[m]> Let me try later
<tankf33der> ok. afk.
<tankf33der> latest working code is here
<abu[m]> great, thanks! I can test then
<tankf33der> you should clone the repo for whole test suite.
<tankf33der> afk.
razzy has joined #picolisp
<razzy> hello, (alarm) does not work in (while T) loop. is it intentional? do i need latest pil? http://ix.io/449u
<abu[m]> 'alarm' only sets a signal
<abu[m]> All signals are *not* handled in tight loops
<abu[m]> You must do something in the loop
<abu[m]> BTW, (while T ...) is not good!
<abu[m]> There is (loop ...) for that
<razzy> abu[m]: what is example of something doing
<razzy> (loop (+ 1)) also do not work
<abu[m]> (loop (printsp (inc 0)))
<abu[m]> (loop (+ 1)) should be fine
<abu[m]> yes, works
<abu[m]> : (alarm 10 (bye 0))
<abu[m]> -> 0
<abu[m]> $ # after 10 secs
<abu[m]> : (loop (+ 1))
<razzy> i will work on my side
<razzy> abu[m]: weird http://ix.io/449y if only works if I not call !
<razzy> (!)
<razzy> I also have older version of pil21
<abu[m]> No issue of version
<abu[m]> *What* does not work?
<abu[m]> The child terminates, right?
<abu[m]> after 1 sec
<abu[m]> So 'wait' never terminates
<abu[m]> (I have not tried, just looked at the source)
<razzy> child does not terminate. If i uncomment (!). I also run it from vip, which should not be problem.
<razzy> If I comment (!) child terminate as expected.
<razzy> afk, later.
razzy has quit [Quit: leaving]
<abu[m]> What do you mean with uncomment (!)? The line # (! Func) ?
<abu[m]> This has notthing to do with the alarm
<abu[m]> The alarm is in the child, but the child aborts after one sec, and nothing is returned to 'A'. So all is correct
alexshendi has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshendi has quit [Ping timeout: 240 seconds]
alexshe41 has joined #picolisp
alexshe41 has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
<abu[m]> tankf33der, in your "latest working" version something looks wrong. You changed to http://ix.io/44az
<tankf33der> yes, changed.
<tankf33der> it passed all tests.
<abu[m]> But this will *always* exit 'loop': no?
<tankf33der> because i need to
<abu[m]> So (throw 'composite) after it is never reached
<tankf33der> it reached when X is not equal to N1
<tankf33der> as i expects
<tankf33der> and if i understands correctly
<tankf33der> this is pseudocode
<abu[m]> yes, but the (T ... T) always exits
<tankf33der> you speak about second continue WitnessLoop
<abu[m]> So all the rest is useless
<tankf33der> (T .. T) exits only if .. is T
<tankf33der> no?
<abu[m]> Right! Sorry, I got the nesting wrong.
<tankf33der> yeah, very tricky beast.
<abu[m]> OK, I try now
<abu[m]> yep ☺
<abu[m]> I have a solution without catch/throw and loop
<abu[m]> But I have not really tested
<abu[m]> I use 'not' to invert the return value of the 'do'
<tankf33der> testing
<tankf33der> passed! you did it.
<tankf33der> speed the same.
<abu[m]> Great!
<abu[m]> I will investigate the speed issue
<abu[m]> pil64 is a lot slower still, right?
<tankf33der> right
<tankf33der> i will take your code
<abu[m]> Good
<tankf33der> and will tested under everything.
<tankf33der> and will test under everything.
<abu[m]> perfect
<abu[m]> I check Thorsten's mail
<abu[m]> Seems he found a glitch in the docs
<abu[m]> Hmm, I think I give up on the speed issue. Pil64 is not so important any more ...
<tankf33der> this is ok.
theruran has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshe6 has joined #picolisp
alexshe6 has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshendi has quit [Quit: -a- Connection Timed Out]
alexshendi has joined #picolisp
<abu[m]> tankf33der: The 'not' is ugly, and not needed. Better is http://ix.io/44bt
<abu[m]> Can you take that version? I don't know why I did not do the obvious
<abu[m]> And with the speed difference you did not mean CPU, but the different algos?
<abu[m]> razzy: The (prog is not needed. 'later' takes a 'prg'
<abu[m]> Besides that, 'seval' behaves as expected
<abu[m]> Try this:
<abu[m]> (later 'A (alarm 1 (msg 'bye) (bye 0)) (Func))
<abu[m]> Then you see that the alarm fires
alexshe67 has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
<tankf33der> I meant the same code on the same laptop pil21 vs. pil64
<abu[m]> OK, so I understood right. But no idea why ;)
<abu[m]> In any case it was not catch/throw
<tankf33der> i will take this code
<tankf33der> first test passed, good sign.
<tankf33der> thank you very much.
<abu[m]> Very good!
<abu[m]> Thank you for all the tests and feedback!
alexshe67 has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshe85 has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshe85 has quit [Ping timeout: 272 seconds]
Iacob has quit [Ping timeout: 264 seconds]
Iacob has joined #picolisp
beneroth has quit [Quit: Leaving]
alexshendi has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
calle has joined #picolisp
calle has quit [Quit: Leaving]
alexshendi has quit [Quit: -a- Connection Timed Out]
alexshendi has joined #picolisp