spdegabrielle
2021-8-30 10:06:18

The community is the most important thing. I think the Racket community is overwhelmingly welcoming, tolerant, interested in new ideas, and most importantly, willing to answer questions from a dummy like me. :grin:

In addition to the other reasons above I also prefer the Racket REPL.


abmclin
2021-8-30 13:40:55

I would say that parts I like the most about common lisp versus Racket are the condition system and image based development.

I really like the flexibility and power that conditions give you compared to exceptions although Racket’s exceptions are already flexible compared to the more traditional exception model of Java or C#.

While common lisp’s image based development is really nice (the same reason why I enjoyed playing with Pharo and Self) and gives me a flavor of dynamism that’s not found in Racket, experimenting with it has made me realize there are caveats associated with it and I’ve come to appreciate advantages of source-code based development. I frequently find myself wondering if it’s possible to combine both the advantages of image and source-code based dev in a sensible way.


emiliecmitchell
2021-8-30 15:20:19

@emiliecmitchell has joined the channel


greg
2021-8-30 19:37:57

Has anyone tried to implement something like conditions and restarts in a Scheme or Racket? I only have a shallow armchair understanding of the CL condition system but waves hands it seems like it would boil down to structs and continuations waves hands more urgently.


greg
2021-8-30 19:41:15

/me looks forward to learning how much he is glossing over, how badly


samdphillips
2021-8-30 21:48:54

Yeah that sounds about right. IIRC there would need to be an “operator” that replaced the “exceptional condition” with a value and continued from where the exception was signalled and an operator that truncated to a prompt/exception handler. I don’t think it would work with the out of the box Racket exceptions but a layer could maybe be built to handle those “native” exceptions.


samdphillips
2021-8-30 21:49:10

(also probably painfully glossing something over)


samdphillips
2021-8-30 21:56:20

oh or make existing exceptions non-resumable


shu--hung
2021-8-31 01:38:15

In pretty-print-size-hook, what does “the value should be an integer specifying the length of the printed value in characters” mean? What is the value I am intercepting is printed in multiple lines?


sorawee
2021-8-31 01:48:43

You mean what if?


sorawee
2021-8-31 01:49:55

Perhaps you can use make-tentative-pretty-print-output-port to compute the length? I think it will be horribly inefficient though.


shu--hung
2021-8-31 01:52:42

I am actually printing some multi-line stuff. But I don’t get what “the size” mean. Is it the width? Or is it the total length of characters needed (in the buffer)?


sorawee
2021-8-31 01:53:31

I think it’s the latter


sorawee
2021-8-31 01:54:01

You can grep the Racket repo for pretty-print-size-hook. There are two uses. One in the expander and another as a test.


sorawee
2021-8-31 01:54:09

It seems to be string-length-y


shu--hung
2021-8-31 01:57:00

Thanks! I guess it’s not intended to be breakable..


shu--hung
2021-8-31 02:03:46

Newlines don’t interact with string-snip% well in DrRacket REPL :(


sorawee
2021-8-31 02:05:55

Just saw your tweet. When it works it’s gonna be really great :slightly_smiling_face:


shu--hung
2021-8-31 02:07:21

Getting the folded S-expressions is working! But expanding it places everything in a single line. I’m wondering how the student languages keep all the indentation and the linebreaks.


shu--hung
2021-8-31 03:04:39

Have fun with auto term collapsing in traces! https://gist.github.com/shhyou/fc0ab9249ba5b478adffbb3743bdac96