ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Check also http://www.picolisp.com for more information
freemint has quit [Quit: Page closed]
_whitelogger has joined #picolisp
_whitelogger has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
ubLIX has quit [Quit: ubLIX]
xkapastel has quit [Quit: Connection closed for inactivity]
shpx has joined #picolisp
<Regenaxer> Just for the records, 'delete' is non-destructive
<Regenaxer> A destructive deletion is for example:
<Regenaxer> : (setq L (1 2 3 4))
<Regenaxer> -> (1 2 3 4)
<Regenaxer> : (con (cdr L) (cdddr L))
<Regenaxer> -> (4)
<Regenaxer> : L
<Regenaxer> -> (1 2 4)
alexshendi has quit [Read error: Connection reset by peer]
razzy has quit [Remote host closed the connection]
razzy has joined #picolisp
<tankf33der> the same idea, but work with one symbols but L affected :)
<razzy> i love the (con) function idea.
orivej has joined #picolisp
<Regenaxer> I added a "See also" con -> set
<razzy> i was thinking if i could ever touch first cell of the list. with (con (nth L) any) machinery. so i could efectively delete first cell of list.
<razzy> i guess there is pop function :]
<Regenaxer> right, pop is like that
<Regenaxer> Though it is not destructive
<Regenaxer> "Deleting" the first cell of a list is never destructive, as it just advances the pointer
freemint has joined #picolisp
<freemint> Regenaxer: what is Rpc for in 'go in app/main.l ? How do i connect to it? What can be done with it?
<Regenaxer> You can send commands to this application
<freemint> Thats what rpc stands for
<Regenaxer> excellent!
<Regenaxer> Let me search
<Regenaxer> it is mentioned is some example
<freemint> It seens i talk with it via pr. Is there a shell util which makes working over pilIO easier?
<Regenaxer> See (doc '*Ext) and (doc 'remote/2)
<Regenaxer> stated app with -'go 4040'
<freemint> ah
<freemint> Can i use Rpc to "login" into a particular session?
<freemint> (like ... I talk to the process which ha port 23422 )
<Regenaxer> It is also in wiki/usingEdit
<Regenaxer> No login
<Regenaxer> this is done with psh
<freemint> mhh ok.
<Regenaxer> bin/psh 56307 64609294537540672~
<Regenaxer> ie port and sessionId
<Regenaxer> I use that all the time
<Regenaxer> Copy/paste from the log output
<Regenaxer> The "using edit" article has a section about remote database access
<Regenaxer> that is what that Rpc is for
<freemint> It is not obvious that Rpc = remote database access or that it works in the same way
<Regenaxer> It is not ==
<Regenaxer> remote database *uses* rpc
<freemint> Ah
<Regenaxer> you can execute any command
<freemint> When you made changes to the source code how do you reload code when you want to keep the server running?
<Regenaxer> (load "app/gui.l")
<Regenaxer> in psh
<Regenaxer> But most code is loaded automatically
<Regenaxer> only lib.l or gui.l etc, which are loaded by main.l
<Regenaxer> (load "app/gui.l") is only in *this* session of course
<Regenaxer> to load in the parent, do (boss 'load "app/gui.l")
<freemint> do you do this with each connected process?
<Regenaxer> No, only the one I'm debugging
<Regenaxer> Usually not in production
<Regenaxer> If I need, I do the above 'boss'
<Regenaxer> but already running sessions are not change then
<freemint> because they forked before the changes were made
<Regenaxer> right
<freemint> (thats why i was asking how you propagate the changes)
<Regenaxer> yes, so this is the way
<Regenaxer> If immediate change is needed, I call the customers and they must log out
<Regenaxer> So normally not
<freemint> Did you ever have a call about a bug and you logged in and fixed it?
<Regenaxer> Sometimes, but not bugs
<Regenaxer> Customer asked for a change
orivej has quit [Ping timeout: 245 seconds]
<Regenaxer> which he needed immediately
<Regenaxer> For one customer I had such a case every few months
<Regenaxer> Usually we agree that all log out at nood
<Regenaxer> I install app/gui.l and stop all processes
<freemint> there is blog post of pal graham, where he (when he was doing custoer support for his own website builder) was doing customer support, logged n to peoples sessions fixed the bug and told people to refresh the page wthout telling them he fixed it.
<Regenaxer> s/nood/noon
<Regenaxer> lunch time
<Regenaxer> Yes, also possible
<Regenaxer> but tedious for 40 sessions
<Regenaxer> As I said, for 90% of all changes nothing has to be done
<Regenaxer> The code is reloaded on the next click anyway
<freemint> thats why i asked whether you had tooling. Couldn't you boss the parent to tell everyone to refresh the files?
<Regenaxer> So I just install the file
<Regenaxer> Not needed usually
<Regenaxer> But yes, you can do (boss 'tell ''load ...)
<Regenaxer> I never did that, as the issue was not sooo urgent
<Regenaxer> Just some nice to have change
<Regenaxer> Which they did not want to wait till next day
<Regenaxer> Usually I just install
<Regenaxer> All processes are stopped by cron in the night
<freemint> What do you mean by install?
<Regenaxer> so they are restarted by httpGate the next day
<Regenaxer> scp -p
<Regenaxer> actually, I use scripts
<Regenaxer> put app/gui.l
<Regenaxer> no
<Regenaxer> app7 put app/gui.l
<Regenaxer> messe put app/gui.l
<Regenaxer> app7, messe, sunie etc are frontends to rsync
<freemint> If you used external symbols to store code? If you would update the DB content, the changes would be present once it the symbols value are need next time in all processes?
<Regenaxer> app7 diff app/gui.l
<Regenaxer> This is in no way better than just sources
<freemint> Why?
<Regenaxer> The sources are present are need next time in all processes
<freemint> mhh then i was doing something wrong
<Regenaxer> What happened?
<freemint> when i wrote a web server i always had to restart everything for changes to take place
<Regenaxer> Not in pil
<freemint> mhh maybe because i defined all my functions in main?
<Regenaxer> Only the core is loaded in main
<Regenaxer> ah
<Regenaxer> right
<Regenaxer> Look at examples like app/ or wiki/
<Regenaxer> main loads er, lib and gui
<Regenaxer> sometimes some print routines
<freemint> Regenaxer: we talked a lot about how the db storage worked but never talked about how iit works with multiple processes.
<Regenaxer> I'm not sure, perhaps yes
<freemint> i think we would need to talk about families first and tell but that is another curious topic that seems magical to me
<Regenaxer> This is a more involved part
<Regenaxer> Which families? processes?
<freemint> you explained me how one process works with pilDB. That he rd's from a certain offset etc ... but i am curiuos (but do not have he time right now) how pil db works with multiple processes in a family
<Regenaxer> T
<Regenaxer> It does a very simple rpc
<Regenaxer> Only tells all other family members which symbols to 'wipe'
<freemint> To talk about pilDB with multiple processes i think we would need to talk about rpc, task and what a "family" is first.
<freemint> ahh
<freemint> so you invalidate the cache, not push the changes
<Regenaxer> family is all siblings and children
<Regenaxer> so not the parent
<Regenaxer> yes, only cached objects
<Regenaxer> This is via (commit 'upd)
<freemint> how do i tell what object to wipe?
<Regenaxer> yes
<Regenaxer> 'upd' is basically 'wipe'
<freemint> *How*
<freemint> (commit 'upd) clears all the cache or just the changes made?
<Regenaxer> (de upd Lst
<Regenaxer> (wipe Lst) )
<Regenaxer> So it is non-evaluating
<Regenaxer> (upd {A1} {B2} ...)
<Regenaxer> This is sent to all processes
<Regenaxer> {A1} {B2} are objects being comitted
<Regenaxer> So *if* somebody else has this object in the hea+
<Regenaxer> heap, it is invalidated
<Regenaxer> The next moment it is accessed, it is fetched again
<freemint> that made a lot of sense
<Regenaxer> So most processes wont care
<Regenaxer> They get the objects, but don't use them anyway
<freemint> Regenaxer: Every software has bottle neck soomewhere
<Regenaxer> yes
<Regenaxer> This here works if there are not too many processes
<freemint> In your experience where is the bottle neck with things like app or wiki
<Regenaxer> I have never seen any
<freemint> Is it that there are never enough users?
<razzy> oh boy, proper lisping is addictive :]
<freemint> 'proper
<Regenaxer> yes, and changes are not so frequent
<Regenaxer> razzy, right
<Regenaxer> freemint, you could increase misc/stress.l to test it
<Regenaxer> As it is it creates 40 processes
<Regenaxer> (de go ()
<Regenaxer> (do 10
<Regenaxer> (let Pids
<Regenaxer> (do 40
<Regenaxer> (make
<Regenaxer> (rand)
<Regenaxer> (if (fork)
<Regenaxer> (link @)
<freemint> Ok how many users is the most you have seen?
<Regenaxer> about 40
<Regenaxer> But more than the number of users is the frequency of changes critical
<Regenaxer> Most users navigate an view data, and change perhaps 1 percent of the time something
<Regenaxer> You cant type so fast
<Regenaxer> Normally every keystroke in a enabled form is a commit
<Regenaxer> not keystroke, but change in a field
<Regenaxer> The bottleneck is not this rpc, but the number of child processes in general
<Regenaxer> In pil we are limited to about 500
<Regenaxer> iirc
<Regenaxer> it is the number of pipes. 2 pipes per child, handled in select()
<Regenaxer> The commit rpc is not critical in my experience, it does everything in memory only
<Regenaxer> pipes through the kernel, and changes in the Lisp heaps of processes
<Regenaxer> afp
<beneroth> hi all
shpx has quit [Quit: shpx]
<Regenaxer> ret
<Regenaxer> hi beneroth
lodsw_ has joined #picolisp
xkapastel has joined #picolisp
orivej has joined #picolisp
<beneroth> hey Regenaxer :)
<Regenaxer> :)
orivej has quit [Ping timeout: 240 seconds]
shpx has joined #picolisp
freemint has quit [Ping timeout: 256 seconds]
shpx has quit [Client Quit]
shpx has joined #picolisp
shpx has quit [Client Quit]
razzy has quit [Read error: Connection reset by peer]
<rick42> hey pil peeps!
<Regenaxer> Good evening rick42!
<rick42> just messy around with void linux in a vm today
<rick42> hi Regenaxer good evening!
<Regenaxer> :)
<rick42> ofc pil builds on voidlinux no problem (pil64)
<Regenaxer> Cool
<rick42> "all the softwares" seem to be working. and i'm using the musl version of void
<Regenaxer> Ah, the C lib
<Regenaxer> Does 'native' work with musl?
<rick42> oops, last test in the suite failed: the one starting at test/src/main.l:211
<rick42> i but understand the test itself :( sorry
<Regenaxer> hmm, tzo perhaps?
<rick42> what is tzo?
<rick42> function
<Regenaxer> time zone offset
<Regenaxer> : (tzo)
<Regenaxer> -> 3600
<Regenaxer> cc localtime(Tv) # (Any) time to local time
<Regenaxer> ld4 (A TM_GMTOFF) # Time offset in seconds east of GMT
<Regenaxer> What does (tzo) return?
<rick42> : (tzo)
<rick42> -> 4294949296
<rick42> yikes
<Regenaxer> oops
<Regenaxer> looks like a sign problem
<Regenaxer> signed 32 bit
<rick42> weird
<Regenaxer> : (- (** 2 32) 4294949296)
<Regenaxer> -> 18000
<rick42> aaaaahh
<Regenaxer> That lib messes up something with signed/unsigned ret val
<rick42> i wonder why it "overflowed"
<rick42> ok the lib
<Regenaxer> yeah
<Regenaxer> or the ABI
<rick42> ok
<Regenaxer> the int is not sign extended
<Regenaxer> But the value is also strange
<Regenaxer> ah, no
<Regenaxer> 5 hours
<Regenaxer> is that correct?
<rick42> yes 5 hrs
<Regenaxer> yeah, 18000 secs
<Regenaxer> -18000
<rick42> right
<rick42> b/c i chose north american tz in setup
<Regenaxer> So I'm not sure if the lib is wrong or pil calls it the wrong way
<rick42> i could change it to UTC :))))
<Regenaxer> ok
<Regenaxer> :)
<rick42> prob solved :)
<Regenaxer> hmm, perhaps pil is wrong
<Regenaxer> Maybe it works only for positive numbers
<Regenaxer> Nobody did the tests east of Greenwhich?
<Regenaxer> Pil does:
<Regenaxer> cc localtime(Tv) # (Any) time to local time
<Regenaxer> ld4 (A TM_GMTOFF) # Time offset in seconds east of GMT
<Regenaxer> ld E A
<Regenaxer> shl E 4 # Make short number
<Regenaxer> or E CNT
<Regenaxer> ret
<Regenaxer> ld4 takes the four bytel
<Regenaxer> bytes
<Regenaxer> and puts them into E
<Regenaxer> It should sign-extend first
<Regenaxer> Is it possible that nobody ever tested that in the U.S.?
<rick42> ah yes in freebsd same problem
<rick42> i think you are correct
<Regenaxer> You found a bug! Congrats!
<rick42> hehe
<rick42> i noticed that you pushed a version of pil out earlier today
<Regenaxer> Yes, usually several times a week
<rick42> that test is conditioned by (when (= *OS "Linux") ...
<Regenaxer> right
<rick42> oh i have to go run an errand now - wife just told me :) cu later
<Regenaxer> ok, see you!
<Regenaxer> I think about the tzo bug tomorrow
ubLIX has joined #picolisp
mtsd has joined #picolisp
ubLX has joined #picolisp
ubLIX has quit [Ping timeout: 240 seconds]
inara has quit [Quit: Leaving]
<tankf33der> Regenaxer: FYI
<tankf33der> pil32 is ok on american negative timeshift
<tankf33der> i manually set America/Chicago
<tankf33der> and it return -21600 as should.
<tankf33der> because boxCnt respects negative numbers.
<tankf33der> in pico.h
orivej has joined #picolisp
<rick42> tankf33der: thanks!
<tankf33der> coding in pil64 sources without success. :)
<tankf33der> lets wait Regenaxer's patch.
<rick42> right
<beneroth> nice bug find, rick42
<beneroth> geographic-dependent bugs are weird and funny :)
<beneroth> thanks for testing, tankf33der
inara has joined #picolisp
<tankf33der> i gave up
<tankf33der> sleep
<rick42> good night!
<beneroth> good night tankf33der
alexshendi has joined #picolisp
mtsd has quit [Quit: WeeChat 1.6]
<Regenaxer> tankf33der, thanks
<Regenaxer> I understand the problem, yes, only pil64
<Regenaxer> The fix is easy
<Regenaxer> Something like
<Regenaxer> nul4 # Positive?
<Regenaxer> if ns # Yes
<Regenaxer> Thanks Rick again, lets see tomorrow :)
<Regenaxer> Good night
<tankf33der> doesnt work
<tankf33der> but
<tankf33der> i fixed it.
<tankf33der> works for pos and neg tzo
<tankf33der> rick42: you can try too, maybe it will help for Regenaxer's morning.
<tankf33der> now 100% sleep.
<tankf33der> afk.
aw- has joined #picolisp