Re: Removed?

2011-02-15 Thread Daniel Gibson
Am 15.02.2011 01:05, schrieb bearophile: Nemerle and Factor removed from Wikipedia? What are those deletionists doing? http://www.reddit.com/r/programming/comments/fkt7t/nemerle_factor_alice_ml_and_other_programming/ Is D page too at risk of deletion? (Months ago those sick people have deleted

Re: Removed?

2011-02-15 Thread Andrew Wiley
On Tue, Feb 15, 2011 at 1:56 AM, Daniel Gibson metalcae...@gmail.com wrote: Am 15.02.2011 01:05, schrieb bearophile: Nemerle and Factor removed from Wikipedia? What are those deletionists doing?

Re: Removed?

2011-02-15 Thread Walter Bright
Andrew Wiley wrote: No, they have a point. That philosophy doesn't work because at some point, there's too much information. Too much to edit to make sure it meets standards, too much to browse (if the links are bad enough to parody with the Wikipedia game, how bad would they be with unlimited

Re: Removed?

2011-02-15 Thread Daniel Gibson
Am 15.02.2011 09:24, schrieb Walter Bright: Andrew Wiley wrote: No, they have a point. That philosophy doesn't work because at some point, there's too much information. Too much to edit to make sure it meets standards, too much to browse (if the links are bad enough to parody with the Wikipedia

Re: 'live' testing style

2011-02-15 Thread spir
On 02/15/2011 02:42 AM, Jonathan M Davis wrote: On Monday, February 14, 2011 17:26:26 Don wrote: Jonathan M Davis wrote: On Monday, February 14, 2011 12:49:11 Tomek Sowiński wrote: spir napisał: * Why isn't testList a unittest block? Using named funcs, I can switch on off specific test

Re: 'live' testing style

2011-02-15 Thread Jonathan M Davis
On Tuesday 15 February 2011 00:46:25 spir wrote: On 02/15/2011 02:42 AM, Jonathan M Davis wrote: On Monday, February 14, 2011 17:26:26 Don wrote: Jonathan M Davis wrote: On Monday, February 14, 2011 12:49:11 Tomek Sowiński wrote: spir napisał: * Why isn't testList a unittest block?

Re: 'live' testing style

2011-02-15 Thread Lars T. Kyllingstad
On Sun, 13 Feb 2011 23:03:06 +0100, spir wrote: 1. Named unittests allowing test suites in the form of (just an example): unittest test1 { ... } unittest test2 { ... } unittest test3 { ... } unittest { test1; test2; test3; } /Unnamed/ unittests

Re: tooling quality and some random rant

2011-02-15 Thread Lars T. Kyllingstad
On Mon, 14 Feb 2011 15:03:01 -0500, Steven Schveighoffer wrote: I think linker errors in general are one of those things that few people understand, and most cope with just pattern recognition Oh, I see _deh_start, probably forgot main() with no regards to logic. :) Please get out of my

Re: greatest common divisor implementation

2011-02-15 Thread Andrei Alexandrescu
On 2/14/11 10:38 PM, Matthias Walter wrote: 1. Are there any further suggestions on the implementations / Did I forget something? Are benchmarks done with BigInt and long too? (If you test bigints you need bigger numbers too, and to test that the results are correct). Yeah, so I did tests

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Jacob Carlborg
On 2011-02-15 01:08, Walter Bright wrote: dsimcha wrote: Now that DMD has a 64-bit beta available, I'm working on getting a whole bunch of code to compile in 64 mode. Frankly, the compiler is way too freakin' pedantic when it comes to implicit conversions (or lack thereof) of array.length.

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 02:28 AM, Jonathan M Davis wrote: On Monday, February 14, 2011 17:06:43 spir wrote: On 02/15/2011 01:56 AM, Jonathan M Davis wrote: On Monday, February 14, 2011 16:30:09 Andrej Mitrovic wrote: Here's something I've noticed (x86 code): void main() { ulong size = 2;

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 02:55 AM, Nick Sabalausky wrote: Nick Sabalauskya@a.a wrote in message news:ijcm8d$1lf5$1...@digitalmars.com... spirdenis.s...@gmail.com wrote in message news:mailman.1648.1297732015.4748.digitalmar...@puremagic.com... Rename size-t, or rather introduce a meaningful standard

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 02:58 AM, Nick Sabalausky wrote: Jonathan M Davisjmdavisp...@gmx.com wrote in message news:mailman.1650.1297733226.4748.digitalmar...@puremagic.com... On Monday, February 14, 2011 17:06:43 spir wrote: Rename size-t, or rather introduce a meaningful standard alias? (would vote

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 03:11 AM, Don wrote: Nick Sabalausky wrote: Jonathan M Davis jmdavisp...@gmx.com wrote in message news:mailman.1650.1297733226.4748.digitalmar...@puremagic.com... On Monday, February 14, 2011 17:06:43 spir wrote: Rename size-t, or rather introduce a meaningful standard alias?

Re: LAPACK/BLAS/SciD Windows

2011-02-15 Thread %fil
Caligo Wrote: How about Eigen? http://eigen.tuxfamily.org/index.php?title=Main_Page I've used it extensively in my C++ projects, and I'm very pleased. Last time I counted, Eigen was about 10-15k lines of C++ code. It's all templates, and it might be the perfect project to translate to

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 03:26 AM, Jonathan M Davis wrote: On Monday, February 14, 2011 18:19:35 Nick Sabalausky wrote: Jonathan M Davisjmdavisp...@gmx.com wrote in message news:mailman.1655.1297736016.4748.digitalmar...@puremagic.com... I believe that t is for type. The same goes for types such as

Re: tooling quality and some random rant

2011-02-15 Thread spir
On 02/15/2011 03:47 AM, bearophile wrote: Don: But still, cache effects are more important than instruction scheduling in 99% of cases. I agree. CPUs have prefetching instructions, but D doesn't expose them as intrinsics. A bit more higher level visibility for those instructions may be

Re: Removed? (Wikipedia deletionism)

2011-02-15 Thread spir
On 02/15/2011 02:25 AM, bearophile wrote: D is much much more notable than Nemerle, Alice ML, Pure, Nosica, Kiev, Einstein, Alma-0, Joy, Zonnon, Y, Cat, Fancy, Ambi, Ptolemy, Mythryl, COMIT, Ioke, EASY, Aikido, A+, Adenine, Afnix, Bsisith, ChinesePython, AngelScript, Algae, Agena, Taxi,

Re: tooling quality and some random rant

2011-02-15 Thread bearophile
Walter: Huh, I simply could never find a document about how to use those which gave me any comfortable sense that the author knew what he was talking about. http://www.agner.org/optimize/ -- Don: A problem with that, is that the prefetching instructions are vendor-specific.

Re: Removed?

2011-02-15 Thread spir
On 02/15/2011 08:56 AM, Daniel Gibson wrote: Am 15.02.2011 01:05, schrieb bearophile: Nemerle and Factor removed from Wikipedia? What are those deletionists doing? http://www.reddit.com/r/programming/comments/fkt7t/nemerle_factor_alice_ml_and_other_programming/ Is D page too at risk of

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 05:50 AM, Andrej Mitrovic wrote: The question is then do you want to be more consistent with the language (abolish size_t and make something nicer), or be consistent with the known standards (C99 ISO, et all.). I'd vote for a change, but I know it will never happen (even though it

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 06:51 AM, Walter Bright wrote: Andrej Mitrovic wrote: The question is then do you want to be more consistent with the language (abolish size_t and make something nicer), or be consistent with the known standards (C99 ISO, et all.). I'd vote for a change, but I know it will never

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 03:44 AM, Piotr Szturmaj wrote: spir wrote: Rename size-t, or rather introduce a meaningful standard alias? (would vote for Natural) Maybe ptrint and ptruint? If ptr means pointer, then it's wrong: size-t is used for more than that, I guess. Strangely enough, while size may

Re: Removed?

2011-02-15 Thread spir
On 02/15/2011 09:11 AM, Andrew Wiley wrote: When you open that door, useful content gets drowned in floods of things like useless biographies and advertisements for things no one has heard of. But who says which are useful? You? Soft-bots? Academics? (who, as Bearophile said, are the ones

Re: Removed?

2011-02-15 Thread spir
On 02/15/2011 09:43 AM, Daniel Gibson wrote: Am 15.02.2011 09:24, schrieb Walter Bright: Andrew Wiley wrote: No, they have a point. That philosophy doesn't work because at some point, there's too much information. Too much to edit to make sure it meets standards, too much to browse (if the

Re: 'live' testing style

2011-02-15 Thread spir
On 02/15/2011 10:00 AM, Lars T. Kyllingstad wrote: On Sun, 13 Feb 2011 23:03:06 +0100, spir wrote: 1. Named unittests allowing test suites in the form of (just an example): unittest test1 { ... } unittest test2 { ... } unittest test3 { ... } unittest { test1;

Re: Removed? (Wikipedia deletionism)

2011-02-15 Thread Aaron Smith
Vladimir Panteleev Wrote: On Tue, 15 Feb 2011 03:00:59 +0200, Aaron Smith m...@pathway.org wrote: Thank god we have TDPL, otherwise the D page would quickly lose this battle. D is much much more notable than Nemerle, Alice ML, Pure, Nosica, Kiev, Einstein, Alma-0, Joy, Zonnon, Y,

Re: Removed?

2011-02-15 Thread Andrei Alexandrescu
On 2/15/11 5:23 AM, spir wrote: Agreed. Very much agreed, in fact. Wikipedia is /the/ place for innovation to get a chance; probably the only one, even. (esp in our money-driven civilisation) As an aside, it's quite remarkable that such a movement and others similar originated in the

Re: Removed? (Wikipedia deletionism)

2011-02-15 Thread Aaron Smith
spir Wrote: On 02/15/2011 02:25 AM, bearophile wrote: D is much much more notable than Nemerle, Alice ML, Pure, Nosica, Kiev, Einstein, Alma-0, Joy, Zonnon, Y, Cat, Fancy, Ambi, Ptolemy, Mythryl, COMIT, Ioke, EASY, Aikido, A+, Adenine, Afnix, Bsisith, ChinesePython, AngelScript,

Re: Removed? (Wikipedia deletionism)

2011-02-15 Thread Kagamin
Vladimir Panteleev Wrote: Wikipedia articles must prove that they are notable enough, and people unfamiliar with the subject must be able to verify it. Otherwise, it fosters self-promotion. Wikipedia has rules which may seem unfair or unbalanced at times, but they're mostly logical

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Daniel Gibson
Am 15.02.2011 12:50, schrieb spir: On 02/15/2011 03:44 AM, Piotr Szturmaj wrote: spir wrote: Rename size-t, or rather introduce a meaningful standard alias? (would vote for Natural) Maybe ptrint and ptruint? If ptr means pointer, then it's wrong: size-t is used for more than that, I guess.

Re: tooling quality and some random rant

2011-02-15 Thread Don
Walter Bright wrote: Don wrote: In hand-coded asm, instruction scheduling still gives more than half of the same benefit that it used to do. But, it's become ten times more difficult. You have to use Agner Fog's manuals, not Intel/AMD. For example: (1) a common bottleneck on all Intel

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Daniel Gibson
Am 15.02.2011 11:30, schrieb spir: On 02/15/2011 02:58 AM, Nick Sabalausky wrote: Jonathan M Davisjmdavisp...@gmx.com wrote in message news:mailman.1650.1297733226.4748.digitalmar...@puremagic.com... On Monday, February 14, 2011 17:06:43 spir wrote: Rename size-t, or rather introduce a

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Piotr Szturmaj
spir wrote: On 02/15/2011 03:44 AM, Piotr Szturmaj wrote: spir wrote: Rename size-t, or rather introduce a meaningful standard alias? (would vote for Natural) Maybe ptrint and ptruint? If ptr means pointer, then it's wrong: size-t is used for more than that, I guess. Strangely enough,

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Steven Schveighoffer
On Mon, 14 Feb 2011 20:58:17 -0500, Nick Sabalausky a@a.a wrote: Jonathan M Davis jmdavisp...@gmx.com wrote in message news:mailman.1650.1297733226.4748.digitalmar...@puremagic.com... On Monday, February 14, 2011 17:06:43 spir wrote: Rename size-t, or rather introduce a meaningful standard

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Adam Ruppe
Sometimes I think we should troll the users a little and make a release with names like so: alias size_t TypeUsedForArraySizes_Indexes_AndOtherRelatedTasksThatNeedAnUnsignedMachineSizeWord; alias ptrdiff_t TypeUsedForDifferencesBetweenPointers_ThatIs_ASignedMachineSizeWordAlsoUsableForOffsets;

Re: How mature is std.socket?

2011-02-15 Thread lurker
Yes, 2.51: Digital Mars D Compiler v2.051 Copyright (c) 1999-2010 by Digital Mars written by Walter Bright Documentation: http://www.digitalmars.com/d/2.0/index.html Usage: ...

Re: Removed? (Wikipedia deletionism)

2011-02-15 Thread spir
On 02/15/2011 01:22 PM, Aaron Smith wrote: Vladimir Panteleev Wrote: On Tue, 15 Feb 2011 03:00:59 +0200, Aaron Smithm...@pathway.org wrote: Thank god we have TDPL, otherwise the D page would quickly lose this battle. D is much much more notable than Nemerle, Alice ML, Pure, Nosica, Kiev,

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 02:01 PM, Daniel Gibson wrote: Am 15.02.2011 12:50, schrieb spir: On 02/15/2011 03:44 AM, Piotr Szturmaj wrote: spir wrote: Rename size-t, or rather introduce a meaningful standard alias? (would vote for Natural) Maybe ptrint and ptruint? If ptr means pointer, then it's

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 02:36 PM, Steven Schveighoffer wrote: On Mon, 14 Feb 2011 20:58:17 -0500, Nick Sabalausky a@a.a wrote: Jonathan M Davis jmdavisp...@gmx.com wrote in message news:mailman.1650.1297733226.4748.digitalmar...@puremagic.com... On Monday, February 14, 2011 17:06:43 spir wrote:

Re: Removed? (Wikipedia deletionism)

2011-02-15 Thread spir
On 02/15/2011 01:36 PM, Aaron Smith wrote: spir Wrote: On 02/15/2011 02:25 AM, bearophile wrote: D is much much more notable than Nemerle, Alice ML, Pure, Nosica, Kiev, Einstein, Alma-0, Joy, Zonnon, Y, Cat, Fancy, Ambi, Ptolemy, Mythryl, COMIT, Ioke, EASY, Aikido, A+, Adenine, Afnix,

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Adam Ruppe
spir wrote: press play Since size_t is an alias, you wouldn't see it's name anywhere except the source code.

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Daniel Gibson
Am 15.02.2011 15:18, schrieb spir: On 02/15/2011 02:01 PM, Daniel Gibson wrote: Am 15.02.2011 12:50, schrieb spir: On 02/15/2011 03:44 AM, Piotr Szturmaj wrote: spir wrote: Rename size-t, or rather introduce a meaningful standard alias? (would vote for Natural) Maybe ptrint and ptruint?

Re: Removed? (Wikipedia deletionism)

2011-02-15 Thread Daniel Gibson
Am 15.02.2011 15:11, schrieb spir: On 02/15/2011 01:36 PM, Aaron Smith wrote: spir Wrote: On 02/15/2011 02:25 AM, bearophile wrote: D is much much more notable than Nemerle, Alice ML, Pure, Nosica, Kiev, Einstein, Alma-0, Joy, Zonnon, Y, Cat, Fancy, Ambi, Ptolemy, Mythryl, COMIT, Ioke, EASY,

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Steven Schveighoffer
On Tue, 15 Feb 2011 09:26:21 -0500, spir denis.s...@gmail.com wrote: On 02/15/2011 02:36 PM, Steven Schveighoffer wrote: Hey, bikeshedders, I found this cool easter-egg feature in D! It's called alias! Don't like the name of something? Well you can change it! alias size_t wordsize;

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Jens Mueller
spir wrote: On 02/15/2011 02:01 PM, Daniel Gibson wrote: Am 15.02.2011 12:50, schrieb spir: On 02/15/2011 03:44 AM, Piotr Szturmaj wrote: spir wrote: Rename size-t, or rather introduce a meaningful standard alias? (would vote for Natural) Maybe ptrint and ptruint? If ptr means pointer,

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Iain Buclaw
== Quote from dsimcha (dsim...@yahoo.com)'s article Now that DMD has a 64-bit beta available, I'm working on getting a whole bunch of code to compile in 64 mode. Frankly, the compiler is way too freakin' pedantic when it comes to implicit conversions (or lack thereof) of array.length.

Re: shared libraries in D

2011-02-15 Thread Johannes Pfau
Iain Buclaw wrote: Came across this obscure documentation in the tldp. Libraries should export initialization and cleanup routines using the gcc __attribute__((constructor)) and __attribute__((destructor)) function attributes. This is what gdc was doing anyway. Constructor routines are

Re: tooling quality and some random rant

2011-02-15 Thread Don
bearophile wrote: Walter: Huh, I simply could never find a document about how to use those which gave me any comfortable sense that the author knew what he was talking about. http://www.agner.org/optimize/ -- Don: A problem with that, is that the prefetching instructions

Re: inlining or not inlining...

2011-02-15 Thread Stewart Gordon
On 11/02/2011 06:35, Walter Bright wrote: snip I hate not being able to force functions to be inline. A consequence is that you can't fully interface certain APIs without an extra .lib over what would be needed in C(++). You cannot force inlining in C(++) either. The inline keyword is only a

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread foobar
Steven Schveighoffer Wrote: On Tue, 15 Feb 2011 09:26:21 -0500, spir denis.s...@gmail.com wrote: On 02/15/2011 02:36 PM, Steven Schveighoffer wrote: Hey, bikeshedders, I found this cool easter-egg feature in D! It's called alias! Don't like the name of something? Well you can

appendToFront semantics

2011-02-15 Thread Torarin
I've been experimenting with Andrei's buffered input range and noticed that appendToFront(size_t n) may benefit from a slightly different definition. Andrei describes it as appending at most n elements to the front. But if you change that to at least, the range can ask the underlying stream to

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread bearophile
Daniel Gibson: void main() { size_t x; writefln(typeof(x).stringof); } try this, too ;-) Because it's an alias the information about size_t gone at runtime and the real type is shown. uint in your case. (Here - gdc on amd64 - it's ulong). I think both typeof() and stringof are

Re: appendToFront semantics

2011-02-15 Thread Adam Ruppe
One problem with at least is it might have to wait for two packets to come off the network interface; could be fairly slow. The at most means it will take whatever is available without overflowing your buffer - it will never wait if there is any data available.

Re: appendToFront semantics

2011-02-15 Thread Torarin
2011/2/15 Adam Ruppe destructiona...@gmail.com: One problem with at least is it might have to wait for two packets to come off the network interface; could be fairly slow. The at most means it will take whatever is available without overflowing your buffer - it will never wait if there is any

Re: Removed?

2011-02-15 Thread Walter Bright
Andrei Alexandrescu wrote: As an aside, it's quite remarkable that such a movement and others similar originated in the Capitalist world. History will tell, but I see it as possible for the spirit to stay put. It's the internet that has made large scale collaboration and cooperation

Re: Removed?

2011-02-15 Thread Walter Bright
spir wrote: That guy, if sincere, thought the content he asked for deletion was not useful, certainly, since it apparently did not get any mention from third-party sources. (actually, there lots of articles about some of those Pls, but no one had cared about linking to them, so that guy was

Re: Removed? (Wikipedia deletionism)

2011-02-15 Thread Walter Bright
Aaron Smith wrote: although he's not widely considered a genius unlike the authors of Factor and LuaJIT and Walter Bright. Actually, I'm quite famous for being incompetent.

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Walter Bright
spir wrote: Having to constantly explain that _t means type, that size does not mean size, what this type is supposed to mean instead, what it is used for in core and stdlib functionality, and what programmers are supposed to use it for... isn't this a waste of our time? This, only because the

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Walter Bright
foobar wrote: 1. that size_t is inconsistent with D's style guide. the _t suffix is a C++ convention and not a D one. While it makes sense for [former?] C++ programmers it will confuse newcomers to D from other languages that would expect the language to follow its own style guide. It's a C

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Rainer Schuetze
I think David has raised a good point here that seems to have been lost in the discussion about naming. Please note that the C name of the machine word integer was usually called int. The C standard only specifies a minimum bit-size for the different types (see for example

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread so
I disagree that the discussion is pointless. On the contrary, the OP pointed out some valid points: 1. that size_t is inconsistent with D's style guide. the _t suffix is a C++ convention and not a D one. While it makes sense for [former?] C++ programmers it will confuse newcomers to D from

Re: shared libraries in D

2011-02-15 Thread Jacob Carlborg
On 2011-02-15 16:02, Johannes Pfau wrote: Iain Buclaw wrote: Came across this obscure documentation in the tldp. Libraries should export initialization and cleanup routines using the gcc __attribute__((constructor)) and __attribute__((destructor)) function attributes. This is what gdc was

ref const(T) the same as C++'s const T?

2011-02-15 Thread Peter Alexander
Do D const references work the same as C++'s? i.e. - Can they bind to rvalues? - Do they extend the life of rvalues? If they do, are there any differences from C++? If they don't, how do I pass large structs into a function efficiently? Thanks

Re: appendToFront semantics

2011-02-15 Thread Adam Ruppe
Torarin: But isn't the reason you're supplying a value to appendToFront that you do want a specific amount? I figured it was just to give precision control over memory usage...

Re: tooling quality and some random rant

2011-02-15 Thread Lutger Blijdestijn
retard wrote: Mon, 14 Feb 2011 20:10:47 +0100, Lutger Blijdestijn wrote: retard wrote: Mon, 14 Feb 2011 04:44:43 +0200, so wrote: Unfortunately DMC is always out of the question because the performance is 10-20 (years) behind competition, fast compilation won't help it. Can you

Re: tooling quality and some random rant

2011-02-15 Thread Walter Bright
Don wrote: Walter Bright wrote: Don wrote: In hand-coded asm, instruction scheduling still gives more than half of the same benefit that it used to do. But, it's become ten times more difficult. You have to use Agner Fog's manuals, not Intel/AMD. For example: (1) a common bottleneck on all

Re: ref const(T) the same as C++'s const T?

2011-02-15 Thread Jonathan M Davis
On Tuesday, February 15, 2011 11:48:25 Peter Alexander wrote: Do D const references work the same as C++'s? i.e. - Can they bind to rvalues? - Do they extend the life of rvalues? If they do, are there any differences from C++? If they don't, how do I pass large structs into a function

Re: ref const(T) the same as C++'s const T?

2011-02-15 Thread Peter Alexander
On 15/02/11 7:55 PM, Jonathan M Davis wrote: On Tuesday, February 15, 2011 11:48:25 Peter Alexander wrote: Do D const references work the same as C++'s? i.e. - Can they bind to rvalues? - Do they extend the life of rvalues? If they do, are there any differences from C++? If they don't, how

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 08:05 PM, Walter Bright wrote: foobar wrote: 1. that size_t is inconsistent with D's style guide. the _t suffix is a C++ convention and not a D one. While it makes sense for [former?] C++ programmers it will confuse newcomers to D from other languages that would expect the

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 03:25 PM, Daniel Gibson wrote: Am 15.02.2011 15:18, schrieb spir: On 02/15/2011 02:01 PM, Daniel Gibson wrote: Am 15.02.2011 12:50, schrieb spir: On 02/15/2011 03:44 AM, Piotr Szturmaj wrote: spir wrote: Rename size-t, or rather introduce a meaningful standard alias? (would

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Steven Schveighoffer
On Tue, 15 Feb 2011 14:15:06 -0500, Rainer Schuetze r.sagita...@gmx.de wrote: I think David has raised a good point here that seems to have been lost in the discussion about naming. Please note that the C name of the machine word integer was usually called int. The C standard only

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Nick Sabalausky
bearophile bearophileh...@lycos.com wrote in message news:ijefj9$25sm$1...@digitalmars.com... Daniel Gibson: void main() { size_t x; writefln(typeof(x).stringof); } try this, too ;-) Because it's an alias the information about size_t gone at runtime and the real type is shown.

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:ijeil4$2aso$3...@digitalmars.com... spir wrote: Having to constantly explain that _t means type, that size does not mean size, what this type is supposed to mean instead, what it is used for in core and stdlib functionality, and

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Nick Sabalausky
Jens Mueller jens.k.muel...@gmx.de wrote in message news:mailman.1694.1297781518.4748.digitalmar...@puremagic.com... I read that the compiler is free to return whatever name of an alias, i.e. either the name of the alias or the name of the thing it was aliased to (which can be again an

Re: Removed?

2011-02-15 Thread spir
On 02/15/2011 07:44 PM, Walter Bright wrote: Andrei Alexandrescu wrote: As an aside, it's quite remarkable that such a movement and others similar originated in the Capitalist world. History will tell, but I see it as possible for the spirit to stay put. It's the internet that has made large

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Daniel Gibson
Am 15.02.2011 19:10, schrieb bearophile: Daniel Gibson: void main() { size_t x; writefln(typeof(x).stringof); } try this, too ;-) Because it's an alias the information about size_t gone at runtime and the real type is shown. uint in your case. (Here - gdc on amd64 - it's

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Walter Bright
Nick Sabalausky wrote: Walter Bright newshou...@digitalmars.com wrote in message news:ijeil4$2aso$3...@digitalmars.com... spir wrote: Having to constantly explain that _t means type, that size does not mean size, what this type is supposed to mean instead, what it is used for in core and

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Daniel Gibson
Am 15.02.2011 22:20, schrieb Nick Sabalausky: Walter Bright newshou...@digitalmars.com wrote in message news:ijeil4$2aso$3...@digitalmars.com... spir wrote: Having to constantly explain that _t means type, that size does not mean size, what this type is supposed to mean instead, what it is

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Nick Sabalausky
Adam Ruppe destructiona...@gmail.com wrote in message news:ije0gi$18vo$1...@digitalmars.com... Sometimes I think we should troll the users a little and make a release with names like so: alias size_t TypeUsedForArraySizes_Indexes_AndOtherRelatedTasksThatNeedAnUnsignedMachineSizeWord; alias

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Daniel Gibson
Am 15.02.2011 20:15, schrieb Rainer Schuetze: I think David has raised a good point here that seems to have been lost in the discussion about naming. Please note that the C name of the machine word integer was usually called int. The C standard only specifies a minimum bit-size for the

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Nick Sabalausky
Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.vqx78nkceav7ka@steve-laptop... size_t works, it has a precedent, it's already *there*, just use it, or alias it if you don't like it. One could make much the same argument about the whole of C++. It works, it has a

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Daniel Gibson
Am 15.02.2011 22:48, schrieb Nick Sabalausky: Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.vqx78nkceav7ka@steve-laptop... size_t works, it has a precedent, it's already *there*, just use it, or alias it if you don't like it. One could make much the same argument

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Michel Fortin
On 2011-02-15 16:33:33 -0500, Walter Bright newshou...@digitalmars.com said: Nick Sabalausky wrote: Walter Bright newshou...@digitalmars.com wrote in message news:ijeil4$2aso$3...@digitalmars.com... spir wrote: Having to constantly explain that _t means type, that size does not mean size,

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Daniel Gibson
Am 15.02.2011 23:00, schrieb Nick Sabalausky: so s...@so.so wrote in message news:op.vqyk3emumpw3zg@so-pc... I disagree that the discussion is pointless. On the contrary, the OP pointed out some valid points: 1. that size_t is inconsistent with D's style guide. the _t suffix is a C++

Re: ref const(T) the same as C++'s const T?

2011-02-15 Thread Jonathan M Davis
On Tuesday, February 15, 2011 12:35:31 Peter Alexander wrote: On 15/02/11 7:55 PM, Jonathan M Davis wrote: On Tuesday, February 15, 2011 11:48:25 Peter Alexander wrote: Do D const references work the same as C++'s? i.e. - Can they bind to rvalues? - Do they extend the life of

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Jonathan M Davis
On Monday, February 14, 2011 18:11:10 Don wrote: Nick Sabalausky wrote: Jonathan M Davis jmdavisp...@gmx.com wrote in message news:mailman.1650.1297733226.4748.digitalmar...@puremagic.com... On Monday, February 14, 2011 17:06:43 spir wrote: Rename size-t, or rather introduce a

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Daniel Gibson
Am 15.02.2011 23:29, schrieb Nick Sabalausky: Daniel Gibson metalcae...@gmail.com wrote in message news:ijett7$1ie$5...@digitalmars.com... Am 15.02.2011 23:00, schrieb Nick Sabalausky: so s...@so.so wrote in message news:op.vqyk3emumpw3zg@so-pc... Funny thing is the most important argument

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Adam Ruppe
Daniel Gibson wrote: Probably it would be helpful if size_t was a proper type that can't be mixed with other types in dangerous ways without explicit casting. Bad idea: once you insert an explicit cast, you now have a *hidden* bug on the new platform instead of a compile error.

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 10:45 PM, Nick Sabalausky wrote: Adam Ruppedestructiona...@gmail.com wrote in message news:ije0gi$18vo$1...@digitalmars.com... Sometimes I think we should troll the users a little and make a release with names like so: alias size_t

Re: Removed?

2011-02-15 Thread Walter Bright
spir wrote: And this itself was made possible by the fact software /re/production costs are neglectable compared to production ones (human competence, time motivation). The same applies indeed, even more since the numeric revolution, to most of human knowledge and creation. Result of music

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Daniel Gibson
Am 15.02.2011 23:43, schrieb Adam Ruppe: Daniel Gibson wrote: Probably it would be helpful if size_t was a proper type that can't be mixed with other types in dangerous ways without explicit casting. Bad idea: once you insert an explicit cast, you now have a *hidden* bug on the new platform

Re: ref const(T) the same as C++'s const T?

2011-02-15 Thread Lutger Blijdestijn
Jonathan M Davis wrote: ... Personally, it wouldn't hurt my feelings any to have const ref take temporaries. I do not understand why it's a problem. But Andrei insists that it is. Presumably Walter agrees, but I don't know. They could very well be right and that it's overall better _not_ to

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Nick Sabalausky
so s...@so.so wrote in message news:op.vqyk3emumpw3zg@so-pc... I disagree that the discussion is pointless. On the contrary, the OP pointed out some valid points: 1. that size_t is inconsistent with D's style guide. the _t suffix is a C++ convention and not a D one. While it makes sense for

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 10:40 PM, Daniel Gibson wrote: Am 15.02.2011 20:15, schrieb Rainer Schuetze: I think David has raised a good point here that seems to have been lost in the discussion about naming. Please note that the C name of the machine word integer was usually called int. The C standard

Re: appendToFront semantics

2011-02-15 Thread Andrei Alexandrescu
On 2/15/11 12:10 PM, Adam Ruppe wrote: One problem with at least is it might have to wait for two packets to come off the network interface; could be fairly slow. Another is that the stream may end... so there's no guarantee. Andrei

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 10:49 PM, Michel Fortin wrote: On 2011-02-15 16:33:33 -0500, Walter Bright newshou...@digitalmars.com said: Nick Sabalausky wrote: Walter Bright newshou...@digitalmars.com wrote in message news:ijeil4$2aso$3...@digitalmars.com... spir wrote: Having to constantly explain that

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 11:24 PM, Jonathan M Davis wrote: Is there some low level reason why size_t should be signed or something I'm completely missing? My personal issue with unsigned ints in general as implemented in C-like languages is that the range of non-negative signed integers is half of the

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread Lutger Blijdestijn
Nick Sabalausky wrote: Nick Sabalausky a@a.a wrote in message news:ijesem$brd$1...@digitalmars.com... Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.vqx78nkceav7ka@steve-laptop... size_t works, it has a precedent, it's already *there*, just use it, or alias it if you

Re: ref const(T) the same as C++'s const T?

2011-02-15 Thread Peter Alexander
On 15/02/11 10:47 PM, Lutger Blijdestijn wrote: For reference, here is a link to the thread discussing it: http://www.mail- archive.com/digitalmars-d@puremagic.com/msg44075.html If I understood that discussion correctly, 'auto ref' is supposed to solve the rvalue references problem but are not

  1   2   >