Re: [racket-users] Running racket on a #lang-less module-less file?

2016-05-05 Thread Robby Findler
As a meta-point, one thing our experience with trying to put together multiple files in different languages into programs suggests that putting the information telling us which language a given file supposed to be in should be with the file, not with the reference to the file (and not nowhere). Tha

Re: [racket-users] Running racket on a #lang-less module-less file?

2016-05-05 Thread Matthew Flatt
I think something like this could be made to work as, say, a `raco` command. If it were really implemented by writing to a new file, then source locations would all be wrong, of course. But it looks like the `#lang` protocol might work with an input stream that is different from the one that named

Re: [racket-users] Running racket on a #lang-less module-less file?

2016-05-05 Thread Matthias Felleisen
I might be a bit lost here but can’t you do the moral equivalent of this: cat my-dsl.rkt program-in-my-dsl.rkt > crude.rkt; racket crude.rkt where my-dsl.rkt is #lang racket/base ;; or your favorite #lang line and program-in-my-dsl.rkt is (displayln "I am in my special language now”)

Re: [racket-users] Running racket on a #lang-less module-less file?

2016-05-05 Thread William Hatch
I've always thought that should be possible -- for instance, if someone were to implement some pre-existing language in Racket, it would be nice to be able to say "require this using #lang X" so that it can be parsed and bound correctly. Eg. if you had a Javascript implementation and some function

Re: [racket-users] Running racket on a #lang-less module-less file?

2016-05-05 Thread Jack Firth
On Thursday, May 5, 2016 at 5:39:44 PM UTC-7, Matthew Flatt wrote: > At Thu, 5 May 2016 17:32:20 -0700 (PDT), Jack Firth wrote: > > Does that evaluate the file as if it were entered in a REPL? > > Yes. What if I don't want REPL semantics, but I want behavior identical to if the file began with t

Re: [racket-users] Running racket on a #lang-less module-less file?

2016-05-05 Thread Matthew Flatt
At Thu, 5 May 2016 17:32:20 -0700 (PDT), Jack Firth wrote: > On Thursday, May 5, 2016 at 5:28:06 PM UTC-7, Matthew Flatt wrote: > > At Thu, 5 May 2016 17:14:57 -0700 (PDT), Jack Firth wrote: > > > Suppose I have a file in some custom language, like #lang foo, but it > omits > > > the #lang foo li

Re: [racket-users] Running racket on a #lang-less module-less file?

2016-05-05 Thread Jack Firth
On Thursday, May 5, 2016 at 5:28:06 PM UTC-7, Matthew Flatt wrote: > At Thu, 5 May 2016 17:14:57 -0700 (PDT), Jack Firth wrote: > > Suppose I have a file in some custom language, like #lang foo, but it omits > > the #lang foo line. Is there a way I can run the racket command line > > program > >

Re: [racket-users] Running racket on a #lang-less module-less file?

2016-05-05 Thread Matthew Flatt
At Thu, 5 May 2016 17:14:57 -0700 (PDT), Jack Firth wrote: > Suppose I have a file in some custom language, like #lang foo, but it omits > the #lang foo line. Is there a way I can run the racket command line program > in a way where it says "treat this file as if it starts with the line #lang >

[racket-users] Running racket on a #lang-less module-less file?

2016-05-05 Thread Jack Firth
Suppose I have a file in some custom language, like #lang foo, but it omits the #lang foo line. Is there a way I can run the racket command line program in a way where it says "treat this file as if it starts with the line #lang foo"? I'm having trouble parsing the "Running Racket or Gracket" se

Re: [racket-users] Re: creating & manipulating sets of scopes

2016-05-05 Thread Sam Tobin-Hochstadt
I think you can implement exactly this API using `make-syntax-introducer`. Sam On Thu, May 5, 2016, 5:14 PM Matthew Butterick wrote: > > On May 5, 2016, at 10:43 AM, Matthew Butterick wrote: > > Of course, one can reveal the scopes with `(syntax-debug-info stx > 'context)` > > > That should've

[racket-users] Re: creating & manipulating sets of scopes

