On 2011-05-30 22:52, Andrej Mitrovic wrote:
On 5/30/11, Vladimir Panteleev vladi...@thecybershadow.net wrote:
On Mon, 30 May 2011 04:18:14 +0300, Jeremy Wright
jer...@codestrokes.com
wrote:
I implemented bucket sort in D to demonstrate how easy it is to use
std.parallelism. I
Why doesn't Appender overload opCatAssign? It would be almost trivial
to replace usage of existing arrays with Appender, instead of having
to replace all calls with var.put().
And why doesn't it overload toString? You can't print its contents to
stdout like you can with slices.
And why can't you
On 2011-05-30 23:21, Andrej Mitrovic wrote:
Why doesn't Appender overload opCatAssign? It would be almost trivial
to replace usage of existing arrays with Appender, instead of having
to replace all calls with var.put().
And why doesn't it overload toString? You can't print its contents to
Remember: 9. Final submissions are to be posted to the digitalmars.D newsgroup
with [Submission] in the Subject line
On 5/30/2011 12:05 PM, Walter Bright wrote:
Just a reminder!
Article submission deadline: before June 1, 2011, GMT
Voting deadline: before June 8, 2011, GMT
D Article
On Tue, 17 May 2011 23:15:42 +0200, Jacob Carlborg wrote:
I just released a new version of DVM, 0.2.0. For installation
instructions see: https://bitbucket.org/doob/dvm
Changelog:
Version 0.2.0
New/Change Features
* 64bit version now available on Linux * It's now possible to update
On 2011-05-31 12:25, Lars T. Kyllingstad wrote:
On Tue, 17 May 2011 23:15:42 +0200, Jacob Carlborg wrote:
I just released a new version of DVM, 0.2.0. For installation
instructions see: https://bitbucket.org/doob/dvm
Changelog:
Version 0.2.0
New/Change Features
* 64bit version now
On Tue, 31 May 2011 02:21:13 -0400, Andrej Mitrovic
andrej.mitrov...@gmail.com wrote:
Why doesn't Appender overload opCatAssign? It would be almost trivial
to replace usage of existing arrays with Appender, instead of having
to replace all calls with var.put().
It should, there might
Walter Bright Wrote:
Just a reminder!
Article submission deadline: before June 1, 2011, GMT
Voting deadline: before June 8, 2011, GMT
I would like to nominate this blog:
http://www.gamedev.net/blog/1140-d-bits/
I know it is an article contest and these were not written for said contest,
Very Interesting!
Hi!
Say I've got a piece of code like this, which gives me the longest line
in a file:
pipe!(readText, splitlines, map!((a) { return a.length; }),
reduce!max)(Demo.txt);
The problem is, it doesn't work. Which is kind of a bummer. :(
Is there an **elegant** way to get around it?
Of
On 2011-05-30 22:51, Ali Çehreli wrote:
On 05/30/2011 09:37 PM, albeitnicht wrote:
Michel Fortin wrote [in subject]:
which link to use?
Answer: comp.lang.C++
Oooh... You can't handle comp.lang.c++.moderated? Poor kitty...
(Deal with it. It is the truth)
Deal with it.
On 2011-05-30 19:57, Jérôme M. Berger wrote:
Adam D. Ruppe wrote:
Kagamin wrote:
May be, it's his cgi lib? :)
Client is free to send requests in any encoding, I suppose.
In practice, that hasn't been a problem because browser tend to
send requests in the same encoding as the html you served.
Adam D. Ruppe Wrote:
The first problem I had was users can upload csv files, which they
generally make in Excel... which apparently outputs Windows-1252.
I suppose it's system ANSI encoding, which is locale-dependent, you can see the
list of ANSI encodings for different locales somewhere in
Adam D. Ruppe Wrote:
The first problem I had was users can upload csv files, which they
generally make in Excel... which apparently outputs Windows-1252.
Fine for 99% of text, but then someone puts in a curly quote or
an em dash and it throws an invalid utf 8 sequence.
The client usually
I created a pull request for the most recent version: https://github.com/D-
Programming-Language/d-programming-language.org/pull/10
So, hopefully it ends up on d-programming-language.org before too long.
And if you don't want to build d-programming-language.org yourself, you can
grab it from
Okay. According to a recent post on the Announce group, Walter wants all
articles for the contest to be posted to the D newsgroup with [Submission] in
the subject line, so I'm reposting the latest version of my std.datetime
article with [Submission] in the subject line.
The article can be
On Tue, 31 May 2011 02:36:58 -0400, Nick Sabalausky wrote:
Getting in just under the wire here. I seem to have misjudged the scope
of my topic, it ended up a bit large... Anyway, here's my entry:
http://www.semitwist.com/articles/EfficientAndFlexible/SinglePage/
Nice article. :) Some of
Jonathan M Davis jmdavisp...@gmx.com wrote in message
news:mailman.494.1306830186.14074.digitalmar...@puremagic.com...
Okay. According to a recent post on the Announce group, Walter wants all
articles for the contest to be posted to the D newsgroup with [Submission]
in
the subject line, so
Lars T. Kyllingstad public@kyllingen.NOSPAMnet wrote in message
news:is2aah$29pf$1...@digitalmars.com...
On Tue, 31 May 2011 02:36:58 -0400, Nick Sabalausky wrote:
Getting in just under the wire here. I seem to have misjudged the scope
of my topic, it ended up a bit large... Anyway, here's my
Nick Sabalausky:
http://www.semitwist.com/articles/EfficientAndFlexible/SinglePage/
Regarding your addGizmos() in ex6_meta_flex3_runtimeToCompileTime1.d:
void addGizmos(int numPorts, bool isSpinnable, int numGizmos) {
// Dispatch to correct version of addGizmosTo.
// Effectively
Daniel Gibson Wrote:
according to N1425
7.11.1.1
4. At program startup, the equivalent of
setlocale(LC_ALL, C);
is executed.
Fun fact is MS conforms with this specification.
So they break it deliberately in Excel? Smart.
Excel deliberately localizes data presented to the user.
Am 31.05.2011 13:12, schrieb Kagamin:
Daniel Gibson Wrote:
according to N1425
7.11.1.1
4. At program startup, the equivalent of
setlocale(LC_ALL, C);
is executed.
Fun fact is MS conforms with this specification.
So they break it deliberately in Excel? Smart.
Excel deliberately
bearophile wrote:
...
A shorter way to write it:
void addGizmos(int numPorts, bool isSpinnable, int numGizmos) {
foreach (np; TypeTuple!(1, 2, 3, 5, 10))
if (numPorts == np) {
foreach (b; TypeTuple!(true, false))
if (isSpinnable == b)
On 5/31/11 6:05 PM, bearophile wrote:
Nick Sabalausky:
http://www.semitwist.com/articles/EfficientAndFlexible/SinglePage/
Regarding your addGizmos() in ex6_meta_flex3_runtimeToCompileTime1.d:
void addGizmos(int numPorts, bool isSpinnable, int numGizmos) {
// Dispatch to correct
Ary Manzana wrote:
Why you need a type tuple? Can't you do:
foreach(np; [1, 2, 3, 5, 10])
That is a runtime foreach, so no. If the argument is a TypeTuple, the compiler
evaluates the foreach as a static foreach, effectively duplicating all code in
its body and filling in the constants/types in
Timon Gehr:
Nice, but isSpinnable is always checked twice with your approach.
Right. But isn't the compiler able to optimize away this inefficiency?
I would like an explicit static foreach better though.
See:
http://d.puremagic.com/issues/show_bug.cgi?id=4085
Bye,
bearophile
This is my final submission for the D article contest.
This takes into account all the fixes and suggestions from the first draft
review.
http://www.dsource.org/projects/dcollections/wiki/ArrayArticle
-Steve
Daniel Gibson Wrote:
I'm not talking about representing the values on the screen - I'm
talking about the format of CSV files.
And I find translated function names pretty strange.. I'm wondering how
well that works when opening a file with another locale etc.
Isn't it natural to get string
On Sat, 28 May 2011 09:16:37 -0400, Andrej Mitrovic
andrej.mitrov...@gmail.com wrote:
Proper comment and proper output.
writeln(1+2); // should print 3, numbers are added.
There's nothing proper about that. I've already fixed a bunch of
examples in the documentation because they had
Am 31.05.2011 14:54, schrieb Kagamin:
Daniel Gibson Wrote:
I'm not talking about representing the values on the screen - I'm
talking about the format of CSV files.
And I find translated function names pretty strange.. I'm wondering how
well that works when opening a file with another locale
Daniel Gibson Wrote:
And I find translated function names pretty strange.. I'm wondering how
well that works when opening a file with another locale etc.
I've checked excel 2007, seems like it stores (in xlsx) numbers and function
names in locale independent form. Don't know, how it works in
Am 31.05.2011 15:02, schrieb Kagamin:
Daniel Gibson Wrote:
And I find translated function names pretty strange.. I'm wondering how
well that works when opening a file with another locale etc.
I've checked excel 2007, seems like it stores (in xlsx) numbers and function
names in locale
int[] b = a[0..2]; // This is a 'slicing' operation. b now refers to
the first two elements of a
is not the first *three* elements of a?
Am 31.05.2011 15:13, schrieb eles:
int[] b = a[0..2]; // This is a 'slicing' operation. b now refers to
the first two elements of a
is not the first *three* elements of a?
No, it contains a[0] and a[1].
The right boundary of a slice is exclusive. This makes sense, so you can
do stuff like
On Tue, 31 May 2011 08:34:12 -0400, Steven Schveighoffer
schvei...@yahoo.com wrote:
This is my final submission for the D article contest.
This takes into account all the fixes and suggestions from the first
draft review.
http://www.dsource.org/projects/dcollections/wiki/ArrayArticle
The right boundary of a slice is exclusive.
I think it should be stated more obvious in the paper.
This makes sense, so you can
do stuff like a[1..$] (== a[1..a.length]) to get a slice that
contains
all elements of a except for the first one (a[0]).
I disagree, but I have not much influence
On Tue, 31 May 2011 09:23:24 -0400, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Tue, 31 May 2011 08:34:12 -0400, Steven Schveighoffer
schvei...@yahoo.com wrote:
This is my final submission for the D article contest.
This takes into account all the fixes and suggestions from the
Timon Gehr:
Nice, but isSpinnable is always checked twice with your approach.
Right. But isn't the compiler able to optimize away this inefficiency?
Nope. You don't get a guarantee from the language that your code will be
optimized
in a certain way.
That said, dmd/gdc are _not_ able to do
On 5/31/11 8:29 AM, eles wrote:
The right boundary of a slice is exclusive.
I think it should be stated more obvious in the paper.
This makes sense, so you can
do stuff like a[1..$] (== a[1..a.length]) to get a slice that
contains
all elements of a except for the first one (a[0]).
I
On 5/31/11 1:04 AM, Mehrdad wrote:
Hi!
Say I've got a piece of code like this, which gives me the longest line
in a file:
pipe!(readText, splitlines, map!((a) { return a.length; }),
reduce!max)(Demo.txt);
The problem is, it doesn't work. Which is kind of a bummer. :(
Is there an **elegant**
On Tue, 31 May 2011 09:29:48 -0400, eles e...@eles.com wrote:
The right boundary of a slice is exclusive.
I think it should be stated more obvious in the paper.
It's now clarified in the comment. Thanks for the feedback.
-Steve
eles wrote:
The right boundary of a slice is exclusive.
I think it should be stated more obvious in the paper.
This makes sense, so you can
do stuff like a[1..$] (== a[1..a.length]) to get a slice that
contains
all elements of a except for the first one (a[0]).
I disagree, but I have not
On Sun, 29 May 2011 16:57:52 -0400, Brad Roberts bra...@puremagic.com
wrote:
On 5/29/2011 8:44 AM, Andrei Alexandrescu wrote:
1. The fatal log should never be stripped. This is because execution of
code after using fatal depends on compile-time
flags, which is unacceptable. Logging to fatal
Without being rude, but I find that you are too much a zealot and too
little of a listener. You are firing bullets in many, but wrong
directions, trying to scary and to impress.
Yes, I have no much experience with D, although I have some with C.
The syntax is not for D, but for general
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s
article
On 5/31/11 1:04 AM, Mehrdad wrote:
Hi!
Say I've got a piece of code like this, which gives me the
longest line
in a file:
pipe!(readText, splitlines, map!((a) { return a.length; }),
reduce!max)(Demo.txt);
If you have a 100 line example
There's a few (I think?) of those in the docs. There was one such
example for associative arrays which I've refactored a bit. And it
does use writeln, as it should.
The nice thing about that example is that it's at the end of the page,
showcasing how hashes can be
if (i1 i2) swap(i1, i2);
That will affect further values from that point onward, which could
not be necessarily intended.
Also, is a bit of overhead for solving such a little issue. OK, it is
simple to swap but... why to be force to do it?
The war between open-right and closed-right limit has
eles wrote:
Without being rude, but I find that you are too much a zealot and too
little of a listener. You are firing bullets in many, but wrong
directions, trying to scary and to impress.
Oh, sorry. I did not want to be rude.
Communicating over newsgroups tends to be working poorly in that
This is how I got to terms with it long ago: http://i.imgur.com/lSkvs.png
When it's a slice, it's basically two anchors or gaps at some
location, and whatever items are between the anchors is your result.
Otherwise with indexing it's the number that starts at that offset (in
this case it would be
On Tue, 31 May 2011 11:10:59 -0400, eles e...@eles.com wrote:
if (i1 i2) swap(i1, i2);
That will affect further values from that point onward, which could
not be necessarily intended.
Also, is a bit of overhead for solving such a little issue. OK, it is
simple to swap but... why to be force
On 5/31/11 10:10 AM, eles wrote:
I agree that the issue is not simple (else, there would have been no
war). I know no other examples where open-right limits are used. I
use (intensively) just another language capable of slicing, that is
Matlab. It uses the closed-left and closed-right limits and
eles wrote:
if (i1 i2) swap(i1, i2);
That will affect further values from that point onward, which could
not be necessarily intended.
Also, is a bit of overhead for solving such a little issue. OK, it is
simple to swap but... why to be force to do it?
The war between open-right and
On 5/31/11 10:28 AM, Timon Gehr wrote:
eles wrote:
Without being rude, but I find that you are too much a zealot and too
little of a listener. You are firing bullets in many, but wrong
directions, trying to scary and to impress.
Oh, sorry. I did not want to be rude.
Communicating over
On 2011-05-31 11:10:59 -0400, eles e...@eles.com said:
I agree that the issue is not simple (else, there would have been no
war). I know no other examples where open-right limits are used. I
use (intensively) just another language capable of slicing, that is
Matlab. It uses the closed-left and
== Quote from Andrej Mitrovic (andrej.mitrov...@gmail.com)'s article
This is how I got to terms with it long ago: http://i.imgur.com/
lSkvs.png
When it's a slice, it's basically two anchors or gaps at some
location, and whatever items are between the anchors is your result.
Otherwise with
I don't think you can enter this debate without bringing the other
war
about zero-based indices vs. one-based indices. Matlab first's index
number is number one, and I think this fits very naturally with the
closed-right limit. In many fields, one-based indices are common
because they are
On Jun 1, 11 00:02, eles wrote:
== Quote from Andrej Mitrovic (andrej.mitrov...@gmail.com)'s article
This is how I got to terms with it long ago: http://i.imgur.com/
lSkvs.png
When it's a slice, it's basically two anchors or gaps at some
location, and whatever items are between the anchors is
I agree that 1-based indexing works pretty well with closed-right
intervals; forgot to mention that in my first response. Even with
such
an approach, certain things are less obvious, e.g. the number of
elements in an interval a..b is b-a+1, not b-a.
Yes, but in C too, when going from a[0] to
Is Python successful?
a = [0,1,2,3,4,5,6]
a[3:5]
[3, 4]
Well, I am not a Python user, I give you credit for that. Actually, I
don't really appreciate Python for its indentation choice, but that's
a matter of taste.
In C++'s iterator concept, x.end() points to one position after the
last
On Tue, May 31, 2011 at 11:28 AM, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Sun, 29 May 2011 16:57:52 -0400, Brad Roberts bra...@puremagic.com
wrote:
On 5/29/2011 8:44 AM, Andrei Alexandrescu wrote:
1. The fatal log should never be stripped. This is because execution of
code after
On 5/31/11, eles e...@eles.com wrote:
Nice picture, but then why foo[1] is rather 8 than 4? And what is foo
[9]?
foo[9] is out of range. If foo[1] was actually referring to 4, then
foo[0] would be out of range too. I've only used this picture because
back years ago when I was trying to
Final submission for article contest.
http://davesdprogramming.wordpress.com/2011/04/07/7/
On 5/31/11 11:10 AM, eles wrote:
I hope some day someone would not have to write a paper like http://
drdobbs.com/blogs/cpp/228701625 but targetting... D's biggest mistake
was to use open-limit on the right.
I sure wish that were the biggest mistake! :o)
Andrei
On 5/31/11 6:10 PM, eles wrote:
Actually, I think 0-based vs. 1-based is of little importance in the
fact if limits should be closed or open. Why do you think the
contrary?
Why it is natural to use open-limit for 0-based? I think it is
quite subjective. Why to the right and not to the left?
Am 31.05.2011 18:16, schrieb eles:
Now, why:
for(iterator from a[0] to a[N-1]){ //etc. }
//let use the above notation for for(i=0; i=N-1; i++)
is acceptable, but sudden is no more acceptable to write
a[for(iterator from 0 to N-1)]
and one must use
a[for(iterator from 0 to N]]
in order to
Am 31.05.2011 18:10, schrieb eles:
I don't think you can enter this debate without bringing the other
war
about zero-based indices vs. one-based indices. Matlab first's index
number is number one, and I think this fits very naturally with the
closed-right limit. In many fields, one-based
eles wrote:
Is Python successful?
a = [0,1,2,3,4,5,6]
a[3:5]
[3, 4]
Well, I am not a Python user, I give you credit for that. Actually, I
don't really appreciate Python for its indentation choice, but that's
a matter of taste.
In C++'s iterator concept, x.end() points to one position
On Tue, 31 May 2011 12:28:12 -0400, Jose Armando Garcia
jsan...@gmail.com wrote:
On Tue, May 31, 2011 at 11:28 AM, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Sun, 29 May 2011 16:57:52 -0400, Brad Roberts bra...@puremagic.com
wrote:
On 5/29/2011 8:44 AM, Andrei Alexandrescu wrote:
On 5/31/11 11:16 AM, eles wrote:
I agree that 1-based indexing works pretty well with closed-right
intervals; forgot to mention that in my first response. Even with
such
an approach, certain things are less obvious, e.g. the number of
elements in an interval a..b is b-a+1, not b-a.
Yes, but
== Quote from Andrej Mitrovic (andrej.mitrov...@gmail.com)'s article
On 5/31/11, eles e...@eles.com wrote:
Nice picture, but then why foo[1] is rather 8 than 4? And what is
foo
[9]?
foo[9] is out of range. If foo[1] was actually referring to 4, then
foo[0] would be out of range too. I've
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s
article
On 5/31/11 11:10 AM, eles wrote:
I hope some day someone would not have to write a paper like
http://
drdobbs.com/blogs/cpp/228701625 but targetting... D's biggest
mistake
was to use open-limit on the right.
I sure
On Tue, May 31, 2011 at 2:34 PM, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Tue, 31 May 2011 12:28:12 -0400, Jose Armando Garcia jsan...@gmail.com
wrote:
On Tue, May 31, 2011 at 11:28 AM, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Sun, 29 May 2011 16:57:52 -0400, Brad
== Quote from David Nadlinger (s...@klickverbot.at)'s article
On 5/31/11 6:10 PM, eles wrote:
Actually, I think 0-based vs. 1-based is of little importance in
the
fact if limits should be closed or open. Why do you think the
contrary?
Why it is natural to use open-limit for 0-based? I
On Tue, May 31, 2011 at 3:10 PM, Jose Armando Garcia jsan...@gmail.com wrote:
On Tue, May 31, 2011 at 2:34 PM, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Tue, 31 May 2011 12:28:12 -0400, Jose Armando Garcia jsan...@gmail.com
wrote:
On Tue, May 31, 2011 at 11:28 AM, Steven
== Quote from Mafi (m...@example.org)'s article
Am 31.05.2011 18:16, schrieb eles:
Now, why:
for(iterator from a[0] to a[N-1]){ //etc. }
//let use the above notation for for(i=0; i=N-1; i++)
is acceptable, but sudden is no more acceptable to write
a[for(iterator from 0 to N-1)]
On Jun 1, 11 02:12, eles wrote:
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s
article
On 5/31/11 11:10 AM, eles wrote:
I hope some day someone would not have to write a paper like
http://
drdobbs.com/blogs/cpp/228701625 but targetting... D's biggest
mistake
was to use
In my opinion it is natuaral to use half open intervals for zero-
based
indices. My reasoning:
//zero-based
int[8] zero; //indices from 0 upto and excluding 8 - [0,8)
//one-based
int[8] one;
//in many languages the indices from 1 upto and including 8 - [1,8]
Then, using the same type of
On 2011-05-31 12:10:24 -0400, eles e...@eles.com said:
I don't think you can enter this debate without bringing the other war
about zero-based indices vs. one-based indices. Matlab first's index
number is number one, and I think this fits very naturally with the
closed-right limit. In many
eles wrote:
== Quote from Andrej Mitrovic (andrej.mitrov...@gmail.com)'s article
On 5/31/11, eles e...@eles.com wrote:
Nice picture, but then why foo[1] is rather 8 than 4? And what is
foo
[9]?
foo[9] is out of range. If foo[1] was actually referring to 4, then
foo[0] would be out
On Jun 1, 11 02:16, eles wrote:
== Quote from David Nadlinger (s...@klickverbot.at)'s article
On 5/31/11 6:10 PM, eles wrote:
Actually, I think 0-based vs. 1-based is of little importance in
the
fact if limits should be closed or open. Why do you think the
contrary?
Why it is natural to use
Quite frankly I don't give a damn about for loops because I hardly use
them. Whenever I can, I use foreach, and if I get stuck and think that
foreach can't be used I rather think twice and consider to do a small
redesign of my code rather than start using ancient for loops. I don't
want to deal
eles wrote:
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s
article
On 5/31/11 11:10 AM, eles wrote:
I hope some day someone would not have to write a paper like
http://
drdobbs.com/blogs/cpp/228701625 but targetting... D's biggest
mistake
was to use open-limit
On Tue, 31 May 2011 14:10:20 -0400, Jose Armando Garcia
jsan...@gmail.com wrote:
On Tue, May 31, 2011 at 2:34 PM, Steven Schveighoffer
schvei...@yahoo.com wrote:
Again, this sounds way too complicated for what it's giving you
(avoiding
having to forcibly kill your application if that's
On Jun 1, 11 02:24, eles wrote:
In my opinion it is natuaral to use half open intervals for zero-
based
indices. My reasoning:
//zero-based
int[8] zero; //indices from 0 upto and excluding 8 - [0,8)
//one-based
int[8] one;
//in many languages the indices from 1 upto and including 8 - [1,8]
On 5/31/11 1:32 PM, Steven Schveighoffer wrote:
On Tue, 31 May 2011 14:10:20 -0400, Jose Armando Garcia
jsan...@gmail.com wrote:
On Tue, May 31, 2011 at 2:34 PM, Steven Schveighoffer
schvei...@yahoo.com wrote:
Again, this sounds way too complicated for what it's giving you
(avoiding
having
On Tue, 31 May 2011 14:20:20 -0400, eles e...@eles.com wrote:
== Quote from Mafi (m...@example.org)'s article
Am 31.05.2011 18:16, schrieb eles:
Now, why:
for(iterator from a[0] to a[N-1]){ //etc. }
//let use the above notation for for(i=0; i=N-1; i++)
is acceptable, but sudden is no
On 5/31/11 1:36 PM, Timon Gehr wrote:
eles wrote:
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s
article
On 5/31/11 11:10 AM, eles wrote:
I hope some day someone would not have to write a paper like
http://
drdobbs.com/blogs/cpp/228701625 but targetting... D's biggest
On Tue, 31 May 2011 20:29:51 +0200, KennyTM~ kenn...@gmail.com wrote:
If your program needs an array of 4 billion elements (2e+19 elements on
64-bit system), you're programming it wrong.
Not true. (for 32 bits) True for simple arrays, yes. Not for other ranges
that may e.g. lazily read
On Tue, 31 May 2011 14:48:57 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 5/31/11 1:32 PM, Steven Schveighoffer wrote:
On Tue, 31 May 2011 14:10:20 -0400, Jose Armando Garcia
jsan...@gmail.com wrote:
On Tue, May 31, 2011 at 2:34 PM, Steven Schveighoffer
On Tue, 31 May 2011 15:09:07 -0400, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Tue, 31 May 2011 14:48:57 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
I'm operating under the assumption that logCritical and logFatal are at
a different log level (i.e. the primary
Actually, I think 0-based vs. 1-based is of little importance in
the
fact if limits should be closed or open. Why do you think the
contrary?
Good question. Actually, I'm not too sure if 1-based is better
suited
with closed. But I can say that it makes a lot of sense for 0-based
arrays to
This has been discussed a lot of times before. See
http://digitalmars.com/d/archives/digitalmars/D/
About_switch_case_statements..._101110.html#N101112.
Thank you. I know. I follow this newsgroup since the days when
EvilOne Minayev was still posting here and also witnessed D 1.0 and
old D group
If your program needs an array of 4 billion elements (2e+19
elements on
64-bit system), you're programming it wrong.
This is an problem that won't arise practically.
You are limiting yourself to Desktop PC. It is not always the case.
There are also other platforms (embedded D, let's say),
== Quote from Andrej Mitrovic (andrej.mitrov...@gmail.com)'s article
Quite frankly I don't give a damn about for loops because I hardly
use
them. Whenever I can, I use foreach, and if I get stuck and think
that
foreach can't be used I rather think twice and consider to do a
small
redesign of
On 05/31/2011 08:10 AM, eles wrote:
I know no other examples where open-right limits are used.
The C++ standard library uses open-right with its pairs of iterators.
The second iterator points at one beyond the last element of the range.
Ali
Array indices do not form a field in D. What's the point bringing it
in?
Yes, they are (it is true no matter that we speak of D or not). Or,
more exactly, they should be a field. They are numbers, after all.
Secondly, why they should not be a field? Yes, the current approach
introduces a n+1th
The evidence collected makes it clear to any reasonable observer
that
enforcing flow of control statements after code in case labels would
mark a net improvement for D. How big? Probably not bigger than
operating other improvements. But definitely not negligible.
Andrei
Then, why not to
On 5/31/11 8:16 PM, eles wrote:
== Quote from David Nadlinger (s...@klickverbot.at)'s article
On 5/31/11 6:10 PM, eles wrote:
Actually, I think 0-based vs. 1-based is of little importance in
the
fact if limits should be closed or open. Why do you think the
contrary?
Why it is natural to use
eles e...@eles.com wrote in message
news:is2qgc$2o7h$1...@digitalmars.com...
The right boundary of a slice is exclusive.
I think it should be stated more obvious in the paper.
This makes sense, so you can
do stuff like a[1..$] (== a[1..a.length]) to get a slice that
contains
all elements
eles Wrote:
But what are the advantages of using open range over closed range? I
fail to see any advantages. Yes, I see those other people (and quite
many), but I fail to see any advantage except the louder talk.
Quite simply, there aren't any. But frankly your claims for having a closed
1 - 100 of 187 matches
Mail list logo