Check your client setting, everything is perfect on my side (Opera
built-in news client).
On Saturday 18 December 2010 23:01:30 doubleagent wrote:
> Andrei's quick dictionary illustration [in his book, 'The D Programming
> Language'] doesn't seem to work. Code attached.
>
> On my computer, with d2-0.5.0, I got the following output while testing.
>
> andrei
> 0 andrei
> andrei
>
Compared to the relatively snappy response other threads have been receiving I'm
going to assume that nobody is interested in my inquiry.
That's cool. Can anybody point me to an IRC chatroom for D noobs, and is there
anywhere to post errata for the book?
On Sunday 19 December 2010 18:33:56 bearophile wrote:
> Jonathan M Davis:
> > Whereas, I would argue that it's completely unnecessary.
>
> Recently even the Oracle Java VM allocates some class instances on the
> stack, when Escape Analysis finds it's safe to do so. And D lacks the very
> efficient
Jonathan M Davis:
> Whereas, I would argue that it's completely unnecessary.
Recently even the Oracle Java VM allocates some class instances on the stack,
when Escape Analysis finds it's safe to do so. And D lacks the very efficient
GC of the JVM, so for D it's even more important to use the st
On Sunday 19 December 2010 18:13:54 Nick Voronin wrote:
> On Sun, 19 Dec 2010 17:26:20 -0800
>
> Jonathan M Davis wrote:
> > On Sunday 19 December 2010 16:50:34 Nick Voronin wrote:
> > > On Sun, 19 Dec 2010 14:38:17 -0800
> > >
> > > Jonathan M Davis wrote:
> > > > On Sunday 19 December 2010 14
On Sun, 19 Dec 2010 17:26:20 -0800
Jonathan M Davis wrote:
> On Sunday 19 December 2010 16:50:34 Nick Voronin wrote:
> > On Sun, 19 Dec 2010 14:38:17 -0800
> >
> > Jonathan M Davis wrote:
> > > On Sunday 19 December 2010 14:26:19 bearophile wrote:
> > > > Jonathan M Davis:
> > > > > There will
So, should I report this as a bug?
What am i saying!? of course I should. It annoyed the hell outta me >_<
*goes to report*
Add -Ifullpath_to_projectfolder\src. It's the way it works IMHO, if you import
something it must be relative to search path or to current dir. There may be a
better way (replace current dir with the dir where source is, but it will take
away control), but this works.
There is a bug though,
On Mon, 20 Dec 2010 01:24:02 +0100
CrypticMetaphor wrote:
> Anyway, the problem is, if I call rdmd from outside the folder in which
> the main source resides in, and main includes another file in that
> folder, I get an error.
> // If I'm in a shell, and I do this, I get an error:
> ...\projec
On Sunday 19 December 2010 16:50:34 Nick Voronin wrote:
> On Sun, 19 Dec 2010 14:38:17 -0800
>
> Jonathan M Davis wrote:
> > On Sunday 19 December 2010 14:26:19 bearophile wrote:
> > > Jonathan M Davis:
> > > > There will be a library solution to do it, but again, it's unsafe.
> > >
> > > It can
On 12/20/10, Nick Voronin wrote:
> I see two aspects there: first is having destructor called at known point
> rather than arbitrarily, second is performance.
>
There's still an alternative for the first part, scope(exit):
import std.stdio;
class A
{
~this()
{
writeln("A.dtor");
On Sun, 19 Dec 2010 14:38:17 -0800
Jonathan M Davis wrote:
> On Sunday 19 December 2010 14:26:19 bearophile wrote:
> > Jonathan M Davis:
> > > There will be a library solution to do it, but again, it's unsafe.
> >
> > It can be safer if the compiler gives some help. For me it's one of the
> > im
Hello, I'm being driven nuts by this problem, I don't know 100% if it's
it's a bug or if it's intended behavior, I'm new to D( also new to
reporting bugs ) so I can't really tell.
Anyway, the problem is, if I call rdmd from outside the folder in which
the main source resides in, and main inclu
On Sunday 19 December 2010 14:26:19 bearophile wrote:
> Jonathan M Davis:
> > There will be a library solution to do it, but again, it's unsafe.
>
> It can be safer if the compiler gives some help. For me it's one of the
> important unfinished parts of D.
Whereas, I would argue that it's complete
On Sunday 19 December 2010 13:23:42 Jonathan M Davis wrote:
> On Monday 20 December 2010 07:00:31 David Currie wrote:
> > I am new to D (like many have done C++ , Java ).
> >
> > Can a class be instantiated on the stack ?
> >
> > eg
> >
> > class C
> > {
> >
> >private int _I1;
> >priv
Jonathan M Davis:
> There will be a library solution to do it, but again, it's unsafe.
It can be safer if the compiler gives some help. For me it's one of the
important unfinished parts of D.
Bye,
bearophile
On Monday 20 December 2010 07:00:31 David Currie wrote:
> I am new to D (like many have done C++ , Java ).
>
> Can a class be instantiated on the stack ?
>
> eg
>
> class C
> {
>private int _I1;
>private int _I2;
>
>public:
>
>this(int pI) // constructor
>{
> _I1 = p
On Mon, 20 Dec 2010 07:00:31 -0800
David Currie wrote:
> Can a class be instantiated on the stack ?
Yes, check std.conv.emplace
http://www.digitalmars.com/d/2.0/phobos/std_conv.html#emplace and alloca()
I don't know details about interaction of such objects with GC though.
Also there is scarce
Andrej Mitrovic:
> Is this another bug?:
I don't exactly know what's going on, but I have added a modified version of
your code to the issue 5115.
Bye,
bearophile
Andrej Mitrovic:
> There's also scoped() in std.typecons, but I think this will still
> allocate on the heap. Not sure..
It allocates on the stack.
Bye,
bearophile
On 12/19/10, bearophile wrote:
>> See the std.conv.emplace,
>
> Sorry, see std.typecons.scoped and its problems:
> http://d.puremagic.com/issues/show_bug.cgi?id=5115
>
> Bye,
> bearophile
>
Is this another bug?:
import std.stdio;
import std.typecons;
class A
{
~this()
{
writeln(
There's also scoped() in std.typecons, but I think this will still
allocate on the heap. Not sure..
On 12/19/10, bearophile wrote:
> David Currie:
>
>> I am new to D (like many have done C++ , Java ).
>
> Welcome to D :-)
> What language do you refer to, D1 or D2? The answers here are about the
>
On 12/20/2010 04:00 PM, David Currie wrote:
I am new to D (like many have done C++ , Java ).
Me too. Let's see what we can figure out together :-)
Can a class be instantiated on the stack ?
eg
class C
{
private int _I1;
private int _I2;
public:
this(int pI) // constructor
{
_I1 = pI;
_I
> See the std.conv.emplace,
Sorry, see std.typecons.scoped and its problems:
http://d.puremagic.com/issues/show_bug.cgi?id=5115
Bye,
bearophile
Denis Koroskin:
> Unfortunately last I've heard it's going to be deprecated in favor of a
> library solution:
>
> InSitu!(C) c = InSitu!(C)(3); // IIRC not implemented yet
It's named scoped, see about its problems:
http://d.puremagic.com/issues/show_bug.cgi?id=5115
Bye,
bearophile
David Currie:
> I am new to D (like many have done C++ , Java ).
Welcome to D :-)
What language do you refer to, D1 or D2? The answers here are about the latest
versions of D2.
> Can a class be instantiated on the stack ?
There was a way built in the language to do that (using "scope", it wor
On Mon, 20 Dec 2010 18:00:31 +0300, David Currie
wrote:
I am new to D (like many have done C++ , Java ).
Can a class be instantiated on the stack ?
eg
class C
{
private int _I1;
private int _I2;
public:
this(int pI) // constructor
{
_I1 = pI;
_I2 = pI + 1;
}
On Mon, 20 Dec 2010 18:00:31 +0300, David Currie
wrote:
I am new to D (like many have done C++ , Java ).
Can a class be instantiated on the stack ?
eg
class C
{
private int _I1;
private int _I2;
public:
this(int pI) // constructor
{
_I1 = pI;
_I2 = pI + 1;
}
I am new to D (like many have done C++ , Java ).
Can a class be instantiated on the stack ?
eg
class C
{
private int _I1;
private int _I2;
public:
this(int pI) // constructor
{
_I1 = pI;
_I2 = pI + 1;
}
// ... other methods etc
}
void f() // just a function
{
C my
spir wrote:
> On Sat, 18 Dec 2010 13:08:14 +
> Adam Burton wrote:
>
>> > struct S {
>> > int value;
>> > void opAssign(int value) {
>> > this.value = value;
>> > }
>> > }
>> > unittest {
>> > S s1;
>> > s1 = 3;// OK
>> > S s2 = 3; // _build_ error
>
On Sun, 19 Dec 2010 03:37:37 -0600
Christopher Nicholson-Sauls wrote:
> On 12/18/10 07:19, spir wrote:
> > Hello,
> >
> >
> > I cannot find a way to define methods (I mean "member functions) outside
> > the main type-definition body:
> >
> > struct X {}
> > void X.say () {writeln("I say!");}
On Sun, 19 Dec 2010 10:50:08 +0100
Joost 't Hart wrote:
> >> Quoting the documentation:
> >>
> >> /Suspends the calling thread for at least the supplied period./
> >>
> >> What does "at least" mean here? Is there also an "at most"? I do not
> >> want my friend to end up in cyberspace. :-)
> >
> >
On 12/19/2010 09:56 AM, Nick Voronin wrote:
On Sat, 18 Dec 2010 23:19:47 +0100
Joost 't Hart wrote:
Quoting the documentation:
/Suspends the calling thread for at least the supplied period./
What does "at least" mean here? Is there also an "at most"? I do not
want my friend to end up in cybe
On 12/18/10 07:19, spir wrote:
> Hello,
>
>
> I cannot find a way to define methods (I mean "member functions) outside the
> main type-definition body:
>
> struct X {}
> void X.say () {writeln("I say!");}
> ==>
> Element.d(85): semicolon expected, not '.'
>
> Do I overlook anything, or is this
Nick Voronin wrote:
> On Sat, 18 Dec 2010 23:19:47 +0100
> Joost 't Hart wrote:
>
>> Quoting the documentation:
>>
>> /Suspends the calling thread for at least the supplied period./
>>
>> What does "at least" mean here? Is there also an "at most"? I do not
>> want my friend to end up in cyberspa
On Sat, 18 Dec 2010 23:19:47 +0100
Joost 't Hart wrote:
> Quoting the documentation:
>
> /Suspends the calling thread for at least the supplied period./
>
> What does "at least" mean here? Is there also an "at most"? I do not
> want my friend to end up in cyberspace. :-)
Nope, there isn't :)
37 matches
Mail list logo