Re: dlangspec.pdf?

2013-01-06 Thread Walter Bright
On 1/6/2013 11:35 PM, Andrei Alexandrescu wrote: On 1/7/13 2:17 AM, Walter Bright wrote: On 1/6/2013 9:31 AM, Philippe Sigaud wrote: Exactly. At one point I looked into doing Latex macros for Ddoc, but unfortunately it didn't look like it was doable without some extensive modifications to Ddo

Re: dlangspec.pdf?

2013-01-06 Thread Andrei Alexandrescu
On 1/7/13 2:17 AM, Walter Bright wrote: On 1/6/2013 9:31 AM, Philippe Sigaud wrote: Exactly. At one point I looked into doing Latex macros for Ddoc, but unfortunately it didn't look like it was doable without some extensive modifications to Ddoc. ??? I already have something in progress. An

Re: So, User-Defined Attributes

2013-01-06 Thread Timon Gehr
On 01/07/2013 07:27 AM, Walter Bright wrote: On 1/6/2013 7:27 PM, Timon Gehr wrote: I am still reducing the massive breakage introduced by 2.061 regressions. Sorry about that, No problem. There will be some way to get it to compile. The reduced code shows which points to concentrate modific

Re: dlangspec.pdf?

2013-01-06 Thread Walter Bright
On 1/6/2013 9:31 AM, Philippe Sigaud wrote: Exactly. At one point I looked into doing Latex macros for Ddoc, but unfortunately it didn't look like it was doable without some extensive modifications to Ddoc.

Re: So, User-Defined Attributes

2013-01-06 Thread Walter Bright
On 1/6/2013 8:37 PM, Timon Gehr wrote: dustmite ftw. http://d.puremagic.com/issues/show_bug.cgi?id=9276 Thank you.

Re: So, User-Defined Attributes

2013-01-06 Thread Walter Bright
On 1/6/2013 9:44 PM, Philippe Sigaud wrote: I humbly concur. Walter, you yourself presented UDAs as 'linking the dots' between different part of the D language (tuples...). It's an interesting and elegant approach, but the current situation is somewhat inadequate: UDA can be manipulated like temp

Re: So, User-Defined Attributes

2013-01-06 Thread Walter Bright
On 1/6/2013 7:27 PM, Timon Gehr wrote: I am still reducing the massive breakage introduced by 2.061 regressions. Sorry about that, but 2.061 has been available for 2 months in beta. We fixed all but 3 of the reported regressions, and had good reasons for deferring those. In fact, the 2.062 w

Re: So, User-Defined Attributes

2013-01-06 Thread Philippe Sigaud
On Mon, Jan 7, 2013 at 4:27 AM, Timon Gehr wrote: > > > The compiler should obviously use the part of the parser that parses > template arguments to parse UDA's. I am surprised this is not what is done. > I humbly concur. Walter, you yourself presented UDAs as 'linking the dots' between differen

Re: So, User-Defined Attributes

2013-01-06 Thread Timon Gehr
On 01/07/2013 04:27 AM, Timon Gehr wrote: ... (Eg. I am still reducing the massive breakage introduced by 2.061 regressions. Mostly 'forward reference' errors -- mentioned nowhere in the spec, and seemingly introduced in order to 'fix' ICEs.) ... dustmite ftw. http://d.puremagic.com/issues/sho

Re: So, User-Defined Attributes

2013-01-06 Thread Timon Gehr
On 01/07/2013 01:38 AM, Walter Bright wrote: On 1/6/2013 2:24 PM, deadalnix wrote: On Saturday, 5 January 2013 at 22:14:47 UTC, Walter Bright wrote: On 1/5/2013 2:06 PM, Philippe Sigaud wrote: But why is @(MyType) accepted, whereas @(int) is not? Because it's looking for an expression inside

Re: So, User-Defined Attributes

