Re: Need help to get OpenSSL 64 work on Windows x64 | I hate D's GC!

2017-07-15 Thread Ali Çehreli via Digitalmars-d-learn
On 07/15/2017 03:05 PM, tetyys wrote: On Friday, 14 July 2017 at 17:24:05 UTC, Suliman wrote: GC on 32-bit machine show a lot of bugs. such as..? D's GC is conservative i.e. it cannot assume an integer is not a pointer. There are ways around this such as marking the memory block as not

Re: Add property setting to chain

2017-07-15 Thread Ali Çehreli via Digitalmars-d-learn
On 07/15/2017 12:53 PM, closescreen wrote: Let i have code: Clock.currTime.to!DateTime.Interval!DateTime( 24.hours ).fwdRange( h=>h+1.hours ).writeln; Now if i want to set the minute=0 and second=0 without breaking chain, what i should do? I think about somewhat like: with(

Re: Auto-decoding

2017-07-15 Thread Seb via Digitalmars-d-learn
On Saturday, 15 July 2017 at 18:47:25 UTC, Joakim wrote: On Saturday, 15 July 2017 at 18:14:48 UTC, aberba wrote: So what is the current plan? :) Andrei has talked about having a non-auto-decoding path for those who know what they're doing and actively choose that path, while keeping

Re: Need help to get OpenSSL 64 work on Windows x64 | I hate D's GC!

2017-07-15 Thread tetyys via Digitalmars-d-learn
On Friday, 14 July 2017 at 17:24:05 UTC, Suliman wrote: GC on 32-bit machine show a lot of bugs. such as..?

Re: Add property setting to chain

2017-07-15 Thread closescreen via Digitalmars-d-learn
I found this solution: Clock.currTime.to!DateTime.pipe!( dt=>(dt.minute=0,dt.second=0, dt) ).Interval!DateTime( 24.hours ).fwdRange( h=>h+1.hours ).writeln; Or: Clock.currTime.to!DateTime.pipe!( "a.minute=0, a.second=0, a" ).Interval!DateTime( 24.hours ).fwdRange( h=>h+1.hours ).writeln;

Add property setting to chain

2017-07-15 Thread closescreen via Digitalmars-d-learn
Let i have code: Clock.currTime.to!DateTime.Interval!DateTime( 24.hours ).fwdRange( h=>h+1.hours ).writeln; Now if i want to set the minute=0 and second=0 without breaking chain, what i should do? I think about somewhat like: with( Clock.currTime.to!DateTime){ minute=0; second=0

Re: Auto-decoding

2017-07-15 Thread Joakim via Digitalmars-d-learn
On Saturday, 15 July 2017 at 18:14:48 UTC, aberba wrote: On Saturday, 15 July 2017 at 05:54:32 UTC, ag0aep6g wrote: On 07/15/2017 06:21 AM, bauss wrote: [...] 1) Drop two elements from "Bär". With auto-decoding you get "r", which is nice. Without auto-decoding you get [0xA4, 'r'] where

Re: rdmd issues

2017-07-15 Thread Joakim via Digitalmars-d-learn
On Thursday, 6 July 2017 at 00:31:04 UTC, FoxyBrown wrote: rdmd -m64 Build.d Error: can't run 'C:\Program Files\VS\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64', check PATH The path exists, but since it doesn't tell me what it is trying to run, I have no clue. The path contains link.exe. Add

Re: Auto-decoding

2017-07-15 Thread ag0aep6g via Digitalmars-d-learn
On 07/15/2017 08:14 PM, aberba wrote: So what is the current plan? :) As far as I'm aware, there's no concrete plan to change anything. We just gotta deal with auto-decoding for the time being.

Re: Auto-decoding

2017-07-15 Thread aberba via Digitalmars-d-learn
On Saturday, 15 July 2017 at 05:54:32 UTC, ag0aep6g wrote: On 07/15/2017 06:21 AM, bauss wrote: [...] 1) Drop two elements from "Bär". With auto-decoding you get "r", which is nice. Without auto-decoding you get [0xA4, 'r'] where 0xA4 is the second half of the encoding of 'ä'. You have to

Re: stacktrace for InvalidMemoryOperationError

2017-07-15 Thread Joakim via Digitalmars-d-learn
On Tuesday, 11 July 2017 at 01:34:08 UTC, crimaniak wrote: Hi! I have vibe.d application and long-standing error in it. For the current moment, I have logs for stdout, stderr, and additional log to write exceptions I catch. This error gives me only the short line in stderr log:

Re: Implementing interface in the class hierarchy

2017-07-15 Thread Arek via Digitalmars-d-learn
On Friday, 14 July 2017 at 12:31:49 UTC, Steven Schveighoffer wrote: Relevant enhancement request: https://issues.dlang.org/show_bug.cgi?id=2565 -Steve So it looks like there are no rational arguments for such a language specification, and this behavior is derived from some aspect of the

Re: sorting a string

2017-07-15 Thread Gerald Jansen via Digitalmars-d-learn
On Friday, 14 July 2017 at 20:52:54 UTC, Jonathan M Davis wrote: And of course, this whole issue is incredibly confusing to anyone coming to D - especially those who aren't well-versed in Unicode. Right on. Thanks for your very clear summary (the whole thing, not just the last line!). Much

How to initialize the Variant variable with the default value using TypeInfo?

2017-07-15 Thread RedCAT via Digitalmars-d-learn
I have only TypeInfo taken dynamically from an arbitrary type, and I need to initialize the Variant variable to the default value for this type. How can I do that? I tried this: TypeInfo ti = typeid(int); Variant v = ti.initializer; But after, int o = v.get!int; and int o = v.coerce!int;

