Jonathan M Davis:
However, I believe that there is a
scoped template which has been added to std.typecons to take its place.
Currently the replacements for scope e typedef are worse than what they
replace:
http://d.puremagic.com/issues/show_bug.cgi?id=5115
They are better because they are
Adrian Mercieca:
How does D square up, performance-wise, to C and C++ ?
Has anyone got any benchmark figures?
DMD has an old back-end, it doesn't use SSE (or AVX) registers yet (64 bit
version will use 8 or more SSE registers), and sometimes it's slower for
integer programs too. I've seen
On Tue, 04 Jan 2011 17:06:45 -0600, Andrei Alexandrescu wrote:
On 1/4/11 4:49 PM, %u wrote:
There's still the risk of keeping multiple hashes. Consider:
ulong fun(ulong n) { ... }
alias memoize!fun mfun;
mfun(5); // creates hash ulong[int]
mfun(5u); // creates hash ulong[uint] mfun('5');
On 01/05/2011 11:21 AM, Lars T. Kyllingstad wrote:
On Tue, 04 Jan 2011 17:06:45 -0600, Andrei Alexandrescu wrote:
On 1/4/11 4:49 PM, %u wrote:
There's still the risk of keeping multiple hashes. Consider:
ulong fun(ulong n) { ... }
alias memoize!fun mfun;
mfun(5); // creates hash
On Wed, 05 Jan 2011 12:07:50 +0200, Max Samukha wrote:
On 01/05/2011 11:21 AM, Lars T. Kyllingstad wrote:
On Tue, 04 Jan 2011 17:06:45 -0600, Andrei Alexandrescu wrote:
On 1/4/11 4:49 PM, %u wrote:
There's still the risk of keeping multiple hashes. Consider:
ulong fun(ulong n) { ... }
Nick Sabalausky wrote:
Jonathan M Davis jmdavisp...@gmx.com wrote in message
news:mailman.405.1294111260.4748.digitalmar...@puremagic.com...
Well, it's not possible to overload assert, so that sort of thing really
doesn't
work. You're kind of stuck with something JUnit-ish in terms of
Lars T. Kyllingstad wrote:
Sorry for not commenting on earlier iterations of this module. For the
most part, I think it looks pretty good, and I also think it will be
useful. Often, I find myself writing stuff like
assert (someVar == someVal,
text(Wrong value for someVar: ,
On 01/05/2011 12:24 PM, Lars T. Kyllingstad wrote:
On Wed, 05 Jan 2011 12:07:50 +0200, Max Samukha wrote:
On 01/05/2011 11:21 AM, Lars T. Kyllingstad wrote:
On Tue, 04 Jan 2011 17:06:45 -0600, Andrei Alexandrescu wrote:
On 1/4/11 4:49 PM, %u wrote:
There's still the risk of keeping
On Wed, 05 Jan 2011 13:40:05 +0200, Max Samukha wrote:
On 01/05/2011 12:24 PM, Lars T. Kyllingstad wrote:
On Wed, 05 Jan 2011 12:07:50 +0200, Max Samukha wrote:
On 01/05/2011 11:21 AM, Lars T. Kyllingstad wrote:
On Tue, 04 Jan 2011 17:06:45 -0600, Andrei Alexandrescu wrote:
[...]
Overloads
On 01/05/2011 02:12 PM, Lars T. Kyllingstad wrote:
On Wed, 05 Jan 2011 13:40:05 +0200, Max Samukha wrote:
On 01/05/2011 12:24 PM, Lars T. Kyllingstad wrote:
On Wed, 05 Jan 2011 12:07:50 +0200, Max Samukha wrote:
On 01/05/2011 11:21 AM, Lars T. Kyllingstad wrote:
On Tue, 04 Jan 2011
On Tue, 04 Jan 2011 17:56:51 -0500, Jesse Phillips
jessekphillip...@gmail.com wrote:
Steven Schveighoffer Wrote:
On Tue, 04 Jan 2011 11:53:59 -0500, Jesse Phillips
jessekphillip...@gmail.com wrote:
Answering a question over on stack overflow I realized that clear()
has
2 meanings.
Steven Schveighoffer Wrote:
Then the answer I gave was wrong, and am curious what the correct answer
is:
Delete is not to be used with D version 2 and intended to be removed
from the language. What the hold up is, I am not sure. Instead you use a
function, I believe clear(),
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote:
On 1/5/11 12:26 AM, BCS wrote:
* I suggest doing away with abstract unit names (Distance, Time,
Mass etc.) and use concrete plural units (Meters, Seconds,
Kilograms etc) instead. I agree that at a level operating with the
abstract
Hello,
I used to be able to find cases that make object.function(parameters)
syntax rather expressive comparing to the obvious alternative.
In a language without name resolution and namespace/module capabilities
this still solves some problems.
But, in D, do we really need this? IMO this
%u Wrote:
Hi,
I just found out that the 'delete' keyword is intended to be deprecated, and I
wanted to share several opinions about it and make a couple of suggestions:
Hey, I'm the one how started the other thread you saw. It was definitely not
about whether delete should exist or not. I
bearophile bearophileh...@lycos.com wrote in message
news:ig1d3l$kt...@digitalmars.com...
Adrian Mercieca:
How does D square up, performance-wise, to C and C++ ?
Has anyone got any benchmark figures?
DMD has an old back-end, it doesn't use SSE (or AVX) registers yet (64 bit
version will
On 1/5/11, Nick Sabalausky a...@a.a wrote:
And Linux is maybe *slightly* ahead of even Windows because, like bearophile
said, it'll get 64-bit support first..
I wonder if the reason for that is Optlink (iirc it doesn't support
64bit even for DMC, right?).
On 1/5/11 10:32 AM, BCS wrote:
Andrei Alexandrescuseewebsiteforem...@erdani.org wrote:
[snip]
Ah. I see what you are getting at. OTOH I'm still not convinced it's any better.
A quick check shows that 1 light years = 9.4605284 ¡Ñ 10^25
angstroms. A mere 25 orders of magnitude differences,
On Wednesday, January 05, 2011 09:59:08 Andrej Mitrovic wrote:
On 1/5/11, Nick Sabalausky a...@a.a wrote:
And Linux is maybe *slightly* ahead of even Windows because, like
bearophile said, it'll get 64-bit support first..
I wonder if the reason for that is Optlink (iirc it doesn't support
I need some feedback from some of the math nerds on the list.
The functions gammaf and lgammaf are not reentrant and set a global
'signgam' to indicate the sign.
Currently it looks like druntime/phobos2 use these non-reentrant
versions, which could cause some issues in a threaded
bearophile wrote:
Adrian Mercieca:
How does D square up, performance-wise, to C and C++ ? Has anyone got any
benchmark figures?
DMD has an old back-end, it doesn't use SSE (or AVX) registers yet (64 bit
version will use 8 or more SSE registers), and sometimes it's slower for
integer programs
On Wed, 05 Jan 2011 14:53:16 -0500, Walter Bright
newshou...@digitalmars.com wrote:
bearophile wrote:
Often one of the most important things for speed is memory management, D
encourages to heap allocate a lot (class instances are usually on the
heap),
and this is very bad for performance,
On Wed, 05 Jan 2011 11:33:30 -0700, Travis Boucher wrote:
I need some feedback from some of the math nerds on the list.
The functions gammaf and lgammaf are not reentrant and set a global
'signgam' to indicate the sign.
Currently it looks like druntime/phobos2 use these non-reentrant
For people interested in do-it-yourself regarding benchmarking D, there are
some synthetic ones here:
http://is.gd/kbiQM
Many others on request.
Bye,
bearophile
On 2011-01-05 18:37, Nick Sabalausky wrote:
bearophilebearophileh...@lycos.com wrote in message
news:ig1d3l$kt...@digitalmars.com...
Adrian Mercieca:
How does D square up, performance-wise, to C and C++ ?
Has anyone got any benchmark figures?
DMD has an old back-end, it doesn't use SSE (or
Simen kjaeraas:
bearophile bearophileh...@lycos.com wrote:
Simen kjaeraas:
Much more likely would be the idea that has been discussed, of opt-in
non-nullness, by disabling the default constructor for a struct that
wraps a pointer.
I am not sure that's enough.
Could you please
In conclusion (yes I know this normally goes at the bottom) I think we are
wanting different and contradictorily things from this library.
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote:
On 1/5/11 10:32 AM, BCS wrote:
Andrei Alexandrescuseewebsiteforem...@erdani.org wrote:
[snip]
bearophile bearophileh...@lycos.com wrote:
Simen kjaeraas:
bearophile bearophileh...@lycos.com wrote:
Simen kjaeraas:
Much more likely would be the idea that has been discussed, of opt-in
non-nullness, by disabling the default constructor for a struct that
wraps a pointer.
I am not
On 1/5/11 4:06 PM, BCS wrote:
In conclusion (yes I know this normally goes at the bottom) I think
we are wanting different and contradictorily things from this
library.
I almost didn't read the rest thinking that that's all you inserted.
All: there's more, scroll down!
One additional
What I have written was meant for D3.
The example I've shown at the end is a bug found in the Linux kernel, they have
found many similar bugs, even in old code. Notnull types are usually not enough
to catch similar bugs.
The second part of my proposal was not a general typestate
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote:
On 1/5/11 4:06 PM, BCS wrote:
In conclusion (yes I know this normally goes at the bottom) I think
we are wanting different and contradictorily things from this
library.
I almost didn't read the rest thinking that that's all you
Simen kjaeraas:
With the exception of your first example, these require quite a lot of
plumbing in the compiler, and are thus not an alternative for D2 and,
I would say, unlikely for D3. The wrapper struct with a disabled default
constructor is close to possible in D2.
Some plumbing is
On 1/2/11 10:44 PM, Jonathan M Davis wrote:
Okay. As some of you are aware, I created a module with unit testing functions
when I wrote std.datetime, and it really helped with writing the unit tests for
std.datetime. It has been at least somewhat reviewed here previously, and that
has definitely
bearophile bearophileh...@lycos.com wrote:
Simen kjaeraas:
With the exception of your first example, these require quite a lot of
plumbing in the compiler, and are thus not an alternative for D2 and,
I would say, unlikely for D3. The wrapper struct with a disabled default
constructor is close
On 1/5/11 6:09 PM, Andrei Alexandrescu wrote:
[snip]
One more thing. Since assert() is available and useful outside
unittests, I don't see a reason for which assertPred and friends should
only be available during unittesting. I can sure use them in regular code.
Andrei
On Wednesday, January 05, 2011 16:09:17 Andrei Alexandrescu wrote:
On 1/2/11 10:44 PM, Jonathan M Davis wrote:
Okay. As some of you are aware, I created a module with unit testing
functions when I wrote std.datetime, and it really helped with writing
the unit tests for std.datetime. It has
On Wednesday, January 05, 2011 15:40:37 BCS wrote:
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote:
(c) Numeric issues as I described (and no amount of rhetoric will set
that straight; FWIW given the obvious question of scaling you need to
prove it works, not me to prove it doesn't)
I prefer assert, assertFalse, assertEqual and assertNotEqual.
Compare this:
assertPredicate!a b(1 + 1, 3);
To this:
assert(1 + 1 3)
Or to this:
assertLess(1 + 1, 3)
Ok, the first one is more generic. But so the error message for the assertion
failure will be more generic, when you want
On Wednesday, January 05, 2011 18:54:32 Ary Borenszweig wrote:
I prefer assert, assertFalse, assertEqual and assertNotEqual.
Compare this:
assertPredicate!a b(1 + 1, 3);
To this:
assert(1 + 1 3)
Or to this:
assertLess(1 + 1, 3)
Ok, the first one is more generic. But so the
Jonathan M Davis wrote:
On Wednesday, January 05, 2011 15:40:37 BCS wrote:
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote:
(c) Numeric issues as I described (and no amount of rhetoric will set
that straight; FWIW given the obvious question of scaling you need to
prove it works, not me
I'm not sold on the concept. The whole point of this module seems to
offer a way to replace the built-in assertion mechanism with a
customized one, with the sole purpose of giving better error messages.
So we're basically encouraging the use of:
assertPredicate!a b(a, b, message);
On Wednesday 05 January 2011 19:35:13 Michel Fortin wrote:
I'm not sold on the concept. The whole point of this module seems to
offer a way to replace the built-in assertion mechanism with a
customized one, with the sole purpose of giving better error messages.
So we're basically encouraging
Jonathan M Davis jmdavisp...@gmx.com wrote:
On Wednesday, January 05, 2011 15:40:37 BCS wrote:
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote:
(c) Numeric issues as I described (and no amount of rhetoric will set
that straight; FWIW given the obvious question of scaling you need
On 2011-01-05 22:57:00 -0500, Jonathan M Davis jmdavisp...@gmx.com said:
On Wednesday 05 January 2011 19:35:13 Michel Fortin wrote:
I'm not sold on the concept. The whole point of this module seems to
offer a way to replace the built-in assertion mechanism with a
customized one, with the sole
2011/1/6 Walter Bright newshou...@digitalmars.com
bearophile wrote:
Adrian Mercieca:
How does D square up, performance-wise, to C and C++ ? Has anyone got any
benchmark figures?
DMD has an old back-end, it doesn't use SSE (or AVX) registers yet (64 bit
version will use 8 or more SSE
On Wednesday 05 January 2011 21:09:07 Michel Fortin wrote:
On 2011-01-05 22:57:00 -0500, Jonathan M Davis jmdavisp...@gmx.com said:
On Wednesday 05 January 2011 19:35:13 Michel Fortin wrote:
I'm not sold on the concept. The whole point of this module seems to
offer a way to replace the
bearophile bearophileh...@lycos.com wrote in message
news:ig2oe8$ek...@digitalmars.com...
Jacob Carlborg:
And sometimes Mac OS X is *slightly* ahead of the other OSes, Tango has
had support for dynamic libraries on Mac OS X using DMD for quite a
while now. For D2 a patch is just sitting
Nick Sabalausky wrote:
Automatically accepting all submissions immediately into the main line with
no review isn't a good thing either. In that article he's complaining about
MS, but MS is notorious for ignoring all non-MS input, period. D's already
light-years ahead of that. Since D's purely
Long Chang changedal...@gmail.com wrote in message
news:mailman.445.1294291595.4748.digitalmar...@puremagic.com...
2011/1/6 Walter Bright newshou...@digitalmars.com
bearophile wrote:
Adrian Mercieca:
How does D square up, performance-wise, to C and C++ ? Has anyone got
any
benchmark
On Wednesday 05 January 2011 22:04:24 Jonathan M Davis wrote:
On Wednesday 05 January 2011 21:09:07 Michel Fortin wrote:
On 2011-01-05 22:57:00 -0500, Jonathan M Davis jmdavisp...@gmx.com said:
On Wednesday 05 January 2011 19:35:13 Michel Fortin wrote:
I'm not sold on the concept. The
Jonathan M Davis jmdavisp...@gmx.com wrote in message
news:mailman.446.1294293885.4748.digitalmar...@puremagic.com...
What about something like a b c d? If assertPred!() takes more
than two parameters (as I would hope it would), then you could do
something like
assertPred!((a, b, c,
On Mon, 03 Jan 2011 17:23:29 -0500, Adam Ruppe destructiona...@gmail.com
wrote:
Over the weekend, I attacked opDispatch again and found some old
Variant bugs were killed. I talked about that in the Who uses D
thread.
Today, I couldn't resist revisiting a dynamic kind of object, and
made some
On Wednesday 05 January 2011 23:08:21 Nick Sabalausky wrote:
Jonathan M Davis jmdavisp...@gmx.com wrote in message
news:mailman.446.1294293885.4748.digitalmar...@puremagic.com...
What about something like a b c d? If assertPred!() takes more
than two parameters (as I would hope it
On Wednesday 05 January 2011 22:36:32 Jonathan M Davis wrote:
On Wednesday 05 January 2011 22:04:24 Jonathan M Davis wrote:
On Wednesday 05 January 2011 21:09:07 Michel Fortin wrote:
On 2011-01-05 22:57:00 -0500, Jonathan M Davis jmdavisp...@gmx.com said:
On Wednesday 05 January 2011
On Wednesday 05 January 2011 23:08:21 Nick Sabalausky wrote:
Jonathan M Davis jmdavisp...@gmx.com wrote in message
news:mailman.446.1294293885.4748.digitalmar...@puremagic.com...
What about something like a b c d? If assertPred!() takes more
than two parameters (as I would hope it
Thank you for the answer, Vladimir, but it didn't work. The code page of my
console was 949 which supports Korean characters. I tested with french and e
with ` (I don't know its name)was not printed properly. Both wstring dstring
resulted the same problem.
(I think that enum and static enum are the same thing.)
static enum makes no sense, shouldn't it be an error?
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
Jun Wrote:
Thank you for the answer, Vladimir, but it didn't work. The code page of my
console was 949 which supports Korean characters. I tested with french and e
with ` (I don't know its name)was not printed properly. Both wstring dstring
resulted the same problem.
I believe you need to
so:
static enum makes no sense, shouldn't it be an error?
Currently the way D/DMD manages attributes and the like is so sloppy that it
seems trash. But there are always more important things to do and fix, so no
care is given on this problem:
http://d.puremagic.com/issues/show_bug.cgi?id=3934
On 04.01.2011 10:47, Jun wrote:
I'm sorry for posting in the wrong place.
I attached screenshot of my code and the result.
As you can see, Korean letters get changed after compilation.
This problem doesn't happen with user input(from readln() method).
Should I use different type and prefix
Vladimir Panteleev:
This code should really be in the standard library, I think.
File a bug report, with a little patch, then :-)
Bye,
bearophile
Hi,
There's a question that's been lurking in the back of my mind ever since I
learned about D:
How does the GC distinguish code from data when determining the objects to
collect? (E.g. void[] from uint[], size_t from void*, etc.?)
If I have a large uint[], it's practically guaranteed to have
%u wfunct...@hotmail.com wrote:
Hi,
There's a question that's been lurking in the back of my mind ever since
I learned about D:
How does the GC distinguish code from data when determining the objects
to collect? (E.g. void[] from uint[], size_t from void*, etc.?)
This is hardly the
On Wed, 05 Jan 2011 16:56:47 -0500, Simen kjaeraas
simen.kja...@gmail.com wrote:
%u wfunct...@hotmail.com wrote:
If I have a large uint[], it's practically guaranteed to have data that
looks like pointers, and that might cause memory leaks.
If you have allocated a large uint[], most
If you have allocated a large uint[], most likely =C3=ACt will be flagged
NO_SCAN, meaning it has no pointers in it, and the GC will ignore it.
Ah, but the trouble is, no one said that this array has to be in the GC heap! I
could easily have a void[] and a uint[] that both point to non-GC
http://d.puremagic.com/issues/show_bug.cgi?id=5411
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=5411
Andrei Alexandrescu and...@metalanguage.com changed:
What|Removed |Added
Status|RESOLVED|REOPENED
http://d.puremagic.com/issues/show_bug.cgi?id=5130
--- Comment #2 from SHOO zan77...@nifty.com 2011-01-05 07:00:52 PST ---
(In reply to comment #1)
I wonder if printing the type of the delegate is the smartest thing to do.
After all one can always print typeid(...) if that's what's needed.
I
http://d.puremagic.com/issues/show_bug.cgi?id=5413
Summary: (diagnostic): No notification that warnings are
treated as errors
Product: D
Version: D1 D2
Platform: All
OS/Version: All
Status: NEW
Severity:
This is either a compiler bug, or outdated language documentation, but I'm
having some freedom with @safe functions:
* No casting from a pointer type to any type other than void*.
* No modification of pointer values.
* No taking the address of a local variable or function parameter.
Sean Eskapp eatingstap...@gmail.com wrote:
This is either a compiler bug, or outdated language documentation, but
I'm
having some freedom with @safe functions:
* No casting from a pointer type to any type other than void*.
* No modification of pointer values.
* No taking the
On Wed, 05 Jan 2011 15:35:09 +, Sean Eskapp wrote:
This is either a compiler bug, or outdated language documentation, but
I'm having some freedom with @safe functions:
* No casting from a pointer type to any type other than void*. * No
modification of pointer values.
* No
http://d.puremagic.com/issues/show_bug.cgi?id=5411
--- Comment #3 from Ellery Newcomer ellery-newco...@utulsa.edu 2011-01-05
08:50:22 PST ---
(In reply to comment #1)
The selective imports only apply to std.algorithm, not std.stdio.
std.algorithm publicly imports std.stdio, and so the
http://d.puremagic.com/issues/show_bug.cgi?id=5415
Summary: @Safe functions not working
Product: D
Version: D2
Platform: All
URL: http://www.digitalmars.com/d/2.0/function.html#functio
n-safety
OS/Version:
http://d.puremagic.com/issues/show_bug.cgi?id=5414
Summary: Language Reference errors
Product: D
Version: D2
Platform: All
URL: http://www.digitalmars.com/d/2.0/
OS/Version: All
Status: NEW
Severity: normal
http://d.puremagic.com/issues/show_bug.cgi?id=5073
Rob Jacques sandf...@jhu.edu changed:
What|Removed |Added
Keywords||patch, wrong-code
http://d.puremagic.com/issues/show_bug.cgi?id=5411
Peter Alexander peter.alexander...@gmail.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=5416
Summary: null should have a type of its own
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Severity: enhancement
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=5417
Summary: Integer operations promote too much
Product: D
Version: D2
Platform: All
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component:
http://d.puremagic.com/issues/show_bug.cgi?id=5417
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
Status|NEW |RESOLVED
80 matches
Mail list logo