Re: std.socket replacement

2015-11-29 Thread tired_eyes via Digitalmars-d-learn
On Sunday, 29 November 2015 at 16:10:22 UTC, Alex Parrill wrote: std.stream, and the stream interface in general, is deprecated in favor of ranges, which are more generic and flexible. Could you please give a small example? Consider this minimal app: import std.stdio; import std.socket;

Re: Drawing Native OSX Windows with D

2015-11-29 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-11-29 03:30, Mike McKee wrote: I'm coding an antivirus application for the Mac, using a third-party antivirus engine, in Qt/C++. It needs some things to run under high privileges. As far as I know, you can't do that with a DMG package, but can do it with a PKG package. You can do that

Re: Drawing Native OSX Windows with D

2015-11-29 Thread Mike McKee via Digitalmars-d-learn
A few interesting things here. I tried to do these things via the new Apple language, Swift. * You can enum windows, but unlike Microsoft Windows, you have no permissions to hide a window. BTW, hiding a window is a window object method called orderOut(nil), and they only permit it on your

Re: std.socket replacement

2015-11-29 Thread tcak via Digitalmars-d-learn
On Sunday, 29 November 2015 at 08:56:30 UTC, tired_eyes wrote: I was a bit surprised to see that std.socket is deprecated as of 2.069. Just curious, what's wrong with it? And what should I use as a replacement? I know there is vibe.socket, but I don't want to include fullstack web framework as

Re: std.socket replacement

2015-11-29 Thread tired_eyes via Digitalmars-d-learn
On Sunday, 29 November 2015 at 09:05:37 UTC, tcak wrote: On Sunday, 29 November 2015 at 08:56:30 UTC, tired_eyes wrote: I was a bit surprised to see that std.socket is deprecated as of 2.069. Just curious, what's wrong with it? And what should I use as a replacement? I know there is

Re: Drawing Native OSX Windows with D

2015-11-29 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-11-29 09:03, Mike McKee wrote: A few interesting things here. I tried to do these things via the new Apple language, Swift. * You can enum windows, but unlike Microsoft Windows, you have no permissions to hide a window. BTW, hiding a window is a window object method called

std.socket replacement

2015-11-29 Thread tired_eyes via Digitalmars-d-learn
I was a bit surprised to see that std.socket is deprecated as of 2.069. Just curious, what's wrong with it? And what should I use as a replacement? I know there is vibe.socket, but I don't want to include fullstack web framework as a dependency just to make some HTTP reqests. I also don't

Re: Drawing Native OSX Windows with D

2015-11-29 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-11-29 03:30, Mike McKee wrote: Currently nothing like that exists on OSX, but does exist on Windows via the Inno Setup and InstallShield platforms. I would like to add that if you want to distribute an application on OS X you should do that according to the standards of the platform,

Re: std.socket replacement

2015-11-29 Thread Alex Parrill via Digitalmars-d-learn
On Sunday, 29 November 2015 at 09:12:14 UTC, tired_eyes wrote: On Sunday, 29 November 2015 at 09:05:37 UTC, tcak wrote: On Sunday, 29 November 2015 at 08:56:30 UTC, tired_eyes wrote: I was a bit surprised to see that std.socket is deprecated as of 2.069. Just curious, what's wrong with it? And

Re: DateTime.opBinary

2015-11-29 Thread Chris Wright via Digitalmars-d-learn
On Sun, 29 Nov 2015 23:25:14 +, bachmeier wrote: > I was just reading through the documentation for std.datetime. > DateTime.opBinary looks pretty interesting: > > http://dlang.org/phobos/std_datetime.html#.DateTime.opBinary > > Does anyone know how to use it? You certainly can't learn

Re: DateTime.opBinary

2015-11-29 Thread anonymous via Digitalmars-d-learn
On 30.11.2015 00:25, bachmeier wrote: I was just reading through the documentation for std.datetime. DateTime.opBinary looks pretty interesting: http://dlang.org/phobos/std_datetime.html#.DateTime.opBinary Does anyone know how to use it? You certainly can't learn anything from the

Re: DateTime.opBinary

2015-11-29 Thread bachmeier via Digitalmars-d-learn
On Sunday, 29 November 2015 at 23:53:41 UTC, Chris Wright wrote: Duration is defined in core.time: https://dlang.org/phobos/ core_time.html#Duration Unfortunately, ddoc doesn't automatically cross-reference these for you, which results in confusion. (As if it weren't confusing enough to

Re: DateTime.opBinary

2015-11-29 Thread bachmeier via Digitalmars-d-learn
On Sunday, 29 November 2015 at 23:52:05 UTC, anonymous wrote: You can add a Duration to a DateTime, giving you a new DateTime. And you can subtract a DateTime from another, giving you the Duration between them. Example: import std.datetime, std.stdio; void main() { DateTime oldYear =

Classes as enums in D?

2015-11-29 Thread Andrew LaChance via Digitalmars-d-learn
Hello, D has intrigued me for a while, and I thought I would finally read up on it! I've been reading "Programming in D" by Ali Çehreli and I've been thinking about how I can use the language in a side project I'm working on, porting it from java to D. One of the uncommonly-used features of

Re: Classes as enums in D?

2015-11-29 Thread Rikki Cattermole via Digitalmars-d-learn
On 30/11/15 8:48 PM, Andrew LaChance wrote: Hello, D has intrigued me for a while, and I thought I would finally read up on it! I've been reading "Programming in D" by Ali Çehreli and I've been thinking about how I can use the language in a side project I'm working on, porting it from java to

DateTime.opBinary

2015-11-29 Thread bachmeier via Digitalmars-d-learn
I was just reading through the documentation for std.datetime. DateTime.opBinary looks pretty interesting: http://dlang.org/phobos/std_datetime.html#.DateTime.opBinary Does anyone know how to use it? You certainly can't learn anything from the documentation, because duration is a mystery. If