From: William Neumann <wneumann@cs.unm.edu>
To: Oliver Bandel <oliver@first.in-berlin.de>
Cc: caml-list@inria.fr
Subject: Re: Yet another OCaml Webserver?! (was: Re: [Caml-list] Yet another sudoku solver (838 bytes))
Date: Sat, 19 Nov 2005 08:55:57 -0700 [thread overview]
Message-ID: <42E4A821-E220-4463-ABAA-C33F6EDEE833@cs.unm.edu> (raw)
In-Reply-To: <20051119150931.GB324@first.in-berlin.de>
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
next prev parent reply other threads:[~2005-11-19 15:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-19 12:41 Yet another sudoku solver (838 bytes) Marco Maggesi
2005-11-19 15:09 ` Yet another OCaml Webserver?! (was: Re: [Caml-list] Yet another sudoku solver (838 bytes)) Oliver Bandel
2005-11-19 15:41 ` Thomas Fischbacher
2005-11-19 15:55 ` William Neumann [this message]
2005-11-19 16:05 ` Oliver Bandel
2005-11-19 16:29 ` William Neumann
2005-11-19 17:28 ` Jonathan Bryant
2005-11-19 20:09 ` Jonathan Roewen
2005-11-19 20:19 ` Oliver Bandel
2005-11-19 20:32 ` skaller
2005-11-19 20:50 ` Jonathan Roewen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42E4A821-E220-4463-ABAA-C33F6EDEE833@cs.unm.edu \
--to=wneumann@cs.unm.edu \
--cc=caml-list@inria.fr \
--cc=oliver@first.in-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox