libera/#commonlisp - IRC Chatlog
Search
12:33:44
rotateq
I had a CLOS question in mind recently, but then I realized it was again easier than I thought. :) Just how to use FIND-METHOD correctly if a parameter in the lambda list is specialised with eql.
13:58:40
mfiano
I am working with a function that calls externals OS processes and returns a string as the result. This string consists of substrings delimited by tab characters and terminated by newline characters. What would be a decent way to produce a list of lists from this string, where each inner list represents the string cells of each column for a row, and the outer list contains these lists of rows?
14:04:59
mfiano
I never thought to use a csv parser, in part because I didn't know they supported other delimiters.
14:05:50
_death
this specimen seems like it's of a family of formats are usually known as tsv (tab-separated values), analogous to csv
14:07:23
mfiano
(The command I am calling has a switch that removes the first line of column names and transforms arbitrary numbers of whitespace to single tabs)
14:07:55
mfiano
It's meant for easier machine readability, though I do have the option of not using that switch if it makes it easier for Lisp
14:12:45
mfiano
I'm reviving a few thousand line shell script I wrote about 6 months ago, but it outgrew my least favorite host language and is very hard to maintain.
14:13:32
Guest74
there are some data table libraries out there, but afair they parse to their own format.
14:14:10
mfiano
My plan is to parse this data (and other output) into standard-objects, because it can benefit greatly be inheritance and generic dispatch.
14:15:39
mfiano
I'm using a nice wrapper over uiop:run-program that has nice conditions to handle in the event of a failure, instead of all the garbage-in/garbage-out bugs in my original shell script.
14:15:57
Guest74
after seeing what was inside of the csv libraries, I just basically use read-line and split-sequence.