First on Gild in the following skills:

I miss a good score for C (424), C#.NET (176), and SQL (173). Maybe answering more questions, starting solving code puzzles will help. Anyway, this is not too bad for now. :)


RapidMiner within KNIME

Finally this is working without (known) problems:

So it handles nominal (String) values (in the first setup within RapidMiner the w values were cluster-0, and cluster-1), we can add/remove new columns (the id column is added), add/remove/generate rows within RapidMiner.
The possible ways to improve:
  • Add views from RapidMiner,
  • Add a configuration dialog to the KNIME node using the RapidMiner UI (with correct input setup),
  • Multiple input/output ports (easy),
  • Documentation,
  • Keep only the necessary amount of data in memory (for the input table),
  • On configuration compute the result column types within KNIME.
I think this would be really cool, as RapidMiner offers some methods (like data validation, Fourier transformation, ...) that are not available within KNIME, although this brings those options to them.
The problem is with the licence of RapidMiner: AGPL, or commercial. I think I have to ask for commercial licence.



Well, at least I did not submitted a wrong solution to the 500 point problem. The sad part is that I have not finished it in time. (First I misread the problems statement and I was trying to compute the number of those configurations where all balls are caught. So bad.)
Maybe next time it will be better.

Wrong idea: ManagedCompiler

Well, it looks like I seldom find the right choice in this project. The ManagedCompiler was a really bad idea to use in the MSBuild task:
  • it allows to use only a single version of Scala
  • the dlls used cannot be freed
  • it cannot be deployed unless the dlls are merged in one dll (not too feasible), or the dlls are signed (not the case currently)
I was aware only the first problem, but I thought it is not a huge problem to deploy a new version of Scala MSBuild task for each version of Scala, although the other problems made it really wrong idea. (I hoped that the ManagedCompiler would make the error reporting easier and the compilation faster. Well, this shall not happen soon.)


SRM 512

Well, my first match at TopCoder was not so successful. I had no time to finish the 1024 point task, and because I have used an inefficient algorithm so my 512 point problem failed the system test with a timeout.
I have tried my implementation for the 1024 problem: same problem, it was not enough efficient, so timed out. That should use dynamic programming and it were fine. So bad.
Maybe next time it will know how are things going.


New version of Eureqa KNIME plugin

Yesterday I have released a new version of Eureqa in KNIME plugin. The main feature of it the date handling (along with a new node), the documentation and the option to wait for the free state of the Eureqa server.
It was fun to work on this, it is really easy to implement things for KNIME. Although adding the documentation is not so much fun.


Problems with the VS SDK

It looks this will not be as easy as I expected to use F# for the Visual Studio plugin (based on IronStudio). It is not just terribly slow, but it looks like the template for creating VS studio language integration is using some parts with dependent types. Yes, I know it might be only my limitations not seeing an obvious solution to this, but it looks like the project classes the ToolsPackage class and the SolutionAdviser classes are too interdependent... I have to think how should I solve this problem.


Not so nice features of F#

Negative Numbers

Given the following code it does not compile:
> let func = fun ()-> 3;;

val func : unit -> int
> func() -1;;

func() -1;;

stdin(5,1): error FS0003: This value is not a function and cannot be applied

Pretty annoying error message, as the problem is with the -1 part, not the func(). (You have to put a space between - and 1.)

I was not able to specify mutually dependent types with attributes on the second class.


New Eureqa client

Today, I have created a new Eureqa client, this time a .NET. Hopefully it is not full with bugs.
It is a pity that there are no documentation comments in the Eureqa API. I guess it is harder for the API users to find out what are the possible options.



Today I have finished the port of the sample Ook language extension from C# to F#. It was interesting, as I was learning both the Visual Studio extension mechanisms, and also F#. The only problem remaining, that the Visual Studio crashes when I try to edit (add a module to the vsixmanifest file) with the VSIX editor.

It was not too easy task, some of the problems:
  • Implementing an interface with events:

    let tagsChangedHandlers = new ResizeArray<EventHandler<SnapshotSpanEventArgs>>()
    interface ITagger<ooktokentag> with
    member this.add_TagsChanged v = tagsChangedHandlers.Add v |> ignore
    member this.remove_TagsChanged v = tagsChangedHandlers.Remove v |> ignore

  • Properly setting up the project file was not so easy either (at least I now know what are the ProjectTypeGuids for C#, F# and the VS SDK)
  • I had to move the TemplateQuickInfoControllerProvider and TemplateQuickInfoController classes to the same file (I am not sure how to do this if both classes have attributes)
  • There are no implicit conversions
  • One of the most annoying thing was when there was an error in my F# code and when I tried to correct it and saved the file the Visual Studio just crashed
  • You have to use refs instead of mutable variables if you would like to get the result from a method (not so surprising, maybe I should read fully the Expert F# 2.0 before further coding)
  • I have not found a simple way to emulate early return from methods
  • It was pretty annoying to find that the unbox gives an int by default, which is not so much fun if you want a uint16, this solved the problem:

    member private this.GetTypeChar(pvaIn : IntPtr) : char =
    let x : uint16 = unbox(Marshal.GetObjectForNativeVariant(pvaIn))

In general it was not so bad. I really liked the way it pushed me to make things more independent and be aware of the dependencies. I think because of the legacy API it is not a perfect fit for F# (and to be honest I have not transformed to a really functional solution), but everything can be worked around.

Although the F# Visual Studio plugin is terribly slow... I was typing and typing when finally I got back the cursor and the code completion and other things. I hope this was just because of an extension for Visual Studio, although except the F# refactor those useful, so those will stay.