[racket] TR: JSExprs and hashtables

2015-01-18 Thread Jordan Johnson
Hi all, I’ve been trying to create JSExprs, as defined in the typed/json library. This is one of those instances where it seems like I must be making things harder than they should be, but I’m still feeling like a duck on rollerskates in TR, so I want to make sure I’m not missing an easier way

Re: [racket] anamorphic macros

2015-01-18 Thread Eli Barzilay
[Aggregate reply, since you got replies from all over the place...] On Sun, Jan 18, 2015 at 7:49 PM, Peter Samarin petrsama...@gmail.com wrote: Hi all, I was working through chapter 16 of land of lisp and there is (at that point) a buggy split macro defined like this: (defmacro split (val

[racket] Racket Logo quilt design now available for free on request

2015-01-18 Thread Daniel Prager
Hello Racketeers As a gesture of thanks to the Racket community, I'm making freely available a www.youpatch.com design of the Racket logo. You'll still need to buy the materials and get it stitched up by a friendly quilter, but once you're done you can snuggle up in your very own lambda quilt!

Re: [racket] TR: Polymorphic types

2015-01-18 Thread Asumu Takikawa
On 2015-01-18 16:14:45 -0800, Jordan Johnson wrote: Speaking of that: with the splitting of the repos, if I want to contribute code to the TR repository, is there a quick reference doc yet for running that repo’s code against an existing Racket installation (or a clone of the main

[racket] anamorphic macros

2015-01-18 Thread Peter Samarin
Hi all, I was working through chapter 16 of land of lisp and there is (at that point) a buggy split macro defined like this: (defmacro split (val yes no) `(if ,val (let ((head (car ,val)) (tail (cdr ,val))) ,yes) ,no)) Here is my version of the

Re: [racket] anamorphic macros

2015-01-18 Thread Jon Zeppieri
Breaking hygiene with `syntax-case`: (define-syntax (split stx) (syntax-case stx () ([split val yes no] (let ([head-stx (datum-syntax stx 'head)] [tail-stx (datum-syntax stx 'tail)]) #`(if (empty? val) no (let ([#,head-stx (car val)]

Re: [racket] anamorphic macros

2015-01-18 Thread J. Ian Johnson
You're better off defining head and tail as syntax parameters and defining your macro with the more hygienic syntax-parameterize using rename transformers. The then case: (let ([h (car val)] [t (cdr val)]) (syntax-parameterize ([head (make-rename-transformer #'h)] [tail

Re: [racket] anamorphic macros

2015-01-18 Thread Neil Van Dyke
IMHO, a Racket way would more likely be to avoid bad hygiene, by one of: * Just doing it as a procedure that takes closures for the `yes`and `no` arguments (with the `yes` one taking arguments for `head` and `tail`). * Doing it as syntax, but having the user of the extension define the .

Re: [racket] TR: Polymorphic types

2015-01-18 Thread Jordan Johnson
Hi Sam Matthias, Thanks for the clarification. And thanks to Alexander for pointing out the typed/json module — been a while since I’ve pulled down a nightly build. Speaking of that: with the splitting of the repos, if I want to contribute code to the TR repository, is there a quick

Re: [racket] Racket on Centos?

2015-01-18 Thread Juan Francisco Cantero Hurtado
On 01/18/2015 02:38 AM, Neil Van Dyke wrote: Neil Toronto wrote on 01/17/2015 07:57 PM: Ubuntu has had ASLR enabled by default since 10.04 (about five years). During that time, in my experience, it's never affected Racket. I do have to use setarch i686 -R to disable ASLR to run Maxima, which

Re: [racket] Racket on Centos?

2015-01-18 Thread Juan Francisco Cantero Hurtado
On 01/18/2015 06:21 AM, Greg Hendershott wrote: Up through version 5.3.6 there was a Fedora build of Racket, and as of a couple years ago I used it on Amazon Linux (which IIUC is ~= CentOS). I vaguely recall needing to symlink one .so to the name Racket expected, but otherwise I don't remember