Arc Forumnew | comments | leaders | submitlogin
Error running the updated Arc server (racket unsafe ops)
2 points by darjeeling 4512 days ago | 15 comments
Hi, I have two versions of Arc. The one I cloned in October (I do not know the revision number) and the one I cloned today. Both times, I cloned from: https://github.com/nex3/arc/

I have no problems with the former version. But when I run the command "mzscheme -f as.scm" with the new version, I get the following error:

ac.scm:1323:9: racket/unsafe/ops: standard-module-name-resolver: collection not found: #<path:racket/unsafe> in any of: (#<path:/home/user/.plt-scheme/4.2.1/collects> #<path:/usr/lib/plt/collects>) in: racket/unsafe/ops

I use Ubuntu 10.04, plt-scheme 4.2.1-1, mzscheme 2:4.0.1+fake.2.

Any help would be highly appreciated.



3 points by Pauan 4511 days ago | link

"ac.scm:1323:9: racket/unsafe/ops: standard-module-name-resolver: collection not found: #<path:racket/unsafe> in any of: (#<path:/home/user/.plt-scheme/4.2.1/collects> #<path:/usr/lib/plt/collects>) in: racket/unsafe/ops"

The solution is simple: use Racket. You see, mzscheme 4 doesn't support any Racket stuff. So when trying to load a Racket library (in this case, "unsafe") it won't be able to find it.

If Anarki wants to support people using mzscheme 4, this line should be changed:

https://github.com/nex3/arc/blob/76a61293bc7bc49ef8b57641ad5...

-----

1 point by darjeeling 4511 days ago | link

The debian package description of racket (http://packages.debian.org/sid/racket) says that the package was previously plt-scheme. So, I seem to be using it :(

which package provides racket in Ubuntu/Debian systems? I am running the October version on a Debian 6 system and it is running fine. apt-cache search racket returns no relevant package.

-----

2 points by rocketnia 4511 days ago | link

You mentioned you used the command "mzscheme -f as.scm". If you change that to "racket -f as.scm", does it make any difference?

-----

3 points by akkartik 4512 days ago | link

Hmm, are you sure you haven't changed the version of PLT or something like that? I looked at the diff since October (http://github.com/nex3/arc/compare/cbf2bd3e08...master) and don't see anything suspicious.

Can you try installing racket and see if it works? I think we here all use racket at this point.

-----

1 point by darjeeling 4511 days ago | link

I see some changes in in as.scm and ac.scm (esp the one that is being reported in the error message).

The debian package description of racket (http://packages.debian.org/sid/racket) says that the package was previously plt-scheme. So, I seem to be using it :(

-----

2 points by rocketnia 4511 days ago | link

"I see some changes in in as.scm and ac.scm (esp the one that is being reported in the error message)."

If you're seeing those changes in the diff akkartik linked to, take a closer look. It's just whitespace. ^_^;

Pauan pointed out the "(require racket/unsafe/ops)" line in ac.scm. According to https://github.com/nex3/arc/blame/master/ac.scm, the line was added in this February 2011 commit (well before October!): https://github.com/nex3/arc/commit/cea8a4c5e9d1eb42f54b6c333...

The main point is that you want something that works, right? :) If updating Racket isn't working for you, maybe for now you can revert to an older version of Anarki. The commit before the racket/unsafe/ops one is https://github.com/nex3/arc/commit/b36f223bfba2e12e518fff955..., which you can get to like this:

  $ git checkout b36f223b
If you want to get back to the Anarki tip, do this:

  $ git checkout master
Be careful if you have changes in your working copy.

-----

1 point by darjeeling 4511 days ago | link

I must have done some mistake then. I admit that I didnt see akkartik's link before posting that reply. I think my downloaded files are older than October- the directory has a timestamp from October and the ac.scm file has a timestamp from August 2009. The diff is here: http://pastebin.com/BLp6p69v

Yes, I would like to use something that works, and something that is as latest as possible :) I seem to be using Racket (in the form of plt-scheme) and it seems to work for an older version of arc. The point of my question was if I needed to do something to keep up with the changes made in Arc.

Thanks a lot for your reply :)

-----

2 points by rocketnia 4510 days ago | link

