orivej has quit [Read error: Connection reset by peer]
orivej has joined #picolisp
<m_mans>
Hi all!
<aw->
hello m_mans
orivej has quit [Ping timeout: 248 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
Regenaxer has joined #picolisp
<m_mans>
Good morning Regenaxer!
<Regenaxer>
Good morning m_mans!
<m_mans>
I need decoding \Uxxxx in readJson. I'll try aw's version
<Regenaxer>
ok
<m_mans>
Regenaxer: do you plan to add such decoding in your version of json.l?
<aw->
^5
<aw->
hi Regenaxer
<Regenaxer>
Hi aw-!
<m_mans>
sadly Telegram encodes all non-ascii chars by \U...
<aw->
i have some strange code, looking for a better way to write: (assoc "something" (mapcar car *List))
<aw->
m_mans: it's a standard i believe.. however i don't think my lib works with \U but rather \u
<aw->
perhaps i should fix that
<m_mans>
sorry, yes, \u
<aw->
ok
<Regenaxer>
aw-, 'find' is not what you look for?
<m_mans>
btw, aw-, your READMEs are always very nice, thank you!
<aw->
Regenaxer: hmm maybe not
<aw->
m_mans: thanks
<Regenaxer>
'assoc' is a specialized 'find'
<aw->
i see
<aw->
i'm trying to "find" a list where the car is = "something"
<aw->
in this case *List is a list of lists
<Regenaxer>
right
<Regenaxer>
(find '((L) (== 'a (car L))) *List)
<aw->
ah yes
<aw->
that makes sense
<aw->
better than (mapcar car
<Regenaxer>
yes, it avaoids a garbage list
<Regenaxer>
and searches only half on the average
<aw->
awesome
<aw->
thank you!
orivej has joined #picolisp
rob_w has joined #picolisp
orivej has quit [Ping timeout: 252 seconds]
<m_mans>
[app/json.l:55] !? (de json-array-check (Value) (or (= "{" Value) (= "[" Value) (= "]" Value) (lst? Value) (num? Value) (= "-"Value) (= 'true Value) (= 'false Value) (= 'null Value) (err-throw (text "Invalid Array value '@1', must be {' OR '[' OR ']' OR string OR number OR true OR false OR null" Value))))
<m_mans>
de -- Undefined
<m_mans>
aw-: I suppose I should disable namespaces?
<Regenaxer>
pil32?
<m_mans>
pil64
<m_mans>
aw-: why you need to (load (pack (car (file)) "module.l")) ?
<aw->
pil64 disable namespaces
<aw->
m_mans: (load (pack (car (file)))..... to load "module.l" the file relative to the json.l file
<aw->
so you can (load "json.l") from anywhere, and it will always find the module.l
<m_mans>
no, I mean in case of disabled NS MODULE_INFO will be overwritten by some other module
<m_mans>
so maybe move it into "(unless (= "false" (sys..." ?
<aw->
indeed
<m_mans>
or maybe that variable is used just in tests, then OK
<aw->
yeah it's not really important ;)
<aw->
doesn't matter if it gets overwritten. it's just something i put there for my own management/tracking of my libs
<aw->
but you make me realize, maybe loading module.l should be optional
<aw->
can't load json.l without module.l .. which is kind of annoying for those who just want to copy the file around
orivej has joined #picolisp
<aw->
Regenaxer: what version of pil did you remove (local) ?
<m_mans>
I see that all strings are chop'ed. No way to pack them?
<aw->
m_mans: ??
<m_mans>
oh, sorry, seems I said nonsence
<Regenaxer>
It was not removed, but the semantics changed
<aw->
Regenaxer: in 32-bit pil
<aw->
m_mans: they are chopped then repacked later
<Regenaxer>
in pil32 ther was never 'local'
<aw->
assuming it's a string
<aw->
there was never local?! oh i should just check for it then
<Regenaxer>
local was only for namespaces
<aw->
i see
<aw->
ah but, to keep backwards compatibility, i can't only check for 'local
<Regenaxer>
I would check for 'symbols'
<Regenaxer>
(if symbols ...
<m_mans>
I used json-parse-string instead of decode :))
orivej has quit [Ping timeout: 248 seconds]
<aw->
m_mans: no problem, you're free to "borrow" any of the code as you wish
<aw->
Regenaxer: i was sure (local) existed in pil 16.x
<aw->
32-bit
<m_mans>
yes, thanks! I just got wrong result by using wrong function
<aw->
m_mans: you didn't RTM ;)
<Regenaxer>
aw-, yes, existed I think, for namespaces
<Regenaxer>
Namespaces were since 30dec11 picoLisp-3.0.9
<beneroth>
"This recommendation is not applicable to protocols that already
<beneroth>
those forms rather than using escapes. This recommendation applies
<beneroth>
to cases, including transition arrangements, in which that is not
<beneroth>
when protocols are internationalized, it is preferable to accept
<beneroth>
accept native UTF-8 or some other encoding of Unicode. In general,
<beneroth>
practical."
<beneroth>
in my case, the HTTP data I get is marked as "UTF-8" encoded but still uses \uXXXX notation for some characters
orivej has joined #picolisp
<beneroth>
PHP API ...
<beneroth>
so technically its ASCII
<m_mans>
damn, I've forgotten about (retire) thing. I've added additional (fork) in 'go function to make loop for Telegram bot API. But the application goes down by inactivity timeout
<aw->
beneroth: PHP ...
<beneroth>
aw-, aye...
<aw->
ahaha
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
<aw->
what is equivalent of (cdr (caar List)) ?
<aw->
oh i got it: (cdaar List)
<tankfeeder>
magic, right? :)
<aw->
i want (cdaaaaar List)
<tankfeeder>
are you sure ?
<aw->
no
<Regenaxer>
Max is 4 d's or a's
<tankfeeder>
if yes then write function cda + caaaa
<Regenaxer>
(by length sort (what "c@r"))
<tankfeeder>
...cdddar cddddr center)
<tankfeeder>
:)
<Regenaxer>
yes, ignore center ;)
<Regenaxer>
may be more c@d depending on the current application
<Regenaxer>
c@r
<tankfeeder>
max 4 is enough for most applications
<C-Keen>
all these issues have been fixed, OpenBSD did a review of the whole stack
<beneroth>
oh, maybe I should watch the talk to the end first, then :D
<beneroth>
thx
<C-Keen>
BSDs still have a magnitude less exploitable bugs than the linux kernel due to their dev process
<C-Keen>
DRM code is the scary one though
<beneroth>
yeah just watching that part. but DRM is a bad idea anyways...
<beneroth>
I wonder how much is dev quality and how much is smaller codebase? (though I would say that is related)
<C-Keen>
the openbsd guys are the only ones that are transparently combing the whole code base for classes of bugs AFAIK
<beneroth>
oh DRM is not DRM
<beneroth>
right, the presenter clearly applauds OpenBSD for code quality
orivej has quit [Read error: Connection reset by peer]
orivej has joined #picolisp
miskatonic has joined #picolisp
<beneroth>
quote from theo "Low code quality keeps haunting our entire industry. That, and sloppy programmers who don't understand the frameworks they work within. They're like plumbers high on glue."
<beneroth>
so true
orivej has quit [Ping timeout: 240 seconds]
<miskatonic>
replace all sloppy programmers by Regenaxer, and the problem is fixed
<beneroth>
not enough Regenaxers. you have to become one now!
<beneroth>
(and yes, you can. it's a rather simple recipe. requires dedication and discipline, though)
orivej has joined #picolisp
<cess11>
'caddddddddr could probably be done with '(de caddddddddr (Lst) (caddddr (cddddr Lst]
<cess11>
haven't tried, I usually just stack them right in the code when it happens to be the most convenient way of reaching into lists
mario-go` has joined #picolisp
mario-go` is now known as mario-goulart`
mario-goulart has quit [Ping timeout: 256 seconds]
mario-goulart` is now known as mario-goulart
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
<aw->
cess11 i usually look at those situations as though there's a deeper problem ;)
rob_w has quit [Remote host closed the connection]
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
orivej_ has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #picolisp
orivej_ has quit [Ping timeout: 268 seconds]
rob_w has joined #picolisp
rob_w has quit [Changing host]
rob_w has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
rob_w has quit [Remote host closed the connection]
orivej has joined #picolisp
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
mtsd has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 276 seconds]
aw- has quit [Quit: Leaving.]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
alexshendi has joined #picolisp
alexshendi has quit [Ping timeout: 248 seconds]
<rick42>
hello, world!
<rick42>
:)
<Regenaxer>
Hello rick42!
<beneroth>
hi rick42
<rick42>
hi Regenaxer, beneroth! (ret)
<rick42>
i had to re-park the car :)
<Regenaxer>
Good, not the cdr!
<rick42>
lol yes!
<rick42>
if pil had verb "park": (park 'Garage (car L))
<rick42>
:)
<Regenaxer>
yeah, we must find a meaningful function for it
<rick42>
yes, nth and get are so much better than a long c[ad]+r
<rick42>
easier to read, i should say
<Regenaxer>
T
<rick42>
so i noticed that OpenBSD seems well represented among pil users. i wonder if the ratio is higher than in the general programmer population. idk
<rick42>
good to see though
<Regenaxer>
yep. A sign of independent minds perhaps?
<rick42>
i don't mean to laugh at anybody's misfortune (and this time wasn'e too bad) but i wish that more people would remember/realize how fragile npm is. bandwgonning is easy. engineering is hard.
<rick42>
apparently they have problems with people spamming npm and they tried automating not only the detection but at least some of the rectification/remedy
<rick42>
their "ai" isn't that good yet. still need peeps
alexshendi has joined #picolisp
<rick42>
hello alexshendi!
<alexshendi>
Hi rick42, how are you doing?
orivej has quit [Ping timeout: 248 seconds]
<rick42>
alexshendi: i am well. how are you? how was ccc?
<Regenaxer>
Hi alexshendi!
<alexshendi>
ccc (34C3) was great! Was a bit tired though afterwards :)
<alexshendi>
Hi Regenaxer,!
<Regenaxer>
:)
orivej has joined #picolisp
miskatonic has joined #picolisp
orivej has quit [Ping timeout: 252 seconds]
orivej has joined #picolisp
miskatonic has quit [Remote host closed the connection]
alexshendi has quit [Ping timeout: 255 seconds]
<beneroth>
rick42, haha, thx
<beneroth>
rofl
<tankfeeder>
i've implement URL parser
<beneroth>
yay nice
<beneroth>
looking forward to look into your code :)
<beneroth>
but going to bed now, good night all :)