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
orivej has quit [Ping timeout: 264 seconds]
orivej_ has joined #picolisp
_whitelogger has joined #picolisp
Blue_flame has quit [*.net *.split]
jibanes has quit [*.net *.split]
ym has quit [*.net *.split]
aw- has quit [*.net *.split]
DKordic has quit [*.net *.split]
DerGuteMoritz has quit [*.net *.split]
orivej_ has quit [*.net *.split]
ChanServ has quit [*.net *.split]
f8l has quit [*.net *.split]
root____ has quit [*.net *.split]
joebo has quit [*.net *.split]
rick42 has quit [*.net *.split]
lodsw has quit [*.net *.split]
libertas has quit [*.net *.split]
Regenaxer has quit [*.net *.split]
anjaa has quit [*.net *.split]
elioat has quit [*.net *.split]
viaken has quit [*.net *.split]
anddam has quit [*.net *.split]
masak has quit [*.net *.split]
mario-goulart has quit [*.net *.split]
emacsomancer has quit [*.net *.split]
pointfree has quit [*.net *.split]
Nistur has quit [*.net *.split]
michelp has quit [*.net *.split]
inara` has quit [*.net *.split]
_whitelogger has joined #picolisp
viaken has joined #picolisp
anddam has joined #picolisp
elioat has joined #picolisp
jibanes has joined #picolisp
Blue_flame has quit [Ping timeout: 246 seconds]
Blue_flame has joined #picolisp
orivej_ has quit [Ping timeout: 272 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 244 seconds]
orivej_ has joined #picolisp
orivej_ has quit [Ping timeout: 246 seconds]
itmuckel has joined #picolisp
itmuckel has left #picolisp [#picolisp]
_whitelogger has joined #picolisp
rob_w has joined #picolisp
orivej has joined #picolisp
rob_w has quit [Ping timeout: 246 seconds]
rob_w has joined #picolisp
razzy has joined #picolisp
rob_w has quit [Quit: Leaving]
razzy has quit [*.net *.split]
root____ has quit [*.net *.split]
razzy has joined #picolisp
root____ has joined #picolisp
<aw-> hi all
<aw-> Regenaxer: in (finally exe . prg), when 'exe' is called, is it possible for the IPC pipe between parent/child is already removed? or is it removed *after* 'exe' runs?
razzy has quit [Quit: Connection closed]
<beneroth> hi aw-
<beneroth> which IPC pipe? finally has nothing to do with pipes. the answer to your question depends on what you do with pipes/IPC in the specific case
<beneroth> if 'prg is removing/closing a pipe, then I would expect the pipe to be closed when the finally 'exe is running.
<beneroth> unless of course the 'prg is aborted with an error, then finally evaluates 'exe anyway
<aw-> hmmm
<beneroth> what is the context?
<aw-> i'll look in /proc/<pid>/ to check
<beneroth> you could run (kids) in the exe
<beneroth> (if it is the parent who is doing the finally)
<aw-> it's not
<aw-> anyways, i'll try some things and ask more specific question later or tomorrow
<aw-> thanks
beneroth_ has joined #picolisp
beneroth has quit [Ping timeout: 256 seconds]
Blukunfando has quit [Ping timeout: 256 seconds]
casaca has quit [Ping timeout: 256 seconds]
<Regenaxer> Hi aw-, beneroth_! Sorry, was out
<Regenaxer> Thanks beneroth_!
Blukunfando has joined #picolisp
Blukunfando has quit [Read error: Connection reset by peer]
beneroth_ has quit [Quit: Leaving]
beneroth has joined #picolisp
Blukunfando has joined #picolisp
<beneroth> Regenaxer, better to use (str) or (format) to convert a string into a number?
<Regenaxer> 'format' is best
<Regenaxer> the other conversions call it internally
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #picolisp
<beneroth> ok thanks
<beneroth> Regenaxer, the reference for 'scl uses (str) in the examples
<Regenaxer> yes, because *Scl is relevand during 'read', and 'str' reads from a string
<Regenaxer> So 'str' is a lot of overhead
<Regenaxer> parsing the string and then call 'format'
<Regenaxer> The direct call is (format "123" *Scl)
<Regenaxer> 'str' is also very dangerous in some contexts
<Regenaxer> as it is 'read' basically, it executes read macros. An absolute no-go in user interfaces etc
<Regenaxer> : (str "ab `(msg 'OK) cd")
<Regenaxer> OK
<Regenaxer> -> (ab OK cd)
<beneroth> Regenaxer, ok thanks
<beneroth> yeah I'm using format now
<Regenaxer> :)
<beneroth> well did so before, but haven't worked so much with *Scl numbers as here
<beneroth> I'm getting comfortable with FEXPR's and namespacing, very elegant combination when used carefully
<Regenaxer> cool :)
<Regenaxer> yeah, advances issues
<beneroth> I'm shadowing (line) and (read) within a special parser fexpr context
<beneroth> bind them to namespaced functions
<beneroth> during (run)
<Regenaxer> sounds good
<beneroth> yeah will play around a bit more and test this concepts. when I have some time I will publish this code :-)
<beneroth> Regenaxer, I would like to have a function to create a namespace, without switching to it ^^
<beneroth> Currently I do:
<beneroth> (let Pref (symbols 'lib: 'pico)
<beneroth> (symbols Prev) )
<beneroth> typo
<beneroth> (let Prev (symbols 'lib: 'pico)
<beneroth> (symbols Prev) )
<Regenaxer> ok, I see
<beneroth> but I ended up having no need for (export) and (private), so maybe don't listen to me xD
<Regenaxer> in pil64 you could do (def 'lib: (cons))
<beneroth> though I'm pretty sure I will settle on this current way now
<Regenaxer> but in pil21
<beneroth> ah right
<beneroth> but?
<Regenaxer> (def 'lib: (cons '~ NIL NIL)
<Regenaxer> (I think ;)
<Regenaxer> different internal format
<beneroth> ok, then I better stay with my current symbols use, to be compatible to both
<Regenaxer> hmm
<beneroth> I intend to primarily stay on pil64 for the foreseeable future.. but when pil21 is released, I could use it for some Mac desktop apps
<Regenaxer> I'm too lazy to backport this to pil64
<beneroth> hehe
<beneroth> don't ;-)
<Regenaxer> ok :)
<Regenaxer> never touch a running system ; en
<beneroth> I can always write a syntax sugar this
<beneroth> I guess there will be a way to differ between pil21 and pil64 within picolisp
<beneroth> like (== 64 64)
<Regenaxer> probably
<Regenaxer> though not this one
<beneroth> ofc
<Regenaxer> Do you really need the 'let'?
<beneroth> this one is separating pil32 from later editions :)
<Regenaxer> (symbols (symbols 'lib: ... ?
<beneroth> T
<beneroth> nice one
<beneroth> better!
<beneroth> thanks
<Regenaxer> btw, the above should be (list '\~ NIL)
<Regenaxer> for pil21
<Regenaxer> needs \ ;)
<beneroth> I see
<Regenaxer> ~ is special
<Regenaxer> meta char
<beneroth> ~ is ugly, you should have used | or so... :P
<beneroth> but too late
<Regenaxer> I think ~ is best
<Regenaxer> less probable that this exists as data
<beneroth> T
<Regenaxer> It is not visible anyway
<beneroth> well... welll ;-)
<beneroth> hihi
<beneroth> it's okay :-)
<Regenaxer> and a list starting with '|' is often there
<Regenaxer> '|' is a function
<beneroth> T
<beneroth> right
<beneroth> I forgot about OR
* beneroth is ashamed and goes into hiding
<Regenaxer> haha :)
<Regenaxer> The *best* value for such internal use is minus zero
<Regenaxer> I use it for uninitialized stack values
<Regenaxer> Cannot appear in normal data
<beneroth> the next guy who claims picolisp has no standard lib has to recite all 500+ builtin functions
<Regenaxer> but GG will not choke
<Regenaxer> indeed
<beneroth> and pil is strongly and static typed, technically
<Regenaxer> Not sure if strong and static apply here
<Regenaxer> Most think about variables when talking about typing
<beneroth> T
<beneroth> Wikipedia:
<beneroth> "In the context of static (compile-time) type systems, type safety usually involves (among other things) a guarantee that the eventual value of any expression will be a legitimate member of that expression's static type."
<beneroth> pil is on the maximum strength here, if we ignore all the duck typing on top of symbols and lists :P
<Regenaxer> yeah, but it refers to compile-time types
<Regenaxer> thus variables
<beneroth> so read-time in lisp :P
<beneroth> haha
<beneroth> such a mess
<Regenaxer> true
<Regenaxer> As you said the other day, the type of a piece of data is immutable
<Regenaxer> so kind of "strong"
<beneroth> picolisp is very scientific: one has to push aside ones assumptions and look at the evident reality :P
orivej_ has joined #picolisp
<Regenaxer> right
orivej has quit [Ping timeout: 265 seconds]
<beneroth> hmm
<beneroth> so all values in picolisp are const, in a way...
<beneroth> not helpful this musing, but funny
<Regenaxer> yep
<Regenaxer> There is no "cast"
<Regenaxer> change the type at runtime
<Regenaxer> it needs a new data item
<Regenaxer> sym <-> num
<beneroth> yeah
<beneroth> non-destructive on value level
<Regenaxer> T
<Regenaxer> But not to confuse with the value of a 'var'
<beneroth> T
<beneroth> the pointer :P
<Regenaxer> yes
<beneroth> I guess (format (1 4)) -> 14 is cheaper than (format '("1" "4")) yes ?
orivej_ has quit [Read error: Connection reset by peer]
orivej has joined #picolisp
<Regenaxer> Almost the same, but '("1" "4") might be cheaper
<Regenaxer> it uses 'pack'
<Regenaxer> so the numbers are first converted to strings
<beneroth> ah good to know
<beneroth> I have a chopped string, and it should begin with a multi-digit number
<Regenaxer> best is (format "12") of course
<Regenaxer> ok, good
<beneroth> so I do (format (make (find '((E) (when (format E) (link E))) String]
<beneroth> so better (link E) not (link @)
<Regenaxer> yes
<Regenaxer> but why 'find'? Only the first one?
<beneroth> yes, it is a prefix
<beneroth> but can be one or two digits..or more
<Regenaxer> (seek ... (not (format ... ?
<Regenaxer> (while (format (car L)) (link (++ L))) ?
<beneroth> yeah
<beneroth> while
<beneroth> yeah the while approach is a bit shorter
<beneroth> thanks!
<Regenaxer> :)
<beneroth> I still learn and improve a lot
<beneroth> from you and me
<Regenaxer> great
<beneroth> when there is no more old code that is bad, then one has stopped improving ;-)
casaca has joined #picolisp
<Regenaxer> beneroth: As 'format' builds a number and thus has a little overhead, I think I would use (while (>= "9" (car L) "0") (link (++ L)))
<Regenaxer> Assumes only digits, no "-" or so
<beneroth> oh nice!
<beneroth> thanks!
<Regenaxer> But it may not be measurable faster ;)
<beneroth> yeah obviously ;)
<beneroth> it's for an import. not a big one, but it could make a difference in a big one
<Regenaxer> yes
<Regenaxer> still the bottleneck for an import is file I/O
<beneroth> T
<beneroth> I read it via pipe from another program which eats the whole file into RAM
alexshendi has joined #picolisp
alexshendi has quit [Client Quit]
orivej has quit [Ping timeout: 264 seconds]
_whitelogger has joined #picolisp
alexshendi has joined #picolisp
<alexshendi> Evening, picolispers!