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

(asv 9090)

-----

1 point by goodbyejim 6167 days ago | link

Thanks!

-----

4 points by s3graham 6168 days ago | link | parent | on: Arc-ish web programming in Python

Agreed on the slicing.

awhen with implicit `it' is a big win on length. I wonder if there's some scary-distasteful sys._getframe() thing you could do in Python to inject an `it'... ;)

-----

2 points by s3graham 6168 days ago | link | parent | on: Take the Arc Challenge

I'm not sure I'd use db-transactional-serializable-migratable closures that often even if I had them (assuming the overhead wouldn't be worth the occasional "session timeout" message the user would see). Perhaps in some domains though?

-----

2 points by albertb 6167 days ago | link

You can't? You lose then. Kinda different those are, business and helloworld, aren't they?

-----

1 point by mst 6166 days ago | link

Looking at clients' deployed applications, the web boxes tend to average over a year's uptime so I can't say it seems like it'd matter that much.

Provided you've got runtime code loading and a useful QA process, I don't really see why you'd need to care - MySQL's lack of transactional DDL causes far more downtime than lack of serialisation would were we using a continuation-based system.

-----

1 point by albertb 6166 days ago | link

"web boxes tend to average over a year's uptime so I can't say it seems like it'd matter that much."

Unless there is a five or six nines SLA.

"Provided you've got runtime code loading and a useful QA process,"

Hardware might crash as well.

"MySQL's lack of"

That one is really good.

-----

2 points by s3graham 6168 days ago | link | parent | on: (coerce "99" 'int 16) = 153 ?

0x99, not 99->hex

-----


Perl, I missed you! That one's pretty.

-----


Neat, thanks. (Not quite "right" since I can change &foo=myinput on page 2, but I'm guessing that could easily be fixed with an extra closure somewhere).

-----


Python, plus my in-house web framework:

    from pyricks import *
    class Said(PyricksApp):
        def initSession(self, root, data):
            def onsub(foo):
                def yousaid():
                    Yield("you said: " + foo)
                Yield(Link("click here", yousaid))
            Yield(Form(Input("foo"), onsubmit=onsub))
The actions could be lambdas to make it a closer translation, but I probably wouldn't. The library uses 'greenlet' for the continuation-y functionality.

What happens in Arc in more complex examples if I re-click a state-changing-link that's already been clicked?

-----

1 point by ingspree 6167 days ago | link

That would be interesting to see your framework opensourced. :)))

-----

3 points by s3graham 6170 days ago | link | parent | on: Vim + Arc

It's not a ft, it's interaction with an inferior process. I'm still using ft=lisp, but if someone wants to do a syntax highlight that'd be cool.

-----

1 point by s3graham 6170 days ago | link | parent | on: Vim + Arc

Try: easy_install pexpect

-----

1 point by mdemare 6170 days ago | link

easy_install: command not found

-----

3 points by s3graham 6170 days ago | link

Sorry, that sucks. pexpect comes with Python on my platform. I don't have an OSX box to test on.

You can either install easy_install: http://peak.telecommunity.com/DevCenter/EasyInstall#installi...

Or, do a manual install for pexpect if you care enough: http://pexpect.sourceforge.net/

-----


I get

arc> Error: "Bad object in expression #<eof>"

when trying to Ctrl-D out in Ubuntu, but no infinite loop.

-----