Caml Weekly News
[Posted February 17, 2004 by cook]
| From: |
| Alan Schmitt <alan.schmitt-AT-polytechnique.org> |
| To: |
| lwn-AT-lwn.net |
| Subject: |
| Attn: Development Editor, Latest Caml Weekly News |
| Date: |
| Tue, 17 Feb 2004 09:21:15 +0100 |
Hello,
Here is the latest Caml Weekly News, for the week of 10 to 17 February, 2004.
1) Resizable arrays
==============================================================================
1) Resizable arrays
------------------------------------------------------------------------------
** Chris GauthierDickey asked and Markus Mottl answered:
> I'm writing a function that is using an array that can be dynamically
> resized. I'm wondering if it would be better to just catch an exception
> if we attempt to go out of bounds in the array (at which point I resize
> the array), or if I should test the size using an if-then-else before I
> enter the main body of my function and resize then.
You might be interested in the RES-library, which also implements
resizable arrays while staying compatible to the Array-module:
http://www.oefai.at/~markus/home/ocaml_sources.html#RES
Bounds checking probably makes less difference to the performance of
your algorithm than you might expect.
==============================================================================
Using folding to read the cwn in vim 6+
------------------------------------------------------------------------------
Here is a quick trick to help you read this CWN if you are viewing it using
vim (version 6 or greater).
:set foldmethod=expr
:set foldexpr=getline(v:lnum)=~'^=\\{78}$'?'<1':1
zM
If you know of a better way, please let me know.
==============================================================================
Old cwn
------------------------------------------------------------------------------
If you happen to miss a CWN, you can send me a message
(alan.schmitt@polytechnique.org) and I'll mail it to you, or go take a look at
the archive (http://pauillac.inria.fr/~aschmitt/cwn/) or the RSS feed of the
archives (http://pauillac.inria.fr/~aschmitt/cwn/cwn.rss). If you also wish to
receive it every week by mail, just tell me so.
==============================================================================
Alan Schmitt
--
The hacker: someone who figured things out and made something cool happen.
.O.
..O
OOO
(
Log in to post comments)