I think the problem here is that you're re-defining a module. The
`lifted/4` binding is probably a generated one in the module, and
redeclaring the module would require changing `lifted/4` --- and
probably other bindings that you would recognize, but `lifted/4`
happens to be hit first.
To avoid th
I have a program that takes a (trusted) module form as a list and then
pulls out a provided value using this method. I used syntax/modread and
generate a pseudorandom id for each value of `trusted` here.
(define-namespace-anchor anchor)
(define module-namespace (namespace-anchor->namespace anchor)
p.s: scale-to-fit might be interesting for you and if you don't care about
extra options (for background/alpha etc.) you can construct the pict with
(bitmap path) directly instead of (bitmap (make-object bitmap% ...))
p.p.s: I think there was also a way to convert/use images within picts or
the
On 5/12/21, Robert Haisfield wrote:
> Daniel, that's awesome. How would I filter down this list according to the
> regex?
>
> (define list-of-files (map path->string (directory-list starting-path)))
You can wrap it in a filter:
(define list-of-files (filter (lambda (str) (regexp-match? "\\.png
Can you use BinaryenModuleWriteText instead? It looks like it was
added to address your use case. -J
On Wed, May 12, 2021 at 3:49 AM Paulo Matos wrote:
>
> Hi,
>
> I have a shared library for which I am creating some bindings:
> https://github.com/pmatos/racket-binaryen
>
> There's a function Bin
Daniel, that's awesome. How would I filter down this list according to the
regex?
(define list-of-files (map path->string (directory-list starting-path)))
On Tuesday, May 11, 2021 at 6:57:03 PM UTC-6 daniel@gmail.com wrote:
> Hi Robert
>
>
> > Even better if I could point the function at a
Personally I use pict and racket/draw instead of htdp/image, because
save-image is png only.
Pict to transform or load the image, racket/draw's bitmap% to save and/or
load the image
(sidenote: in general I find pict more pleasant to work with, but that may
be subjective):
(require pict
I'm new to Racket and have just started working through the "How to Code"
course on edX. When I right-click on a primitive in DrRacket and try to
search for it in the Help Desk I get the following error:
send-url: Couldn't find a browser to open URL:
"file:///C:/Users/chaec/AppData/Local/Temp/
I ran into this issue with rsound. I'm not sure how standard output can
be directly captured from a lower-level language in a Racket context
when that language can freely ignore the Racket printer and write
directly to STDOUT within the same operating system process.
I'd hate to just add a "me too
If you're willing to accept a low tech solution, might I suggest this:
$ perl -i.bak -lpe 's/\(foo/\(make-foo/g' *.rkt
Also, I'll self-plug and point you towards this:
#lang racket
(require struct-plus-plus )
(struct++ foo ([a real?]) (#:omit-reflection) #:prefab)
(define checked (foo++ #:a 7
Dan, that's awesome. Thank you.
Martin, I would love some way to extract the image metadata from each of
the files outputted by Dan's function. All my function does is take the
current width and height and apply some math to return some new values, so
right now I'm just manually going into find
Hi,
I have a shared library for which I am creating some bindings:
https://github.com/pmatos/racket-binaryen
There's a function BinaryenModulePrint that prints a WebAssembly module
to stdout.
When I wrap it in racket, if I do something like:
(define mod ...)
(with-output-to-string (lambda () (Bi
12 matches
Mail list logo