
@bfka2000 has joined the channel


I added Racket Templates

how would I get (cons "name" (list "bob" "smith))
to be to be a pair? e.g (name . '("bob" "smith")
? rather than ("name" "bob" "smith")

It is a pair. But the default printer does not print pairs as (a . d)
always.

The call (list 1 2 3)
creates (cons 1 (cons 2 (cons 3 . ())))
.

It could be printed as (1 . (2 . (3 . ())))
but the default printers prints (1 2 3)
.

Note that if you read "(1 . (2 . (3 . ())))" and "(1 2 3)" you will get the same value.

Remind me - you want the pair notation, because you are producing output for a Rust library to read?

yeah, the serializer expects a specific format

i got it now thanks :9

Have you checked whether the Rust serializer can read both notations?

is this notation of not printing pairs specific to racket? or do other schemes also do this? in which case ill look into the config options for it

This is standard for both Scheme, Racket and Common Lisp.

ohh i see

If it turns out, you need to write your own printer, you can extend this: #lang racket
(define (atom? x)
(or (number? x)
(symbol? x)
(char? x)
(string? x)))
(define (rust-print x)
(define p rust-print)
(match x
[(cons a d) (~a "(" (p a) " . " (p d) ")")]
['() "()"]
[(? atom? x) (~a x)]
[_
(error 'rust-print (~a "don't know how to print: " x))]))
(rust-print '(1 . (2 . (3 . ()))))
It will produce the string "(1 . (2 . (3 . ())))"

Any Linux users, a quick question: does DrRacket not install a mime-type for .rkt files? I’m currently on v7.7. I can add it myself, I suppose, but was curious if there wasn’t a standardized mechanism for it…

I do it myself since it’s not included. But I’m building from snapshot.

do you set up a file icon? I did a cursory look, and didn’t see a necessary .svg file…

I used the drracket-exe-icon.png for .rkt files, and I made one (mashing together something from libreoffice and drracket) for .scrbl files. But both are .png

@alexharsanyi I was playing around with data-frame
(nice package!) and noticed the docs for df-quantile
say the default quantile list is (0 0.25 0.5 1)
(in both the scribble docs and the in-code description in data-frame/private/statistics.rkt
). However, it looks like the actual default in the code is (0 0.25 0.5 0.75 1)
. The latter is more in line with what I was expecting (it seemed odd that the default quantiles were asymmetric). i don’t want to gh-spam you with an issue/PR, but wanted to let you know about it. but i am happy to do a PR for the docs and code comment if you’d like

The documentation for the package contains many omissions and mistakes, and PRs to improve that are welcome. While I use the package myself, I don’t refer to the documentation that often in order to notice these problems.
When you explore the package, you might notice that it contains some functionality which is not exported and needs to be referenced as (require data-frame/private/...)
, if you find this functionality useful in your application, PRs to make it “public” are also welcome (or just raise an issue to let me know about these cases)

@slade949 has joined the channel

Sounds great, thanks

I got the mask. Thanks it looks great!! I’ll wear it for class Tuesday.

how do you enable the arrows pointing you to an error?

i have vector-ref: index is out of range
index: 1
valid range: [0, 0]
vector: '#(-1)
and i dont know which line number its at… its not showing the arrows either

or does it only show on certain errors?

I presume you are using DrRacket? Which language? Has debugging been enabled in the “Language” menu? (Maybe you need to click a button to see the advanced settings).

drracket

ohhhhh

no debugging or profile was turned off huh..

think i switched it off because it made editing slow at one point.. type latency and render hitches

You only need “Debugging”. And in most cases “Populate "compiled” directories" will speed things up.

do most people use drracket when editing racket?

I think so. The only reasonable alternative is Emacs with racket-mode
. Which is great, if you already know Emacs.

Hasn’t someone been working on a Racket mode for VS Code?