On Thu, 23 Apr 2009 11:34:48 +0200, Yves Jaradin
<[email protected]> wrote:
>[...]
>
>As a further test, you can try the following:
>write a file test.oz containing the two lines "{Browse hello}" and
>"{Delay 5000}"
>run the command "ozc --include path/to/BaseEnv.oz test.oz" where
>BaseEnv.oz is the file attached to this message.
>This should open the Browser, displaying 'hello' for about 5 seconds.
Yes, this works fine.
>
>This can even be used as a temporary workaround (but is not really a REPL).
>
> From what I found on Google, error code 5 has to do with "access
>denied". For the OPI to work, emacs launch oz redirecting stdin and
>friends, then oz start a TCP server, communicates the port to emacs on
>stdout, then emacs connects to this port and further communication
>happens on this TCP channel (a part from input/output by the user in the
>Emulator buffer). You can maybe check with your sysadmin that the
>emulator is allowed to open TCP sockets for listening (server-like).
>
>You can also try the following test (using the above method):
>file1.oz:
>local S P in
>S={Open server(port:P)}
>{Show P}
>{S accept()}
>{Show ok}
>{Delay 5000}
>
>file2.oz:
>local S P in
>P=1243 %Replace with port number given by running file1.oz
>S={Open client(port:P)}
>{S write(vs:"\n")}
>{S close()}
>{Show ok}
>{Delay 5000}
>
>If you have a crash, then it is definitely a problem of networking
>permissions. If not, then it is probably an Emacs problem.
Running file1.oz (ranamed to File1.oz) at first resulted in the
following error message:
>benja...@200706-05 /cygdrive/c/Documents and Settings/Benjamin/My
>Documents/Programming Practice/Oz/Functions
>$ ozc --include ./BaseEnv.oz File1.oz
>%%% feeding file File1.oz
>
>%*************************** parse error ************************
>%**
>%** expecting `end'
>%**
>%** in file "./File1.oz", line 6, column 0
>%** ------------------ rejected (1 error)
Adding an `end' to the end of the file then resulted in the following
error message:
>benja...@200706-05 /cygdrive/c/Documents and Settings/Benjamin/My
>Documents/Programming Practice/Oz/Functions
>$ ozc --include ./BaseEnv.oz File1.oz
>
>%********************** error in application ********************
>%**
>%** Application of non-procedure and non-object
>%**
>%** In statement: {'export'(compressedFile:_<readonly quiet> file:<C: File>
>html:<C: Html> pipe:<C: Pipe> socket:<C: Socket> text:<C: Text>)
>server(port:_<optimized>) _<optimized>}
>%**
>%** Call Stack:
>%** toplevel abstraction in line 1, column 0, PC = 18797196
>%** procedure in file
>"f:/cygwin/home/Administrator/Mozart/1-3-2/uff/mozart/share/lib/compiler/CompilerClass.oz",
> line 688, column 2, PC = 16948940
>%**--------------------------------------------------------------
>%%% feeding file File1.oz
>%** ------------------ aborted
>
>%********************** error in application ********************
>%**
>%** Application of non-procedure and non-object
>%**
>%** In statement: {'export'(compressedFile:_<readonly quiet> file:<C: File>
>html:<C: Html> pipe:<C: Pipe> socket:<C: Socket> text:<C: Text>)
>server(port:_<optimized>) _<optimized>}
>%**
>%** Call Stack:
>%** toplevel abstraction in line 1, column 0, PC = 18797196
>%** procedure in file
>"f:/cygwin/home/Administrator/Mozart/1-3-2/uff/mozart/share/lib/compiler/CompilerClass.oz",
> line 688, column 2, PC = 16948940
>%**--------------------------------------------------------------
Since I was unable to obtain a port number from the output from
running File1.oz, I was unable to run File2.oz (renamed from
"file2.oz").
I have already experienced TCP/IP port-related errors in Windows XP
Professional, Service Pack 2, related to auto-updating another
application, DrScheme, because of this problem; unfortunately, when I
tried to add TCP/IP port permissions to that application through the
Control Panel -> Windows Security Center -> Windows Firewall ->
Exceptions -> Add Port... feature, this function did not seem to work.
I suspect that if Mozart/Oz uses a TCP/IP channel for inter-process
communication, then this could be the cause of the error.
Which TCP/IP port number should be added?
-- Benjamin L. Russell
--
Benjamin L. Russell / DekuDekuplex at Yahoo dot com
http://dekudekuplex.wordpress.com/
Translator/Interpreter / Mobile: +011 81 80-3603-6725
"Furuike ya, kawazu tobikomu mizu no oto."
-- Matsuo Basho^
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users