On Monday, 2 July 2012 at 05:55:20 UTC, dennis luehring wrote:
Am 02.07.2012 07:13, schrieb Jonathan M Davis:
On Monday, July 02, 2012 07:00:23 dennis luehring wrote:
Am 01.07.2012 23:02, schrieb Walter Bright:
On 7/1/2012 11:53 AM, Nick Sabalausky wrote:
That successfully compiles and
On Monday, July 02, 2012 07:54:56 dennis luehring wrote:
Am 02.07.2012 07:13, schrieb Jonathan M Davis:
On Monday, July 02, 2012 07:00:23 dennis luehring wrote:
Am 01.07.2012 23:02, schrieb Walter Bright:
On 7/1/2012 11:53 AM, Nick Sabalausky wrote:
That successfully compiles and prints
On 07/01/2012 11:11 PM, Jonathan M Davis wrote:
Yes, but as I said, if it _didn't_ select the member function when
there was a
conflict, it would be impossible to call the member function whenever
there was
a conflict.
I wouldn't be a fan of it but I think it would still be possible:
On Monday, 2 July 2012 at 06:11:22 UTC, Jonathan M Davis wrote:
So, without adding new syntax to the language, it was
essentially impossible to do anything other than pick the
member function whenever there's a conflict.
Thanks to C++ for inspiration, I even have proposal for such
syntax!
When I read the D programming language chapter on operator
overloading, I found that the fact there were operators
opIndexAssign, opIndexOpAssing and opIndexUnary to be
nothing short of brilliant. Finally, a container of bools that
works for real!
However, if and when opIndex is capable of
On 28/06/12 18:37, David Nadlinger wrote:
On Thursday, 28 June 2012 at 15:28:10 UTC, Don Clugston wrote:
There's an oddity, though: the type of X.significand would be
dependent on the type of X […]
I don't think this is a problem at all – for example, the type of T.init
depends on T as well…
On 28/06/12 18:36, Jens Mueller wrote:
Don Clugston wrote:
On 28/06/12 17:00, Jens Mueller wrote:
Andrei Alexandrescu wrote:
On 6/28/12 10:07 AM, Roman D. Boiko wrote:
On Thursday, 28 June 2012 at 14:04:37 UTC, Mehrdad wrote:
I think just exposing them via .sig and .exp might be the way to
Greetings
Normally I use released beta versions of dmd, but this time I started using
dmd 2.060 for sake of std.string.xformat.
But I am facing issues. This version is ignoring ref when passing array
as ref argument. Kindly see the code below. When I run this code it prints
Postblit called! four
On 07/01/2012 06:42 PM, Pierre Rouleau wrote:
Would the following rewrite of the above statement maintain the original
intent while conveying a little bit more information?
It is never a good idea to write into a string literal.
never a good idea would be too permissive and welcoming. The
On Monday, July 02, 2012 14:26:33 d coder wrote:
Greetings
Normally I use released beta versions of dmd, but this time I started using
dmd 2.060 for sake of std.string.xformat.
But I am facing issues. This version is ignoring ref when passing array
as ref argument. Kindly see the code
Because it's apparent to me it's not going to be fixed.
Furthermore, what does it gain you over sort(chain(a, b))? This
is the first time in the 2 years it's been broken (and apparently
Jesse is the only one that knew this! :D) someone has come to IRC
with a problem regarding it. From that
This is relatively tongue in cheek of course, but it _has_ been
effectively deprecated since 2010. :P
Done.
http://d.puremagic.com/issues/show_bug.cgi?id=8335
On Monday, 2 July 2012 at 10:49:07 UTC, Tommi wrote:
I've made a couple of language feature requests:
This Super:
http://forum.dlang.org/thread/csjqswdlermlnbjbx...@forum.dlang.org
Improving pseudo function call syntax:
http://forum.dlang.org/thread/uufohvapbyceuaylo...@forum.dlang.org
On 07/02/2012 12:49 PM, Tommi wrote:
I've made a couple of language feature requests:
This Super:
http://forum.dlang.org/thread/csjqswdlermlnbjbx...@forum.dlang.org
We already have this. typeof(this) and typeof(super).
Improving pseudo function call syntax:
Have you had a look at dcollection ?
http://www.dsource.org/projects/dcollections
There is a doubly linked list implementation, with range and cursors
(entities that have iterator functionalities).
On 7/2/12 5:50 AM, Bernard Helyer wrote:
Because it's apparent to me it's not going to be fixed. Furthermore,
what does it gain you over sort(chain(a, b))? This is the first time in
the 2 years it's been broken (and apparently Jesse is the only one that
knew this! :D) someone has come to IRC
On 7/2/12 4:13 AM, monarch_dodra wrote:
When I read the D programming language chapter on operator
overloading, I found that the fact there were operators opIndexAssign,
opIndexOpAssing and opIndexUnary to be nothing short of brilliant.
Finally, a container of bools that works for real!
On 12-07-02 4:58 AM, Ali Çehreli wrote:
On 07/01/2012 06:42 PM, Pierre Rouleau wrote:
Would the following rewrite of the above statement maintain the original
intent while conveying a little bit more information?
It is never a good idea to write into a string literal.
never a good idea
My main point is that it doesn't work. Even the given example
does not work. It should either be fixed or ditched.
On Monday, 2 July 2012 at 12:44:59 UTC, monarch_dodra wrote:
I think this is a pretty serious bug: when one writes:
foreach(ref a, range), the underlying (ref'd) object will
ONLY get modified if the range object provides a ref T
front() method.
Somethig related, zip(a,b) allows to sort the
On 01/07/12 04:00, Walter Bright wrote:
On 6/30/2012 6:05 PM, bearophile wrote:
Walter Bright:
It's not a bug. It's deliberate, and is there to support mechanical
translation of Java code.
Is this stuff written somewhere in a D design rationales page?
Now that D is several years old, how
Don Clugston:
Do you have a reference for this Java behaviour? I did a quick
google, and everything I found indicates that case labels must
be constants.
Thank you for your answer, Don.
I have compiled this Java code:
class Main {
public static void main(String[] args) {
int x
Hello all,
A problem with the retro function from std.range -- although it apparently
operates on a bidirectional range, it fails when used with foreach requesting
both value and index. Running this code:
import std.range, std.stdio;
void
Running this code
Sorry, should be attempting to compile this code.
On 07/02/2012 05:36 PM, Joseph Rushton Wakeling wrote:
Hello all,
A problem with the retro function from std.range -- although it
apparently operates on a bidirectional range, it fails when used with
foreach requesting both value and index. Running this code:
What would be your expected output?
From the inner to the outer expression:
First the range is reversed and then the elements of this range
are enumerated.
Joseph Rushton Wakeling:
double[] a = [ 0, 1, 2, 3, 4, 5 ];
foreach(i, x; retro(a))
writeln(i, \t, x);
It's not a bug, it's caused by how ranges like retro work. retro
yields a single item. In D you can't overload on return values,
so foreach can't try to call a
On 02/07/12 17:48, Timon Gehr wrote:
What would be your expected output?
I'd expect to see
0 5
1 4
2 3
3 2
4 1
5 0
i.e. as if I was foreach-ing over an array with the same values in inverted
order.
D does not provide index for the range iteration.
Instead, you can create 'zipped' range.
void main() {
auto intr = sequence!n(); // 0, 1, 2, ...
double[] a = [ 0, 1, 2, 3, 4, 5 ];
foreach(i, x; zip(intr, retro(a)))
writeln(i, \t, x);
}
zip(intr, retro(a)) is a
On Monday, 2 July 2012 at 16:49:06 UTC, Joseph Rushton Wakeling
wrote:
On 02/07/12 17:48, Timon Gehr wrote:
What would be your expected output?
I'd expect to see
0 5
1 4
2 3
3 2
4 1
5 0
i.e. as if I was foreach-ing over an array with the same values
in inverted
On 7/2/2012 7:37 AM, bearophile wrote:
I have compiled this Java code:
class Main {
public static void main(String[] args) {
int x = 2;
int y = 2;
switch(x) {
case 1: break;
case y: break;
}
}
}
It gives:
Main.java:7:
Walter Bright:
Put final in front of y, and it will compile. Remember, this
was done for D1 that didn't have const.
I see. So in D2 are we going to require that y to be immutable?
Bye,
bearophile
On 7/2/2012 1:04 PM, bearophile wrote:
Walter Bright:
Put final in front of y, and it will compile. Remember, this was done for D1
that didn't have const.
I see. So in D2 are we going to require that y to be immutable?
No. I don't agree there's a problem. Nor do I care to break existing D1
bearophile , dans le message (digitalmars.D:171013), a écrit :
It's not a bug, it's caused by how ranges like retro work. retro
yields a single item. In D you can't overload on return values,
But you can overload OpApply.
--
Christophe
Is it possible to figure out how is the state of an object at
compile time?
E.g. if the object is null or not:
class Foo { }
Foo f;
static if (is_null(f)) { }
Namespace:
Is it possible to figure out how is the state of an object at
compile time?
E.g. if the object is null or not:
class Foo { }
Foo f;
static if (is_null(f)) { }
In general you need a tool that analyzes D code statically (and
maybe in some cases doesn't give a certain answer).
On Monday, July 02, 2012 08:19:52 Namespace wrote:
Is it possible to figure out how is the state of an object at
compile time?
E.g. if the object is null or not:
class Foo { }
Foo f;
static if (is_null(f)) { }
What are you trying to test exactly? Whether f default initializes to null?
In general you need a tool that analyzes D code statically (and
maybe in some cases doesn't give a certain answer).
Bye,
bearophile
Short: not so easy. Too bad.
My intention was to avoid something like this:
[code]
class Foo { }
Foo f; // f is null
NotNull!(Foo) test = f; // should throw an compiler error,
because f is null
[/code]
I can avoid
NotNull!(Foo) test = null; with
@disable
this(typeof(null));
but how can i avoid null objects?
On Monday, July 02, 2012 10:41:03 Namespace wrote:
My intention was to avoid something like this:
[code]
class Foo { }
Foo f; // f is null
NotNull!(Foo) test = f; // should throw an compiler error,
because f is null
[/code]
I can avoid
NotNull!(Foo) test = null; with
@disable
Can you show me an example of your two options?
I'm not sure what do you exactly mean.
I cannot create the Foo objects _in_ the NotNull struct because i
need the reference of an specific object.
And if i throw an error if the object paramter is null, it's not
a compiler error.
So there is no way that a null reference as paramter can be
detect at compile time? I tried different
I'm getting this with this code: http://dpaste.dzfl.pl/55f83be6
Can someone explain me, _why_ i get this error? o.O
I thought D cannot detect null references by itself.
Your answers are remarkable elaborated. Thanks for your great effort,
Jonathan!! ;-)
On Monday, 2 July 2012 at 15:55:03 UTC, Namespace wrote:
I'm getting this with this code: http://dpaste.dzfl.pl/55f83be6
Can someone explain me, _why_ i get this error? o.O
I thought D cannot detect null references by itself.
Can't check now. But if you get this during runtime, D does
detect
On Monday, 2 July 2012 at 16:19:08 UTC, Tobias Pankrath wrote:
On Monday, 2 July 2012 at 15:55:03 UTC, Namespace wrote:
I'm getting this with this code: http://dpaste.dzfl.pl/55f83be6
Can someone explain me, _why_ i get this error? o.O
I thought D cannot detect null references by itself.
On Monday, July 02, 2012 17:55:01 Namespace wrote:
I'm getting this with this code: http://dpaste.dzfl.pl/55f83be6
Can someone explain me, _why_ i get this error? o.O
I thought D cannot detect null references by itself.
You didn't actually list what error you're seeing. The error that I'm
On Monday, July 02, 2012 17:25:03 Namespace wrote:
I cannot create the Foo objects _in_ the NotNull struct because i
need the reference of an specific object.
And if i throw an error if the object paramter is null, it's not
a compiler error.
So there is no way that a null reference as
You didn't actually list what error you're seeing. The error
that I'm seeing
(which may differ from yours' because I'm on the latest master,
not 2.059, and
you're probably on 2.059) is
q.d(87): Error: constructor q.NotNull!(Foo).NotNull.this is not
callable
because it is annotated with
On Monday, July 02, 2012 19:36:21 Namespace wrote:
You didn't actually list what error you're seeing. The error
that I'm seeing
(which may differ from yours' because I'm on the latest master,
not 2.059, and
you're probably on 2.059) is
q.d(87): Error: constructor
Hi,
I have a body of code which makes the compiler frontend segfault.
Is there some automated tool which will help me produce a minimal
testcase so I can file a bugreport? The body in question is fairly
large, just posting that to a bugreport doesn't sound like a good idea
to me.
Thanks,
--
Well, I'm getting
q.d(111): Error: no identifier for declarator t
q.d(111): Error: found 'in' when expecting ';'
due to your erroneous use of in a foreach loop instead of ;,
Sorry, that comes of my little compiler hack, as you can see here:
On 07/02/2012 08:38 PM, Wouter Verhelst wrote:
Hi,
I have a body of code which makes the compiler frontend segfault.
Is there some automated tool which will help me produce a minimal
testcase so I can file a bugreport? The body in question is fairly
large, just posting that to a bugreport
On 07/02/2012 11:36 AM, Jonathan M Davis wrote:
By the way, it's pointless to compile with both -w and -wi. -wi makes
it so
that warnings are displayed without stopping compilation. -w makes it
so that
warnings are displayed and treated as errors (so they stop
compilation). Pick
one or
Timon Gehr timon.g...@gmx.ch writes:
On 07/02/2012 08:38 PM, Wouter Verhelst wrote:
Hi,
I have a body of code which makes the compiler frontend segfault.
Is there some automated tool which will help me produce a minimal
testcase so I can file a bugreport? The body in question is fairly
On Monday, July 02, 2012 20:52:19 Namespace wrote:
Well, I'm getting
q.d(111): Error: no identifier for declarator t
q.d(111): Error: found 'in' when expecting ';'
due to your erroneous use of in a foreach loop instead of ;,
Sorry, that comes of my little compiler hack, as you can
On 07/02/2012 11:36 AM, Jonathan M Davis wrote:
By the way, it's pointless to compile with both -w and -wi. -wi makes
it so
that warnings are displayed without stopping compilation. -w makes it
so that
warnings are displayed and treated as errors (so they stop
compilation). Pick
one or
dmd: glue.c:542: virtual void FuncDeclaration::toObjFile(int): Assertion
`semanticRun == PASSsemantic3done' failed.
Aborted
wouter@carillon:~/code/d/DustMite$
... and I'm not yet that fluent in D to understand what's going on. Any
ideas?
pass dustmite.d before dsplit.d
known problem, but the
Trass3r u...@known.com writes:
dmd: glue.c:542: virtual void FuncDeclaration::toObjFile(int):
Assertion `semanticRun == PASSsemantic3done' failed.
Aborted
wouter@carillon:~/code/d/DustMite$
... and I'm not yet that fluent in D to understand what's going on. Any
ideas?
pass dustmite.d
On Monday, July 02, 2012 12:45:16 Ali Çehreli wrote:
On 07/02/2012 11:36 AM, Jonathan M Davis wrote:
By the way, it's pointless to compile with both -w and -wi. -wi makes
it so
that warnings are displayed without stopping compilation. -w makes it
so that
warnings are displayed and
If you want to play around with that, that's fine, but the
language is not
going to change, so please to post code which uses your
changes. If you start
making changes to the compiler, you can't really expect other
people to help
you figure out what's wrong with your code - especially since
I'm not 100% sure that rdmd is the culprit here, or if it's
something OPTLINK isn't picking up.
Given the following modules:
module a_pkg.a_module;
import std.exception ;
immutable class Test
{
string[string] aa ;
this( )
{
string[string] tmp ;
Wouter Verhelst wou...@grep.be writes:
Trass3r u...@known.com writes:
dmd: glue.c:542: virtual void FuncDeclaration::toObjFile(int):
Assertion `semanticRun == PASSsemantic3done' failed.
Aborted
wouter@carillon:~/code/d/DustMite$
... and I'm not yet that fluent in D to understand what's
Hello List:
I am looking for D code using the gmplib: any hint is welcome.
Thanks in advance,
Jerome
At last a further Stack overflow, maybe you could explain me why.
It comes if i try to outsource the redundant code with a mixin
template like this:
[code]
mixin template TRef(T : Object) {
private:
NotNull!(T) _nn;
public:
@property
NotNull!(T) GetNN() {
I was looking through the bindings and only see a makefile for
GNU make.
Is there a version for dmd? I really wanted to avoid GNU make if
possible.
On Monday, 2 July 2012 at 22:10:00 UTC, Damian wrote:
I was looking through the bindings and only see a makefile for
GNU make.
Is there a version for dmd? I really wanted to avoid GNU make
if possible.
You can try this
https://github.com/AndrejMitrovic/WindowsAPI/downloads
... the order of files matters? Yuck.
Yep it's a bug.
I'm not sure what's going on here. Using this code to solve a
reddit programming challenge to return the Nth term of a
Fibonacci-like sequence of arbitrary length:
module main;
import std.stdio, std.array, std.datetime;
ulong f(int k, int n) {
ulong[] nums = new ulong[k];
Hello,
I'm trying to follow along with a C++ tutorial and translate it
to D but I don't know C/C++ well enough to understand this
#Define statement:
#define ARRAY_COUNT( array ) (sizeof( array ) / (sizeof( array[0]
) * (sizeof( array ) != sizeof(void*) || sizeof( array[0] ) =
So, I wanted to create a number of functions that would call write(),
writef(), writefln(), or writeln() with whatever arguments they were
given, but only if the user had used a 'enable debugging' command-line
option (or some such).
What I first did was this:
module debugout;
int debuglevel;
On Tuesday, 3 July 2012 at 02:20:23 UTC, ixid wrote:
I'm not sure what's going on here. Using this code to solve a
reddit programming challenge to return the Nth term of a
Fibonacci-like sequence of arbitrary length:
module main;
import std.stdio, std.array, std.datetime;
ulong
On Tuesday, 3 July 2012 at 02:34:04 UTC, Dustin wrote:
Hello,
I'm trying to follow along with a C++ tutorial and translate it
to D but I don't know C/C++ well enough to understand this
#Define statement:
#define ARRAY_COUNT( array ) (sizeof( array ) / (sizeof(
array[0] ) * (sizeof( array )
http://d.puremagic.com/issues/show_bug.cgi?id=8185
--- Comment #56 from github-bugzi...@puremagic.com 2012-07-01 23:12:33 PDT ---
Commits pushed to master at
https://github.com/D-Programming-Language/d-programming-language.org
http://d.puremagic.com/issues/show_bug.cgi?id=7610
--- Comment #4 from github-bugzi...@puremagic.com 2012-07-01 23:13:50 PDT ---
Commits pushed to master at
https://github.com/D-Programming-Language/d-programming-language.org
http://d.puremagic.com/issues/show_bug.cgi?id=7973
Denis Shelomovskij verylonglogin@gmail.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=5926
Denis Shelomovskij verylonglogin@gmail.com changed:
What|Removed |Added
Status|ASSIGNED
http://d.puremagic.com/issues/show_bug.cgi?id=7965
--- Comment #4 from Denis Shelomovskij verylonglogin@gmail.com 2012-07-02
12:15:37 MSD ---
I think this bug may be fixed when `std.algorithm` will work.
Example mentioned in this issue description (now fails):
---
import std.array;
import
http://d.puremagic.com/issues/show_bug.cgi?id=7965
--- Comment #5 from Denis Shelomovskij verylonglogin@gmail.com 2012-07-02
12:43:33 MSD ---
Reduced test-case:
---
struct S
{
string str;
uint unused1, unused2 = 0;
}
auto f(alias fun)()
{
struct Result
{
S s;
http://d.puremagic.com/issues/show_bug.cgi?id=4936
Bernard Helyer blood.of.l...@gmail.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=7579
Denis Shelomovskij verylonglogin@gmail.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=7579
Denis Shelomovskij verylonglogin@gmail.com changed:
What|Removed |Added
Keywords|
http://d.puremagic.com/issues/show_bug.cgi?id=8335
Summary: DMD ignoring ref for array arguments
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component:
http://d.puremagic.com/issues/show_bug.cgi?id=8335
Denis Shelomovskij verylonglogin@gmail.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=8336
Summary: Default function parameters ignored by delegate
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=8336
bearophile_h...@eml.cc changed:
What|Removed |Added
CC||bearophile_h...@eml.cc
---
http://d.puremagic.com/issues/show_bug.cgi?id=8336
--- Comment #2 from Puneet Goel pun...@coverify.org 2012-07-02 05:32:59 PDT
---
Default arguments were never reliable for functions called trough a pointer,
so
this little change is expected, take a look at the changelog of 2.060alpha.
I
http://d.puremagic.com/issues/show_bug.cgi?id=3646
Jonathan M Davis jmdavisp...@gmx.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=8336
Jonathan M Davis jmdavisp...@gmx.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=7965
--- Comment #6 from Kenji Hara k.hara...@gmail.com 2012-07-02 08:37:57 PDT ---
(In reply to comment #5)
Reduced test-case:
---
struct S
{
string str;
uint unused1, unused2 = 0;
}
auto f(alias fun)()
{
struct Result
http://d.puremagic.com/issues/show_bug.cgi?id=8335
--- Comment #2 from Kenji Hara k.hara...@gmail.com 2012-07-02 08:58:44 PDT ---
This is definitely a bug, but is really *regression*?
I'd like to know the version of dmd which had worked correctly.
--
Configure issuemail:
http://d.puremagic.com/issues/show_bug.cgi?id=8335
--- Comment #3 from Kenji Hara k.hara...@gmail.com 2012-07-02 09:27:18 PDT ---
(In reply to comment #2)
This is definitely a bug, but is really *regression*?
I'd like to know the version of dmd which had worked correctly.
Ah, OK. I found the
http://d.puremagic.com/issues/show_bug.cgi?id=8335
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Keywords||pull
--- Comment #4
http://d.puremagic.com/issues/show_bug.cgi?id=6419
ponce alil...@gmail.com changed:
What|Removed |Added
CC||alil...@gmail.com
---
http://d.puremagic.com/issues/show_bug.cgi?id=8185
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=8338
Summary: Unqual doesn't work properly on arrays
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=8338
--- Comment #2 from Kenji Hara k.hara...@gmail.com 2012-07-02 19:41:54 PDT ---
But, changing its implementation would break *maby* existing codes, so,
s/maby/many/
--
Configure issuemail:
http://d.puremagic.com/issues/show_bug.cgi?id=8338
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Version|unspecified |D2
--- Comment #1
http://d.puremagic.com/issues/show_bug.cgi?id=8338
--- Comment #3 from Jonathan M Davis jmdavisp...@gmx.com 2012-07-02 20:03:22
PDT ---
Maybe. But I'm not completely convinced that it would break all that much code
- particularly since I would have expected any code using Unqual to be written
1 - 100 of 104 matches
Mail list logo