On 02/28/2012 07:27 AM, Joshua Niehus wrote:
On Tuesday, 28 February 2012 at 06:10:11 UTC, Jesse Phillips wrote:
It is a template.
I see, thanks.
And I bet its not possible to figure out if a template is a function
template or a class template etc...
You can trivially test whether the
2012/2/28 Pedro Lacerda pslace...@gmail.com
So are a newly allocated array and a null one just the same thing?
int[] a = [], b = null;
assert(a == b);
assert(a.length == b.length);
assert(a.ptr == a.ptr);
Hi all,
Sorry if this is a stupid question - I'm new to D but I've
Mikael Lindsten:
Coming from the Java/C# world, not distinguishing between an empty array
and null feels strange to me. Is this so for strings as well? ...and in
Pedros example, if you assign null to b and then try to access b.length,
don't you get a NullPointerException? What am I missing?
On 28.02.2012 2:17, Ali Çehreli wrote:
On 02/27/2012 02:06 PM, Jonathan M Davis wrote:
I'm not saying that dmd doesn't ever optimize switch statements. I'm
just
saying that as I understand it, it doesn't always do so (its
performance with
ranged case statements isn't great for instance).
On Tuesday, 28 February 2012 at 08:38:10 UTC, Mikael Lindsten
wrote:
Coming from the Java/C# world, not distinguishing between an
empty array
and null feels strange to me. Is this so for strings as well?
...and in
Pedros example, if you assign null to b and then try to access
b.length,
don't
2012/2/28 Jesse Phillips jessekphillip...@gmail.com
string is an array, alias immutable(char)[], so the same rules apply.
I know about string being an alias, hence the question. This means that I
can doif (someString.length) { ... }without worrying about the null
case (?). That's
I'm getting some unexpected results (crashes or random behavior) when
using a wrapped C struct in a library. I have no idea why this is
happening as everything else (including other wrapped structs) seems to
work just fine.
Could it be some alignment issues..?
extern(C):
//typedef
On 02/28/2012 05:25 AM, Mikael Lindsten wrote:
This means that
I can doif (someString.length) { ... }without worrying about the
null case (?). That's great!
Correct
http://d.puremagic.com/issues/show_bug.cgi?id=5570
On Tue, 28 Feb 2012 16:58:13 +0100, Trass3r u...@known.com wrote:
http://d.puremagic.com/issues/show_bug.cgi?id=5570
Thanks. I've literally spent hours testing various things without any luck
- would have been simpler if I knew asm :/
A blocker for using x64 on linux then.
Hello everyone,
I have the following code snippet:
import core.time:TickDuration;
import std.datetime: StopWatch, AutoStart;
void main()
{
auto wait = TickDuration.from!`msecs`(1000);
auto timer = StopWatch(AutoStart.yes);
while (timer.peek wait) // Okay.
{ }
while
On Tuesday, February 28, 2012 19:15:01 Matej Nanut wrote:
Hello everyone,
I have the following code snippet:
import core.time: TickDuration;
import std.datetime: StopWatch, AutoStart;
void main()
{
auto wait = TickDuration.from!`msecs`(1000);
auto timer =
Also you can force property calls in your code if you compile with
-property. Property notation has not been enforced so far, but might
be in the future afaik.
So I can call any (void) method without parenthesis without -property?
I guess I'll just add -property to all my programs from now on. But
why isn't .peek() a property? In std.container, for example, the
BinaryHeap has a .front property (even though it isn't declared as
such on dlang.org, but the
On Tuesday, February 28, 2012 06:56:10 Joshua Niehus wrote:
Hello,
I dont understand the following snippet's output:
import std.stdio, std.traits;
void main() {
writeln(isSomeFunction!(writeln));
writeln(isCallable!(writeln));
writeln(Yes I am...);
}
/* OUTPUT */
false
false
Yes
On Tuesday, February 28, 2012 20:14:14 Matej Nanut wrote:
So I can call any (void) method without parenthesis without -property?
I guess I'll just add -property to all my programs from now on. But
why isn't .peek() a property? In std.container, for example, the
BinaryHeap has a .front property
A blocker for using x64 on linux then.
Use gdc. Better codegen anyway.
On 2/29/2012 1:10 AM, simendsjo wrote:
On Tue, 28 Feb 2012 16:58:13 +0100, Trass3r u...@known.com wrote:
http://d.puremagic.com/issues/show_bug.cgi?id=5570
Thanks. I've literally spent hours testing various things without any
luck - would have been simpler if I knew asm :/
A blocker for
Greetings!
I have this program,
import std.process : system;
import std.stdio;
int main(char[][] args)
{
char[] cmd;
for (int i=1;iargs.length;i++)
{
cmd ~= args[i] ~ ;
}
writefln(cmd);
return(1);
}
if I compile it and run it this way,
test 1! 2@ 3 4#
the result is
1! 2@ 3
On 29 February 2012 18:51, jic cabr...@wrc.xerox.com wrote:
Greetings!
I have this program,
import std.process : system;
import std.stdio;
int main(char[][] args)
{
char[] cmd;
for (int i=1;iargs.length;i++)
{
cmd ~= args[i] ~ ;
}
writefln(cmd);
return(1);
}
if I
On Wed, 29 Feb 2012 05:03:30 +0100, Mike Parker aldac...@gmail.com wrote:
On 2/29/2012 1:10 AM, simendsjo wrote:
On Tue, 28 Feb 2012 16:58:13 +0100, Trass3r u...@known.com wrote:
http://d.puremagic.com/issues/show_bug.cgi?id=5570
Thanks. I've literally spent hours testing various things
On 29 February 2012 19:30, simendsjo simend...@gmail.com wrote:
On Wed, 29 Feb 2012 05:03:30 +0100, Mike Parker aldac...@gmail.com wrote:
On 2/29/2012 1:10 AM, simendsjo wrote:
On Tue, 28 Feb 2012 16:58:13 +0100, Trass3r u...@known.com wrote:
On 29-2-2012 7:06, James Miller wrote:
On 29 February 2012 18:51, jiccabr...@wrc.xerox.com wrote:
Greetings!
I have this program,
import std.process : system;
import std.stdio;
int main(char[][] args)
{
char[] cmd;
for (int i=1;iargs.length;i++)
{
cmd ~= args[i] ~ ;
}
On Wednesday, 29 February 2012 at 06:30:27 UTC, simendsjo wrote:
A strange thing is that memory consumption went _up_ when
everything was compiled as x32.
Data/code/symbols size?
On 29 February 2012 20:21, Jos van Uden user@domain.invalid wrote:
On 29-2-2012 7:06, James Miller wrote:
On 29 February 2012 18:51, jiccabr...@wrc.xerox.com wrote:
Greetings!
I have this program,
import std.process : system;
import std.stdio;
int main(char[][] args)
{
char[] cmd;
25 matches
Mail list logo