v_m_v has quit [Remote host closed the connection]
v_m_v has joined #picolisp
v_m_v has quit [Ping timeout: 265 seconds]
anjaa has joined #picolisp
razzy has quit [Ping timeout: 265 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 246 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 246 seconds]
razzy has joined #picolisp
Hunar has joined #picolisp
razzy has quit [Ping timeout: 250 seconds]
razzy has joined #picolisp
Hunar has quit [Quit: Client closed]
razzy has quit [Ping timeout: 250 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 250 seconds]
razzy has joined #picolisp
v_m_v has joined #picolisp
<v_m_v>
how I can search list of elements like (("elem" . 1) ("elem2" . 2 )) if it would be ((elem . 1 )(elem2 . 2 )) then I could use (get ...but with string it is not working
<Regenaxer>
yes, you can use 'assoc'
<Regenaxer>
(cdr (assoc "elem2" Lst))
<Regenaxer>
btw, v_m_v, you talked about '->' the other day
<Regenaxer>
The name is used for another function in pil, but we could define '+>' as a first try as: http://ix.io/3FlI
<v_m_v>
It looks awesome :D
<v_m_v>
Are there any restrinctions in the PiL function names?
<Regenaxer>
Some chars need to be escaped with \
<Regenaxer>
eg parens
<Regenaxer>
or white space
<Regenaxer>
(+> (1 2 3 4) cdr cdr car ((N) (* N N)) inc)
<Regenaxer>
-> 10
<v_m_v>
I really like it :D
<v_m_v>
It is like a Forth notation which for me was always more readable
<Regenaxer>
:)
<v_m_v>
Thank You !!
rob_w has quit [Ping timeout: 264 seconds]
v_m_v has quit [Remote host closed the connection]
v_m_v has joined #picolisp
<v_m_v>
I still can not get the Json which I want ... I've tried the other libs ...but with the same results. So {"events": [{"name": "event1"}, {"name": "event2"}]} is not possible somehow
<Regenaxer>
Yeah, this should be fixed
<Regenaxer>
I think it was in the last pil64
<Regenaxer>
Can you try the version in software-lab.de/picoLisp.tgz ?
<Regenaxer>
This is the latest pil64
rob_w has joined #picolisp
<Regenaxer>
If this json works, we should merge it into the current pil21
<Regenaxer>
I think it uset a 'T' in the s-expr to indicate an array
<v_m_v>
it was packJson right ?
<Regenaxer>
I think so
razzy has quit [Quit: Lost terminal]
<v_m_v>
Regenaxer: I am getting port -- Undefined
<Regenaxer>
'port' is in @lib/net.l
<Regenaxer>
is automatically loaded by the pil startup
<Regenaxer>
in pil64 'port' was in asm in the base system
<v_m_v>
It was jsonPack for changing () to string ?
<Regenaxer>
I meant 'printJson', the line ((=T (car Item))
<Regenaxer>
'packJson' did not exist yet, should be done in an analog way
<Regenaxer>
Perhaps I can investigate in the evening
<aw->
v_m_v: picolisp doesn't have a concept of "arrays", while JSON does, the T is to indicate the following list is an Array
<v_m_v>
I see. Now if I have my list of events how I can packt them into ("event T ( here ) ) ?
<Regenaxer>
Thanks aw-!
<v_m_v>
(cons "event" T (list event1 event2)) ?
<aw->
to differentiate an Array from Object
<aw->
v_m_v: no, you need a list of lists
<aw->
so maybe this: (list (cons "event" T (list "one" "two")))
v_m_v has quit [Remote host closed the connection]
v_m_v has joined #picolisp
<v_m_v>
YES YES YES !!! it is working :D
<Regenaxer>
Cool!
<Regenaxer>
So I should re-insert the 'T' feature into current version? I cannot look now, but will investigate later
<aw->
Regenaxer: if you remove the T then you can't identify an Array from Object
<aw->
i couldn't find a better/simpler alternative
<aw->
so I copied your idea into my library
v_m_v has quit [Remote host closed the connection]
v_m_v has joined #picolisp
<Regenaxer>
I don't remember why I changed this in pil21
rob_w has quit [Remote host closed the connection]
<v_m_v>
aw-: How I can add another field on the level of "events" ? I don't get it ..hmmm
<v_m_v>
ok, I have it :D
<beneroth>
:) gz v_m_v
<v_m_v>
I am testing my simple API with wrk tool. PicoLisp is quite impresive when we will check the memory usage and performance. 650 request/s for 400 simultanious connections
aw- has quit [Quit: Leaving.]
v_m_v has quit [Remote host closed the connection]
v_m_v has joined #picolisp
v_m_v has quit [Remote host closed the connection]