Archive for the ‘Raydo’ Category

Raydo.ORG

Saturday, January 19th, 2008

Ok, so I have Raydo.org now. This will be the mailing list site eventully. I don’t know when I will get it up and running , so for now, keep sending emails directly to my email account.

French & Chinese support in Raydo

Friday, January 11th, 2008

    Well, support for the GUI anyway. Command line stuff is still going to be command line stuff. For that you want it to be english. ( Have you ever tried Chinese on the command line ? )

    I am supporting French and Traditional Chinese first, because those are two of the languages that I can read/write. ( Besides English of course. )

    I originally tried using .po files for translation. That was OK, but not great. It is the supported method for wxWidgets, but that does not mean it is a great method. .po files are based on gettext, and gettext is “sub optimal”. Feel free to translate “sub optimal” as ’sucks’.

    So today, I went with a dynamic translation engine. The translations are defined at runtime using a C++ class. What is special about defining translations at runtime ?

               Plugins.

    When you define plugins, without a run time engine, you cannot add translations without editing the translation file for the entire app. So here is an example, say you write a plugin to pull the 13 week range on an equity. In chinese (HK) , that would be 13週波幅. How many people would want to edit a .po file that would get overwritten by the next update of the software? No one of course.

    By moving the plugin translations to the plugin definition file, we can get UTF8 translations that will not get overwritten by new updates. Coolness.

Plugin’s & Threadsafe functions

Wednesday, January 9th, 2008

    So on to plugin’s in Raydo. The computation functions I am trying to make it easier to add computation, almost like ‘plugin’s. I say ‘plugin’, and when I say plugin, I mean compiled into the code. Doing binary ‘plugins’ is just crazy. The only reason to do that is closed source code. If you have the source like Raydo, it makes much more sense to compile it in.

    So when you write a plugin, you have to worry about threads. The computations are done out in the threads, so you have to be careful to use thread safe functions.

    Certain C++ Standard Library functions from C are particular problems because they hold internal state between calls.

  • asctime
  • ctime
  • gmtime
  • localtime
  • rand
  • strtok
  • rand & strtok will probably not be a problem. The time functions (asctime, ctime, gmtime, localtime) you may end up trying to use but you shouldn’t.

        Some vendors ( like HP ) have thread-safe replacements for these functions, with different names and arguments, but you should realize that these are not portable. You can write thread-safe implementations using thread-specific storage, if you want to.

        If you really want something portable & thread safe, I suggest you use the Boost replacements for the problem functions. I will go into why I am not including Boost in the build at a later time.

    Options House API

    Friday, January 4th, 2008

    Well, I just spoke to someone ( who shall remain nameless ) at OptionsHouse, and they are not going to have an API for a while. They have lot of requests for an API, but I think they are a little too busy to push it out for traders. They do not have an estimate, but you know how estimates are anyway.

    They are good guys over at OptionsHouse, and I am sure they will get the API out sooner rather than later.

    The Problem with Threads

    Thursday, January 3rd, 2008

    The Problem with Threads is a paper written by the Edward A. Lee, the Chair of EE @ University of California at Berkeley

    I especially liked one line from his conclusion,

    Concurrent programming models can be constructed that are much more predictable and understandable than threads. They are based on a very simple principle: deterministic ends should be accomplished with deterministic means.

    Until that day comes, we will still muddle along with pthreads. Once again, threads in Windows is a pain!

    ( Well not really a pain, just why do they have to be different ? )

    C++ Datastore

    Saturday, December 29th, 2007

         I cleaned up the C++ interfaces a little bit. This image below is only for the C++ interfaces.

        I am concentrating on Postgres, sqlite, Oracle and MySQL. Postgres and SQlite have the most project friendly licenses, and MySQL / Oracle have the least friendly licenses.

        However, the cluster aspects of MySQL and Oracle are awesome. Something the other two do not have.

    ( I know Postgres has clustering, but it is not the same )

    Raydo compiled on Windows box

    Friday, December 28th, 2007

       So it only took….not much time to get a Raydo building under windows.

       It was very easy, much easier than I expected. Usually you expect some complication to crop up. Fresh installs are so nice, and worked perfectly this time.

        One caveat, read the instructions!! After installing VC++ 8, you have to make some configuration changes when installing the platform SDK. It boggles the mind that they (they as in M$) could not make those changes transparent when installing. That would make it much easier.

        So I checked Raydo at of the svn repository. and hit build. It compiled straight out of the box. Always nice when that happens.

        I do not know if Windows will be as supported as much as Linux or OSX. Actually I do know. It will not be supported as much. The difference is now, if there is a question or problem on windows, I can at least debug.

    Blah. I still hate windows.

    Laptop donation for the ’cause’

    Wednesday, December 26th, 2007

        As everyone knows, I am not the greatest fan of Microsoft windows. I prefer an operation system that does not eat up all your time to just to get it to work.

        So I have a HP tc1100 now for windows development. It is a two year old machine running a six year old “operating system”. It is a nice little box.

        So now I will do more development for the Windows platform.

    GUI, part 2

    Wednesday, December 19th, 2007

    So more on the GUI. I develop the GUI on Ubuntu, using GTK2 and wxWidgets. wxWidgets 2.6.x is supported on the mac out of the box which is a good thing. So for most systems ( Unix and Mac ) GTK2 is the way to go. Now that Sun is supporting GTK2 to Solaris, so it is a safe bet for most Unixes. My other options are GTK1, Motif and X11 for Unix.

    The good thing about GTK+ is that it isn’t based on Xt. The bad thing about GTK+ is that it doesn’t have access to the X resources database. This is a large positive, with a smaller negative, so I think it is better than using Xt based toolkits.

    Now, Ubuntu derivivatives may or may not work as well. KUbuntu with GTK2 installed do not work. I think whoever made KUbuntu screwed up the GTK+ libs. Understandable, since the purpose of KUbuntu is to not use Gnome.

    I use wxWidgets 2.6.x builds now. It serves me well, and I do not have any plan to move to wxWidgets 2.8. I plan to move to wxWidgets 3.0 when it comes out next year ( normal disclaimer applies )

    As for Windows, whatever. I will get to it when I get to it.

    First draft of CLA ( Contributor License Agreement )

    Sunday, December 9th, 2007

    Thanks to the advice of a person who shall remain nameless, I have posted the first draft of the Contributor License Agreement in the svn source tree. Unfortunately , I am not shipping any more tarballs until the other legal stuff gets settled.

    The doc is in the doc folder as Raydo Contributor License Agreement.txt

    As with anything of this nature, this is a work in progress.