public
Description: A binding between erlang and mzscheme.
Clone URL: git://github.com/KirinDave/erlenmeyer.git
A bit more work. Nearly ready to start.
KirinDave (author)
Wed Feb 27 22:04:57 -0800 2008
commit  45878b3c8af8a50464c35cb232d873e2c70d5551
tree    d85d7f106c4b3b5d739bbba05660e9f09cde5923
parent  19dc20acd6722507cc5b48a636c3a554c6979dcc
...
5
6
7
 
 
 
 
 
8
9
10
11
...
5
6
7
8
9
10
11
12
13
14
15
16
0
@@ -5,6 +5,11 @@ task :default do
0
   sh "mzc -z -d lib/ src/*.scm"
0
 end
0
 
0
+task :console do
0
+ puts "Erlenmeyer Console - All Modules Loaded\n"
0
+ exec "mzscheme -m -S ./lib/ -t lib/*.zo"
0
+end
0
+
0
 task :clean do
0
   sh "git clean -xf"
0
 end
0
\ No newline at end of file
...
1
2
3
 
 
4
 
 
 
 
 
 
 
 
 
5
6
7
...
1
2
 
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
0
@@ -1,7 +1,17 @@
0
 (module erlenmeyer mzscheme
0
   (require (lib "foreign.ss")) (unsafe!)
0
- (provide fd->input-port
0
+ (provide bind-erlang-ports
0
+ fd->input-port
0
            fd->output-port)
0
+
0
+; We'll start with the standard ports
0
+ (define erlang-input-port (current-input-port))
0
+ (define erlang-output-port (current-output-port))
0
+
0
+ (define (bind-erlang-ports)
0
+ (set! erlang-input-port (fd->input-port 3 'erlang-in))
0
+ (set! erlang-output-port (fd->output-port 4 'erlang-out)))
0
+
0
 ; The all-important fd->input port code thanks to Matthew Flatt
0
   (define (fd->input-port fd name)
0
     (scheme_make_fd_input_port fd name 0 0))

Comments

    No one has commented yet.