[ANN] New version of RegexKit available
[ANN] New version of RegexKit available
- Subject: [ANN] New version of RegexKit available
- From: "John Engelhart" <email@hidden>
- Date: Sat, 1 Dec 2007 02:58:07 -0500
RegexKit Version 0.5 Beta is now available.
http://regexkit.sourceforge.net/
RegexKit is a BSD licensed Objective-C framework for regular
expressions using the PCRE (v 7.4, latest) regular expression library.
Details of the API can be found in the frameworks extensive
documentation, available online at
http://regexkit.sourceforge.net/Documentation/
Some of the newer Mac OS X 10.5 Leopard features:
64 bit support. Pre-built for ppc, ppc64, i386, and x86_64.
Garbage Collection enabled. Complete support for Leopards Garbage
Collection feature.
Integrated Xcode 3.0 documentation. Get real time API information via
the Research Assistant.
Collection of instruments for Instruments.app.
RegexKit specific DTrace probe points.
Besides the obvious regular expression functionality, users here may
be interested in some of the other aspects of the framework since the
full source code is available under BSD license and can serve as a
working example that you can study, such as:
A starting point for incorporating an open source project within
Xcode. RegexKit uses the PCRE library and includes an Xcode target
which downloads, './configure's, and builds the PCRE library for four
different architectures. While RegexKit happens to build PCRE as a
static library for various reasons, I suspect it would be a
straightforward change to switch to dynamic libraries if thats what
you require.
A working example of Xcode DocSet functionality. Occasionally it's
useful just to peer at another example.
Instruments.app and DTrace functionality. Again, it's useful
sometimes to see working coe. Adding custom DTrace probes to your
application is actually pretty simple, but I'm not aware of any
examples for Mac OS X currently.
If you're not yet familiar with DTrace, you need to become familiar
with it as soon as possible. If you're a fan of Shark (btw, hats off
to the Shark group), you are going to love DTrace. It's difficult to
describe DTrace, but it's extremely versatile. As an example, using
DTrace and the new RegexKit probes, you can easily capture such
information from a shell:
shell% sudo dtrace -Z -q -n 'RegexKit*:::BeginMatch {
self->lookupStartTime = vtimestamp; }' -n 'RegexKit*:::EndMatch {
@lookups = lquantize(((vtimestamp - self->lookupStartTime) / 1000), 0,
20, 1); }'
[after a few seconds...]
^C
value ------------- Distribution ------------- count
3 | 0
4 |@@ 32097
5 |@@@@@@@@@ 149670
6 |@@@@@@@@@@@@@@@@@ 263222
7 |@@@@@@ 95418
8 |@ 9145
9 | 3628
10 |@@ 34463
11 |@@ 33117
12 | 2608
13 | 1849
14 | 1433
15 | 1071
16 | 1032
17 | 888
18 | 674
19 | 568
>= 20 | 4197
This particular example, taken while the frameworks unit tests were
executing, graphs the distribution of the amount of time (in
microseconds) that the framework spent scanning a buffer for a match
of a regular expression. With just a few trivial modifications to the
arguments, you can get average time distributions per regular
expression. Poor performing regular expressions would 'bubble to the
top' so you know where to focus your efforts.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden