Re: Access visibility and linkage

2018-02-15 Thread Arun Chandrasekaran via Digitalmars-d-learn
On Thursday, 15 February 2018 at 06:52:15 UTC, Seb wrote: On Thursday, 15 February 2018 at 06:43:52 UTC, Arun Chandrasekaran wrote: I was reading through https://wiki.dlang.org/Access_specifiers_and_visibility#What_is_missing [...] DMD v2.077.1 exhibits the same behavior. Is this is

std.zip size limit of 2 GB?

2018-02-15 Thread Andre Pany via Digitalmars-d-learn
Hi, I just noticed that std.zip will throw an exception if the source files exceeds 2 GB. I am not sure whether this is a limitation of zip version 20 or a bug. On wikipedia a size limit of 4 GB is mentioned. Should I open an issue? Windows 10 with x86_64 architecture.

Re: How to check if aggregate member is static templated method?

2018-02-15 Thread drug via Digitalmars-d-learn
15.02.2018 16:50, drug пишет: https://run.dlang.io/is/zHT2XZ I can check againts if member is either static function or template. But I failed to check if it both static and templated.

How to check if aggregate member is static templated method?

2018-02-15 Thread drug via Digitalmars-d-learn
https://run.dlang.io/is/zHT2XZ

Re: How to check if aggregate member is static templated method?

2018-02-15 Thread RazvanN via Digitalmars-d-learn
On Thursday, 15 February 2018 at 13:51:41 UTC, drug wrote: 15.02.2018 16:50, drug пишет: https://run.dlang.io/is/zHT2XZ I can check againts if member is either static function or template. But I failed to check if it both static and templated. The best I could come up with is: struct Foo {

ubyte[4] to int

2018-02-15 Thread Kyle via Digitalmars-d-learn
Hi. Is there a convenient way to convert a ubyte[4] into a signed int? I'm having trouble handling the static arrays returned by std.bitmanip.nativeToLittleEndian. Is there some magic sauce to make the static arrays into input ranges or something? As a side note, I'm used to using D on Linux

Re: ubyte[4] to int

2018-02-15 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 15 February 2018 at 16:51:05 UTC, Kyle wrote: Hi. Is there a convenient way to convert a ubyte[4] into a signed int? I'm having trouble handling the static arrays returned by std.bitmanip.nativeToLittleEndian. Is there some magic sauce to make the static arrays into input ranges

Re: ubyte[4] to int

2018-02-15 Thread ketmar via Digitalmars-d-learn
Nicholas Wilson wrote: On Thursday, 15 February 2018 at 16:51:05 UTC, Kyle wrote: Hi. Is there a convenient way to convert a ubyte[4] into a signed int? I'm having trouble handling the static arrays returned by std.bitmanip.nativeToLittleEndian. Is there some magic sauce to make the static

Re: Disk space used and free size of a Network share folder in Windows

2018-02-15 Thread Johan Engelen via Digitalmars-d-learn
On Wednesday, 14 February 2018 at 12:22:09 UTC, Vino wrote: Hi All, Request your help on how to get the disk space used and free size of a Network share folder in Windows, tried with getSize but it return 0; See:

Re: ubyte[4] to int

2018-02-15 Thread Kyle via Digitalmars-d-learn
"What I'm trying to achieve is to ensure that an int is in little-endiannes" Ignore that last part, whoops.

Re: ubyte[4] to int

2018-02-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, February 15, 2018 16:51:05 Kyle via Digitalmars-d-learn wrote: > Hi. Is there a convenient way to convert a ubyte[4] into a signed > int? I'm having trouble handling the static arrays returned by > std.bitmanip.nativeToLittleEndian. Is there some magic sauce to > make the static

Re: ubyte[4] to int

2018-02-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, February 15, 2018 17:21:22 Nicholas Wilson via Digitalmars-d- learn wrote: > On Thursday, 15 February 2018 at 16:51:05 UTC, Kyle wrote: > > Hi. Is there a convenient way to convert a ubyte[4] into a > > signed int? I'm having trouble handling the static arrays > > returned by

Re: ubyte[4] to int

2018-02-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, February 15, 2018 17:53:54 Kyle via Digitalmars-d-learn wrote: > I want to be able to pass an int to a function, then in the > function ensure that the int is little-endian (whether it starts > out that way or needs to be converted) before additional stuff is > done to the passed int.

Re: std.zip size limit of 2 GB?

2018-02-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/15/18 6:56 AM, Andre Pany wrote: Hi, I just noticed that std.zip will throw an exception if the source files exceeds 2 GB. I am not sure whether this is a limitation of zip version 20 or a bug. On wikipedia a size limit of 4 GB is mentioned. Should I open an issue? Windows 10 with

Re: ubyte[4] to int

2018-02-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, February 15, 2018 18:47:16 Kyle via Digitalmars-d-learn wrote: > I was thinking that the client could determine its own endianness > and either convert the passed int to the other if big, or leave > it alone if little, then send it to the server as little-endian > at that point.

Re: ubyte[4] to int

