[racket] datum<->syntax with same context, yet "unbound identifier"

2012-11-20 Thread Greg Hendershott
I've been struggling to get something working. Jon and Asumu leant me a hand on #racket. I learned some ways to use patterns instead of resorting to datum->syntax, which I can use in the future. But for what I'm doing now (I need to sort arguments for a lambda) I don't see any way around running th

[racket] Scheme's place in the world

2012-11-20 Thread Hugh Aguilar
Good job on being one of the very few HLL programmers to grasp the concept of mixed-precision integer arithmetic! Assembly language programmers understand this idea easily, but I almost never meet an HLL programmer who gets it. I have a long history programming in Forth. Now I'm writing my own l

[racket] provide and require in submodules

2012-11-20 Thread Harry Spier
Slight correction. Comment line was too long and wrapped over. -- Forwarded message -- From: Harry Spier Date: Tue, Nov 20, 2012 at 11:19 PM Subject: provide and require in submodules To: users Dear list members, This works in DrRacket: definitions window --

[racket] provide and require in submodules

2012-11-20 Thread Harry Spier
Dear list members, This works in DrRacket: definitions window - #lang racket (module+ server (provide a-from-server) (define a-from-server 'a-from-server)) (module+ client (module server2 racket (provide b-from-server2) (define b-from-server2 'b-from-server2)) (require (s

Re: [racket] bracket conversion?

2012-11-20 Thread John Clements
On Nov 20, 2012, at 3:53 PM, Robby Findler wrote: > I think one way to do it would be to use read-syntax to get the > expression, but then also put the file into a string. Walk the > expression and look for patterns that you want to change rounds to > squares and then mutate the string and write

Re: [racket] bracket conversion?

2012-11-20 Thread Robby Findler
I think one way to do it would be to use read-syntax to get the expression, but then also put the file into a string. Walk the expression and look for patterns that you want to change rounds to squares and then mutate the string and write the file back out again. Use the position field of the synta

Re: [racket] bracket conversion?

2012-11-20 Thread John Clements
On Nov 20, 2012, at 11:28 AM, Eric Tanter wrote: > Thanks John, that's very helpful! > > Any idea about a whole-file racketify in DrRacket? That's a toughy. What you want is to be able to invert (read-syntax). It seems to me that such a thing should be possible in many of the racket languages,

Re: [racket] TR Base-env spelling.

2012-11-20 Thread Vincent St-Amour
Good catch! Fixed. Thanks! Vincent At Tue, 13 Nov 2012 13:11:27 -0500, Ray Racine wrote: > > [1 ] > [1.1 ] > Should make-HeterogenousVector be make-HeterogeneousVector? > > Note extra 'e' in 'neous'. > > Ray > [1.2 ] > > [2 ] > > Racket Users list: > http://list

[racket] CFP: JFP Special Issue on Run-Time Systems and Target Platforms for Functional Languages

2012-11-20 Thread Michael Sperber
Special Issue on Run-Time Systems and Target Platforms for Functional Languages Submission Deadline: 30 June 2013. Expected Publication Date: May 2014 Submission via: http://journals.cambridge.org/action/displaySpecialPage?pageId=4220 The Journal of Functional Programming will devote a special i

Re: [racket] bracket conversion?

2012-11-20 Thread Eric Tanter
Thanks John, that's very helpful! Any idea about a whole-file racketify in DrRacket? -- Éric On Nov 20, 2012, at 3:16 PM, John Clements wrote: > > On Nov 20, 2012, at 10:01 AM, Eric Tanter wrote: > >> Hi, >> >> I'm converting code written with only standard parentheses, introducing >> squa

Re: [racket] bracket conversion?

2012-11-20 Thread John Clements
On Nov 20, 2012, at 10:01 AM, Eric Tanter wrote: > Hi, > > I'm converting code written with only standard parentheses, introducing > squared ones where appropriate. > > This is obviously not very fun (I'm converting all of OOPLAI), and it would > be great if there'd be a way to select an open

Re: [racket] bracket conversion?

2012-11-20 Thread Carl Eastlund
My emacs mode at https://github.com/carl-eastlund/simple-sexp uses meta+[ to bracket-ify the following s-expression. Same for meta+( and meta+{, although it doesn't always get reader macros right such as '( ... ) or #,( ... ). It tends to mis-detect them as non-parenthesized and leave them alone.

Re: [racket] bracket conversion?

2012-11-20 Thread Eric Tanter
(even better would be a way to racketify a whole file at once -- a dream?) -- Éric On Nov 20, 2012, at 3:01 PM, Eric Tanter wrote: > Hi, > > I'm converting code written with only standard parentheses, introducing > squared ones where appropriate. > > This is obviously not very fun (I'm conve

