Thank you for writting this.
With regards to distribution options with racket,
Is there a way to ship platform independent, but hard to reverse engineer ‘precompiled’ binaries ?
For example for deploying closed-source software into a private enterprise (where the servers are controlled by customers)
Racket CS modules are compiled to native code so you can ship those around and reverse-engineering them would be about as hard as reverse-engineering any other natively-compiled code. You’d have to compile these separately for every platform you want to target. I believe there’s a way to ship modules in “linklet” form, which is platform-independent, and Racket CS will convert those to native code on first run, but I’ve never tried it.
Here’s the output of running raco decompile on the compiled version of the app in the post: https://gist.github.com/Bogdanp/64a7ef659d6376fff918e3cb23518f9b
The serendipity is high right now as I have Dr Racket open right now and am working on a web app. Thanks a ton @bogdan.
Interesting. Any experience with cross-compilation? Apparently there’s:
But doesn’t appear to have a lot of convenience around it (eg: no “raco add-target win64; easily compile for win64”)?
I’d never tried it before, but it seems to work great. I downloaded a build of Racket CS for linux to ~/Downloads/racket and then ran the following:
$ racket -C -G ~/Downloads/racket/etc -X ~/Downloads/racket/collects -l- raco exe -o app app.rkt
$ file app
app: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=7fbdabb07e54037e2ede76daf74d7ecfdcc5b486, stripped
$ racket -C -G ~/Downloads/racket/etc -X ~/Downloads/racket/collects -l- raco distribute dist app
$ tree dist/
│ └── app
│ └── exts
│ └── ert
│ ├── r0
│ │ └── example.txt
│ ├── r1
│ │ └── error.css
│ ├── r2
│ │ └── dh4096.pem
│ └── r3
│ └── bundles
│ ├── es
│ │ └── srfi-19
│ └── srfi-19
12 directories, 7 files
Someone could definitely make this easier by providing a package to add a raco command like the one you’ve suggested.
Interesting. I have enjoyed doing some scheme in the past.