Erlang Software Framework

Home of the Erlang Internet Framework

August 24th, 2007

Adding Audio and Video modules to EIF

Over the past two or three weeks the project that I have been working on has taken an unexpected turn towards audio. I’m not going to go into too many details about the project at the moment, but I will talk just a bit about a few future modules that will be appearing once the project has gotten far enough to release some of the code.

I’m currently looking at audio file, but I am also looking at furutre video application by creating a new set of modules that will be called ErlMM for Erlang Multi-Media. The first release will be able to take a WAV file or a MP3 file and convert from one to the other. As the project that I am going to be working on will be using Flash on the front end I am planning on adding FLV support quickly therefater. Eventaully I will be adding ACC and OGG support as well.

I’ve been working with the WAV and MP3 fiel formats and those are pretty simple when you take Erlang’s binary syntax into account. The part that has been slwoing me down the past few days is creating the audio codecs for the differnet encoding methods. So if anyone has any great reading on codecs pass them along in the comments.

August 10th, 2007

ErlWeb-0.0.1 Released

I just uploaded the initial release of ErlWeb. This release holds the base version of a web scripting language that I am calling Erlang Markup Language. This is a tag based language that should be very easy to use, so the learning curve of the average web developer should be very short. In a future release I’ll be introducing the ability to use any Erlang module on the web server through ERML, which will give the language all of the power of Erlang :-)

Currently ERML works by including the mod_erml file in your INET config file. After that any file that ends in a .erml file extension will be processed for any ERML tags. Once I’m done with this post I’m going to start working on some very simple documentation to let other people get setup and start using the language. I hope to have a rough draft of that done over the weekend.

I’m pretty excited about ERML and this project in general. I’m planning on using it in my own future developments, so I’ll need to keep developing ERML to make sure that I have all of the feature I need. The code for ERML is not the prettiest code I’ve ever written and it doesn’t have as much documentation as I’d like either, but I needed to get it in a working condition to give to someone else tomorrow, so the cleanup will happen before I release 0.0.2.

Note: I’ve only tested this on a Linux server, it might have file operation bugs on windows.

Update: I put together a very simple document on how to use ERML commands, you’ll notice that documentation is not my strong suit.

ERML, Erlang Markup Language, ErlWeb, EIF

Technorati Tags: , , ,

August 5th, 2007

ERML working, sort of :-)

I’ve been working on the Erlang Markup Language for most of the coding time I’ve had this weekend and I’m making some great progress. I started off trying to figure out how I was going to traverse the XML tree I had created using xmerl, after reading the documentation I was more confused about what I wanted to do then I was when I started.

I took to reading through the xmerl code and I found the xmerl_lib modules, which has a mapxml/2, foldxml/2 and mapfoldxml/3 functions that after reading them thoroughly them they turned out to be the greater part of the work I was planning on doing today :-) This bring me back to the biggest problem I have with Erlang; the documentation. In my opinion, the three greatest functions in the xmerl library were the ones I found today and they are not mentioned in the documentation anywhere … But i digress …

After figuring out that I was going to need to use mapfoldxml/3 so be able to modify the structure of the document and accumulate changes in the state at the same time I was off to the races.

The first challenge was to create a ermlset command to set variables. I wanted this command to set the variables and to let the variables change at any point later on the page. (I’ve been enjoying the irony of writing a scripting language that lets you change variables values in a language that does not) Then after the variable is set I needed to remove the command from the output of the apple. I ended up replace the command with a generic ermlcommand that I remove all of the references to ermlcommand after processing.

Once I had my ermlset command working I moved along to the ermlloop command. I’m planning on having several loops, including a index or counter loop, a list loop and a conditional loop. I started with the index loop, just displaying some text a number of times. I got that working with a few glitches with out too much trouble and then I implemented some recursion into it, which managed to solve some of my glitches. (I’ve never figured out why, but for some reason my code runs better after I implement recursion. It’s happened about 4 times now, anyway …)

After I built int he recursion I was able to perform ermlset command within the loop and I have nested ermlloop statements … not bad for a days work.

Next, is working on the if/then/else statements, hopefully that will work just as easily.

ERML,Erlang,ErlWeb,Markup Language

Technorati Tags: , , ,

|