Re: [Chicken-users] Unit ports documentation needs an example or two for non-gods

2012-05-23 Thread Matt Welland
Thanks Kevin and Daniel, great hints. Much appreciated. On Wed, May 23, 2012 at 7:48 AM, Kevin Wortman wrote: > You can do that with > > (call-with-input-file PATH read-lines) > > or > > (read-lines "my-file.txt") > > The latter comes from this page > http://wiki.call-cc.org/chicken-for-python-p

Re: [Chicken-users] segv with stty egg

2012-05-23 Thread Mario Domenech Goulart
Hi Aaron, On Wed, 23 May 2012 10:29:36 -0700 Aaron Patterson wrote: > On Wed, May 23, 2012 at 06:55:31PM +0200, Christian Kellermann wrote: >> Hi Aaron! >> * Aaron Patterson [120523 04:45]: >> > >> > I am trying to read from a tty with Chicken. I've been messing around >> > with the stty egg,

Re: [Chicken-users] segv with stty egg

2012-05-23 Thread Christian Kellermann
Maybe the following patch is a suitable solution? Index: stty.scm === --- stty.scm(revision 26267) +++ stty.scm(working copy) @@ -367,16 +367,16 @@ ;; high-level interface (define (stty . args) + + (and-let* ((port (if (an

Re: [Chicken-users] segv with stty egg

2012-05-23 Thread Christian Kellermann
* Aaron Patterson [120523 19:29]: > On Wed, May 23, 2012 at 06:55:31PM +0200, Christian Kellermann wrote: > > Hi Aaron! > > * Aaron Patterson [120523 04:45]: > > > > > > I am trying to read from a tty with Chicken. I've been messing around > > > with the stty egg, and it seems to be segving on m

Re: [Chicken-users] segv with stty egg

2012-05-23 Thread Aaron Patterson
On Wed, May 23, 2012 at 06:55:31PM +0200, Christian Kellermann wrote: > Hi Aaron! > * Aaron Patterson [120523 04:45]: > > > > I am trying to read from a tty with Chicken. I've been messing around > > with the stty egg, and it seems to be segving on me. Here is the script > > I'm using: > > > >

Re: [Chicken-users] segv with stty egg

2012-05-23 Thread Mario Domenech Goulart
Hi, On Wed, 23 May 2012 18:55:31 +0200 Christian Kellermann wrote: > * Aaron Patterson [120523 04:45]: >> >> I am trying to read from a tty with Chicken. I've been messing around >> with the stty egg, and it seems to be segving on me. Here is the script >> I'm using: >> >> https://gist.git

Re: [Chicken-users] segv with stty egg

2012-05-23 Thread Christian Kellermann
Hi Aaron! * Aaron Patterson [120523 04:45]: > > I am trying to read from a tty with Chicken. I've been messing around > with the stty egg, and it seems to be segving on me. Here is the script > I'm using: > > https://gist.github.com/2772939 > > I know I'm not using the stty egg correctly, but

Re: [Chicken-users] Unit ports documentation needs an example or two for non-gods

2012-05-23 Thread Kevin Wortman
You can do that with (call-with-input-file PATH read-lines) or (read-lines "my-file.txt") The latter comes from this page http://wiki.call-cc.org/chicken-for-python-programmers which documents a few down-and-dirty idioms. Kevin ___ Chicken-users mai

Re: [Chicken-users] Unit ports documentation needs an example or two for non-gods

2012-05-23 Thread Daniel Leslie
I'm personally not aware of any eggs that specifically match your request. But there are these eggs, which I tend to use more often than others: Misc Macros More Macros lookup-table

[Chicken-users] Unit ports documentation needs an example or two for non-gods

2012-05-23 Thread Matt Welland
(port-map FN THUNK) where does the port go? I was sort of hoping for something like this to work: csi> (define inp (open-input-file "~/.bashrc")) csi> (define a (port-map inp read-line)) csi> (close-input-file inp) but it took guessing to figure out the intended usage. How about some trivial e