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

I'm only on the third commandment, but so far I'm really bored... does it get better?

-----

1 point by w8lvn 5720 days ago | link

It is worthwhile, even if it is a little boring for a bit.

-----

5 points by tlrobinson 6128 days ago | link | parent | on: How to modify a running web app?

Excellent, I didn't know threads were that easy, thank you.

-----

2 points by tlrobinson 6128 days ago | link | parent | on: List of Arc Functions and Macros

Very nice.

It would be helpful if there was an "expand all" button to show all the function/macro names so I could search them.

-----

1 point by tlrobinson 6129 days ago | link | parent | on: Use Apache for static files?

Apache probably offers better performance for static files anyway.

What's the best way to use Apache with another server like asv (on the same host, with the same port). Is a reverse proxy using mod_proxy appropriate? Something else?

-----

1 point by nex3 6129 days ago | link

Using a reverse proxy seems like the best solution with the code we've got.

-----

2 points by byronsalty 6129 days ago | link

Makes sense. Obviously this is better for something being released to the public but during testing I didn't know if (even inefficiently) asv could be used as a one stop shop (a la webrick).

thanks

-----

1 point by nex3 6128 days ago | link

That shouldn't be too hard to hack in, I think... just find some way to capture all /images/* URLs or something and open up a file and send the contents. You might have to be a little careful with MIME types and so forth, but it seems pretty straightforward.

-----

5 points by bogomipz 6128 days ago | link

Just take any URL that is not defop'ed to mean a file name.

Currently, if no op is defined, the server responds with "Unknown operator.". Replace that with the code for opening a file, and if this fails, respond with a proper 404 Not Found message.

-----

3 points by pg 6128 days ago | link

That should work for text/html files.

-----

2 points by bogomipz 6127 days ago | link

By throwing in a hash table which maps from file name extensions to MIME types, it could work for other files as well.

A byte array data type for buffering would do good for performance.

-----


Without JQuery...

<input id="in" type="text" /><input type="submit" onclick="window.result='You said: '+document.getElementById('in').value; document.body.innerHTML='<a href=\'#\' onclick=\'document.body.innerHTML=window.result;\'>click here</a>'" value="Submit"/>

(it's a big hack, I know)

-----

3 points by bdeterling 6128 days ago | link

Using Prototype and even more of a hack: <script src="prototype.js"/><input id="a"/><input type="submit" onclick="h=Element.hide;h('a');h(this);u=Element.update;u('c','Click Here');"/><a id="c" onclick="u('c','You said '+$F('a'))"/>

-----

-3 points by name 5825 days ago | link

vffgf

-----

4 points by tlrobinson 6132 days ago | link | parent | on: I hereby propose...

an archist? anarchist?

-----

1 point by tlrobinson 6133 days ago | link | parent | on: Welcome

So, when are we going to see the book...

http://www.oreillymaker.com/link/7686/arc-for-dummies/

-----

1 point by tlrobinson 6133 days ago | link | parent | on: [... _ ...] is fishy

Or just say "_" is reserved in Arc?

-----

3 points by lg 6133 days ago | link

Seems like the Arc-philosophy-response would be, let 'em redefine _ if they want to. And that philosophy will probably make me want to murder somebody one day.

-----

3 points by Zak 6133 days ago | link

Ferraris don't come with speed governors.

-----

3 points by ryszard_szopa 6133 days ago | link

Driving a Ferrari is rarely a collaborative endeavor :-)

Keeping `_' safe in fact increases the programmer's freedom. If I knew that by doing something I was going to fk up w/ other people's code and how they expect their code to behave, I would rather not* do it. OTOH, if there are namespaces, etc. then I know that I can enforce whatever coding conventions I want, in the privacy of my personal sandbox.

Programming is not only about communicating w/ computers; it is also about communicating w/ other people, i.e. your coworkers and so on. Nothing that makes it harder can be a Good Thing. (Of course, unless you are the Lone Wolf coding in your cave---but then you are probably using your Own Better Language and don't care about Arc anyway ;-).)

-----

5 points by bgutierrez 6132 days ago | link

I think [... _ ...] is fine. If I want a language to protect me from myself or others, I'll use Java. :-)

-----

1 point by leimy 6130 days ago | link

Freedom is an interesting philosophical topic. How can a restriction make you more free? Well if you drink the FSF GPL Richard Stallman branded Kool Aid, you might "get it", but I sure don't.

I don't want the freedom from doing things, I want to the freedom to do things.

That said, strictness and protection and safety of some language features is something some people would like to rely on.

I think operator overloading in C++ was a huge freaking mistake for instance. You can look at two piece of code without going through some contextual learning to find out what the hell "+" was just redefined to do, and I think that's crappy.

Other languages get by some how without operator overloading. And often without a loss of expressiveness.

That said, judicious use, and education about how subsystems in software work is a necessity even in the presence and absence of things people might consider to be abominations, like operator overloading :-)

-----

5 points by tlrobinson 6133 days ago | link | parent | on: Improve your arc REPL

rlwrap is freakin awesome. I think I probably would have killed myself by now without it.

Especially in Arc or any other Lispy language, since it does paren matching.

-----

3 points by cje 6133 days ago | link

It breaks a bit on single-quotes, though -- rlwrap assumes they're matched, which usually isn't the case in lispy languages.

-----

4 points by bgutierrez 6132 days ago | link

The latest version of rlwrap (0.30) lets you specify which characters are quote characters with the -q option.

-----