soegaard2
2021-4-2 07:33:46

If you compile B on Monday A needs to run (the expander uses A for macros in B). So the expander instantiates A. When compilation is done, the instance of A is garbage collected. Then on Tuesday you run B. Now your own code needs A, so it is instantiated again.


alexharsanyi
2021-4-2 10:39:45

I’m not sure about making all racket code a package.

Something like ActivityLog2 is intended for people who want to analyze their training data, and these people are not expected to know, or care, that it is written in Racket.

For such an application, I think it is simpler to provide a stand-alone installer instead of asking people to install Racket and run a rack pkg command …


laurent.orseau
2021-4-2 11:13:50

What if (let me dream) racket is installed by default everywhere, somewhat like Python on many Unix?


laurent.orseau
2021-4-2 11:18:35

@samth gists are much more lightweight and very useful though—you use them too i think. Maybe raco pkg install could handle gist urls, somehow? url2script already does something along these lines


kellysmith12.21
2021-4-2 11:21:10

(excuse my nonhelpful sarcasm) Since so many user-facing applications are just Electron apps, and since Web Assembly is supported by all the major browsers (thus Electron), all that’s necessary is to get Racket running on Web Assembly, then we can run Racket everywhere.


kellysmith12.21
2021-4-2 11:22:16

@samth I watched your presentation, and it helped clear things up. Thanks :smile:


alexharsanyi
2021-4-2 11:34:44

You can already run Racket applications everywhere (well on major platforms anyway), and you can already create standalone executables on those platforms. What benefits would Web Assembly provide over what can be done now?


soegaard2
2021-4-2 11:38:33

The case of racket-mode is different, I think. It is a developer tool and needs more integration with Racket (e.g. versions matter) than ordinary applications.


kellysmith12.21
2021-4-2 11:42:17

Ostensibly, the Web Assembly would be a roundabout way of achieving @laurent.orseau’s dream of having Racket installed everywhere, since a browser could then download and run any Racket package, without the user needing to think about the installation process.


kellysmith12.21
2021-4-2 11:42:50

(But I was mostly poking fun at the pervasive use of web apps. Sorry if I caused confusion.)



samth
2021-4-2 13:04:54

That was a fun talk to give


soegaard2
2021-4-2 13:05:15

Is it a standup stage?


samth
2021-4-2 13:07:05

@alexharsanyi I mostly mean in a development sense, that you’d have an ActivityLog package on your machine, and you’d run some command to build the exe from that package. I agree that your users shouldn’t need to think about Racket or Racket packages.


greg
2021-4-2 13:53:19

c. 2015 startups in NYC operated out of stand-up comedy clubs during the daytime, to save rent.


greg
2021-4-2 13:53:45

I’m mostly joking but not entirely :simple_smile:


cb1465
2021-4-2 14:02:03

@cb1465 has joined the channel


sschwarzer
2021-4-2 18:15:35