2016-05-05 Thread Matthew Butterick
On May 5, 2016, at 10:43 AM, Matthew Butterick wrote: > Of course, one can reveal the scopes with `(syntax-debug-info stx 'context)` That should've read: `(hash-ref (syntax-debug-info stx) 'context)` -- You received this message because you are subscribed to the Google Groups "Racket Users"

[racket-users] with apologies to the surfing bumper sticker.

2016-05-05 Thread 'John Clements' via Racket Users
https://www.brinckerhoff.org/blog/2016/04/25/racket-sucks-don-t-try-it/ -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.co

Re: [racket-users] HTTP Headers use byte->string/utf-8

2016-05-05 Thread Tim Brown
Thanks Jay, Will check on it during work tomorrow. Tim -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more opti

Re: [racket-users] HTTP Headers use byte->string/utf-8

2016-05-05 Thread Jay McCarthy
Hi Tim, I consider this an error. The Web server tries to avoid interpreting anything as UTF-8 unless asked by the servlet. Header comparison incorrectly converted to UTF-8 and I just pushed a fix. Can you verify that it works now with your workload? Jay On Thu, May 5, 2016 at 11:28 AM, Tim Brow

[racket-users] creating & manipulating sets of scopes

2016-05-05 Thread Matthew Butterick
On May 3, 2016, at 2:40 PM, Matthew Flatt wrote: > More specifically, the problem is in converting definitions to > `let-values` as opposed to `letrec-values`. If you have > > (define x^{s1,s2} 1) > (define x^{s1} 2) > x^{s1,s2} Now that we live in a world of scope sets, is there a way to tre

[racket-users] HTTP Headers use byte->string/utf-8

2016-05-05 Thread Tim Brown
Folks, I have a web server, which in production is receiving a user agent in its header which includes the phrase: #"FBCR/M\351ditel" It seems to be a mobile from Morocco. I’m forcing the request-headers/raw promise on my request; and I get: “bytes->string/utf-8: string is not a well-formed U

Re: [racket-users] Racket 6.5 on Ubuntu broke my sxml library?

2016-05-05 Thread Vincent St-Amour
Is there anything we could do at the distro packaging level that would make this automatic? Vincent On Thu, 05 May 2016 09:05:25 -0500, Alex Knauth wrote: > > > > On May 5, 2016, at 9:55 AM, phil jones wrote: > > > >> Ubuntu just upgraded me to Racket 6.5. > >> > >> However my program which

Re: [racket-users] Racket 6.5 on Ubuntu broke my sxml library?

2016-05-05 Thread phil jones
Ah . OK. That seems to work. Many thanks. One question. Does this import older versions of the libraries? If the libraries have also been updated, does it get the newest versions? Or does that need a different installation? cheers Phil On Thursday, 5 May 2016 11:05:32 UTC-3, Alex Knauth wr

Re: [racket-users] Racket 6.5 on Ubuntu broke my sxml library?

2016-05-05 Thread Alex Knauth
> On May 5, 2016, at 9:55 AM, phil jones wrote: > >> Ubuntu just upgraded me to Racket 6.5. >> >> However my program which uses sxml is now broken. >> Is this a library / package I need to reinstall after the 6.5 upgrade? Is >> the sxml library itself not working in 6.5? > Frog also isn't wo

[racket-users] Re: Racket 6.5 on Ubuntu broke my sxml library?

2016-05-05 Thread phil jones
Actually it's looking like the Ubuntu upgrade killed a bunch of stuff. Frog also isn't working. Or rather, raco no longer recognises the "raco frog" instruction. Does this mean we basically have to re-install all our racket packages and tools after an upgrade? Is that a racket thing or a Ubunt

[racket-users] Racket 6.5 on Ubuntu broke my sxml library?

2016-05-05 Thread phil jones
Hi, Ubuntu just upgraded me to Racket 6.5. However my program which uses sxml is now broken. I get this error message : standard-module-name-resolver: collection not found for module path: sxml collection: "sxml" in collection directories: Anyone got any ideas? Is this a library / pac