On Monday, 24 June 2013 at 05:31:29 UTC, Ali Çehreli wrote:
On 06/23/2013 10:07 PM, Ali Çehreli wrote:
I think it is a compiler bug.
Make that a Phobos bug. :)
The following is a reduced program that exhibits the problem.
The presence or absence of the unused member function makes a
Hi,
I am having problems compiling qtd on Ubuntu 12.04. QtD needs
Qt4, however I also have Qt5 installed. By default cmake grabs
version 5 which of course produces error messages. In case anyone
knows a quick fix (cmake flag, or a qmake flag etc.) please let
me know. Thanks a million!
Hi,everyone,
I am learning D.I installed a plugin-visusl D to visual studio
2008.I am very confused that ctrl+z didn't teminate the input of
console,it result in a dead loop.When reading from a txt file,a
extra line will be read and usually it result in a wrong
result.Is there anyone who has
I am getting lots of errors when compiling with -w:
// https://github.com/Dav1dde/gl3n/blob/master/gl3n/linalg.d#L144
this(T)(T vec) if(is_vector!T is(T.vt : vt) (T.dimension =
dimension)) {
vector = vec.vector[0..dimension];
}
this line produces following warning:
Hello,
I have code which generates a histogram from an array and prints
out the histogram bins/counts. However I cannot get the code to
iterate and print
out the histogram to work. The following is a minimal example:
import std.range;
import std.stdio;
void main()
{
ubyte[] data =
On 06/24/2013 03:05 PM, Craig Dillabaugh wrote:
Can anyone identify what I am doing wrong. Also I am curious to
know why std.range includes both Lockstep and lockstep - they
seem like the same thing.
lockstep is a helper function that returns an instance of Lockstep.
The reason is that if
On Monday, June 24, 2013 12:04:51 Chris wrote:
Hi,
I am having problems compiling qtd on Ubuntu 12.04. QtD needs
Qt4, however I also have Qt5 installed. By default cmake grabs
version 5 which of course produces error messages. In case anyone
knows a quick fix (cmake flag, or a qmake flag
On Monday, June 24, 2013 16:07:19 David wrote:
I am getting lots of errors when compiling with -w:
// https://github.com/Dav1dde/gl3n/blob/master/gl3n/linalg.d#L144
this(T)(T vec) if(is_vector!T is(T.vt : vt) (T.dimension =
dimension)) {
vector = vec.vector[0..dimension];
lockstep(iota!ubyte(ubyte.min, ubyte.max), bins[])
Works, but this leaves you with other errors, I couldn't find a solution
for. Something seems to be wrong with opApply of lockstep.
Or maybe I miss something obvious...
lx:
I am very confused that ctrl+z didn't teminate the input of
console,it result in a dead loop.
I think this is a library bug, I noticed it some times, but I
didn't file it. Maybe it's worth filing in Bugzilla.
When reading from a txt file,a extra line will be read and
usually it
On Monday, 24 June 2013 at 14:15:55 UTC, Joseph Rushton Wakeling
wrote:
On 06/24/2013 03:05 PM, Craig Dillabaugh wrote:
Can anyone identify what I am doing wrong. Also I am curious
to
know why std.range includes both Lockstep and lockstep - they
seem like the same thing.
lockstep is a
Craig Dillabaugh:
foreach( idx, count; lockstep( iota!ubyte(ubyte.min,
ubyte.max), bins ) )
Also note that doesn't iterate the whole ubyte range. Maybe we
need another iota range for that, with a different name or with
an optional template argument string like [] as
std.random.uniform.
David:
Why does dmd produce this warning? (this is new in 2.063) Why is
assigning elementwise better?
The short answer is: do as the compiler suggests you, and be very
happy the compiler avoids you some bugs.
The explanation is longer. In brief, it's much better to avoid
some bugs and to
On Monday, 24 June 2013 at 14:33:48 UTC, bearophile wrote:
Craig Dillabaugh:
foreach( idx, count; lockstep( iota!ubyte(ubyte.min,
ubyte.max), bins ) )
Also note that doesn't iterate the whole ubyte range. Maybe we
need another iota range for that, with a different name or with
an
On Monday, 24 June 2013 at 14:18:52 UTC, Jonathan M Davis wrote:
On Monday, June 24, 2013 12:04:51 Chris wrote:
Hi,
I am having problems compiling qtd on Ubuntu 12.04. QtD needs
Qt4, however I also have Qt5 installed. By default cmake grabs
version 5 which of course produces error messages. In
David:
Something seems to be wrong with opApply of lockstep.
Or maybe I miss something obvious...
I have suggested to remove lockstep from Phobos:
http://d.puremagic.com/issues/show_bug.cgi?id=8155
Why don't you try to use std.range.zip?
Bye,
bearophile
On Monday, 24 June 2013 at 14:56:41 UTC, bearophile wrote:
David:
Something seems to be wrong with opApply of lockstep.
Or maybe I miss something obvious...
I have suggested to remove lockstep from Phobos:
http://d.puremagic.com/issues/show_bug.cgi?id=8155
Why don't you try to use
Craig Dillabaugh:
I now get the error (which seems to be the same problem I had
before - see the last error):
...
/usr/include/dmd/phobos/std/range.d(4451): Error: template
std.range.zip cannot deduce template function from argument
types
!()(Result, uint[256LU])
Most range/algorithm
On 06/24/2013 03:05 PM, Craig Dillabaugh wrote:
I get the following error messages which I cannot decipher.
Oddly enough, I'm also getting lockstep-related error messages at compile-time:
/opt/gdc/include/d/4.8.1/std/range.d:4716: Error: delegate dg (ref double, ref
ulong) is not callable using
On Monday, 24 June 2013 at 15:15:46 UTC, bearophile wrote:
Craig Dillabaugh:
clip
Most range/algorithm functions unfortunately don't accept a
fixes size array. So you have to slice it:
void main() {
import std.stdio, std.range;
ubyte[] data = [17, 32, 32, 32, 38, 39, 39, 47,
On Sun, 23 Jun 2013 11:29:10 -0400, Lemonfiend le...@fie.nd wrote:
On Sunday, 23 June 2013 at 15:15:16 UTC, Jacob Carlborg wrote:
On 2013-06-23 13:26, Lemonfiend wrote:
foreach (I i; array) {
if (B b = cast(B) i) { ... }
}
Thanks all 3 of you for the quick and identical answers. :)
It
On Sun, 23 Jun 2013 06:09:19 -0400, Jonathan M Davis jmdavisp...@gmx.com
wrote:
On Sunday, June 23, 2013 12:02:42 Namespace wrote:
Also I don't know why I should call static methods from an
instance. What's the purpose?
It's stupid and pointless as far as I can tell, but I believe that
On Monday, 24 June 2013 at 15:29:21 UTC, Joseph Rushton Wakeling
wrote:
On 06/24/2013 03:05 PM, Craig Dillabaugh wrote:
I get the following error messages which I cannot decipher.
Oddly enough, I'm also getting lockstep-related error messages
at compile-time:
On 06/24/2013 07:05 AM, Craig Dillabaugh wrote:
The following is a minimal example:
Further reduced:
import std.range;
void main()
{
lockstep(iota(0, 10), [ 1 ]);
}
Strangely, the error message points at two comment lines in my
installation of 2.063:
On 06/23/2013 11:11 PM, cal wrote:
I'll file it now. Thanks!
Thanks for filing:
http://d.puremagic.com/issues/show_bug.cgi?id=10458
Ali
On Sunday, 23 June 2013 at 10:09:39 UTC, Jonathan M Davis wrote:
Also I don't know why I should call static methods from an
instance. What's the purpose?
It's stupid and pointless as far as I can tell, but I believe
that C++, Java,
C#, and D all do it, so as stupid as it is, it's a common
On Monday, 24 June 2013 at 16:03:17 UTC, Ali Çehreli wrote:
On 06/24/2013 07:05 AM, Craig Dillabaugh wrote:
The following is a minimal example:
Further reduced:
import std.range;
void main()
{
lockstep(iota(0, 10), [ 1 ]);
}
Strangely, the error message points at two comment lines in
On Sat, Jun 22, 2013 at 08:11:25PM +0100, Joseph Rushton Wakeling wrote:
Hello all,
I'm having problems building the docs. I've got the latest
d-programming-language.org checked out, and have tried to build with
make -f posix.mak.
The basic html part builds fine, but it falls over when
Am 24.06.2013 16:30, schrieb bearophile:
David:
Why does dmd produce this warning? (this is new in 2.063) Why is
assigning elementwise better?
The short answer is: do as the compiler suggests you, and be very happy
the compiler avoids you some bugs.
The problem is, I wrote this code on
Timothee Cour wrote:
On Tue, Jun 18, 2013 at 3:00 PM, Steven Schveighoffer
schvei...@yahoo.comwrote:
On Tue, 18 Jun 2013 17:41:57 -0400, Timothee Cour
thelastmamm...@gmail.com wrote:
I'd like to do the following:
auto pipes = pipeShell(command, Redirect.stdout | Redirect.stderr);
On Monday, 24 June 2013 at 15:46:05 UTC, Steven Schveighoffer
wrote:
On Sun, 23 Jun 2013 11:29:10 -0400, Lemonfiend le...@fie.nd
wrote:
On Sunday, 23 June 2013 at 15:15:16 UTC, Jacob Carlborg wrote:
On 2013-06-23 13:26, Lemonfiend wrote:
foreach (I i; array) {
if (B b = cast(B) i) { ... }
On Monday, June 24, 2013 11:51:52 Steven Schveighoffer wrote:
My suggestion to fix this has always been: only allow static calls on
instance variables via opt-in. e.g.:
class InfiniteRange
{
static bool empty() { return false; }
alias InfiniteRange.empty this.empty; // just an example
}
On Monday, June 24, 2013 19:13:45 Jesse Phillips wrote:
On Sunday, 23 June 2013 at 10:09:39 UTC, Jonathan M Davis wrote:
Also I don't know why I should call static methods from an
instance. What's the purpose?
It's stupid and pointless as far as I can tell, but I believe
that C++,
Hello, guys !
http://dpaste.1azy.net/8917c253
Thanks.
Regards.
David:
What kind of bugs does it avoid?
I can't think of a single bug which could happen...
(Ranges/Lengths are checked at runtime...)
Some reasons:
- Syntax uniformity: similar behaviours should look similar. This
is a general rule of language design, that avoids troubles you
don't even
Craig Dillabaugh:
Also note that doesn't iterate the whole ubyte range. Maybe we
need another iota range for that, with a different name or
with an optional template argument string like [] as
std.random.uniform. Opinions welcome.
Bye,
bearophile
Opps. Of course.
The optional template
On 2013-06-24, 22:30, Temtaime wrote:
Hello, guys !
http://dpaste.1azy.net/8917c253
I'm not sure I've seen this bug before, but yes, it is one.
The cause is that the grammar for the new alias syntax is apparently not
complete.
Please file: http://d.puremagic.com/issues/enter_bug.cgi
--
I am very confused that ctrl+z didn't teminate the input of
console,it result in a dead loop.
I think this is a library bug, I noticed it some times, but I
didn't file it. Maybe it's worth filing in Bugzilla.
I have added this bug report, is this the issue you are
seeing/having?
On 06/24/2013 11:01 AM, Craig Dillabaugh wrote:
So is this worthy of a bug report then?
Yes, please.
Ali
On 06/24/2013 12:17 PM, David wrote:
The problem is, I wrote this code on purpose and I *want* it to work
like that, and I evenn need it to work like that (a few lines above in
construct), but this currently blocks gl3n from beeing updated for
Fedora.
You are right because 'vector' is a
On Monday, 24 June 2013 at 21:13:31 UTC, bearophile wrote:
I am very confused that ctrl+z didn't teminate the input of
console,it result in a dead loop.
I think this is a library bug, I noticed it some times, but I
didn't file it. Maybe it's worth filing in Bugzilla.
I have added this bug
Ali Çehreli:
So, the following two have the same effect:
vector = vec.vector[0..dimension];
vector[] = vec.vector[0..dimension];
The first syntax will be deprecated and later it will become an
error.
Bye,
bearophile
monarch_dodra:
I don't think this is a bug
I see. Then lx will have to explain the problem better.
(I replied on the bug report):
I have given an answer, comparing to Python. I think the current
Phobos behavour is bad.
Bye,
bearophile
On 06/24/2013 03:12 PM, bearophile wrote:
Ali Çehreli:
So, the following two have the same effect:
vector = vec.vector[0..dimension];
vector[] = vec.vector[0..dimension];
The first syntax will be deprecated and later it will become an error.
I am confused. Even if the
On 6/24/13, Ali Çehreli acehr...@yahoo.com wrote:
Strangely, the error message points at two comment lines in my
installation of 2.063:
It's a regression which I've caused. I've made a fixup pull:
http://d.puremagic.com/issues/show_bug.cgi?id=10468
I'm very sorry for this mishap.
Ali Çehreli:
I am confused. Even if the right-hand expression were a
fixed-length array? If so, then we wouldn't speak of their
being value types. (?)
a = b;// should be fine
Otherwise, fixed-length arrays would become weird types that
cannot be used in assignment operations.
I
On 06/24/2013 04:11 PM, bearophile wrote:
Currently this code gives no warnings:
void main() {
int[3] a, b;
a = b;
}
This topic is discussed a little in Issue 7444.
http://d.puremagic.com/issues/show_bug.cgi?id=7444#c3
Summary:
1) Single element on the right-hand side is
On 06/24/2013 05:16 PM, Ali Çehreli wrote:
2) Mixing static array and dynamic array on both sides of = is
disallowed:
da[] = sa[]; // ditto
da = sa[]; // ditto
And I didn't mean that those two have the same meaning. The former is
copy all elements, and the latter is refer to
Is it by design that the code below does not compile?
import std.algorithm, std.range;
void main() {
typeof(iota(10).map!(a=a)) x = iota(10).map!(a=a);
}
Error message (DMD git-latest on DPaste):
Error: constructor f755.main.MapResult!(__lambda2,
Result).MapResult.this (Result input) is
I think it's because each lambda litteral is treated unique.
can dmd be changed to recognize identical lambda litterals as identical? Is
there any particular issue making that difficult?
it already recognizes identical string literals as identical
On Mon, Jun 24, 2013 at 7:45 PM, cal
On Tue, Jun 25, 2013 at 04:45:33AM +0200, cal wrote:
Is it by design that the code below does not compile?
import std.algorithm, std.range;
void main() {
typeof(iota(10).map!(a=a)) x = iota(10).map!(a=a);
}
[...]
The workaround is to use 'auto', then alias its type:
51 matches
Mail list logo