One of my project is a Client-Server ARINC 661 framework which use a lot of socket-bound activity from the Client (called User Application in the standard, it handles the logic here) to the Server (which perform the graphic rendering).
The communication protocol in ARINC 661 is specific and a bit complex (no SOAP, no REST, no CORBA, not RMI, but purely specific binary messages on top of the lower-level bus-level layer protocol). So to ease development of Java clients, I developed a generic API to handle this.
I thought it could be cool to allow users to prototype the logic of the Client. Using beanshell for this was the logic thing to do (pardon the pun), because it is very close to Java, so transcoding from beanshell to Java is straigthforward.
The second step was to be able to add scripted control panels for the Client. I don't want to recreate the wheel, so I decided for the use of XUL. One cool side-effect is that users would be able to debug their scripts using Firefox.
OK, it's one thing to create control panels in Java by parsing XUL scripts, but if you are not able to wire the widgets commands to the logic, it's no use. I decided for using Javascript (by using Rhino). Then I had to wire beanshell methods to Javascript. It involved a bit of code to be able to do that, but it was possible.
But getting or setting widget attributes at the Javascript level is also mandatory ! With some amount of work (in fact not a lot of work, I only had to use the right approach to do it), it was also possible.
So basically now I have a framework where I can script ARINC 661 logic in beanshell, and wire these scripts to commands in XUL declarative files. I have a purely scripted ARINC 661 Client.
In this process, I found that Rhino is really a very good Javascript engine, but that there is few informations or tutorials when you have to perform specific things like I had to do (hmm, it's no so specific). I will blog about what I discovered about Rhino specificities in some days (there's not much to say about beanshell / Java, it just work, but as it is so close to Java, there's no surprise). I thing it can be useful to others.
Sunday, 8 June 2008
Sunday, 4 May 2008
New projects ?
It seems I did not blog here for a long time now. This blog is still active, although I blog more often here (hmm, I acknowledge that my musical tastes may be a little specific).
This entry is just a reminder, so I can look at it a few months from now, and look if I made any progress at all...
First I created two open source projects, called:
And now, for possible new directions:
But for now, I will have to send patches to the Batik Java library (the most conformant SVG library, I think). Patches will be in the area of WMF to SVG conversion.
This entry is just a reminder, so I can look at it a few months from now, and look if I made any progress at all...
First I created two open source projects, called:
- MDIFramework, which aim to provide a ready-to-use desktop application infrastructure in Java. I mainly created this project because I always reused the same piece of code in my own work, so I wanted to have a generic library instead. I thought it was better to open source it, so that's what I've done. Seems that there is not a lot of activity in this project for some time, but I have upgraded the code internally, and I will soon upload a lot of code, and bump version to 0.2. I perfectly understand that this project is not very relevant now that the Appframework and the associated JSR have been created, and the relevant code integrated in Netbeans. But I used my own library before this existed, and it is not always easy to switch to another framework. Maybe I will do it in a little while...
- MDIUtilities, which is a utility library with various classes in the swing, IO, geometry, etc... fields. There's tons of other libraries in the open, but it is not always easy when all you want is a small library to provide utility classes. Sometimes you could end-up with tons of different libraries, for which you only use few classes.
And now, for possible new directions:
- A Java port of Povray. There's a problem with the license (Povray began when GPL did not even exist, so it's not really open source for now, even if they will maybe distribute the next version under a GPLv3 license), but at least I may never begin this work, and I still could give it to the Povray team. I would really like to benchmark the Java version against the C reference. Even if I know that the C version will be faster than the Java one, the question is to what extend ?
- Perl on Java, to be able to reuse simple Perl scripts in the Java world. There is already a language called Sleep (in LGPL) which does even more than that, so I think that could be "easy" (just kidding)
- The same thing for C (what, C ?), also using JNA to leverage legacy C libraries. What would be wonderful would be to be able reuse small C programs as scripts (or even compiled code, but here I'm dreaming) in the Java world without even have to bother with compilation options, and also to be able to debug much much much much more easily (dynamic allocation, pointers, etc...). But I'm sure this one would not be an easy one
- Open Dynamic Engine ported to Java. It would be interesting, for example to use it with a Java game engine such as JMonkey Engine (which already is able to do fabulous things)
But for now, I will have to send patches to the Batik Java library (the most conformant SVG library, I think). Patches will be in the area of WMF to SVG conversion.
Saturday, 9 February 2008
On Microsoft and Open Source
OK, I'm not really what you can call a Microsoft fan. Not really... But everyday I encounter new evidences that I'm right. What bothers me is that some people have a tendency to take MS marketing "as it is", and it is often not completely accurate, to say the least.
A new example: The Dynamic Language Runtime.
It is an ongoing effort to ease implementation of dynamic languages (like Python, Ruby, ...) on top of the .NET Framework. When you read articles on the web (for example, see here), you are under the impression that it is up and running, but... the code currently lives in the IronPython repository and the developers plan to release the first 1.0 version by the end of the year. I'm not saying that this project is not exciting (hmm, i'm not excited...), but people should wait a little before writing things like Microsoft developers have already been able to build implementations of Python, Ruby, Javascript, and Visual Basic that can run on the DLR, when these are planned for the end of the year (IronPython), currently in the pre-alpha stage (IronRuby), or planned for the future (VBx).
Update February 10: After a discussion with fuzzyman, I feel I need to update this a little. I said that I needed to see successful non-Microsoft projects built on top of DLR to say that DLR have succeeded. He pointed that there were more than Microsoft projects on the go, for example IronLUA, or IronScheme. I must agree that people are expecting a lot from the DLR, and starting to use it in their projects, but neither IronLUA or IronScheme are close to completion yet (which is normal, considering that they still have a lot to do to implement their respective languages, and also that the DLR API is still far from stable).
This is not only a formal discussion for me, because the idea behind the DLR is that it is possible to abstract AST to be able to use them in ANY dynamic language. I am very coutious because this very same assumption was made before with the CLR, which was said to be really language-agnostic, and (contrary to the JVM) could be used to implement ANY language. It turned out that it was no more the case for .NET than for Java (and no less, I agree), and languages built on top of CLR were often slightly different from their reference. So, just one last word for DLR: Wait and see... I can be wrong, but if we go back to the beginning, we are far from saying that it's done.
A new example: The Dynamic Language Runtime.
It is an ongoing effort to ease implementation of dynamic languages (like Python, Ruby, ...) on top of the .NET Framework. When you read articles on the web (for example, see here), you are under the impression that it is up and running, but... the code currently lives in the IronPython repository and the developers plan to release the first 1.0 version by the end of the year. I'm not saying that this project is not exciting (hmm, i'm not excited...), but people should wait a little before writing things like Microsoft developers have already been able to build implementations of Python, Ruby, Javascript, and Visual Basic that can run on the DLR, when these are planned for the end of the year (IronPython), currently in the pre-alpha stage (IronRuby), or planned for the future (VBx).
Update February 10: After a discussion with fuzzyman, I feel I need to update this a little. I said that I needed to see successful non-Microsoft projects built on top of DLR to say that DLR have succeeded. He pointed that there were more than Microsoft projects on the go, for example IronLUA, or IronScheme. I must agree that people are expecting a lot from the DLR, and starting to use it in their projects, but neither IronLUA or IronScheme are close to completion yet (which is normal, considering that they still have a lot to do to implement their respective languages, and also that the DLR API is still far from stable).
This is not only a formal discussion for me, because the idea behind the DLR is that it is possible to abstract AST to be able to use them in ANY dynamic language. I am very coutious because this very same assumption was made before with the CLR, which was said to be really language-agnostic, and (contrary to the JVM) could be used to implement ANY language. It turned out that it was no more the case for .NET than for Java (and no less, I agree), and languages built on top of CLR were often slightly different from their reference. So, just one last word for DLR: Wait and see... I can be wrong, but if we go back to the beginning, we are far from saying that it's done.
Saturday, 19 January 2008
News news
OK, my PC is repaired now and kick ass (since December). I had to replace the defunct hard drive by new one, in perfect shape, and with 160 GB instead of just 60 for the old malfunctioning one ;-). Plus I added some memory. So this is all right now thanks. Except that I had to reinstall all my apps, and tried to find copies (even old ones) of things I had only on this PC...
As for development news, I will shortly upload the version 0.2 my Application Framework library. OK, maybe you think that it values very little in front of Sun's appframework an you may be true, but I developed this library before we heard of appframework, it helped me to not reinvent the wheel for my own applications every time, and now it would be some work to adapt all my apps to this new framework, even if it is better. However, I will surely do that at the end, but for now I have no reason not to maintain my own library. And that's what is great about Java, you have the liberty to choose amongst several ready-made solutions for any of your needs ;-) Even if you are not interested, you should know that the actual version of this library is working well, I'm using it in approx. 7 to 10 of my own apps... OK, no more advertising.
What I would like to do (in the area of development) for the new year (and probably I will never do) is:
What interests me in Java ports of big libraries like ODE or POV-Ray, apart from the "because it's fun" reason, is the fact that it should be interesting to have an idea of the performance difference between the original C or C++ app performance and Java ;-)
But as you can see, these are mainly dreams for the new year. Not that it is not possible to do, but because I have a lot of other things to do, and this would involve a lot of work...
As for development news, I will shortly upload the version 0.2 my Application Framework library. OK, maybe you think that it values very little in front of Sun's appframework an you may be true, but I developed this library before we heard of appframework, it helped me to not reinvent the wheel for my own applications every time, and now it would be some work to adapt all my apps to this new framework, even if it is better. However, I will surely do that at the end, but for now I have no reason not to maintain my own library. And that's what is great about Java, you have the liberty to choose amongst several ready-made solutions for any of your needs ;-) Even if you are not interested, you should know that the actual version of this library is working well, I'm using it in approx. 7 to 10 of my own apps... OK, no more advertising.
What I would like to do (in the area of development) for the new year (and probably I will never do) is:
- A Perl interpreter coded in Java, going from the Sleep language
- A POV-Ray port in Java. No need for now to bother about license, because I will probably never have something good or complete enough to be able to C compiler or interpreter coded in Java, would be great to be able to debug C applications with the Java debugger
- A pure-Java port of the Open Dynamics Engine
- A SVG to WMF converter built on top of Batik, the pure-Java SVG library. I have almost something working now, so this one could be done for this year
What interests me in Java ports of big libraries like ODE or POV-Ray, apart from the "because it's fun" reason, is the fact that it should be interesting to have an idea of the performance difference between the original C or C++ app performance and Java ;-)
But as you can see, these are mainly dreams for the new year. Not that it is not possible to do, but because I have a lot of other things to do, and this would involve a lot of work...
Sunday, 11 November 2007
Windows Install : Bad news
hmm, it seems that my Hardrive is sort of dead. It now says "S.M.A.R.T status BAD", and exit the boot sequence, even when I try to boot on the CD... No good at all...
I tried to boot on the Windows install CD, and copy the Hard Drive to an external disk, but at first the Drive was not even recognized. I then tried to disable (temporarily) SMART in the BIOS, and it boots, but when it seems to never enter into Recovery, the CD seems to not work at all anymore..
There is a high chance that I will not even be able to backup my files to my external removable drive. Even if there are few files I have only on this hard drive, I'm sure there's some...
Plus I worked part of the Week-end to finish some very important programming work, I have almost finished, but it's on the Hard drive...
Update (23:00) : After numerous attempts, I found a fantastic utility program called UBCD. It's a Linux tool (a Windows version is available, but is not up-to-date), but it's not a problem when even your OS can't boot... So I booted on a CD created with UBCD's ISO image. Their is a collection of utilities, and some of them are able to recover hard disks failures... (like with late floppy disks). Using it, I was able to reformat the hard drive (quick reformat, I hope to be able to get back some datas after all this mayhem), and launch the XP installation program. Only time will tell if it will work at the end.
However, I will try another tool (called gdbfn) after that. This tool is seemingly able to recover datas on a hard disk, even after a quick reformat... hmm, and after all that, even if it works, I think I will need to change my laptop... I'm still on SMART option disabled, after all, this is not very good, don't you think ?
I'm doomed !!
I tried to boot on the Windows install CD, and copy the Hard Drive to an external disk, but at first the Drive was not even recognized. I then tried to disable (temporarily) SMART in the BIOS, and it boots, but when it seems to never enter into Recovery, the CD seems to not work at all anymore..
There is a high chance that I will not even be able to backup my files to my external removable drive. Even if there are few files I have only on this hard drive, I'm sure there's some...
Plus I worked part of the Week-end to finish some very important programming work, I have almost finished, but it's on the Hard drive...
Update (23:00) : After numerous attempts, I found a fantastic utility program called UBCD. It's a Linux tool (a Windows version is available, but is not up-to-date), but it's not a problem when even your OS can't boot... So I booted on a CD created with UBCD's ISO image. Their is a collection of utilities, and some of them are able to recover hard disks failures... (like with late floppy disks). Using it, I was able to reformat the hard drive (quick reformat, I hope to be able to get back some datas after all this mayhem), and launch the XP installation program. Only time will tell if it will work at the end.
However, I will try another tool (called gdbfn) after that. This tool is seemingly able to recover datas on a hard disk, even after a quick reformat... hmm, and after all that, even if it works, I think I will need to change my laptop... I'm still on SMART option disabled, after all, this is not very good, don't you think ?
I'm doomed !!
Windows XP reinstall
Hmm, it is the second time I have to repair the Windows XP installation on my laptop (I'm blogging on my old, old old Windows ME PC).
The first time it was a problem with the file performing the boot (I don't remember its name). It suddenly appeared as a user file directly under C:\ (it was NOT considered by Windows as a system file, nor was it masked) Sure it was a problem with my Windows installation, because it should never be there, and never be visible by default.And But once I made a BIG BIG mistake, I deleted it... Of course, I could not boot anymore. The reinstalling process was not so simple, because when you phone to the Microsoft help center, which is on the XP box, they just tell you to look on Internet. Hmm, how do you do that if your PC does not want to boot (I was in my mother's appartment, and did not have access to internet) ? Typical of MS$ attitude toward customers :-(
OK I could fix that at the end (by myself, no help at all from Microsoft).
This time the PC (which is almost never connected, I'm using my older PC for that) crashed while doing nothing in particular, and crashed again repeatedly after that (hello happy blue screen, and hello again, and again, and again...). After a while, Windows changed the boot sequence itself (while not, isn't it funny ?), trying to boot on the USB device (seems to happen a lot with XP, my cousins had exactly the same problem with their PC).
You probably would tell me that at this point, a reinstallation was the only thing to do... You are right, of course. But reinstalling Windows is not always simple. First you must be aware that you have to type ENTER as new Install, and not R as Repairing, even if you only want to repair the previous installation (tell me if you understand anything).
OK, and after that Windows try to install on \WINDOWS, yes, not C:\WINDOWS, but just \WINDOWS, a directory which does not exist. So you have to change manually the installation directory...
I'm just at this point now :-(. Windows sucks a lot !!!
The first time it was a problem with the file performing the boot (I don't remember its name). It suddenly appeared as a user file directly under C:\ (it was NOT considered by Windows as a system file, nor was it masked) Sure it was a problem with my Windows installation, because it should never be there, and never be visible by default.And But once I made a BIG BIG mistake, I deleted it... Of course, I could not boot anymore. The reinstalling process was not so simple, because when you phone to the Microsoft help center, which is on the XP box, they just tell you to look on Internet. Hmm, how do you do that if your PC does not want to boot (I was in my mother's appartment, and did not have access to internet) ? Typical of MS$ attitude toward customers :-(
OK I could fix that at the end (by myself, no help at all from Microsoft).
This time the PC (which is almost never connected, I'm using my older PC for that) crashed while doing nothing in particular, and crashed again repeatedly after that (hello happy blue screen, and hello again, and again, and again...). After a while, Windows changed the boot sequence itself (while not, isn't it funny ?), trying to boot on the USB device (seems to happen a lot with XP, my cousins had exactly the same problem with their PC).
You probably would tell me that at this point, a reinstallation was the only thing to do... You are right, of course. But reinstalling Windows is not always simple. First you must be aware that you have to type ENTER as new Install, and not R as Repairing, even if you only want to repair the previous installation (tell me if you understand anything).
OK, and after that Windows try to install on \WINDOWS, yes, not C:\WINDOWS, but just \WINDOWS, a directory which does not exist. So you have to change manually the installation directory...
I'm just at this point now :-(. Windows sucks a lot !!!
Saturday, 27 October 2007
On .NET
OK, I personally prefer Java over .NET, maybe because I used it for some time now, so it's easier for me to understand it.
But I don't understand this hype (mainly on the net) about all these new Microsoft technologies. For example .NET is almost described as cross-platform and freely available. But think about it twice, guys:
This list could go on an on... And in the same time, people are saying that Java is not free because 4% of the encumbered JVM code has still to be freed by Sun...
As for me, I will still stay away from all these specific technologies...
But I don't understand this hype (mainly on the net) about all these new Microsoft technologies. For example .NET is almost described as cross-platform and freely available. But think about it twice, guys:
- Only the core part of .NET is an ECMA standard, free from Microsoft patents. Much of the "cool" parts (and much of the base class library) are patented Microsoft technologies, that can not be implemented freely. Mono implements much more than only the core part of this technology (you can do nothing with only the core), but according to the Microsoft - Novell agreement, you can use Mono freely only on Suse.
- People say that .NET is now available on Linux as well as Windows because of Mono, but the Mono team (even if they did some great work) have not implemented all .NET 2.0 yet. .NET 3.0 is available since end of 2006, and .NET 3.5 will ship beginning of 2008. So much for the cross-platform stance...
- Silverlight is a new runtime to build rich-internet client applications... but it is bound to a specific Microsoft technology. I don't like flash very much for the same reason...
- And as for XAML, it does what SVG and XUL already did, but it is another specific (they even defined different keywords for the same concepts). And try to find the XAML specification in the Web, you will find it very hard, because there is none.
This list could go on an on... And in the same time, people are saying that Java is not free because 4% of the encumbered JVM code has still to be freed by Sun...
As for me, I will still stay away from all these specific technologies...
Subscribe to:
Posts (Atom)