On 2012-04-02 07:52, Ary Manzana wrote:
On 4/2/12 12:39 PM, Jonathan M Davis wrote:
Phobos' macros are in
https://github.com/D-Programming-Language/d-programming-
language.org/blob/master/std.ddoc
As for linking macros,
LREF is used for references within a module.
XREF is used for references
On 2012-04-02 06:20, 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.
That would be so nice to have.
--
/Jacob Carlborg
On 2012-04-02 02:43, Ary Manzana wrote:
This is what I don't like about D. It gives you a hammer and everyone
tries to solve all problems with that single hammer. Then you get
duplicated code for basic stuff, like getting the type of a field, in
many projects.
It's a waste of time for a develop
On 4/2/12 2:16 PM, Ary Manzana wrote:
On 4/2/12 2:07 PM, Jonathan M Davis wrote:
On Monday, April 02, 2012 13:52:47 Ary Manzana wrote:
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 out
On Monday, 2 April 2012 at 05:03:48 UTC, Jonathan M Davis wrote:
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 t
Thanks. I tried doing this and the list didn't update:
void AddToList( SList!int list, int i )
{
list.insert( i );
}
SList!int intList;
AddToList( intList, 42 );
but when I switched to this, it worked:
SList!int intList;
void AddToList( int i )
{
intList.insert( i );
}
AddToList( 42
On 4/2/12 2:07 PM, Jonathan M Davis wrote:
On Monday, April 02, 2012 13:52:47 Ary Manzana wrote:
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
On 2 April 2012 17:45, Chris Pons wrote:
> 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
On 04/01/2012 10:45 PM, Chris Pons wrote:
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 ap
On Monday, April 02, 2012 13:52:47 Ary Manzana wrote:
> 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
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 phobo
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 a
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 multipl
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 do
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 expres
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 phobos, for example:
>
> http://dlang.org
On Monday, April 02, 2012 15:36:01 James Miller wrote:
> On 31 March 2012 06:28, Jonathan M Davis 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();
and A imple
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:
http://dlang.org/phobos/std_array.html#Appe
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.
>
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: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
>
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
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
theo
On 31 March 2012 06:28, Jonathan M Davis wrote:
> it also has
> opDot, which is being removed from the language.
Out of curiosity, what was opDot?
--
James Miller
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 21:37, simendsjo 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 I kno
Nicolas Silva wrote:
On Sat, Mar 31, 2012 at 12:25 PM, Piotr Szturmaj 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 stream (using ranges)
On Sat, 31 Mar 2012 15:20:42 +0200, simendsjo 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 type of a field based
On Fri, 30 Mar 2012 19:52:50 +0200, simendsjo wrote:
On Fri, 30 Mar 2012 17:13:25 +0200, Simen Kjærås
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 means
that U will be set for the entire sc
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 noth
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 getNext(
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 t
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) getNext()
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 i
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 typeof(
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 Sat, Mar 31, 2012 at 12:25 PM, Piotr Szturmaj wrote:
> Andrej Mitrovic wrote:
>>
>> On 12/1/11, Kai Meyer 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 getting
>> access violations
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
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 d
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 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 u
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 pri
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, whi
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 characters
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
wxAppConso
> 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
> tre
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..$]
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()
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
> >> {
> >>
> >> pro
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; }
50 matches
Mail list logo