Hello all,
I'm wondering if it's possible to open a unix domain socket with
SOCK_SEQPACKET in Racket? It looks like currently unix-socket-lib uses
SOCK_STREAM, and doesn't allow you to configure that flag. Is there a
reason for this, or would it be a good idea to add this feature to the
I was discussing with a friend some of the edge cases in how internal
definition contexts and expansion
work, when I accidentally ran into behavior that doesn't seem right.
(let ()
(foo)
(define-syntax-rule (define-it m)
(define-syntax (m stx) #'"hello!"))
(define-it foo))
;; ->
Another option, which probably has a lot of terrible consequences, is to
transform "a.b" into "3-d syntax" (a struct embedded in syntax) that can
now be interpreted differently by forms that are interested. For instance a
custom "define" could grab the 3d-syntax in the name and use it to make a
This is similar to the argument of "why not use let* everywhere you use
let?" and there is no convincing answer IMO. I too am a big fan of pattern
matching, and I would appreciate a #lang where every binding form is a
pattern (ala ML, Haskell, ...). But in Racket as it exists today, I don't
Hello all,
There's something I have been very curious of lately, about low level
aspects of Racket's compiler.
First of all, I have always considered "cons" to be essentially the same as
a struct:
(struct cons [hd tl] #:transparent)
(define car (procedure-rename cons-hd 'car))
(define cdr
The reason for it using racket/base's #%module-begin is the same reasoning for
how racket/base's #%app is inserted in a #lang racket module (and more
crucially, inserted by macros defined in that module, no matter where the macro
is used)
--
You received this message because you are
You can also set! the extra constructor
#lang racket
(struct foo [a b c]
#:extra-constructor-name -foo
#:transparent)
(define ((foo* make-foo) a b)
(make-foo a b (+ a b)))
(set! -foo (foo* -foo))
(foo 1 2) ; -> (foo 1 2 3)
(match (foo 1 2)
[(foo _ _ c) c]) ; -> 3
However I usually
FWIW at one point I began trying to translate something similar to Rust in
Redex, but I haven't made progress on it in a few months.
https://github.com/iitalics/rust-redex
On Tuesday, February 20, 2018 at 1:21:46 AM UTC-5, Neil Van Dyke wrote:
>
> If someone is looking for a challenging and
Definitely agree with John. It's frustrating when running 'raco setup' and
seeing a bunch of executables trying to be overwritten. I have just applied
"chown milo" to /usr/share/racket to fix this but I may even switch to an
in-place Racket build instead.
On Monday, March 5, 2018 at 8:27:53 PM
Hi.
I talked with Matthias Felleisen and Ryan Culpepper this afternoon about
parsing recursive structures using syntax/parse.
I thought I'd give it a shot, so here's what I have so far:
https://gist.github.com/iitalics/fb83780fd4cd6731d6fc046fb2dbac92
It turned out to be far too inconvenient
Hi Racketeers.
I'm writing some macro code that generates submodules. I'm not entirely
sure how hygiene is maintained when creating submodules, and now I have
little idea why my macros are doing the crazy things that they are. Could
anyone give a concrete explanation on how modules work with
Hello, I'm new to writing #lang s-expr languages in Racket and I'm having
trouble understanding what's going wrong.
I've re-provided the essential syntax transformers and then defined a macro,
and this works fine:
> lang.rkt
#lang racket
(provide #%module-begin
#%app #%datum
12 matches
Mail list logo