Looks like you originally had a version from somewhere between https://github.com/nex3/arc/commit/3201b34f3ed89e6305b0d9906... (October 14, 2010) and https://github.com/nex3/arc/commit/e05b3ef2aa9e4d298c7703a3b... (December 29, 2010). So "October" may be right! :-p

---

"The point of my question was if I needed to do something to keep up with the changes made in Arc."

Then making sure Racket is up-to-date is the answer you're looking for, as you already know. :-p Have you been successful running the latest Anarki on your Racket install yet? What do "racket --version" and "mzscheme --version" say now?

-----

2 points by darjeeling 4510 days ago | link

Hi, Thanks a lot to your earlier comment, about running "racket -f as.scm"- I found out that racket couldnt be located by the system. Something must be unclear with the description of Ubuntu/Debian packages- I got an impression that "plt-scheme" contained racket. I manually installed racket by downloading from here: http://racket-lang.org/download/ .

Now it works :) Thanks again !

-----

1 point by akkartik 4510 days ago | link

Great. racket is the new PLT scheme. So it provides plt-scheme, but the opposite is not true.

-----

1 point by darjeeling 4510 days ago | link

Hi, I posted a new reply (not nested in this one): http://arclanguage.org/item?id=15561

-----

1 point by darjeeling 4510 days ago | link

I managed to run arc-news, thanks to all your help.

After running it, I have a few more questions, I hope you aren't frustrated with me yet :)

1. What is the difference between "racket -m -f" (this one doesn't work, but used to work with mzscheme) and just "racket -f"? The manpage asks to visit the webpage and i went to this page to look for help, but I dont seem to be able to locate it: http://docs.racket-lang.org/guide/racket.html

2. In the arc prompt, after loading "news.arc", I would like to run the news server on a different thread, eg: "(= app (thread (nsv)))" (read on the web), but it doesnt return me the arc prompt.

3. Just to test what happens under increased load, I went to localhost:8080 and repeatedly hit the refresh button on my browser. After many repeated refreshes, the news page was no longer served. Here's what was happening in the arc screen: http://pastebin.com/TcBa2SuM and here's the tail of logs/srv-* file: http://pastebin.com/Xiym77sR (i wonder who the strange user 0PgEaESj is :))

How can I configure arc to continue working under heavy load (maybe by denying requests only from the client that's flooding)?

-----

2 points by akkartik 4510 days ago | link

1. Yes, -m is meaningless in racket (which is why it's not mentioned on that page you linked to). It's one of several incompatible changes with mzscheme.

2. Hmm, it works for me. Are you sure there's no prompt? Here's how it looks for me:

  $ racket -f as.scm  
  Use (quit) or ^D to quit, (tl) to return here after an interrupt. 
  arc> (load "news.arc") 
  nil 
  arc> (thread (nsv)) 
  #<thread> 
  arc> rm: cannot remove `arc/news/story/*.tmp': No such file or directory 
  load items:  
  ranking stories. 
  ready to serve port 8080 
It's hidden, but there's a 'arc> ' prompt after it returns #<thread>. Threads still continue to print to the terminal, so that makes the prompt a little hard to find. In these situations I just type in a new expression (say 'nil') and hit <Enter>. If I get a response, I was at the prompt :)

3. Check out the third bullet at http://sites.google.com/site/arclanguagewiki/arc-3_1/known-b... about srv throttling connections :)

-----

1 point by rocketnia 4510 days ago | link

"-m is meaningless in Racket"

Only if it's meaningless to invoke a procedure called 'main automatically. :-p

These are the command-line args: http://docs.racket-lang.org/reference/running-sa.html

The old -m option appearing in the instructions at arclanguage.org/install meant "don't show the 'Welcome to PLT Scheme' message."

-----

1 point by darjeeling 4510 days ago | link

Yes, you're right, the prompt was being returned- I wasn't careful enough :)

It came as a surprise that HN serves directly off port 80- wonder how to they manage ssl from arc. I plan to serve via apache rewrite rules (reverse proxy)- and yes, sadly all ips in the arc logs show the local address. Thanks for this link. Also, who is that strange user on my logs (there are different names on different hosts)? :)

One OT question: Is there someway I can make comments on a story's page appear sorted by time- let's say- by pressing some button "show oldest/newest first" ? I have not yet started to hack the code- wanted to be a little comfortable with the system first. I assume working with news.arc would be enough for the news page?

-----