Re: rt/aaA.d Line: 553

2020-02-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/15/20 10:21 AM, Ferhat Kurtulmuş wrote: On Saturday, 15 February 2020 at 14:30:20 UTC, Steven Schveighoffer wrote: On 2/15/20 6:49 AM, Ferhat Kurtulmuş wrote: On Friday, 14 February 2020 at 23:41:45 UTC, Steven I'll note that you are going to leak some memory because you are not freeing

Re: How the hell to split multiple delims?

2020-02-15 Thread Paul Backus via Digitalmars-d-learn
On Saturday, 15 February 2020 at 22:30:03 UTC, Craig Dillabaugh wrote: On Saturday, 15 February 2020 at 11:32:42 UTC, AlphaPurned wrote: I've tried 10 different ways with split and splitter, I've used all the stuff that people have said online but nothing works. I always get a template mismatch

Re: How the hell to split multiple delims?

2020-02-15 Thread Craig Dillabaugh via Digitalmars-d-learn
On Saturday, 15 February 2020 at 11:32:42 UTC, AlphaPurned wrote: I've tried 10 different ways with split and splitter, I've used all the stuff that people have said online but nothing works. I always get a template mismatch error. Why is something so easy to do so hard in D? auto toks = std.

Re: How to get to body of HTTP 500 error with std.net.curl.get()?

