Re: [racket] REPL input chunking for non-sexp language

2012-12-10 Thread Matthew Flatt
When you run plain `racket', the REPL is `read-eval-print-loop', which uses `(current-prompt-read)', `(current-eval)', and `(current-print)'. Any line-editing capability is whatever the terminal does, which normally means that input is sent to the reader when you hit Return. Even if you load `read

Re: [racket] Using _fun for callbacks

2012-12-10 Thread Matthew Flatt
I've run into this, too, and I don't have a better solution right now. It's not clear to me what happens with fancy argument specifications when the function description is used for a callback, but I've never gotten around to sorting it out. At Sat, 8 Dec 2012 12:36:46 -0800, Eric Dobson wrote: >

Re: [racket] circular lists are not lists or sequences

2012-12-10 Thread Matthew Flatt
We did change `in-list' to add a `list?' guard, so the behavior is as intended. Maybe we need a new `in-' sequence constructor that works as long as pairs appear for as far as you demand sequence elements? At Mon, 03 Dec 2012 18:12:51 -0500, David Van Horn wrote: > I have some code that's been bro

Re: [racket] circular lists are not lists or sequences

2012-12-10 Thread David Van Horn
On 12/10/12 10:14 AM, Matthew Flatt wrote: We did change `in-list' to add a `list?' guard, so the behavior is as intended. Maybe we need a new `in-' sequence constructor that works as long as pairs appear for as far as you demand sequence elements? Yes, an `in-pairs' seems right to me. I can s

Re: [racket] REPL input chunking for non-sexp language

2012-12-10 Thread Jay McCarthy
The datalog language tries to do this too. There's a repl-submit? predicate you can use and I have weird two-phase reading system to deal with the EOF issue: https://github.com/plt/racket/blob/master/collects/datalog/lang/configure-runtime.rkt https://github.com/plt/racket/blob/master/collects/d

Re: [racket] circular lists are not lists or sequences

2012-12-10 Thread Matthias Felleisen
list? means 'inductively constructed' data. On Dec 10, 2012, at 10:21 AM, David Van Horn wrote: > On 12/10/12 10:14 AM, Matthew Flatt wrote: >> We did change `in-list' to add a `list?' guard, so the behavior is as >> intended. Maybe we need a new `in-' sequence constructor that works as >> lon

Re: [racket] circular lists are not lists or sequences

2012-12-10 Thread David Van Horn
On 12/10/12 10:42 AM, Matthias Felleisen wrote: list? means 'inductively constructed' data. I guess my issue is that I don't see that written down anywhere. David Racket Users list: http://lists.racket-lang.org/users

Re: [racket] circular lists are not lists or sequences

2012-12-10 Thread Matthias Felleisen
I disagree. See first sentence of list? docs: > Returns #t if v is a list: either the empty list, or a pair whose second > element is a list. -- Matthias On Dec 10, 2012, at 10:43 AM, David Van Horn wrote: > On 12/10/12 10:42 AM, Matthias Felleisen wrote: >> >> list? means 'inductivel

Re: [racket] Create executable for "Pretty Big" legacy program

2012-12-10 Thread Matthew Flatt
Sorry for the long delay. Stand-alone executables are not generally supported for non-module languages. It's possible to make something work, however, by using a module that `load's your Pretty Big program after setting up a namespace. #lang racket/base (require (for-syntax racket/base)

Re: [racket] circular lists are not lists or sequences

2012-12-10 Thread David Van Horn
On 12/10/12 10:46 AM, Matthias Felleisen wrote: I disagree. See first sentence of list? docs: Returns #t if v is a list: either the empty list, or a pair whose second element is a list. It's not clear whether this is the biggest set or the smallest set that satisfies this spec. (But OK,

Re: [racket] circular lists are not lists or sequences

2012-12-10 Thread Jens Axel Søgaard
2012/12/10 David Van Horn : > On 12/10/12 10:14 AM, Matthew Flatt wrote: >> >> We did change `in-list' to add a `list?' guard, so the behavior is as >> intended. Maybe we need a new `in-' sequence constructor that works as >> long as pairs appear for as far as you demand sequence elements? > > > Ye

Re: [racket] circular lists are not lists or sequences

2012-12-10 Thread Matthias Felleisen
If it denoted the largest set, it wouldn't be very Rackety, especially the remark in the docs that it exploits cached information so that it can get the response in (near-) constant time. Having said this, I would like to argue for an exploration of co-inductive programming in Racket. #lang

Re: [racket] Create executable for "Pretty Big" legacy program

2012-12-10 Thread Bas Steunebrink
Interesting; thanks Matthew! Your comment implies that currently, the availability of the "Create Executable" menu option for non-module language is somewhat misleading. May I suggest that the DrRacket documentation be changed to reflect the fact that compilation of non-module languages is not

Re: [racket] REPL input chunking for non-sexp language

2012-12-10 Thread Robby Findler
Why do you need a weird two-phase reading system to deal with the EOF issue? Robby On Monday, December 10, 2012, Jay McCarthy wrote: > The datalog language tries to do this too. > > There's a repl-submit? predicate you can use and I have weird two-phase > reading system to deal with the EOF issu

Re: [racket] REPL input chunking for non-sexp language

2012-12-10 Thread Jay McCarthy
I don't think I need to. The DrRacket EOF insertion isn't (or wasn't) documented, so I just hacked and experimented until I got it working. There's probably a better way to do it (which is what my comment on the code says.) On Mon, Dec 10, 2012 at 10:09 AM, Robby Findler wrote: > Why do you nee

Re: [racket] Math library ready for testing

2012-12-10 Thread Martin Neal
First - I love the library. There's so much functionality that it's going to take quite some time to explore it all I'd love to see an `in-primes` function added to math/number-theory

Re: [racket] Math library ready for testing

2012-12-10 Thread Neil Toronto
On 12/09/2012 04:52 AM, Jens Axel Søgaard wrote: The matrix library uses arrays to represent the matrices. An 2x3 matrix can be constructed as: (matrix/dim 2 3 1 2 3 4 5 6) (list->matrix '[[1 2 3] [4 5 6]]) (for/matrix: : Number 2 3 ([