Re: vibe.d PaaS

2016-09-16 Thread Martin Tschierschke via Digitalmars-d-learn
On Wednesday, 14 September 2016 at 09:01:11 UTC, Guillaume Piolat wrote: Is there vibe.d hosting sold anywhere? I am using this one: https://www.menkisys.de/ in the moment vibe.d only for tests. But with an Rails web service, using a small parser for email with attached pdf, written in D,

Re: vibe.d maxRequestSize

2016-09-16 Thread Chris via Digitalmars-d-learn
On Friday, 16 September 2016 at 00:35:25 UTC, sarn wrote: 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

Re: Metaprogramming with traits

2016-09-16 Thread Gary Willoughby via Digitalmars-d-learn
On Thursday, 15 September 2016 at 22:05:55 UTC, Ram_B wrote: test.d(33): Error: variable f cannot be read at compile time test.d(33): Error: string expected as second argument of __traits hasMember instead of __error test.d(46): Error: template instance test.A.t!(B) error instantiating Maybe

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

2016-09-16 Thread Chris via Digitalmars-d-learn
On Thursday, 15 September 2016 at 18:23:14 UTC, Q. Schroll wrote: Why does it do that? And seemingly it does not require it for opApply with more than two arguments. Here's what the comment says: https://github.com/dlang/phobos/blob/master/std/algorithm/iteration.d#L929 // opApply with >2

Re: Array Copying syntax

2016-09-16 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/16/16 2:48 PM, Steven Schveighoffer wrote: On 9/16/16 2:28 PM, Antonio Corbi wrote: Way clearer (at least for me) with your patch! Hah, except it's actually wrong :) s = a compiles. Updated, should be good now. -Steve

Re: Array Copying syntax

2016-09-16 Thread Antonio Corbi via Digitalmars-d-learn
On Friday, 16 September 2016 at 18:12:22 UTC, Steven Schveighoffer wrote: On 9/16/16 2:03 PM, Antonio Corbi wrote: Hi Jonathan! Probably this entry in https://dlang.org/spec/arrays.html#usage confused me a bit. int[3] s; s = ...; // error, since s is a compiled in static

Re: Array Copying syntax

2016-09-16 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/16/16 2:28 PM, Antonio Corbi wrote: On Friday, 16 September 2016 at 18:12:22 UTC, Steven Schveighoffer wrote: On 9/16/16 2:03 PM, Antonio Corbi wrote: Hi Jonathan! Probably this entry in https://dlang.org/spec/arrays.html#usage confused me a bit. int[3] s; s = ...; // error,

Re: Metaprogramming with traits

2016-09-16 Thread Ram_B via Digitalmars-d-learn
On Friday, 16 September 2016 at 08:01:18 UTC, Gary Willoughby wrote: On Thursday, 15 September 2016 at 22:05:55 UTC, Ram_B wrote: test.d(33): Error: variable f cannot be read at compile time test.d(33): Error: string expected as second argument of __traits hasMember instead of __error

Re: Array Copying syntax

2016-09-16 Thread Ali Çehreli via Digitalmars-d-learn
On 09/16/2016 10:11 AM, Adam D. Ruppe wrote: On Friday, 16 September 2016 at 17:03:20 UTC, Antonio Corbi wrote: Is it safe to use or do I have to use the proposed 's[] = t;' or 's[] = t[]' ? That works for all arrays. `s = t` for dynamically sized arrays (aka slices) just sets the references

Re: Can vibe d leverage existing web technologies?

2016-09-16 Thread sarn via Digitalmars-d-learn
On Friday, 16 September 2016 at 12:46:34 UTC, Martin Tschierschke wrote: The "only" problem is you have to build your layout twice, in php and as diet template. :-( You also have to manage URLs across different codebases. I'd recommend against splitting up a frontend like that because it

Draw math formulas with ggplotd

2016-09-16 Thread brocolis via Digitalmars-d-learn
How do I draw math formulas programmatically? I want to do on screen what latex does on .pdf. And I want to draw a math formula in the image generated with ggplotd.

Re: Can vibe d leverage existing web technologies?

2016-09-16 Thread Martin Tschierschke via Digitalmars-d-learn
On Thursday, 15 September 2016 at 20:56:19 UTC, Intersteller wrote: On Thursday, 15 September 2016 at 14:31:28 UTC, Martin Tschierschke wrote: 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.

Re: Using OpenGL

2016-09-16 Thread Darren via Digitalmars-d-learn
On Friday, 16 September 2016 at 01:54:50 UTC, Mike Parker wrote: snip Okay,I actually had GL_RGB for those two fields and it didn't work, but I guess I didn't try them again after I fixed the crash issue because now it works fine. Thanks again for the guidance!

Array Copying syntax

2016-09-16 Thread Antonio Corbi via Digitalmars-d-learn
Hi! I was just playing with array initialization and copying and discovered that this syntax works as expected but it is not referenced under https://dlang.org/spec/arrays.html#array-copying: -8><- int[3] s; int[3] t; s = t; -8><- Is it safe to use or do I have to use the

Re: Array Copying syntax

2016-09-16 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 16 September 2016 at 17:03:20 UTC, Antonio Corbi wrote: Is it safe to use or do I have to use the proposed 's[] = t;' or 's[] = t[]' ? That works for all arrays. `s = t` for dynamically sized arrays (aka slices) just sets the references to the same, but for your statically sized

Re: Array Copying syntax

2016-09-16 Thread Antonio Corbi via Digitalmars-d-learn
On Friday, 16 September 2016 at 17:11:54 UTC, Adam D. Ruppe wrote: On Friday, 16 September 2016 at 17:03:20 UTC, Antonio Corbi wrote: Is it safe to use or do I have to use the proposed 's[] = t;' or 's[] = t[]' ? That works for all arrays. `s = t` for dynamically sized arrays (aka slices)

Re: Array Copying syntax

2016-09-16 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, September 16, 2016 17:22:41 Antonio Corbi via Digitalmars-d-learn wrote: > Shouldn't it be mentioned then in the docs that this works for > statically sized arrays and that in that case it copies contents? Well, I confess that I don't know why you would ever have thought that s = t;

Re: Array Copying syntax

2016-09-16 Thread Antonio Corbi via Digitalmars-d-learn
On Friday, 16 September 2016 at 17:55:59 UTC, Jonathan M Davis wrote: On Friday, September 16, 2016 17:22:41 Antonio Corbi via Digitalmars-d-learn wrote: Shouldn't it be mentioned then in the docs that this works for statically sized arrays and that in that case it copies contents? Well, I

Re: Array Copying syntax

2016-09-16 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/16/16 2:03 PM, Antonio Corbi wrote: Hi Jonathan! Probably this entry in https://dlang.org/spec/arrays.html#usage confused me a bit. int[3] s; s = ...; // error, since s is a compiled in static // reference to an array. Thanks for your help! Antonio Yeah, that's bad.