caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: Sylvain Le Gall <sylvain@le-gall.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Re: ANNOUNCE: ocaml bitmatch (Erlang-style bitstrings for OCaml)
Date: Wed, 2 Apr 2008 08:05:27 +0100	[thread overview]
Message-ID: <20080402070526.GA1497@annexia.org> (raw)
In-Reply-To: <slrnfv5k4i.tll.sylvain@gallu.homelinux.org>

On Wed, Apr 02, 2008 at 12:17:22AM +0000, Sylvain Le Gall wrote:
> I have two questions:
> * do you think you can get something efficient (part of the paper you
>  are linking, talked about performance)

There's lots of room for optimization in the current code.  It mainly
aims to be working.

> * is there a way to retain part of the data structure... E.g TCP/UDP
>  packet has the same IP part (the one you describe) + a TCP/UDP
>  header...

At the moment you cannot define and reuse patterns, but it's certainly
something which could be added (as in micmatch).

However it is easy to modify the examples so they match over TCP and
UDP packets, either by adding a second whole case to the top level
bitmatch, or by adding a sub-bitmatch matching the payload.

Rich.

-- 
Richard Jones
Red Hat


  parent reply	other threads:[~2008-04-02  7:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-01 22:42 Richard Jones
2008-04-02  0:17 ` Sylvain Le Gall
2008-04-02  0:20   ` [Caml-list] " Raoul Duke
2008-04-02  7:05   ` Richard Jones [this message]
2008-04-02 12:49     ` ANNOUNCE: ocaml bitmatch 0.2 Richard Jones

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=20080402070526.GA1497@annexia.org \
    --to=rich@annexia.org \
    --cc=caml-list@inria.fr \
    --cc=sylvain@le-gall.net \
    /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;
as well as URLs for NNTP newsgroup(s).