Haxe got (awesome) macros!

http://ubackparadise.com/point-of-view-essay/ point of view essay Hi guys, It has been a while since I posted the last time.
However I felt like it was the right moment to go back on the blog, to talk you about the new awesome Haxe macro system.

help in dissertation writing As you can read on Nicolas’s blog, they’re only present in the latest SVN update, but they will be included in the next build as soon as they will be perfect.
I must say I’m extremely happy about that addition: one of the most important reasons I’m so happy is the fact that instead of implementing an old-and-bording Macro system ala C/C++, Nicolas decided to go for a much more powerful macro system, which allows typesafe macros and real runtime code generation.

see You are not limited to simple stuff like replace a macro call with a block of source code, but you can generate any kind of valid AST expressions that will be evaluated by the macro preprocessor at compile time.
Moreover you have access to almost the whole neko library (io, net, etc) which means you can write extremely powerful code generators and DSL! That’s an awesome feature – really.

get Give it a look!

Expressions evaluation at (almost) native speed

Finally I found a bit of time this weekend to do some other tests with go to link expressions evaluation.

The results are pretty interesting, even if obvious from some point of view. I took the ExpressionEvaluator I wrote as example for the first post about this topic, and then I edited a bit the code adding just in time source site AS Bytecode compilation.
Thanks to that, expressions evaluation is much more fast and always safe because it runs in its own ApplicationDomain.

You can download the sources here, that includes the edited code and a test file. http://www.sgomentocomics.com/literature-review-influence-on-consumer-buying-behavior-of-mobile-phone/ The test file runs 1 milion of iterations and may hang your browser or at worst case your system. Reduce the value of the ITERATIONS constant if you are not sure about the power of you machine.

If you want to read a bit more details about that, click on the link below to continue reading.

Continue reading

From Web to Desktop

Yesterday Screenweaver HX was announced as part of the haxe framework.
With SWHX, you create an application by using two layers :

  • click the System layer : written in haXe and using the Neko API, you can access the local filesystem, databases, network sockets… You can also easily extend its capabilities by writing your own DLL.
  • the Flash layer : written in haXe or any other technology capable of producing SWF, you can use this layer to display the graphical interface, handle user interactions, play sound and video…

Unfortunately I’m trying to install haxe/swhx on my Windows Vista but I’m not lucky at the moment 🙁

The second project is directly from Adobe labs, called Apollo (flash, html, and pdf together), and currently it’s only a long description of what it can do and a list of F.A.Q., but Adobe says it will be pre-released on Adobe labs in the second half of 2006..

I’ve also found a diagram which display makeup of an Apollo application.

Apollo is the code name for a cross-operating system runtime being developed by Adobe that allows developers to leverage their existing web development skills (Flash, Flex, HTML, JavaScript, Ajax) to build and deploy Rich Internet Applications (RIAs) to the desktop.