analogous annotations for variables and struct
members. Right now, it's like being able to declare function parameters
as const pointers, but not being able to have const pointers as variables
or in structs, and any assignments to pointers silently casting away const.
Nicholas Clark
uses to do this is described here:
http://perl5.git.perl.org/perl.git/blob/HEAD:/perl.h#l2178
I suspect it's portable.
Nicholas Clark
should
be buggy. (Advice from Klortho #11912). The perl 5 Linux hints file suggests
that one needs to add -we147 to enable correct floating point behaviour.
The best test that I'm aware of for is it NaN or Inf? is val != val * 0;
Then, NaN is val != val, +Inf is val 0, -Inf is val 0;
Nicholas
there,
and gcc may well take advantage of the (honest, validated) attribute_nonnulls
to optimiser better.
Well, it all works as long as the test coverage is good enough.
We've not had any further problems with them in Perl 5 since I added assertions
and fixed all the errors they found.
Nicholas
that. See here:
http://public.activestate.com/cgi-bin/perlbrowse?top=33291show_recent=Show+Change+Log
Nicholas Clark
/decNumber/decNumber-icu-361.zip
The prominent page has gone, but it seems to be referenced here still:
http://secure.alphaworks.ibm.com/tech/decnumber
Nicholas Clark
, icc) and hence the #defined CONST_STRING
# won't be found by the compiler.
Shouldn't there be a coding standard to enforce *that*?
Nicholas Clark
Complexity attacks: http://www.cs.rice.edu/~scrosby/hash/
Any mathematician is welcome to prove that this makes things worse, however.
Scott A Crosby and Dan S Wallach appear to be computer scientists. Will they
do? :-)
Nicholas Clark
it may not matter.
I don't see any harm to just omitting it here.)
Me neither. Surely
if (0.0 != -0.0) {
fputs(Your compiler is broken!, stderr);
}
(not tested. Particularly, not tested on icc with the optimiser enabled)
Nicholas Clark
, but wouldn't cause a lot of other people who have 2.13
to 2.17 installed to need to upgrade.
Nicholas Clark
that are not case
sensitive. You just can't know.
Nicholas Clark
data structures more compatible, so the older versions of Storable can
serialize them properly.
Storable is dual life, so you could just depend on the version of Storable in
5.8.4 (2.12, I think). That way, anyone with an earlier Perl need only upgrade
Storable.
Nicholas Clark
of emit_is8bit(disp)
doesn't appear to matter to the Cif statement itself.
So shouldn't it be re-written as
if (!base !(i scale)) {
emit_is8bit(disp);
?
Nicholas Clark
calls.
Nicholas Clark
working source code that compiles, makes test everywhere, and
is released (and distributed the world over) suddenly could stop working some
years in the future when someone compiles it on a compiler with optimisations
not available currently.
Nicholas Clark
, switch to UTF-32)
Everything is still fixed width, with linear access times.
Nicholas Clark
On Sat, Jan 05, 2008 at 12:19:14PM -0600, Patrick R. Michaud wrote:
On Sat, Jan 05, 2008 at 11:09:57AM +, Nicholas Clark wrote:
On Sat, Jan 05, 2008 at 02:11:35AM -0800, chromatic wrote:
Jarkko's view was that if he were doing Perl 5 Unicode again he would opt
for
fixed width 32 bit
fixes it. i submitted a patch, but for some reason it hasn't made
it to RT or the list...
Do the structures actually overlap, or is this necessary band aid for a subtly
broken compiler?
Nicholas Clark
.
Andy: Go on, tell me.
Andy: You can't.
particle: of course i can't
particle: in accessors, self should be constant
The equivalent would break in Perl 5, where the objects can change internal
private state as a side effect of being read. For example, conversions are
cached.
Nicholas Clark
, pointer aliasing rules are the big
thing I still don't feel confident about. I've very rarely seen them
covered.
Is there a good explanation anywhere online?
Nicholas Clark
, er, warning, about comparison.
Because I would be so bold as to say that the constant zero would be
exempted from any useful warning about floating point equality check.
Nicholas Clark
have access to the machine currently. (It's turned off)
I'll report a new bug if I regain access and get an opportunity to retest.
Nicholas Clark
.
Nicholas Clark
(``ISO C90'').
Nicholas Clark
work. However,
it's
a good place to start as it tends to run much faster than the inchworm code
here.
Would memchr() be of help here?
Nicholas Clark
On Thu, Sep 20, 2007 at 02:13:11PM -0700, chromatic wrote:
Hoist that declaration up a bit, or C89 compilers will complain. Is there a
GCC warning that we could enable here?
-Wdeclaration-after-statement
Sadly it can't be made an error.
Nicholas Clark
if the success object (the common case) is a singleton?
Implementation wise, is returning another reference to a singleton just one
C pointer copy?
(In which case, there is too much of a hit on interrogating the object?)
Nicholas Clark
implements the sign function for I, N, BigInt and Complex
numbers.
What should the sign of a NaN be? undef?
Nicholas Clark
in the face of NaNs.
Nicholas Clark
On Wed, Aug 22, 2007 at 05:40:45PM +0200, Paul Cochrane wrote:
We can leave it out, but then we'll never be able to compile Parrot with
Solaris CC.
I just tried to compile Parrot with suncc and everything works (the
CC isn't cc
(C++ compiler versus C compiler)
Nicholas Clark
bytes, where actually only 10
are significant, and 2 are noise)
I can't think of a clean, portable, efficient way to test that a floating
point variable is zero other than == 0.0;
Nicholas Clark
, NULL, 1, too many arguments in
runops_args);
}
The string is only copied after this check is made.
So shouldn't that 8 be sizeof(new_sig) - 1 ?
Right now there are two magic numbers, one of which is actually off by one,
and no clear linking of the two.
Nicholas Clark
-by-coincidence
rather than really NULL.
Without seeing any more than the code above, I'd guess that that's what the
Coverity tool actually triggered on, and so the question is should the guard
be on pdb-file-source ?
Nicholas Clark
On Sun, Jul 08, 2007 at 10:07:34PM +, [EMAIL PROTECTED] wrote:
It seems to run correctly on gentoo running on a sparc.
Is gentoo sparc an architecture with 64 bit pointers (and longs)?
Nicholas Clark
definitely support adding an explicit return in this function. Just
ensure that it gets the right value as its argument.
Nicholas Clark
Modified since when?
Since the last time the user ran Configure.
(For the default test run)
I think that this will produce minimal false positives and false negatives,
for identifying which files have been locally edited.
Nicholas Clark
for the concatenating with trick)
Nicholas Clark
On Fri, Nov 07, 2008 at 03:28:40PM -0700, chromatic wrote:
On Friday 22 June 2007 02:07:32 Nicholas Clark wrote:
We have a lot of string_from_cstring() calls with constant second
parameters and third parameters of 0 that could use updating. There's no
sense in calling strlen() all
rid of all of
those ugly header guard macros? If so, I would argue to keep it for
maintenance reasons, regardless of any performance benefits.
No, because you cannot rely on it working.
Nicholas Clark
about signed
integer overflow. (It's undefined behaviour. It will bite))
Nicholas Clark
! :-)
Thanks.
Nicholas Clark
' ) {
This is something I really approve of, but it can't be done unconditionally.
Is the gcc version kept somewhere convenient in the configure data structures?
Nicholas Clark
) Borland's compiler to do with this sort of
thing.
Nicholas Clark
becomes visible to
more
than one thread (by being shared) then its vtable is changed to an alternative
vtable that performs locking?
And how often does the type of a PMC change, such that its internal data layout
changes? In Perl 5 this morphing happens everywhere, but in Parrot?
Nicholas Clark
it from being complied with a seriously fastidious
compiler on a platform where the system headers are also suitably compliant.
Surprisingly Solaris is not such a platform. [Solaris is very carefully
engineered in so many other ways, that I had expected that it would be]
Nicholas Clark
) !isspace((int) *(c))) \
(c)++; \
while (isspace((int) *(c))) \
(c)++; }
Nicholas Clark
On Wed, May 16, 2007 at 09:36:48AM -0700, jerry gay wrote:
good comments... but why keep both function and macro? which would you
prefer keeping over the other, and why? i can't understand why both
exist.
Yes, sorry, I sort of missed that part.
Er. I don't know. One deserves to die.
Nicholas
void *in;
} launder;
You assign to in, then read from out. Et voila, you launder the const away.
Nicholas Clark
On Thu, May 10, 2007 at 03:33:41AM -0500, Joshua Isom wrote:
On May 9, 2007, at 4:01 PM, Nicholas Clark wrote:
So, !s-strlen does scan as quickly and easily.
To some, but it isn't as easy to just literally read. Not s's strlen
is a lot different than STRING_IS_EMTPY. Since the code
STRING_IS_NULL_OR_EMPTY() ?
Although, visually it's distracting, and it's still about as much typing as
the macros' contents.
Nicholas Clark
On Wed, May 09, 2007 at 01:06:49PM -0700, chromatic wrote:
On Wednesday 09 May 2007 12:53:57 Nicholas Clark wrote:
On Tue, May 01, 2007 at 04:41:22PM -0700, [EMAIL PROTECTED] wrote:
+
+#define STRING_IS_NULL(s) ((s) == NULL)
+#define STRING_IS_EMPTY(s) !(int)(s)-strlen
Does !(int
coding standards.
Also, did it have any local modifications?
And why does Parrot needs its own malloc?
Nicholas Clark
On Tue, Apr 24, 2007 at 11:43:48PM -0700, Joshua Juran wrote:
Parrot is also widely portable, much like perl is. This one's
especially important to me, as I still work with Mac OS 9.
Parrot builds on Mac OS 9? Cool
It's not listed in PLATFORMS, so I wasn't sure.
Nicholas Clark
for
its extended build process. I'm not sure if this is significant.
Nicholas Clark
On Wed, Apr 25, 2007 at 03:32:54PM +, Herbert Snorrason wrote:
On 25.4.2007, at 15:06, Nicholas Clark wrote:
So Parrot is the odd one out here, for relying on an external
language for
its extended build process. I'm not sure if this is significant.
Isn't Parrot more comparable to JVM
a PBC).
Whoa. I meant, have some kinda miniparrot that can run a PBC but is pure
ANSI C or something. Long day...
I like this approach. It feels viable.
Nicholas Clark
== nan isn't true, so that ought to be a portable test for a NaN
(although Intel's compiler's default optimisation setting is buggy in this
respect)
I don't know of a good way to test for inf.
Nicholas Clark
, I'm tempted to add it even now to Perl 5 to enforce what
remains of our sanity)
Nicholas Clark
feature.
I thought the same, but I've never seen clear documentation as to how to do it.
Nicholas Clark
On Thu, Apr 12, 2007 at 01:50:09PM -0500, Joshua Isom wrote:
On Apr 12, 2007, at 9:29 AM, Nicholas Clark wrote:
My view of this is something along these lines. You can use any
function you want at all, but if it's not documented as part of the
supported API, there's nothing saying I
?
Well, it seems to be unused anywhere that Google's tentacles reach to:
http://www.google.com/codesearch?q=become_parent
Nicholas Clark
.
Not that that really helps track it down.
Nicholas Clark
and function ptr
might be different, but ...)
One can't assign (void *) 0 to a function pointer.
It's not allowed under (strict) ANSI C (and therefore those picky compilers)
So that NULLfunc is correct. But personally I prefer assigning plain 0.
Nicholas Clark
On Fri, Apr 06, 2007 at 11:55:49AM -0700, jerry gay wrote:
On 4/6/07, Nicholas Clark [EMAIL PROTECTED] wrote:
If it's a crash in S_regmatch that's usually due to a regular expression
going exponential and exhausting the C stack. In turn, that's usually due
to
nested capturing parentheses
about whether the release is vanilla and unmolested when I
got a bug report.
Nicholas Clark
it was converted to unsigned,
and then converted to a larger unsigned type, and so is now an unremarkable
positive integer, rather than all bits set.
Nicholas Clark
are people even checking things in that fail coding standards?
Nicholas Clark
* there's a better word than this, but it slips my mind. It's not
Presbyterian, but it's a word I'd associate with it.
portability, whereas the world is resigned to
long long.
[I say resigned, because long long breaches one of the axioms of C89, that
long is the longest integer type]
Nicholas Clark
suitably grumpy about this?
If so, do we have a machine capable of smoking them?
And is it viable (or good) for parrot smoke failures to reach this list, much
like most people configure their Perl 5 smokers to send the black smoke to
p5p?
Nicholas Clark
?
Nicholas Clark
the optimised version is efficient
on non-word aligned strings, and whether the optimised version doesn't have
a higher start cost. Either is better* than the current, and I don't have
a Win32 platform to test on, so can't test a change.
Nicholas Clark
* Yes, even in a non-speed critical area, because having
crash. :-)
Nicholas Clark
that does have
outgoing mail enabled, or won't reveal your work e-mail address, or whatever)
Nicholas Clark
call here.
Nicholas Clark
valid? Do they confuse most code?
Nicholas Clark
the guarantee of C3.
It might be that I'm confused, misremembering or undercaffeinated.
Nicholas Clark
prefixed by an underscore.
This was a historical mistake that Microsoft has now rectified in VS
2005.
IIRC ANSI have reserved every function name starting str, so this is correct.
They've also reserved every type ending _t, but it seems that few pay
attention to that either.
Nicholas Clark
it be viable to make the default with gcc to be -g -O2?
Either way could try to skew third party benchmarks (and the unpublished
private benchmarks we don't even know about) in Parrot's favour.
Nicholas Clark
,
which suggest that the timing is going to be different this year.
Nicholas Clark
- Forwarded message from LH [EMAIL PROTECTED] -
From: LH [EMAIL PROTECTED]
To: Summer-Admin-Announce-2006 [EMAIL PROTECTED]
Subject: GSoC 2007 is ON!!!
Date: Fri, 16 Feb 2007 04:04:19 -
User-Agent: G2/1.0
X
, '@stages'
+
+$I0 = exists adverbs['before']
+unless $I0 goto next_test
+ position = 'before'
What happens if you add a stage with the same name as an existing stage?
Is ambiguity acceptable?
Nicholas Clark
On Fri, Feb 16, 2007 at 12:42:24AM +0200, Allison Randal wrote:
Nicholas Clark wrote:
What happens if you add a stage with the same name as an existing stage?
It gets added twice. You might repeat a stage like optimize_tree or
display_benchmarks after each transformation
or may not be successful).
HP already provide access to many things, but not Tru64:
http://www.testdrive.hp.com/
Nicholas Clark
, but again it's avoiding anything out of band,
or seemingly-out-of-band.
Nicholas Clark
are robust against SEGVing the interpreter
or hitting abort()
Nicholas Clark
slop in expected output is a good idea.
It introduces (more) complexity into the tests, which increases the chance
for false positives (errors in the tests reporting themselves as failures,
distracting developers) and false negatives (tests not spotting real errors)
Nicholas Clark
:-(
I would think that Sparc Solaris, building 64 bit, would be the best single
target to aim for to increase portability spread.
Nicholas Clark
On Tue, Dec 19, 2006 at 04:30:08PM -0800, Allison Randal wrote:
Nicholas Clark wrote:
To seek clarification - having those as global settings for cperl isn't
likely to be an issue? Or having them in editor blocks?
I meant globally.
Ah. There have been times when it would have been fun
the same
standard. (assuming that you're meaning to set the defaults for C and Perl
formatting modes, rather than to use custom parrot-mode variants)
Nicholas Clark
On Tue, Dec 19, 2006 at 01:08:14PM -0800, Allison Randal wrote:
Nicholas Clark wrote:
On Tue, Dec 19, 2006 at 10:05:46AM -0800, Allison Randal wrote:
to every source file, and a maintenance burden. Both vim and emacs allow
top-level settings of these preferences, which is a more appropriate
using g++ as the linker means that
all the C++ runtime libraries come in correctly)
Nicholas Clark
:
[EMAIL PROTECTED]: cochrane | 2006-11-17 09:46:39 +0100
[lib] Converted 2-arg form of open() to 3-arg form.
Are you sure you want to do this to bundled external files?
Nicholas Clark
have re-drafted the standard to allow 3 or 2 digit exponents,
instead of just 2, and made this non-buggy)
any case, how does the Perl test suite not fail on Win32?
As to a useful answer, er, I don't know. Sorry.
Nicholas Clark
(uh, somebody please
think of a less naff name) that generates missing keyed methods for
those PMCs that want them.
To me that feels like a hack. The current rather-too-static dispatch (to me)
seems to be the bug, and the thing that needs fixing.
Nicholas Clark
as an
optimization, but we'll never eliminate runtime construction. That
When serialising data structures, is parrot going to need to serialise any
anonymous or otherwise run time generated classes?
If so, isn't this mechanism going to be capable of achieving compile time
class generation?
Nicholas Clark
, but any JIT or AOT can see that they are, and treat them
accordingly.
Nicholas Clark
/06/30/33b6b8a1.html
for a description of the problem (contains profanity, as does quite a bit of
that site). Sadly for some mailers attachments are the only way to go.
Nicholas Clark
for the endianness of the word order in memory to differ
from the endianness of the byte order within those words.
Nicholas Clark
mean that both could check out the same testsuite, and both could
commit back to it.
Nicholas Clark
if the repositories were different, instead of simply one being a subtree of
another. That was all.
Nicholas Clark
On Sun, Jul 30, 2006 at 10:45:29PM -0700, jerry gay wrote:
don't forget about negative-not-a-number, and the quiet (or signaling)
Ah yes. that oxymoron.
I've never yet seen the reasons for why it exists at all. Does anyone have
a URL?
Nicholas Clark
1 - 100 of 800 matches
Mail list logo