In a Scribble document, I’m trying to define an abbreviation to avoid repetition of the same hyperlink code. Currently I have @define(todo.txt (hyperlink "<https://github.com/todotxt/todo.txt>" "todo.txt")) which gives me a stacktrace. I also tried @define(todo.txt @hyperlink["<https://github.com/todotxt/todo.txt>"]{todo.txt"}) which also gives a stacktrace. I haven’t found anything helpful in the Scribble documentation (although I suspect it’s buried there somewhere).

What is the correct syntax?

Also, what’s the syntax to use the abbreviation?


sschwarzer
2021-4-2 18:18:53

> What if (let me dream) racket is installed by default everywhere, somewhat like Python on many Unix? This would be very nice, but unfortunately isn’t the case (yet). :slightly_smiling_face:

Until then, probably CI builds (e. g. on Github) probably are the way to create standalone executables for different platforms. I’m probably going to try this at some point, but probably someone already did this, right? :slightly_smiling_face:


soegaard2
2021-4-2 18:19:13

Maybe? @(define todo.txt (hyperlink "<https://github.com/todotxt/todo.txt>" "todo.txt"))


sschwarzer
2021-4-2 18:22:24

@soegaard2 This gives me: application: not a procedure; expected a procedure that can be applied to arguments given: (element (style #f (list (target-url "<https://github.com/todotxt/todo.txt>"))) '("todo.txt") )


soegaard2
2021-4-2 18:23:42

In the text, simply write @todo.txt (with a space after), or @|todo.txt| if you need something else than a space after.


soegaard2
2021-4-2 18:24:21

( I am guessing, you write @(todo.txt).)


sschwarzer
2021-4-2 18:27:48

Ah, right. Somehow I was thinking the message was from the definition location, not from the usage location. With the usage @\|todo.txt\| it works indeed. (I had written @todo.txt{} (maybe something carrying over from LaTeX :wink:).

Thanks!


sschwarzer
2021-4-2 18:28:31

Actually I wanted to add the usage code in my first message, but forgot it.


joel
2021-4-2 18:36:32

Apropos of distribution issues for Racket’s Windows version. My employer publishes some Windows software and we’ve had the same issues. I was able to get an EV code signing certificate via Sectigo and tested it out today. It set us back $800 for 3 years and took a month after payment to receive it, but it works like a charm. No warnings from Edge or Chrome or SmartScreen, blue “verified publisher” UAC dialog when running. What a, well, racket


samth
2021-4-2 18:43:09

Yes that is likely the route we will take.


sschwarzer
2021-4-2 19:51:25

I build my package with raco setup --only --pkgs todo-txt , at the moment only to rebuild the documentation while writing it. Running this raco setup command takes almost 5 seconds every time, which doesn’t sound much, but is inconvenient if you do this over and over. Is there a way to speed this up? Is there maybe a way to only build the documentation (but I’ve seen nothing like that in raco setup --help)?


sschwarzer
2021-4-2 20:00:36

Actually it’s over 7 seconds. :cry: 5 seconds is for running raco setup without changing the documentation.


sschwarzer
2021-4-2 20:45:24

I’m using code examples in my Scribble document (see https://docs.racket-lang.org/scribble/eval.html ). Is there a way to keep comments in the example code? I could add extra (displayln ...) lines to the example code, but this looks a bit “inelegant.”

For example, I have in the example code ; Sort by 'creation-date , then 'completed? (displayln (tasks-&gt;string (sort-tasks my-tasks (list (sort-spec 'asc 'creation-date) (sort-spec 'asc 'completed?))))) and want to keep the comment “Sort by …” in the output of the example evaluation.


wjb
2021-4-2 22:58:23

You don’t always need to recompile after changes. One thing I do when I’m making a lot of changes is delete the “compiled” directories, and Racket will recompile as necessary without the need to rerun raco setup.

If you need to rebuild the docs, I don’t know that there’s a better way.


wjb
2021-4-2 22:59:14

Wrap them in (code:comment "This comment will be displayed as a comment")


wjb
2021-4-2 22:59:45

There’s some details in the docs about how this and other special patterns work.


chansey97
2021-4-3 00:34:44

Do you think the reset_n necessary? As you said that > shift_k captures the continuation up to the nearest enclosing reset_n where n >= k (but I might have that backwards) If we use reset instead of reset_n, it doesn’t seem to change the semantics?

For example: (reset1 (+ 1 (reset2 (+ 1 (shift1 k k))))) ;; shift1 captures the continuation (+ 1 []) =? (reset (+ 1 (reset (+ 1 (shift1 k k))))) ;; shift1 captures the continuation (+ 1 [])


chansey97
2021-4-3 00:41:43

No…it still seems to be different: (reset2 (+ 1 (reset1 (+ 2 (reset1 (+ 3 (reset1 (+ 4 (shift2 k k))))))))) vs (reset (+ 1 (reset (+ 2 (reset (+ 3 (reset (+ 4 (shift2 k k))))))))) Very subtle…


kellysmith12.21
2021-4-3 06:24:59

Is possible to pass a literal into a syntax class? For example, something like (define-syntax-class (my-class lit) [pattern (&lt;matches ~literal lit&gt; rest ...))])


kellysmith12.21
2021-4-3 06:29:33

I think I have a solution: (define-syntax-class (my-class lit) [pattern (l:id rest ...) #:when (free-identifier=? #'l lit)])