jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
fosskers has joined #commonlisp
Ruby has quit [Quit: ZNC - https://znc.in]
Ruby has joined #commonlisp
rendar has joined #commonlisp
rendar has quit [Changing host]
rendar has joined #commonlisp
bpanthi977 has quit [Ping timeout: 260 seconds]
bpanthi977 has joined #commonlisp
leeb has joined #commonlisp
leeb_ has quit [Ping timeout: 265 seconds]
Ruby has quit [Quit: ZNC - https://znc.in]
Ruby has joined #commonlisp
mange has joined #commonlisp
admich1 has quit [Ping timeout: 248 seconds]
random-nick has quit [Ping timeout: 244 seconds]
admich1 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 260 seconds]
Catie has joined #commonlisp
jeffrey has quit [Quit: jeffrey]
bpanthi977 has joined #commonlisp
decweb has quit [Quit: Konversation terminated!]
szkl has quit [Quit: Connection closed for inactivity]
rendar has quit [Ping timeout: 248 seconds]
Lord_of_Life has quit [Ping timeout: 260 seconds]
scymtym has quit [Ping timeout: 276 seconds]
scymtym has joined #commonlisp
_whitelogger has joined #commonlisp
istewart has quit [Quit: Konversation terminated!]
scymtym has quit [Ping timeout: 248 seconds]
scymtym has joined #commonlisp
admich1 has quit [Ping timeout: 245 seconds]
bpanthi978 has joined #commonlisp
admich1 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 276 seconds]
bpanthi978 has quit [Ping timeout: 252 seconds]
lusciouslover has quit [Remote host closed the connection]
lusciouslover has joined #commonlisp
Eoco has quit [Ping timeout: 244 seconds]
remexre has quit [Ping timeout: 252 seconds]
Eoco has joined #commonlisp
lusciouslover has quit [Read error: Connection reset by peer]
lusciouslover has joined #commonlisp
Fade has quit [Server closed connection]
Fade has joined #commonlisp
overclucker has quit [Ping timeout: 248 seconds]
edgar-rft` has joined #commonlisp
edgar-rft has quit [Ping timeout: 252 seconds]
overclucker has joined #commonlisp
mgl has joined #commonlisp
mgl has quit [Client Quit]
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
dra has joined #commonlisp
zwr has quit [Read error: Connection reset by peer]
zwr has joined #commonlisp
uhuh has joined #commonlisp
uhuh has quit [Changing host]
uhuh has joined #commonlisp
pve has joined #commonlisp
admich1 has quit [Ping timeout: 245 seconds]
admich1 has joined #commonlisp
rgherdt has joined #commonlisp
admich1 has quit [Ping timeout: 252 seconds]
admich1 has joined #commonlisp
dra has quit [Quit: Leaving]
dtman34 has quit [Ping timeout: 276 seconds]
dtman34 has joined #commonlisp
uhuh has quit [Remote host closed the connection]
uhuh has joined #commonlisp
uhuh has quit [Changing host]
uhuh has joined #commonlisp
phantomics has joined #commonlisp
phantomics_ has quit [Ping timeout: 252 seconds]
gnoo has quit [Ping timeout: 260 seconds]
BierLiebHaber has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
gnoo has joined #commonlisp
BierLiebHaber has joined #commonlisp
puke has quit [Remote host closed the connection]
puke has joined #commonlisp
johnjaye has joined #commonlisp
uhuh` has joined #commonlisp
uhuh has quit [Ping timeout: 248 seconds]
admich1 has quit [Ping timeout: 252 seconds]
admich1 has joined #commonlisp
mwnaylor has quit [Ping timeout: 260 seconds]
mwnaylor has joined #commonlisp
jeffrey has joined #commonlisp
admich1 has quit [Ping timeout: 260 seconds]
admich1 has joined #commonlisp
fosskers has quit [Remote host closed the connection]
xcombelle has quit [Quit: WeeChat 4.6.3]
jeffrey has quit [Quit: jeffrey]
remexre has joined #commonlisp
uhuh` has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
mwnaylor` has joined #commonlisp
mwnaylor has quit [Ping timeout: 260 seconds]
mwnaylor` has quit [Remote host closed the connection]
jeffrey has joined #commonlisp
mwnaylor has joined #commonlisp
random-nick has joined #commonlisp
teddydd has quit [Server closed connection]
teddydd has joined #commonlisp
johnjaye has quit [Ping timeout: 276 seconds]
johnjaye has joined #commonlisp
treflip has joined #commonlisp
_whitelogger has joined #commonlisp
Lord_of_Life has joined #commonlisp
sammat has joined #commonlisp
admich1 has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
treflip has quit [Ping timeout: 272 seconds]
admich1 has quit [Ping timeout: 245 seconds]
lcn_ has joined #commonlisp
admich1 has joined #commonlisp
lcn_ has quit [Remote host closed the connection]
lcn_ has joined #commonlisp
jeffrey has quit [Quit: jeffrey]
jeffrey has joined #commonlisp
admich1 has quit [Ping timeout: 245 seconds]
admich1 has joined #commonlisp
puke has quit [Quit: puke]
treflip has joined #commonlisp
rgherdt has quit [Ping timeout: 248 seconds]
rgherdt has joined #commonlisp
puke has joined #commonlisp
calx-87 has quit [Ping timeout: 252 seconds]
admich1 has quit [Ping timeout: 276 seconds]
lalalll has joined #commonlisp
calx-87 has joined #commonlisp
notzmv has joined #commonlisp
admich1 has joined #commonlisp
lalalll has quit [Quit: Leaving]
wbooze has joined #commonlisp
decweb has joined #commonlisp
pve has quit [Read error: Connection reset by peer]
shawnw has quit [Ping timeout: 248 seconds]
lalalll has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
wbooze has quit [Quit: Leaving]
bpanthi977 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 260 seconds]
mange has quit [Quit: Zzz...]
sammat has quit [Ping timeout: 272 seconds]
bpanthi977 has joined #commonlisp
lalalll has quit [Changing host]
lalalll has joined #commonlisp
<lalalll> awa
bpanthi977 has quit [Ping timeout: 276 seconds]
bpanthi977 has joined #commonlisp
lalalll_ has joined #commonlisp
lalalll_ has quit [Client Quit]
mathrick has quit [Server closed connection]
mathrick has joined #commonlisp
deriamis has quit [Ping timeout: 260 seconds]
admich1 has quit [Ping timeout: 252 seconds]
lalalll has quit [Quit: Leaving]
lalalll has joined #commonlisp
admich1 has joined #commonlisp
lalalll has quit [Client Quit]
jonatack has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
bpanthi977 has quit [Ping timeout: 260 seconds]
admich1 has joined #commonlisp
bpanthi977 has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
admich1 has quit [Ping timeout: 276 seconds]
admich1 has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
reb has quit [Remote host closed the connection]
ivet89 has joined #commonlisp
treflip has quit [Ping timeout: 252 seconds]
inline has joined #commonlisp
reb has joined #commonlisp
ivet89 has quit [Quit: Client closed]
reb` has joined #commonlisp
reb has quit [Ping timeout: 252 seconds]
admich1 has quit [Ping timeout: 252 seconds]
admich1 has joined #commonlisp
phil_bb has quit [Remote host closed the connection]
bpanthi977 has quit [Ping timeout: 276 seconds]
inline has quit [Quit: Leaving]
bpanthi977 has joined #commonlisp
inline has joined #commonlisp
cage has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
admich1 has quit [Ping timeout: 248 seconds]
admich1 has joined #commonlisp
shawnw has joined #commonlisp
zwr has quit [Read error: Connection reset by peer]
zwr has joined #commonlisp
shka has quit [Remote host closed the connection]
admich1 has quit [Ping timeout: 245 seconds]
admich1 has joined #commonlisp
puke has quit [Ping timeout: 260 seconds]
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
reb`` has joined #commonlisp
reb` has quit [Ping timeout: 252 seconds]
jonatack has quit [Ping timeout: 265 seconds]
admich1 has quit [Ping timeout: 260 seconds]
admich1 has joined #commonlisp
shka has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
admich1 has quit [Ping timeout: 265 seconds]
admich1 has joined #commonlisp
Oladon has joined #commonlisp
mgl has joined #commonlisp
mgl has quit []
admich1 has quit [Ping timeout: 252 seconds]
shka has quit [Quit: Konversation terminated!]
admich1 has joined #commonlisp
shka has joined #commonlisp
bpanthi977 has quit [Quit: bpanthi977]
jonatack has joined #commonlisp
Ruby has quit [Quit: ZNC - https://znc.in]
Ruby has joined #commonlisp
cage has quit [Remote host closed the connection]
mgl has joined #commonlisp
livoreno has joined #commonlisp
notzmv has quit [Ping timeout: 276 seconds]
vidak has joined #commonlisp
thejammahimself has joined #commonlisp
mgl has quit []
phil_bb has joined #commonlisp
louis77 has joined #commonlisp
mgl has joined #commonlisp
admich1 has quit [Ping timeout: 245 seconds]
admich1 has joined #commonlisp
mgl has quit []
dra has joined #commonlisp
dra has quit [Changing host]
dra has joined #commonlisp
<phil_bb> Hey folks, kinda struggling with CL atm... I have a 1.7GB csv file that I need to parse into something more coherent... and it looks like every single library that I stumble upon has issues, since there's quotes in some of the fields, since it's so long, since some of the fields have parens and quotes in them... I'm genuinely not sure what I can do about this to get the full dataset processed. (The dataset is the allCountries file
<phil_bb> GeoNames.org)
<phil_bb> Most of the libraries I have tried end up maxing out my RAM and locking SBCL up. This includes cl-csv, the reader from lisp-stat, read-csv.
<phil_bb> A lot of them don't handle quotes that include separators in them well.
<aeth> Maybe try writing FFI bindings for a C CSV library?
<aeth> Or use UIOP:LAUNCH-PROGRAM and use a shell CSV thing
<phil_bb> I have already tried to clean it up using csvkit
<phil_bb> Alas, that only increased the size to 2.3GB
<phil_bb> My plan is to process it once, and then store it using cl-store in a file for future reference.
<phil_bb> So I don't ever have to deal with this issue again lol
thejammahimself has quit [Remote host closed the connection]
<aeth> have you tried emacs?
<aeth> replace-regexp, string-rectangle, replace-string, etc., are all very useful
<aeth> although maybe it chokes on 1.7 GB
<gilberth> phil_bb: <https://download.geonames.org/export/dump/allCountries.zip> allCountries.txt ? That's a tab separated file not a comma separated file.
triffid has quit [Ping timeout: 244 seconds]
triffid has joined #commonlisp
bpanthi977 has joined #commonlisp
jeffrey has quit [Ping timeout: 276 seconds]
jeffrey has joined #commonlisp
admich1 has quit [Ping timeout: 276 seconds]
rgherdt has quit [Ping timeout: 260 seconds]
admich1 has joined #commonlisp
Ruby2 has joined #commonlisp
Ruby has quit [Ping timeout: 260 seconds]
Lord_Nightmare has quit [Killed (ozone (No Spam))]
Lord_Nightmare has joined #commonlisp
dra has quit [Quit: Leaving]
lcn_ has quit [Remote host closed the connection]
kniffy has quit [Quit: zzzz]
kniffy has joined #commonlisp
kaskal- has quit [Ping timeout: 272 seconds]
josrr has joined #commonlisp
<josrr> phil_bb: fare-csv seems to read the entire file; https://plaster.tymoon.eu/v/7CXE70VRE
<phil_bb> josrr: thanks, I'll try that one. Currently experimenting with cl-csv a little. Something about the way parts of it are quoted doesn't play nice with it.
<phil_bb> gilberth: yes, that, though I am converting it to a csv for the most part, escaping the quotes. Seems to be doing something.
<gilberth> A mere (with-open-file (i "AllCountries.txt") (loop for x = (read-line i nil) while x collect (split-sequence #\tab x))) would have done that too.
<phil_bb> Hm. I'm not sure why but trying to use fare-csv:read-csv-file maxes out my RAM, and the SBCL process freezes up.
Demosthenex has quit [Ping timeout: 248 seconds]
<gilberth> Does it freeze or does it crash when the heap is exhausted. Did you pass --dynamic-space-size to SBCL?
<phil_bb> I have 16GB allocated in the dynamic space size. It gets up to 15.5GB, and the SBCL process becomes unresponsive
<phil_bb> All I'm running really is (fare-csv:read-csv-file *file*)
<phil_bb> sly-interrupt does nothing
<josrr> I'm using --dynamic-space-size 16384, but perhaps read one line at a time
<gilberth> Yes, perhaps it freezes while trying to crash. But something is not right. The file is 1.7GB four times that is 6GB for the strings. It has 13M lines of what a dozen or so rows? Like 2.4G for cons cells. Well below 16GB.
<phil_bb> I'm quite aware. This happens with most libraries I try to use.
Demosthenex has joined #commonlisp
* gilberth tries at home.
<gilberth> phil_bb: I used that LOOP from above. Heap usage according to top is 18GB.
<gilberth> Heap limit is set to 64GB.
<phil_bb> Good lord. How even?
<phil_bb> That's way excessive.
<gilberth> Heap limit was 64GB and SBCL would make huge heaps given that it thinks it may do so. Annoying. But only speed matters. I'm curious and try with a smaller heap.
<gilberth> Question: How to trigger a global GC with SBCL?
<gilberth> gilberth: (sb-ext:gc :full t) looks promising.
<gilberth> phil_bb: Is 16GB your amount of RAM?
<gilberth> phil_bb: I used that LOOP and --dynamic-space-limit 16000 and it worked for me. 66s wall.
<gilberth> SBCL 2.2.9 on macos.
<phil_bb> I have 32GB, but I run a lot of things, I have about 16 left usually. And yes, it does work, but I don't understand the difference.
<phil_bb> Why isn't it working when I want to read the entire thing, but it does when looping?
livoreno has quit [Quit: Connection closed for inactivity]
<gilberth> No idea. I don't know what that lib does. I was just curious because I expected some SBCL heap issue or so.
<phil_bb> hmm time to sleep
<phil_bb> Thanks for the help!
<josrr> I just tried with fare-scv:read-csv-file; the result: https://plaster.tymoon.eu/v/7D1A9DCJU
<phil_bb> whew
<phil_bb> wild
<gilberth> josrr: Only speed matters. Increase your heap limit.
kaskal has joined #commonlisp
<jeffrey> phil_bb, why not process line by line and dump the result to an output stream immediately?
akoana has joined #commonlisp
<phil_bb> Mostly for ease of thinking about it. I'm trying to make a hash-table that will hold all these data points in a nested structure, first. Then my plan is to hold the entire thing in memory so I can inspect the relationship of each point with other points.
<phil_bb> Basically I want to make sure that I can validate that the hash-table matches the raw data
<phil_bb> It's a silly side-project that helps me debrain after work, basically
<phil_bb> nothing serious
jonatack has quit [Ping timeout: 248 seconds]
<gilberth> As this file is #\Tab separated no CSV library is even needed. It's another puzzle piece we don't know what it does without looking. So I would just go with that LOOP. You could also populate your hash table just right in that loop.
<phil_bb> Suppose so. Currently it's not doing anything. I guess the TL;DR of what I'm trying to do is create a human simulator, where all the basic body processes are driven by Lisa (the expert system), and on top of that I want behaviors, but for behaviors I need an environment.
<phil_bb> Since I never planned to finish this ever, I thought what better way than import all of Earth?
<phil_bb> Or, at least a huge chunk of the Earth.
<phil_bb> I'm basically creating complexity for the sake of personal satisfaction here, coding as therapy.
<phil_bb> The loop solution doesn't seem to work for me tbh
<phil_bb> Please ignore the messed up order of nesting, I'm aware
<phil_bb> I'll be getting the continents later, from another source
kyoji has quit [Server closed connection]
<gilberth> cl-csv:read-csv reads a single row?
kyoji has joined #commonlisp
<phil_bb> God dangit!
<phil_bb> Doesn't with-open-file handle this?
<phil_bb> reading it line-by-line?
<phil_bb> (here's me showing how much of a newb I am lol)
<gilberth> Give <https://termbin.com/9g9z> a shot.
<gilberth> phil_bb: WITH-OPEN-FILE just opens a stream. It doesn't read anything or picks lines or so.
<phil_bb> ahhhhhhhh
<jeffrey> isnt that for row doing something you do not want?
<gilberth> If cl-csv:read-csv reads the whole file and returns a list of rows. Try saying for row in (cl-csv:read-csv ...) instead and remove ":while row".
<phil_bb> jeffrey: Yes but we'll see, I just want to get over this hump at the moment.
<jeffrey> nvm I never knew for could be used for variable assignment as well
<jeffrey> as in =
<gilberth> This loop only makes sense if READ-CSV reads a single row. I suspect it would return a list of rows rather. So should be FOR ROW IN not FOR ROW =. And that :WHILE ROW should go away. Or just try that SPLIT-SEQUENCE version of mine.
<gilberth> And make a smaller file for testing!
<gilberth> Or stick a REPEAT 100 clause into the LOOP for testing.
<phil_bb> I see
<phil_bb> thanks
<josrr> phil_bb: I tried increasing --dynamic-space-size to 20000, and fare-csv:read-csv-file still exhausted the heap; gilberth's loop worked with 16384. For splitting the string, I used the function split-sequence from the split-sequence system.
<phil_bb> Nifty
inline has quit [Ping timeout: 252 seconds]
<phil_bb> I was also considering using the data-frames system