ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Picolisp latest found at http://www.software-lab.de/down.html | check also http://www.picolisp.com for more information
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #picolisp
karswell has quit [Remote host closed the connection]
karswell has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
alexshendi has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
aw- has joined #picolisp
<aw-> hi all
<aw-> i'm searching for a picolisp CSV parser which can handle strings which are "quoted"
alexshendi has joined #picolisp
<Regenaxer> aw-, I think I have one, iirc also posted here once
<Regenaxer> I have a source here, but it is a full import, not only the parser
<Regenaxer> And the user i/f is in German
<Regenaxer> It accepts various charsets, field delimiters, and DB relations
<Regenaxer> So it is hard for me to explain here out of context
<Regenaxer> But I can pastebin it if you want to dig into it
<aw-> wow interesting
<aw-> yes i'd like to have a look
<aw-> thanks
<Regenaxer> ok, np
<Regenaxer> The parsing is the expression starting at line 88
<Regenaxer> iconv
<Regenaxer> It then first shows all data in a report to the user for confirmation before the actual DB import
<tankf33der> aw-:
orivej has quit [Ping timeout: 264 seconds]
<Regenaxer> tankf33der, cool!
<Regenaxer> Much more focused and readable
<tankf33der> no real usage, maybe help aw
<tankf33der> maybe bugs
<Regenaxer> aw- will find ;)
<aw-> Thanks Regenaxer tankf33der
<aw-> i wrote one as well, but i'm not sure if it's accurate
<aw-> it's a bit different from tankf33der, because it preserves ""
alexshendi has quit [Read error: Connection reset by peer]
<aw-> mine, fails if quotes are unmatched https://gist.github.com/aw/3305f2298c1141b4ae8e1c1bd85b198a
<Regenaxer> (pop 'L) is now shorter and faster (++ L)
<Regenaxer> cause it is so often needed
<aw-> (++ L) ?
<Regenaxer> yes :)
<Regenaxer> 24nov16
<Regenaxer> src/sym.c
<Regenaxer> {src64,pilos/src}/glob.l
<Regenaxer> {src64,pilos/src}/sym.l
<Regenaxer> '++' function
<Regenaxer> src/pico.h
<Regenaxer> src/tab.c
<Regenaxer> mini/src/sym.c
<Regenaxer> mini/src/init.s
<Regenaxer> ersatz/fun.src
<Regenaxer> doc/ref.html
<Regenaxer> ...
<aw-> new function?
<Regenaxer> Not so new
<aw-> ok..
<aw-> i don't understand what you're trying to say
<aw-> i should use (++ L) instead of (pop 'L) ?
<Regenaxer> Exactly, that's what '++' is for
<Regenaxer> Smaller and faster
<Regenaxer> 2 cells vs. 3 cells
<Regenaxer> No evaluation
<aw-> hmm
<aw-> but the doc says "(++ Lst) is equivalent to (pop 'Lst)"
<Regenaxer> Yes. But in fact it works also with 'L' instead of 'Lst'
<aw-> ok
<Regenaxer> No big thing
<aw-> what's the fastest way to count the number of occurrences of a char in a list ?
<aw-> (cnt ... Lst) ?
<Regenaxer> 'sum'
<Regenaxer> yes
<Regenaxer> 'cnt' is better
<aw-> (cnt '((N) (= N "a")) Lst) ?
<aw-> doesn't feel right
<Regenaxer> yes, or (cnt = List '("a"))
<Regenaxer> oops
<Regenaxer> (cnt = List '("a" .)) I mean
<aw-> interesting
<aw-> that's a bit faster
<Regenaxer> yes, because no additional function call overhead
<Regenaxer> '((N) ..) is quite expensive
<aw-> i see
<aw-> ok thanks! time to go home now :)
<Regenaxer> Good night! :)
<aw-> should probably take a day off... haha
<Regenaxer> Always a good idea
aw- has quit [Quit: Leaving.]
alexshendi has joined #picolisp
orivej has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
alexshendi has quit [Ping timeout: 256 seconds]
<beneroth> tankf33der, thanks! seems interesting.
<beneroth> @CSV parsing: yeah, (split) and (line) is only good for pretty small imports. for large imports with possibly hundreds of columns, I'm also using (till) and (peek) and a short FSM using (state)
<beneroth> [IT Security] using anything based on "electron" framework (kinda a thing to build desktop apps as webapps with an inbuilt unpatched old browser) is a bad idea: https://www.trustwave.com/Resources/SpiderLabs-Blog/CVE-2018-1000136---Electron-nodeIntegration-Bypass/
<beneroth> (remote code execution)
<beneroth> list of apps: https://electronjs.org/apps (includes things like the desktop app for the Signal messenger)
alexshendi has joined #picolisp
orivej has joined #picolisp
alexshendi has quit [Ping timeout: 256 seconds]