Re: thisExePath purity

2016-09-19 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 20, 2016 04:17:21 crimaniak via Digitalmars-d-learn wrote: > static shared immutable ReturnType!T value; I would point out that immutable is implicitly shared, so there's no reason to put shared on an immutable variable. However, you _do_ want to put shared on a sta

Re: thisExePath purity

2016-09-19 Thread crimaniak via Digitalmars-d-learn
Hi and thanks all! On Tuesday, 20 September 2016 at 00:43:10 UTC, Jonathan M Davis wrote: immutable string executablePath; shared static this() { import std.file : thisExePath(); executablePath = thisExePath(); } This code is good for my needs but I start to think about how to cal

Re: polar coordinates with ggplotd

2016-09-19 Thread brocolis via Digitalmars-d-learn
On Monday, 19 September 2016 at 12:34:56 UTC, Edwin van Leeuwen wrote: On Sunday, 18 September 2016 at 22:13:35 UTC, brocolis wrote: Found an error in ys line. Thanks. Does that mean you solved it? Currently there is no special support for other coordinate systems, but I recently added Guide

Re: thisExePath purity

2016-09-19 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 20, 2016 00:37:10 Stefan Koch via Digitalmars-d-learn wrote: > On Tuesday, 20 September 2016 at 00:01:58 UTC, crimaniak wrote: > > Hi! > > > > Is there situations when output of thisExePath() can be > > different during runtime? If yes, what the reason? > > If no, is this pos

Re: thisExePath purity

2016-09-19 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 20, 2016 00:01:58 crimaniak via Digitalmars-d-learn wrote: > Hi! > > Is there situations when output of thisExePath() can be different > during runtime? If yes, what the reason? > If no, is this possible to mark it as pure in phobos? > > https://dlang.org/library/std/file/thi

Re: thisExePath purity

2016-09-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/19/16 8:01 PM, crimaniak wrote: Hi! Is there situations when output of thisExePath() can be different during runtime? If yes, what the reason? If no, is this possible to mark it as pure in phobos? https://dlang.org/library/std/file/this_exe_path.html Not in a way that D can ensure purity

Re: thisExePath purity

2016-09-19 Thread Stefan Koch via Digitalmars-d-learn
On Tuesday, 20 September 2016 at 00:01:58 UTC, crimaniak wrote: Hi! Is there situations when output of thisExePath() can be different during runtime? If yes, what the reason? If no, is this possible to mark it as pure in phobos? https://dlang.org/library/std/file/this_exe_path.html No way t

thisExePath purity

2016-09-19 Thread crimaniak via Digitalmars-d-learn
Hi! Is there situations when output of thisExePath() can be different during runtime? If yes, what the reason? If no, is this possible to mark it as pure in phobos? https://dlang.org/library/std/file/this_exe_path.html

Re: What blogs about D do you read?

2016-09-19 Thread A D dev via Digitalmars-d-learn
On Monday, 19 September 2016 at 21:49:04 UTC, Ali Çehreli wrote: https://atilanevesoncode.wordpress.com/ Ali Thanks, Ali.

Re: What blogs about D do you read?

2016-09-19 Thread Ali Çehreli via Digitalmars-d-learn
On 09/19/2016 01:20 PM, Guillaume Piolat wrote: On Monday, 19 September 2016 at 17:42:51 UTC, A D dev wrote: Hi list, What blogs about D do you read? Thanks in advance. https://dlang.org/blog/ http://dblog.aldacron.net/ http://minas-mina.com/ http://nomad.so/tag/d/ http://blog.thecybershadow

Re: What exactly does the compiler switch -betterC do?

2016-09-19 Thread Gary Willoughby via Digitalmars-d-learn
On Monday, 20 June 2016 at 06:35:32 UTC, Jacob Carlborg wrote: On 2016-06-19 21:53, Gary Willoughby wrote: When compiling, what exactly does the -betterC flag do? The command help says "omit generating some runtime information and helper functions" but what does this really mean? Is there any

