soegaard2
2021-5-7 07:58:20

@kyp0717 There is a language for that :slightly_smiling_face: Alex Knauth has written the multi-file language. https://docs.racket-lang.org/multi-file-lang/index.html To be clear, it allows you to switch between languages in the same file.


samth
2021-5-7 15:41:01

Fairly positive discussion of 8.1 on HN: https://news.ycombinator.com/item?id=27073879


soegaard2
2021-5-7 15:45:07

I want to use the syntax obj.name in a language. Therefore I have been experimenting with the read-cdot parameter. Now, getting it to do the right thing wrt to a.b is easy. However, I am annoyed that numbers like 2. no longer works. The reason is that the reader consumes any whitespace after the dot. I would much prefer to get, say, (#%dot-ends 2) . Or (#%dot 2 . <some-magic-value>) when either whitespace or an bracket follows the dot.

This could be controlled with a second parameter, say, read-cdot-allow-whitespace .

But maybe I am overlooking something. Is there an existing solution, that doesn’t involve adding to the builtin reader?


sschwarzer
2021-5-7 20:52:59

Thank you!

I noticed there’s the Racket version in a small font on most of the documentation pages, so I can check when the documentation is updated to version 8.1.


sschwarzer
2021-5-7 20:59:51

Would it make sense to have automatically updated in-development docs? I’ve seen this at the Nim project. Their regular documentation is https://nim-lang.org/docs/lib.html\|here and their in-development documentation is https://nim-lang.github.io/Nim/lib.html\|here.



sschwarzer
2021-5-7 21:16:33

Under the first link, I see only a kind of placeholder (“under construction”) page.


sschwarzer
2021-5-7 21:47:18

I don’t see anything about cross compilation in the <https://www.cs.utah.edu/plt/snapshots/20210504-d777cd2/doc/raco/exe.html|new docs> or in the output of raco exe --help. To me the help output looks exactly the same as for raco exe --help in Racket 8.0. I thought I might have done something wrong during the installation, but racket does display 8.1 as version, so I assume raco is the binary for version 8.1.


mflatt
2021-5-7 22:00:01

Looks like it’s not as well linked as it should be. See https://www.cs.utah.edu/plt/snapshots/20210504-d777cd2/doc/raco/cross-system.html


sschwarzer
2021-5-7 22:27:32

“Racket CS supports cross-compilation using raco exe ” sounded much simpler. :smile:

So if I understand https://www.cs.utah.edu/plt/snapshots/20210504-d777cd2/doc/raco/cross-system.html correctly, I’d need to run something like racket --cross-compiler ‹target-machine› ‹cross-dir›/lib \ -MCR ‹absolute-zo-dir›: \ -G ‹cross-dir›/etc -X ‹cross-dir›/collects -l- raco exe my-main.rkt after doing my own compilation of racket from source code to generate the cross-dir directories with the support for the target platforms I want to create binaries for? In my case, my host system is Linux and I want to create stand-alone binaries for Windows and Mac OS X. Can I use the download “Unix source distribution”, i. e. racket-8.1-src.tgz as basis?


mflatt
2021-5-7 22:31:56

You can use the tarball minimal distributions instead of starting from source. See “More Installers” on the download page.


sschwarzer
2021-5-7 22:32:50

If the cross-compilation support is actually supposed to be able to compile binaries for Windows from Linux (for example) without needing an installed Windows OS, it would be great if someone could write a tutorial on that. :slightly_smiling_face:


sschwarzer
2021-5-7 22:36:58

> You can use the tarball minimal distributions instead of starting from source. Does this mean that the minimal Linux distribution contains the cross-compilation for Windows and Mac OS X targets or that I need to download a minimal distribution for each target platform? (Which would probably be ok, I’m just asking for clarification.)


sschwarzer
2021-5-7 22:39:56

I’m not sure I understand how Racket cross-compilation actually works.


sschwarzer
2021-5-7 22:44:51

When I read the sentence about cross-compilation support in raco exe, I thought I could install a Racket distribution for Linux and, for example, create a Windows binary with $ raco exe --target=windows --orig-exe my-main.rkt Since not everyone needs cross-compilation support, it would be ok for me if there was an extra, larger download for this, like “Linux with cross-compilation support for Windows and Mac OS X.”


mflatt
2021-5-7 23:02:18

Bogdan’s improvement for v8.1 makes it at least possible to cross-build with raco exe on Racket CS, but I agree that the cross-compilation support is still too complicated. I’ve always thought it would be good to have a wrapper (maybe a new raco tool) that downloads a tarball for platform X as a starting point for cross-compiling for platform X, installs needed packages with the right fancy flags, and so on.

And now that I write some of this out, I remember a piece that’s still missing in even the tarballs, which is that for Racket CS you need a compiler stub that is specific to the platform Y where you’re building and the target X where you want to build (so, we’d have to have that stub for every combination of platforms). Currently, you have to build that stub from Chez Scheme’s source. So, I have to take back even the suggestion that the tarballs are enough without source right now.


rslima
2021-5-8 01:13:08

@rslima has joined the channel


samdphillips
2021-5-8 01:19:07

I think there is an issue about this.


samdphillips
2021-5-8 01:20:27

Similar (whitespace related) but not the same: https://github.com/racket/racket/issues/1454


mflatt
2021-5-8 02:00:03

I think I see the solution for the missing compiler piece: it’s easy to package up the needed part of the the Chez Scheme source, and then on any platform Y you can use the Chez Scheme inside Racket to compile that to the cross-compiler for X that raco exe needs.