Re: ddoc latex/formulas?

2016-09-15 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 14 September 2016 at 15:49:27 UTC, bachmeier wrote: I agree. That's why I quickly gave up on ddoc. My doc generator just pipes special input text through the latex program to generate an image, which is then inlined in the html: http://dpldocs.info/experimental-docs/test.html

Re: What is the most stable D compiler

2016-09-15 Thread Sai via Digitalmars-d
On Thursday, 15 September 2016 at 13:02:29 UTC, eugene wrote: On Thursday, 15 September 2016 at 06:26:40 UTC, Jacob Carlborg wrote: On 2016-09-14 13:42, rikki cattermole wrote: GDC is the slowest to update currently so that can be ignored for now. LDC has fairly fast updates in terms of the

Re: vibe.d maxRequestSize

2016-09-15 Thread Chris via Digitalmars-d-learn
On Wednesday, 14 September 2016 at 20:23:09 UTC, Steven Schveighoffer wrote: Hm.. I have adjusted this in my project, and it works (set to 50M). Needed it for uploading large images. Using version 0.7.29 -Steve It doesn't seem to make any difference in my case. I wonder what could be

Re: What is the most stable D compiler

2016-09-15 Thread eugene via Digitalmars-d
On Thursday, 15 September 2016 at 13:14:16 UTC, Sai wrote: On Thursday, 15 September 2016 at 13:02:29 UTC, eugene wrote: On Thursday, 15 September 2016 at 06:26:40 UTC, Jacob Carlborg wrote: On 2016-09-14 13:42, rikki cattermole wrote: GDC is the slowest to update currently so that can be

Re: vibe.d maxRequestSize

2016-09-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/15/16 9:11 AM, Chris wrote: On Wednesday, 14 September 2016 at 20:23:09 UTC, Steven Schveighoffer wrote: Hm.. I have adjusted this in my project, and it works (set to 50M). Needed it for uploading large images. Using version 0.7.29 -Steve It doesn't seem to make any difference in my

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 09:12 AM, Manu via Digitalmars-d wrote: On 15 September 2016 at 22:40, Adam D. Ruppe via Digitalmars-d wrote: On Wednesday, 14 September 2016 at 15:49:27 UTC, bachmeier wrote: I agree. That's why I quickly gave up on ddoc. My doc generator just

bug?

2016-09-15 Thread deed via Digitalmars-d-learn
void main () { new int[](1); } Compiles with dmd 2.071.2-b2, but no code is generated for `new int[](1);`. Caused a bug due to: char[] arr; got updated to char[] arr; new char[](SIZE); If it's considered a bug and someone would file it, I'd be thankful.

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 09:46 AM, Andrei Alexandrescu wrote: and then just write $( ... \LaTeX math syntax here ...), or use \( \) directly. I meant: $(M ... \LaTeX math syntax here ...) Andrei

Re: The worst Phobos template (in binderoo)

2016-09-15 Thread Stefan Koch via Digitalmars-d
On Thursday, 15 September 2016 at 12:26:08 UTC, Andrei Alexandrescu wrote: Apparently we need that static foreach iteration. -- Andrei What exactly do you mean ? As long as we instanciate n templates for a member nested n levels the overhead is massive! How would static foreach help ?

Re: DIP1000

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 04:44 AM, Kagamin wrote: Well, aliasing can be reproduced with locals S s; int* r = getPayload(s); freePayload(s); int v = *r; //UAF Nit: in MiniD1000 you'd need to declare vars first, assign them second: S s; int* r; r = getPayload(s); freePayload(s); int v; v = *r; (and

Re: [UDA] Error: first argument is not a symbol

2016-09-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/15/16 4:48 AM, drug wrote: https://dpaste.dzfl.pl/9548c481ce46 shouldn't commented line return 'false' as built-in type 'int' has no any UDAs instead of cryptic (for me) message about wrong first argument? This is due to int not being a symbol, which apparently __traits(getAttributes,

Re: The worst Phobos template (in binderoo)

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 09:27 AM, Stefan Koch wrote: On Thursday, 15 September 2016 at 13:20:16 UTC, Andrei Alexandrescu wrote: On 09/15/2016 08:35 AM, Stefan Koch wrote: On Thursday, 15 September 2016 at 12:26:08 UTC, Andrei Alexandrescu wrote: Apparently we need that static foreach iteration. --

Re: bug?

