On 03/24/2011 10:18 PM, Ishan Thilina wrote:
> Hi,
>
> I'm still new to D. I tried to implement a stack using templates. But
I get an
> "Access Violation" error when I try to run a test on the stack that I
made.The
> source code is attached with this mail. Can somebody please point out the
> er
On Fri, 25 Mar 2011 06:18:21 +0100, Ishan Thilina
wrote:
Hi,
I'm still new to D. I tried to implement a stack using templates. But I
get an
"Access Violation" error when I try to run a test on the stack that I
made.The
source code is attached with this mail. Can somebody please point ou
Hi,
I'm still new to D. I tried to implement a stack using templates. But I get an
"Access Violation" error when I try to run a test on the stack that I made.The
source code is attached with this mail. Can somebody please point out the
error of this code?
begin 644 main.d
M;6]D=6QE(&UA:6X[#0H-"FEM
bearophile Wrote:
> A little quiz for people here: guess the output of this little D2 program (it
> compiles correctly and doesn't crash at run time, so it's a fair question):
>
>
> import std.typecons: tuple;
> import std.c.stdio: printf;
>
> auto foo() {
> printf("foo\n");
> return t
On 03/25/2011 01:50 AM, bearophile wrote:
A little quiz for people here: guess the output of this little D2 program (it
compiles correctly and doesn't crash at run time, so it's a fair question):
import std.typecons: tuple;
import std.c.stdio: printf;
auto foo() {
printf("foo\n");
r
A little quiz for people here: guess the output of this little D2 program (it
compiles correctly and doesn't crash at run time, so it's a fair question):
import std.typecons: tuple;
import std.c.stdio: printf;
auto foo() {
printf("foo\n");
return tuple(1, 2);
}
void main() {
foreac
> I agree. The second reduction I've written seems fit for Bugzila.
http://d.puremagic.com/issues/show_bug.cgi?id=5783
Hmm... Spent a few hours trying to figure out how to update GCC and
all to conform to the requirements for 2.0.52, and at seems that it
compiles my small test program just fine, but it fails on compiling
the main project for some reason. And the linker outputs
half-scrambled things. Anyway, here's
On Wed, 23 Mar 2011 16:14:55 -0400, bearophile
wrote:
Magnus Lie Hetland:
Any way to do that without (to be deprecated) typedef?
At the moment with a struct that contains an "alias this", I presume...
And the alias this must point to a getter property to avoid the problem of
implicitl
Jonathan M Davis:
> Regardless, this _is_ a bug.
I agree. The second reduction I've written seems fit for Bugzila.
Bye,
bearophile
> On 2011-03-24 18:25:30 +0100, bearophile said:
> > Magnus Lie Hetland:
> >> I guess this is getting old by now ... but I've come across yet another
> >> bug :->
> >
> > The out(result) turns the result into a const,
>
> Riiight! Yes, I've seen that it's const, and (naughtily) cast away the
> co
Is there a copy of the official D grammar somewhere online? I wrote a
lexer for my Compiler class and would love to try and apply it to
another grammar.
The official D grammar is spread among the specification.
But I recall that someone compiled a complete grammar for D1 some time ago.
On 2011-03-24 18:25:30 +0100, bearophile said:
Magnus Lie Hetland:
I guess this is getting old by now ... but I've come across yet another bug :->
The out(result) turns the result into a const,
Riiight! Yes, I've seen that it's const, and (naughtily) cast away the
constness (without modif
Magnus Lie Hetland:
> I guess this is getting old by now ... but I've come across yet another bug
> :->
The out(result) turns the result into a const, this causes some troubles you
see in this simpler program:
import std.typecons;
void main() {
alias Tuple!(int) T;
const T t = T();
I guess this is getting old by now ... but I've come across yet another bug :->
This one is a bit obscure, and deals with comparing tuples in
contracts. It seems that some type information about the result is lost
when entering an out-block, or something. At least, DMD (2.052, OS X)
is unable
Dainius (GreatEmerald) Wrote:
> Ah, including pthread indeed works, but now I've run into another
> problem related to Linux and architecture. I want to use D for my
> program that also uses things like SDL and Lua. Earlier when I
> compiled it, I always did so with 64-bit libraries. But D is so f
> Caligo Wrote:
> > Greetings,
> >
> > I have a C++ class that I would like to rewrite it in D. The class
> > has members that are declared as 'mutable'. How do I achieve the same
> > effect in D? if not, what is recommended?
>
> const int a=0;
> *cast(int*)&a=1;
There are so many reasons to c
Ah, including pthread indeed works, but now I've run into another
problem related to Linux and architecture. I want to use D for my
program that also uses things like SDL and Lua. Earlier when I
compiled it, I always did so with 64-bit libraries. But D is so far
only in 32-bits, thus when compiling
Caligo Wrote:
> Greetings,
>
> I have a C++ class that I would like to rewrite it in D. The class
> has members that are declared as 'mutable'. How do I achieve the same
> effect in D? if not, what is recommended?
const int a=0;
*cast(int*)&a=1;
On 03/24/2011 08:53 AM, Alexey Prokhin wrote:
Currently, as far as I know, there are only two lexers and two parsers for
D: the C++ front end which dmd, gdc, and ldc use and the D front end which
ddmd uses and which is based on the C++ front end. Both of those are under
the GPL (which makes th
> Currently, as far as I know, there are only two lexers and two parsers for
> D: the C++ front end which dmd, gdc, and ldc use and the D front end which
> ddmd uses and which is based on the C++ front end. Both of those are under
> the GPL (which makes them useless for a lot of stuff) and both of
On 3/24/2011 12:23 AM, Caligo wrote:
Greetings,
I have a C++ class that I would like to rewrite it in D. The class
has members that are declared as 'mutable'. How do I achieve the same
effect in D? if not, what is recommended?
You don't. Specific recommendations would depend on how the clas
> Greetings,
>
> I have a C++ class that I would like to rewrite it in D. The class
> has members that are declared as 'mutable'. How do I achieve the same
> effect in D? if not, what is recommended?
You don't - or at least it's generally inadvisable to try. Unlike C++, const
in D is transitiv
Greetings,
I have a C++ class that I would like to rewrite it in D. The class
has members that are declared as 'mutable'. How do I achieve the same
effect in D? if not, what is recommended?
On 3/23/2011 12:45 PM, Magnus Lie Hetland wrote:
Any way to do that without (to be deprecated) typedef?
Nothing pretty, at least not yet. bearophile's suggestion is about as
close as you can get right now.
25 matches
Mail list logo