Re: Exported Class Error

2017-07-15 Thread Damien Gibson via Digitalmars-d-learn
TypeInfo doesn't cross the dll boundary atm on Windows. Known bug. Which means no classes or exceptions. https://issues.dlang.org/show_bug.cgi?id=4071 oh how lovely

Re: Get which derived class an object is if it's stored in an array of its base class

2017-07-15 Thread Morimur55 via Digitalmars-d-learn
On Saturday, 15 July 2017 at 14:46:17 UTC, Adam D. Ruppe wrote: On Saturday, 15 July 2017 at 14:36:40 UTC, Morimur55 wrote: ...let me try that again without accidentally sending it before I'd finished... tab on the web interface is so useful... but so annoying sometimes too. ...and I think

Re: Get which derived class an object is if it's stored in an array of its base class

2017-07-15 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 15 July 2017 at 14:36:40 UTC, Morimur55 wrote: ...let me try that again without accidentally sending it before I'd finished... tab on the web interface is so useful... but so annoying sometimes too. ...and I think my problem is actually that redeclared static variables update

Re: Get which derived class an object is if it's stored in an array of its base class

2017-07-15 Thread Morimur55 via Digitalmars-d-learn
On Saturday, 15 July 2017 at 14:26:30 UTC, Morimur55 wrote: On Saturday, 15 July 2017 at 14:04:17 UTC, Adam D. Ruppe wrote: On Saturday, 15 July 2017 at 13:45:40 UTC, Morimur55 wrote: Well I want to cast to the derived type so I can use a method that's defined in the base class, but is

Re: Get which derived class an object is if it's stored in an array of its base class

2017-07-15 Thread Morimur55 via Digitalmars-d-learn
On Saturday, 15 July 2017 at 14:04:17 UTC, Adam D. Ruppe wrote: On Saturday, 15 July 2017 at 13:45:40 UTC, Morimur55 wrote: Well I want to cast to the derived type so I can use a method that's defined in the base class, but is overridden in several of the derived types... and calling it

Re: Get which derived class an object is if it's stored in an array of its base class

2017-07-15 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 15 July 2017 at 13:45:40 UTC, Morimur55 wrote: On Saturday, 15 July 2017 at 13:12:49 UTC, Adam D. Ruppe wrote: On Saturday, 15 July 2017 at 13:02:52 UTC, Morimur55 wrote: [...] The `typeid(obj)` will give the type... but why do you need it? The classinfo returned by that

Re: Get which derived class an object is if it's stored in an array of its base class

2017-07-15 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 15 July 2017 at 13:45:40 UTC, Morimur55 wrote: Well I want to cast to the derived type so I can use a method that's defined in the base class, but is overridden in several of the derived types... and calling it without a cast seems to give me the base type functionality, but I'd

Re: Get which derived class an object is if it's stored in an array of its base class

2017-07-15 Thread Morimur55 via Digitalmars-d-learn
On Saturday, 15 July 2017 at 13:12:49 UTC, Adam D. Ruppe wrote: On Saturday, 15 July 2017 at 13:02:52 UTC, Morimur55 wrote: is there a way to check without attempting to cast to every derived type? The `typeid(obj)` will give the type... but why do you need it? The classinfo returned by that

Re: Get which derived class an object is if it's stored in an array of its base class

2017-07-15 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 15 July 2017 at 13:02:52 UTC, Morimur55 wrote: is there a way to check without attempting to cast to every derived type? The `typeid(obj)` will give the type... but why do you need it? The classinfo returned by that doesn't give a lot of info. Casting is how you actually get

Get which derived class an object is if it's stored in an array of its base class

2017-07-15 Thread Morimur55 via Digitalmars-d-learn
I've got a bunch of different classes all derived from the same base class sitting in a base[]. I need to check what the derived types are of these objects - is there a way to check without attempting to cast to every derived type?

Re: Exception handling

2017-07-15 Thread ANtlord via Digitalmars-d-learn
On Friday, 14 July 2017 at 20:22:21 UTC, Ali Çehreli wrote: On 07/14/2017 12:36 PM, ANtlord wrote: All you need is to catch Exception there as well: catch(Exception) { assert(false, "throwable_fn threw something unexpected"); } Ali Thank you, Ali! You answer for my

Re: ddox filters out my doc

2017-07-15 Thread Jean-Louis Leroy via Digitalmars-d-learn
On Saturday, 15 July 2017 at 08:55:41 UTC, Mike Parker wrote: On Saturday, 15 July 2017 at 08:29:52 UTC, Jean-Louis Leroy wrote: My module has a name in dub.sdl. No, it does not. That's the name of the DUB project. The module in this case is source/methods.d. I've never used ddox, but

Re: ddox filters out my doc

2017-07-15 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 15 July 2017 at 08:29:52 UTC, Jean-Louis Leroy wrote: My module has a name in dub.sdl. No, it does not. That's the name of the DUB project. The module in this case is source/methods.d. I've never used ddox, but based on what I see in the readme and on looking at the ddox source

ddox filters out my doc

2017-07-15 Thread Jean-Louis Leroy via Digitalmars-d-learn
I began to write documentation for my open method library. After googling around quite a bit, I came across the incantation: dub build -b ddox Problem is, it generates no doc. And I believe that it actually says so: Performing "ddox" build using dmd for x86_64. methods ~genesis: building