On Fri, Jul 15, 2011 at 1:41 AM, Carl Eastlund wrote:
> It's easy to add this:
>
> (define (generate-temporaries/locs xs)
> (for/list {[x (in-list (if (syntax? xs) (syntax->list xs) xs)]}
> (define sym (if (identifier? x) (syntax-e x) 'fresh))
> (define src (if (syntax? x) x #f))
> (defi
It's easy to add this:
(define (generate-temporaries/locs xs)
(for/list {[x (in-list (if (syntax? xs) (syntax->list xs) xs)]}
(define sym (if (identifier? x) (syntax-e x) 'fresh))
(define src (if (syntax? x) x #f))
(define mark (make-syntax-introducer))
(mark (datum->syntax #f sy
What kind of Racket editor operations would you like to see?
With the forthcoming Emacs mode for Racket, called Meow, I intend to
provide a conventional typing interface and also some sexp-oriented
operations that people can adopt incrementally if they want.
("meta-uparrow", to move up a sexp
I'd like the ability to generate a bunch of temporaries, but with
specific source locations. I'm having an awkward time fixing an
embarrassing bug in my chaining-compare library.
I have the following expression:
(with-syntax ([rhs-value (datum->syntax #f
>
> P.S. I'm enjoying this discussion. I feel like I'm finally getting a
> handle on what kind of how "syntax" is represented and manipulated in
> Racket. It still seems like an awful lot of work, though, so I would
> like to see more examples of why it is worth the
I wrote a package the other
On Thu, Jul 14, 2011 at 4:35 AM, Thomas Chust wrote:
> While Clojure *mitigates* the problems of non-hygienic macros using
> namespaces and a shorthand syntax for freshly generated identifiers, it
> doesn't *solve* the problems. Racket's macro system, on the other hand,
> does solve the problems a
> I've also seen this on a simple web crawler kind of app, accumulating
> stuff in memory rather than on disk. If it hits the max, I've never
> seen a seg fault, but I've gotten the cleaner abend with message.
P.S. Maybe disregard that example; it has fur on it. Of course
something that accumulate
I wonder if Jay or whoever was involved with that web server code may
remember something about this?
Anyway I will try to make a simple-as-possible recipe for you.
I'd posted on the list a few months ago about a simple mail relay
"shim" I'd deployed that segfaulted. As best I could figure out, th
keyd...@gmx.de wrote:
> [...]
> In fact I'd assume that using _int for suseconds_t should work fine, too,
> given that man even tells us that
>
> "The values in timeval are opaque types whose length may vary on different
> machines; depending on
> them to have any given length may lead to e
Hi,
I am kind of stuck trying to get the current microsecond from gettimeofday...
and I wonder how best to systematically approach the question of what racket
datatype to choose when defining a FFI function.
From the man page I see that timeval is defined as
struct timeval {
time_
On Jul 14, 2011, at 3:32 PM, Eli Barzilay wrote:
> (let ([tmp 4]) (or #f tmp)) --should-be-> 4
>
> This side is easy to fix using gensyms.
Except that even old Lisp guys forget, get it wrong, whatever. Nothing's easy
;-)
_
For list-related a
15 minutes ago, Markku Rontu wrote:
> On Thu, Jul 14, 2011 at 9:58 PM, Eli Barzilay wrote:
> > (define-syntax (rapp stx)
> >(syntax-case stx ()
> > [(rapp f x ...) #`(f #,@(reverse (syntax->list #'(x ...]))
> > [...]
> >
> I would not call this piece of code much more obvious, it ha
30 minutes ago, Markku Rontu wrote:
> Well one problem is that all these syntax objects have introduced a
> new language, with accessors and functions that are completely new
> that must be learnt. And programs using these new functions look
> quite different to standard data structure (i.e., cons
25 minutes ago, Markku Rontu wrote:
> > Sure, if you take the TM-equivalent path then nothing is broken, of
> > course... (That path tends to melt away all of PL into a weak *puff*
> > of irrelevance...)
> >
> I mean exactly this sense of disingenuousness when you use the word
> broken for somethi
This sounds like a bug. Explicit calls to `collect-garbage' shouldn't
be needed for the garage collector to do its job.
Does anyone know an easy way for me to make the problem happen, so I
can see what is going on?
At Thu, 14 Jul 2011 12:47:54 -0400, Greg Hendershott wrote:
> Once upon a time I n
On Thu, Jul 14, 2011 at 9:58 PM, Eli Barzilay wrote:
> 25 minutes ago, Markku Rontu wrote:
> > > >
> http://hipster.home.xs4all.nl/lib/scheme/gauche/define-syntax-primer.txt
> > [...]
> >
> > Still, I count it as good eye opening material :)
>
> Well, it has a heavy focus on "computations via rew
On Thu, Jul 14, 2011 at 10:03 PM, Eli Barzilay wrote:
> 10 minutes ago, Markku Rontu wrote:
> > On Thu, Jul 14, 2011 at 6:23 PM, Eli Barzilay wrote:
> > > No, it's broken in pretty much all cases. Give me a single
> > > symbolic macro and I'll show you how it's broken. (And point out
> > > how
10 minutes ago, Markku Rontu wrote:
> On Thu, Jul 14, 2011 at 6:23 PM, Eli Barzilay wrote:
> > No, it's broken in pretty much all cases. Give me a single
> > symbolic macro and I'll show you how it's broken. (And point out
> > how CL bypasses the problem...)
> >
> I think it's a bit disingenuous
Hey Thomas,
On Thu, Jul 14, 2011 at 8:21 PM, Thomas Chust wrote:
> Markku Rontu wrote:
> > [...]
> > I'm sure the section 11 does go through the relevant issues, but doesn't
> > feel like a good introduction to the matter. I can theorise that I can
> > manipulate these syntax objects with plain
25 minutes ago, Markku Rontu wrote:
> > > http://hipster.home.xs4all.nl/lib/scheme/gauche/define-syntax-primer.txt
> [...]
>
> Still, I count it as good eye opening material :)
Well, it has a heavy focus on "computations via rewriting", which can
of course be an eye opener, but off-topic when tal
Hi again,
On Thu, Jul 14, 2011 at 6:23 PM, Eli Barzilay wrote:
> Two hours ago, Markku Rontu wrote:
> > > this is not really true. The domain specific languages of
> > > syntax-rules and syntax-case macro transformers exist purely for
> > > your convenience. You can always manipulate syntax obj
Hi Eli,
On Thu, Jul 14, 2011 at 6:04 PM, Eli Barzilay wrote:
> Commet for the short-attention-spanners: read this:
>
> http://blog.racket-lang.org/2011/04/writing-syntax-case-macros.html
>
>
Thanks for writing this. It is so far the best introduction to this matter
I've seen.
> 5 hours ago, M
Hi Matthias,
On Thu, Jul 14, 2011 at 6:00 PM, Matthias Felleisen wrote:
>
> You may wish to read this write-up on the Racket blog:
>
> http://blog.racket-lang.org/2011/04/writing-syntax-case-macros.html
>
>
Thanks, I had previously browsed through it. It's so far the best
introductory material t
Markku Rontu wrote:
> [...]
> I'm sure the section 11 does go through the relevant issues, but doesn't
> feel like a good introduction to the matter. I can theorise that I can
> manipulate these syntax objects with plain old functions but nowhere
> does it seem to show a complete useful case. What
Once upon a time I noticed the Racket web server has a thread that
calls collect-garbage periodically (e.g. every 5 minutes).
I've discovered I need to do the same, for any program that needs to
run for hours or days. Otherwise, the program eventually abends: Out
of memory. Sometimes with a "Rack
On 07/14/2011 09:30 AM, Eli Barzilay wrote:
10 minutes ago, Ryan Culpepper wrote:
On 07/14/2011 08:31 AM, Dominic Pearson wrote:
Hello folks!
I have been writing an application in Racket using Continue, and have
been stress testing it in the early development phase using `siege', to
see if it
Hi Ryan,
On Thu, Jul 14, 2011 at 09:17:39AM -0600, Ryan Culpepper wrote:
> > force: reentrant promise fun-p
>
> Those look like they're from ryanc/db. I suspect you see them at the
> very beginning, before the "lazy requires" (which are implemented
> with promises) have been forced.
Thanks
Two minutes ago, Francis Lavoie wrote:
> I use racket with M-x run-scheme not slime.
In that case, the full path would look like:
(setq scheme-program-name "/wherever/you/have/racket")
> compiling is definetly overkill, but I'm not sure the parameters are
> incompatible. There's a lot of app
# sorry, I didn't reply to the list
gnu emacs, Aquamacs has the same behavior.
As John writes, launching emacs from terminal set the PATH correctly.
2011/7/14 Noel Welsh
> Are you using Aquamacs?
>
> N.
>
> On Thu, Jul 14, 2011 at 4:19 AM, Lavoie Francis
> wrote:
> > First, it looks like ema
# sorry, I didn't reply to the list
I use racket with M-x run-scheme not slime.
compiling is definetly overkill, but I'm not sure the parameters are
incompatible. There's a lot of application on OS X that uses the same
structure as on unix/linux.
2011/7/14 Eli Barzilay
> 9 hours ago, John Cl
# sorry, I didn't reply to the list
Starting emacs from shell does work.
I installed quack, it looks like it manage scheme command. There's probably
a way to customize it.
./configure --enable-mac64 : for snow leopard in 64 bit
--enable-xonx : to make a unix like installation (need for --prefix)
10 minutes ago, Ryan Culpepper wrote:
> On 07/14/2011 08:31 AM, Dominic Pearson wrote:
> > Hello folks!
> >
> > I have been writing an application in Racket using Continue, and have
> > been stress testing it in the early development phase using `siege', to
> > see if it is suitable for future heav
On Jul 14, 2011, at 11:23 AM, Eli Barzilay wrote:
>>
>> It's simple, it's been explained countless times, it works in many
>> cases.
>
> No, it's broken in pretty much all cases. Give me a single symbolic
> macro and I'll show you how it's broken. (And point out how CL
> bypasses the problem.
Two hours ago, Markku Rontu wrote:
> > this is not really true. The domain specific languages of
> > syntax-rules and syntax-case macro transformers exist purely for
> > your convenience. You can always manipulate syntax objects
> > directly, all the necessary procedures are available and
> > docu
On 07/14/2011 08:31 AM, Dominic Pearson wrote:
Hello folks!
I have been writing an application in Racket using Continue, and have
been stress testing it in the early development phase using `siege', to
see if it is suitable for future heavy lifting.
Under high load I get some very odd messages.
Commet for the short-attention-spanners: read this:
http://blog.racket-lang.org/2011/04/writing-syntax-case-macros.html
5 hours ago, Markku Rontu wrote:
> This tutorial helped me to understand some basics of macros. For
> example how to generate code with them. Now Racket has lots of other
> f
You may wish to read this write-up on the Racket blog:
http://blog.racket-lang.org/2011/04/writing-syntax-case-macros.html
On Jul 14, 2011, at 8:58 AM, Markku Rontu wrote:
> Hi Thomas,
>
> Thanks, this is a very interesting topic to me, and I'm glad someone "did
> bite" :)
>
> On Thu, J
9 hours ago, John Clements wrote:
> On Jul 13, 2011, at 8:19 PM, Lavoie Francis wrote:
> > I want to learn racket. I already started learning lisp from Land
> > of Lisp, Practical Common Lisp and a bit of Clojure.
> >
> > For my everyday job (python, javascript) I use emacs, to learn
> > lisp and
Hello folks!
I have been writing an application in Racket using Continue, and have
been stress testing it in the early development phase using `siege', to
see if it is suitable for future heavy lifting.
Under high load I get some very odd messages. Requests sometimes fail
with
force: ree
On Thu, 2011-07-14 at 08:53 -0400, Stephen Bloch wrote:
> On Jul 14, 2011, at 7:56 AM, Maurizio Giordano wrote:
>
> > About optimization... in my case the main optimization is:
> > 1) My macro has to generate a function which has to perform some
> > recursive tasks
> > (for example, it has to do
Hi Thomas,
Thanks, this is a very interesting topic to me, and I'm glad someone "did
bite" :)
On Thu, Jul 14, 2011 at 2:35 PM, Thomas Chust wrote:
> Markku Rontu wrote:
> > [...]
> > On the topic of macros, I find it a bit confusing that to metaprogram in
> > Racket, I must use such a different
On Jul 14, 2011, at 7:56 AM, Maurizio Giordano wrote:
> About optimization... in my case the main optimization is:
> 1) My macro has to generate a function which has to perform some
> recursive tasks
> (for example, it has to do a recursive pattern matching on a set of
> elements)
> 2) Instead of
> On Thu, Jul 14, 2011 at 4:19 AM, Lavoie Francis wrote:
>> First, it looks like emacs for OS X does not use the users' own $PATH, but
>> the one of the system. I tried some hack I found on google
>> (http://olabini.com/blog/2009/12/path-problem-with-emacs-on-mac-os-x/,
>> http://www.emacswiki
Hi Markku,
On Thu, 2011-07-14 at 13:22 +0300, Markku Rontu wrote:
> Hi Maurizio,
>
> I guess what you are trying to do is possible with macros, but I could
> be wrong as it is difficult to understand what you are doing, because
> we all seem to lack a common vocabulary in this matter. Sorry if I
This is an excellent explanation. Thanks.
I'd like to add a little-understood that Lisp-style macros as found
in Common Lisp and Clojure are LESS expressive than Racket macros.
In essence, Racket (and Scheme) chose to use a data structure called
SYNTAX instead of S-EXPRESSION but one can argu
Markku Rontu wrote:
> [...]
> On the topic of macros, I find it a bit confusing that to metaprogram in
> Racket, I must use such a different language of macros (with
> syntax-rules et al.), instead of being able to manipulate common data
> structures with plain old Racket functions.
> [...]
Hello,
On Jul 14, 2011, at 1:56 AM, 飞刀 wrote:
> Hello everyone,
>
> I want a program to verify prime numbers which can be runned in mzscheme.
> The following is C source. I don't konwn how to convert it to lisp.
Well, I wouldn't start from that C code, as the idiomatic way to solve a
problem in C
Hi Maurizio,
I guess what you are trying to do is possible with macros, but I could be
wrong as it is difficult to understand what you are doing, because we all
seem to lack a common vocabulary in this matter. Sorry if I misunderstood
your intentions.
Your expander seems to be a function. I think
Are you using Aquamacs?
N.
On Thu, Jul 14, 2011 at 4:19 AM, Lavoie Francis wrote:
> First, it looks like emacs for OS X does not use the users' own $PATH, but
> the one of the system. I tried some hack I found on google
> (http://olabini.com/blog/2009/12/path-problem-with-emacs-on-mac-os-x/,
49 matches
Mail list logo