Re: wrapSocket for socket_t? As wrapFile for FILE*

2016-02-14 Thread Beginner-8 via Digitalmars-d-learn
On Sunday, 14 February 2016 at 08:19:16 UTC, Ali Çehreli wrote: On 02/14/2016 12:03 AM, Beginner-8 wrote: Uh, wait! Forgot about that Socket calls .close() in its dtor Try duplicating the socket handle before handing it over to Socket (not compiled nor tested): import

[Issue 12288] delegate literals should be allowed as class members

2016-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12288 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --

Re: Installing 32 bit libcurl.so.4 on Ubuntu

2016-02-14 Thread hanifnoor via Digitalmars-d-learn
I'm not 100% sure it's included, but I think so. __ NOOR

Re: C++ UFCS update

2016-02-14 Thread deadalnix via Digitalmars-d
On Monday, 15 February 2016 at 06:12:30 UTC, Walter Bright wrote: On 2/13/2016 2:27 AM, Daniel N wrote: "Abstract This is the proposed wording for a unified call syntax based on the idea that f(x,y) can invoke a member function, x.f(y), if there are no f(x,y). The inverse transformation,

Re: C++ UFCS update

2016-02-14 Thread deadalnix via Digitalmars-d
On Saturday, 13 February 2016 at 10:27:59 UTC, Daniel N wrote: "Abstract This is the proposed wording for a unified call syntax based on the idea that f(x,y) can invoke a member function, x.f(y), if there are no f(x,y). The inverse transformation, from x.f(y) to f(x,y) is not proposed."

Re: C++ UFCS update

2016-02-14 Thread Walter Bright via Digitalmars-d
On 2/13/2016 2:27 AM, Daniel N wrote: "Abstract This is the proposed wording for a unified call syntax based on the idea that f(x,y) can invoke a member function, x.f(y), if there are no f(x,y). The inverse transformation, from x.f(y) to f(x,y) is not proposed." They were considering 6

Re: Reserving capacity in associative arrays

2016-02-14 Thread Jon D via Digitalmars-d-learn
On Monday, 15 February 2016 at 05:29:23 UTC, sigod wrote: On Monday, 15 February 2016 at 03:22:44 UTC, Jon D wrote: Is there a way to reserve capacity in associative arrays? [snip] Maybe try using this: http://code.dlang.org/packages/aammm Thanks, I wasn't aware of this package. I'll give

Re: Reserving capacity in associative arrays

