
I added some documentation for the plot metrics interface, which was added a while ago to the plot package by @bedeke , and I would appreciate if people could review it and provide feedback. In particular, even though the plot-metrics<%>
interface is provide
-d, it does not seem to be available from the plot package (there is a short example in the PR illustrating the problem), I need some help in fixing that problem. Thanks, Alex.

Did Scribble’s HTML renderer ever support .jpg images, or am I misremembering? It’ll produce the <img> tag, but #:scale has no effect.

I would be surprised if it didn’t.

The docs suggest otherwise:

For the HTML renderer it’s probably a matter of adding “jpg” to a list of accepted formats.

I think this the file: https://github.com/racket/scribble/blob/master/scribble-lib/scribble/html-render.rkt But it seems a way of extracting the size from the jpg is needed?

I think the trick is to use (bitmap "foo.jpg")
. Scribble will then produce a png, which scales correctly.

Am I missing something here?
#lang racket/base
(require (for-syntax racket/base
racket/port))
(define-syntax (example stx)
(syntax-case stx ()
[(_)
(with-syntax ([ok (datum->syntax stx (with-output-to-string
(lambda ()
(raise-syntax-error 'example "fail"))))])
#'ok)]))
This code silently swallows the syntax error.

When I rewrite it to use call-with-output-string
, it works as expected.

Oh wait, never mind. It only swallows the syntax error when I eval (example)
in racket-mode’s REPL. That’s still surprising, but less so.

Wouldn’t the best fix be to modify the plot collection to export this interface?

Thanks, I’ll try that.

Wow, the second -
was subtle, and I did miss it! Where is -l-
documented? I didn’t see it in racket --help

It’s because the docs and the --help
says that multiple single-letter flags like -a -b
can be written -ab
, and it happens that --
is (not necessarily intuitively) a single-letter flag, so you can write -a -b --
as -ab-

anyone have issues with installing a racket pkg right now? it doesnt work, its just stuck on: Resolving "drcomplete" via <https://download.racket-lang.org/releases/8.3/catalog/>
Resolving "drcomplete" via <https://pkgs.racket-lang.org>

Works here.

huh.. not sure whats wrong here then.. lemmie reinstall racket

nope… my distro is arch, lemmie reboot my computer

Maybe it’s 8.3 specific. I was using an older version.

yepp, cant connect to it, if anyone is on arch linux and can connect to it on 8.3 in official repos, tell me thanks : https://archlinux.org/packages/community/x86_64/racket/

k it works, took way too long though

I’ve posed the results at https://racket.discourse.group/t/what-are-the-most-used-packages/108/6?u=spdegabrielle

The problem I have is that I don’t know how to do that — the interface is already exported using provide
, but it is not available.

That’s rather strange :thinking_face:

(afk) Have you tried requiring the untyped submodule here: https://github.com/racket/plot/blob/master/plot-lib/plot/private/common/plotmetrics.rkt\|https://github.com/racket/plot/blob/master/plot-lib/plot/private/common/plotmetrics.rkt

Yes, the interface is imported from the submodule and re-exported (you can see that in the “utils-and-no-gui.rkt” file in the PR I linked.) Also, one of the tests (pr90.rkt) used to import the private submodule directly: if it imports both the plot module and the private one, racket complains that plot-metrics<%>
is duplicated (exported from both modules), if I remove the private submodule, racket complains that plot-metrics<%>
is not valid… You can also see that change in the PR… I will try to experiment more with this, but I spent half a day yesterday trying to fix this problem….