DISKTREE.NET // PANZERKUNST

Avatar

HXMPP 0.4.2 released

..available on haxelib and head of git.

Main changes:

  • API change! The ‘Stream’ class takes only one parameter now, a ‘Connection’ object … the JID of your account gets now passed into the Stream.open method.
  • Server components require ‘JABBER_COMPONENT’ compiler flag
  • TLS flash socketbridge for (browser) javascript
  • TLS support for nodejs
  • Dirty hacks for flash to be compatible with haXe 2.06 (issue172)
  • Added a terminal tool to register client accounts by hand
  • fixes and minor improvements

I’ve also created a repo at github to collect example usages and tests.
http://github.com/tong/hxmpp.examples

Open source updates

HXMPP updates
* Full adobe air2 support (including native, secure air2 socket connections).
* Added support for websocket connections (javascript only)
* Minor fixes

HXMPP.lop test implementation
The LOP stuff is in the HXMPP repo since months, this is just an example usage.
The application consists of a javascript villein (a anonymous XMPP client) living in the browser and a farm running on the nekoVM. The villein spawns hscript virtual machines on the farm, sends some script .. the farm computes it and sends back the result. Variables live as long until the VM gets killed by the villein.

OWL
A XMPP server running on nodejs.
The project is in a very early state but already doing basic internal instant messaging (no S2S). I am f* enjoying the development process, since i got a good overview on the XMPP protocol over the last couple of years (time goes by in ludicrous speed) while developing the client library and don’t have to read XMPP specs that much .. straight forward coding .. this will change when i get to the S2S stuff. brrr.
Of course written in haXe using the nodejs type signatures from blackdog and (currently) a redis backend.
This project accepts and encourages contributions!
Ping me: xmpp://tong@jabber.spektral.at

Tsunami
A small framework for navigating on websites without reloading using #s (hashes). This is forked from the serverside mtwin templo library.
Here is an example (src).
What sux is that webkit based browser destroy pending XHR requests on hash tag URL changes therefore it breaks BOSH connections -> fail! Firefox does it right.

ROAR 1000+

ROAR, our public, XMPP powered media micro blog, broke the 1000th post barrier some days ago. My plan was to write a new version before that, but busy as (n)ever ..

The XMPP roboter seems to be pretty stable .. didn’t get down since months.
.. runs on nekoVM using a sqlite database.

You can add roar@jabber.spektral.at to your roster to post non-anonymously and directly from you jabber client. The bot accepts your presence subscription automagically. To post simply send a chat message .. your input gets interpreted line by line (most jabber clients can create new lines by hitting ctrl+enter).

Currently following input is supported:

  • Image links (URL has to end with .png, .jpg or .gif)
  • YouTube videos (simply copy URL from the browser bar)
  • Vimeo videos (simply copy URL from the browser bar)
  • Ogg audio files ( .ogg -> html5 audio tag)
  • Ogv video files ( .ogv -> html5 video tag)
  • and of course http links which get a-hrefd

http://roar.disktree.net

Open source updates

External classes for adobe air2
Fork of the adobe-air haxelib project to support runtime version 2 (javascript+flash).
Might not be 100% complete but enough for my needs right now.

Externals for the android scripting environment SL4A (formerly known as ASE)
Quick shot .. some dynamics where types are possible, but enough to vibrate )
http://code.google.com/p/android-scripting

HXTLS
Not really open source, just external haXe classes for a proprietary flash TLS library, but fully functional. Already added to HXMPP.

Wikileaks-in-realtime
HXMPP/Collecta powered website for updates on term ‘wikileaks‘.
Basically the same as haxe-in-realtime.
http://wikileaks.disktree.net/

CNXS puzzle flashgame

Support our free open source projects by playing and spamming our latest flash game.
Enjoy! http://cnxs.disktree.net/

Open source updates

  • HXRTP - ORTP bindings for the nekoVM
    Allows you to stream timecoded data using UDP (just single streams right now). Implemented this to toy with jingle-RTP in the future.

