Arc Forumnew | comments | leaders | submitlogin
Unimpressed.
5 points by fredfred 6168 days ago | 12 comments
Download/install MzScheme 352. Add to path Download/untar arc0.arc. cd to arc0 dir; type "mzscheme -m -f as.scm"

c:\MzScheme\arc0>..\mzscheme -m -f as.scm Use (quit) to quit, (tl) to return here after an interrupt. arc> (defop said req (aform [w/link (pr "you said: " (arg _ "foo")) (pr "click here")] (input "foo") (submit))) #<procedure:gs1430> arc> (asv) The syntax of the command is incorrect. The syntax of the command is incorrect. 'openssl' is not recognized as an internal or external command, operable program or batch file. Error: "make-string: expects argument of type <non-negative exact integer>; given -1"

'K. Download and install openssl. Add to path. try again

arc> (asv) The syntax of the command is incorrect. The syntax of the command is incorrect. Error: "open-output-file: cannot open output file: \"c:\\MzScheme\\arc0\\arc/hpw\" (The system cannot find the path specified.; errno=3)"

md arc; try again

arc> (asv) The syntax of the command is incorrect. Error: "tcp-listen: listen on 8080 failed (An address incompatible with the requested protocol was used.; errno=10047)"

Great! No filename. No line number. If that's lisp error reporting -- good luck guys.



3 points by kens 6168 days ago | link

I could use some help getting asv to run on Windows too. First I encountered the "The syntax of the command is incorrect" mkdir error, and used the fix from the http://jfkbits.blogspot.com/2008/01/digging-into-arc-in-24-m... blog post. Then I got the error open-output-file: cannot open output file: \"C:/tmp/shashCTtuJ1S8v7\", which I fixed by deleting "/tmp/" from the shash function in app.arc. Then the server started up but died a few seconds later with "srv thread took too long", same as in the 24 macros blog posting. I ran into this with both the original Arc download and the latest git repository version.

Does the web server run successfully on Windows, or should I stick to Linux? And if it runs on Windows, what's the secret?

-----

1 point by fredfred 6168 days ago | link

Impressed...by the walkthru on your link. I took the easy route for the failing mkdir and just created it from the command line.

I'm still confused how you're getting the server port open and I'm not. But then you don't seem to be having the problem with the shell out to the date command that I'm getting, so maybe you are running under cygwin?

-----

1 point by kens 6167 days ago | link

Yes, I'm using Cygwin. I still have no idea how to fix the 'srv thread took too long' problem, though.

-----

1 point by projectileboy 6168 days ago | link

I'm sorry you're having troubles. Can you elaborate on your environment? I'm a Lisp and Linux know-nothing, and I was able to get the sample blog app (blog.arc) up and running on Slicehost without much difficulty (install mzscheme 360, install open-ssl, fire up mzscheme as root so that I could bind to port 80, ready for rolling around in happy Arc-y land).

-----

3 points by pg 6168 days ago | link

You might try (asv 80).

-----

3 points by fredfred 6168 days ago | link

c:\MzScheme\arc0>mzscheme -m -f as.scm

Use (quit) to quit, (tl) to return here after an interrupt.

arc> (defop said req

  (aform [w/link (pr "you said: " (arg _ "foo"))

           (pr "click here")]

    (input "foo")

    (submit)))
#<procedure:gs1430>

arc> (asv 80)

The syntax of the command is incorrect.

Error: "tcp-listen: listen on 80 failed (An address incompatible with the requested protocol was used.; errno=10047)"

That "The syntax of the command is incorrect." is probably a clue, but where to look and for what?

-----

2 points by fredfred 6168 days ago | link

That "The syntax of the command is incorrect." appears to be from arc.arc:1204

(def date ((o time (seconds)))

  (let val (tostring (system (string "date -u -r " time " \"+%Y-%m-%d\"")))

    (subseq val 0 (- (len val) 1))))
which could presumably be replaced with something from date.ss?

But it probably doesn't explain the error: "Error: "tcp-listen: listen on 80 failed" which only seems to appear in \lib\libmzsch352_000.dll

So, toast then?

-----

1 point by squirrel 6168 days ago | link

It works fine for me on Windows with none of the errors in the OP or the comments. See https://dev.youdevise.com/YDBlog/index.php?title=installing_... for what I did, but I just followed and summarised the instructions from other blogs already cited here.

Can services like apache or tomcat run on your machine and listen on ports 8080 or 80?

-----

2 points by fredfred 6168 days ago | link

Let me guess. You guys are running cygwin right?

For reasons I won't go into I can't. I'm attempting to get this running native. I can work around the date thing above by using library calls rather than shelling.

I suspect that the port problem is due to a difference defaults. I don't see 'localhost' or '127.0.0.1' being explicitely stated anywhere, and maybe it needs to be.

And yes, I have a sufficiently authorised user profile. I occasionally run various http servers and I frequently create tcp & udp servers using Perl & D & Haskell etc.

This isn't a case of the port not being bound, it isn't getting that far, otherwise my firewall would be telling me that it is trying to act as a server and asking me to authorise it. This is failing in a system call due to parameter errors and is probably correctable at the source code level, but I can't find where.

I'm still decidely unimpressed with the error reporting though. I might just as well say: "Oops, summat's up!". if it isn't going to give some indication of where.

-----

1 point by squirrel 6167 days ago | link

This thread seems like it might be relevant: http://www.cs.brown.edu/pipermail/plt-scheme/2006-January/01... In particular, http://www.cs.brown.edu/pipermail/plt-scheme/2006-January/01... gives some links that look at least interesting.

The abstraction is clearly leaking though: we are having to dig into PLT when we want to talk Arc.

Maybe a MzScheme expert can help us - surely there is a debug mode of some kind that lets you see what code is being executed?

-----

2 points by fredfred 6167 days ago | link

Yes. This seems to be an MzScheme/setup problem and little to do with arc.

I still think the error reporting/traceback situation is abismal, but I accept that this is probably the wrong place to get help in getting arc to run for my scenario.

-----

1 point by squirrel 6167 days ago | link

And yes, we are using Cygwin, but I don't think it's needed (I turned it off and Arc still ran).

-----