Update: I ordered the PDF version, right after writing this post, but haven't received the e-mail with the download-link yet, so all what is really available right now, are the two example chapters at the publisher's site.
Friday, February 01, 2008
New book "Mastering Dojo" - beta PDF now available
Update: I ordered the PDF version, right after writing this post, but haven't received the e-mail with the download-link yet, so all what is really available right now, are the two example chapters at the publisher's site.
Tuesday, January 29, 2008
More on serverside Javascript - Rhino on Rails
Dion Almaer has recently interviewed Steve Yegge about his project of porting Rails to Javascript, you can listen to it right here:
Tuesday, January 22, 2008
Serverside Javascript with Jaxer
Today Aptana (mostly known for their eclipse based Ajax IDE) launched Jaxer, an open source based Ajax server for using Javascript as server side scripting language. It is built on top of the Apache Web server and and the Spidermonkey Javascript engine and has an API which covers most developers needs: File and database access, logging, email and all kind of other utility functions.
So what are Jaxers major selling points ?
So what are Jaxers major selling points ?
- Write entire applications or presentation layers in Ajax.
- Share code between browser and server.
- Database and file access from JavaScript.
- Integration with Aptana Studio (their Ajax IDE).
Thursday, January 17, 2008
Hypernumbers whitepapepr: comparing Erlang and LAMP web stacks
Using Erlang In A Web Start-Up is a whitepaper (PDF) by Gordon Guthrie, pointing to advantages from the business point of view when choosing Erlang.
Tuesday, January 15, 2008
ErlyDTL - the Django template language in Erlang
I have been working on a new template language called ErlyDTL. Let's compare it first with the other, established players in the Erlang open source template languages field:
Update: There are more Erlang template engines out there: seethrough which is specifically for XML/XHTML and internally uses xmerl to do its magic. It is rather simple compared to the others, but depending on the use case that can be an advantage.
- ErlTL by Yariv Sadan. ErlTL is used in ErlyWeb and therefore probably the most popular Erlang template language. It exposes the full Erlang language to the template author, that is good, if the template author is an experienced Erlang developer, but bad, if the template author does not know Erlang. ErlTL compiles templates to beam files.
- sgte by Filippo Pacini. An Erlang implementation of StringTemplate. Enforces separation between model and view. Templates get evaluated at runtime. Used at erlware (if you install the erlware launcher, sgte is one of the core packages used internally for the various erlware templates)
- ErlyDTL by Evan Miller and myself: based on the Django template language. It does not expose Erlang to the template author, it compiles templates to beam files, pre-renders as much as possible at compilation time and supports a lot of features such as template inheritance, presetting variables at compilation time, automatic HTML escaping and lots of Django tags and filters. But it is not feature complete yet, just the more important tags and about half of the django filters are currently implemented.
Update: There are more Erlang template engines out there: seethrough which is specifically for XML/XHTML and internally uses xmerl to do its magic. It is rather simple compared to the others, but depending on the use case that can be an advantage.
The search engine optimizers are very much expert to manage ppc productivity in an efficient manner. The main function of web hosting service provider is to help the individualistic web sites to have direct accessibility to worldwide immediately. The website design templates are designed by the professional web designers which can be downloaded from different web directories free of charges. The internet service providers offer their latest services of dsl which are reliable and affordable for internet users.
Sunday, January 13, 2008
CodeMirror - an AST aware in-browser code editor
I have been following for a while now the development of Javascript based code editors and web IDEs (see here and here), I even started to build one myself, because I thought there is no such AST aware editor out there, at least until I discovered codemirror, which comes with support for Javascript and HTML, and with support I mean it has a real parser (and a CSS file for syntax highlighting) for those languages. Marijn Haverbeke, the author of this masterpiece of functional Javascript programming has released today a new version, which makes it easy to integrate it with a different Javascript libraries (codemirror itself uses MochiKit).
Codemirror has the following features:
Codemirror has the following features:
- syntax highlighting
- automatic code indentation of current line on pressing TAB or RETURN
- if some code it selected, automatic indentation of current selection on pressing TAB
- works with all common modern browsers
- highly configurable: additional languages, performance settings, etc.
Sunday, January 06, 2008
Zed Shaw on Rails (Ghetto)
The new year started with an explosion in the Rails community: Zed Shaw's Rails rant, where he points to some well known Ruby/Rails-people, explains why they are "assholes" and brings up some "general thoughts" such as:
This is exactly what makes Rails a ghetto. A bunch of half-trained former PHP morons who never bother to sit down and really learn the computer science they were too good to study in college.Zed is the author of Mongrel, that made him well known and highly respected within the Rails community. But now I see people from the whole software industry blogging about him and his famous rant. Zed got mentioned on techcrunch and today I saw even a post from Rickard Oeberg about Ted's rant. A few years ago, Rickard was blogging in a very similar style, highly informative but also entertaining about the nasty things around the JBoss community (Rickard was the most important initial developer of the JBoss application server).
Friday, December 28, 2007
Erlang on Javascript
While I am working on a Javascript to Erlang compiler for running Javascript code on the Erlang virtual machine, others do the opposite: Alex Graveley has written Er.js, a Javascript library for using Erlang-style concurrency with JavaScript, even with an Erlang like syntax !
Javascript does not support natively any kind of threads, therefore a lot of tricks (like using the asynchronous timer callback) went into this and other narrative Javascript based threading libraries to make it look and feel like real multithreading.
Javascript does not support natively any kind of threads, therefore a lot of tricks (like using the asynchronous timer callback) went into this and other narrative Javascript based threading libraries to make it look and feel like real multithreading.
Wednesday, December 26, 2007
Gmail insecurity - check your filters - you may have been hacked
David Dairey's .com domain name got stolen by an online criminal, exploiting a gmail security vulnerability (now fixed). The scary thing about this is that the exploit added a filter to gmail, so even after Google fixed the security whole, any malicious inserted filter continues to do its evil actions. Read the entire story and check your filters !
Saturday, December 15, 2007
How to put HD video on the web with latest flashplayer
First I want to make it clear that I am all for open web standards and requiring the latest flashplayer for showing some video on your site always degrades the user experience, no matter how much effort you put into avoiding that. So if you wanna depend on latest flashplayer, there must be a strong reason for it. Flashplayer 9.0.125 (released about a week ago) offering high quality codecs (h264/HE-AAC) might be such as strong reason, the audio/video quality is excellent and filesize of the videofiles is relatively small. Here the required steps to produce such a video and how to put it on a webpage without degrading the user experience too much.
Let's assume you already have your original video file in high quality and large file size, either form a HD video camera, a screen recording application or most probably as a result of post processing with a video editing software.
First you must transcode your media to h264 video / HE-AAC audio and put it in a mp4 fileformat. I assume there exists some software from Adobe which does that for you, but I am not familiar with their current commercial offerings. In my case I put together an open source toolchain to perform the transcoding.
Now you have the video as a *.mp4 file. Next you need to prepare your website to embed the video with a flash videoplayer (there are others which work equally well, just the code below probably neds to be slightly modified). The tricky part is that you require the latest flashplayer, so I suggest embedding via Javascript and with SwfObject, that allows to upgrade to the latest flashplayer via Adobe ExpressInstall, if Javascript is enabled. And what if Javascript is not enabled or not available at all ? There is a solution for that: "Extended" markup, which results in either the video or an alternative content (bur no easy upgrade via flashplayer ExpressInstall). Here the embedding steps in detail:
Load swfobject.js (Javascript library):
Remarks:
Let's assume you already have your original video file in high quality and large file size, either form a HD video camera, a screen recording application or most probably as a result of post processing with a video editing software.
First you must transcode your media to h264 video / HE-AAC audio and put it in a mp4 fileformat. I assume there exists some software from Adobe which does that for you, but I am not familiar with their current commercial offerings. In my case I put together an open source toolchain to perform the transcoding.
Now you have the video as a *.mp4 file. Next you need to prepare your website to embed the video with a flash videoplayer (there are others which work equally well, just the code below probably neds to be slightly modified). The tricky part is that you require the latest flashplayer, so I suggest embedding via Javascript and with SwfObject, that allows to upgrade to the latest flashplayer via Adobe ExpressInstall, if Javascript is enabled. And what if Javascript is not enabled or not available at all ? There is a solution for that: "Extended" markup, which results in either the video or an alternative content (bur no easy upgrade via flashplayer ExpressInstall). Here the embedding steps in detail:
Load swfobject.js (Javascript library):
<script type="text/javascript" src="{{ path }}/swfobject.js"></script>Register the video (via Javascript):<script type="text/javascript">Extended HTML markup for embedding video:
swfobject.registerObject("{{ video-DOM-ID }}", "9.0.115", "{{ path
}}/expressInstall.swf");
</script>
<object id="{{ video-DOM-ID }}"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800"
height="620">
<param name="movie" value="{{ path }}/mediaplayer.swf">
<param name="allowfullscreen" value="true">
<param name="menu" value="false">
<param name="flashvars" value="file={{ path_to_video }}&image={{
path_to_preview_image}}">
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="{{ path
}}/mediaplayer.swf" width="800" height="620">
<param name="allowfullscreen" value="true">
<param name="menu" value="false">
<param name="flashvars" value="file={{ path_to_video }}&image={{
path_to_preview_image}}">
<!--<![endif]-->
<h2>To view the video:</h2>
<p>
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"
alt="Get Adobe Flash player">
</a>
</p>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>Remarks:
- all {{ path }} variables need to be replaced with the actual path or URL where you have your static content.
- {{ path_to_video }} : the path or URL of the actual video file
- {{ path_to_preview_image }} : path or URL of a preview image
- as explained above, and inside this blog (requires editing the blogger template, if you wanna try that out yourself)
Friday, December 14, 2007
ErlyComet article and screencast
Today my article "Getting started with Comet on Erlang" got published at CometDaily, there is also a screencast there (scroll down there, to the ErlyComet section) if you prefer to watch and listen ...
Update: Some users could not load the screencast / did not like to get asked for upgrading the flashplayer. I halfway expected this. It's not that I haven't put in efforts to avoid that kind of bad user experience, but my efforts apparently failed. Let me explain in detail: the video is encoded in h264/HE-AAC and that only works on flashplayer 9.0.125. If the flashplayer is not the very latest one, a dialog should inform the user (and provide direct link) to upgrade the flashplayer, if he wishes to watch the video. Uploading the original QuicktTime screencast to youtube or google video results in bad, mostly unreadable text quality, similar to all those RubyOnRails screencasts which have been originally recorded in QuickTime.
Nevertheless, here is the google video version (bad quality).
Update: Some users could not load the screencast / did not like to get asked for upgrading the flashplayer. I halfway expected this. It's not that I haven't put in efforts to avoid that kind of bad user experience, but my efforts apparently failed. Let me explain in detail: the video is encoded in h264/HE-AAC and that only works on flashplayer 9.0.125. If the flashplayer is not the very latest one, a dialog should inform the user (and provide direct link) to upgrade the flashplayer, if he wishes to watch the video. Uploading the original QuicktTime screencast to youtube or google video results in bad, mostly unreadable text quality, similar to all those RubyOnRails screencasts which have been originally recorded in QuickTime.
Nevertheless, here is the google video version (bad quality).
The web hosting services of different hosting companies include the most additional features of domain registration free of charge. The web site design of varied websites is developed by the professional web designers who have artistic touch of Excellency. If you want to have direct and fast internet access, you should subscribe reliable broadband service providers. The website development services are offered by the different IT companies to boost up the significance of web site into the main search engine.
Thursday, December 13, 2007
Erlang TextMate integration - Documentation lookup
I have made some progress with ErlyMate, my pet project for adding first class Erlang support to TextMate. Based on a new architecture with an Erlang background server (starts and stops together with TextMate, wrote a Cocoa plugin for that) I implemented a very first and highly experimental approach of edoc lookup. More technical details can be found at the googlecode project page.
And here a screencast to show you how it looks and feels like (requires latest flashplayer, and asks you to upgrade to it, if you don't have it, because video is h264/HE-AAC encoded):
And here a screencast to show you how it looks and feels like (requires latest flashplayer, and asks you to upgrade to it, if you don't have it, because video is h264/HE-AAC encoded):
Monday, December 10, 2007
Rubinius - the next generation Ruby virtual machine
The guys at Engine Yard, a RubyOnRails application hosting company are serious about solving the Ruby performance issues (Ruby is interpreted) and they are developing a virtual machine. Straight from the Rubinius homepage:
Rubinius draws on the best virtual machine research and technology of the past 30 years and incorporates the newest research in dynamic language implementations. Rubinius implements the core libraries in Ruby, providing a system that is much more accessible, easier to develop and to extend.And what's in the bag for an Ex-Ruby-developer (Ruby it is a great language, but since I am comfortable with Erlang, I don't have any use for Ruby anymore ...) ? Well, TextMate, my preferred editor has a lot of its functionality implemented as Ruby scripts, and if they run faster with Rubinius, that's fine for me.
Sunday, December 09, 2007
Benchmark - ErlyWeb vs. RubyOnRails
If Ruby is on Rails, than ErlyWeb is on rocket engines !
Update: This number is far too good to be true ! In fact, Yariv had Mongrel running in non-production mode, in his corrected version the ErlyWeb outperforming factor went down to 6.
Thursday, December 06, 2007
Erlang R12B-0 on Leopard
Yesterday Erlang R12B-0 was released. Compilation on Leopard (with XCode development tools installed) was straight forward, except for one Erlang application: the new profiling tool percept, which got disabled because of missing libgd library at the ./configure step.
So I installed it via macports:
There a lots of new features and improvements, and I look forward to explore them one by one in the next weeks and months. Just the troublemaker percept I had to inspect immediately. It seems to be a powerful tool for performance analysis and it ships with a module called edg which wraps libgd and serves for creating 2D vector graphics (to visualize the percept profiling results), similar to my own erlycairo, but it produces*.gif files (erlycairo only outputs *.png files).
So I installed it via macports:
sudo port install gd2unfortunately ./configure continued to complain. Finally today a solution for how to run ./configure was posted on the Erlang mailing list:
./configure --with-gd=/opt/localand everything went without further problems ...
There a lots of new features and improvements, and I look forward to explore them one by one in the next weeks and months. Just the troublemaker percept I had to inspect immediately. It seems to be a powerful tool for performance analysis and it ships with a module called edg which wraps libgd and serves for creating 2D vector graphics (to visualize the percept profiling results), similar to my own erlycairo, but it produces*.gif files (erlycairo only outputs *.png files).
Friday, November 30, 2007
Updated ErlyCairo
Did some housekeeping on my growing inventory of Erlang open source projects targeted to web development. I completely rewrote the Erlang part of ErlyCairo, the Erlang bindings for the Cairo 2D graphics library. Previously it had a hard coded node name for the C-node, now it is based on a much more flexible gen-server approach.
Below see how to use this software to create a simple, purple, 100px * 100px PNG image:
Below see how to use this software to create a simple, purple, 100px * 100px PNG image:
start() ->
erlycairo:start_link().
%% if you run multiple C-Nodes, to avoid nodename conflicts
start(CNodeNumber) ->
erlycairo:start_link(CNodeNumber).
stop() ->
erlycairo:stop().
create_images()->
rect("rect.png", 100, 100, {1.0, 0.2, 0.7, 1.0}).
rect(File, Width, Height, {Red, Green, Blue, Alpha}) ->
case erlycairo:new_image_blank(Width, Height) of
ok ->
erlycairo:set_source_rgba(Red, Green, Blue, Alpha),
erlycairo:rectangle(0, 0, Width, Height),
erlycairo:fill(),
erlycairo:write_to_png(File),
erlycairo:close_image(),
ok;
{error, Reason} ->
exit(Reason)
end.
Wednesday, November 28, 2007
Amazon EC2 / S3 Network Performance
Thorsten von Eicken (CTO at RightScale) did some bandwidth measurements, here an overview of his analysis:
EC2 <-> EC2 (large instances):
S3 -> EC2 (large instance, HTTPS, upload):
EC2 <-> EC2 (large instances):
- one connection: totally 75 MB/s
- three connections: totally 96 MB/s
- one connection: totally 12.6 MB/s
- eight connections: totally 49.8 MB/s
S3 -> EC2 (large instance, HTTPS, upload):
- one connection: totally 6.9 MB/s
- twelve connections: totally 53.8 MB/s
Tuesday, November 27, 2007
TextMate is the most popular Rails development environment
So I am hopefully on the right track with my attempt to improve Erlang support for TextMate !
Tim Bray asked 1000 Ruby / RubyOnRails about their preferred development environment, below just the most popular ones, for the complete table go to Tim Bray's Ruby survey.
Tim Bray asked 1000 Ruby / RubyOnRails about their preferred development environment, below just the most popular ones, for the complete table go to Tim Bray's Ruby survey.
| All | % | Ruby | % | Rails | % | |
|---|---|---|---|---|---|---|
| TextMate | 478 | 30.35 | 216 | 24.24 | 262 | 38.30 |
| Vi family | 345 | 21.90 | 217 | 24.35 | 128 | 18.71 |
| NetBeans | 184 | 11.68 | 93 | 10.44 | 91 | 13.30 |
| Eclipse | 175 | 11.11 | 101 | 11.34 | 74 | 10.82 |
| Emacs family | 198 | 12.57 | 132 | 14.81 | 66 | 9.65 |
Disaster recovery nightmare with mozy.com


Shit happens and usually when you don't expect it, in my case I lost some personal data on my mac (iTunes and iPhoto library). I had signed up with Mozy for automatically backing up my data and easily restoring it, so I thought it just needs a few mouse clicks and everything is fine again. Unfortunately that was not the case. The pictures above show how both restore methods they offer (online restore and download-file-and-restore) failed (even after multiple retries).
Mozy support staff seems to responsive and friendly, but that's all. The copy-pasted text below is from an email they sent me 21 hours ago:
I will continue to do more research on this, and tomorrow our mac specialist will be in the building and from there we can work on a more permanent solution.
Lessons learned:
- Don't trust your data to a fast growing startup company. In my case it was Mozy. But I believe this can happen with any other of these over-hyped cheap-service companies.
- Don't test the backup service by just restoring a simple file. Take the time to do a test restore of your real valuable data at its full size.
- Choose at least two totally independent backup solutions.
Monday, November 26, 2007
Faster interaction between Erlang and TextMate
My first attempt of combining TextMate key bindings to Erlang scripts was fully based on escripts. Unfortunatley starting an escript costs some time (because of the startup of an Erlang VM), on my mac it is about 0.15 seconds. Not much, but enough to be perceived as short delay by the user. So I was looking for a faster way of interaction and Erlang core developer Bengt Kleberg pointed me to erlaunch, a kind of erlang scripting environment where the VM runs in the background and dosent need to be restarted for each script. So I guess something along that lines is the way to go for TextMate Erlang integration, probably a TextMate plugin written in C which takes care of the Erlang background VM during TextMate uptime. Need to learn now how to write a TextMate plugin ...
Subscribe to:
Posts (Atom)