[racket] Best Way to Really Understand the Compilation and Execution Model?

From: Noel Welsh (noelwelsh at gmail.com)
Date: Mon Aug 5 04:40:10 EDT 2013

Does defmacro do what you want?

http://docs.racket-lang.org/compatibility/defmacro.html?q=defmacro#%28form._%28%28lib._compatibility%2Fdefmacro..rkt%29._defmacro%29%29

In terms of grokking the macro system you probably want to read some of the
research papers, which you can find from links here:

http://racket-lang.org/people.html

Racket's macro system is really cutting edge, so it doesn't have a large
body of text explaining it.

HTH,
N.



On Sun, Aug 4, 2013 at 9:50 PM, Nick Sivo <nicksivo at gmail.com> wrote:

> Hello everyone,
>
> I work on Hacker News[1], which is written in Arc[2], and am tasked
> with making it faster.  The Arc compiler targets Racket[3], but
> doesn't do so in such a way that function names or source locations
> are preserved.  This makes output from the sampling profiler and error
> messages mostly useless.
>
> I'd like to make Arc work as a Racket language (and in the process
> preserve srclocs and names), and have made some progress[4].  However,
> I'm hitting a wall trying to implement Arc's macros.  Specifically, I
> need to find a way for the macros themselves to use previously defined
> Arc functions as part of their processing. I understand that there are
> good reasons for Racket's hygiene and syntax phases, but I'm
> implementing an existing language that has its own strong opinions.
> I'm almost certain that accomplishing my goal is possible with the
> right understanding, but despite reading much of the Racket Reference,
> I don't truly get it yet.
>
> With that motivation in mind, what's the best way for me to become
> intimately familiar with Racket's runtime, execution and compilation
> model? Should I read through and make sure I understand the debugger?
> The macro stepper?  Is there any kind of guide to Racket Internals?
>
> Thanks for any advice.
>
> Best,
> Nick
>
> [1] https://news.ycombinator.com
> [2] http://arclanguage.org
> [3] Well, really mzscheme
> [4] https://github.com/kogir/rark
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130805/77475c00/attachment-0001.html>

Posted on the users mailing list.