Re: Netflix opensources its first D library: Vectorflow

2017-08-03 Thread Matt via Digitalmars-d-announce
Meanwhile, the blog post Laeeth gave you shows Mir doing better on matrix multiplication benchmarks than Eigen, significantly better when dealing with complex numbers. I mean by now we should all be jaded enough not to simply take toy benchmarks as gospel for which is actually fastest in a

Why free and realloc seem to include .

2017-08-03 Thread Michael via Digitalmars-d-learn
So this might be a bit of a stupid question, but looking at the DMD source code (dmodule.d in particular) I see the following code: if (srcfile._ref == 0) .free(srcfile.buffer); srcfile.buffer = null; srcfile.len = 0; and I was just wondering why certain functions seem to be called

[Issue 11252] "in" operator for std.range.iota

2017-08-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11252 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/80d1e84453e5a8c20ef53fd459ce641ca8df0d4e Issue 11252 - In operator requested for std.range.iota

[Issue 17714] Function template - this T for static methods

2017-08-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17714 Timoses changed: What|Removed |Added See Also||https://issues.dlang.org/sh

[Issue 14191] Failure to locate overload with template this parameter

2017-08-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14191 Timoses changed: What|Removed |Added See Also||https://issues.dlang.org/sh

[Issue 17714] New: Function template - this T for static methods

2017-08-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17714 Issue ID: 17714 Summary: Function template - this T for static methods Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: enhancement

[Issue 17713] Template 'this' parameters for static methods

2017-08-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17713 er.kr...@gmail.com changed: What|Removed |Added CC||er.kr...@gmail.com --- Comment #1 from

Re: Inheritance of things that are note instance methods

2017-08-03 Thread Timon Gehr via Digitalmars-d
On 03.08.2017 15:02, Arafel wrote: Well, here I agree, that's why I was suggesting the "templated this" approach. I think it'd fit nicely. https://issues.dlang.org/show_bug.cgi?id=17713

[Issue 17713] New: Template 'this' parameters for static methods

2017-08-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17713 Issue ID: 17713 Summary: Template 'this' parameters for static methods Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: gtkD load images

2017-08-03 Thread Mengu via Digitalmars-d-learn
On Thursday, 3 August 2017 at 03:59:40 UTC, Johnson Jones wrote: How can be use gtkD to load images, I assume through gdkpixbuf? While I am getting errors loading images through glade's image: (test.exe:8188): Gtk-WARNING **: Could not load image 'a.jpg': Couldn't recognize the

Re: Inheritance of things that are note instance methods

2017-08-03 Thread Arafel via Digitalmars-d
On 08/03/2017 02:28 PM, Adam D. Ruppe wrote: There's no place in the binary for it to pass it that information. With a non-static member, `this` is passed as a hidden function argument. With static, there explicitly are no hidden function arguments (it is compatible with outside function

Re: How do I do this?

2017-08-03 Thread wxcvb via Digitalmars-d
On Thursday, 3 August 2017 at 10:46:06 UTC, Shachar Shemesh wrote: The problem: I'm writing a library. This library has logging facilities, but where it's going to be used there are better logging facilities. Under C, that wouldn't be a big issue: log.h: #ifdef REAL_LOG_LIBRARY #include

Re: Issue with template constraints in numeric types

2017-08-03 Thread data pulverizer via Digitalmars-d-learn
On Thursday, 3 August 2017 at 12:35:08 UTC, data pulverizer wrote: What about this case: ``` T test(T: double)(T x, T y) { return x*y; } auto test(T)(T x, T y) { return 5*test!double(x, y); } ``` which also gives: ``` int test: 4 double test: 4 ``` Hmm ... it looks as the

Re: How do I do this?

2017-08-03 Thread Johan Engelen via Digitalmars-d
On Thursday, 3 August 2017 at 12:33:54 UTC, Andrei Alexandrescu wrote: There's a bit of irony you can read a file during compilation but not pass a string. I always wondered about this. It makes things more cumbersome than needed. Is it a conscious decision to not allow passing a string

Re: Who maintains the D website?