2016-09-15 Thread koia via Digitalmars-d-learn
On Thursday, 15 September 2016 at 14:00:47 UTC, koia wrote: On Thursday, 15 September 2016 at 13:54:44 UTC, deed wrote: void main () { new int[](1); } Compiles with dmd 2.071.2-b2, but no code is generated for `new int[](1);`. Caused a bug due to: char[] arr; got updated to char[] arr;

Re: bug?

2016-09-15 Thread koia via Digitalmars-d-learn
On Thursday, 15 September 2016 at 13:54:44 UTC, deed wrote: void main () { new int[](1); } Compiles with dmd 2.071.2-b2, but no code is generated for `new int[](1);`. Caused a bug due to: char[] arr; got updated to char[] arr; new char[](SIZE); If it's considered a bug and someone would

Re: The worst Phobos template (in binderoo)

2016-09-15 Thread Stefan Koch via Digitalmars-d
On Thursday, 15 September 2016 at 13:49:46 UTC, Andrei Alexandrescu wrote: On 09/15/2016 09:27 AM, Stefan Koch wrote: On Thursday, 15 September 2016 at 13:20:16 UTC, Andrei Alexandrescu wrote: On 09/15/2016 08:35 AM, Stefan Koch wrote: On Thursday, 15 September 2016 at 12:26:08 UTC, Andrei

Re: bug?

2016-09-15 Thread deed via Digitalmars-d-learn
On Thursday, 15 September 2016 at 13:57:13 UTC, rikki cattermole wrote: Not a bug, it is never used. I'd expect an "Error: ... no effect ..." from the compiler.

Re: ddoc latex/formulas?

2016-09-15 Thread Manu via Digitalmars-d
On 15 September 2016 at 21:39, Andrei Alexandrescu via Digitalmars-d wrote: > On 9/15/16 5:50 AM, Johan Engelen wrote: >> >> On Wednesday, 14 September 2016 at 11:36:11 UTC, Andrei Alexandrescu >> wrote: >>> >>> On 9/14/16 1:50 AM, Manu via Digitalmars-d wrote:

Re: The worst Phobos template (in binderoo)

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 08:35 AM, Stefan Koch wrote: On Thursday, 15 September 2016 at 12:26:08 UTC, Andrei Alexandrescu wrote: Apparently we need that static foreach iteration. -- Andrei What exactly do you mean ? As long as we instanciate n templates for a member nested n levels the overhead is

Re: The worst Phobos template (in binderoo)

2016-09-15 Thread Stefan Koch via Digitalmars-d
On Thursday, 15 September 2016 at 13:20:16 UTC, Andrei Alexandrescu wrote: On 09/15/2016 08:35 AM, Stefan Koch wrote: On Thursday, 15 September 2016 at 12:26:08 UTC, Andrei Alexandrescu wrote: Apparently we need that static foreach iteration. -- Andrei What exactly do you mean ? As long as

[Issue 9029] Built-in types treated specially for alias parameters

2016-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9029 Jonathan M Davis changed: What|Removed |Added CC|

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 08:40 AM, Adam D. Ruppe wrote: On Wednesday, 14 September 2016 at 15:49:27 UTC, bachmeier wrote: I agree. That's why I quickly gave up on ddoc. My doc generator just pipes special input text through the latex program to generate an image, which is then inlined in the html:

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 08:42 AM, Manu via Digitalmars-d wrote: On 15 September 2016 at 21:39, Andrei Alexandrescu via Digitalmars-d wrote: TL;DR, doxygen has: /** * /f[ ...latex syntax here... /f] */ And like magic, your documentation has maths. I expect to write an

Re: colour lib needs reviewers

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 02:55 AM, Jacob Carlborg wrote: On 2016-09-14 22:14, Andrei Alexandrescu wrote: Why? -- Andrei I've recently worked on a theme for Ddoc that will be used in TextMate. For convince I started by adding the CSS inline in the head tag. Turns out if you have CSS looking like this:

Re: What is the most stable D compiler

2016-09-15 Thread eugene via Digitalmars-d
On Thursday, 15 September 2016 at 06:26:40 UTC, Jacob Carlborg wrote: On 2016-09-14 13:42, rikki cattermole wrote: GDC is the slowest to update currently so that can be ignored for now. LDC has fairly fast updates in terms of the frontend and can target more platforms. I would say 42

Re: ddoc latex/formulas?

