Yes, this seems to be a DMD codegen bug – works with LDC.
David
Suppose I have the following library structure (from Andrei
Alexandrescu 'The D Programming Language' pag. 352)
acme
├── algebra.d
└── io
└── file.d
// acme/algebra.d
module algebra;
import std.stdio;
public void gun() {
writeln(algebra-gun);
}
// acme/io/file.d
import std.stdio;
On 2013-01-16 12:25, o3o wrote:
Suppose I have the following library structure (from Andrei
Alexandrescu 'The D Programming Language' pag. 352)
acme
├── algebra.d
└── io
└── file.d
// acme/algebra.d
module algebra;
import std.stdio;
public void gun() {
writeln(algebra-gun);
}
//
Hello, I'm kinda ashamed to ask that here, but std.datetime
documentation is so complex... I only want to get hour/minute from a
t_time (no timezone).
I'm moving to D2, the equivalent code in D1 was:
std.date.Date date;
date.parse(std.date.toUTCString(time));
date.hour;
Nevermind, found it myself.
SysTime* sys = new SysTime(standardTime, UTC());
sys.hour;
Le 16/01/2013 08:07, n00b a écrit :
Hello, I'm kinda ashamed to ask that here, but std.datetime
documentation is so complex... I only want to get hour/minute from a
t_time (no timezone).
I'm moving to D2,
On Wednesday, 16 January 2013 at 12:00:54 UTC, Jacob Carlborg
wrote:
Thanks for your prompt response.
[cut]
You usually place it in a common directory. You then use the -I
switch to make the compiler aware of this directory.
Let me play with some scenario: I've a library 'acme' release 1.0
On Wednesday, January 16, 2013 09:15:39 n00b wrote:
Nevermind, found it myself.
SysTime* sys = new SysTime(standardTime, UTC());
sys.hour;
Le 16/01/2013 08:07, n00b a écrit :
Hello, I'm kinda ashamed to ask that here, but std.datetime
documentation is so complex... I only want to get
On 2013-01-16 16:08, o3o wrote:
Let me play with some scenario: I've a library 'acme' release 1.0 and
two client C1 and C2.
* scenario 1: acme in common directory
+ acme
...
+ C1
...
+ C2
...
So, in C1
$dms -I../acme *.d
and in C2
$dms -I../acme *.d
suppose that C2 need a new
Okay, I have hit another thing when dealing with shared delegates.
Consider this code:
alias void delegate (B b) shared Callback;
class A
{
private B _b;
this (B b)
{
_b = b;
}
void callback (B b) shared
{
b.execute(callback);
//_b.execute(callback); --
Unfortunately, opDispatch [silently] takes precedence over
UFCS. I don't suppose there's any way to make a UFCS function call
override opDispatch without either ditching UFCS or altering/removing
the opDispatch itself?
On 2013-01-16, 22:02, Nick Sabalausky wrote:
Unfortunately, opDispatch [silently] takes precedence over
UFCS. I don't suppose there's any way to make a UFCS function call
override opDispatch without either ditching UFCS or altering/removing
the opDispatch itself?
Only solution I know of is to
Le 16/01/2013 10:54, Jonathan M Davis a écrit :
On Wednesday, January 16, 2013 09:15:39 n00b wrote:
Nevermind, found it myself.
SysTime* sys = new SysTime(standardTime, UTC());
sys.hour;
Le 16/01/2013 08:07, n00b a écrit :
Hello, I'm kinda ashamed to ask that here, but std.datetime
On Wednesday, 16 January 2013 at 20:05:40 UTC, Martin Drasar
wrote:
Okay, I have hit another thing when dealing with shared
delegates.
If I uncomment that line I get this error:
Error: function main.B.execute (void delegate(B b) shared c)
is not callable using argument types (void delegate(B
On Wednesday, 16 January 2013 at 14:15:46 UTC, n00b wrote:
Nevermind, found it myself.
SysTime* sys = new SysTime(standardTime, UTC());
sys.hour;
Le 16/01/2013 08:07, n00b a écrit :
Hello, I'm kinda ashamed to ask that here, but std.datetime
documentation is so complex... I only want to get
I was wondering what the syntax is for user defined attributes
(i.e. bug 9222) implemented in release 2.061. I was still unclear
after reading the thread
forum.dlang.org/thread/k7afq6$2832$1...@digitalmars.com.
Thanks for the help
Joseph
Well got a few curious problems. Slicing doesn't seem it wants
to work as a separate type and can cause problems.
Let's take an example. Say our slice is..
struct BitArraySlice {
BitArray* ba;
ulong start, end;
}
Now how much does it depend on the bitarray that it's pointing
On 01/16/2013 05:59 PM, Joseph Cassman wrote:
I was wondering what the syntax is for user defined attributes (i.e. bug
9222) implemented in release 2.061. I was still unclear after reading
the thread forum.dlang.org/thread/k7afq6$2832$1...@digitalmars.com.
Thanks for the help
Joseph
The
On Thursday, 17 January 2013 at 04:38:14 UTC, Ali Çehreli wrote:
On 01/16/2013 05:59 PM, Joseph Cassman wrote:
I was wondering what the syntax is for user defined attributes
(I.e. bug 9222) implemented in release 2.061. I was still
unclear after reading the thread
On Wednesday, 16 January 2013 at 13:07:48 UTC, n00b wrote:
Hello, I'm kinda ashamed to ask that here, but std.datetime
documentation is so complex...
You'll likely have a much easier time reading this.
http://vibed.org/temp/d-programming-language.org/phobos/std/datetime.html
Those pages are
On Thursday, January 17, 2013 07:15:14 Rob T wrote:
On Wednesday, 16 January 2013 at 13:07:48 UTC, n00b wrote:
Hello, I'm kinda ashamed to ask that here, but std.datetime
documentation is so complex...
You'll likely have a much easier time reading this.
On Thursday, 17 January 2013 at 06:26:21 UTC, Jonathan M Davis
wrote:
On Thursday, January 17, 2013 07:15:14 Rob T wrote:
On Wednesday, 16 January 2013 at 13:07:48 UTC, n00b wrote:
Hello, I'm kinda ashamed to ask that here, but std.datetime
documentation is so complex...
You'll likely have a
On 01/16/2013 09:45 PM, Era Scarecrow wrote:
(Do they have to be structs?) If they
don't and you add code, can that code help/add or modify the attributed
object (or can it at all?).
It looks like some mixin magic can be used.
Do the structs have to be empty?
They can have members.
On Thursday, January 17, 2013 07:57:51 Rob T wrote:
Yeah, I was amazed at how much simpler things became after better
formatting and organization was applied. Beforehand people were
asking for std.datetime to be broken up, but no need anymore,
although maybe the part on benchmarking and
On Thursday, 17 January 2013 at 06:55:57 UTC, Ali Çehreli wrote:
On 01/16/2013 09:45 PM, Era Scarecrow wrote:
(Do they have to be structs?) If they don't and you add code,
can that code help/add or modify the attributed object (or can
it at all?).
It looks like some mixin magic can be used.
On 2013-01-17 02:59, Joseph Cassman wrote:
I was wondering what the syntax is for user defined attributes (i.e. bug
9222) implemented in release 2.061. I was still unclear after reading
the thread forum.dlang.org/thread/k7afq6$2832$1...@digitalmars.com.
Here's the documentation:
25 matches
Mail list logo