Arc Forumnew | comments | leaders | submit | bh's commentslogin
2 points by bh 3608 days ago | link | parent | on: Passing a string to defop for the url?

Thanks, I got it. Also, is there a way to catch all requests?

-----

1 point by akkartik 3608 days ago | link

Can you elaborate? You want to call the same function on any request, and pass in the url from the request? Are you using arc 3.1 or anarki?

Edit: on anarki you get this behavior by replacing the function respond in lib/srv.arc with this code:

  (def respond (out req)
    (w/stdout out
      (prrn "HTTP/1.1 200 OK")
      (prrn "Content-Type: text/html; charset=utf-8")
      (prrn "Connection: close")
      (prrn)
      (wildcard-handler req)))

  (def wildcard-handler (req)
    (prn req!op))
This will display whatever op you request.

-----

2 points by bh 3624 days ago | link | parent | on: OT: Contract jobs

Consulting?

-----

2 points by jsgrahamus 3624 days ago | link

I've been contracting for the last few years. Hope to continue.

-----

1 point by bh 3917 days ago | link | parent | on: Is there no way to make an http request?

I wonder what will happen to Arc now that pg has passed YC on to Sam? How is he going to pick up work again? Will he just keep working on arc 3.1, or will he just contribute to anarki?

-----

1 point by akkartik 3917 days ago | link

If pg ever contributes a line of code to anarki I'll eat my hat :) Not that that's a bad thing; it works perfectly well for each side to port changes from the other.

-----

2 points by bh 3918 days ago | link | parent | on: How can I build a list of lists quickly?

Wow, awesome answer. Thanks!

-----