On Mon 06 Mar 2017 14:50, Thien-Thi Nguyen writes:
> FWIW, we can also use SRFI 13 to save a few cycles:
>
> (use-modules (ice-9 rdelim) (srfi srfi-13))
>
> (define (file->lines filename)
>"Return a list of lines contained in a file."
>(call-with-input-file
>filename
> (l
() l...@gnu.org (Ludovic Courtès)
() Sat, 11 Feb 2017 15:12:00 +0100
> (define (file->lines filename)
> "Returns a list of lines contained in a file"
> (call-with-input-file
> filename
> (lambda (p)
> (let loop ([line (read-line p)])
> (if (eof-obj
Hello!
Sorry for the late reply.
Germán Diago skribis:
> (define (file->lines filename)
> "Returns a list of lines contained in a file"
> (call-with-input-file
> filename
> (lambda (p)
> (let loop ([line (read-line p)])
> (if (eof-object? line) (list)
> (
El El jue, 2 feb 2017 a las 5:24, Arne Babenhauserheide
escribió:
>
> Germán Diago writes:
>
> >> Aside from using a more recent Guile, I do not see obvious
> >> optimizations, however (more exactly: all my tries to speedup the code
> >> only made it slower).
> >
> > I was struggling with using
Germán Diago writes:
>> Aside from using a more recent Guile, I do not see obvious
>> optimizations, however (more exactly: all my tries to speedup the code
>> only made it slower).
>
> I was struggling with using read-line! instead of read-line but
> experimenting in the command line
> I cannot
>
> If I understand your script correctly, you want to grab all lines with
> GDP, sort the values by year and country and output them. Is that right?
>
> As a first warning: the csv module in Python mainly calls into a C-based
> implementation (_csv, see csv.__file__), so it will be hard to beat th
Hi Germán,
If I understand your script correctly, you want to grab all lines with
GDP, sort the values by year and country and output them. Is that right?
As a first warning: the csv module in Python mainly calls into a C-based
implementation (_csv, see csv.__file__), so it will be hard to beat
Hello,
Germán Diago writes:
> Hello everyone,
>
> I did a script that parses some file with the GDP since 1970 for many
> countries. I filter the file and discard uninteresting fields, later I
> write in a format suitable for gnuplot.
>
Wow, you started programming before I was born!
> I did t