cris2000.espinoza677
2021-11-13 16:28:39

is there a way to have a portable racket distribution in linux? I need a distribution isolated for a project. But I might want to use pkgs installed already in the machine (but is not necessary as I know this requirement might make the solution more demanding)

Right now I use an environment with a custom HOME in a external hdd which I generally leave plugged always, I have encountered no problems this way, but I wouldn’t consider it safe, and if I run raco commands it tries to mess with the installed distribution on the machine.


mflatt
2021-11-13 16:33:18

The x86_64 Linux distribution provided at https::<//download.racket-lang.org> is about as portable as can be. So, if you install it in in-place mode on the external drive, instead of Unix-style, it will probably work right in different Linux installations.


cris2000.espinoza677
2021-11-13 16:33:47

I see, thank you for the tip, I’ll try it


sschwarzer
2021-11-13 20:39:26

Is there a way to pass options to programs I run with racket -l games/sudoku-solver input-file ? If I run racket -l games/sudoku-solver --color input-file (--color is a switch my program supports), I get racket: bad switch: --color presumably because the option is interpreted by racket. On the other hand, if I run racket -l games/sudoku-solver input-file --color I get the error expects 1 &lt;file-path&gt; on the command line, given 2 arguments Of course, a workaround - or maybe the preferred solution anyway - would be to run sudoku-solver --color input-file but I wonder if there’s a way to pass the option in combination with racket -l.


soegaard2
2021-11-13 20:41:13

I think -- can be used. But I am not sure I remember correctly.


soegaard2
2021-11-13 20:42:09

Maybe racket -l games/sudoku-solver -- --color input-file


sschwarzer
2021-11-13 20:43:10

That actually works, thanks! :slightly_smiling_face:


laurent.orseau
2021-11-13 20:44:10

Even better: racket -l- games/sudoku-solver --color ...


sschwarzer
2021-11-13 20:46:06

Indeed, that works, too. :slightly_smiling_face: But I’m not sure if it’s really better. Yes, you have to type less, but the second - is rather subtle and easy to miss.


laurent.orseau
2021-11-13 21:13:25

If it’s for a readme, you’re correct. If its for yourself that’s probably fine :)