Re: [racket] structure question

2010-12-08 Thread Matthias Felleisen
Here is a version with 'type' annotations that should be easier to read and learn from. #lang racket ;; - ;; library module ;; syntax def ;; definition = ... | (struct/kw name (field ...) options ...) ;; meaning:

[racket] Blog: Rebuilding Racket’s Graphics L ayer

2010-12-08 Thread Jens Axel Søgaard
In case anyone missed it: Mattew has written a blog post on the graphics layer. http://blog.racket-lang.org/2010/12/racket-version-5.html There is a lengthy discussion at Hacker News. http://news.ycombinator.com/item?id=1983881 -- Jens Axel Søgaard __

Re: [racket] structure question

2010-12-08 Thread Manfred Lotz
On Wed, 8 Dec 2010 14:39:52 -0500 Matthias Felleisen wrote: > > > > #lang racket > > ;; > - > ;; > library module > > ;; syntax def > ;; definition = ... | (struct/kw name (field ...) options ...) > ;; meaning:

Re: [racket] [SPAM] metacircular interpreter: recursive macro expanding order ==> Re: metacircular interpreter: macro parser

2010-12-08 Thread YC
Thanks Robby! On Wed, Dec 8, 2010 at 4:13 AM, Robby Findler wrote: > PS: check out this paper for an algorithm: > > http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.54.8909 > > Robby > > On Wed, Dec 8, 2010 at 6:11 AM, Robby Findler > wrote: > > Yes, outside in. Inside out doesn't work b

Re: [racket] structure question

2010-12-08 Thread Matthias Felleisen
#lang racket ;; - ;; library module ;; syntax def ;; definition = ... | (struct/kw name (field ...) options ...) ;; meaning: (struct name (field ...) options ...) ;; plus keyword-based c

Re: [racket] structure question

2010-12-08 Thread Manfred Lotz
On Wed, 8 Dec 2010 10:25:47 -0500 Matthias Felleisen wrote: > > #lang racket > > ;; > - > ;; > library module > > ;; syntax def > ;; definition = ... | (struct/kw name (field ...) options ...) > ;; meaning:

[racket] Logging

2010-12-08 Thread Russell Adams
Does anyone have a good example of using the built-in logger and log levels, particularly how one can alter the log-level on the fly without restarting (to pass a CLI parameter or change an ENV var). Thanks. (Kudos to the IRC folks for their help too!) ---

Re: [racket] structure question

2010-12-08 Thread Matthias Felleisen
#lang racket ;; - ;; library module ;; syntax def ;; definition = ... | (struct/kw name (field ...) options ...) ;; meaning: (struct name (field ...) options ...) ;; plus keyword-based con

Re: [racket] structure question

2010-12-08 Thread andrew cooke
Manfred Lotz writes: > In Common Lisp I can define something like this: > (defvar *db* nil) > (defun make-book (&key author title) > (list :author author :title title)) > (defun add-record (book) (push book *db*)) > (add-record (make-book :author "John Grisham" :title "The Client")) > I like to

Re: [racket] Scribble: Different output for LaTeX and HTML backends

2010-12-08 Thread Jens Axel Søgaard
2010/12/7 Matthias Felleisen : > Define a Scribble function like this: > > (define (exact . items) >  (make-element (make-style "identity" '(exact-chars)) >                items)) > (provide exact) It (finally) dawned on me that I have two problems. I thougt this would display a YouTube player on

Re: [racket] [SPAM] metacircular interpreter: recursive macro expanding order ==> Re: metacircular interpreter: macro parser

2010-12-08 Thread Robby Findler
PS: check out this paper for an algorithm: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.54.8909 Robby On Wed, Dec 8, 2010 at 6:11 AM, Robby Findler wrote: > Yes, outside in. Inside out doesn't work because the expander only > knows where the inside is when it sees a core (fully exp

Re: [racket] [SPAM] metacircular interpreter: recursive macro expanding order ==> Re: metacircular interpreter: macro parser

2010-12-08 Thread Robby Findler
Yes, outside in. Inside out doesn't work because the expander only knows where the inside is when it sees a core (fully expanded) form. Robby On Wed, Dec 8, 2010 at 1:44 AM, YC wrote: > Hi all - > I have now implemented the pattern matching/transforming algorithm of a > macro expander (no hygien

Re: [racket] Scribble: Different output for LaTeX and HTML backends

2010-12-08 Thread Jens Axel Søgaard
The element produced by exact will be displayed in both the HTML and the PDF document. The video embedding code should only be part of the HTML output, on the other hand, the link to the video should only appear in the PDF document. I need a way to know when not to produce an element. I have writt

Re: [racket] multi-replace function

2010-12-08 Thread prad
On Tue, 7 Dec 2010 02:15:42 -0500 Eli Barzilay wrote: > If you still want to go with the regexp approach ... > many thx eli and yc! yc's format idea will suffice for now - in fact, its simplicity is a bit humbling considering the elaborate stuff we'd written up. :D i will most certainly make