[racket] bracket conversion?

2012-11-20 Thread Eric Tanter
Hi, I'm converting code written with only standard parentheses, introducing squared ones where appropriate. This is obviously not very fun (I'm converting all of OOPLAI), and it would be great if there'd be a way to select an open paren and "convert" it so that the matching closing paren is ch

Re: [racket] Case with strings: normal behavior?

2012-11-20 Thread Jon Zeppieri
On Tue, Nov 20, 2012 at 11:54 AM, Jon Zeppieri wrote: > (Well, maybe not hash tables.) > I take that back. Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Case with strings: normal behavior?

2012-11-20 Thread Jon Zeppieri
The obvious way to handle strings is to turn the constants into symbols at expansion time, and dispatch on (string->symbol ), just like we handle chars by turning them into fixnums and using fixnum dispatch. After that, it's a question of whether you want case to work for lists, vectors, syntactic

Re: [racket] printer-dc% and end-doc

2012-11-20 Thread Nikolaus Klepp
Thank you, it's working :-) Am Dienstag, 20. November 2012 schrieb Matthew Flatt: > I've pushed a repair for this bug to the git repo. Meanwhile, a > workaround is to wrap the `end-doc' call as > > (with-handlers ([exn:fail:contract? void]) >(send dc end-doc)) > > At Tue, 20 Nov 2012 09:20:06

Re: [racket] printer-dc% and end-doc

2012-11-20 Thread Matthew Flatt
I've pushed a repair for this bug to the git repo. Meanwhile, a workaround is to wrap the `end-doc' call as (with-handlers ([exn:fail:contract? void]) (send dc end-doc)) At Tue, 20 Nov 2012 09:20:06 +0100, "Nikolaus Klepp" wrote: > Thanks to Matthew I have a printer dialog :-) > > I can actu

Re: [racket] Case with strings: normal behavior?

2012-11-20 Thread Hendrik Boom
On Tue, Nov 20, 2012 at 07:42:46AM -0600, Robby Findler wrote: > On Tue, Nov 20, 2012 at 12:14 AM, David T. Pierson wrote: > > On Mon, Nov 19, 2012 at 06:13:09AM -0700, Matthew Flatt wrote: > >> Should we change `case' to use `equal?' instead of `eqv?'? I can't > >> think of a good reason to stick

Re: [racket] LC53

2012-11-20 Thread Hendrik Boom
On Tue, Nov 20, 2012 at 11:02:06AM +, Norman Gray wrote: > > Hugh, greetings. > > I think list members might experience a certain amount of surprise at your > conclusions... > > On 2012 Nov 20, at 02:34, Hugh Aguilar wrote: > > > For a numerical program it is necessary to have mixed-precis

Re: [racket] Case with strings: normal behavior?

2012-11-20 Thread Robby Findler
On Tue, Nov 20, 2012 at 12:14 AM, David T. Pierson wrote: > On Mon, Nov 19, 2012 at 06:13:09AM -0700, Matthew Flatt wrote: >> Should we change `case' to use `equal?' instead of `eqv?'? I can't >> think of a good reason to stick with `eqv?'. > > My first reaction to this was that such a change woul

Re: [racket] LC53

2012-11-20 Thread Norman Gray
Hugh, greetings. I think list members might experience a certain amount of surprise at your conclusions... On 2012 Nov 20, at 02:34, Hugh Aguilar wrote: > For a numerical program it is necessary to have mixed-precision arithmetic. > [...] Scheme, Python, Ruby, C/C++, Fortran, Java, etc., don'

Re: [racket] handin server bugs? (was Re: handin server error)

2012-11-20 Thread Jordan Johnson
Many thanks for the response, Matthew. When I realized (after posting) that v5.3 changed the server's behavior, I just started running the server under the 5.2 installation I still had on my Mac, but I will pull down the new version with your fixes sometime soon, so thanks a bunch! Working wit

[racket] printer-dc% and end-doc

2012-11-20 Thread Mag. Dr. Nikolaus Klepp
Thanks to Matthew I have a printer dialog :-) I can actually print a page, but (send dc end-doc) throws an error. Example: (define pss (get-page-setup-from-user "Drucke das Wunderwerk")) (when pss (current-ps-setup pss) (define dc (new printer-dc%)) (send dc start-doc "") (sen

[racket] printer-dc% and end-doc

2012-11-20 Thread Nikolaus Klepp
Thanks to Matthew I have a printer dialog :-) I can actually print a page, but (send dc end-doc) throws an error. Example: (define pss (get-page-setup-from-user "Drucke das Wunderwerk")) (when pss (current-ps-setup pss) (define dc (new printer-dc%)) (send dc start-doc "") (sen