Re: [Chicken-users] read file into a list of lists

2016-07-12 Thread Jinsong Liang
Hi Arthur, I need a list of lists because each line has more than one number. You first solution works for me. All I need to do is to add an extra string-split call, which returns a list. Thanks a lot! Jinsong On Tue, Jul 12, 2016 at 11:52 PM, Arthur Maciel wrote: >

Re: [Chicken-users] read file into a list of lists

2016-07-12 Thread Arthur Maciel
Although I can't imagine why you'd need it, but in order to get list of lists you could do: (define (read-all-lines filename) (with-input-from-file filename (lambda () (map (lambda (x) (list (string->number x))) (read-lines) I'm

Re: [Chicken-users] read file into a list of lists

2016-07-12 Thread Jinsong Liang
Hi Arthur, This simplifies my code a lot! I will give it a try. Thank you! Jinsong On Tue, Jul 12, 2016 at 11:45 PM, Arthur Maciel wrote: > Jinsong, the closest solution I can think of is the read-lines procedure, > which returns a list of strings (each string a line

Re: [Chicken-users] read file into a list of lists

2016-07-12 Thread Arthur Maciel
Jinsong, the closest solution I can think of is the read-lines procedure, which returns a list of strings (each string a line read). http://api.call-cc.org/doc/extras/read-lines Supposing you have a number per line, you could use string->number to get the result. An example would be: (define

[Chicken-users] read file into a list of lists

2016-07-12 Thread Jinsong Liang
Hi, I need to read a file (lines of numbers) into a list of lists with each line a list. I wrote the following function to do it: (define (read-all-lines file-name) (let ([output '()]) (let ([p (open-input-file file-name)]) (let f ([x (read-line p)]) (if (eof-object? x)

Re: [Chicken-users] CHICKEN meetup reminder

2016-07-12 Thread Vasilij Schneidermann
Hello, I'll be in Nuremberg from Friday noon to Sunday noon. I'm fine with the cheapest accomodation which would be the A Hostel at the central station. Their best offers are for a room of four (49,40€) or six (45,60€) beds respectively. Please contact me if you're interested in sharing one

Re: [Chicken-users] Asynchronous I/O Egg Release

2016-07-12 Thread Mario Domenech Goulart
Hi Robert, On Wed, 29 Jun 2016 19:26:48 -0600 Robert Smiley wrote: > I have created an asynchronous I/O egg for chicken. Would it be > possible to have it added to the egg-locations file in subversion? > > Here is the repository > > https://github.com/yarnoiser/async-io

Re: [Chicken-users] CHICKEN meetup reminder

2016-07-12 Thread Kooda
On Tue, 12 Jul 2016 11:11:05 +0200, Christian Kellermann wrote: > > Dear CHICKEN-fans, > > this is a reminder that the CHICKEN Meetup will take place on > > September 23-25th in Nuremberg, Germany > > http://wiki.call-cc.org/event/chicken-summer-2016 > Do we try to arrange for a common hotel

[Chicken-users] CHICKEN meetup reminder

2016-07-12 Thread Christian Kellermann
Dear CHICKEN-fans, this is a reminder that the CHICKEN Meetup will take place on September 23-25th in Nuremberg, Germany http://wiki.call-cc.org/event/chicken-summer-2016 So arrange your travel today! It might be helpful if attendees add a table to the wiki when they are planning to arrive