greg
2020-2-26 13:02:22

I’m still not sure how I feel about #lang lindenmayer/turtle making its own main submodule in the user’s program. Trying to articulate why: https://github.com/greghendershott/racket-mode/issues/430#issuecomment-591409658


samth
2020-2-26 15:16:32

I definitely see the tension between “run the submodule under the cursor” and “run the program the way racket foo.rkt would” but I think I prefer F5 to be the latter


greg
2020-2-26 15:51:14

@samth I understand. On the GitHub discussion I suggested maybe what is today called racket-run should be renamed something like racket-enter-submodule-at-point. And a new racket-run should do the “main else file module” behavior. As you suggest. The rest is just a matter of default keybindings for e.g. C-c C-c and <F5>. Which users can change.


greg
2020-2-26 15:53:33

The two choices are similar to the two command-line choices: racket foo.rkt and racket plus ,enter foo.rkt.


greg
2020-2-26 15:54:11

Where the latter also doesn’t work with #lang lindenmayer/turtle.


samth
2020-2-26 15:55:36

My feeling is that is mostly a weakness in ,enter


samth
2020-2-26 15:56:02

Note that the implementation of xrepl may well predate submodules


greg
2020-2-26 16:05:10

Maybe one way to think about it is that, although module->namespace probably shouldn’t get contaminated with “magic” like “well I mean the main submodule if any, else the file module”, in a world with submodules there could exist some such function and things like xrepl could use it, idk.


greg
2020-2-26 16:07:51

It’s not a complicated function to write. It might be one of those functions whose value is mainly it exists and is in documentation so people notice it. :slightly_smiling_face:


greg
2020-2-26 16:10:25

Maybe the function is I mean ~= enter!, and that could use an enhancement.


pierre
2020-2-26 20:47:34

:wave::skin-tone–3:, trying to find a typed definition of nodeset? . I created an opaque wrapper [#:opaque Nodeset nodeset?] but it’s not enough usable to manipulate its content (first, map second …) in a way that works in the untyped world. Or am I going to far and should I use Any?


samth
2020-2-26 21:17:36

Any is also not going to help


samth
2020-2-26 21:17:56

If it’s a list, then you probably want to use a list type


pierre
2020-2-26 21:29:41

indeed


pierre
2020-2-26 21:29:51

looks like some recursive list type


br.teague
2020-2-26 22:31:12

@br.teague has joined the channel