Arc Forumnew | comments | leaders | submit | brett's commentslogin

I would also add that that code is using arc0.

Nice to hear it was helpful.

-----

5 points by brett 4286 days ago | link | parent | on: Are you using Arc for a web site?

I've been running http://tracksruns.com (source http://goods.tracksruns.com/runs.arc.txt) behind apache on ubuntu with mzscheme 360. It gets virtually no traffic but has been up without problems since I started it a month or so ago. I launched it using screen so I can get back to the REPL whenever I want. The server uses some globals that are interesting to look at like optimes*.

It's still on arc0. The main gotcha is that it thinks all requests are from 127.0.0.1 because it does not pay attention to apaches's X-Forwarded-For header.

-----

4 points by lojic 4286 days ago | link

Thanks for the reminder about screen, that seems like a good approach.

So to be able to access the repl, did you start asv in a separate thread?

-----

3 points by brett 4286 days ago | link

yeah. http://arclanguage.org/item?id=1272

-----

4 points by lojic 4286 days ago | link

Thanks - I had forgotten about the repl operator that pg mentioned in that thread. I'll have to try that out.

I love the quote from Ron Garret about the benefits of a REPL.

  "Debugging a program running on a $100M piece of hardware
  that is 100 million miles away is an interesting experience. Having a
  read-eval-print loop running on the spacecraft proved invaluable in
  finding and fixing the problem."

-----

5 points by brett 4290 days ago | link | parent | on: I/O operations in Arc: documentation

It's definitely getting the the point where Ken's page deserves a permanent link somewhere on this forum or the arc home page.

-----

5 points by brett 4303 days ago | link | parent | on: Arc Virtual Servers?

Some sort of http://en.wikipedia.org/wiki/Reverse_proxy

I got it to work behind apache with mod_proxy. One gotcha I never got around to fixing was getting the arc app to pay attention to the X-Forwarded-For header instead of just using 127.0.0.1 as the remote ip address.

-----

4 points by brett 4320 days ago | link | parent | on: Ruby-like in place list expansion

Off the top of my head it's the 5 characters you save on calls to apply. Also, as opposed to apply, you keep the function in functional position which seems cleaner to me.

I'll keep thinking about common cases where it's a bigger win. A more elaborate call to apply where you have to compose the list comes to mind:

  (apply func (join lst '(a)))
vs

  (func @lst 'a)

-----

1 point by pg 4318 days ago | link

(apply func (+ lst '(a)))

-----

1 point by lojic 4317 days ago | link

Yours is 71% longer. That does seem significant. Or the auto-expand is 42% shorter. Wow, what are the chances that it'd be 42% shorter when I just watched Hitchhiker's Guide on TiVo the other night?

-----

1 point by nex3 4317 days ago | link

Perhaps... one in forty-two?

-----


Thanks for the double check. But I get the same on both tracksruns and iCal for Jan 2034: starts on a Sunday ends on a Tuesday.

edit: So far the earliest month I've found that's off is 2101.

-----


Thanks. I'm aware of with, I just thought I'd save some parens. Yours does read a bit easier.

-----

1 point by brett 4323 days ago | link

The other thing I'm noticing is that I've been nesting lets when the second assignment depends on the first. I think I should be using withs which I did not know about.

-----


Thanks. I'm not sure exactly how long. There was a lot general arc exploration mixed in with hacking on the app.

-----


That would be a natural next step. Unfortunately I think I'm tapped out on larger blocks of arc hacking for a little while.

-----


It's sort of an alternate ending to http://dontbreakthechain.com which I made last year.

The source is at: http://goods.tracksruns.com/runs.arc.txt

I'm new to lisp, I welcome (encourage even) tips/pointers/recommendations.

-----

More