panduwana
2021-3-13 08:15:48

@panduwana has joined the channel


anurag.rawat0201
2021-3-13 09:33:05

I tried with this : (define (replace-ment lst indices with) (let iter ((lst lst) (indices indices) (index 0)) (cond [(empty? lst) empty] [(empty? indices) lst] [(equal? index (car indices)) (iter (cons with (cdr lst)) (cdr indices) (+ 1 index))] [else (iter (cdr lst) (cdr indices) (+ 1 index))])))


joel
2021-3-13 16:19:55

So here’s the thing I was working on that occasioned my question about enumerations yesterday (I figured it out): https://twitter.com/joeld/status/1370770153336627201


bedeke
2021-3-13 16:47:19

Would you mind sharing the code?


joel
2021-3-13 17:44:04

I do plan to! It’ll be on <https://github.com/otherjoel|my GitHub profile> at some point and I may do a little post at https://the\|https://the http://notepad.com\|notepad.com


joel
2021-3-13 17:52:45

I think the next step is to make it smarter about semantics: the ability to specify each word as a noun, adjective etc so it can build up more poetic variations


sschwarzer
2021-3-13 19:51:28

Is there also a way to enter a submodule? For example, I can enter a module file task.rkt with ,enter task.rkt. Now I want to enter the test submodule (defined with module+) in the task.rkt module.

I tried the “obvious” ,enter test after ,enter task.rkt, but I get the message ,enter: unknown module: test.

I also tried several web searches, but didn’t find anything useful.


sschwarzer
2021-3-13 20:22:12

This works (and answers my question). :-) $ racket &gt; ,enter (submod "task.rkt" test) ... test run output ... "task.rkt"&gt; test-sorting #&lt;procedure:test-sorting&gt; I arrived at this answer by reading https://docs.racket-lang.org/reference/require.html and trying the combination of submod from there with ,enter in the REPL.


tov
2021-3-13 22:10:13

Does DrRacket have a place where it creates compiled directories other than right next to the source files?


mflatt
2021-3-13 22:12:34

You can direct it to a different place with current-compiled-file-roots or PLTCOMPILEDROOTS.


tov
2021-3-13 23:36:27

Thanks, Matthew. Those aren’t ever configured automatically when someone installs, right?