Hacker News new | ask | show | jobs
by DickieStarshine 1654 days ago
I use this:

    (defun get-file (filename)

      (with-open-file (stream filename)

        (loop for line = (read-line stream nil)

              while line

              collect (parse-integer line))))
1 comments

I've so far had good mileage with basically the following:

    (with-input-from-string (stream "1,2,3")
           (let ((*readtable* (copy-readtable)))
             (set-syntax-from-char #\, #\  )
             (loop for num = (read stream nil nil)
                   while num
                   collect num)))