Arc Forumnew | comments | leaders | submitlogin
Possible Bug With Web Lib
6 points by mk 6118 days ago | 3 comments
I'm pretty new to scheme, but am grasping most of Arc so far. I'm starting to understand macros and where and when to use them, and going through the Arc tutorial helped me with that. The exciting thing for me about Arc is how easy it was to get a web server up and serving web pages, it was really easy. The thing that I'm not understanding is the link function that uses the tag macro in html.arc. I'm probably missing something, but it seems like it should be used like:

  arc> (link "A Link" "somepage.html")
but this is what it produces:

  <a href="somepage.html">A Link</a>"</"
Notice the extra trailing "</". Now I'm trying to go through html.arc and find what exactly is going on here but I'm obviously missing something or it is a bug.


8 points by brett 6118 days ago | link

It's not really a bug as much as an artifact of the REPL. You are seeing what the call to (link ...) prints and then the return value of the same call printed right after it by the REPL.

Changing the return value illustrates the point:

  arc> (no (link "A Link" "somepage.html"))
  <a href="somepage.html">A Link</a>nil
It might not be optimal that link (or really tag) always returns "</", but I'm not sure it matters.

-----

1 point by ryantmulligan 6118 days ago | link

This seems related to the previous confusion caused by prn's return value. http://www.arclanguage.org/item?id=302

Though the result of prn may be chosen for efficiency sake, doesn't feel consistent to me.

-----

1 point by goodbyejim 6116 days ago | link

Where do you get html.arc ?

-----