Re: What blogs about D do you read?

2016-09-19 Thread A D dev via Digitalmars-d-learn
On Monday, 19 September 2016 at 20:20:26 UTC, Guillaume Piolat wrote: https://dlang.org/blog/ http://dblog.aldacron.net/ http://minas-mina.com/ http://nomad.so/tag/d/ http://blog.thecybershadow.net/ https://p0nce.github.io/d-idioms/ (disclaimer: my own) Great, thanks!

Re: What blogs about D do you read?

2016-09-19 Thread Guillaume Piolat via Digitalmars-d-learn
On Monday, 19 September 2016 at 17:42:51 UTC, A D dev wrote: Hi list, What blogs about D do you read? Thanks in advance. https://dlang.org/blog/ http://dblog.aldacron.net/ http://minas-mina.com/ http://nomad.so/tag/d/ http://blog.thecybershadow.net/ https://p0nce.github.io/d-idioms/ (disclaim

Re: What blogs about D do you read?

2016-09-19 Thread A D dev via Digitalmars-d-learn
On Monday, 19 September 2016 at 19:36:22 UTC, Karabuta wrote: I have one here on Vibe.d for beginners https://laberba.github.io/2016/hello-world-app-with-the-vibe.d-web-framework/ I will be writing more for-beginners blogs in the coming few weeks. Thank you. Will read it.

Re: What blogs about D do you read?

2016-09-19 Thread Karabuta via Digitalmars-d-learn
On Monday, 19 September 2016 at 19:29:25 UTC, A D dev wrote: On Monday, 19 September 2016 at 17:42:51 UTC, A D dev wrote: Hi list, What blogs about D do you read? To be more clear: - what blogs that include posts on D, would you recommend to a D beginner? Thanks. I have one here on Vibe

Re: What blogs about D do you read?

2016-09-19 Thread A D dev via Digitalmars-d-learn
On Monday, 19 September 2016 at 17:42:51 UTC, A D dev wrote: Hi list, What blogs about D do you read? To be more clear: - what blogs that include posts on D, would you recommend to a D beginner? Thanks.

Re: Iterate over two arguments at once

2016-09-19 Thread bachmeier via Digitalmars-d-learn
On Monday, 19 September 2016 at 18:10:22 UTC, bachmeier wrote: Suppose I want to iterate over two arrays at once: foreach(v1, v2; [1.5, 2.5, 3.5], [4.5, 5.5, 6.5]) { ... } I have seen a way to do this but cannot remember what it is and cannot find it. Thanks for the replies. This is what I

Re: Iterate over two arguments at once

2016-09-19 Thread Jon Degenhardt via Digitalmars-d-learn
On Monday, 19 September 2016 at 18:10:22 UTC, bachmeier wrote: Suppose I want to iterate over two arrays at once: foreach(v1, v2; [1.5, 2.5, 3.5], [4.5, 5.5, 6.5]) { ... } I have seen a way to do this but cannot remember what it is and cannot find it. range.lockstep: https://dlang.org/pho

Re: Iterate over two arguments at once

2016-09-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/19/16 2:10 PM, bachmeier wrote: Suppose I want to iterate over two arrays at once: foreach(v1, v2; [1.5, 2.5, 3.5], [4.5, 5.5, 6.5]) { ... } I have seen a way to do this but cannot remember what it is and cannot find it. http://dlang.org/phobos/std_range.html#.zip -Steve

Re: Iterate over two arguments at once

2016-09-19 Thread Lodovico Giaretta via Digitalmars-d-learn
On Monday, 19 September 2016 at 18:10:22 UTC, bachmeier wrote: Suppose I want to iterate over two arrays at once: foreach(v1, v2; [1.5, 2.5, 3.5], [4.5, 5.5, 6.5]) { ... } I have seen a way to do this but cannot remember what it is and cannot find it. You can use std.range.zip: https://dl

Re: vibe.d maxRequestSize

