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
wineroots has quit [Remote host closed the connection]
mmmattyx has quit [Quit: Connection closed for inactivity]
orivej has quit [Ping timeout: 265 seconds]
wineroots has joined #picolisp
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
aw- has joined #picolisp
orivej has joined #picolisp
mtsd has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
rob_w has joined #picolisp
<Regenaxer>
clacke has quit [Ping timeout: 248 seconds]
theruran_ has quit [Ping timeout: 248 seconds]
theruran_ has joined #picolisp
clacke has joined #picolisp
tankf33der has quit [Quit: the lounge - https://webirc.envs.net]
tankf33der has joined #picolisp
aw- has quit [Quit: Leaving.]
aw- has joined #picolisp
aw- has quit [Quit: Leaving.]
aw- has joined #picolisp
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
mmmattyx has joined #picolisp
rob_w has quit [Quit: Leaving]
<Regenaxer> tankf33der, I added also an 'enum?' function to be able to test an entry for (non)existence, without creating it immediately
<tankf33der> Ok
lodsw has quit [Read error: Connection reset by peer]
lodsw has joined #picolisp
olaf_h has joined #picolisp
<olaf_h> hi all
<Regenaxer> Hi olaf_h!
<olaf_h> nice to see you :-)
<Regenaxer> :)
<olaf_h> but .... of course I have a simple question ....
<Regenaxer> good! :)
<olaf_h> I'm playing around again with the serverSentEvents to steer the svg image remote
<olaf_h> so following line works fine: (serverSentEvent "t2x4" '*T2x4)
<olaf_h> after that I can change the text by sending with (serverSend *T2x4 "foo")
<Regenaxer> ok
<Regenaxer> hmm, but ("foo") is the Prg then
<olaf_h> now: how to compose that line, I tried: (serverSentEvent (pack "t" 2 "x" 4) (intern (pack "*T" 2 "x" 4)))
<olaf_h> no, "foo" works for me - I think I changed the original javascript code because I am able to change attributes, too
<Regenaxer> ah, ok
<olaf_h> my problem is, that 'intern' might be the wrong function to imitate the literal : '*T2x4
<Regenaxer> No, it is fine
<olaf_h> literally line works: (serverSentEvent "t2x4" '*T2x4)
<Regenaxer> Isn't the value of that interna sym the socket number?
<Regenaxer> (de serverSentEvent (Id Var ... ?
<Regenaxer> '*T2x4 should be the same as (intern (pack "*T" 2 "x" 4))
<Regenaxer> if there is no changed namespace or sth
<Regenaxer> What gives (val (intern (pack "*T" 2 "x" 4))) ?
<olaf_h> -> *T2x4
<Regenaxer> ah, sorry!
<olaf_h> but this is the doesnt-work-repl .... wait I should try with the literal working example, right?
<Regenaxer> yes, it interns the transient
<Regenaxer> and this points to itself
<olaf_h> for each xml element I want to 'serverSend' sth to I have to create such a global Var
<olaf_h> it works nice when created with literal lines.
<Regenaxer> Is this pil64?
<olaf_h> yes
<Regenaxer> I think in pil21 it works
<olaf_h> .... sorry :-) ....
<Regenaxer> hmm, but in pil64 too
<Regenaxer> I'm wrong above
<Regenaxer> both work
<Regenaxer> : (val (intern (pack (chop 'car))))
<Regenaxer> -> -25280637685
<Regenaxer> The problem is that you probably intern *before* the symbol exists
<Regenaxer> Is that the case?
<olaf_h> yes, when calling 'intern' there is no symbol with the name I pack together
<olaf_h> but same, when calling the literal line
<Regenaxer> yes, so it points to itself
<olaf_h> repl says: "\"*T1x5\"" -- Small number expected
<Regenaxer> Yes, as I said
<Regenaxer> : (val "abc")
<Regenaxer> -> "abc"
<olaf_h> does the literal line 'create+intern' the symbol
<Regenaxer> Which literal?
<olaf_h> literal line works: (serverSentEvent "t2x4" '*T2x4)
<Regenaxer> yes, then '*T2x4' is initialized with NIL
<olaf_h> gives error on repl: (serverSentEvent (pack "t" 2 "x" 4) (intern (pack "*T" 2 "x" 4)))
<olaf_h> *T2x4 -- Small number expected
<Regenaxer> but "*T2x" is s'*T2x4)
<Regenaxer> but "*T2x" is "*T2x4"
<olaf_h> ahhhh.... should I try ? (let V (pack ......) (serverSentEvent ..... V) ?
<Regenaxer> I don't remember where/when the Var receives the socket value
<Regenaxer> if there is a 'default'
<Regenaxer> then it does not work because *T2x4 -> *T2x4
<olaf_h> is it possible that serverSentEvent does not eval the intern/pack part?
<Regenaxer> and not NIL
<Regenaxer> No, I just tried to explain!
<Regenaxer> It is the *value* of the symbol you interneed
<Regenaxer> Perhaps: (def (intern (pack ...)))
<Regenaxer> so it is set to NIL
<Regenaxer> I don't remember when the value gets set
<Regenaxer> Yes!
<Regenaxer> (con @ (cons Var (unless (val Var) Prg)))
<Regenaxer> this line!
<Regenaxer> so (def (intern (pack ...))) should work
<Regenaxer> Var is *T2x4 but it is not NIL
<olaf_h> .... I try ....
<Regenaxer> Surely works now
<Regenaxer> Do you need to create such internal symaols?
<Regenaxer> Perhaps better use anonymous symbols?
<Regenaxer> With (box)
<Regenaxer> is initialized to NIL
<olaf_h> no 'small number expected' any more, thank you
<Regenaxer> good
<Regenaxer> And how about (box)?
<olaf_h> The symbol is the target argument for serverSend : (serverSend *T1x5 "text to send")
<olaf_h> perhaps I will extract the minimal issue case and post it in the list
<Regenaxer> ok
<olaf_h> ... no error but it does not work and perhaps it's a problem of read time vs or so .... ? ..... I thought it would be easy to replace the literal 'T*2x5 by (intern (pack .... .....
<olaf_h> thank you for your time !
<Regenaxer> yeah, so ok
<Regenaxer> I don't remember the exact mechanism
<Regenaxer> welcome :)
<olaf_h> works now - thank you! I looked into the lines you mentioned above - in function serverSentEvent,
<olaf_h> now with the (def (intern ...)) before serverSentEvent it works as expected. Thanks a lot !
<Regenaxer> Yeah, it assumes a global variable
<Regenaxer> which is NIL initially
<Regenaxer> :)
olaf_h has quit [Quit: Leaving]
mtsd has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 268 seconds]