Re: How to read from a file

2010-06-18 Thread Cecil Westerhof
Op vrijdag 18 jun 2010 16:31 CEST schreef Cecil Westerhof: > When looking at: > http://www.gnu.org/software/guile/docs/faq/OLD-guile-faq.html > > The following code should work: > #!/usr/bin/guile \ > -e main -s > !# > (use-modules (ice-9 readline)) > (activate-readline) > > (define (main args) >

Re: How to read from a file

2010-06-18 Thread Mike Gran
> From: Cecil Westerhof ce...@decebal.nl What am I doing wrong? You're confusing (ice-9 readline) with (ice-9 rdelim). The former adds the ability to edit from the guile prompt. The latter adds a function to read whole lines from ports. I might have written your script this way (use-modules (ic

How to read from a file

2010-06-18 Thread Cecil Westerhof
When looking at: http://www.gnu.org/software/guile/docs/faq/OLD-guile-faq.html The following code should work: #!/usr/bin/guile \ -e main -s !# (use-modules (ice-9 readline)) (activate-readline) (define (main args) (let ((input-file (cadr args)) (out