[Haskell-cafe] Replacing a shovel (was Re: Endian conversion)
joelr1 at gmail.com
Mon Oct 3 13:01:24 EDT 2005
Well, I can make the problem a little more complex to give you a
better picture of where Haskell fits in...
I need to write a simulation environment to be able to run bots
against a poker server and reproduce this intermittent memory
corruption that happens within it. The poker server is written in C++
on Windows. There's no documentation and all I have is the source
code to the communications layer of the server and an older test tool.
I'm currently in discovery mode as I need to figure out the protocol,
the format of each packet, etc. Haskell should let me write down the
bits of info as I discover them, as a specification of sorts. I would
describe each packet as I learn its format, etc. Work from the top down.
Erlang would be perfect for all the binary parsing but... I
intuitively fell that Haskell will let me "document" the hairy C++
poker server and its non-intuitive ways.
I'm still now sure if I could write a high-performance server in
Haskell, that's the task for another project that I have (the binary
protocol converter/proxy) but in this particular case all I'll be
doing is launching bots in separate threads and have them follow some
scenarious or maybe just decide what to do using their internal
logic. Thus I'm not too concerned with performance.
I'm putting an onus here on clarity and endowing my bots with some
complex brains to be able to explore the hidden crannies of the
target poker server to make it crash. It seems to me that Haskell is
best for bot logic and documentation so it's more like using mars-
rover-technology to explore Mars and getting stuck on a wee bit of
On Oct 3, 2005, at 11:54 AM, Marc Ziegert wrote:
> for just making IO and a little bit-conversion, i would use c++ or
> even c. for such a problem you have to be near the machine, not
> necessarily near mathematical abstraction.
> there exist assembler-commands to flip endians of register-values,
> so i would just search in /usr/include/*/* for a platform
> independent c-function, and either pipe a proxy through such a
> little prog, or patch an existing proxy, like "tinyproxy".
> of course, if you want to make more than just a proxy, or if you
> want to play with different languages, be welcome to use haskell.
> but remind, it is not easy to use high-developed-mars-rover-
> technology to replace a shovel for playing with sand at the beach.
More information about the Haskell-Cafe