2013-01-06 Thread Walter Bright
On 1/6/2013 5:06 PM, deadalnix wrote: On Monday, 7 January 2013 at 00:38:35 UTC, Walter Bright wrote: On 1/6/2013 2:24 PM, deadalnix wrote: On Saturday, 5 January 2013 at 22:14:47 UTC, Walter Bright wrote: On 1/5/2013 2:06 PM, Philippe Sigaud wrote: But why is @(MyType) accepted, whereas @(in

Re: So, User-Defined Attributes

2013-01-06 Thread deadalnix
On Monday, 7 January 2013 at 00:38:35 UTC, Walter Bright wrote: On 1/6/2013 2:24 PM, deadalnix wrote: On Saturday, 5 January 2013 at 22:14:47 UTC, Walter Bright wrote: On 1/5/2013 2:06 PM, Philippe Sigaud wrote: But why is @(MyType) accepted, whereas @(int) is not? Because it's looking for a

Re: So, User-Defined Attributes

2013-01-06 Thread Walter Bright
On 1/6/2013 2:24 PM, deadalnix wrote: On Saturday, 5 January 2013 at 22:14:47 UTC, Walter Bright wrote: On 1/5/2013 2:06 PM, Philippe Sigaud wrote: But why is @(MyType) accepted, whereas @(int) is not? Because it's looking for an expression inside the parents, and int is not an expression.

Re: shared gitconfig

2013-01-06 Thread Vladimir Panteleev
On Sunday, 6 January 2013 at 22:45:27 UTC, Andrei Alexandrescu wrote: I do now after having read about it at the end of several google searches. I found the git documentation to be an excellent resource once you're familiar with the basic concept of how git works. For that, I found this quite

Re: ref is unsafe

2013-01-06 Thread comco
On Friday, 4 January 2013 at 20:20:08 UTC, Jonathan M Davis wrote: On Friday, January 04, 2013 17:26:59 Zach the Mystic wrote: > Honestly though, I'm inclined to argue that functions which > return by ref and > have a ref parameter of that same type just be considered > @system. Structs mess th

Re: shared gitconfig

2013-01-06 Thread Jonathan M Davis
On Sunday, January 06, 2013 18:12:20 Andrei Alexandrescu wrote: > On 1/6/13 6:02 PM, Jonathan M Davis wrote: > > On Sunday, January 06, 2013 17:45:29 Andrei Alexandrescu wrote: > >> I get these tidbits of commands - git idioms - all the time, and I > >> forget them because I don't use them frequent

Re: shared gitconfig

2013-01-06 Thread Andrei Alexandrescu
On 1/6/13 6:02 PM, Jonathan M Davis wrote: On Sunday, January 06, 2013 17:45:29 Andrei Alexandrescu wrote: I get these tidbits of commands - git idioms - all the time, and I forget them because I don't use them frequently. I don't see why it's a crime to want to define some macros for such idiom

Re: So, User-Defined Attributes

2013-01-06 Thread Timon Gehr
On 01/06/2013 11:24 PM, deadalnix wrote: On Saturday, 5 January 2013 at 22:14:47 UTC, Walter Bright wrote: On 1/5/2013 2:06 PM, Philippe Sigaud wrote: But why is @(MyType) accepted, whereas @(int) is not? Because it's looking for an expression inside the parents, and int is not an expression.

Re: shared gitconfig

2013-01-06 Thread Jonathan M Davis
On Sunday, January 06, 2013 17:45:29 Andrei Alexandrescu wrote: > I get these tidbits of commands - git idioms - all the time, and I > forget them because I don't use them frequently. I don't see why it's a > crime to want to define some macros for such idioms instead of > essentially putting that

Re: So, User-Defined Attributes

2013-01-06 Thread Timon Gehr
On 01/06/2013 11:27 PM, deadalnix wrote: On Sunday, 6 January 2013 at 14:58:07 UTC, Andrei Alexandrescu wrote: On 1/6/13 9:25 AM, Philippe Sigaud wrote: That's too bad, because declaring UDA is simple, and receiving them with arguments is easy also. There is a fundamental imbalance in having ha

Re: shared gitconfig

2013-01-06 Thread Andrei Alexandrescu
On 1/6/13 4:03 PM, Vladimir Panteleev wrote: On Sunday, 6 January 2013 at 19:50:47 UTC, Andrei Alexandrescu wrote: git pull --rebase -s recursive -X ours Question: Do you know what exactly does this command do? I do now after having read about it at the end of several google searches. Git

Re: So, User-Defined Attributes

2013-01-06 Thread Timon Gehr
On 01/06/2013 07:24 PM, Philippe Sigaud wrote: Can attributes be defined by templates arguments? @(T) class C(T) : T { } Answer: no. OK. This works: template C(T){ @T class C : T { } } The above appears to annotate the template itself, which is inconsistent. You should probably file a bu

Re: So, User-Defined Attributes

2013-01-06 Thread Philippe Sigaud
On Sun, Jan 6, 2013 at 11:24 PM, deadalnix wrote: > On Saturday, 5 January 2013 at 22:14:47 UTC, Walter Bright wrote: > >> On 1/5/2013 2:06 PM, Philippe Sigaud wrote: >> >>> But why is @(MyType) accepted, whereas @(int) is not? >>> >> >> Because it's looking for an expression inside the parents,

Re: So, User-Defined Attributes

2013-01-06 Thread Philippe Sigaud
On Fri, Jan 4, 2013 at 9:58 PM, Walter Bright > > >> wrote: >> >> >> Module declarations aren't declarations. >> >> >> Great quote :) >> >> >> > Walter often argues in terms of DMD implementation details. > > ... > struct ModuleDeclaration > { > Identi

Re: So, User-Defined Attributes

2013-01-06 Thread deadalnix
On Sunday, 6 January 2013 at 14:58:07 UTC, Andrei Alexandrescu wrote: On 1/6/13 9:25 AM, Philippe Sigaud wrote: That's too bad, because declaring UDA is simple, and receiving them with arguments is easy also. There is a fundamental imbalance in having having propagating attributes through func

Re: WTF did happen with struct constructor and ref in 2.061 ?

2013-01-06 Thread Andrei Alexandrescu
On 1/6/13 2:57 PM, Philippe Sigaud wrote: On Sun, Jan 6, 2013 at 8:49 PM, Andrei Alexandrescu mailto:seewebsiteforem...@erdani.org>> wrote: Submitted this review: Official D language specification formatted for the Kindle We are producing this from the same source files as the onl

Re: So, User-Defined Attributes

2013-01-06 Thread deadalnix
On Saturday, 5 January 2013 at 22:14:47 UTC, Walter Bright wrote: On 1/5/2013 2:06 PM, Philippe Sigaud wrote: But why is @(MyType) accepted, whereas @(int) is not? Because it's looking for an expression inside the parents, and int is not an expression. And mytype is an expression ?

Re: Array-wise expressions

2013-01-06 Thread Xinok
On Sunday, 6 January 2013 at 15:39:03 UTC, Lobachevsky wrote: Is there any plan to extend array-wise expressions to include calls to arbitrary "scalar" functions, i.e. auto a = [1.2, 2.3, 3.4]; auto b = [7.1, 8.2, 9.3]; auto c = new double[3]; c[] = sin( 4 * a[] + b[] ); or c[] = foo(a[], b[]

Re: So, User-Defined Attributes

2013-01-06 Thread Timon Gehr
On 01/04/2013 11:43 PM, Philippe Sigaud wrote: On Fri, Jan 4, 2013 at 9:58 PM, Walter Bright mailto:newshou...@digitalmars.com>> wrote: Module declarations aren't declarations. Great quote :) Walter often argues in terms of DMD implementation details. ... struct ModuleDeclaration {

Re: Is this a known issue in Phobos/DMD?

2013-01-06 Thread Timon Gehr
On 01/05/2013 05:09 PM, d coder wrote: Greetings When I compile the code below, I unexpectedly get an error: test.d(7): Error: template std.string.format does not match any function template declaration. Candidates are: /home/puneet/local/github-d/bin/../phobos/std/string.d(2528): std.string.f

Re: shared gitconfig

2013-01-06 Thread Vladimir Panteleev
On Sunday, 6 January 2013 at 19:50:47 UTC, Andrei Alexandrescu wrote: Sent this to dmd-internals, opening for a broader discussion: Hello, I wonder how we can define a few aliases of project-wide usefulness to git. For example, I tried today to get the latest and greatest phobos into my repo

Re: shared gitconfig

2013-01-06 Thread Jacob Carlborg
On 2013-01-06 21:47, Jonathan M Davis wrote: But with regards to this particular command, I'd argue that you're doing something wrong if you need to force a rebase with a pull. I agree. -- /Jacob Carlborg

Re: Accessing UDA of private field

2013-01-06 Thread Jacob Carlborg
On 2013-01-06 18:29, Philippe Sigaud wrote: You can use a string mixin: class Foo { int a; @(3) private int b; } void main() { writeln(mixin("__traits(getAttributes, " ~ Foo.tupleof[1].stringof ~ ")")); // -> 3 } Good thinking. It's not pretty but it works. Thanks. -- /Jacob

Re: shared gitconfig

2013-01-06 Thread Jonathan M Davis
On Sunday, January 06, 2013 14:50:49 Andrei Alexandrescu wrote: > Sent this to dmd-internals, opening for a broader discussion: > > Hello, > > > I wonder how we can define a few aliases of project-wide usefulness to > git. For example, I tried today to get the latest and greatest phobos > into m

Re: Is this a known issue in Phobos/DMD?

2013-01-06 Thread Jonathan M Davis
On Sunday, January 06, 2013 15:15:42 Chris wrote: > This means that the local variable still has precedence over the > imported one. However, if it is inside the function the imported > variable is treated as local, as in "last one in closes the door"? Which is wrong behavior. Local variables shou

Re: Accessing UDA of private field

2013-01-06 Thread Philippe Sigaud
On Sun, Jan 6, 2013 at 7:46 PM, d coder wrote: > > You can use a string mixin: >> >> class Foo >> { >> int a; >> @(3) private int b; >> } >> >> void main() >> { >> writeln(mixin("__traits(getAttributes, " ~ Foo.tupleof[1].stringof ~ >> ")")); // -> 3 >> } >> >> >> > > Hmm > > This

Re: WTF did happen with struct constructor and ref in 2.061 ?

2013-01-06 Thread Philippe Sigaud
On Sun, Jan 6, 2013 at 8:49 PM, Andrei Alexandrescu < seewebsiteforem...@erdani.org> wrote: > >> Submitted this review: > > Official D language specification formatted for the Kindle > > We are producing this from the same source files as the online > specification to be found at http://dlang.org.

shared gitconfig

2013-01-06 Thread Andrei Alexandrescu
Sent this to dmd-internals, opening for a broader discussion: Hello, I wonder how we can define a few aliases of project-wide usefulness to git. For example, I tried today to get the latest and greatest phobos into my repo, and got a bunch of conflicts. I searched a while on the net to figur

Re: WTF did happen with struct constructor and ref in 2.061 ?

2013-01-06 Thread Andrei Alexandrescu
On 1/6/13 2:39 PM, Andrei Alexandrescu wrote: On 1/6/13 11:52 AM, David Nadlinger wrote: On Sunday, 6 January 2013 at 06:06:21 UTC, Andrei Alexandrescu wrote: I won't discuss this further. Too bad. It seems that the whole discussion could be resolved by just providing an explanatory comment a

Re: WTF did happen with struct constructor and ref in 2.061 ?

2013-01-06 Thread Andrei Alexandrescu
On 1/6/13 11:52 AM, David Nadlinger wrote: On Sunday, 6 January 2013 at 06:06:21 UTC, Andrei Alexandrescu wrote: I won't discuss this further. Too bad. It seems that the whole discussion could be resolved by just providing an explanatory comment along the lines of »This specification can also

Re: Accessing UDA of private field

2013-01-06 Thread d coder
> You can use a string mixin: > > class Foo > { > int a; > @(3) private int b; > } > > void main() > { > writeln(mixin("__traits(getAttributes, " ~ Foo.tupleof[1].stringof ~ > ")")); // -> 3 > } > > > Hmm This works only when main is in the same file (and therefor module) as Foo.

Re: So, User-Defined Attributes

2013-01-06 Thread Philippe Sigaud
Hmm, did anyone try to put attribute before a function overload and not > another? > > Ca > Damn tab. Can attributes be defined by templates arguments? @(T) class C(T) : T { } Answer: no. OK.

Re: So, User-Defined Attributes

2013-01-06 Thread Philippe Sigaud
On Sun, Jan 6, 2013 at 3:29 PM, Jacob Carlborg wrote: > > Yeah, if you want to work with UDA's you need to work with symbols, not > values or types. If you want to pass a symbol, including its UDA, you need > to pass it as an alias: > That was the explanation I needed: UDA are attached to symbol

Re: Template news (2012+)

2013-01-06 Thread Philippe Sigaud
Dmitry: > The link is botched and I dunno why. The usual ctrl+F (command+F) ParameterIndentifier on std.tratis page reveals it for me. I swear I did that! OK, found it, and also ParameterDefaultValues.

Re: Template news (2012+)

2013-01-06 Thread Dmitry Olshansky
06-Jan-2013 02:12, Philippe Sigaud пишет: Some new traits happened. I'll have a look. Not there is a way to peek at function parameter identifiers (!): http://dlang.org/phobos/std___traits.html#.__ParameterIdentifierTuple

Re: So, User-Defined Attributes

2013-01-06 Thread Philippe Sigaud
On Sun, Jan 6, 2013 at 3:58 PM, Andrei Alexandrescu < seewebsiteforem...@erdani.org> wrote: > On 1/6/13 9:25 AM, Philippe Sigaud wrote: > >> That's too bad, because declaring UDA is simple, and receiving them with >> arguments is easy also. There is a fundamental imbalance in having >> having prop

Re: dlangspec.pdf?

2013-01-06 Thread Philippe Sigaud
On Sun, Jan 6, 2013 at 4:19 PM, H. S. Teoh wrote: > On Sun, Jan 06, 2013 at 10:44:27AM +0100, Philippe Sigaud wrote: > > > Philippe, please share with me as soon as you have anything significant > > > done in terms of LaTeX production so we don't overlap work. > > > > > > > > Nothing significant

Re: Accessing UDA of private field

2013-01-06 Thread Philippe Sigaud
> The problem is that to access a UDA attached to a field I need to pass a > symbol to the __traits(getAttributes). With "tupleof" I can get the name, > type and value of a field but I cannot get a symbol. > > __traits(getMember) can be used to get the symbol but that will only work > for public fi

Re: WTF did happen with struct constructor and ref in 2.061 ?

2013-01-06 Thread David Nadlinger
On Sunday, 6 January 2013 at 06:06:21 UTC, Andrei Alexandrescu wrote: I won't discuss this further. Too bad. It seems that the whole discussion could be resolved by just providing an explanatory comment along the lines of »This specification can also be accessed in other formats at dlang.org«

Re: WTF did happen with struct constructor and ref in 2.061 ?

2013-01-06 Thread Nick Sabalausky
On Sun, 06 Jan 2013 12:44:13 +0100 Jacob Carlborg wrote: > On 2013-01-06 06:01, Nick Sabalausky wrote: > > > It's an ebook version of the content on dlang.org, right? That > > should be free. If Amazon won't allow it to be free then it > > shouldn't be on Amazon. End of story. > > > > If you wan

Re: So, User-Defined Attributes

2013-01-06 Thread Era Scarecrow
On Saturday, 5 January 2013 at 11:57:39 UTC, Johannes Pfau wrote: Era Scarecrow wrote: This is sorta like tuples; But from the brief summaries I cannot fully understand how or where they would be used. I understand some attributes can be made and added that some compilers may use (@noreturn as

Re: Array-wise expressions

2013-01-06 Thread David Nadlinger
On Sunday, 6 January 2013 at 15:39:03 UTC, Lobachevsky wrote: Is there any plan to extend array-wise expressions to include calls to arbitrary "scalar" functions Currently, there are no plans for adding a feature like this – at least I'm not aware of any. However, you can just use std.algori

Array-wise expressions

2013-01-06 Thread Lobachevsky
Is there any plan to extend array-wise expressions to include calls to arbitrary "scalar" functions, i.e. auto a = [1.2, 2.3, 3.4]; auto b = [7.1, 8.2, 9.3]; auto c = new double[3]; c[] = sin( 4 * a[] + b[] ); or c[] = foo(a[], b[], 42);

Re: dlangspec.pdf?

2013-01-06 Thread H. S. Teoh
On Sun, Jan 06, 2013 at 10:44:27AM +0100, Philippe Sigaud wrote: > > Philippe, please share with me as soon as you have anything significant > > done in terms of LaTeX production so we don't overlap work. > > > > > Nothing significant yet, that's my first dib into macro. > I use these, but have a p

Re: So, User-Defined Attributes

2013-01-06 Thread bearophile
Andrei Alexandrescu: For designing attributes that navigate with types templates would be the solution of choice. There's an interesting cognitive impercetion phenomena here, that's worth studying and not ignoring. From the little evidence here, it seems that D programmers want to use UDAs i

Re: So, User-Defined Attributes

2013-01-06 Thread Andrei Alexandrescu
On 1/6/13 9:25 AM, Philippe Sigaud wrote: That's too bad, because declaring UDA is simple, and receiving them with arguments is easy also. There is a fundamental imbalance in having having propagating attributes through functions so difficult. For designing attributes that navigate with types

Accessing UDA of private field

2013-01-06 Thread Jacob Carlborg
I'm trying to adapt my serialization library, Orange, to use the new UDA's. Currently I have one template, NonSerialized, that I want to transfer to an UDA. This template works like: class Foo { int a; int b; mixin NonSerialized!(b); } When serializing Foo "b" will not be serializ

Re: So, User-Defined Attributes

2013-01-06 Thread Jacob Carlborg
On 2013-01-06 15:25, Philippe Sigaud wrote: That would mean two mixins, one internal and one external. Plus, that means every function where I want to propagate UDA has to be crafted exactly for this need. This is a drag. It seems natural to me that int foo(int i) { return i;} should forward

Re: So, User-Defined Attributes

2013-01-06 Thread Philippe Sigaud
The only way would be what you suggest: >> >> - extract the attributes from the internal i >> - store them in a specially-crafted struct >> - return that >> - in the external code, catch the returned struct >> - extract the artificially stored attributes >> - generate a new value with the same attr

Re: Is this a known issue in Phobos/DMD?

2013-01-06 Thread Chris
On Sunday, 6 January 2013 at 00:49:06 UTC, Jonathan M Davis wrote: 2. Now the function from std.algorithm that becomes visible, shadows the local argument count. Is this expected behavior? If not, has it already been reported as a bug? At the minimum I expect better error message here. _Tha

Re: So, User-Defined Attributes

2013-01-06 Thread Jacob Carlborg
On 2013-01-06 14:29, Philippe Sigaud wrote: I just want to be able to return an attributed something. How can a function return something that's attributed? IIUC what Walter said, a function cannot return an attributed value: any internal symbol can be attributed, but these cannot get out. I ca

Re: So, User-Defined Attributes

2013-01-06 Thread Jacob Carlborg
On 2013-01-06 14:29, Philippe Sigaud wrote: Don't know if this is what you want but: struct Marked {} struct Attrs (T...) {} auto bar () { @Marked int i; return Attrs!(__traits(getAttributes, i))(); } void main () { writeln(bar()); //

Re: Alias this and std.traits.isArray

2013-01-06 Thread Philippe Sigaud
On Sun, Jan 6, 2013 at 1:36 PM, David wrote: > Thanks for your answers, but: > > > Exactly. The std.traits traits are testing for exact types. If you want > to > > test for implicit conversion, then use the : operator. e.g. > > > > static assert(is(OhWhy!float : float[])); > > "OyWhy" is a te

Re: So, User-Defined Attributes

2013-01-06 Thread Philippe Sigaud
> Don't know if this is what you want but: > > struct Marked {} > struct Attrs (T...) {} > > auto bar () > { > @Marked int i; > return Attrs!(__traits(getAttributes, i))(); > } > > void main () > { > writeln(bar()); // prints Attrs!(Marked)() > } I just want to be able to return an at

Re: Alias this and std.traits.isArray

2013-01-06 Thread David
Thanks for your answers, but: > Exactly. The std.traits traits are testing for exact types. If you want to > test for implicit conversion, then use the : operator. e.g. > > static assert(is(OhWhy!float : float[])); "OyWhy" is a templated struct for a reason, I have no idea which type of arr

Re: WTF did happen with struct constructor and ref in 2.061 ?

2013-01-06 Thread deadalnix
On Sunday, 6 January 2013 at 06:14:56 UTC, Ali Çehreli wrote: On 01/05/2013 04:58 AM, js.mdnq wrote: > S s = S(2); foo(s) <==> foo(S(2)) For those to be equivalent, there must be a scope around the first one: { S s = S(2); foo(s); } <==> foo(S(2)) I think that's what you've been proposing:

Re: WTF did happen with struct constructor and ref in 2.061 ?

2013-01-06 Thread deadalnix
On Saturday, 5 January 2013 at 21:23:20 UTC, Sönke Ludwig wrote: Am 04.01.2013 20:35, schrieb deadalnix: On Friday, 4 January 2013 at 19:15:03 UTC, Ali Çehreli wrote: > This may not have a storage : > foo(funcThatReturnsS()); I don't see that. funcThatReturnsS returns an S, which must have a

Re: WTF did happen with struct constructor and ref in 2.061 ?

2013-01-06 Thread Jacob Carlborg
On 2013-01-06 06:01, Nick Sabalausky wrote: It's an ebook version of the content on dlang.org, right? That should be free. If Amazon won't allow it to be free then it shouldn't be on Amazon. End of story. If you want people to be able to read it on a Kindle, then use something that doesn't requ

Re: So, User-Defined Attributes

2013-01-06 Thread Jacob Carlborg
On 2013-01-06 10:48, Philippe Sigaud wrote: Walter, what is the official way to return an attributed value? XXX? foo() { @Marked int i; return i; } Don't know if this is what you want but: struct Marked {} struct Attrs (T...) {} auto bar () { @Marked int i; return Attrs!(_

Re: So, User-Defined Attributes

2013-01-06 Thread Walter Bright
On 1/6/2013 1:48 AM, Philippe Sigaud wrote: Walter, what is the official way to return an attributed value? XXX? foo() { @Marked int i; return i; } Values do not have attributes. Attributes are attached to symbols - not values or types.

Re: github release procedure

2013-01-06 Thread Johannes Pfau
Am Sun, 06 Jan 2013 00:18:16 +0100 schrieb "Rob T" : > One quick note, is that we may want to change the title and > description, Done. http://wiki.dlang.org/Development_and_Release_Process I also verified and corrected the git commands. They should now all work as expected and can be used like

Re: WTF did happen with struct constructor and ref in 2.061 ?

2013-01-06 Thread Philippe Sigaud
> Andrei, would that be possible to give us access to the .css that gives >> the mobi file its global appearance? I'd like D-related mobi/epub that I >> create to have the same look-and-feel. >> > > https://github.com/D-**Programming-Language/d-** > programming-language.org/blob/**master/ebook.css

Re: So, User-Defined Attributes

2013-01-06 Thread Philippe Sigaud
On Sun, Jan 6, 2013 at 8:16 AM, Walter Bright wrote: > > >> UDA can not apply to function argument? >> >> > Currently, no. > Walter, what is the official way to return an attributed value? XXX? foo() { @Marked int i; return i; }

Re: dlangspec.pdf?

2013-01-06 Thread Philippe Sigaud
> Philippe, please share with me as soon as you have anything significant > done in terms of LaTeX production so we don't overlap work. > > Nothing significant yet, that's my first dib into macro. I use these, but have a problem for code highlighting: DMD inserts macros to colour the code, these do