
How can I compile the Racket manuals to a different format? I see them in the source tree, but I wonder if they can be made in to a DAISY format as my BrailleSense won’t load the HTML versions.

@hunter.t.joz Besides html I know scribble can generate pdf and markdown.

The pdfs are on the web page. Somewhere.

@hunter.t.joz you can use the raco scribble
command to generate various backend formats


a colleague is experimenting with Racket and has two #lang questions I feel like I should have been able to answer but I’m a bit too rusty. 1) Can you have a submodule with a different #lang/reader in one file? and 2) why do some languages (e.g. rash) complain about a missing module-begin when used as the language of a submodule (i.e. (module something rash ...)
?

If I want to plot histograms with error bars, is there a straightforward way to do this or do I always have to couple a discrete-histogram
and an independent error-bars
2drenderer? Doing the coupling is ok, even if annoying as it forces you to properly compute the error bars x position. However, the biggest issue is that then it overlays two x-ticks: one from the histogram and one from the error-bars. The latter should be ignored.

I took a few benchmarks using speedometer2.0 and obtained the following: (define speedometer2.0
'((brave . (55.80 . 0.55))
(vivaldi . (87.3 . 1.4))
(firefox . (32 . 0.88))
(chrome . (87.5 . 1.1))))

To plot:

(define (plot-speedometer)
(plot (list (discrete-histogram (for/list ([browser-result (in-list speedometer2.0)]
[idx (in-naturals)])
(define browser (car browser-result))
(define value (car (cdr browser-result)))
(list browser value))
#:skip 2.5)
(error-bars (for/list ([browser-result (in-list speedometer2.0)]
[idx (in-naturals)])
(define browser (car browser-result))
(define value (car (cdr browser-result)))
(define error (cdr (cdr browser-result)))
(list (+ 0.5 (* idx 2.5)) value error))))
#:x-label "Browser"
#:y-label "Runs / second"
#:title "Speedometer 2.0 (higher is better)"))

The problem with this is that unfortunately the x-ticks mention the browser names and the ticks from the error bars. How can I remove the ticks from the error bars?


@pocmatos (parameterize ((plot-x-ticks no-ticks)) (plot ....))

those extra ticks are just the default for the whole plot area

@ben thanks. interesting. I expected that to remove the brave
, vivaldi
, etc ticks. Why didn’t it?

those are the #:add-ticks?
from discrete-histogram

https://racket.slack.com/archives/C06V96CKX/p1533046864000470 @thinkmoore 1. I think No — but would be interested to learn otherwise. 2. I don’t know. @willghatch might know, for rash?

@thinkmoore ad 1.) This is in the ball park. Maybe @alexknauth know more? http://docs.racket-lang.org/multi-file-lang/index.html

@thinkmoore 2 is probably because #lang rash
reads to (module m rash/something-else ...)

ah, that makes sense. thanks, both

I vaguely recall someone was working on a library that let you do different kinds of quoting/reading using different delimeters but couldn’t find it on the pkg server

I don’t know these days whether to report problems here or through DrRacket, but the following program gives me a `read’ access denied for .LOCKpkgs.rktd. #lang racket/base
(require racket/sandbox) ;(require racket/gui) ;(require “handin-server/sandbox.rkt”) ;!!! need this.
(define bar 1)
(define foo (make-evaluator ‘(special intermediate) ’() ;(open-input-graphical-file “test/tester/hw.rkt”) ))

@capfredf has joined the channel

@gregor.kiczales What happens when you delete the lock?

Same thing?

It comes right back when I re-run and I get the error.

@zenspider Had a similar problem. Did you solve it? https://github.com/racket/drracket/issues/123

@soegaard2 no, I never solved it. I think I punted outright after filing that issue

Hello, everyone. A quick question about composable continuations: The expression (+ 1 (call-with-composable-continuation (lambda (k) (+ 10 (k 10)))))
in REPL gives me back 22, which is expected. However, if I run the file shown below: #lang racket
(+ 1 (call-with-composable-continuation (lambda (k) (+ 10 (k 10)))))
I will get an error: ; +: contract violation
; expected: number?
; given: #<void>
; argument position: 2nd
; other arguments...:
; Context:
; ~/tmp/test.rkt:2:40
; ~/tmp/test.rkt:1:1
why does the application of the captured continuation return #<void> here?

@capfredf All repl interactions are wrapped in a prompt.

Try

(require racket/control) (prompt (+ 1 (call-with-composable-continuation (lambda (k) (+ 10 (k 10))))))

Also in a module expressions at are wrapped in a print - so the void
you see is the result of printing 11.

That is, without the prompt too much of the continuation is caught.

@soegaard2 That makes sense. Thank you very much.

It’s a bit confusing in this case that expressions are implicitly wrapped in a print, but it is very convenient, when not dealing with continuations.

Okay, will give that a try.

For us the inability to import racket/sandbox is a pretty big problem right now. The term starts in a month and we are trying to set up our world.

@gregor.kiczales the usual approach is to allow the sandbox read access to the whole file system

I’m not sure I understand the suggestion you are making. How do I effect what you are suggesting? The sandbox module has no specific configurations about file system access that I can see.

@gregor.kiczales see the sandbox-path-permissions
parameter http://docs.racket-lang.org/reference/Sandboxed_Evaluation.html?q=sandbox#%28def._%28%28lib._racket%2Fsandbox..rkt%29._sandbox-path-permissions%29%29

just setting (sandbox-path-permissions (list (list 'read "\")))
should make things work

@zenspider The failure to hide on Mac is a known issue since Racket 6.11: https://github.com/racket/drracket/issues/161