2016-02-14 Thread sigod via Digitalmars-d-learn
On Monday, 15 February 2016 at 03:22:44 UTC, Jon D wrote: Is there a way to reserve capacity in associative arrays? In some programs I've been writing I've been getting reasonable performance up to about 10 million entries, but beyond that performance is impacted considerably (say, 30 million

[Issue 15683] broken link in DDoc

2016-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15683 --- Comment #2 from b2.t...@gmx.com --- (In reply to Adam D. Ruppe from comment #1) > We really should just remove that stupid "feature" from ddoc entirely. Can you explain me why it generates a , I should be able to fix it myself but instead lost

[Issue 15683] broken link in DDoc

2016-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15683 Adam D. Ruppe changed: What|Removed |Added CC|

[Issue 15683] New: broken link in DDoc

2016-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15683 Issue ID: 15683 Summary: broken link in DDoc Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: trivial Priority: P1

Re: nanosecond time

2016-02-14 Thread Saurabh Das via Digitalmars-d-learn
On Saturday, 13 February 2016 at 19:24:44 UTC, ishwar wrote: I am stumped on need finding interval between two events in a program execution in nanoseconds. Any sample code will be appreciated (along with imports needed to make it work): - time in nanoseconds-now - do-some processing - time

[Issue 15682] New: concat associative arrays

2016-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15682 Issue ID: 15682 Summary: concat associative arrays Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1

Reserving capacity in associative arrays

2016-02-14 Thread Jon D via Digitalmars-d-learn
Is there a way to reserve capacity in associative arrays? In some programs I've been writing I've been getting reasonable performance up to about 10 million entries, but beyond that performance is impacted considerably (say, 30 million or 50 million entries). GC stats (via the

Re: Digital Audio Workstation in D

2016-02-14 Thread Rikki Cattermole via Digitalmars-d
So here is how I see the current situation. - Multiple image libraries, no current leader - Multiple windowing solutions, no current leader - No audio solutions (atleast reasonably) I'm currently working on image + windowing for Phobos [0]. Manu Evans is working on color primitives. Currently

Re: D Book page 402 Concurrency FAIL

2016-02-14 Thread Mike Parker via Digitalmars-d-learn
On Monday, 15 February 2016 at 00:58:54 UTC, Brother Bill wrote: On Sunday, 14 February 2016 at 23:39:33 UTC, cym13 wrote: On Sunday, 14 February 2016 at 22:54:36 UTC, Brother Bill wrote: In "The D Programming Language", page 402, the toy program fails. [...] Can't reproduce with DMD

Re: joiner: How to iterate over immutable ranges?

2016-02-14 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 14 February 2016 at 19:32:31 UTC, Bastiaan Veelo wrote: Thanks. I didn't know that iterating a range means mutating its contents. I still don't quite get it, and it is probably because I don't fully understand ranges. I think what confuses me the most is their analogy to

Re: joiner: How to iterate over immutable ranges?

2016-02-14 Thread Ali Çehreli via Digitalmars-d-learn
On 02/14/2016 11:32 AM, Bastiaan Veelo wrote: > Thanks. I didn't know that iterating a range means mutating its > contents. That's not the case: Just like an iterator, a range must maintain some state to know which item is next. What needs to be mutated is that iteration state. > I still

Re: Implicit conversion from string to custom type?

2016-02-14 Thread Ali Çehreli via Digitalmars-d-learn
On 02/14/2016 03:43 PM, Tofu Ninja wrote: So I wrote a simple ref counted string type because using the built in strings without the GC is extremely painful. It there any way I can get strings to implicitly convert to my custom string type? No, D does not support such implicit conversions.

Re: D Book page 402 Concurrency FAIL

2016-02-14 Thread Brother Bill via Digitalmars-d-learn
On Sunday, 14 February 2016 at 23:39:33 UTC, cym13 wrote: On Sunday, 14 February 2016 at 22:54:36 UTC, Brother Bill wrote: In "The D Programming Language", page 402, the toy program fails. [...] Can't reproduce with DMD 2.0.70, LDC 0.16.1 or GDC 5.3.0 on Linux x86_64. The code seems to

Re: Release vibe.d 0.7.27

2016-02-14 Thread sigod via Digitalmars-d-announce
On Sunday, 14 February 2016 at 08:17:34 UTC, Sönke Ludwig wrote: Am 11.02.2016 um 00:24 schrieb sigod: Did some benchmarks between `std.net.curl.get` and `vibe.http.client.requestHTTP`. Only GET requests. 100 requests, ~1.4mb file: curl total: 131304, average: 1 sec and 313 ms vibe

[Issue 15681] [REG2.067] Nested user type enum not retaining value properly.

2016-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15681 --- Comment #2 from b2.t...@gmx.com --- fails as well with `static S s = S(1.0f); --

[Issue 10708] Class members as template alias parameters not CTFE-able

2016-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10708 --- Comment #2 from Martin Krejcirik --- Same issue ? static on templated function helps too. -- int func(T...)() { return 1; } class Bug { Stru s; this() { } int pokus()

Implicit conversion from string to custom type?

2016-02-14 Thread Tofu Ninja via Digitalmars-d-learn
So I wrote a simple ref counted string type because using the built in strings without the GC is extremely painful. It there any way I can get strings to implicitly convert to my custom string type? Some way to make this work... struct rstring {...} void fun(rstring s) {...} ... fun("hello

Re: D Book page 402 Concurrency FAIL

2016-02-14 Thread cym13 via Digitalmars-d-learn
On Sunday, 14 February 2016 at 22:54:36 UTC, Brother Bill wrote: In "The D Programming Language", page 402, the toy program fails. [...] Can't reproduce with DMD 2.0.70, LDC 0.16.1 or GDC 5.3.0 on Linux x86_64. The code seems to work as intended.

[Issue 15681] [REG2.067] Nested user type enum not retaining value properly.

2016-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15681 ag0ae...@gmail.com changed: What|Removed |Added Keywords||wrong-code CC|

D Book page 402 Concurrency FAIL

2016-02-14 Thread Brother Bill via Digitalmars-d-learn
In "The D Programming Language", page 402, the toy program fails. The first fail is that enforce() needs: import std.exception; The second fail is that when debugging, in Visual Studio 2015 Community Edition, it fails with this error: First-change exception: std.format.FormatException

Digital Audio Workstation in D

2016-02-14 Thread Tanel Tagaväli via Digitalmars-d
This may be a pipe dream, but I want to create (with the help of other developers, of course) a DAW using D. The reasons are mainly: + The design can be very complex + Realtime playback is a requirement + You can do a lot of things with audio It would be interesting to see how D could handle a

Re: Digital Audio Workstation in D

2016-02-14 Thread Tanel Tagaväli via Digitalmars-d
My current attack plan is: + Use SDL2 wrappings in GFM as a base + Create helper libraries for mixing etc. + Create a simple keyboard-controlled program that uses the helper libraries to play notes. After that, a comprehensive design of the actual program should be created. That is where

Re: Ddb needs a maintainer

2016-02-14 Thread Chris Wright via Digitalmars-d-announce
On Sun, 14 Feb 2016 12:48:49 +0100, Jacob Carlborg wrote: > On 2016-02-14 00:32, Dicebot wrote: > >> Ideally ddb should be built on top of ddbc wrapping it into >> fiber-friendly async API but I don't know if this is possible with ddbc >> design. > > It looks like libpg has support for

Re: LDC 0.17.0 has been released!

2016-02-14 Thread Guillaume Piolat via Digitalmars-d-announce
On Sunday, 14 February 2016 at 17:30:33 UTC, Kai Nacke wrote: Hi everyone, LDC 0.17.0, the LLVM-based D compiler, is available for download! This release is based on the 2.068.2 frontend and standard library and supports LLVM 3.5-3.8. Don't miss to check if your preferred system is

Re: LDC 0.17.0 has been released!

2016-02-14 Thread y via Digitalmars-d-announce
On Sunday, 14 February 2016 at 17:30:33 UTC, Kai Nacke wrote: Hi everyone, LDC 0.17.0, the LLVM-based D compiler, is available for download! This release is based on the 2.068.2 frontend and standard library and supports LLVM 3.5-3.8. Regards, Kai congrats! what is actually the

Re: LDC 0.17.0 has been released!

2016-02-14 Thread Kai Nacke via Digitalmars-d-announce
On Sunday, 14 February 2016 at 20:55:40 UTC, Dicebot wrote: On 02/14/2016 07:30 PM, Kai Nacke wrote: As usual, you can find links to the changelog and the binary packages over at digitalmars.D.ldc: http://forum.dlang.org/post/cqgwucbznngoiesvb...@forum.dlang.org

Re: DigitalWhip

2016-02-14 Thread Johan Engelen via Digitalmars-d-announce
On Sunday, 14 February 2016 at 18:07:00 UTC, artemalive wrote: Thanks. Good suggestion. I'll check if the version information can be retrieved automatically for all compilers. If that's the case then version information will be added soon. I would simply print the output of "--version" for

Re: DigitalWhip

2016-02-14 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Sunday, 14 February 2016 at 19:29:54 UTC, Vladimir Panteleev wrote: I think that in the context of a render farm, disabling bounds checking is completely reasonable. Bugs will manifest as crashes or rendering artifacts, and there is no risk of code execution exploits. But nobody would

Re: DigitalWhip

2016-02-14 Thread David Nadlinger via Digitalmars-d-announce
On Sunday, 14 February 2016 at 17:31:37 UTC, artemalive wrote: From ldc output: "-release - Disables asserts, invariants, contracts and boundscheck". We (LDC team) should clarify this description. In D2, -release does not disable bounds-checking for @safe code anymore. -singleobj really

Re: DigitalWhip

2016-02-14 Thread Vladimir Panteleev via Digitalmars-d-announce
On Saturday, 13 February 2016 at 21:10:11 UTC, Adam D. Ruppe wrote: On Saturday, 13 February 2016 at 20:45:41 UTC, David Nadlinger wrote: Your scripts had bounds checking enabled for LDC but not the other two D compilers. I strongly recommend people to always keep bounds checking enabled in

Re: joiner: How to iterate over immutable ranges?

2016-02-14 Thread Bastiaan Veelo via Digitalmars-d-learn
On Sunday, 14 February 2016 at 18:28:11 UTC, Jonathan M Davis wrote: An immutable range fundamentally does not work. The same goes with const. In fact, a type that's immutable is going to fail isInputRange precisely because it can't possibly function as one. While empty and front may be

Re: DigitalWhip

2016-02-14 Thread artemalive via Digitalmars-d-announce
On Sunday, 14 February 2016 at 18:12:03 UTC, David Nadlinger wrote: On Sunday, 14 February 2016 at 17:31:37 UTC, artemalive wrote: From ldc output: "-release - Disables asserts, invariants, contracts and boundscheck". We (LDC team) should clarify this description. In D2, -release does not

Re: joiner: How to iterate over immutable ranges?

2016-02-14 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, February 14, 2016 15:24:39 Bastiaan Veelo via Digitalmars-d-learn wrote: > Hi, > > I am having trouble getting the iteration methods in > std.algorithm.iteration to work on immutable data: > > > import std.algorithm.iteration; > > import std.stdio; > > > > void main() > > { > >

Re: Ddb needs a maintainer

2016-02-14 Thread Eugene Wissner via Digitalmars-d-announce
On Sunday, 14 February 2016 at 16:53:31 UTC, Piotr Szturmaj wrote: On 2016-02-14 12:48, Jacob Carlborg wrote: It seems both ddb and ddbc had the same idea, building a library accessing databases independently of the kind of database. The difference is that ddb does not seem to have the

Re: Is this a good singleton?

2016-02-14 Thread Vladde Nordholm via Digitalmars-d-learn
On Sunday, 14 February 2016 at 07:16:54 UTC, Russel Winder wrote: On Sat, 2016-02-13 at 18:58 +, Vladde Nordholm via Digitalmars-d- learn wrote: [...] Following the ACCU consensus: there is never, ever a good Singleton or reason to contemplate using one. Obviously though there are some

Re: Weird issue with std.range.iota.length

2016-02-14 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 14 February 2016 at 10:59:41 UTC, w0rp wrote: Maybe I'm missing something, but can't the length just be size_t? I doubt there is much you could do with code which generates finite sequences larger than the addressable memory space, aside from very abstract and inefficient

Re: Singleton, alias to self?

2016-02-14 Thread Guillaume Piolat via Digitalmars-d-learn
On Sunday, 14 February 2016 at 13:23:28 UTC, Guillaume Piolat wrote: On Sunday, 14 February 2016 at 12:56:51 UTC, Vladde Nordholm wrote: I'm not sure of how to use alias efficiently, so I want to know if I could somehow do this (psuedo-code) class Singleton { //So instead of calling

Re: D's equivalent to C++'s std::move?

2016-02-14 Thread Ola Fosheim Grøstad via Digitalmars-d
On Sunday, 14 February 2016 at 14:12:09 UTC, Ola Fosheim Grøstad wrote: You can work around it by having extra pointers/containers in or held by the struct (pointers to the source that is pointing to you). But that takes more space. In the not-multithreaded version. In the multithreaded

Allocation failures

2016-02-14 Thread Jardík via Digitalmars-d
When I was interested in D some time ago, I believe GC was aborting the application on allocation failures. Is that still the case today? I am looking into using D for my new application, but I need some guarantees that I can at least save some critical data, when such thing happens, perhaps

Re: Allocation failures

2016-02-14 Thread cym13 via Digitalmars-d
On Sunday, 14 February 2016 at 12:10:34 UTC, Jardík wrote: When I was interested in D some time ago, I believe GC was aborting the application on allocation failures. Is that still the case today? I am looking into using D for my new application, but I need some guarantees that I can at least

Re: An important pull request: accessing shared affix for immutable data

2016-02-14 Thread Ola Fosheim Grøstad via Digitalmars-d
On Sunday, 14 February 2016 at 11:14:59 UTC, Andrei Alexandrescu wrote: We can do the same, but we also have a better alternative. Most of our allocators support shrink-in-place. For now I haven't exposed it as a primitive but that's short work. When the object goes away we can shrink memory

Re: Singleton, alias to self?

2016-02-14 Thread Guillaume Piolat via Digitalmars-d-learn
On Sunday, 14 February 2016 at 12:56:51 UTC, Vladde Nordholm wrote: I'm not sure of how to use alias efficiently, so I want to know if I could somehow do this (psuedo-code) class Singleton { //So instead of calling `Singleton.getSingleton()` you just call `Singleton` alias this =

Re: Ddb needs a maintainer

2016-02-14 Thread Eugene Wissner via Digitalmars-d-announce
my five cents on that topic... @Eugene: From my point of view, it would be great if you could bring in all your ideas, wishes, changes, additions and new stuff into vibe_d and help to grow and extend it and make it more usable... Don't get me wrong, I thinks it's great if developers have

Re: D's equivalent to C++'s std::move?

2016-02-14 Thread Ola Fosheim Grøstad via Digitalmars-d
On Sunday, 14 February 2016 at 12:53:08 UTC, Lars T. Kyllingstad wrote: I know you said afterwards you didn't need a reference, but I'll give you one anyway. :) That is the formal requirement for C++ standard library types; see sec. 17.6.5.15 [lib.types.movedfrom] of the C++ specification.

Re: Allocation failures

2016-02-14 Thread Rikki Cattermole via Digitalmars-d
Since you want such fine grained control, you probably don't want to use the GC to allocate with. Take a look at [0]. That should give you the fine grained control you desire. Most importantly make, makeArray, expandArray, shrinkArray and dispose. You would need to be a bit careful with some

Re: D's equivalent to C++'s std::move?

2016-02-14 Thread Lars T. Kyllingstad via Digitalmars-d
On Saturday, 13 February 2016 at 22:42:34 UTC, Ola Fosheim Grøstad wrote: On Saturday, 13 February 2016 at 21:41:06 UTC, Lars T. Kyllingstad wrote: Whose expectations? The formal expectation, as per the C++ standard, is that the moved-from object be left in a "valid but unspecified state".

Singleton, alias to self?

2016-02-14 Thread Vladde Nordholm via Digitalmars-d-learn
I'm not sure of how to use alias efficiently, so I want to know if I could somehow do this (psuedo-code) class Singleton { //So instead of calling `Singleton.getSingleton()` you just call `Singleton` alias this = getSingleon() //code for singleton... } Thanks in advance, vladde

[Issue 15680] TypeInfo broken for typeof(null)

2016-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15680 --- Comment #2 from David Nadlinger --- (In reply to Johan Engelen from comment #1) > See LDC's runtime for a potential fix: > https://github.com/ldc-developers/druntime/commit/ > 2cdd96be5070cfabf5cf2724a8dea46cd3922999 The

joiner: How to iterate over immutable ranges?

2016-02-14 Thread Bastiaan Veelo via Digitalmars-d-learn
Hi, I am having trouble getting the iteration methods in std.algorithm.iteration to work on immutable data: import std.algorithm.iteration; import std.stdio; void main() { string[][] cycles; cycles ~= ["one", "two"]; cycles ~= ["three", "four"]; foreach

LDC 0.17.0 has been released!

2016-02-14 Thread Kai Nacke via Digitalmars-d-announce
Hi everyone, LDC 0.17.0, the LLVM-based D compiler, is available for download! This release is based on the 2.068.2 frontend and standard library and supports LLVM 3.5-3.8. Don't miss to check if your preferred system is supported by this release. We also have a Win64 compiler and PREVIEW of

Re: DigitalWhip

2016-02-14 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Sunday, 14 February 2016 at 17:38:54 UTC, artemalive wrote: Hi Adam, I'll check the influence of enabled bounds check on benchmark result. Did not try this before. If you do, then you should use bounds checks in C++ too. (STL container.at(index) )

Re: DigitalWhip

2016-02-14 Thread Johan Engelen via Digitalmars-d-announce
On Saturday, 13 February 2016 at 19:26:39 UTC, artemalive wrote: On Saturday, 13 February 2016 at 19:19:46 UTC, Johan Engelen wrote: Could you add the compiler versions to the outputted .txt file, e.g. `dmd --version`? (the example output files don't have it) These files are just for

Re: DigitalWhip

2016-02-14 Thread artemalive via Digitalmars-d-announce
On Sunday, 14 February 2016 at 17:43:01 UTC, Ola Fosheim Grøstad wrote: On Sunday, 14 February 2016 at 17:38:54 UTC, artemalive wrote: Hi Adam, I'll check the influence of enabled bounds check on benchmark result. Did not try this before. If you do, then you should use bounds checks in C++

Re: Singleton, alias to self?

2016-02-14 Thread tcak via Digitalmars-d-learn
On Sunday, 14 February 2016 at 12:56:51 UTC, Vladde Nordholm wrote: I'm not sure of how to use alias efficiently, so I want to know if I could somehow do this (psuedo-code) class Singleton { //So instead of calling `Singleton.getSingleton()` you just call `Singleton` alias this =

[Issue 15677] std.experimental.allocators.expandArray overload with init should take the array by ref.

2016-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15677 --- Comment #2 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/84600a2265291df8a8d0c030eea4795e31df21f0 Merge pull request

[Issue 15681] New: Nested user type enum not retaining value properly.

2016-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15681 Issue ID: 15681 Summary: Nested user type enum not retaining value properly. Product: D Version: D2 Hardware: All OS: Windows Status: NEW Severity: normal

Re: DigitalWhip

2016-02-14 Thread artemalive via Digitalmars-d-announce
On Saturday, 13 February 2016 at 20:45:41 UTC, David Nadlinger wrote: Hi Artem, On Saturday, 13 February 2016 at 18:48:12 UTC, artemalive wrote: https://github.com/artemalive/DigitalWhip Your scripts had bounds checking enabled for LDC but not the other two D compilers. I posted a pull

Re: DigitalWhip

2016-02-14 Thread artemalive via Digitalmars-d-announce
On Saturday, 13 February 2016 at 21:10:11 UTC, Adam D. Ruppe wrote: On Saturday, 13 February 2016 at 20:45:41 UTC, David Nadlinger wrote: Your scripts had bounds checking enabled for LDC but not the other two D compilers. I strongly recommend people to always keep bounds checking enabled in

Re: DigitalWhip

2016-02-14 Thread artemalive via Digitalmars-d-announce
On Sunday, 14 February 2016 at 17:49:10 UTC, Johan Engelen wrote: On Saturday, 13 February 2016 at 19:26:39 UTC, artemalive wrote: On Saturday, 13 February 2016 at 19:19:46 UTC, Johan Engelen wrote: Could you add the compiler versions to the outputted .txt file, e.g. `dmd --version`? (the

Re: wrapSocket for socket_t? As wrapFile for FILE*

2016-02-14 Thread Beginner-8 via Digitalmars-d-learn
On Sunday, 14 February 2016 at 07:33:11 UTC, Ali Çehreli wrote: Maybe another option is to duplicate the socket handle Sure! Nevertheless, it is need method for socket_t duplication. Something like: class Socket { ... static Socket dup(socket_t) ... } before giving it to Socket but I am

[Issue 14989] Overload merge sometimes doesn't work

2016-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14989 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/2f5c855c2d1dcbdf6a5ee17125ab640af7fdb23a fix Issue 14989 - Overload

Re: Ddb needs a maintainer

2016-02-14 Thread Jacob Carlborg via Digitalmars-d-announce
On 2016-02-14 00:32, Dicebot wrote: Ideally ddb should be built on top of ddbc wrapping it into fiber-friendly async API but I don't know if this is possible with ddbc design. It looks like libpg has support for asynchronous calls [1] but ddbc does not use them. Also, although libpg

Re: Release vibe.d 0.7.27

2016-02-14 Thread Sönke Ludwig via Digitalmars-d-announce
Am 11.02.2016 um 00:24 schrieb sigod: Did some benchmarks between `std.net.curl.get` and `vibe.http.client.requestHTTP`. Only GET requests. 100 requests, ~1.4mb file: curl total: 131304, average: 1 sec and 313 ms vibe total: 21975, average: 219 ms 52 different files: curl

Re: wrapSocket for socket_t? As wrapFile for FILE*

2016-02-14 Thread Ali Çehreli via Digitalmars-d-learn
On 02/14/2016 12:03 AM, Beginner-8 wrote: Uh, wait! Forgot about that Socket calls .close() in its dtor Try duplicating the socket handle before handing it over to Socket (not compiled nor tested): import core.sys.posix.unistd; Socket(dup(myHandle)) I think socket handles are

[Issue 15680] TypeInfo broken for typeof(null)

2016-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15680 Johan Engelen changed: What|Removed |Added CC||goejenda...@zonnet.nl

[Issue 11461] `Error`s are not thrown as `pure nothrow` functions are optimized out with "-O -release"

2016-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11461 naptime changed: What|Removed |Added CC|

Re: Weird issue with std.range.iota.length

2016-02-14 Thread w0rp via Digitalmars-d
Maybe I'm missing something, but can't the length just be size_t? I doubt there is much you could do with code which generates finite sequences larger than the addressable memory space, aside from very abstract and inefficient mathematical calculations which skip over elements. iota would

Re: wrapSocket for socket_t? As wrapFile for FILE*

2016-02-14 Thread Beginner-8 via Digitalmars-d-learn
Uh, wait! Forgot about that Socket calls .close() in its dtor

Re: An important pull request: accessing shared affix for immutable data

2016-02-14 Thread Sönke Ludwig via Digitalmars-d
One thing that I really miss from most of the discussions about RC is support for weak references, which IMO should definitely be supported in the standard RC implementation. Event if they are only needed rarely, there are some things that simply do not work without them. And I don't think

Photoshop programming

2016-02-14 Thread Patience via Digitalmars-d-learn
Photoshop has the ability to be controlled by scripts and programming languages. For example, C# can be used to access photoshop by adding the appropriate reference and using directives. I believe it is COM based but I am not totally sure. I've tried reading the docs but it's not making much

[Issue 11461] `Error`s are not thrown as `pure nothrow` functions are optimized out with "-O -release"

2016-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11461 Richard Cattermole changed: What|Removed |Added CC|

Re: An important pull request: accessing shared affix for immutable data

2016-02-14 Thread Andrei Alexandrescu via Digitalmars-d
On 02/14/2016 03:08 AM, Sönke Ludwig wrote: For them to work natively, the lifetime of the allocated memory block and that of the reference count must be separate. Not necessarily. C++ makes this work for make_shared by keeping the memory allocated around (but not the object) until the last