2016-09-15 Thread Manu via Digitalmars-d
On 15 September 2016 at 22:40, Adam D. Ruppe via Digitalmars-d wrote: > On Wednesday, 14 September 2016 at 15:49:27 UTC, bachmeier wrote: >> >> I agree. That's why I quickly gave up on ddoc. > > > My doc generator just pipes special input text through the latex

[Issue 16496] New: __traits(getAttributes, ...) should work with built-in types

2016-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16496 Issue ID: 16496 Summary: __traits(getAttributes, ...) should work with built-in types Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: [UDA] Error: first argument is not a symbol

2016-09-15 Thread drug via Digitalmars-d-learn
15.09.2016 15:56, Steven Schveighoffer пишет: This is due to int not being a symbol, which apparently __traits(getAttributes, ...) requires. int is a keyword and not considered a symbol. An annoying distinction without a difference in this case. I'd say it's something we should fix, but this

Re: [UDA] Error: first argument is not a symbol

2016-09-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, September 15, 2016 08:56:18 Steven Schveighoffer via Digitalmars- d-learn wrote: > On 9/15/16 4:48 AM, drug wrote: > > https://dpaste.dzfl.pl/9548c481ce46 > > > > shouldn't commented line return 'false' as built-in type 'int' has no > > any UDAs instead of cryptic (for me) message

