« Psst...CrackAJAX is in SVN.Getting ready for Subway 0.2 »


Comment from: Dan Milstein [Visitor]

a) This seems cool

b) So, when you say that you 'translate' the @clientside methods into JavaScript, what, exactly, do you mean? I'm guessing that you don't mean that you parse them and then generate equivalent JS (because, well, my god). From the code example, it looks more like you're writing something which works in python and can be trivially translated to JS (by, e.g. adding semi-colons or some such). Otherwise, you would presumably be writing:

for song in songs:

instead of mucking about with c and i and all that.

10/07/05 @ 07:55
Comment from: Adrian Holovaty [Visitor] · http://www.holovaty.com/

Yeah, what Dan said. How does this get converted into JavaScript?

10/07/05 @ 11:48
Comment from: peterhunt [Member] Email

It uses inspect.getsource(), mucks with the indentation a bit to make it parsable, and then parses it into ASTs. Then I plugged it into a modified version of a Python-to-JScript.NET compiler I wrote to do the translation. This has the unfortunate side effects of requiring the replication of a couple of important Python builtins, and that the for...in JavaScript loop is a lot different than Python's (hence the c and i).

I am going to fix the loops in the next revision. They suck right now.

10/07/05 @ 12:08
Comment from: vegetax [Visitor]

ohh my this is good stuff,besides of the syntax i am imaging a complete map of python basic types to javascript, str, list, dict, date , datetime, bool and on top of that maybe later a translation of a usable, portable python html-dom interface to the crap w3 html-dom one.

so basically we dont ever have to write crapy javascript. The api mappings shouldnt be hard to do, but a bit tedious, and if a python function doesnt exists in javascript, its easy to create it.

10/07/05 @ 16:16
Comment from: peterhunt [Member] Email

Update: the for loop now works "python-style," that is, I have now done away with all of those disgusting while loops.

10/07/05 @ 16:54
Comment from: Dagur [Visitor]

I love the name of CrackAjax. Made me chuckle

10/08/05 @ 04:53
Comment from: rjwittams [Visitor]

Sounds like a nightmare to debug....
I honestly don't get what is supposed to be so bad about javascript.

10/09/05 @ 07:25
Comment from: Andreas Kostyrka [Visitor]

That leaves the question, where can one download crackajax?


10/09/05 @ 15:50
Comment from: Paul Moore [Visitor]

Um. Does this mean that the stuff in @crackajax.clientside functions isn't "real" Python? As in, it doesn't support full Python syntax, etc? If that's the case, then yuk.

10/10/05 @ 04:09
Comment from: Jason Spiro [Visitor] · http://jspiro.tripod.com

Andreas, to download, see www.aminus.org/blogs/index.php/phunt/2005/10/09/psst_crackajax_is_in_svn

10/16/05 @ 21:50
Comment from: remcoder [Visitor]

dude, just because Python has a nicer syntax than Javascript doesn't that it's the syntax that makes Javascript suck. Python syntax won't fix a language that's dirty in other respects.. but I'm sure you had fun coding this up! ;-)

11/23/05 @ 14:39
Comment from: Nathen Hinson [Visitor]

I would agree with Peter's negative comments about AJAX, however I think that this issue revolves around people looking at AJAX methodologies supplanting traditional web pages ( in the case of CGI I would eagerly agree to this supplating ). I tend to look to AJAX related pages as great replacements for RADs. I think AJAX pages would make a great replacement for things along the lines of 4D, Filemaker, Access etc. As Google has shown, AJAX apps are a breeze to distribute and update. This alone makes me a big fan. I personally see the se two things ( the traditional web-page, and AJAX apps ) living side-by-side, perhaps literally in the case of tabbed browsing. I think CrackAJAX is certainly going in the right direction, a library,framework , etc should make your life easier by giving you LESS to learn not more in the form of Javascript, DHTML,HTML,XML,DOM etc. I really look forward to trying it out on some sample projects of my own. The itunes.py sample in SVN worked swimmingly hot off the download.

Thanks very much

01/31/06 @ 10:04
Comment from: P-Y Delens [Visitor]

Where can I find the CrackAjax library?
Thanks on forward

10/05/06 @ 07:13
Comment from: mikes apartment [Visitor] · http://www.mikes-apartment.org

Nice website

07/19/07 @ 14:50

This post has 2 feedbacks awaiting moderation...

Leave a comment

Your email address will not be revealed on this site.

Your URL will be displayed.

Please enter the phrase "I am a real human." in the textbox above.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)