bfka2000
2020-10-4 12:29:46

@bfka2000 has joined the channel


soegaard2
2020-10-4 16:27:15

Anyone got something to submit to https://racket-stories.com/ ?


spdegabrielle
2020-10-4 16:52:28

I added Racket Templates


jestarray
2020-10-4 16:53:09

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


soegaard2
2020-10-4 16:54:32

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


soegaard2
2020-10-4 16:54:56

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


soegaard2
2020-10-4 16:55:28

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


soegaard2
2020-10-4 16:56:13

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


soegaard2
2020-10-4 16:56:56

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


jestarray
2020-10-4 16:57:54

yeah, the serializer expects a specific format


jestarray
2020-10-4 16:57:57

i got it now thanks :9


soegaard2
2020-10-4 16:58:29

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


jestarray
2020-10-4 16:59:47

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


soegaard2
2020-10-4 17:00:12

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


jestarray
2020-10-4 17:00:33

ohh i see


soegaard2
2020-10-4 17:04:35

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 . ())))"


blerner
2020-10-4 17:58:03

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…


bedeke
2020-10-4 18:13:10

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


blerner
2020-10-4 18:15:21

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


bedeke
2020-10-4 20:49:27

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


george.privon
2020-10-4 23:31:18

@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


alexharsanyi
2020-10-5 00:00:20

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
2020-10-5 00:40:49

@slade949 has joined the channel


george.privon
2020-10-5 03:56:08

Sounds great, thanks


gregor.kiczales
2020-10-5 05:03:53

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


jestarray
2020-10-5 05:07:21

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


jestarray
2020-10-5 05:08:03

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


jestarray
2020-10-5 05:09:50

or does it only show on certain errors?


soegaard2
2020-10-5 05:12:19

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


jestarray
2020-10-5 05:12:38

drracket


jestarray
2020-10-5 05:12:40

ohhhhh


jestarray
2020-10-5 05:12:51

no debugging or profile was turned off huh..


jestarray
2020-10-5 05:13:28

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


soegaard2
2020-10-5 05:13:33

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


jestarray
2020-10-5 05:14:29

do most people use drracket when editing racket?


soegaard2
2020-10-5 05:15:52

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


jcoo092
2020-10-5 06:49:31

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