[Haskell-beginners] very impure [global] counter
Davi Santos
dps.abc at gmail.com
Sat Jul 23 02:42:58 CEST 2011
Thomas,
the Weka Java library has a myriad of methods I want to call.
To be clear, actually, it comes in three flavours: library, GUI and program.
Unfortunately, as a library, it is unfeasible to map all of them to C or to
a message passing system.
When used as a program (such as I've done in Haskell),
it arranges the methods in a way I can do almost everything just via command
line options.
The downside is that data can be exchanged only by files.
So, I manipulate data in Haskell and send it ready to a file every time I
need Weka to be called. Thousand times, BTW.
Anyway, the perfect and impossible world would be to instantiate java
classes directly in Haskell and use all Weka features.
In time: when I run the program, I create a ramdisk this way:
sudo mount -t tmpfs -o size=1024M tmpfs /tmp/ram/
it works, but makes the program to depend on external settings.
May be I should do that via a Haskell system call also.
I was hoping somebody would point out a secret Jaskell-like solution. :)
Ah, to make myself even clearer, all of this is to avoid programming in
Java, or better, to avoid hunting bugs all day in my own code.
Davi[d]
[the names are the same by here, no problem T. Holubar!]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110722/be43f1b5/attachment.htm>
More information about the Beginners
mailing list