Re: InputRange help: (1) repeated dtor calls and (2) managing resources needing free()

2018-08-12 Thread James Blachly via Digitalmars-d-learn
On Thursday, 14 June 2018 at 00:42:25 UTC, James Blachly wrote: ... I assume the (apparent) lack of parity between ctor and dtor is because the "default postblit" (which I figured out for a struct means an empty `this(this)` ctor) is called when a copy is made. My understanding is that I canno

Re: SysTime comparesin - dropMiliseconds

2018-08-12 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, August 12, 2018 1:50:44 PM MDT User via Digitalmars-d-learn wrote: > I have to synchronize a directory. If remote file is newer I copy > to local. If local file is newer I copy it to remote server. For > some reason remote timestamp does not contain milliseconds, so > comparison (localF

?? How to subscribe to Multicast Broadcasts ??

2018-08-12 Thread Joe via Digitalmars-d-learn
Hello All! I've been trying every possible combination and cannot get anything working. (>_<) This is I think the closest I've got, I think the problem may be with the 3 argument. I'm not sure how to join the Multicast IP membership? (this code currently does not work - throws error: 'Unab

Re: SysTime comparesin - dropMiliseconds

2018-08-12 Thread User via Digitalmars-d-learn
On Sunday, 12 August 2018 at 19:50:44 UTC, User wrote: I have to synchronize a directory. If remote file is newer I copy to local. If local file is newer I copy it to remote server. For some reason remote timestamp does not contain milliseconds, so comparison (localFileTime < remoteFileTime, e

SysTime comparesin - dropMiliseconds

2018-08-12 Thread User via Digitalmars-d-learn
I have to synchronize a directory. If remote file is newer I copy to local. If local file is newer I copy it to remote server. For some reason remote timestamp does not contain milliseconds, so comparison (localFileTime < remoteFileTime, etc) fails. I need help to drop milliseconds from local f

Re: Could you anybody using DerelictSDL2 on Android?

2018-08-12 Thread zhani via Digitalmars-d-learn
On Sunday, 12 August 2018 at 03:42:34 UTC, Mike Parker wrote: On Saturday, 11 August 2018 at 14:36:59 UTC, zhani wrote: On Saturday, 11 August 2018 at 08:47:59 UTC, Mike Parker wrote: On Tuesday, 7 August 2018 at 12:05:33 UTC, zhani wrote: [...] I don't do any sort of Android development, so

Re: unimplemented abstract function compiles.

2018-08-12 Thread ag0aep6g via Digitalmars-d-learn
On 08/12/2018 07:29 PM, Eric wrote: I thought it would work the same way as an interface (which must be implemented by the direct sub class, otherwise compile error). From the spec text [1], I'd also expect an error. It says: "An abstract member function must be overridden by a derived class."

Re: unimplemented abstract function compiles.

2018-08-12 Thread Eric via Digitalmars-d-learn
I thought it would work the same way as an interface (which must be implemented by the direct sub class, otherwise compile error). But apparently it's possible to implement an abstract function anywhere in the class hierarchy. That makes it, in this case, impossible to check during compile time.

Re: dmd64 on Windows: how?

2018-08-12 Thread Ivan Kazmenko via Digitalmars-d-learn
On Sunday, 12 August 2018 at 03:49:04 UTC, Mike Parker wrote: On Saturday, 11 August 2018 at 19:50:30 UTC, Ivan Kazmenko wrote: I've installed the components shown in wiki image: v141 tools and the SDKs. VS 2017 Community includes everything you need. There's no reason to install the SDK sepa

Re: dtoh

2018-08-12 Thread Petar via Digitalmars-d-learn
On Tuesday, 7 August 2018 at 12:46:31 UTC, Steven Schveighoffer wrote: On 8/7/18 6:08 AM, bauss wrote: On Monday, 6 August 2018 at 13:28:05 UTC, Laeeth Isharc wrote: Hi Walter. Can dtoh be open-sourced now that dmd is? https://github.com/adamdruppe/dtoh I might be confused, but it seems l

Re: write a function template specialisation that tests if an argument is known at compile time

2018-08-12 Thread Alex via Digitalmars-d-learn
On Saturday, 11 August 2018 at 05:17:51 UTC, Cecil Ward wrote: T myfunc(T)( T x, uint mask ) if ( mask == 3 ) { return fast_func( x, mask ); } [...] Is it the volcano pattern you are looking for? https://p0nce.github.io/d-idioms/#Is-this-available-at-compile-time-or-runtime?

Re: @nogc with opApply

2018-08-12 Thread Alex via Digitalmars-d-learn
On Sunday, 12 August 2018 at 01:39:21 UTC, ag0aep6g wrote: On 08/11/2018 12:00 PM, Alex wrote: [...] [...] [...] [...] [...] [...] [...] You can provide to overloads: one with @nogc, one without it. To keep it somewhat DRY, you can let them forward to a template implementation: