Code:
import std.file;
import std.stdio;
void main()
{
writeln(DirEntry(F:\\).isDir());
writeln(DirEntry(F:).isDir());
writeln(DirEntry(F:\\folder\\).isDir());
writeln(DirEntry(F:\\folder).isDir());
writeln(F:\\.isDir());
writeln(F:.isDir());
On Sunday, 24 February 2013 at 19:20:06 UTC, cal wrote:
On Sunday, 24 February 2013 at 17:30:14 UTC, Damian wrote:
That solution is ok for 1 argument but for many arguments it
wont suffice.
This is issue 5028.
What is the problem with many arguments? I'm probably
misunderstanding, but e.g.
On Sunday, 24 February 2013 at 19:13:47 UTC, Jonathan M Davis
wrote:
On Sunday, February 24, 2013 14:05:26 Timon Gehr wrote:
On 02/24/2013 01:59 PM, Maxim Fomin wrote:
On Sunday, 24 February 2013 at 09:00:17 UTC, Jonathan M
Davis wrote:
Because main_cont is module-level variable, it must be
On Monday, 25 February 2013 at 08:20:31 UTC, Josh wrote:
[SNIP]
Josh
Seems like a massive bug in DirEntry: It doesn't have a
constructor, meaning anybody using DirEntry will actually get
DirEntry.init.
The workaround is to use the function dirEntry, which returns
an initialized
On Monday, 25 February 2013 at 12:34:05 UTC, monarch_dodra wrote:
On Monday, 25 February 2013 at 08:20:31 UTC, Josh wrote:
[SNIP]
Josh
Seems like a massive bug in DirEntry: It doesn't have a
constructor, meaning anybody using DirEntry will actually get
DirEntry.init.
The workaround is
On Monday, 25 February 2013 at 13:45:31 UTC, Maxim Fomin wrote:
On Monday, 25 February 2013 at 12:34:05 UTC, monarch_dodra
wrote:
On Monday, 25 February 2013 at 08:20:31 UTC, Josh wrote:
[SNIP]
Josh
Seems like a massive bug in DirEntry: It doesn't have a
constructor, meaning anybody using
On Monday, 25 February 2013 at 14:07:10 UTC, monarch_dodra wrote:
On Monday, 25 February 2013 at 13:45:31 UTC, Maxim Fomin wrote:
On Monday, 25 February 2013 at 12:34:05 UTC, monarch_dodra
wrote:
On Monday, 25 February 2013 at 08:20:31 UTC, Josh wrote:
[SNIP]
Josh
Seems like a massive bug
On Monday, 25 February 2013 at 16:32:50 UTC, js.mdnq wrote:
We have __FILE__ and __LINE__. Is there a __FUNCTION__ that
gives the current function name? This helps with errors.
Have a look here:
http://wiki.dlang.org/Using_string_mixins_for_logging
On 25/02/2013 16:32, js.mdnq wrote:
We have __FILE__ and __LINE__. Is there a __FUNCTION__ that gives the
current function name? This helps with errors.
You can define a string mixin to use instead of __FUNCTION__:
enum string parentName = q{__traits(identifier, __traits(parent, {}))};
void
We have __FILE__ and __LINE__. Is there a __FUNCTION__ that gives
the current function name? This helps with errors.
On Monday, February 25, 2013 13:34:04 monarch_dodra wrote:
On Monday, 25 February 2013 at 08:20:31 UTC, Josh wrote:
[SNIP]
Josh
Seems like a massive bug in DirEntry: It doesn't have a
constructor, meaning anybody using DirEntry will actually get
DirEntry.init.
The workaround is to
Does anyone have any experience using PostgreSQL with D?
I've found several libraries, but I'm uncertain which is usable
(if any..)
https://github.com/zhaopuming/pqd
https://github.com/denizzzka/dpq2
On Monday, 25 February 2013 at 18:23:52 UTC, Jonathan M Davis
wrote:
What I find most odd is that DirEntry(foo) even compiles.
It's not giving you
DirEntry.init. It's giving you a DirEntry with its first field
initialized
(which happens to be its name, but that could theoretically
change,
You have recently added:
http://rosettacode.org/wiki/Parse_command-line_arguments#D
http://rosettacode.org/wiki/Old_Russian_measure_of_length#D
http://rosettacode.org/wiki/Truth_table#D
But maybe there is one more Task you have recently added that I
have missed.
Bye,
bearophile
On 25-2-2013 22:54, bearophile wrote:
You have recently added:
http://rosettacode.org/wiki/Parse_command-line_arguments#D
http://rosettacode.org/wiki/Old_Russian_measure_of_length#D
http://rosettacode.org/wiki/Truth_table#D
Yes.
But maybe there is one more Task you have recently added that
Two notes born from a Rosettacode entry
(http://rosettacode.org/wiki/Align_columns#D ), but general to
deserve their own post.
This program has a bug:
import std.stdio, std.string, std.algorithm, std.range;
void main() {
auto data =
These just give me the size of a *reference* to the class:
class Foo {...}
Foo.sizeof
typeid(Foo).tsize
How can I get the size of a non-subclassed *instance*?
On Monday, February 25, 2013 21:29:28 monarch_dodra wrote:
Since you are the one that refactored, what was the point of
those _init functions? Wouldn't they have better worked as
private constructors?
It's the way that it's always been, but I don't currently remember the details
of why I made
On Tue, 26 Feb 2013 01:54:44 +0100
bearophile bearophileh...@lycos.com wrote:
Nick Sabalausky:
How can I get the size of a non-subclassed *instance*?
Is this enough?
http://dlang.org/traits.html#classInstanceSize
Ahh, yes, of course. I had a feeling I was overlooking something
On 2/25/13, js.mdnq js_adddot+m...@gmail.com wrote:
We have __FILE__ and __LINE__. Is there a __FUNCTION__ that gives
the current function name? This helps with errors.
We'll have it sometime soon.
http://d.puremagic.com/issues/show_bug.cgi?id=5140
http://rosettacode.org/wiki/Truth_table#D
Some changes:
http://codepad.org/PEZWmrHG
But it's not good enough yet :-) Maybe there are ways to produce
a D version closed to the Go one.
Bye,
bearophile
25.02.2013 3:59, monarch_dodra пишет:
I don't see any any calls to remove, so I'm not sure what the algorithm
is. Wouldn't patch just grow and grow and grow?
Regardless, the design of DList is currently flawed (but a pull is open
to fix it), in the sense that a DList is just a handle on a
On 02/24/2013 05:39 PM, H. S. Teoh wrote:
On Sun, Feb 24, 2013 at 03:14:01PM -0800, Charles Hixson wrote:
Given a struct with:
~this()
{ close(); }
voidclose()
{ if (currentKey !is null) currentKey = null;
if (cursor is null)return;
On 26-2-2013 5:19, bearophile wrote:
http://rosettacode.org/wiki/Truth_table#D
Some changes:
http://codepad.org/PEZWmrHG
But it's not good enough yet :-) Maybe there are ways to produce a D version
closed to the Go one.
I would have prefered to write:
bool xor(in bool A, in bool B) pure
24 matches
Mail list logo