mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: tre regex in single regcomp.c file
Date: Thu, 16 Jun 2016 17:12:24 +0200	[thread overview]
Message-ID: <20160616151224.GR22574@port70.net> (raw)
In-Reply-To: <DF02EA42-88C4-4D64-8F1E-25A23B221DF4@gmail.com>

* Julien Ramseier <j.ramseier@gmail.com> [2016-06-16 16:31:12 +0200]:
> Any reason most of the TRE regex sources have been merged in a single 3k lines 
> file (regcomp.c)?

creating internal interfaces for implementing a single
self-contained public function (regcomp) is bad design.

(even if you split the code up, all the code will be
linked together if the public api symbol is referenced
otherwise none of the code will be used, so you just
create linking overhead and headaches around the internal
api between the source files which must obey posix
namespace rules etc.)

> This makes diff-ing them against the original sources[0] very painful.

the original tre is not suitable for libc use, at least
the namespace issues, alloca use, aborts, debug printfs
should be fixed.

there were various other conformance issues and features
not relevant to the c runtime, the parser was rewritten e.g.
http://git.musl-libc.org/cgit/musl/commit/?id=ec1aed0a144b3e00e16eeb142c9d13362d6048e7

so diffing would be painful anyway.

> Would a patch to split them back be accepted?

unlikely

it's much more likely that the regex engine will be rewritten.

> [0] https://github.com/laurikari/tre/
> 
> - Julien


  reply	other threads:[~2016-06-16 15:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 14:31 Julien Ramseier
2016-06-16 15:12 ` Szabolcs Nagy [this message]
2016-06-16 15:25   ` Rich Felker
2016-06-16 15:30     ` Julien Ramseier

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=20160616151224.GR22574@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).