The idea is to give some function of LaTeX’s beamer module to powerpoint, it’s a shareware with a fair price (7€). Give it a shot

]]>http://twinside.free.fr/dotProject/?feed=rss2&p=2260Eq 1.0http://twinside.free.fr/dotProject/?p=220
http://twinside.free.fr/dotProject/?p=220#commentsMon, 11 Oct 2010 12:18:28 +0000Twinsidehttp://twinside.free.fr/dotProject/?p=220Eq 1.0 has been released, it’s now Open Source and available on Github/Hackage and some binary will follow.

]]>http://twinside.free.fr/dotProject/?feed=rss2&p=2200SupaView 1.0http://twinside.free.fr/dotProject/?p=215
http://twinside.free.fr/dotProject/?p=215#commentsSat, 09 Oct 2010 10:39:57 +0000Twinsidehttp://twinside.free.fr/dotProject/?p=215I made a new utility for mac called SupaView, to help you find big files in your hard disk.

The software is free (as in beer for the moment), but donation can be made.

]]>http://twinside.free.fr/dotProject/?feed=rss2&p=2150Eq – Betahttp://twinside.free.fr/dotProject/?p=185
http://twinside.free.fr/dotProject/?p=185#commentsSat, 09 Jan 2010 13:26:03 +0000Twinsidehttp://twinside.free.fr/dotProject/?p=185
I’m publishing the first beta of my project, a tiny formula manipulation program, which can perform manipulation inside source code or as a calculator on the command line. You can find samples, explaination on the documentation page.

The first version only run on Microsoft Windows and Linux in the command line. Next version should be available on OSX, and a GUI for Windows will follow.

]]>http://twinside.free.fr/dotProject/?feed=rss2&p=1790.net using an Haskell DLLhttp://twinside.free.fr/dotProject/?p=167
http://twinside.free.fr/dotProject/?p=167#commentsThu, 15 Oct 2009 22:39:32 +0000Twinsidehttp://twinside.free.fr/dotProject/?p=167hs-dotnet), there is no documentation on how to use Haskell from .net.
An obvious and seemingly easy solution is to go to the Dll route, GHC can make those on windows, .net is good at importing functions in dll. An easy trip in perspective!
]]>
The previous post on Eq! shown an application using a bridge between two worlds : Haskell and .net. While there exists library to use .net objects from Haskell (like hs-dotnet), there is no documentation on how to use Haskell from .net.

An obvious and seemingly easy solution is to go to the Dll route, GHC can make those on windows, .net is good at importing functions in dll. An easy trip in perspective!

The Haskell side

Ok, we assume that we want a function that take string and output string. As Haskell store characters as Unicode code point and .net is good at Unicode, it’s better to stay in Unicode in the whole pipeline. So here’s the haskell code :

wDoForeign is just an helper function to help Marshaling/UnMarshalling the data, wEval wrap the function we really want to expose : evalFoo.

Compiling this code yield to the creation to a stub file containing a function wEval, which can be called in C or C++. I won’t detail how to create the rest of the DLL, as it’s explained in the GHC User’s Guide.

Now, let’s focus on the specifics difference to make if the Dll must be called by .net :

Yes it’s a bit complex, here eqFreeHaskellString, is an exported haskell function which call free. Documentation says I could use the normal C free, but in case of change, it’s safe. The problem is you can’t give simply malloc’ed data to .net. It use another heap, different from the C one, and this is the role of ::CoTaskMemAlloc to allocate data in the good heap. If you don’t do this, the function will crash on return. CoTaskMemAlloc is provided by the Ole32 library, so you must have a copy of it around to link against it.

Ok now the DLL is ready, there’s only the easy part on .net.

The .net side of things

In .net we want to use the DllImport attribute to neatly map haskell function. It’s easy, two lines of code for each function (don’t forget the begin & end runtime you must provide in the DLL (see GHC user guide).

For an unknown reason you can’t simply load the library this way. After some tests in C++, the loader don’t seem to find the imports in the DLL, the only way to do it seems to use the LoadLibrary and GetProcAdress to retrieve the functions adress manually and then call it. It’s pretty straightforward in C++, but not so in .net, so here’s a sample :

And that’s it. Now, you can normally call ExportedFunc from .net without any problems. You must remember to do the same for the begin/end runtime, call them first from .net, and you’re done. The gates to Haskell paradise just pop’ed in your Visual Studio world.

Conclusion

So good luck combining the best of both worlds. I don’t know if the DLL problem with GHC (version 6.10.4) will be fixed soon or not, but in the mean time you can still use this workaround.

There is an interesting follow-up in the stackoverflow question explaining how to avoid all my problems in a much nicer way. To bad I didn’ find it myself…

It will be released with CTags 5.8 which should be released soon (within the month). CTags can be downloaded on his website.
The final version of the parser is cleaner in it’s output tags and their contexts, and is fully usable with vim and the taglist plugin.

]]>http://twinside.free.fr/dotProject/?feed=rss2&p=1460OCaml support for Ctagshttp://twinside.free.fr/dotProject/?p=135
http://twinside.free.fr/dotProject/?p=135#commentsTue, 07 Apr 2009 16:49:59 +0000Twinsidehttp://twinside.free.fr/dotProject/?p=135Hi, today a post to share a customized version of Ctags with OCaml support. If you don’t know what Ctags is, you may not want to look at this post. Unless you really, really (did I mention really?) want to be bored.

For the few Windows OCaml user, just download ctags57_with_ocaml, and put it where you want, maybe in your Windows/System32 folder, or in your path.

For Linux/Unix/other user, the patch to integrate OCaml is
here. It must be applied against Ctag 5.7 avaible there. Then you have to use some magic incantation to extract/apply patch/compile/install. Good luck with that =]

With a bit of luck, next official version of ctags will support OCaml out of the box.