News for hackers. Stuff that matters.
Re:Aspen is a Python web server. Simplates are the main att... by drats on Tuesday April 05, 2011 @09:16AM (#2410773)
Linking to the simplates page and not the main page[0] is a little confusing due to the way their docs are structured. A welcome addition to bottle[1] and flask[2] though.

[0]http://aspen.io/ [1]http://bottlepy.org/docs/dev/ [2]http://flask.pocoo.org/

Re:Aspen is a Python web server. Simplates are the main att... by evangineer on Tuesday April 05, 2011 @09:55AM (#2410917)
Fair point, but since Chad says that Simplates is the main point of interest, I thought it would be useful to point directly to them.
Re:Aspen is a Python web server. Simplates are the main att... by sausagefeet on Tuesday April 05, 2011 @10:19AM (#2411018)
Using a character that one needs a tutorial on how to type AND isn't copyandpastable easily seems annoying...
Re:Aspen is a Python web server. Simplates are the main att... by whit537 on Tuesday April 05, 2011 @11:17AM (#2411245)
Meh. Keeps out the riff-raff. ;^)
Re:Aspen is a Python web server. Simplates are the main att... by whit537 on Tuesday April 05, 2011 @11:32AM (#2411323)
Ok, page updated to address this concern: http://aspen.io/form-feed/

:^)

Re:Aspen is a Python web server. Simplates are the main att... by sausagefeet on Tuesday April 05, 2011 @11:44AM (#2411368)
The concern is really that it's a poor character to choose IMO, not that there isn't enough documentation on it :)
Re:Aspen is a Python web server. Simplates are the main att... by whit537 on Tuesday April 05, 2011 @12:54PM (#2411661)
Touche, sausagefeet. As evangineer mentions, I've upgraded the snark to a rationale: http://aspen.io/form-feed/

One idea would be to use an actual "^" "L", or at least give a warning somewhere if these are in a file.

Do you have any other ideas?

Re:Aspen is a Python web server. Simplates are the main att... by sausagefeet on Tuesday April 05, 2011 @03:22PM (#2412325)
Nope, I'm just the peanut gallery :)

I do prefer the actual ^L though. I think sticking to printable characters and being copy and pastable from the web are good things for your project though, keep up the good work!

Re:Aspen is a Python web server. Simplates are the main att... by evangineer on Tuesday April 05, 2011 @12:13PM (#2411491)
Personally, I appreciated the addition of the rationale.

The "revelation" about Barry Warsaw being an Emacs user won't be news to those who have visited his home page! http://barry.warsaw.us/elisp/

Re:Aspen is a Python web server. Simplates are the main att... by whit537 on Tuesday April 05, 2011 @01:39PM (#2411874)
Ok, added links to Barry's site and to the Emacs docs: http://aspen.io/form-feed/
Re:Aspen is a Python web server. Simplates are the main att... by evangineer on Tuesday April 05, 2011 @06:16PM (#2412993)
Wow, I had no idea that Emacs had commands specifically for navigating around the pages delimited by the form-feed character.

Going to see if I can find an Emacs mode that does the right thing in syntax highlighting the pages appropriately.

Re:Aspen is a Python web server. Simplates are the main att... by evangineer on Tuesday April 05, 2011 @08:50PM (#2413454)
I'm hoping that nXhtml mode and its support for Multiple Major Modes might do the trick here http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html
Re:Aspen is a Python web server. Simplates are the main att... by whit537 on Wednesday April 06, 2011 @10:23AM (#2415164)
Good find. "Another important feature is the ability to mix several languages in one buffer and get the correct syntax highlighting and indentation for each of them." It looks like they're inferring mode blocks based on things like "<?php>".

http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html#php

What is wanted for Aspen simplates is to use Python for the first two pages, and use the file extension to determine the mode/highlighting for the third page. The first two pages are optional.

Re:Aspen is a Python web server. Simplates are the main att... by evangineer on Tuesday April 05, 2011 @05:02AM (#2410230)
The favicon is pretty amusing, once you've grokked Simplates. One notable feature is that Aspen now uses the Diesel non-blocking socket engine.
Re:Aspen is a Python web server. Simplates are the main att... by McLeopold on Tuesday April 05, 2011 @04:55PM (#2412685)
On windows you would need to type [Alt]+0+1+2. The numbers have to be on the numeric pad, which on some laptops without that would include further function keys to be setup to type the character.

Some editors will accept this and display a [FF] representation (notepad2, notepad++). Others just don't work (eclipse, wordpad, notepad). gVim can still use [Ctrl]+L

This is a really bad choice if your code can only be edited by some text editors. Perhaps a secondary string to use for splitting in addition?

Re:Aspen is a Python web server. Simplates are the main att... by whit537 on Tuesday April 05, 2011 @05:08PM (#2412745)
Does it depend on Windows, or on your editor? In seem to remember remapping ctrl-L to form feed in UltraEdit, for example ...
Re:Aspen is a Python web server. Simplates are the main att... by whit537 on Tuesday April 05, 2011 @05:21PM (#2412797)
The only thing I'm seeing that Ctrl-L is otherwise used for is to focus the address bar in a web browser:

http://lifehacker.com/#!5302587/get-firefoxs-ctrl%252Bl-shor...

http://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts

Assuming one didn't care about clobbering that (you also get F6 there), I wonder if something could be done with a scancode map (see http://webpages.charter.net/krumsick/).

Re:Aspen is a Python web server. Simplates are the main att... by whit537 on Thursday April 07, 2011 @12:24AM (#2418177)
I evolved the page break discussion to talk about tool support and ugliness. Bottom line: "If you like simplates but dislike the page break, then you have until Aspen 1.0 to come up with something that works perfectly with existing tools /and/ isn’t ugly."

http://aspen.io/page-break/

Re:Aspen is a Python web server. Simplates are the main att... by mikecaron on Tuesday April 05, 2011 @10:39AM (#2411110)
I think this is an incredibly innovative approach to web apps in Python, very fast dev turnaround and not a lot to grok.
Re:Aspen is a Python web server. Simplates are the main att... by evangineer on Tuesday April 05, 2011 @06:24PM (#2413026)
I'm disappointed by the lack of discussion regarding the Simplates concept. It does for webapp code organisation what Python's whitespace does for code layout.

This means that from the outset, you get more maintainable webapps even it starts out as a one file hack. That should more than compensate for having to figure out how to enter an obscure character into your code in your editor/IDE of choice.

Re:Aspen is a Python web server. Simplates are the main att... by whit537 on Friday April 08, 2011 @05:36PM (#2425702)
Here's a list of editors with support for changing keybindings:

http://en.wikipedia.org/wiki/Comparison_of_text_editors#Key_...

Re:Aspen is a Python web server. Simplates are the main att... by whit537 on Wednesday April 06, 2011 @10:17AM (#2415134)
Thank you, yes! The tool support for ^L is weak right now, but if the simplates concept is valid then one hopes the tool support will follow.
Re:Aspen is a Python web server. Simplates are the main att... by evangineer on Tuesday April 05, 2011 @11:30AM (#2411313)
It allows you to start off by sketching a webapp with Sinatra-like simplicity & get as complex & modular as needed.
Re:Aspen is a Python web server. Simplates are the main att... by whit537 on Friday April 08, 2011 @07:14PM (#2425952)
Ok, Internet, how about this. I've added a page_break knob to aspen.conf so that you can override the ASCII page break default for your application.

http://aspen.io/aspen.conf/

Is that acceptable?

Re:Aspen is a Python web server. Simplates are the main att... by whit537 on Saturday April 09, 2011 @12:09AM (#2426479)
I just implemented support for caret-L in addition to true page breaks, no configuration required.

http://aspen.io/simplates/

Re:Aspen is a Python web server. Simplates are the main att... by catch404 on Wednesday April 06, 2011 @05:57AM (#2414507)
Seeing projects like this puts suggestion of hn quality going down to the back of my mind, really excited to try this out. Is there a framework which inspired this?
Re:Aspen is a Python web server. Simplates are the main att... by whit537 on Wednesday April 06, 2011 @10:14AM (#2415126)
Thank you. Short answer: Zope 2. Long answer (just added): http://aspen.io/simplates/#history
Re:Aspen is a Python web server. Simplates are the main att... by evangineer on Wednesday April 06, 2011 @12:07PM (#2415650)
One interesting use of Simplates could be a very ajaxy Single Page Application that accesses an API provided by Python functions in the same Simplate.
Re:Aspen is a Python web server. Simplates are the main att... by catch404 on Tuesday April 12, 2011 @08:16AM (#2436813)
Thanks! :)
Re:Aspen is a Python web server. Simplates are the main att... by whit537 on Tuesday April 05, 2011 @11:18AM (#2411248)
Thanks for the link evangineer. Happy to answer any questions.
Re:Aspen is a Python web server. Simplates are the main att... by jarpineh on Wednesday April 06, 2011 @05:59PM (#2417175)
Hi.

For old Zope2 (and quixote) dev, looks promising and way easier than Django to get started on a project (and fun).

Could you maybe extend the tutorial with using tornado's template inheritance for basic page template. Like for repeating html, header, footer and perhaps navigation block. Tornado's documentation for that is in the template module so that kinda slows down the learning process.

I'll try this for my next project.

Re:Aspen is a Python web server. Simplates are the main att... by evangineer on Sunday April 10, 2011 @03:13AM (#2429072)
I'm doing some weekend hacking using Aspen. I'm finding that Aspen is staying out of the way and any issues are actually my own shortcomings. Currently in the process of adding some Ajax to my web app.
Re:Aspen is a Python web server. Simplates are the main att... by evangineer on Wednesday April 06, 2011 @08:36PM (#2417689)
There's an IRC chat and a Google Group that you can check out when you start on your project. Both are linked directly from the home page on http://aspen.io
Re:Aspen is a Python web server. Simplates are the main att... by whit537 on Thursday April 07, 2011 @12:25AM (#2418180)
Re:Aspen is a Python web server. Simplates are the main att... by jarpineh on Thursday April 07, 2011 @08:12AM (#2419146)
Google group was invite only, so HN was faster to get question across. I put my request in.

Templating page answered my question, thanks. Don't know how I managed to miss that... Perhaps you could add a link from the simplates page to it.

Re:Aspen is a Python web server. Simplates are the main att... by whit537 on Thursday April 07, 2011 @08:40AM (#2419213)
It didn't exist before you asked; I wrote it in response to your question. I've linked it from the simplates page and from the index.

Approved your gg request. Have to do that for anti-spam. :^/

Re:Aspen is a Python web server. Simplates are the main att... by evangineer on Friday April 08, 2011 @11:48PM (#2426452)
@whit537, I really like how responsive you've been to questions and suggestions on this HN discussion. Gives one confidence that Aspen will be well maintained.
Re:Aspen is a Python web server. Simplates are the main att... by whit537 on Saturday April 09, 2011 @11:54AM (#2427358)
Thanks man. I've been sitting on aspen/simplates for years, and I think its time may have arrived.
Re:Aspen is a Python web server. Simplates are the main att... by evangineer on Sunday April 10, 2011 @01:42AM (#2428934)
@whit537, you might want to add this link to your templating page as it gives more examples of how to use the Tornado template language : http://joshink.com/posts/9/