2017-08-03 Thread Andrei Alexandrescu via Digitalmars-d
On 08/02/2017 08:18 PM, Andrej Mitrovic wrote: Is there a single person who's the main maintainer of the D website..? If not, I have some ideas on how to improve it. Not just ideas, I'd like to give a host at improving it myself, really. The primary contact for the website is Vladimir. --

Re: Issue with template constraints in numeric types

2017-08-03 Thread data pulverizer via Digitalmars-d-learn
On Thursday, 3 August 2017 at 12:31:00 UTC, Adam D. Ruppe wrote: On Thursday, 3 August 2017 at 12:24:02 UTC, data pulverizer wrote: import std.traits: isIntegral, isNumeric; Are you familiar with isFloatingPoint? http://dpldocs.info/experimental-docs/std.traits.isFloatingPoint.html

Re: How do I do this?

2017-08-03 Thread Andrei Alexandrescu via Digitalmars-d
On 08/03/2017 07:00 AM, Shachar Shemesh wrote: No sooner did I send out this question I have found the D feature I've been looking for. This is what I have: module log; version(alternate_logger) { mixin("public import " ~ import("alternate_logger.txt") ~ ";"); } else { // Default

Re: Issue with template constraints in numeric types

2017-08-03 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 3 August 2017 at 12:24:02 UTC, data pulverizer wrote: import std.traits: isIntegral, isNumeric; Are you familiar with isFloatingPoint? http://dpldocs.info/experimental-docs/std.traits.isFloatingPoint.html if(is(T: double) && isNumeric!T) Keep in mind that T:double here means

Re: Issue with template constraints in numeric types

2017-08-03 Thread data pulverizer via Digitalmars-d-learn
On Thursday, 3 August 2017 at 12:24:02 UTC, data pulverizer wrote: The same issue occurs when I try using template specializations instead. ... That is T test(T: double)(T x, T y){...} and T test(T)(T x, T y){...} Thanks

Re: Inheritance of things that are note instance methods

2017-08-03 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 3 August 2017 at 12:06:02 UTC, Arafel wrote: Does somebody know how it's even *supposed* to work? virtual functions can be overridden. All others work as functions across shared namespaces. Overloads across namespaces need to be explicitly added to the overload set, see:

Issue with template constraints in numeric types

