niko
2021-8-17 12:05:36

Is there any way to generate a “fresh identifier” in a typing judgment in redex?


niko
2021-8-17 12:05:50

I see “fresh” but it appears to be a special form in a reduction relation.


capfredf
2021-8-17 13:22:12

escape to racket then gensym


massung
2021-8-17 13:51:43

Racket doesn’t really have support for lightweight slices does it? I can only copy a portion of a vector, byte-string, string, etc. I can’t just create a new object with an offset + length into an existing one to save memory?


samth
2021-8-17 13:56:05

escape to racket, yes, but gensym no — use variable-not-in or variables-not-in


badkins
2021-8-17 14:11:31

This seems like a bug in string-split: (string-split "::XY" ":") ; => '("" "XY") I expected the output to be '("" "" "XY")


badkins
2021-8-17 14:11:45

Racket v8.1.0.6 [cs]


massung
2021-8-17 14:13:16

Same output in 8.2 [cs]


badkins
2021-8-17 14:19:43

Both of the following work as expected: (regexp-split #px":" "::XY") (string-split "::XY" ":" #:trim? #f) Ah… I misunderstood #:trim? - I assumed it was trimming whitespace. Sorry for the noise everyone !!!


badkins
2021-8-17 14:20:55

I’m not sure #t is the best default for #trim?


mark.warren
2021-8-17 14:21:24

@badkins Yes, easy to miss the trim part.


badkins
2021-8-17 15:07:30

I just discovered hs-toggle-hiding which is provided by hideshow.el which Racket mode includes in Emacs. It’s very handy for collapsing large blocks of code that you don’t need to see. Rather than use both hs-hide-block and hs-show-block, using the single hs-toggle-hiding saves from using up more key chord space. I had C-c h available, so (global-set-key (kbd "C-c h") 'hs-toggle-hiding) in my Emacs config did the trick.


ben.knoble
2021-8-17 16:02:49

IIRC @notjack had done some thinking about views, and @hazel was doing some stuff with data processing. Not sure if they can help. I’m not aware of anything in core racket but i’m pretty new to the stdlib.


samdphillips
2021-8-17 19:24:14

In TR is the difference between cast and assert that cast uses contracts vs assert using a predicate?


samth
2021-8-17 19:28:17

yes


notjack
2021-8-17 19:41:57

Core racket doesn’t have support in the stdlib. We’d need generic collection interfaces. It’s something being considered for Rhombus though.