daml 0.1.4 Release, A Python Markup Language for the Web

Since my initial post outlining daml as a haml-for-python, a lot has changed. Now it has become something more and plays a new role in a bigger project I am working on. Let’s look at some of the new syntax changes.

CSS Selector Style Attributes

Declaring attributes now follows css selectors appended to a tag hash. For example,

        #content.main[attr=val][apples=yes] some content

Inlining Tag Hashes

One can now inline tag hashes. The functionality is still being worked on and is broken beyond a single tier. The intent is to handle use cases such as,

            %li %a[href=/] Home
            %li %a[href=/contact] Contact

        #wrapper #container

Implicit Python Declaration

Since my last post, all python code had to be preceded with a colon (:). Now, this is only necessary when embedding a function call in plain text (or calling a filter). For Example,

def greet(s):
    return 'Hello, {0}.'.format(s)

nav = ['www', 'www2', 'www3']

        %p A greeting for you. :greet('Daniel')
        %ul for x in nav:
            %li {x}

The trade off to the above is explicit line breaks for multiline text as similarly done in python,

    %body This is some text \
        that spans multiple \

I am still putting alot of thought into this portion of the syntax and it will most likely see some changes in a number of months. Explicit line breaks can become rather confusing when handling complex mixed contents, but again, tools such as daml aren’t particularly suited for writing page content, but rather establishing layout.

New Filters

I added two new filters as a test, these may be removed in future releases (and migrated to my personal set of daml extensions). They are for declaring css and js files. I think the syntax speaks for itself in function,

        :css /css/

        :js /js/lib/
        %h1 I do enjoy filters!

I think such filters could be upgraded to support appending additional files, but again, I dont really have a place for such things that aren’t a necessity to a fully featured template engine.

In Summary

This release requires cython >= 0.13 and lxml. I use this regularly on Windows 7 x64 and linux. The 0.1.4 release can be found on pypi, http://pypi.python.org/pypi/dmsl/0.2 and you can follow development at github, https://github.com/dasacc22/dmsl


Line 6 UX2 and Linux

I originally wrote a bad/sad review about the Line 6 UX2 not working under linux as can be seen here:

I was looking to sell it recently when I decided to give it another look over and try out the drivers done for the PodXT devices by someone as can be found here:

The 0.8.1 release failed to compile so i checked out the trunk of the development version
$> svn co https://line6linux.svn.sourceforge.net/svnroot/line6linux
$> cd line6linux/driver/trunk
$> make
$> sudo make install

To my surprise, it worked fairly ok. My line 6 ux2 device lit up and seemed ready to go. One of the first things I noticed was that there was a constant buzzing out of the right channel monitor. This was alleviated by simply plugging my guitar in. Next, I read through the docs to get some general info. I went ahead and fired up alsamixer, increased pcm output and zero’d out the monitor. Note: the docs say to set pcm output to zero as they can be much louder then the guitar monitor. I had no trouble with this when i increased output to 75, volume was normal.

So then I fired up jack and played around with a couple settings. To my surprise I was able to get latency down to 1.5 ms according to ardour (2.87 according to qjackctl)! Either way, this was much lower then I ever managed with my edirol which normally clocked in around 15ms and was littered with xruns that were very audible in the recording. Normally around 22ms I could achieve good sound with no xruns. After a short recording session, I noticed qjackctl had logged numerous xruns but I never heard a thing. Once during the recording, ardour disconnected from jack but this could be totally unrelated.

This is fine news indeed and prompts me to want to hold on to this device. The bad news is I have been unable to get the microphone inputs working. I haven’t had time to look into it fully but hopefully after exploring the line6linux docs some more, I can have some success with getting this working.

So all in all, this is great. What I would really like to see is Line6 spend a few resources on this project or doing something themselves. But that aside, hardware wise (i guess), this little bugger rocks!

Ableton Live, Linux, and Wine

Well, a title doesn’t get much more concise then that I guess. For anyone ever interested in running ableton live in a linux platform of their choice via wine, it has been disheartening to say the least. Mainly due to a direct draw issue thats been around for a while. Well a couple days ago the issue was resolved with wine 1.1.3 and ableton is now very usable! I installed Ableton Live 6 on my laptop after getting wind of the possible fix, started the app and immediately noticed it was copying files to the library! Normally ableton dumps the dialog here, doesn’t copy anything, and presents you with an empty “this is an evaluation” blah blah blah empty dialog where i have to click an invisible button. Well long story short, its working and working very well.

There are a couple of issues ive noted thus far that i need to open bugs for or find bugs already opened for. One, when i arm a track for recording in live, it prompts me with an error message saying it can’t open such and such a file for writing. Also while working with a simple project of dragging in some songs and doing some loops everything went fine, with a more complex project of dragging in loops, samples, and other fun stuff and throwing in some midi sequences and effects and more fun stuff, well.. everything went great! and then i saved it, and then later i went to open it and it couldn’t find a file related to the project, but it was looking somewhere i wouldn’t normally expect ableton to look (i dont think..). If i recall correctly, im pretty sure ableton live records loops and junk into a folder of the name of the project, but instead it was looking for a file from my ~/Samples/Recorded/ folder. I dunno maybe thats right, but that folder is empty and the file its asking for i cannot slocate on my hard drive so i dunno ..

Once these quirky file issues go aside and i can save complex projects without any hitches, id probably give it a platinum status b/c it runs damn smooth.

Edit: Just to note, im using Ubuntu Hardy 8.04 and the repo’s from winehq.org