
Is it possible to drop into a debugger repl when an exceptionoccurs with racket-mode?

I am trying to expand the form (begin (struct s (a b)) (s 1 2))
but I can’t get get the constructor (s 1 2)
to expand. The expander thinks its a just some top level form and marks it with #%top
.

You need to do it in a module

The Plot Cookbook has launched!
Let’s start simple!
The Plot Cookbook currently has a readme that links to one plot on http://pasterack.org/
Who will add a second one?
Once we have a small collection we can look at doing this as a wiki or documentation only package.

So I am doing this ATM
> (syntax->datum (expand '(begin (struct s (a b)) (s 1 2))))
'(begin
(begin
(define-syntaxes (struct:s s5 s? s-a s-b) (#%app values))
(define-syntaxes
(s)
(#%app
make-self-ctor-checked-struct-info
(lambda ()
(#%app
list
(quote-syntax struct:s)
(quote-syntax s)
(quote-syntax s?)
(#%app list (quote-syntax s-b) (quote-syntax s-a))
(#%app list '#f '#f)
'#t))
'(b a)
(#%app list (#%app list) (#%app list))
(lambda () (quote-syntax s5))))
(define-values
(struct:s s5 s? s-a s-b)
(let-values (((struct: make- ? -ref -set!)
(let-values ()
(let-values ()
(#%app
make-struct-type
's
'#f
'2
'0
'#f
null
(#%app current-inspector)
'#f
'(0 1)
'#f
's)))))
(#%app
values
struct:
make-
?
(#%app make-struct-field-accessor -ref '0 'a)
(#%app make-struct-field-accessor -ref '1 'b)))))
(#%app (#%top . s) '1 '2))

Right, but if you expand (module m racket/base (begin (struct s (a b)) (s 1 2)))))
it will do what you expect.

If you make a PR I will give you commit privileges

nice! thank you!

Alternatively, use expand-top-level-with-compile-time-evals
.

Here’s one for you @spdegabrielle, feel free to add it! http://pasterack.org/pastes/66996\|http://pasterack.org/pastes/66996

Can I have a one line description

Would be nice to have that violin function somewhere reusable

Where should it live? as part of plot?

It’s very similar to a box plot, but gives you more incite into the data: https://en.m.wikipedia.org/wiki/Violin_plot\|https://en.m.wikipedia.org/wiki/Violin_plot

I’d be happy to submit a PR to plot if Alex is willing to merge something like this

I think @alexharsanyi has been in favor of this sort of thing in the past

@hanwe has joined the channel

There is git-checkout-credentials
key for raco pkg config
, which uses the HTTPS interface.

Does anyone regularly build Racket’s variant of the Chez Scheme User’s Guide? I’ve been trying with the one in the v8.3
tag, but make
is reporting an error in the logcheck2
target because of various overfull \hbox
es.

(The PDF is generates and looks basically fine, but the HTML is not.)

Yes, a violin plot would be nice to have as part of the plot package. I also have a separate box-and-whiskers plot, which is on my todo list to add to the plot package.
@camoy, would you be interested in creating a pull request to add this to the plot package? To add it there it would also need documentation and tests, plus a few tweaks to the code, so it is a bit more work, but I can walk you through the process.

The current head of the release
branch has the same problem.

I only try to build the PDF, and I have been ignoring the overflow errors.

Do you build with the makefile, or some other way? I’ve patched makefiles/Makefile-csug.in
to make a no-op, but then I get another error from the checklibs
target.

I guess it’s complaining about a lack of documentation (or something?) for these new bindings (from the make
output): sort libsrecorded \| uniq > libsrecorded.sort
sort libslisted \| uniq > libslisted.sort
diff libsrecorded.sort libslisted.sort
6d5
< $lambda/lift-barrier
394d392
< fxsll/wraparound
405,407d402
< fx*/wraparound
< fx+/wraparound
< fx-/wraparound
662d656
< procedure-known-single-valued?
711d704
< record-type-field-indices
745d737
< scheme-fork-version-number

If I patch that checklibs
out as well, I get a fatal error in the csug.hfirstrun
target, Exception: unexpected command '\hphantom' on line 3532, character 179 of "./fore
ign.tex"
. The referenced line seems to originate from line 3105 of foreign.stex
: \cfunctTwo{void}{Sregister_boot_file_fd_segment}{const char *\var{name}, int \var{fd},}{iptr \var{offset}, iptr \var{len}, int \var{close}_\var{after}}
The generated line is: [func] \scheme{void} \scheme{Sregister{\schunderscore}boot{\schunderscore}file{\schunderscore}fd{\schunderscore}segment}\scheme{(const~char~*\var{name},~int~\var{fd},}\\\hphantom{[func] \scheme{void} \scheme{Sregister{\schunderscore}boot{\schunderscore}file{\schunderscore}fd{\schunderscore}segment}\scheme{(}}\scheme{iptr~\var{offset},~iptr~\var{len},~int~\var{close}{\schunderscore}\var{after})}\\

Those missing bindings should generally be documented, so I’ll work on that and do something (maybe change the target) about overfull boxes that don’t seem to me worth tracking.

I’ve pushed documentation repairs to both the racket/racket
and racket/ChezScheme
repos. In the latter case, I ordered the doc repairs before changes in v8.4.0.x, so the v8.4 tag on that repo can include the repairs.

Sure, I can make a draft PR and we can go from there.

Thanks! This works for me. If it’s not too inconvenient, it would be helpful if these could be cherry-picked for the release
branch on racket/racket
, as well, but I can certainly work around that if not. (cc @jbclements)