[#3986] Re: Principle of least effort -- another Ruby virtue. — Andrew Hunt <andy@...>

> Principle of Least Effort.

14 messages 2000/07/14

[#4043] What are you using Ruby for? — Dave Thomas <Dave@...>

16 messages 2000/07/16

[#4139] Facilitating Ruby self-propagation with the rig-it autopolymorph application. — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/07/20

[ruby-talk:03941] Possibly relevant Windows-related Perl stuff (sprintf tests, Unicode input).

From: Conrad Schneiker <schneik@...>
Date: 2000-07-12 05:39:16 UTC
List: ruby-talk #3941
Hi,

These are a couple of items I came across when looking at what the
competition is up to, which may be of some relevance to present/future
Ruby work on Windows platforms.

## sprintf tests ##

Sarathy pointed out a problem with Dominic Dunlop's excellent sprintf
tests: Not all systems produce output with exactly two digits of
exponent information, so many tests fail on Windows systems, for
example. (The C standard only requires that there be at least two
digits.) Dominic said he would think about what to do about this, but
has not said anything about it since then.

## Unicode Input Solution ##

Simon reported a clever suggestion from the Perl-Unicode mailing list.
Some systems, such as Windows, store system data like directory entries
in unicode. You'd like to flag such inputs as UTF8 when they are read
in. The suggestion was to piggyback this atop the tainting mechanism. At
present, there's a macro which, if taint mode is on, turns on the taint
flag on the input scalar for every input Perl reads from any source.
Simon posted a patch which extends the macro so that if use utf8 is in
scope, and the string is a valid UTF8 string, Perl will also set the
UTF8 flag on the scalar. Since presumably everything is already checked
for taintedness when it's read in, this automatically puts the check for
UTF8-ness everywhere also.

--
Conrad Schneiker
(This note is unofficial and subject to improvement without notice.)



In This Thread

Prev Next