cperivol
2022-1-14 16:05:48

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


cperivol
2022-1-14 16:42:18

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.


samth
2022-1-14 16:45:04

You need to do it in a module


spdegabrielle
2022-1-14 16:45:31

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.

https://github.com/Racket-Cookbooks/Plot-cookbook


cperivol
2022-1-14 16:45:58

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))


samth
2022-1-14 16:46:39

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


spdegabrielle
2022-1-14 16:46:55

If you make a PR I will give you commit privileges


cperivol
2022-1-14 16:47:45

nice! thank you!


ryanc
2022-1-14 18:27:47

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


camoy
2022-1-14 19:58:35

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


spdegabrielle
2022-1-14 20:02:42

Can I have a one line description


samth
2022-1-14 20:02:51

Would be nice to have that violin function somewhere reusable


spdegabrielle
2022-1-14 20:03:46

Where should it live? as part of plot?


camoy
2022-1-14 20:06:19

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


camoy
2022-1-14 20:07:00

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


samth
2022-1-14 20:09:03

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


hanwe
2022-1-14 20:15:40

@hanwe has joined the channel


philip.mcgrath
2022-1-14 21:00:41

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


philip.mcgrath
2022-1-14 21:08:14

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 \hboxes.


philip.mcgrath
2022-1-14 21:29:09

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


alexharsanyi
2022-1-14 21:29:52

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.


philip.mcgrath
2022-1-14 21:33:21

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


mflatt
2022-1-14 21:37:55

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


philip.mcgrath
2022-1-14 22:00:33

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.


philip.mcgrath
2022-1-14 22:05:00

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


philip.mcgrath
2022-1-14 22:29:20

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})}\\


mflatt
2022-1-14 22:31:01

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.


mflatt
2022-1-14 23:48:20

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.


camoy
2022-1-15 00:22:07

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


philip.mcgrath
2022-1-15 05:16:04

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)