2020-02-15 Thread Boris Carvajal via Digitalmars-d-learn
On Friday, 14 February 2020 at 00:24:27 UTC, Gregor Mückl wrote: Hi! I am trying to write a client for pretty... well... creatively designed web API. The server gives HTTP status 500 replies if the requests are malformed, but the actual error message is hidden in the body of the reply (an XML

Re: How to get to body of HTTP 500 error with std.net.curl.get()?

2020-02-15 Thread Anonymouse via Digitalmars-d-learn
On Saturday, 15 February 2020 at 16:25:42 UTC, Gregor Mückl wrote: Unfortunately, this is not true. The msg only contains the text information in the status line of the HTTP reply. If I'm not mistaken, the exception is created in this line in std/net/curl.d: enforce(statusLine.code / 100

Re: Dscanner: is it possible to switch off style checks case-by-case?

2020-02-15 Thread Luhrel via Digitalmars-d-learn
On Thursday, 13 February 2020 at 17:15:50 UTC, mark wrote: I'm starting out with GtkD and have this function: void main(string[] args) { Main.init(args); auto game = new GameWindow(); Main.run(); } and this method: void quit(Widget widget) { Main.quit(); } When I r

Re: rt/aaA.d Line: 553

2020-02-15 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Saturday, 15 February 2020 at 15:21:08 UTC, Ferhat Kurtulmuş wrote: On Saturday, 15 February 2020 at 14:30:20 UTC, Steven Schveighoffer wrote: On 2/15/20 6:49 AM, Ferhat Kurtulmuş wrote: On Friday, 14 February 2020 at 23:41:45 UTC, Steven Ops I ve made commits. Here are the links up to dat

Re: How to get to body of HTTP 500 error with std.net.curl.get()?

2020-02-15 Thread Gregor Mückl via Digitalmars-d-learn
On Friday, 14 February 2020 at 13:23:01 UTC, Andre Pany wrote: On Friday, 14 February 2020 at 00:24:27 UTC, Gregor Mückl wrote: Hi! I am trying to write a client for pretty... well... creatively designed web API. The server gives HTTP status 500 replies if the requests are malformed, but the

Re: rt/aaA.d Line: 553

2020-02-15 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Saturday, 15 February 2020 at 14:30:20 UTC, Steven Schveighoffer wrote: On 2/15/20 6:49 AM, Ferhat Kurtulmuş wrote: On Friday, 14 February 2020 at 23:41:45 UTC, Steven I'll note that you are going to leak some memory because you are not freeing deleted buckets when you resize. In the GC v

Re: Difference between range `save` and copy constructor

2020-02-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/15/20 9:45 AM, Jonathan M Davis wrote: On Saturday, February 15, 2020 7:34:42 AM MST Steven Schveighoffer via Digitalmars-d-learn wrote: On 2/15/20 5:53 AM, uranuz wrote: I am interested in current circumstances when we have new copy constructor feature what is the purpose of having range

Re: Difference between range `save` and copy constructor

2020-02-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, February 15, 2020 7:34:42 AM MST Steven Schveighoffer via Digitalmars-d-learn wrote: > On 2/15/20 5:53 AM, uranuz wrote: > > I am interested in current circumstances when we have new copy > > constructor feature what is the purpose of having range `save` > > primitive? For me they loo

Re: How the hell to split multiple delims?

2020-02-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/15/20 6:32 AM, AlphaPurned wrote: I've tried 10 different ways with split and splitter, I've used all the stuff that people have said online but nothing works. I always get a template mismatch error. Why is something so easy to do so hard in D? auto toks = std.regex.split(l, Regex("s"));

Re: Difference between range `save` and copy constructor

2020-02-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/15/20 5:53 AM, uranuz wrote: I am interested in current circumstances when we have new copy constructor feature what is the purpose of having range `save` primitive? For me they look like doing basicaly the same thing. And when looking in some source code of `range` module the most common

Re: rt/aaA.d Line: 553

2020-02-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/15/20 6:49 AM, Ferhat Kurtulmuş wrote: On Friday, 14 February 2020 at 23:41:45 UTC, Steven Schveighoffer wrote: On 2/14/20 6:36 PM, Ferhat Kurtulmuş wrote: İf ((aa.used + 1)* GROW_DEN > aa.dim * GROW_NUM) aa.grow(ti.key); This call is expensive (it reallocates all the bucke

Re: static foreach over enum symbols

2020-02-15 Thread Boris Carvajal via Digitalmars-d-learn
On Friday, 14 February 2020 at 22:24:14 UTC, Ben Jones wrote: Hi all, I'm getting unexpected results while trying to process symbols from a module, some of which are enums. Depending on whether or not I comment out the first static foreach loop below, fullyQualifiedName gives me different r

Re: static foreach over enum symbols

2020-02-15 Thread Boris Carvajal via Digitalmars-d-learn
On Friday, 14 February 2020 at 22:24:14 UTC, Ben Jones wrote: Hi all, I'm getting unexpected results while trying to process symbols from a module, some of which are enums. Depending on whether or not I comment out the first static foreach loop below, fullyQualifiedName gives me different r

Re: rt/aaA.d Line: 553

2020-02-15 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Friday, 14 February 2020 at 23:41:45 UTC, Steven Schveighoffer wrote: On 2/14/20 6:36 PM, Ferhat Kurtulmuş wrote:     İf ((aa.used + 1)* GROW_DEN > aa.dim * GROW_NUM)     aa.grow(ti.key); This call is expensive (it reallocates all the buckets and reinserts all the existing data into

Re: How the hell to split multiple delims?

2020-02-15 Thread mipri via Digitalmars-d-learn
On Saturday, 15 February 2020 at 11:32:42 UTC, AlphaPurned wrote: I've tried 10 different ways with split and splitter, I've used all the stuff that people have said online but nothing works. I always get a template mismatch error. Why is something so easy to do so hard in D? auto toks = std.

How the hell to split multiple delims?

2020-02-15 Thread AlphaPurned via Digitalmars-d-learn
I've tried 10 different ways with split and splitter, I've used all the stuff that people have said online but nothing works. I always get a template mismatch error. Why is something so easy to do so hard in D? auto toks = std.regex.split(l, Regex("s")); auto toks = std.regex.splitter(l, Regex

Difference between range `save` and copy constructor

2020-02-15 Thread uranuz via Digitalmars-d-learn
I am interested in current circumstances when we have new copy constructor feature what is the purpose of having range `save` primitive? For me they look like doing basicaly the same thing. And when looking in some source code of `range` module the most common thing that `save` does is that it

Re: Dscanner: is it possible to switch off style checks case-by-case?

2020-02-15 Thread mark via Digitalmars-d-learn
On Saturday, 15 February 2020 at 07:23:02 UTC, Basile B. wrote: On Thursday, 13 February 2020 at 17:15:50 UTC, mark wrote: I'm starting out with GtkD and have this function: [snip] Otherwise here is an example of how you can tune the different checks: https://raw.githubusercontent.com/