Arc Forumnew | comments | leaders | submitlogin
ranked-stories Bug?
3 points by mekazu 6400 days ago | 5 comments
I'm a newbie following the arc tutorial and I thought I was doing well until I got to the first web program:

  Use (quit) to quit, (tl) to return here after an interrupt.
  arc> (defop hello req (pr "hello world"))
  #<procedure:gs2413>
  arc> (asv)
  ready to serve port 8080
  reference to undefined identifier: _ranked-stories*
  
  === context ===
   newspage
  gs1644
   gs904
   handle-request-thread
The localhost:8080 produced neither a webpage or error. If it helps I'm running Leopard (new install) and I followed the arc install instructions closely. Please use small words because it would appear that I am dumb.


2 points by lojic 6400 days ago | link

You're not dumb. I'm getting the same error, and the error messages aren't very helpful. Apparently, I haven't tried the hello world app since upgrading to arc2.

Anyone have an idea of the problem? I've been looking through news.arc, and came across this:

  (mac newsop args
    `(do (pushnew ',(car args) newsop-names*)
         (opexpand defop ,@args)))

  (newsop news () (newspage user))

  (newsop ||   () (newspage user))
What is that last line doing?

-----

4 points by pg 6399 days ago | link

The last line means that localhost:8080/ does the same thing as localhost:8080/news.

-----

3 points by sacado 6400 days ago | link

it looks like a bug in news.arc. In a first time, you can just comment (or remove) the string "news.arc" in the file libs.arc. You won't be able to use the news application however, but to run the tutorial you don't need it.

-----

5 points by pg 6399 days ago | link

Exactly. Sorry, I never realized that adding news to the libs would break the tutorial. In future, if anyone notices a bug this major, please email me about it or at least post something here.

-----

2 points by eds 6400 days ago | link

http://arclanguage.org/item?id=3446

news.arc was removed from libs.arc in Anarki to solve this. You can just (load "news.arc") if you need to use the news app later.

-----