Open source updates

Latest experiments on disktrees opensource front …

  • HXMPP.console
    A themeable XMPP transfer console for HXMPPs browser targets (screenshot). Long live my eyes!
  • HXMPP.test
    Moved unit tests into a seperate repo and added some more tests.
  • HXMPP SASL-MD5
    SASL authentication using MD5 is finally working.
    Uff, the bug was in the ‘removeNullDigits’ method of the base64 decoder; arrg, who would have thought it.
  • HXMPP jingle
    Added experimental jingle/RTMP support for flash.
    Allows you to negotiate RTMP streams between jabber entities, aka: make video phone calls in the browser.
  • SCM/Jabber roboter
    A jabber bot for (presence based) source control repository update notifications. Just git support right now.
  • WebSocket server
    A simple, standalone, hx/neko websocket server, just for testing purposes.
  • Google chrome extension external JS wrapper
    ..can be found in disktrees core library.
  • Google chrome content script haXe remoting
    haXe remoting for contentscript 2 website (and vice versa) communication.
  • LOKI
    Google chrome extension to add XMPP client functionality to the browser. Pretty useless implementation up to the point where it makes some sense ~#~#~
  • hype-framework
    Generated, external haXe classes for the (AS3) hype framework.
    As far as i’ve stumbled cross the source code the framework feels pretty well organized, easy to use. Good for designers i think, but no plans to use it here right now.

ROAR version 7

A new version of ROAR, our public microblogging web app is now online.
Its a complete haXe/javascript rewrite using BOSH (no SWF bridge for the socket connection anymore).

Enjoy, http://roar.disktree.net

haXe/XMPP remoting

I have added a (async) haXe remoting remix to the HXMPP library using XMPP as transport, and created following example to test it:
[ HXR flash example ]

The app:
* embeds the same SWF twice in a HTML site
* the SWF logs into the jabber server with passed account information using SASL-MD5 authentication (password is hidden)
* creates an instance of the application
* create a haXe remoting host in context of the instance to listen for incoming calls.
* create a haXe remoting proxy in context of the instance for outgoing calls.
* on button click:
** creates random values for the next circle to add to the other entities canvas
** adds a circle to the remote entities canvas by calling a function on the proxy

A great benefit of HXR (haXe-remoting) over XMPP is that EVERY entitiy/target, also clients, can act as remote host. Which means i can call methods on a client from any other entity (a server or another client). Pretty cool for round based games and stuff.

Important thing missing is a access model for the remote host.
Currently every entity is allowed to call methods.
(Workaround would be be to add a IQ/HXR filter to block remaing packet collectors)

Source code of the app:
http://paste.disktree.net/82

99 bottles of beer

Here is my haXe submission to the 99 bottles of beer song collection.
( The website holds a collection of the song ‘99 bottles of beer’ in 1311! programming languages. )
I got annoyed of a comment on the previous haXe version claiming that its twice as long as the COBOL version. So i thought it can be done better/shorter.

It builds the complete song/string before output, so i was able to do some performance measurements:

Run program 100 times:
neko: 0m0.618s
cpp: 0m1.106s
php: 0m2.292s
js (rhino): 0m41.954s

Run 1000 times in a loop (internal):
flash-standalone(10.0.32.18): 0m0.277s
flash-plugin(10.0.32.18,firefox3.5.5): 0m0.294s
php: 0m0.291s
js (rhino): 0m0.474s
neko: 0m0.529s
cpp: 0m8.793s

Web based chat for coders

I’ve started to write a web based multiuser chat, intended to get used mainly by developers. Nothing massiv so far. Last feature i’ve just added: syntax highlight code in serveral languages, which might come in handy.

Give it a try

EDIT:
* Make sure your firewall does not block ports 843, 5222.
* User a HTML5/CSS3 enabled browser.

Apache/Openfire BOSH setup

