I just found out that Bitbucket finally offers Git support. I wonder,
would anyone else like to see GDC switch to Git? I would like to kindly
make a request because it would make things little easier.
And then there is Chapel, but I think you already know about it. I've had
my eye on Chapel for a while. I like its 'Configs' features, but that's a
small one.
Nowadays everyone seems to be developing some new programming language. I
just discovered Nu today:
http://en.wikipedia.org/wiki/Nu_(programming_language)
This blog post describes some recent work to reduce RAM used by Firefox (that
is partially written in C++ and partially in JavaScript):
http://blog.mozilla.com/nnethercote/2011/11/01/spidermonkey-is-on-a-diet/
The blog post describes operations that a well designed low-level language has
not ju
On 11/01/2011 10:04 AM, kenji hara wrote:
--1;
It you want to reduce duplication of long code, you can use string mixin.
enum code = q{ ...long code... };
static if (is(typeof({ mixin(code); })))
{
mixin(code);
}
else
{
...
}
Please no! I've thought for years that string mixins are seri
> So I think this should compile:
>
> char[] foo(string s1, string s2) pure {
> return s1 ~ s2;
> }
> void main() {}
The situation is a bit more complex:
char[] foo(immutable string s1, immutable string s2) pure {
return s1 ~ s2;
}
void main() {
string t1 = "foo";
string t2 = "ba
In the meantime Walter has added the patch to the latest DMD.
Timon Gehr:
> That works without the cast.
> That works without the ".ptr".
Right. There is an implict conversion between the 2-word struct of the string
to the nude pointer.
> I was casting to char*, not const(char*). It is just t
Am 26.10.2011, 16:00 Uhr, schrieb Steven Schveighoffer
:
On Mon, 24 Oct 2011 22:50:33 -0400, Marco Leise
wrote:
Am 14.09.2011, 18:57 Uhr, schrieb Steven Schveighoffer
:
On Wed, 14 Sep 2011 12:50:25 -0400, Timon Gehr
wrote:
On 09/14/2011 04:08 PM, Robert McGinley wrote:
Hey all,
You could use a tree for that, but my understanding is that a heap is
much
more efficient?
Yes. I have a feeling dcollections will use heap from phobos (to avoid
duplication) for a full priority queue.
-Steve
I tried a Fibonacci tree. It didn't beat the good old array based priority
q
On Mon, Oct 31, 2011 at 7:07 AM, Steven Schveighoffer
wrote:
> I personally guarantee that dcollections will persist as long as
std.container's design is not modified to become like dcollections'.
Simply because I need it for my projects :) And I'm not going to some
other language any time soon.
Steven,
I see, but here's IsStaticArray from traits.d
template isStaticArray(T : U[N], U, size_t N)
{
enum bool isStaticArray = true;
}
template isStaticArray(T)
{
enum bool isStaticArray = false;
}
It looks like the first version is using the "[]" format. It is different
in that it ha
Robert,
I tried using variant.d using your exact test program below and I got
compiler errors:
$ dmd variant.d dtest.d
variant.d(273): Error: no property 'length' for type 'Result'
variant.d(273): Error: no property 'length' for type 'Result'
variant.d(274): Error: no property 'length' for type
Fawzi Mohamed writes:
> I was also surprised about how many already heard something about D, I got
> even some questions about D1/D2 tango/phobos.
> My answers were something along these lines:
> - D2 toolchain becoming now robust enough to be chosen for new projects (with
> gdc finally also 64
Am 01.11.2011 17:46, schrieb Vladimir Panteleev:
On Tue, 01 Nov 2011 18:33:56 +0200, dennis luehring
wrote:
introduces an compiletime scope - what would the following code mean?
"debug", "version", "static if" don't create scopes.
i know - wrong name for the block between the try{...}
st
--1;
It you want to reduce duplication of long code, you can use string mixin.
enum code = q{ ...long code... };
static if (is(typeof({ mixin(code); })))
{
mixin(code);
}
else
{
...
}
Kenji Hara
2011/10/31 Mehrdad :
> I've written this piece of code a fair number of times:
>
> static if
On Tue, 01 Nov 2011 18:33:56 +0200, dennis luehring
wrote:
introduces an compiletime scope - what would the following code mean?
"debug", "version", "static if" don't create scopes.
--
Best regards,
Vladimirmailto:vladi...@thecybershadow.net
Am 31.10.2011 02:21, schrieb Mehrdad:
I've written this piece of code a fair number of times:
static if (is(typeof(foo( { foo(); }
else { bar(); }
When the expression inside the condition (i.e. the call to foo()) gets
complicated, you get lots of code duplication and things be
On Sun, 30 Oct 2011 21:21:58 -0400, Mehrdad wrote:
I've written this piece of code a fair number of times:
static if (is(typeof(foo( { foo(); }
else { bar(); }
When the expression inside the condition (i.e. the call to foo()) gets
complicated, you get lots of code duplication
On 11/01/2011 01:38 AM, bearophile wrote:
Timon Gehr:
extern(C) void foo(char* str);
foo(cast(char*)"hello");
cast(char*) is D code, it's not a legacy C idiom, so you are writing it now in
the D programs. Five years from now do you prefer D programmers to write:
extern(C) void puts(const cha
19 matches
Mail list logo