2018-02-15 Thread Ali Çehreli via Digitalmars-d-learn
On 02/15/2018 09:53 AM, Kyle wrote: > I want to be able to pass an int to a function, then in the function > ensure that the int is little-endian (whether it starts out that way or > needs to be converted) before additional stuff is done to the passed > int. As has been said elsewhere, the

Re: How to check if aggregate member is static templated method?

2018-02-15 Thread drug via Digitalmars-d-learn
15.02.2018 18:49, RazvanN пишет: On Thursday, 15 February 2018 at 13:51:41 UTC, drug wrote: 15.02.2018 16:50, drug пишет: https://run.dlang.io/is/zHT2XZ I can check againts if member is either static function or template. But I failed to check if it both static and templated. The best I

Re: ubyte[4] to int

2018-02-15 Thread Kyle via Digitalmars-d-learn
On Thursday, 15 February 2018 at 17:25:15 UTC, ketmar wrote: Nicholas Wilson wrote: On Thursday, 15 February 2018 at 16:51:05 UTC, Kyle wrote: Hi. Is there a convenient way to convert a ubyte[4] into a signed int? I'm having trouble handling the static arrays returned by

Re: ubyte[4] to int

2018-02-15 Thread Kyle via Digitalmars-d-learn
On Thursday, 15 February 2018 at 17:43:10 UTC, Jonathan M Davis wrote: On Thursday, February 15, 2018 16:51:05 Kyle via Digitalmars-d-learn wrote: Hi. Is there a convenient way to convert a ubyte[4] into a signed int? I'm having trouble handling the static arrays returned by

Re: ubyte[4] to int

2018-02-15 Thread Kyle via Digitalmars-d-learn
On Thursday, 15 February 2018 at 18:30:57 UTC, Jonathan M Davis wrote: On Thursday, February 15, 2018 17:53:54 Kyle via Digitalmars-d-learn wrote: I want to be able to pass an int to a function, then in the function ensure that the int is little-endian (whether it starts out that way or needs

Re: std.zip size limit of 2 GB?

2018-02-15 Thread ag0aep6g via Digitalmars-d-learn
On 02/15/2018 10:20 PM, Tony wrote: Wouldn't using a uint for buffer size give a size limit of greater than 4GB? Seems like an int is in the mix somewhere. uint gives 4, int gives 2.

Re: std.zip size limit of 2 GB?

2018-02-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/15/18 4:20 PM, Tony wrote: On Thursday, 15 February 2018 at 18:49:55 UTC, Steven Schveighoffer wrote: I think it's inherent in the zlib API. I haven't used all of the library, but the portion I did use (using zstream) uses uint for buffer sizes. Wouldn't using a uint for buffer

Re: std.zip size limit of 2 GB?

2018-02-15 Thread Tony via Digitalmars-d-learn
On Thursday, 15 February 2018 at 18:49:55 UTC, Steven Schveighoffer wrote: I think it's inherent in the zlib API. I haven't used all of the library, but the portion I did use (using zstream) uses uint for buffer sizes. Wouldn't using a uint for buffer size give a size limit of greater

Re: std.zip size limit of 2 GB?

2018-02-15 Thread Stefan Koch via Digitalmars-d-learn
On Thursday, 15 February 2018 at 11:56:04 UTC, Andre Pany wrote: Hi, I just noticed that std.zip will throw an exception if the source files exceeds 2 GB. I am not sure whether this is a limitation of zip version 20 or a bug. On wikipedia a size limit of 4 GB is mentioned. Should I open an

static opSlice is not possible

2018-02-15 Thread Alex via Digitalmars-d-learn
Hi all, a short question about an old bug: https://issues.dlang.org/show_bug.cgi?id=11877 Are there reasons, which speaks against this feature? And maybe another one, more general: Is there any place, where it is documented, which operators can work in static mode and which cannot?

Re: static opSlice is not possible

2018-02-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, February 15, 2018 22:49:56 Alex via Digitalmars-d-learn wrote: > Hi all, > a short question about an old bug: > https://issues.dlang.org/show_bug.cgi?id=11877 > > Are there reasons, which speaks against this feature? > > And maybe another one, more general: > Is there any place, where

Re: static opSlice is not possible

2018-02-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, February 15, 2018 23:22:17 Adam D. Ruppe via Digitalmars-d- learn wrote: > On Thursday, 15 February 2018 at 23:20:42 UTC, Jonathan M Davis > > wrote: > > The only overloaded operator that I'd expect to work as static > > would be opCall, which I expect works primarily because of > >

Re: static opSlice is not possible

2018-02-15 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 15 February 2018 at 23:20:42 UTC, Jonathan M Davis wrote: The only overloaded operator that I'd expect to work as static would be opCall, which I expect works primarily because of functors but is useful for factory functions as well. static opCall is kinda weird in practice and

Re: static opSlice is not possible

2018-02-15 Thread Alex via Digitalmars-d-learn
On Thursday, 15 February 2018 at 23:31:23 UTC, Jonathan M Davis wrote: On Thursday, February 15, 2018 23:22:17 Adam D. Ruppe via Digitalmars-d- learn wrote: On Thursday, 15 February 2018 at 23:20:42 UTC, Jonathan M Davis wrote: > The only overloaded operator that I'd expect to work as >