Thanks! That looks like it should do the trick.
does Racket have any packages for project planning? Like MS Project - just better :wink:
Maybe at RacketCon someone could say a word or two about this: https://github.com/racket/racket/issues/1570
It occurred to me yesterday, oh, I wonder if this is discouraged by the Software Freedom Conservancy? But I don’t know enough to know if that even makes sense.
(I don’t have any urgent use-case for a new license. Just wondering.)
I couldn’t figure out how to make local-expand
work. Here’s a pared down use case:
#lang racket/base
;; Library Code
(module minimal racket/base
(define times-2? (make-parameter #f))
(define-namespace-anchor ns)
(define-syntax data
(syntax-rules ()
[(data x ...) (if (times-2?)
(list (* 2 x) ...)
(list x ...))]))
(define (read-data my-data #:times-2? [t2? #f])
(parameterize ([times-2? t2?])
(eval my-data (namespace-anchor->namespace ns))))
(provide read-data))
;; User Code
(require 'minimal)
(read-data '(data 1 2 3))
In the end, the eval
approach with parameterize
seems like an okay pattern.
That sounds like a cool idea. I’d wondered whether such a thing might be possible, but I don’t know any JavaScript. Would the idea be to transpile to JavaScript kinda like ClojureScript?
What’s the current state of the art for Racket on AWS Lambda? I’ve managed to do Kotlin/Clojure/Rust on AWS Lambda and am seriously considering trying Racket as well. Can DrRacket provide a musl-libc binary?
@todo Although I haven’t tried it myself I know about https://github.com/lambrospetrou/aws-lambda-binary described in https://www.lambrospetrou.com/articles/aws-lambda-meets-racket/ If you know another or better way to do it based on your experience with other langs, I’m sure folks would be interested to learn more.
My understanding of AWS is a bit out dated (so what AWS supports should be a super set of what I write here). There used to be support for Python, NodeJS, JVM, Go. The “Go support” was just some binary + an RPC — and some managed to get Rust supported unofficially by mimicking the Go RPC.
Currently, there’s ‘official’ support via https://aws.amazon.com/blogs/opensource/rust-runtime-for-aws-lambda/ (which has worked great for me), but requires special compilation to link via musl libc instead of glibc for some reason.
The question is — what is the ‘runtime’ requirement of racket?It’s not JS, it’s not JVM … it’s chez scheme?
It’s not chez. It’s Racket’s own VM.
This older/simpler post post by someone else (referenced in the later one) explains it more simply: http://www.dbrunner.net/2015/08/27/running-racket-on-aws-lambda/
IIUC TL;DR you raco exe
your Racket program, put that and some shim js in a zip file, and upload it to aws lambda.
@todo ^
lol, looks like they are using the NodeJS FFI to call racket
The latter post talks about using node to start a racket process — then simply pipes to/from it. IIUC one could use python instead of node. I agree both are sort of weird. Ask Amazon why they don’t provide a way to pipe directly to a proc in any lang that can use stdin and stdout.
But if they did… they’d probably implement it in one of {node python java}, so… I think the important system design principle here is the usual one: Computers suck and programming in the real world is usually stupid. ¯_(ツ)_/¯
Does anyone have any advice on how to process an xexpr doc? I’m thinking of recursively calling a function and using match to decompose it, but idk i feel like there should be a better way
In Pollen, there’re decoders that traverse the xexpr tree for you
Is there a way to get https://docs.racket-lang.org/guide/ as a pdf? Sometimes, for deep reading, I prefer paper so I can scribble in the margins.
Whereas ipad reading = clicking on links = somehow watching funny cats on youtube