2016-09-19 Thread Chris via Digitalmars-d-learn
On Monday, 19 September 2016 at 17:54:05 UTC, Steven Schveighoffer wrote: On 9/19/16 1:34 PM, Chris wrote: [...] Here is the culprit: https://github.com/rejectedsoftware/vibe.d/blob/0.7.29/source/vibe/http/server.d#L1861 And the definition of MaxHTTPHeaderLineLength is: https://github.com/r

Iterate over two arguments at once

2016-09-19 Thread bachmeier via Digitalmars-d-learn
Suppose I want to iterate over two arrays at once: foreach(v1, v2; [1.5, 2.5, 3.5], [4.5, 5.5, 6.5]) { ... } I have seen a way to do this but cannot remember what it is and cannot find it.

Re: vibe.d maxRequestSize

2016-09-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/19/16 1:34 PM, Chris wrote: On Monday, 19 September 2016 at 16:55:05 UTC, Steven Schveighoffer wrote: Hm... you don't get a full stack trace? Hard to tell what max_bytes should be, it defaults to ulong.max, so no way you are exhausting that. Without knowing where readUntilSmall is called

What blogs about D do you read?

2016-09-19 Thread A D dev via Digitalmars-d-learn
Hi list, What blogs about D do you read? Thanks in advance.

Re: vibe.d maxRequestSize

2016-09-19 Thread Chris via Digitalmars-d-learn
On Monday, 19 September 2016 at 16:55:05 UTC, Steven Schveighoffer wrote: Hm... you don't get a full stack trace? Hard to tell what max_bytes should be, it defaults to ulong.max, so no way you are exhausting that. Without knowing where readUntilSmall is called, it's hard to diagnose. -St

Re: vibe.d maxRequestSize

2016-09-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/19/16 11:59 AM, Chris wrote: 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). Need

Re: seg fault, now what?

2016-09-19 Thread Kagamin via Digitalmars-d-learn
On Saturday, 17 September 2016 at 21:12:08 UTC, Ryan wrote: But I don't have another e-mail address, and it seems a bit much to create a fake e-mail account for a few bug reports. mailmetrash.com :)

Re: vibe.d maxRequestSize

2016-09-19 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 images

Re: seg fault, now what?

2016-09-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/17/16 5:12 PM, Ryan wrote: Is there an alternative to reporting bugs via bugzilla? I tried to open an account, but they recommend not using your main e-mail address because it will be posted to the web for all the spammers to find. But I don't have another e-mail address, and it seems a bit

Re: Forum for new programmers in spanish.

2016-09-19 Thread Geert via Digitalmars-d-learn
On Monday, 19 September 2016 at 10:10:18 UTC, Seb wrote: I don't speak Spanish, but I do like your idea of bringing D to more people :) Two ideas: 1) You could help to translate the DLang Tour to Spanish: https://tour.dlang.org https://github.com/dlang-tour/spanish 2) StackOverflow has an e

Re: polar coordinates with ggplotd

2016-09-19 Thread Edwin van Leeuwen via Digitalmars-d-learn
On Sunday, 18 September 2016 at 22:13:35 UTC, brocolis wrote: Found an error in ys line. Thanks. Does that mean you solved it? Currently there is no special support for other coordinate systems, but I recently added Guides for x/y coordinates which should make this relatively straightforward

Re: Forum for new programmers in spanish.

2016-09-19 Thread Seb via Digitalmars-d-learn
On Monday, 19 September 2016 at 05:56:04 UTC, Geert wrote: Hi all! I'm a PHP programmer, and i've been searching for new languages to learn. I think D it's the best of the newest languages, due its good documentation, clean sintaxis (or less verbose), and the applications developed in D run f

Help with "cannot alias an expression" compile error

2016-09-19 Thread Jacob Carlborg via Digitalmars-d-learn
I'm trying to do some form of reflection abstraction, here's my sample code: import std.meta; struct Fields(T) { private static alias toField(alias e) = Field!(__traits(identifier, e)); alias fields = staticMap!(toField, T.tupleof); static alias map(alias F) = staticMap!(F, fields