6 ms·
Aspen is a Python web server. Simplates are the main attraction.
- evangineer 16y agoThe favicon is pretty amusing, once you've grokked Simplates. One notable feature is that Aspen now uses the Diesel non-blocking socket engine.
- drats 16y agoLinking 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/ http://aspen.io/ [1]http://bottlepy.org/docs/dev/ http://bottlepy.org/docs/dev/ [2]http://flask.pocoo.org/ http://flask.pocoo.org/
- evangineer 16y agoFair point, but since Chad says that Simplates is the main point of interest, I thought it would be useful to point directly to them.
- sausagefeet 16y agoUsing a character that one needs a tutorial on how to type AND isn't copyandpastable easily seems annoying...
- whit537 16y agoMeh. Keeps out the riff-raff. ;^)
- whit537 16y agoOk, page updated to address this concern: http://aspen.io/form-feed/ http://aspen.io/form-feed/ :^)
- sausagefeet 16y agoThe concern is really that it's a poor character to choose IMO, not that there isn't enough documentation on it :)
- evangineer 16y agoPersonally, 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/ http://barry.warsaw.us/elisp/
- whit537 16y agoOk, added links to Barry's site and to the Emacs docs: http://aspen.io/form-feed/ http://aspen.io/form-feed/
- evangineer 16y agoWow, 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.
- evangineer 16y agoI'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 http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html
- whit537 16y agoGood 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 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.
- mikecaron 16y agoI think this is an incredibly innovative approach to web apps in Python, very fast dev turnaround and not a lot to grok.
- evangineer 16y agoIt allows you to start off by sketching a webapp with Sinatra-like simplicity & get as complex & modular as needed.
- evangineer 16y agoI'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.
- whit537 16y agoThank 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.
- whit537 16y agoHere's a list of editors with support for changing keybindings: http://en.wikipedia.org/wiki/Comparison_of_text_editors#Key_bindings http://en.wikipedia.org/wiki/Comparison_of_text_editors#Key_...
- whit537 16y agoThanks for the link evangineer. Happy to answer any questions.
- jarpineh 16y agoHi. 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.
- evangineer 16y agoThere'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 http://aspen.io
- whit537 16y agoHere's a start: http://aspen.io/templating/ http://aspen.io/templating/
- jarpineh 16y agoGoogle 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.
- whit537 16y agoIt 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. :^/
- McLeopold 16y agoOn 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?
- whit537 16y agoDoes it depend on Windows, or on your editor? In seem to remember remapping ctrl-L to form feed in UltraEdit, for example ...
- whit537 16y agoThe 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-shortcut-in-internet-explorer http://lifehacker.com/#!5302587/get-firefoxs-ctrl%252Bl-shor... http://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts 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/ http://webpages.charter.net/krumsick/).
- catch404 16y agoSeeing 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?
- whit537 16y agoThank you. Short answer: Zope 2. Long answer (just added): http://aspen.io/simplates/#history http://aspen.io/simplates/#history
- evangineer 16y agoOne interesting use of Simplates could be a very ajaxy Single Page Application that accesses an API provided by Python functions in the same Simplate.
- catch404 16y agoThanks! :)
- whit537 16y agoI 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/ http://aspen.io/page-break/
- whit537 16y agoOk, 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/ http://aspen.io/aspen.conf/ Is that acceptable?
- whit537 16y agoI just implemented support for caret-L in addition to true page breaks, no configuration required. http://aspen.io/simplates/ http://aspen.io/simplates/