Version française
Home     About     Download     Resources     Contact us    
Browse thread
Yet another sudoku solver (838 bytes)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: William Neumann <wneumann@c...>
Subject: Re: Yet another OCaml Webserver?! (was: Re: [Caml-list] Yet another sudoku solver (838 bytes))
On Nov 19, 2005, at 8:09 AM, Oliver Bandel wrote:

> But where's the OCaml programmers community (is there something  
> like that?),
> showing that it also goes in other ways?
>
> When asking here for databases and other stuff, often comes the
> answer: try to use <xyz> library and write a C-binding.
>
> Nice idea, but too often most of the libraries are buggy and
> many of them struggle with Buffer Overflow (and similar) problems.
>
> For example pcre-lib, curl-lib, a lot of the graphic-format libs, ...
> ...even cryptographic libs... where you send your credit card
> informations through the network... well....

Well, there are a number of reasons for this.  The biggest, I would  
guess is time.  Seriously, why would I want to re-implement, say,  
libcurl when one already exists and works well?  I don't have enough  
hours in the day to do that kind of evangelism *and* my day job.   
Number two on the list is that OCaml just isn't well suited to some  
of those domains.  I do crypto for a living (though more at the  
research level than the implementation level), and I know why things  
like cryptokit rely on C routines... Crypto and pure OCaml don't work  
well together because you don't get direct access to 32 and/or 64 bit  
words for manipulation.  It's less of a hassle when you just need  
simple operations like XORs which you can do on strings without too  
much overhead, but when you need something like addition mod 2^32,  
well... Int32 is a bit of a pain in the ass.

OCaml's great for the higher level stuff.  I just wrote a few Merkle- 
Damgard type constructions using stream parsers, and it's all very  
compact, pretty and elegant.  But if I want a final hash with a  
decent throughput, chances are I'll have to implement my compression  
function in C.  And you know what... that's OK.  Best tool for the  
job is usually a good motto.

William D. Neumann

"I eat T-bone steaks, I lift barbell plates, I'm sweeter than a
German chocolate cake. I'm the reflection of perfection, the number
one selection. I'm the man of the hour, the man with the power, too
sweet to be sour. The ladies' pet, the men's regret, where what you
see is what you get, and what you don't see, is better yet."

          --Superstar Billy Graham