Re: The worst Phobos template (in binderoo)

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/14/2016 05:50 PM, Stefan Koch wrote: On Wednesday, 14 September 2016 at 21:06:10 UTC, Andrei Alexandrescu wrote: On 09/14/2016 04:52 PM, Stefan Koch wrote: [...] (Disclaimer: I didn't run any speed tests.) By looking at the definition of fullyQualifiedName it seems to me we can go a

[Issue 16193] opApply() doesn't heap allocate closure

2016-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16193 --- Comment #8 from Steven Schveighoffer --- (In reply to Walter Bright from comment #7) > Also, this was not a regression. I distinctly remember at some point in the last 10 years that you HAD to mark opApply scope or it would

Re: bug?

2016-09-15 Thread rikki cattermole via Digitalmars-d-learn
On 16/09/2016 1:54 AM, deed wrote: void main () { new int[](1); } Compiles with dmd 2.071.2-b2, but no code is generated for `new int[](1);`. Caused a bug due to: char[] arr; got updated to char[] arr; new char[](SIZE); If it's considered a bug and someone would file it, I'd be thankful.

Re: bug?

2016-09-15 Thread Daniel Kozak via Digitalmars-d-learn
Dne 15.9.2016 v 15:57 rikki cattermole via Digitalmars-d-learn napsal(a): On 16/09/2016 1:54 AM, deed wrote: void main () { new int[](1); } Compiles with dmd 2.071.2-b2, but no code is generated for `new int[](1);`. Caused a bug due to: char[] arr; got updated to char[] arr; new

Re: Metaprogramming with traits

2016-09-15 Thread Gary Willoughby via Digitalmars-d-learn
On Thursday, 15 September 2016 at 15:07:09 UTC, Ram_B wrote: How i can get fields of derived classes in runtime? This not works What about something like this: import std.traits; import std.stdio; class A { int a,b; this(){} void fields(this T)(){

New reviewing flow on github

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
https://help.github.com/articles/about-pull-request-reviews/ Nice! Now it looks a bit closer to phabricator (which is really cool). We should adjust our procedures accordingly. -- Andrei

Re: colour lib needs reviewers

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 11:25 AM, bachmeier wrote: On Thursday, 15 September 2016 at 00:42:57 UTC, Andrei Alexandrescu wrote: Do you mean like a macro $(VERBATIM ... text with balanced parens ...)? -- Andrei Yes. Unfortunately I cannot find any mention of it on this page:

Re: ddoc latex/formulas?

2016-09-15 Thread Johan Engelen via Digitalmars-d
On Thursday, 15 September 2016 at 14:42:37 UTC, Andrei Alexandrescu wrote: On 09/15/2016 10:37 AM, Johan Engelen wrote: On Thursday, 15 September 2016 at 11:39:13 UTC, Andrei Alexandrescu wrote: * ddoc has absolutely nada notion of rendering. To ask "how do I render sqrt and aligned matrices

Re: ddoc latex/formulas?

2016-09-15 Thread bachmeier via Digitalmars-d
On Thursday, 15 September 2016 at 15:43:39 UTC, Johan Engelen wrote: - Perhaps we can "standardize" the MathJax thing for Phobos docs? Would be nice for Manu's color lib and for Mir too. (where are the Mir guys anyway in this discussion? ;) As I commented above to Andrei, I think KaTeX is

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 11:13 AM, bachmeier wrote: On Thursday, 15 September 2016 at 13:48:44 UTC, Andrei Alexandrescu wrote: That strikes me as an inferior solution to what's available today, which is used at http://erdani.com/d/DIP1000-typing-baseline.html. But how did you do that? See source at

Re: ddoc latex/formulas?

2016-09-15 Thread ag0aep6g via Digitalmars-d
On 09/15/2016 05:43 PM, Johan Engelen wrote: - Perhaps we can "standardize" the MathJax thing for Phobos docs? Would be nice for Manu's color lib and for Mir too. (where are the Mir guys anyway in this discussion? ;) I'm not familiar with MathJax. Looks like a client-side library. In my

[Issue 16498] New: ddoc should offer a built-in macro for passing raw text through

2016-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16498 Issue ID: 16498 Summary: ddoc should offer a built-in macro for passing raw text through Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: DIP1000

2016-09-15 Thread Kagamin via Digitalmars-d
Well, aliasing can be reproduced with locals S s; int* r = getPayload(s); freePayload(s); int v = *r; //UAF Multiparameter functions can be declared to be equivalent to struct P { S* s; int* r; } P p; p.s = p.r = getPayload(s); f(p); //as if f(S*,int*)

Re: colour lib needs reviewers

2016-09-15 Thread Jacob Carlborg via Digitalmars-d
On 2016-09-15 09:11, Manu via Digitalmars-d wrote: Do we mind moving this discussion to the other topic I started actually on this topic? It's slightly upsetting that this discussion about ddoc is more popular than the colour lib I spent months workinng on :( Sorry. Is it the "ddoc

Re: ddoc latex/formulas?

2016-09-15 Thread Jacob Carlborg via Digitalmars-d
On 2016-09-14 15:38, Manu via Digitalmars-d wrote: I'm kinda feeling ddoc is fairy serious problem. Doxygen is like... a lot better :/ I'm struggling to produce docs I'm happy with. Formatting is hard, macros for everything really sucks! For reference:

Re: ddoc latex/formulas?

2016-09-15 Thread Johan Engelen via Digitalmars-d
On Wednesday, 14 September 2016 at 11:36:11 UTC, Andrei Alexandrescu wrote: On 9/14/16 1:50 AM, Manu via Digitalmars-d wrote: Can we produce formulas, or latex in ddoc? Are there any examples in phobos I can refer to? https://github.com/dlang/dlang.org/blob/master/latex.ddoc That's the

Re: The worst Phobos template (in binderoo)

2016-09-15 Thread Stefan Koch via Digitalmars-d
On Thursday, 15 September 2016 at 06:08:33 UTC, Dicebot wrote: mixin("alias T2 = " ~ fqn!T); static assert(is(T2 == T)); In that sense builtin trait could be a better option. Yes a builtin trait is the better option. I made a youtube video about that. Showing you how bad FullyQualifiedName

checkedint submission

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
I added support for const and immutable qualifiers to Checked: https://github.com/dlang/phobos/pull/4613/commits/be23323dc6d510503462ee11dbdb26b7af61aa61 It took 80 lines, which is only some 3% of the code base. Most aggravation was in fact caused by opBinary not accepting the "this" template

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 11:43 AM, Johan Engelen wrote: On Thursday, 15 September 2016 at 14:42:37 UTC, Andrei Alexandrescu wrote: On 09/15/2016 10:37 AM, Johan Engelen wrote: Btw, Ddoc is perhaps a little more than a macro system, and that's why using parameter names in equations is broken. Parameter

Re: Can vibe d leverage existing web technologies?

2016-09-15 Thread Martin Tschierschke via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 23:45:18 UTC, Intersteller wrote: vibe.d does not have much lateral support as the most commons web technologies do. Can vibe.d leverage pre-existing techs such as php, ruby/rails, etc? Starting from scratch and having to build a robust and secure framework is

Re: ddoc latex/formulas?

2016-09-15 Thread Johan Engelen via Digitalmars-d
On Thursday, 15 September 2016 at 11:39:13 UTC, Andrei Alexandrescu wrote: * ddoc has absolutely nada notion of rendering. To ask "how do I render sqrt and aligned matrices with ddoc" does not compute. Is there agreement on that? D has absolutely no notion of "databases", but I think it's

Re: colour lib needs reviewers

2016-09-15 Thread Jacob Carlborg via Digitalmars-d
On 2016-09-15 08:44, Walter Bright wrote: The original idea was to be able to write documentation without needing many macros, if any. Such as this I wrote recently: /** * Provides a safe interface to the Posix stat() function. * * Detailed description that I didn't write for this function,

Re: colour lib needs reviewers

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 10:37 AM, Jacob Carlborg wrote: Yeah, if you already have defined all the standard ddoc macros because the default styling is not useful at all. Glad to hear that. It becomes a matter of improving the default-provided macros and/or distribute some .ddoc batteries. Jacob, I'd

Re: ddoc latex/formulas?

2016-09-15 Thread Jonathan M Davis via Digitalmars-d
On Thursday, September 15, 2016 10:43:56 Andrei Alexandrescu via Digitalmars-d wrote: > Probably a wiki page would be an awesome idea. -- Andrei Well, for better or worse, he asked it on SO: http://stackoverflow.com/questions/39514027/how-to-show-math-equations-with-ddoc

[Issue 16497] New: suboptimal moves between SSE registers

2016-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16497 Issue ID: 16497 Summary: suboptimal moves between SSE registers Product: D Version: D2 Hardware: x86_64 OS: All Status: NEW Severity: normal

Re: Metaprogramming with traits

2016-09-15 Thread rikki cattermole via Digitalmars-d-learn
On 16/09/2016 3:07 AM, Ram_B wrote: How i can get fields of derived classes in runtime? This not works import std.traits; import std.experimental.logger; class A { int a,b; this(){} void fields(){ log(FieldNameTuple!this); } } class B : A{ int c; this(){} }

Re: bug?

2016-09-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, September 15, 2016 14:07:18 deed via Digitalmars-d-learn wrote: > On Thursday, 15 September 2016 at 13:57:13 UTC, rikki cattermole > > wrote: > > Not a bug, it is never used. > > I'd expect an "Error: ... no effect ..." from the compiler. That would only work in fairly simplistic

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 10:37 AM, Johan Engelen wrote: On Thursday, 15 September 2016 at 11:39:13 UTC, Andrei Alexandrescu wrote: * ddoc has absolutely nada notion of rendering. To ask "how do I render sqrt and aligned matrices with ddoc" does not compute. Is there agreement on that? D has absolutely

Re: The worst Phobos template (in binderoo)

2016-09-15 Thread Stefan Koch via Digitalmars-d
On Thursday, 15 September 2016 at 14:38:41 UTC, Andrei Alexandrescu wrote: On 09/15/2016 10:08 AM, Stefan Koch wrote: static foreach on the other hand is a whole new can of worms. As walter will be able to tell you. It's time to open it. -- Andrei Please give me an example on how it should

Re: ddoc latex/formulas?

2016-09-15 Thread Johan Engelen via Digitalmars-d
On Thursday, 15 September 2016 at 14:43:56 UTC, Andrei Alexandrescu wrote: On 09/15/2016 10:37 AM, Johan Engelen wrote: Now, can we please add this question to stackoverflow, and add this as an answer? :) Probably a wiki page would be an awesome idea. -- Andrei We need more stackoverflow

Re: colour lib needs reviewers

2016-09-15 Thread bachmeier via Digitalmars-d
On Thursday, 15 September 2016 at 00:42:57 UTC, Andrei Alexandrescu wrote: Do you mean like a macro $(VERBATIM ... text with balanced parens ...)? -- Andrei Yes. Unfortunately I cannot find any mention of it on this page: http://dlang.org/spec/ddoc.html

Re: ddoc latex/formulas?

2016-09-15 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 15 September 2016 at 13:12:05 UTC, Manu wrote: What does that mean? What's your process to produce this output? ./adrdox test.d The program internally runs pipeProcess over to latex to make the image when it sees the $(MATH ) syntax. Problem is, phobos uses vanilla ddoc...

Re: The worst Phobos template (in binderoo)

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 10:08 AM, Stefan Koch wrote: static foreach on the other hand is a whole new can of worms. As walter will be able to tell you. It's time to open it. -- Andrei

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 10:15 AM, Adam D. Ruppe wrote: On Thursday, 15 September 2016 at 13:12:05 UTC, Manu wrote: What does that mean? What's your process to produce this output? ./adrdox test.d The program internally runs pipeProcess over to latex to make the image when it sees the $(MATH )

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 10:37 AM, Johan Engelen wrote: Well, I'm pretty sure just typing \( \) and running `dmd -D` is not going to give me the output that I want. Indeed it doesn't. But, as you write, it's easy to make it happen. Full example: ``` /** * Macros: * DDOC = * * * *

Re: vibe.d maxRequestSize

2016-09-15 Thread Chris via Digitalmars-d-learn
On Thursday, 15 September 2016 at 13:26:48 UTC, Steven Schveighoffer wrote: On 9/15/16 9:11 AM, Chris wrote: On Wednesday, 14 September 2016 at 20:23:09 UTC, Steven Schveighoffer wrote: Hm.. I have adjusted this in my project, and it works (set to 50M). Needed it for uploading large

Metaprogramming with traits

2016-09-15 Thread Ram_B via Digitalmars-d-learn
How i can get fields of derived classes in runtime? This not works import std.traits; import std.experimental.logger; class A { int a,b; this(){} void fields(){ log(FieldNameTuple!this); } } class B : A{ int c; this(){} }

Re: ddoc latex/formulas?

2016-09-15 Thread bachmeier via Digitalmars-d
On Thursday, 15 September 2016 at 13:48:44 UTC, Andrei Alexandrescu wrote: That strikes me as an inferior solution to what's available today, which is used at http://erdani.com/d/DIP1000-typing-baseline.html. But how did you do that? I think KaTeX may be a better solution for documentation

Re: ddoc latex/formulas?

2016-09-15 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 15 September 2016 at 14:40:24 UTC, Andrei Alexandrescu wrote: Wait, but I just showed how with vanilla ddoc you can immediately use mathjax to do better than adrdox. No need for any pre/postprocessing or scripting, just one line of import. mathjax IS postprocessing via scripting.

Re: ddoc latex/formulas?

2016-09-15 Thread Johan Engelen via Digitalmars-d
On Thursday, 15 September 2016 at 16:35:53 UTC, Andrei Alexandrescu wrote: - Also, how about that parameter name problem? Any good fix for that? Let's see how the underscore does. Underscore works, updating SO example.

Maybe allocator.dispose could nullify its parameter?

2016-09-15 Thread Yuxuan Shui via Digitalmars-d
Looks like a reasonable thing to do, e.g.: auto p = Mallocator.instance.make!ulong(0); Mallocator.instance.dispose(p); assert(p is null); Proof of concept: void disposeX(Allocator, T)(auto ref Allocator a, ref B b) { a.dispose(b); b = null; }

Re: ddoc latex/formulas?

2016-09-15 Thread Johan Engelen via Digitalmars-d
On Thursday, 15 September 2016 at 16:35:53 UTC, Andrei Alexandrescu wrote: On 09/15/2016 11:43 AM, Johan Engelen wrote: - Perhaps we can "standardize" the MathJax thing for Phobos docs? Johan, do you think I could impose on you to try your hand? The solution would redefine DDOC as above

Re: colour lib needs reviewers

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 02:34 PM, Jacob Carlborg wrote: On 2016-09-15 14:54, Andrei Alexandrescu wrote: Yah, this is terrible (it happens with http: all the time). We need to suppress the special meaning of ":" to only the cases when it's preceded by only one word and followed by a newline, e,g,

Re: checkedint submission

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 02:38 PM, Robert burner Schadek wrote: could you please update the dub package Did this just now: git commit -am "Add const/immutable support" git tag v0.0.3 git push -u origin master git push --tags Is this all? Thx! Andrei

Re: New reviewing flow on github

2016-09-15 Thread Robert burner Schadek via Digitalmars-d
They also have kanban style project management stuff now. I would really like to see anything (bugzilla, trello) moved to github.

Re: Using OpenGL

2016-09-15 Thread Darren via Digitalmars-d-learn
On Thursday, 15 September 2016 at 02:11:03 UTC, Mike Parker wrote: //snip Okay the crashing was my fault, more or less a copy-paste error. The program now runs but has a black rectangle where a texture should be. This is the code I'm using:

Re: bug?

2016-09-15 Thread deed via Digitalmars-d-learn
On Thursday, 15 September 2016 at 14:42:13 UTC, Jonathan M Davis wrote: On Thursday, September 15, 2016 14:07:18 deed via Digitalmars-d-learn wrote: On Thursday, 15 September 2016 at 13:57:13 UTC, rikki cattermole wrote: > Not a bug, it is never used. I'd expect an "Error: ... no effect ..."

std.algorithm.iteration.each requires opApply to have ref elements?

2016-09-15 Thread Q. Schroll via Digitalmars-d-learn
Why does it do that? And seemingly it does not require it for opApply with more than two arguments.

Re: colour lib needs reviewers

2016-09-15 Thread Meta via Digitalmars-d
On Wednesday, 14 September 2016 at 20:14:48 UTC, Andrei Alexandrescu wrote: On 09/14/2016 09:47 AM, Meta wrote: On Wednesday, 14 September 2016 at 13:28:23 UTC, Manu wrote: Cheers. Yeah, I need to do better with ddoc. ... I'm just gonna go on the record and say that I am really, really not

Re: colour lib needs reviewers

2016-09-15 Thread Jacob Carlborg via Digitalmars-d
On 2016-09-15 14:54, Andrei Alexandrescu wrote: Yah, this is terrible (it happens with http: all the time). We need to suppress the special meaning of ":" to only the cases when it's preceded by only one word and followed by a newline, e,g, "\ncolor:\n". It's useful for many of the sections

Re: checkedint submission

2016-09-15 Thread Robert burner Schadek via Digitalmars-d
could you please update the dub package

Re: colour lib needs reviewers

2016-09-15 Thread Jacob Carlborg via Digitalmars-d
On 2016-09-15 16:45, Andrei Alexandrescu wrote: Glad to hear that. It becomes a matter of improving the default-provided macros and/or distribute some .ddoc batteries. Jacob, I'd also like to thank for the great constructive ideas for improving things and for formulating them as enhancement

[Issue 16499] New: Useless error message for 'in' expressions

2016-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16499 Issue ID: 16499 Summary: Useless error message for 'in' expressions Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement

Re: colour lib needs reviewers

2016-09-15 Thread Bastiaan Veelo via Digitalmars-d
On Thursday, 15 September 2016 at 09:46:07 UTC, Patrick Schluter wrote: There are also some niceties like auto brief and autoreferencing (when a symbol is written in a text will be clickable if its body was reachable during generation of the doc). Not only that, by using tag files [1]

Window x64, LDC, Derelict : unable to compile

2016-09-15 Thread Patric Dexheimer via Digitalmars-d-learn
LLVM D compiler (1a7070): based on DMD v2.071.2-b2 and LLVM 3.9.0git-fbbabf3 command: dub run --build=release --arch=x86_64 --compiler=D:/ldc/bin/ldc2.exe Output: Performing "release" build using D:/ldc/bin/ldc2.exe for x86_64. derelict-util 2.0.6: building configuration "library"... Error:

Re: ddox table issue

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 9/15/16 5:29 PM, ag0aep6g wrote: On Thursday, 15 September 2016 at 20:17:54 UTC, Andrei Alexandrescu wrote: http://dtest.thecybershadow.net/artifact/website-b243266be0bd9e2a1d56da2d9e76c9e44689e1dd-17113e48d3b1f18b74e0fea1fa8e64ab/web/library-prerelease/std/experimental/checkedint.html The

Re: ddox table issue

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 9/15/16 4:17 PM, Andrei Alexandrescu wrote: Lodovoco noticed that ddox renders a table wrongly, see the first (and incomplete) table at Sorry for misspelling Lodovico's name. BTW is he still around? -- Andrei

Re: vibe.d maxRequestSize

2016-09-15 Thread sarn via Digitalmars-d-learn
I hope this isn't too obvious, but I have to ask because it's such a common gotcha: Are you reverse proxying through a server like nginx by any chance? There are default request size limits there. (For nginx specifically, it's this one:

Re: The worst Phobos template (in binderoo)

2016-09-15 Thread Stefan Koch via Digitalmars-d
On Thursday, 15 September 2016 at 23:25:34 UTC, Stefan Koch wrote: On Thursday, 15 September 2016 at 23:08:54 UTC, Andrei Alexandrescu wrote: Yes, that DIP.[http://wiki.dlang.org/DIP57] It would need some more formal work before defining an implementation. Stefan, would you want to lead that

Re: iPhone vs Android

2016-09-15 Thread Chris Wright via Digitalmars-d
On Wed, 14 Sep 2016 13:37:03 +, Laeeth Isharc wrote: > On Wednesday, 14 September 2016 at 13:28:45 UTC, finalpatch wrote: >> On Tuesday, 13 September 2016 at 18:24:26 UTC, deadalnix wrote: >>> No you don't, as how often the GC kicks in depend of the rate at which >>> you produce garbage,

Re: iPhone vs Android

2016-09-15 Thread R via Digitalmars-d
On Monday, 12 September 2016 at 22:57:23 UTC, Andrei Alexandrescu wrote: [snip] If it is, that provides more impetus for reference counting for D by the following logic: (a) it is likely that in the future more code will run on portable, battery-powered systems; (b) battery power does not

Re: Metaprogramming with traits

2016-09-15 Thread Ram_B via Digitalmars-d-learn
On Thursday, 15 September 2016 at 15:56:56 UTC, Gary Willoughby wrote: On Thursday, 15 September 2016 at 15:07:09 UTC, Ram_B wrote: How i can get fields of derived classes in runtime? This not works What about something like this: import std.traits; import std.stdio; class A { int

Re: bug?

2016-09-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, September 15, 2016 15:15:49 Jonathan M Davis via Digitalmars-d- learn wrote: > On Thursday, September 15, 2016 18:15:52 deed via Digitalmars-d-learn wrote: > > I'm curious when you would need to do only `new Struct[](1000);` > > instead of > > `auto structs = new Struct[](1000);`? > >

Re: Using OpenGL

2016-09-15 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 15 September 2016 at 19:03:22 UTC, Darren wrote: This is the code I'm using: https://dfcode.wordpress.com/2016/09/15/texcodewip/ (The code for the shaders is at the bottom) For comparison, this is the code I'm trying to make work:

Ddoc macro syntax

2016-09-15 Thread Walter Bright via Digitalmars-d
On 9/15/2016 4:06 AM, Andrei Alexandrescu wrote: > I was thinking more about it and figured we could introduce a special macro at > the very beginning of a .ddoc file or "Macros:" section called > DDOC_MACRO_CALL_SYNTAX. It may be defined one of the following: > > DDOC_MACRO_CALL_SYNTAX = DDOC >

Re: colour lib needs reviewers

2016-09-15 Thread Walter Bright via Digitalmars-d
Started a new thread on this, "Ddoc macro syntax". Please direct further discussion there.

Re: colour lib needs reviewers

2016-09-15 Thread Walter Bright via Digitalmars-d
On 9/15/2016 7:37 AM, Jacob Carlborg wrote: Yeah, if you already have defined all the standard ddoc macros because the default styling is not useful at all. The default styling was set up to produce legible output while not requiring any configuration file, nor a .css style file nor any

Re: colour lib needs reviewers

2016-09-15 Thread Walter Bright via Digitalmars-d
On 9/15/2016 4:59 AM, Nemanja Boric wrote: On Thursday, 15 September 2016 at 09:45:26 UTC, Marco Leise wrote: Am Wed, 14 Sep 2016 23:44:16 -0700 schrieb Walter Bright : I suspect that adding Markdown would help a lot (yes, I changed my mind about that).

Re: bug?

2016-09-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, September 15, 2016 18:15:52 deed via Digitalmars-d-learn wrote: > I'm curious when you would need to do only `new Struct[](1000);` > instead of > `auto structs = new Struct[](1000);`? Need to do? Probably never. It would be a pretty weird thing to do. But if Struct has a destructor

Re: The worst Phobos template (in binderoo)

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 9/15/16 7:08 PM, Andrei Alexandrescu wrote: Yes, that DIP. It would need some more formal work before defining an implementation. Stefan, would you want to lead that effort? -- Andrei Actually I see Timon authored that (I thought it's an older DIP by Walter). Timon, would you want to

Re: The worst Phobos template (in binderoo)

2016-09-15 Thread Stefan Koch via Digitalmars-d
On Thursday, 15 September 2016 at 22:58:12 UTC, Stefan Koch wrote: The Performance-Penalty will be less then on templates. Let me add a disclaimer, I _think_ the performance penalty _can_ be less then the penalty on templates. Also static if can sometimes lead to counter-intuitive situations,

Re: DIP1000

2016-09-15 Thread Timon Gehr via Digitalmars-d
On 16.09.2016 01:07, Andrei Alexandrescu wrote: On 9/15/16 5:14 PM, Timon Gehr wrote: struct can either be annotated or not annotated, the fields cannot be treated independently (which is one of the weaknesses of DIP1000). I was planning to allow scope annotations for struct fields. -- Andrei

  1   2   >