Re: [racket-users] Running a program in multiple languages at once

2017-08-17 Thread Jens Axel Søgaard
2017-08-17 8:40 GMT+02:00 Sam Waxman : > Hey all, I ended up figuring this out. > The solution was essentially to make a reader that looked like this: > > (define (read-syntax input-port) > (let ([copy1 (copy input-port)] > [copy2 (copy input-port)]) >

Re: [racket-users] Running a program in multiple languages at once

2017-08-17 Thread Sam Waxman
Hey all, I ended up figuring this out. The solution was essentially to make a reader that looked like this: (define (read-syntax input-port) (let ([copy1 (copy input-port)] [copy2 (copy input-port)]) (with-syntax ([mod1 (Lang1-read-syntax copy1)] [mod2

Re: [racket-users] Running a program in multiple languages at once

2017-08-13 Thread Ben Greenman
One idea: - write your program just like that, `1 + 2` with no #lang line, - run your program with a raco command that runs the program once for each language Something like `raco mystery-lang -L lang1 -L lang2 -L lang3 file.txt` In case you need an example raco-command:

[racket-users] Running a program in multiple languages at once

2017-08-12 Thread Sam Waxman
Hello, Let's say I have a program the user entered that just looks like 1 + 2 and I have three different #langs, all with different parsers and different notions of addition, for which this is a valid program. I'm looking to make it so that this program outputs the following: "Output for