On Wednesday, 30 March 2016 22:33:35 UTC-4, Matthew Flatt wrote:
> You were close with
>
> ((dynamic-require 'hw 'hw))
>
> but you're missing a quote:
>
> ((dynamic-require ''hw 'hw))
>
>
> When you make "base.c" as
>
> raco ctool --c-mods base.c hw.rkt
>
> then it's like
>
> (module
You were close with
((dynamic-require 'hw 'hw))
but you're missing a quote:
((dynamic-require ''hw 'hw))
When you make "base.c" as
raco ctool --c-mods base.c hw.rkt
then it's like
(module hw racket/base
(provide hw)
(define (hw) (displayln "Hello, world!")))
at a REPL, and
I appear to be swimming upstream. There are all sorts of tutorials and
references for *extending* Racket with C, but precious little about *embedding*
it. Unfortunately, I require the latter.
I have a file hw.rkt with the following contents:
#lang racket/base
(provide hw)
(define (hw)
3 matches
Mail list logo