2017-08-03 Thread data pulverizer via Digitalmars-d-learn
Dear all, I am writing template constraints for different numeric types: ``` import std.stdio: writeln; import std.traits: isIntegral, isNumeric; T test(T)(T x, T y) if(is(T: double) && isNumeric!T) { return x*y; } auto test(T)(T x, T y) if(!is(T: double) && isNumeric!T) {

Inheritance of things that are note instance methods

2017-08-03 Thread Arafel via Digitalmars-d
Hi! TL;DR: Inheritance seems to be a mess out of instance methods. Some things work, some other don't or not as expected, and apparently it isn't documented either [1]. Does somebody know how it's even *supposed* to work? Making it a bit more intuitive would also be nice :-) Now, the long

Re: dlang-requetst: openssl 1.1 compatible release

2017-08-03 Thread Mengu via Digitalmars-d-announce
On Thursday, 3 August 2017 at 10:02:24 UTC, Temtaime wrote: On Thursday, 3 August 2017 at 09:57:11 UTC, Suliman wrote: On Thursday, 3 August 2017 at 06:33:38 UTC, ikod wrote: Hello, Since version 0.5.0 dlang-requests has become compatible with both 1.0.x and 1.1.x versions of openssl

Re: dlang-requetst: openssl 1.1 compatible release

2017-08-03 Thread Suliman via Digitalmars-d-announce
On Thursday, 3 August 2017 at 10:02:24 UTC, Temtaime wrote: On Thursday, 3 August 2017 at 09:57:11 UTC, Suliman wrote: On Thursday, 3 August 2017 at 06:33:38 UTC, ikod wrote: Hello, Since version 0.5.0 dlang-requests has become compatible with both 1.0.x and 1.1.x versions of openssl

Re: How do I do this?

2017-08-03 Thread Shachar Shemesh via Digitalmars-d
No sooner did I send out this question I have found the D feature I've been looking for. This is what I have: module log; version(alternate_logger) { mixin("public import " ~ import("alternate_logger.txt") ~ ";"); } else { // Default implementation goes here } Can't say I'm thrilled with

Re: How do I do this?

2017-08-03 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 3 August 2017 at 10:46:06 UTC, Shachar Shemesh wrote: I seem to remember that D had an option of importing an external file as something (string? code? anything would do for my purposes). I cannot seem to find it, however. A search for "string import" and "import mixin" brought

Re: How do I do this?

2017-08-03 Thread ketmar via Digitalmars-d
Shachar Shemesh wrote: Under D, there is no facility to transfer a string from the command line to the code, so I can't use that approach. module a; void mylog (string) { ... } module b; void mylog (string) { ... } module c; version(loga) import a; else import b; .. mylog("boo!"); ..

How do I do this?

2017-08-03 Thread Shachar Shemesh via Digitalmars-d
The problem: I'm writing a library. This library has logging facilities, but where it's going to be used there are better logging facilities. Under C, that wouldn't be a big issue: log.h: #ifdef REAL_LOG_LIBRARY #include REAL_LOG_LIBRARY #else // Declarations go here #endif I can now

Re: [OT] Generative C++

2017-08-03 Thread Kagamin via Digitalmars-d
On Wednesday, 2 August 2017 at 20:28:38 UTC, 12345swordy wrote: ...No? I was referring to the c++ proposal paper. The paper doesn't propose to enforce coding standards to the point you want. D already does what the paper proposes.

Re: dlang-requetst: openssl 1.1 compatible release

2017-08-03 Thread Temtaime via Digitalmars-d-announce
On Thursday, 3 August 2017 at 09:57:11 UTC, Suliman wrote: On Thursday, 3 August 2017 at 06:33:38 UTC, ikod wrote: Hello, Since version 0.5.0 dlang-requests has become compatible with both 1.0.x and 1.1.x versions of openssl library. Please try and report any issues on github. Thanks!

Re: How to build GUI-based applications in D ?

2017-08-03 Thread ashit via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 16:12:45 UTC, Dukc wrote: On Tuesday, 1 August 2017 at 15:18:12 UTC, ashit wrote: i couldn't set control's width and height (Button widget) shows error. maybe it works a different way. 1. Try layoutHeight/width. Remember to set it for the main widget too, not

Re: dlang-requetst: openssl 1.1 compatible release

2017-08-03 Thread Suliman via Digitalmars-d-announce
On Thursday, 3 August 2017 at 06:33:38 UTC, ikod wrote: Hello, Since version 0.5.0 dlang-requests has become compatible with both 1.0.x and 1.1.x versions of openssl library. Please try and report any issues on github. Thanks! dlang-requests is HTTP/FTP client library, inspired by

Re: Visual D 0.45 released - better VS2017 integration

2017-08-03 Thread Michael via Digitalmars-d-announce
On Thursday, 3 August 2017 at 07:04:55 UTC, Rainer Schuetze wrote: Hi, there is a new version 0.45 of Visual D available at http://rainers.github.io/visuald/visuald/StartPage.html Most changes are bug fixes and incremental improvements, maybe standing out: * improved VS 2017 integration *

Re: [your code here] HexViewer

2017-08-03 Thread Biotronic via Digitalmars-d
On Thursday, 3 August 2017 at 08:47:12 UTC, Martin Tschierschke wrote: Can you point me to the explanation of this: %(%02X %)%*s %s ? https://dlang.org/phobos/std_format.html Under "Example using array and nested array formatting:" writefln("My items are %(%s %).", [1,2,3]); So "%( %)" is

Re: [your code here] HexViewer

2017-08-03 Thread Martin Tschierschke via Digitalmars-d
On Thursday, 3 August 2017 at 08:47:12 UTC, Martin Tschierschke wrote: On Wednesday, 2 August 2017 at 22:02:49 UTC, Vladimir Panteleev wrote: On Wednesday, 2 August 2017 at 21:59:23 UTC, Vladimir Panteleev wrote: Good idea! But I think it needs more ranges: The format call can be substituted

Re: Visual D 0.45 released - better VS2017 integration

2017-08-03 Thread Andrey via Digitalmars-d-announce
On Thursday, 3 August 2017 at 07:04:55 UTC, Rainer Schuetze wrote: Hi, there is a new version 0.45 of Visual D available at http://rainers.github.io/visuald/visuald/StartPage.html Most changes are bug fixes and incremental improvements, maybe standing out: * improved VS 2017 integration *

Re: [your code here] HexViewer

2017-08-03 Thread Martin Tschierschke via Digitalmars-d
On Wednesday, 2 August 2017 at 22:02:49 UTC, Vladimir Panteleev wrote: On Wednesday, 2 August 2017 at 21:59:23 UTC, Vladimir Panteleev wrote: Good idea! But I think it needs more ranges: The format call can be substituted with writefln directly: void main(string[] args) { import

[Issue 17712] [REG 2.074] [LINK] Undefined reference to std.conv.toChars!(10, char, 1, uint).toChars(uint)

2017-08-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17712 --- Comment #3 from Iain Buclaw --- (In reply to ZombineDev from comment #2) > Definitely looks like a front-end bug to me. The link error does not happen when compiling the test with -unittest. So the specific location to

Re: why won't byPair work with a const AA?

2017-08-03 Thread Olivier FAURE via Digitalmars-d-learn
On Wednesday, 2 August 2017 at 18:06:03 UTC, H. S. Teoh wrote: On Wed, Aug 02, 2017 at 01:15:44PM -0400, Steven Schveighoffer via Digitalmars-d-learn wrote: [...] The real answer is to have tail modifiers for structs, so you can do the same thing an array does. Note that if Result is an array,

[Issue 17712] [REG 2.074] [LINK] Undefined reference to std.conv.toChars!(10, char, 1, uint).toChars(uint)

2017-08-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17712 Johannes Pfau changed: What|Removed |Added CC|

[Issue 17712] [REG 2.074] [LINK] Undefined reference to std.conv.toChars!(10, char, 1, uint).toChars(uint)

2017-08-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17712 ZombineDev changed: What|Removed |Added CC|

[Issue 17712] [REG 2.074] [LINK] Undefined reference to std.conv.toChars!(10, char, 1, uint).toChars(uint)

2017-08-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17712 Iain Buclaw changed: What|Removed |Added CC||ibuc...@gdcproject.org

[Issue 17712] New: [REG 2.074] [LINK] Undefined reference to std.conv.toChars!(10, char, 1, uint).toChars(uint)

2017-08-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17712 Issue ID: 17712 Summary: [REG 2.074] [LINK] Undefined reference to std.conv.toChars!(10, char, 1, uint).toChars(uint) Product: D Version: D2 Hardware: All OS:

Re: Visual D no bp's on x64

2017-08-03 Thread Rainer Schuetze via Digitalmars-d-debugger
On 31.07.2017 19:51, Johnson Jones wrote: On Saturday, 22 July 2017 at 12:54:17 UTC, Rainer Schuetze wrote: On 18.06.2017 20:25, Mike B Johnson wrote: [...] Didn't work ;/ All I get on the output wndow is " C:\Windows\System32\dbghelp.dll unloaded. The thread 0x1ea4 has exited with

Visual D 0.45 released - better VS2017 integration

2017-08-03 Thread Rainer Schuetze via Digitalmars-d-announce
Hi, there is a new version 0.45 of Visual D available at http://rainers.github.io/visuald/visuald/StartPage.html Most changes are bug fixes and incremental improvements, maybe standing out: * improved VS 2017 integration * task list support * dparser update to recent language additions See

dlang-requetst: openssl 1.1 compatible release

2017-08-03 Thread ikod via Digitalmars-d-announce
Hello, Since version 0.5.0 dlang-requests has become compatible with both 1.0.x and 1.1.x versions of openssl library. Please try and report any issues on github. Thanks! dlang-requests is HTTP/FTP client library, inspired by python-requests with goals: small memory footprint performance

<    1   2