Re: [racket] convert scribble block directly to xexpr?

2013-10-01 Thread Stephen Chang
Sam Tobin-Hochstadt wrote: > feel free to steal source code from https://github.com/samth/paste.rkt Ah nice. I added some more features like evaluation, which is partially working (only for certain #langs but can't figure out why). Someone try to delete my server files! Greg Hendershott wrote: >

Re: [racket] convert scribble block directly to xexpr?

2013-10-01 Thread Greg Hendershott
On Mon, Sep 30, 2013 at 3:54 PM, Stephen Chang wrote: > Hi users, > > Now that Racket has a state-of-the-art package system and a > smashing-success conference, I think the obvious missing element in > the path to world domination is our very own pastebin, so I made one > during the hackathon. > >

Re: [racket] Understanding lexical context

2013-10-01 Thread Sam Tobin-Hochstadt
On Tue, Oct 1, 2013 at 3:01 PM, Greg Hendershott wrote: > > Is there a generically safe/sane way to write such macros? > > Could some mechanism be devised to help do this -- much like > syntax-parameters enables you to write anaphoric-if and friends > safely/sanely? The right answer, I think, is

Re: [racket] Understanding lexical context

2013-10-01 Thread Greg Hendershott
Aha. Maybe the following question won't make any sense after I've digested the implications, but to ask anyway: I'm completely sold on "keeping it clean", and for example using syntax parameters when possible. That leaves at least one use case, which is what I'll call (not knowing a better phras

Re: [racket] Understanding lexical context

2013-10-01 Thread Sam Tobin-Hochstadt
On Tue, Oct 1, 2013 at 2:42 PM, Greg Hendershott wrote: > > 2. Plus it seems like it would be really unfortunate if carefully > choosing one of #'a or #'b were required -- because that would mean > `inner` couldn't be written to be usable by other macros independent > of knowing the origin of what

Re: [racket] Understanding lexical context

2013-10-01 Thread Greg Hendershott
Thanks for the quick reply! On Tue, Oct 1, 2013 at 2:13 PM, Sam Tobin-Hochstadt wrote: > On Tue, Oct 1, 2013 at 2:01 PM, Greg Hendershott > wrote: >> >> tl;dr: Can anyone suggest how I could improve my >> understanding of this? Enough that I could improve Fear of >> Macros and help others, too?

Re: [racket] Understanding lexical context

2013-10-01 Thread Sam Tobin-Hochstadt
On Tue, Oct 1, 2013 at 2:01 PM, Greg Hendershott wrote: > > tl;dr: Can anyone suggest how I could improve my > understanding of this? Enough that I could improve Fear of > Macros and help others, too? Thanks in advance. If you've read the resources you described, then you're definitely prepared

[racket] Understanding lexical context

2013-10-01 Thread Greg Hendershott
During RacketCon someone said they were having trouble trying to build on an example from Fear of Macros. Below is a distilled version. They were trying to use my example macro `inner` in their macro `outer`. My original version of `inner` supplied the wrong value for `lctx` in `datum->syntax`, e.

Re: [racket] Why does racket/trace not export trace-define?

2013-10-01 Thread Sam Tobin-Hochstadt
On Tue, Oct 1, 2013 at 11:08 AM, Ryan Newton wrote: > Hello, > > I'm switching a large introductory class from Chez Scheme to Racket and I > keep running into small surprises. Here's one: the docs for racket/trace > specifically mention it being a Chez-Scheme-like feature: > >http://docs.rack

[racket] Why does racket/trace not export trace-define?

2013-10-01 Thread Ryan Newton
Hello, I'm switching a large introductory class from Chez Scheme to Racket and I keep running into small surprises. Here's one: the docs for racket/trace specifically mention it being a Chez-Scheme-like feature: http://docs.racket-lang.org/reference/debugging.html But the way students usuall

Re: [racket] raco option to strip unused libraries and code from exes?

2013-10-01 Thread Jay McCarthy
Yes, it takes a long time. Sent from my iPhone On Oct 1, 2013, at 1:28 AM, Daniel Prager wrote: Thanks Jay I'm running raco demod now: it's been running for over a minute on a fairly small program (~1000 lines + libs). Does it typically take a long time to run? Cheers Dan On Tue, Oct 1,

Re: [racket] Servlet static file paths, I just don't get it

2013-10-01 Thread Erich Rast
Thanks a lot, David and Jay, for your detailed replies! I chose David's solution for simplicity. Problem solved. :-) Best, Erich On Mon, 30 Sep 2013 21:28:17 -0400 David Vanderson wrote: > Erich, > > In addition to Jay's options, I think one way to do what you want is > to remove the "else"

Re: [racket] raco option to strip unused libraries and code from exes?

2013-10-01 Thread Daniel Prager
It came back after a few minutes with this error: Racket virtual machine has run out of memory; aborting Abort trap: 6 I'm running OS/X 10.8.3, Racket v5.3.6 - I think 32-bit build. Cheers Dan On Tue, Oct 1, 2013 at 5:28 PM, Daniel Prager wrote: > Thanks Jay > > I'm running raco demod now:

Re: [racket] raco option to strip unused libraries and code from exes?

2013-10-01 Thread Daniel Prager
Thanks Jay I'm running raco demod now: it's been running for over a minute on a fairly small program (~1000 lines + libs). Does it typically take a long time to run? Cheers Dan On Tue, Oct 1, 2013 at 10:53 AM, Jay McCarthy wrote: > The demodularizer (raco demod) is a tool that does this som