Re: weird exception on windows

2018-01-05 Thread Szabo Bogdan via Digitalmars-d-learn
On Monday, 18 December 2017 at 22:49:30 UTC, unleashy wrote: On Friday, 15 December 2017 at 21:56:48 UTC, Steven Schveighoffer wrote: On 12/15/17 10:08 AM, Kagamin wrote: Maybe this https://issues.dlang.org/show_bug.cgi?id=18084 Thanks for looking into this. I created a PR to fix. Szabo,

Re: weird exception on windows

2017-12-18 Thread Szabo Bogdan via Digitalmars-d-learn
On Saturday, 16 December 2017 at 12:01:49 UTC, Steven Schveighoffer wrote: On 12/16/17 5:12 AM, bauss wrote: On Saturday, 16 December 2017 at 08:07:30 UTC, Szabo Bogdan wrote: On Friday, 15 December 2017 at 21:56:48 UTC, Steven Schveighoffer wrote: On 12/15/17 10:08 AM, Kagamin wrote: Maybe

Re: weird exception on windows

2017-12-16 Thread Szabo Bogdan via Digitalmars-d-learn
On Friday, 15 December 2017 at 13:56:41 UTC, Kagamin wrote: You said tests fail? class SourceResult { private const { string file; size_t line; } this(string fileName = __FILE__, size_t line = __LINE__, size_t range = 6) nothrow

Re: weird exception on windows

2017-12-16 Thread Szabo Bogdan via Digitalmars-d-learn
On Friday, 15 December 2017 at 21:56:48 UTC, Steven Schveighoffer wrote: On 12/15/17 10:08 AM, Kagamin wrote: Maybe this https://issues.dlang.org/show_bug.cgi?id=18084 Thanks for looking into this. I created a PR to fix. Szabo, can you please try with this patch and see if it fixes your

Re: weird exception on windows

2017-12-15 Thread Szabo Bogdan via Digitalmars-d-learn
On Friday, 15 December 2017 at 09:24:07 UTC, Kagamin wrote: Try printf debugging in case argument is invalid. ah .. ok ... I tried to debug the issue and it looks like the filename is valid and there is no null value. I am thinking that the value is destroyed before it reach the

Re: weird exception on windows

2017-12-14 Thread Szabo Bogdan via Digitalmars-d-learn
On Thursday, 14 December 2017 at 14:47:25 UTC, Kagamin wrote: writeln(fileName); if (!fileName.exists) { return; } :) I'm not sure I understand this solution...

weird exception on windows

2017-12-14 Thread Szabo Bogdan via Digitalmars-d-learn
Hi, I noticed that sometimes on windows this line of code crashes the test suites. https://github.com/gedaiu/fluent-asserts/blob/master/core/fluentasserts/core/results.d#L1072 This exception can be captured only with a debugger... is it a dmd bug? ``` Thread 25CC created, Entry:

Getting the coverage data at runtime

2017-06-18 Thread Szabo Bogdan via Digitalmars-d-learn
Hi, I am wondering if there is any way of getting the code coverage at runtime... As a I seen in the runtime, the .lst files are created inside this module dealocator: https://github.com/dlang/druntime/blob/master/src/rt/cover.d#L152 and the `Cover[] gdata;` is private, so no way of

Re: std.algorithm can not be used inside pure functions?

2017-05-06 Thread Szabo Bogdan via Digitalmars-d-learn
On Saturday, 6 May 2017 at 15:01:16 UTC, Adam D. Ruppe wrote: On Saturday, 6 May 2017 at 14:14:41 UTC, Szabo Bogdan wrote: oh yes, I get it... begin and end are `SysTime`.. there is any workaround for this? Don't use pure? I don't think any of the SysTime conversion methods are pure since

Re: std.algorithm can not be used inside pure functions?

2017-05-06 Thread Szabo Bogdan via Digitalmars-d-learn
On Saturday, 6 May 2017 at 13:21:10 UTC, Adam D. Ruppe wrote: On Saturday, 6 May 2017 at 13:19:17 UTC, Szabo Bogdan wrote: a.begin.toISOExtString, I believe that function is not marked pure if it is a SysTime because it needs to pull global timezone info. What is the type of a.begin? oh

std.algorithm can not be used inside pure functions?

2017-05-06 Thread Szabo Bogdan via Digitalmars-d-learn
Hi, I'm trying to write a function that saves some structs as csv file: ``` string toCsv(const(StatStorage) storage) { return storage.values .map!(a => [ a.name, a.begin.toISOExtString, a.end.toISOExtString, a.status.to!string ]) .map!(a => a.join(',')) .join('\n'); } ``` I

Re: Stack Trace format

2017-04-30 Thread Szabo Bogdan via Digitalmars-d-learn
On Sunday, 30 April 2017 at 20:31:09 UTC, Szabo Bogdan wrote: Hi, I noticed that on different platforms the `object.Throwable.TraceInfo` has different formats. A program compiled on osx with ldc2 has all the TraceInfo empty... Why? I want to parse those strings or somehow iterate trough all

Stack Trace format

2017-04-30 Thread Szabo Bogdan via Digitalmars-d-learn
Hi, I noticed that on different platforms the `object.Throwable.TraceInfo` has different formats. A program compiled on osx with ldc2 has all the TraceInfo empty... Why? I want to parse those strings or somehow iterate trough all the stack elements, but if I get a different format on

code review based on what I learned from D

2015-07-05 Thread Szabo Bogdan via Digitalmars-d-learn
Hi, Recently while I was reviewing some swift code, a colleague left me the impression that I am the one with the bad habits and these were learned while coding in D. I still think that I proposed some changes to avoid some bugs but I was told that I am focusing on defensive programming and

sign oauth request

2014-09-25 Thread szabo bogdan via Digitalmars-d-learn
Hi, How I can sign a request for flickrl oauth api? https://www.flickr.com/services/api/auth.oauth.html#request_token there is no HMAC-SHA1 algorithm in phobos library... should I implement it from scratch? Thanks, Bogdan

Re: sign oauth request

2014-09-25 Thread szabo bogdan via Digitalmars-d-learn
which lib do you recommand? On Thursday, 25 September 2014 at 16:19:41 UTC, H. S. Teoh via Digitalmars-d-learn wrote: On Thu, Sep 25, 2014 at 03:57:36PM +, szabo bogdan via Digitalmars-d-learn wrote: Hi, How I can sign a request for flickrl oauth api? https://www.flickr.com/services/api

Re: sign oauth request

2014-09-25 Thread szabo bogdan via Digitalmars-d-learn
On Thursday, 25 September 2014 at 17:09:40 UTC, Adam D. Ruppe wrote: On Thursday, 25 September 2014 at 17:03:43 UTC, John Chapman wrote: http://dlang.org/phobos/std_digest_sha.html#SHA1 Not quite the same, the oauth requires hmac. When I did this in my oauth.d for twitter and stuff, I used