Arc Forumnew | comments | leaders | submitlogin
4 points by antiismist 6034 days ago | link | parent

I agree that the lack of libs is a real problem. My real world example: I have have a bunch of RSS feeds, and I want to regularly poll those feeds, extract some content, and add it to my site (pageonetimes.com).

Doing it with Arc alone is too much for me - for mysterious reasons get-http.arc isn't working for me. Even if it did, I would have to write my own rss parser. Instead I am using Ruby for this, and grabbing the RSS content, parsing it, and saving the results is about 10 lines of code using standard libraries.



4 points by stefano 6034 days ago | link

What kind of problems exactly does get-http.arc give you? It's a translation of a piece of Common Lisp code I had written to be able to fetch RSS feeds. The CL version worked well for the task.

-----

1 point by antiismist 6033 days ago | link

Here is what happens:

  arc> (get-request (str->url "http://yahoo.com/"))
  Error: "procedure ...narki/arc/ac.scm:1231:11: expects 2 arguments, given 3: 
  #hash((\"CONTENT-TYPE\" . \"text/... \"LOCATION\" #hash((\"CONTENT-TYPE\" . \"text/..."

(I think the problem lies with me, in that I don't know how to use the library...)

-----

3 points by stefano 6033 days ago | link

I've tried your example and gives me (obviously) the same error, but trying

  (get-request (str->url "http://www.yahoo.com/"))
works. I will investigate further.

BTW, get-request returns a list containing the header of the response and a string containing the page (when it doesn't raise and error, of course).

Edit: bug solved. New version on github!

-----

1 point by antiismist 6032 days ago | link

Thanks you are awesome. So what do you use for RSS parsing?

-----

2 points by stefano 6032 days ago | link

In my CL project I thought to parse it manually, but I've abandoned the project after finishing the HTTP part. I've never tried using it, but you could have a look at treeparse in Anarki, if you haven't done already.

-----