Since HXMPP supports BOSH connections (flash/js) it’s time to write a little setup instruction….
In my (local) case for apache2/openfire 3.6.4 on ubuntu 9.04.
What has to be done is to be able to connect your client to the BOSH adress of your jabber server. Default on openfire is http://localhost:7070/http-bind/

Your apache server doesn’t know about your jabber server, so you have to setup a proxy to forward requests:
http://localhost/jabber/ > http://localhost:7070/http-bind/

Here we go:

#Activate the mod_proxy apache module if required
sudo ln /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled

#Add following line to proxy.load for loading the module
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so

#Add the proxy directive to the host settings in your http.conf
ProxyRequests Off
ProxyPass /jabber http://localhost:7070/http-bind/
ProxyPassReverse /jabber http://localhost:7070/http-bind/
ProxyPass /jabbers http://localhost:7443/http-bind/
ProxyPassReverse /jabbers http://localhost:7443/http-bind/

#Restart apache
sudo /etc/init.d/apache2 restart

Thats it!
Using HXMPP, you can now create a connection by passing in the path in the constructor, like:
var cnx = new BOSHConnection( “myjabberserver.net”, “127.0.0.1/jabber/” );

Push style microblogging

A small project i am lately working on is a microblogging service, utilizing jabber/XMPP to push new messages (sent from a jabber client) to the users browser in realtime without need of page reloading.
It uses anonymous authentication, which allows to consume it without logging into a jabber account.

haXe really unfolds its power for this project since i target 4 different platforms from one language and use the same jabber library clientside and for the commandline bot. Flash for the jabber client, JS for printing html, PHP for delivering HTML and nekoVM for the jabber bot.

Go test it:
http://roar.disktree.net

The site uses the css3 font-face feature, .. a compatible browser is needed to view the site correctly!
(displays nice in firefox3.5 and safari, shitty in opera)

haXe on android !

Seems to be christmas time !

haXe 2.04 released !

.. introducing 2 new awesome improvements:

OMG, haXe rules so much ;)

WeFeelFine jabber bot

I’ve created a jabber bot for the WeFeelFine API.

Bots presence:

We Feel Fine is an exploration of human emotion on a global scale.
Since August 2005, We Feel Fine has been harvesting human feelings from a large number of weblogs. Every few minutes, the system searches the world’s newly posted blog entries for occurrences of the phrases “I feel” and “I am feeling”. When it finds such a phrase, it records the full sentence, up to the period, and identifies the “feeling” expressed in that sentence (e.g. sad, happy, depressed, etc.)

You can add wefeelfine@jabber.spektral.at to your contact list and request the bot with chat (or normal type) messages like:

returnfield, returnfield,… $ option=value+option=value+…

..where the returnfields specifiy the data which should get loaded (sentence is default).
Possible returnfields are:

  • imageid
  • feeling
  • posttime
  • postdate
  • posturl
  • gender
  • born
  • country
  • state
  • city
  • lat
  • lon
  • conditions

Key-value pairs after ‘$’  specify optional settings, which are:

  • limit=0-1500 (num feelings to return)
  • feeling=a-z (specify feeling)
  • gender=0/1 (0=female,1=male)
  • conditions=1-4 (1=sunny, 2=rainy, 3=snowy, 4=cloudy)
  • counry=a-z
  • state=a-z
  • city=a-z
  • postdate=date (YYYY-MM-DD)
  • postmonth=1-12
  • postyear=0-2009

The bot will return 5 values if no ‘limit’ options is specified.
Type ‘help’, ‘fields’ or ‘options’ to display the possible request fields.

Here are some examples:

“Give me the most recent 5 sentences from vienna”:
$city=vienna

“Give me the last two sentences from people in canada who feel loved”:
$limit=2 + feeling=loved + state=canada

“Give me the last 3 sentences plus city, gender, latitude and longitude from people in paris who feel angry”:
city,gender,lat,lon $ limit=3 + city=paris + feeling = angry

Next,

Twitter



haXe

Get Linux



Spread Firefox Affiliate Button

CNXS game