On 03/31/2012 09:09 PM, Artur Skawina wrote:
On 03/31/12 21:09, Ali Çehreli wrote:
How can I determine just the data members of a struct or class,
excluding the member functions? isCallable() comes short as member
variable that have opCall() defined are also callable:
[...]
Wait! I found a
On Saturday, 31 March 2012 at 21:42:05 UTC, Jonathan M Davis
wrote:
On Saturday, March 31, 2012 23:25:51 L-MAN wrote:
Hello everybody!
I'm trying to use some function FN like this:
struct X
{
protected double _x; // double type for example
public @property double X() const { return _x; }
On Saturday, 31 March 2012 at 21:42:05 UTC, Jonathan M Davis
wrote:
On Saturday, March 31, 2012 23:25:51 L-MAN wrote:
Hello everybody!
I'm trying to use some function FN like this:
struct X
{
protected double _x; // double type for example
public @property double X() const { return _x; }
On Sunday, April 01, 2012 09:10:58 L-MAN wrote:
On Saturday, 31 March 2012 at 21:42:05 UTC, Jonathan M Davis
wrote:
On Saturday, March 31, 2012 23:25:51 L-MAN wrote:
Hello everybody!
I'm trying to use some function FN like this:
struct X
{
protected double _x; // double
On 04/01/12 08:18, Ali Çehreli wrote:
On 03/31/2012 09:09 PM, Artur Skawina wrote:
On 03/31/12 21:09, Ali Çehreli wrote:
How can I determine just the data members of a struct or class, excluding
the member functions? isCallable() comes short as member variable that have
opCall() defined are
On 04/01/12 11:27, Artur Skawina wrote:
On 04/01/12 08:18, Ali Çehreli wrote:
On 03/31/2012 09:09 PM, Artur Skawina wrote:
This will print all fields of struct/class S:
enum s = cast(S*)null;
foreach (i, m; s.tupleof) {
enum name = S.tupleof[i].stringof[4..$];
alias
Either way, I once tried to pass over ownership of trees of objects to
other threads but gave up on that. I don't think std.concurrency and D
really can work like that. (?) Concurrency seems to work much better
when you pass messages and data, structs are fine, and then build object
trees
On 2012-03-31 19:05, Andrej Mitrovic wrote:
This is related to wrapping wxWidgets.
One issue with the new wxWidgets 2.9.x series is that there seem to be
more multiply-inherited classes than before. In particular some of the
main classes have become MI classes (e.g. wxApp derives from
On 2012-03-31 20:53, Ali Çehreli wrote:
I recommend using stdin. The destiny of std.cstream is uncertain and
stdin is sufficient. (I know that it lacks support for BOM but I don't
need them.)
I thought std.cstream was a stream wrapper around stdin.
The word 'character' used to mean
On 2012-04-01 01:17, Ali Çehreli wrote:
On 03/31/2012 11:53 AM, Ali Çehreli wrote:
The solution is to use ranges when pulling Unicode characters out of
strings. std.stdin does not provide this yet, but it will eventually
happen (so I've heard :)).
Here is a Unicode character range, which
On 2012-04-01 00:14, Stewart Gordon wrote:
On 31/03/2012 16:56, Jacob Carlborg wrote:
How would I read a unicode character from the terminal? I've tried using
std.cstream.din.getc but it seems to only work for ascii characters.
If I try to read
and print something that isn't ascii, it just
On 2012-04-01 08:18, Ali Çehreli wrote:
On 03/31/2012 09:09 PM, Artur Skawina wrote:
enum s = cast(S*)null;
foreach (i, m; s.tupleof) {
enum name = S.tupleof[i].stringof[4..$];
alias typeof(m) type;
writef((%s) %s\n, type.stringof, name);
}
Real Programmers don't use
On 2012-04-01 11:27, Artur Skawina wrote:
That's because the compiler won't accept foreach (i, t; S.tupleof) and
*.tupleof[i].stringof is necessary to get the original name. This would
have worked too:
enum name = *s.tupleof[i].stringof[4..$];
but obfuscates the code more and looks
On 03/31/2012 10:05 AM, Andrej Mitrovic wrote:
This is related to wrapping wxWidgets.
One issue with the new wxWidgets 2.9.x series is that there seem to be
more multiply-inherited classes than before
As Jacob already said mixin templates and Interfaces are the way to go.
I think you have to
On 04/01/12 14:10, Jacob Carlborg wrote:
On 2012-04-01 11:27, Artur Skawina wrote:
That's because the compiler won't accept foreach (i, t; S.tupleof) and
But it accepts foreach (i, t; typeof(S.tupleof)).
It does - thank you.
This means that that ugly null-to-pointer cast from my example
On Sat, Mar 31, 2012 at 12:25 PM, Piotr Szturmaj bncr...@jadamspam.pl wrote:
Andrej Mitrovic wrote:
On 12/1/11, Kai Meyerk...@unixlords.com wrote:
I'm finding std.json extremely well written, with one glaring exception.
I'm finding it to be crap. The last time I used it I just kept
On 04/01/2012 05:00 AM, Jacob Carlborg wrote:
On 2012-04-01 01:17, Ali Çehreli wrote:
On 03/31/2012 11:53 AM, Ali Çehreli wrote:
The solution is to use ranges when pulling Unicode characters out of
strings. std.stdin does not provide this yet, but it will eventually
happen (so I've heard
On 03/31/2012 10:05 AM, Andrej Mitrovic wrote:
One issue with the new wxWidgets 2.9.x series is that there seem to be
more multiply-inherited classes than before
A bit more complete snippet.
interface Foo
{
void doFoo();
}
// Foo implementation
mixin template FooMixin()
{
alias
I was working on a small personal project, and ran across
something I think might (or might not) be a bug. I'm posting in
this particular group just in case it's a restriction somewhere
that I just don't know about, or maybe just the way that
covariance gets resolved. The obvious workaround
Hm, I guess it's much simpler than that. I must not be
understanding something about covariance. The following code
produces the same error message (it has nothing to do with
nestedness or shared classes):
interface Interface
{
Interface getNext();
const(Interface)
On 2012-04-01 16:02, Ali Çehreli wrote:
No difference in that example because it consumes the entire input as
dchars.
But in general, with that inefficient range, it is possible to pull just
one dchar from the input and leave the rest of the stream untouched. For
example, it would be possible
On 04/01/2012 08:13 PM, Read Bixby wrote:
Hm, I guess it's much simpler than that. I must not be understanding
something about covariance. The following code produces the same error
message (it has nothing to do with nestedness or shared classes):
interface Interface
{
Interface
Thanks; entered as issue 7807.
On Sunday, 1 April 2012 at 20:17:09 UTC, Timon Gehr wrote:
On 04/01/2012 08:13 PM, Read Bixby wrote:
Hm, I guess it's much simpler than that. I must not be
understanding
something about covariance. The following code produces the
same error
message (it has
On Fri, 30 Mar 2012 19:52:50 +0200, simendsjo simend...@gmail.com wrote:
On Fri, 30 Mar 2012 17:13:25 +0200, Simen Kjærås
simen.kja...@gmail.com wrote:
Indeed. The thing is - U is basically *set* by the isExpression. It says
'yes, there is such a U, so I'll add it to the local scope.'. This
On Sat, 31 Mar 2012 15:20:42 +0200, simendsjo simend...@gmail.com wrote:
Seems __traits doesn't have a __traits(getMemberType, T, name).
Now I'm doing the following:
T t; // instance to use in getMember
alias typeof( __traits(getMember, t, name) ) MemberType;
Is this the only way to get the
Nicolas Silva wrote:
On Sat, Mar 31, 2012 at 12:25 PM, Piotr Szturmajbncr...@jadamspam.pl wrote:
I have written streaming json parser using ranges. It returns slices when
possible. Benchmarked it and it's about 2.05x the speed of std.json.
It gives possibility to dig into the structure and
On 31 March 2012 21:37, simendsjo simend...@gmail.com wrote:
Is is possible to use UFCS for types to simulate static members?
struct S {
static void f();
}
void ext(S)() {
S.f();
}
void main() {
ext!S(); // ok
S.ext(); // Error: no property 'ext' for type 'S'
}
As far as
On 4/1/12 8:09 PM, Jacob Carlborg wrote:
On 2012-04-01 08:18, Ali Çehreli wrote:
On 03/31/2012 09:09 PM, Artur Skawina wrote:
enum s = cast(S*)null;
foreach (i, m; s.tupleof) {
enum name = S.tupleof[i].stringof[4..$];
alias typeof(m) type;
writef((%s) %s\n, type.stringof, name);
}
On 31 March 2012 06:28, Jonathan M Davis jmdavisp...@gmx.com wrote:
it also has
opDot, which is being removed from the language.
Out of curiosity, what was opDot?
--
James Miller
On 30-03-2012 19:28, Jonathan M Davis wrote:
On Friday, March 30, 2012 16:27:44 simendsjo wrote:
Is opImplicitCastTo a planned feature?
It's only used in this type as I can see, and it doesn't add implicit
casting.
It's been discussed, but I don't think that it's ever been agreed upon. In
On Sunday, 1 April 2012 at 08:22:08 UTC, Jonathan M Davis wrote:
On Sunday, April 01, 2012 09:10:58 L-MAN wrote:
On Saturday, 31 March 2012 at 21:42:05 UTC, Jonathan M Davis
wrote:
On Saturday, March 31, 2012 23:25:51 L-MAN wrote:
Hello everybody!
I'm trying to use some function FN like
On Monday, April 02, 2012 05:46:24 L-MAN wrote:
About temporaries in operators +-/*.. you're right, it is not a
secret.
references in other functions (not in operators) too.
I can't understand one thing:
ABC abc; // ABC is a struct that consists of some 4x4 matrix for
example
ABC
I'm planning to add cross-references to the default ddoc output. At
least that's the simplest thing I could do right now that might improve
ddoc somehow.
I see the documentation generated for phobos, for example:
http://dlang.org/phobos/std_array.html#Appender
has anchors to the many symbols
On Monday, April 02, 2012 05:41:00 Alex Rønne Petersen wrote:
On 30-03-2012 19:28, Jonathan M Davis wrote:
On Friday, March 30, 2012 16:27:44 simendsjo wrote:
Is opImplicitCastTo a planned feature?
It's only used in this type as I can see, and it doesn't add implicit
casting.
It's
On 4/2/12 12:20 PM, Ary Manzana wrote:
I'm planning to add cross-references to the default ddoc output. At
least that's the simplest thing I could do right now that might improve
ddoc somehow.
I see the documentation generated for phobos, for example:
On Monday, April 02, 2012 15:36:01 James Miller wrote:
On 31 March 2012 06:28, Jonathan M Davis jmdavisp...@gmx.com wrote:
it also has
opDot, which is being removed from the language.
Out of curiosity, what was opDot?
An overload of the dot operator. So, if you had
A a = foo();
a.func();
On Sunday, April 01, 2012 21:23:50 Jonathan M Davis wrote:
On Monday, April 02, 2012 05:46:24 L-MAN wrote:
Sure, if you have large structs, making a lot of copies of them can be
expensive. But to avoid that, you're going to have to avoid coding in a way
which creates temporaries, and
On 02-04-2012 06:25, Jonathan M Davis wrote:
On Monday, April 02, 2012 05:41:00 Alex Rønne Petersen wrote:
On 30-03-2012 19:28, Jonathan M Davis wrote:
On Friday, March 30, 2012 16:27:44 simendsjo wrote:
Is opImplicitCastTo a planned feature?
It's only used in this type as I can see, and it
On Monday, April 02, 2012 07:23:23 Alex Rønne Petersen wrote:
On 02-04-2012 06:25, Jonathan M Davis wrote:
alias this is not supposed to be restricted such that you can only have
one
per type. That's a temporary, implementation problem. TDPL specifically
talks about having multiple alias
I'm trying to add an element to a list with insert but that
doesn't seem to do anything at all. If I try using ~= it says
that Error: cannot append type Node to type SList!(Node). I'm
pretty confused about using ~= because it works fine for arrays
but apperantly not for lists.
How do I add
On 4/2/12 12:39 PM, Jonathan M Davis wrote:
On Monday, April 02, 2012 12:20:31 Ary Manzana wrote:
I'm planning to add cross-references to the default ddoc output. At
least that's the simplest thing I could do right now that might improve
ddoc somehow.
I see the documentation generated for
41 matches
Mail list logo