[racket] Adding raw string syntax

From: Jos Koot (jos.koot at telefonica.net)
Date: Tue Aug 9 13:19:44 EDT 2011

Thanks for sharing your tutorial (it is, although your initial intention was
as a reminder for yourself) Very clear exposition. You made a very important
step by discovering how to make your own languages. In the long past I have
made many languages for specific applications, but without the nice tools of
Racket (fortran and an assembler with a very good macro system allowing
recursion and meta macros, id est macros that produce macros) Making a
language with these tools would require a 1000 to 10000 lines of code. With
Racket a hundred or a few hundred lines of code may be sufficient. I share
your enthousiasm for Racket.
Kind regards, Jos

-----Original Message-----
From: users-bounces at racket-lang.org [mailto:users-bounces at racket-lang.org]
On Behalf Of Joan Arnaldich
Sent: domingo, 07 de agosto de 2011 17:44
To: users at racket-lang.org
Subject: [racket] Adding raw string syntax

Hi there!

I'm just starting to learn Racket. One of the thing that I appreciate
most so far is the language extensibility (IMHO, the feature that
makes it so unique compared to other languages...). So, when I
couldn't find anything like python's raw string syntax (strings
introduced by r'') or c#'s @"" strings, I thought... well, let's try a
bit of language DIY...

So I went through the Guide and the brainfudge tutorial and came up
with a solution that worked as I wanted. I blogged about it here:


In fact, I wrote that entry (well most of them...) more as a reminder
for myself than as a tutorial, but I still think it makes sense to
publish it, if only to demonstrate how you can tune the language to
match your personal tastes... something you can't do in every
language, for sure...

The problem is, as I said, that I'm just starting with Racket, so
while the solution works as expected so far, maybe I misunderstood or
skipped something in the documentation and just got it all wrong... so
any comments would be much appreciated, if only to reassure myself...

BTW, I searched the list and the docs for this feature before
implemeting mine... the only thing I found were some old questions on
backslashing in strings for regexes. But maybe this was already
implemented somewhere else and I couldn't find it...

Thanks in advance!

  For list-related administrative tasks:

Posted on the users mailing list.