spdegabrielle
2021-6-29 08:58:24

Syntax Parse Bee 2021 Write a macro with Racket this summer! Win stickers!

It’s like a Quilting Bee, but for syntax parse macros!

In this case the ‘quilt’ is a patchwork of syntax-parse macros.

https://github.com/syntax-objects/Summer2021/blob/master/ANNOUNCEMENT.md\|https://github.com/syntax-objects/Summer2021/blob/master/ANNOUNCEMENT.md


raoul.schorer
2021-6-29 09:31:54

What is the policy (if there is one) about typed/racket in the standard lib? For example, if one refactors a lib module into a github PR, is there a preference for #lang racket? What about main-but-not-std libs such as data?


sorawee
2021-6-29 09:40:17

AFAIK:


sschwarzer
2021-6-29 10:30:39

I’d prefer #lang racket/base. Some people use racket/base to reduce startup time. I use it often. A “Hello world” from raco exe with #lang racket/base on my computer takes about 100 ms and with #lang racket it takes 300 ms. (For the record, with #lang typed/racket the time becomes about 650 ms.)


sschwarzer
2021-6-29 10:40:11

My understanding is that as soon as you directly or indirectly require one module that uses #lang racket you lose all the startup time advantages of #lang racket/base. Is this correct?


raoul.schorer
2021-6-29 10:41:21

Yes, although there’s a corresponding #lang typed/racket/base


sschwarzer
2021-6-29 10:42:48

By the way, using #lang racket/base with (require racket/match) leads to a run time of around 230 ms. That’s why I avoid racket/match for short-running programs. :wink:


sschwarzer
2021-6-29 10:45:20

> Yes, although there’s a corresponding  #lang typed/racket/base A raco exe-compiled “Hello world” with #lang typed/racket/base takes 550 ms here.


sschwarzer
2021-6-29 10:46:13

But of course, for numeric-heavy stuff, Typed Racket will help a lot. :slightly_smiling_face:


ryanc
2021-6-29 10:46:35

Libraries should never use #lang racket; they should use #lang racket/base instead. (For the reasons listed by @sschwarzer). Ask before adding a dependency on Typed Racket to a package that doesn’t already have one. (Or before spending significant effort to prepare a PR that does so.) The answer is likely to be “no”, but maybe not, and it’s probably worth having the conversation.


massung
2021-6-29 13:22:30

Currently, I have a project that if I build it with raco exe --gui .\main.rkt (on Windows 10), it works perfectly. However, if I build it from DrRacket it fails to run afterwards; no error is shown, the app launches the process and then dies immediately.

In DrRacket, I have the “gracket” option picked (which I assume is the same as --gui), and I also have the “Embed DLLs” option checked. I’m unsure what the difference(s) could be. Anyone have any ideas?


mflatt
2021-6-29 13:30:41

Does using raco exe --embed-dlls --gui main.rkt produce a working executable?


massung
2021-6-29 13:33:07

No. And building that way (and running from the terminal) produced a console window with an error:

ssl-connect: context creation failed (error:00000000:lib(0):func(0):reason(0))


massung
2021-6-29 13:34:30

Is the embedded openssl.dll different from the one installed on my machine that it’s finding in the PATH when not embedded?


massung
2021-6-29 13:34:51

(e.g. perhaps it’s using one from the racket distro when embedding that’s problematic)?


mflatt
2021-6-29 13:35:35

In v8.1 and earlier, the OpenSSL library doesn’t work with --embedl-dlls . This has been fixed for v8.2 and in snapshots.


massung
2021-6-29 13:35:55

ok. looking forward to 8.2 then :wink:


mflatt
2021-6-29 13:36:07