[Issue 15248] New: Function in current module is not allowed to overload imported function

2015-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15248 Issue ID: 15248 Summary: Function in current module is not allowed to overload imported function Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: DConf 2016, Berlin: Call for Submissions is now open!

2015-10-26 Thread Don via Digitalmars-d-announce
On Friday, 23 October 2015 at 16:37:20 UTC, Andrei Alexandrescu wrote: http://dconf.org/2016/index.html Typo: "we're grateful to benefit of their hosting" should be "we're grateful to get the benefit of their hosting" or "we're grateful to benefit from their hosting".

Re: Option types and pattern matching.

2015-10-26 Thread Kagamin via Digitalmars-d
For Option see https://w0rp.com/project/dstruct/dstruct/option/

Re: Playing SIMD

2015-10-26 Thread John Colvin via Digitalmars-d
On Monday, 26 October 2015 at 11:10:31 UTC, Iakh wrote: On Monday, 26 October 2015 at 09:49:00 UTC, Iakh wrote: On Monday, 26 October 2015 at 00:00:45 UTC, anonymous wrote: runBinary calls naiveIndexOf. You're not testing binaryIndexOf. You are right. This is fixed example:

Re: Playing SIMD

2015-10-26 Thread Andrei Alexandrescu via Digitalmars-d
On 10/26/2015 05:48 AM, Iakh wrote: On Monday, 26 October 2015 at 00:00:45 UTC, anonymous wrote: runBinary calls naiveIndexOf. You're not testing binaryIndexOf. You are right. This is fixed example: http://dpaste.dzfl.pl/f7a54b789a21 and results at dpaste.dzfl.pl: - SIMD:

Re: DMD is slow for matrix maths?

2015-10-26 Thread Etienne Cimon via Digitalmars-d
On Monday, 26 October 2015 at 04:48:09 UTC, H. S. Teoh wrote: On Mon, Oct 26, 2015 at 02:37:16AM +, Etienne Cimon via Digitalmars-d wrote: If you must use DMD, I recommend filing an enhancement request and bothering Walter about it. T I'd really like the performance benefits to be

Re: Option types and pattern matching.

2015-10-26 Thread Jacob Carlborg via Digitalmars-d
On 2015-10-25 19:23, Dmitry Olshansky wrote: I humbly believe that D may just add special re-write rule to the switch statement in order to allow user-defined switchable types. This goes along nicely with the trend - e.g. foreach statement works with anything having static range interfaces or

[Issue 15247] Object's destructor should be pure @safe nothrow @nogc

2015-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15247 --- Comment #1 from Sobirari Muhomori --- What should happen to impure destructors? --

Re: Voting for std.experimental.testing

2015-10-26 Thread Atila Neves via Digitalmars-d
On Sunday, 11 October 2015 at 21:56:21 UTC, Jonathan M Davis wrote: On Thursday, 8 October 2015 at 08:21:58 UTC, Robert burner Schadek wrote: This is the voting thread for inclusion of std.experimental.testing into phobos. PR: https://github.com/D-Programming-Language/phobos/pull/3207 Dub:

Re: Playing SIMD

2015-10-26 Thread Iakh via Digitalmars-d
On Monday, 26 October 2015 at 09:49:00 UTC, Iakh wrote: On Monday, 26 October 2015 at 00:00:45 UTC, anonymous wrote: runBinary calls naiveIndexOf. You're not testing binaryIndexOf. You are right. This is fixed example: http://dpaste.dzfl.pl/f7a54b789a21 and results at dpaste.dzfl.pl: -

Re: Playing SIMD

2015-10-26 Thread Iakh via Digitalmars-d
On Monday, 26 October 2015 at 00:00:45 UTC, anonymous wrote: runBinary calls naiveIndexOf. You're not testing binaryIndexOf. You are right. This is fixed example: http://dpaste.dzfl.pl/f7a54b789a21 and results at dpaste.dzfl.pl: - SIMD: TickDuration(151000) Binary: TickDuration(255000)

Re: Option types and pattern matching.

2015-10-26 Thread Edmund Smith via Digitalmars-d
On Sunday, 25 October 2015 at 06:22:51 UTC, TheFlyingFiddle wrote: On Sunday, 25 October 2015 at 05:45:15 UTC, Nerve wrote: On Sunday, 25 October 2015 at 05:05:47 UTC, Rikki Cattermole wrote: Since I have no idea what the difference between Some(_), None and default. I'll assume it's already

Re: Overloading an imported function

2015-10-26 Thread Shriramana Sharma via Digitalmars-d
Shriramana Sharma wrote: > Should I file a bug? Please advise. Since there was no response, I filed: https://issues.dlang.org/show_bug.cgi?id=15248 -- Shriramana Sharma, Penguin #395953

Re: on std.net.curl high level functions

2015-10-26 Thread tired_eyes via Digitalmars-d
On Sunday, 25 October 2015 at 00:14:38 UTC, Mengu wrote: hi all what do you think about high level functions such as get, post, put, delete returning a Request object with status code, headers and content as its properties rather than just the content? this would make things easier for n00bs

[Issue 15248] Function in current module is not allowed to overload imported function

2015-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15248 Maxim Fomin changed: What|Removed |Added CC||mxfo...@gmail.com

Re: Mobile support

2015-10-26 Thread Walter Bright via Digitalmars-d
On 10/25/2015 11:05 PM, Vladimir Panteleev wrote: I've been chasing after compiler hackers to update the wiki with very little success (and then they complain how their projects are not getting enough attention etc.). Yeah, that's a perennial problem.

Re: Calypso progress report (+ updated MingW64 build)

2015-10-26 Thread Russel Winder via Digitalmars-d-announce
On Mon, 2015-10-26 at 02:54 +, Elie Morisse via Digitalmars-d- announce wrote: > […] > The build process got much simpler 2 weeks ago though, now that > it doesn't depend on an LLVM source tree and an external Clang > executable anymore it's almost identical to building LDC. In which case

Re: D serialization temporary fixup?

2015-10-26 Thread Atila Neves via Digitalmars-d-learn
On Friday, 23 October 2015 at 16:27:11 UTC, Shriramana Sharma wrote: Shriramana Sharma wrote: I'd just like to have a quick but reliable way to store real and int data types into a binary data file and read therefrom. Is there such a solution? Wow thank you people! Nice to know I can do

[Issue 15230] Inconsistent std.range.SortedRange predicate checks

2015-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15230 --- Comment #2 from John Colvin --- (In reply to Jack Stouffer from comment #1) > I would consider this as "working as intended", as the checks are only > supposed to happen in debug mode. In a PR of mine, I asked

Re: Mobile support

2015-10-26 Thread Vladimir Panteleev via Digitalmars-d
On Monday, 26 October 2015 at 05:34:05 UTC, Dan Olson wrote: Andrei Alexandrescu writes: On 10/18/15 7:55 AM, Joakim wrote: Now, the download page has not traditionally listed alphas and betas. But the importance of mobile is so high that I think it is worth

Re: Improving assert-printing in DMD

2015-10-26 Thread Nordlöw via Digitalmars-d
On Monday, 26 October 2015 at 19:17:13 UTC, Nordlöw wrote: there is nothing stopping us from allowing onAssertFailed!"!=" to be defined as long as the compiler lowering logic can do the correct rewrite. For further details, see also:

Re: Kinds of containers

2015-10-26 Thread rsw0x via Digitalmars-d
On Monday, 26 October 2015 at 19:31:26 UTC, Ulrich Küttler wrote: On Wednesday, 21 October 2015 at 18:49:26 UTC, Andrei Alexandrescu wrote: On 10/21/2015 12:25 PM, Jonathan M Davis wrote: My experience with immutable containers is that their performance is trash precisely because you can't

Re: Playing audio files and related functions?

2015-10-26 Thread WhatMeWorry via Digitalmars-d-learn
On Monday, 26 October 2015 at 21:25:58 UTC, Cleverson wrote: Hello, Is there any library or module for easily managing basic audio functions, e.g., play/pause/stop a sound? I can't find it amongst the standard library and the packages colection, or maybe I don't know how to search properly,

Re: DMD is slow for matrix maths?

2015-10-26 Thread Jack Stouffer via Digitalmars-d
On Monday, 26 October 2015 at 21:29:47 UTC, default0 wrote: On Monday, 26 October 2015 at 20:30:51 UTC, rsw0x wrote: dmd will never reach gdc/ldc performance, gcc and LLVM have entire teams of people that actively contribute to their compilers. We have a Walter though :-) Walter has a

Automatic method overriding in sub-classes

2015-10-26 Thread Tofu Ninja via Digitalmars-d
I know this has basically no chance of ever actually being added because that is the way of all "I want feature X" threads, but I thought I would post this anyways because I seem to want it constantly. So we have TemplateThisParameters methods which are cool but have some drawbacks. They are

Re: Automatic method overriding in sub-classes

2015-10-26 Thread Tofu Ninja via Digitalmars-d
On Tuesday, 27 October 2015 at 00:07:36 UTC, Ali Çehreli wrote: I don't understand all uses of the request but typeid() returns a TypeInfo reference, which is about the actual type of an object. The following change produces the expected output in this case (except, it has the added module

Re: Automatic method overriding in sub-classes

2015-10-26 Thread Tofu Ninja via Digitalmars-d
On Tuesday, 27 October 2015 at 00:27:46 UTC, Tofu Ninja wrote: ... crap, copy paste error change the main to void main() { A a = new A(); a.foo(); // prints nothing a.bar(); // prints nothing B b = new B(); b.foo(); // prints X b.bar(); //

Re: Kinds of containers

2015-10-26 Thread Ulrich Küttler via Digitalmars-d
On Wednesday, 21 October 2015 at 18:49:26 UTC, Andrei Alexandrescu wrote: On 10/21/2015 12:25 PM, Jonathan M Davis wrote: My experience with immutable containers is that their performance is trash precisely because you can't mutate them. That's actually the experience in the Scala community.

Re: Improving assert-printing in DMD

2015-10-26 Thread Atila Neves via Digitalmars-d
On Monday, 26 October 2015 at 17:50:13 UTC, Nordlöw wrote: On Monday, 26 October 2015 at 17:36:37 UTC, Nordlöw wrote: On Monday, 26 October 2015 at 15:17:37 UTC, Atila Neves wrote: [...] Yes, that's my plan. [...] I haven't thought about that in detail. One way would be to have a

[Issue 15246] Destructor inheritance doesn't inherit attributes properly

2015-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15246 --- Comment #2 from Marco Leise --- Here is the loop that iterates the inheritance chain from up to Object and calls destructors (if defined):

Playing audio files and related functions?

2015-10-26 Thread Cleverson via Digitalmars-d-learn
Hello, Is there any library or module for easily managing basic audio functions, e.g., play/pause/stop a sound? I can't find it amongst the standard library and the packages colection, or maybe I don't know how to search properly, since I'm new to D and its ecosystem. Thank you, Cleverson

Re: Improving assert-printing in DMD

2015-10-26 Thread Nordlöw via Digitalmars-d
On Monday, 26 October 2015 at 17:36:37 UTC, Nordlöw wrote: Eventhough compiler rewrites X != Y into !(X == Y) and we cannot explicit overload opBinary!"!=" there is nothing stopping us allowing onBinaryAssert!"!=" in the rewriter. Correction: there is nothing stopping us

[Issue 10233] [Tracker] Grammar issues

2015-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10233 briancsch...@gmail.com changed: What|Removed |Added Depends on||15250 --

Re: Mimicing Python list of list

2015-10-26 Thread Meta via Digitalmars-d-learn
On Monday, 26 October 2015 at 18:46:45 UTC, Dandyvica wrote: Hi all, I'm trying to find out a solution to implement a generic tree or array container whose nodes can either be elements or a subtree (or sub-array). Pretty much like you can do in Python: l = [1, 2, [1, 2, 3], 4] l is a list

Re: Mimicing Python list of list

2015-10-26 Thread Dandyvica via Digitalmars-d-learn
On Monday, 26 October 2015 at 19:26:08 UTC, Meta wrote: On Monday, 26 October 2015 at 18:46:45 UTC, Dandyvica wrote: Hi all, I'm trying to find out a solution to implement a generic tree or array container whose nodes can either be elements or a subtree (or sub-array). Pretty much like you

[Issue 15246] Destructor inheritance doesn't inherit attributes properly

2015-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15246 Marco Leise changed: What|Removed |Added CC||marco.le...@gmx.de ---

Re: Playing audio files and related functions?

2015-10-26 Thread Cleverson via Digitalmars-d-learn
Forgot to say, it may be for Windows only, in case a portable version isn't available.

[Issue 15250] New: Grammar does not contain rules for multiple slices in an index expression

2015-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15250 Issue ID: 15250 Summary: Grammar does not contain rules for multiple slices in an index expression Product: D Version: D2 Hardware: All URL:

Re: Playing SIMD

2015-10-26 Thread Iakh via Digitalmars-d
On Monday, 26 October 2015 at 12:35:39 UTC, Don wrote: You need to be very careful with doing benchmarks on tiny test cases, they can be very misleading. Can you advice some reading about benchmark?

Re: DMD is slow for matrix maths?

2015-10-26 Thread rsw0x via Digitalmars-d
On Monday, 26 October 2015 at 11:37:17 UTC, Etienne Cimon wrote: On Monday, 26 October 2015 at 04:48:09 UTC, H. S. Teoh wrote: On Mon, Oct 26, 2015 at 02:37:16AM +, Etienne Cimon via Digitalmars-d wrote: If you must use DMD, I recommend filing an enhancement request and bothering Walter

Re: Kinds of containers

2015-10-26 Thread lobo via Digitalmars-d
On Monday, 26 October 2015 at 19:31:26 UTC, Ulrich Küttler wrote: On Wednesday, 21 October 2015 at 18:49:26 UTC, Andrei Alexandrescu wrote: On 10/21/2015 12:25 PM, Jonathan M Davis wrote: My experience with immutable containers is that their performance is trash precisely because you can't

Re: Mimicing Python list of list

2015-10-26 Thread Meta via Digitalmars-d-learn
On Monday, 26 October 2015 at 20:53:18 UTC, Dandyvica wrote: Thanks Meta, great idea. But does I'd like to have something like dynamic arrays and be able to do this: class A(T) { T _v; this(T v) { _v = v; } } auto myContainer = MyContainerArray!(A!int)(); myContainer ~= new A!int(1);

Re: DMD is slow for matrix maths?

2015-10-26 Thread default0 via Digitalmars-d
On Monday, 26 October 2015 at 20:30:51 UTC, rsw0x wrote: dmd will never reach gdc/ldc performance, gcc and LLVM have entire teams of people that actively contribute to their compilers. We have a Walter though :-)

Re: I need D to do (asm+D)bootloader.

2015-10-26 Thread Walter Bright via Digitalmars-d-announce
On 10/26/2015 10:19 AM, Iain Buclaw via Digitalmars-d-announce wrote: This is for D.learn, I'd suggest asking there (probably putting your code on a pastebin site to link in). Does pastebin code last forever? If it is ephemeral, it'd be better to include it in the posting.

Re: DMD is slow for matrix maths?

2015-10-26 Thread Márcio Martins via Digitalmars-d
On Monday, 26 October 2015 at 02:37:18 UTC, Etienne Cimon wrote: I've been playing around with perf and my web server and found that the bottleneck is by far the math module of Botan: https://github.com/etcimon/botan/blob/master/source/botan/math/mp/mp_core.d [...]

[Issue 15246] Destructor inheritance doesn't inherit attributes properly

2015-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15246 --- Comment #3 from Andrei Alexandrescu --- (In reply to Marco Leise from comment #1) > You are assuming that destructors are inherited and there is an implicit > super-call, but they are actually chained and called one after

Re: Improving assert-printing in DMD

2015-10-26 Thread Nordlöw via Digitalmars-d
On Monday, 26 October 2015 at 17:36:37 UTC, Nordlöw wrote: I'll update http://wiki.dlang.org/DIP83 with a proposed solution for `!=`-lowering. Update along with other changes...done.

Re: Fastest JSON parser in the world is a D project

2015-10-26 Thread Nordlöw via Digitalmars-d-announce
On Wednesday, 14 October 2015 at 07:35:49 UTC, Marco Leise wrote: Example: double x = 0, y = 0, z = 0; auto json = parseTrustedJSON(`{ "coordinates": [ { "x": 1, "y": 2, "z": 3 }, … ] }`); foreach (idx; json.coordinates) { // Provide one function for each key you are

Re: Kinds of containers

2015-10-26 Thread Timon Gehr via Digitalmars-d
On 10/26/2015 08:31 PM, Ulrich Küttler wrote: On Wednesday, 21 October 2015 at 18:49:26 UTC, Andrei Alexandrescu wrote: On 10/21/2015 12:25 PM, Jonathan M Davis wrote: My experience with immutable containers is that their performance is trash precisely because you can't mutate them. That's

D interface header import file

2015-10-26 Thread ric maicle via Digitalmars-d-learn
I just noticed these multiple terminologies: * from the compiler --help, -H refers to a 'header' file * the compiler online page refers to it as 'D interface' file * The generated .di file first line comment says 'D import file' I know they refer to the same thing but how is this kind of

Re: Automatic method overriding in sub-classes

2015-10-26 Thread Ali Çehreli via Digitalmars-d
On 10/26/2015 04:25 PM, Tofu Ninja wrote: ## class A { void foo(this T)() { writeln(T.stringof); } void bar(auto override this T)() { writeln(T.stringof); } } class B : A {} void main() { A a = new A(); a.foo(); // prints "A"

Re: Kinds of containers

2015-10-26 Thread Ulrich Küttler via Digitalmars-d
On Monday, 26 October 2015 at 20:46:21 UTC, Timon Gehr wrote: On 10/26/2015 08:31 PM, Ulrich Küttler wrote: On Wednesday, 21 October 2015 at 18:49:26 UTC, Andrei Alexandrescu wrote: On 10/21/2015 12:25 PM, Jonathan M Davis wrote: My experience with immutable containers is that their

Re: Playing audio files and related functions?

2015-10-26 Thread ponce via Digitalmars-d-learn
On Monday, 26 October 2015 at 21:25:58 UTC, Cleverson wrote: Hello, Is there any library or module for easily managing basic audio functions, e.g., play/pause/stop a sound? I can't find it amongst the standard library and the packages colection, or maybe I don't know how to search properly,

Re: Automatic method overriding in sub-classes

2015-10-26 Thread Tofu Ninja via Digitalmars-d
On Tuesday, 27 October 2015 at 00:07:36 UTC, Ali Çehreli wrote: On 10/26/2015 04:25 PM, Tofu Ninja wrote: ## class A { void foo(this T)() { writeln(T.stringof); } void bar(auto override this T)() { writeln(T.stringof); } } class B : A {} void main()

scod - a clean and lightweight theme for ddox

2015-10-26 Thread Martin Nowak via Digitalmars-d-announce
Available as dub package: http://code.dlang.org/packages/scod Example: http://martinnowak.github.io/bloom/bloom.html We're currently working on dub integration of other doc generation tools (https://github.com/D-Programming-Language/dub/pull/702), for the time being you can use scod like so.

Re: DMD is slow for matrix maths?

2015-10-26 Thread Laeeth Isharc via Digitalmars-d
On Monday, 26 October 2015 at 23:13:22 UTC, Jack Stouffer wrote: On Monday, 26 October 2015 at 21:29:47 UTC, default0 wrote: On Monday, 26 October 2015 at 20:30:51 UTC, rsw0x wrote: dmd will never reach gdc/ldc performance, gcc and LLVM have entire teams of people that actively contribute to

Lifetime study group

2015-10-26 Thread Andrei Alexandrescu via Digitalmars-d
Hello everyone, Following a number of discussions with Walter regarding lifetime management for class objects, we've had a small epiphany: we need to frame collaboration better. Let me explain. There are a number of very good folks here with type system-y stuff: Timon, Amaury, Michel, and

Re: Lifetime study group

2015-10-26 Thread Rikki Cattermole via Digitalmars-d
On 27/10/15 3:45 PM, Andrei Alexandrescu wrote: Hello everyone, Following a number of discussions with Walter regarding lifetime management for class objects, we've had a small epiphany: we need to frame collaboration better. Let me explain. There are a number of very good folks here with

Re: Calypso progress report (+ updated MingW64 build)

2015-10-26 Thread Laeeth Isharc via Digitalmars-d-announce
Elie - thanks for posting the build. Have been working on something else past day, but this is on my list to look at next. Having quantlib work would be very nice for many financial users. Lots of people use it, even just as a check on their own stuff. Russell, I agree about the plotting,

Re: DMD is slow for matrix maths?

2015-10-26 Thread rsw0x via Digitalmars-d
On Tuesday, 27 October 2015 at 02:21:40 UTC, Laeeth Isharc wrote: On Monday, 26 October 2015 at 23:13:22 UTC, Jack Stouffer wrote: [...] Someone who says never is certainly making a bold claim in an uncertain world at a time when the basic factors governing the fate of D are visibly

Re: Lifetime study group

2015-10-26 Thread rsw0x via Digitalmars-d
On Tuesday, 27 October 2015 at 02:45:24 UTC, Andrei Alexandrescu wrote: So by this I'm asking folks' participation to a study group on object lifetime. Walter and I believe we must make reference counting for classes work, and that Rust-style schemes are too complex for their own good. But

Re: Automatic method overriding in sub-classes

2015-10-26 Thread bitwise via Digitalmars-d
On Monday, 26 October 2015 at 23:25:49 UTC, Tofu Ninja wrote: I know this has basically no chance of ever actually being added because that is the way of all "I want feature X" threads, but I thought I would post this anyways because I seem to want it constantly. [...] Stole the words

Re: DMD is slow for matrix maths?

2015-10-26 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 27 October 2015 at 03:14:55 UTC, rsw0x wrote: On Tuesday, 27 October 2015 at 02:21:40 UTC, Laeeth Isharc wrote: On Monday, 26 October 2015 at 23:13:22 UTC, Jack Stouffer wrote: [...] Someone who says never is certainly making a bold claim in an uncertain world at a time when the

how use * in D just like C++

2015-10-26 Thread liumao via Digitalmars-d
for example class A; { void doSomething() {} } A *a = cast(A *) new A; then I call a.doSomething(); my program "Segmentation fault" how could it happened? and how i use it correctly? 3q, please tell me, 3q 3q 3q!

Re: DMD is slow for matrix maths?

2015-10-26 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 27 October 2015 at 03:10:43 UTC, H. S. Teoh wrote: On Tue, Oct 27, 2015 at 02:21:38AM +, Laeeth Isharc via Digitalmars-d wrote: [...] So I would suggest it isn't productive to think about whether Dmd will catch up. Maybe, maybe not. Doesn't matter. Making it faster will help

Re: Mobile support

2015-10-26 Thread Dan Olson via Digitalmars-d
Vladimir Panteleev writes: > On Monday, 26 October 2015 at 05:34:05 UTC, Dan Olson wrote: >> I think it makes sense to add a link to the LDC iOS releases in >> http://wiki.dlang.org/Compilers. Perhaps a row for iOS in table >> "Package and/or binary availability,

Re: DMD is slow for matrix maths?

2015-10-26 Thread Jack Stouffer via Digitalmars-d
On Tuesday, 27 October 2015 at 02:21:40 UTC, Laeeth Isharc wrote: In addition, it's mildly demoralising to others to say such things, no matter how good ones intent might be. My intentions are to call things as they are. If people are demoralized after learning that one person working in his

Re: DMD is slow for matrix maths?

2015-10-26 Thread H. S. Teoh via Digitalmars-d
On Tue, Oct 27, 2015 at 02:21:38AM +, Laeeth Isharc via Digitalmars-d wrote: [...] > So I would suggest it isn't productive to think about whether Dmd will > catch up. Maybe, maybe not. Doesn't matter. Making it faster will > help many - this defeatist attitude of 'why bother - just use GDC

Re: Array of templated classes or structs

2015-10-26 Thread Dandyvica via Digitalmars-d-learn
On Saturday, 24 October 2015 at 19:02:50 UTC, TheFlyingFiddle wrote: On Saturday, 24 October 2015 at 19:00:57 UTC, TheFlyingFiddle wrote: One thing about variant is that if the struct you are trying to insert is larger then (void delegate()).sizeof it will allocate the wrapped type on the gc

Mimicing Python list of list

2015-10-26 Thread Dandyvica via Digitalmars-d-learn
Hi all, I'm trying to find out a solution to implement a generic tree or array container whose nodes can either be elements or a subtree (or sub-array). Pretty much like you can do in Python: l = [1, 2, [1, 2, 3], 4] l is a list of (integers or list of integers). Any idea on how to do

Re: Playing SIMD

2015-10-26 Thread Kagamin via Digitalmars-d
On Monday, 26 October 2015 at 12:10:41 UTC, rumbu wrote: Interpolation search is even faster :) http://dpaste.dzfl.pl/4443c5753454 For a funny name it's called Newton search: you can use interpolation of higher order, can be more efficient if the data has a trend.

Re: An annoying compile issue

2015-10-26 Thread WhatMeWorry via Digitalmars-d-learn
On Monday, 26 October 2015 at 03:53:21 UTC, Adam D. Ruppe wrote: On Monday, 26 October 2015 at 03:44:31 UTC, WhatMeWorry wrote: First, isn't Vector!(float,3) a template which creates a tuple consisting of float, float, float; so aren't the argument types identical? I'm not familiar with the

Re: How to get DMD to stop littering my source dir with .o files?

2015-10-26 Thread Cauterite via Digitalmars-d-learn
The problem is that the compiler and linker are separate programs; the compiler has to generate input for the linker in the form of a file. RDMD automatically cleans up all the .obj garbage, so one solution is to run rdmd --build-only asdf.d Also, the -of flag is a little more

How to get DMD to stop littering my source dir with .o files?

2015-10-26 Thread Shriramana Sharma via Digitalmars-d-learn
The subject line says it all. Every time I compile a D file to an executable I get an unwanted .o file and have to manually clean up things. I'm using DMD 2.0.68.2. -of doesn't help, and my God, it doesn't even allow a space or equal sign between itself and the desired name of the output file

[Issue 15247] Object's destructor should be pure @safe nothrow @nogc

2015-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15247 --- Comment #2 from Andrei Alexandrescu --- (In reply to Sobirari Muhomori from comment #1) > What should happen to impure destructors? They just are introduced as impure and work (because they may call pure destructors). --

[Issue 12034] Union and inlining leads to erroneous "Error: variable used before set"

2015-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12034 ponce changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: Option types and pattern matching.

2015-10-26 Thread Dmitry Olshansky via Digitalmars-d
On 26-Oct-2015 12:16, Jacob Carlborg wrote: On 2015-10-25 19:23, Dmitry Olshansky wrote: I humbly believe that D may just add special re-write rule to the switch statement in order to allow user-defined switchable types. This goes along nicely with the trend - e.g. foreach statement works with

Re: Option types and pattern matching.

2015-10-26 Thread TheFlyingFiddle via Digitalmars-d
On Monday, 26 October 2015 at 11:40:09 UTC, Edmund Smith wrote: On Sunday, 25 October 2015 at 06:22:51 UTC, TheFlyingFiddle wrote: You could also emulate constant matching using default parameters (albeit with the restriction that they must be after any non-default/constant parameters), since

Re: Does D's GC release memory back to the OS?

2015-10-26 Thread Cauterite via Digitalmars-d-learn
On Sunday, 25 October 2015 at 08:56:52 UTC, Jonathan M Davis wrote: It is my understanding that the GC does not normally ever return memory to the OS It seems that it does now. In smallAlloc() and bigAlloc(), if allocation fails it collects garbage and then: if (lowMem) minimize(); On

[Issue 15249] New: Floating-point division should multiply by inverse if lossless.

2015-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15249 Issue ID: 15249 Summary: Floating-point division should multiply by inverse if lossless. Product: D Version: D2 Hardware: x86_64 OS: All Status: NEW

Re: Does D's GC release memory back to the OS?

2015-10-26 Thread Cauterite via Digitalmars-d-learn
Correction: you said "the GC does not normally ever return memory" and you're right, because applications do not "normally" consume >95% of their address space.

Re: Playing SIMD

2015-10-26 Thread Iakh via Digitalmars-d
On Monday, 26 October 2015 at 11:47:56 UTC, Andrei Alexandrescu wrote: On 10/26/2015 05:48 AM, Iakh wrote: On Monday, 26 October 2015 at 00:00:45 UTC, anonymous wrote: runBinary calls naiveIndexOf. You're not testing binaryIndexOf. You are right. This is fixed example:

Re: Fixing spurious "statement is not reachable" in template code

2015-10-26 Thread Steven Schveighoffer via Digitalmars-d
On 10/24/15 1:25 PM, tsbockman wrote: While improving the DMD front-end's constant folding: https://github.com/D-Programming-Language/dmd/pull/5229 I found out about DMD issue 14835: https://issues.dlang.org/show_bug.cgi?id=14835 Briefly: /// module main;

Re: Playing SIMD

2015-10-26 Thread Iain Buclaw via Digitalmars-d
On 26 Oct 2015 1:40 pm, "Don via Digitalmars-d" wrote: > > On Sunday, 25 October 2015 at 19:37:32 UTC, Iakh wrote: >> >> Here is my implementatation of SIMD find. Function returns index of ubyte in static 16 byte array with unique values. > > > [snip] > > You need to

Re: DConf 2016, Berlin: Call for Submissions is now open!

2015-10-26 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 10/26/2015 06:01 AM, Don wrote: On Friday, 23 October 2015 at 16:37:20 UTC, Andrei Alexandrescu wrote: http://dconf.org/2016/index.html Typo: "we're grateful to benefit of their hosting" should be "we're grateful to get the benefit of their hosting" or "we're grateful to benefit from their

Re: Playing SIMD

2015-10-26 Thread rumbu via Digitalmars-d
On Monday, 26 October 2015 at 11:47:56 UTC, Andrei Alexandrescu wrote: On 10/26/2015 05:48 AM, Iakh wrote: On Monday, 26 October 2015 at 00:00:45 UTC, anonymous wrote: runBinary calls naiveIndexOf. You're not testing binaryIndexOf. You are right. This is fixed example:

Re: DMD is slow for matrix maths?

2015-10-26 Thread H. S. Teoh via Digitalmars-d
On Mon, Oct 26, 2015 at 11:37:16AM +, Etienne Cimon via Digitalmars-d wrote: > On Monday, 26 October 2015 at 04:48:09 UTC, H. S. Teoh wrote: > >On Mon, Oct 26, 2015 at 02:37:16AM +, Etienne Cimon via Digitalmars-d > >wrote: > > > >If you must use DMD, I recommend filing an enhancement

[Issue 15027] rangified functions no longer work with alias this'ed strings (e.g. DirEntry)

2015-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15027 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 15027] rangified functions no longer work with alias this'ed strings (e.g. DirEntry)

2015-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15027 --- Comment #20 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/3a8a9ea7939cf2e5c4a6452597681975ad3fb866 std.file fixes for

Re: DConf 2016, Berlin: Call for Submissions is now open!

2015-10-26 Thread Andrea Fontana via Digitalmars-d-announce
On Friday, 23 October 2015 at 16:37:20 UTC, Andrei Alexandrescu wrote: Please join us at DConf 2016, the conference of the D programming language in Berlin, Germany, May 4-6 2016. Berlin. Germany. Europe. Yay just some hours off Venice :)

Re: How to get DMD to stop littering my source dir with .o files?

2015-10-26 Thread Andrea Fontana via Digitalmars-d-learn
On Monday, 26 October 2015 at 11:55:48 UTC, Shriramana Sharma wrote: The subject line says it all. Every time I compile a D file to an executable I get an unwanted .o file and have to manually clean up things. I'm using DMD 2.0.68.2. Do you mean: -odobjdir write object & library files

Re: Playing SIMD

2015-10-26 Thread Iain Buclaw via Digitalmars-d
On 25 Oct 2015 11:50 pm, "Iakh via Digitalmars-d" < digitalmars-d@puremagic.com> wrote: > > On Sunday, 25 October 2015 at 22:17:58 UTC, Matthias Bentrup wrote: >> >> On Sunday, 25 October 2015 at 19:37:32 UTC, Iakh wrote: >>> >>> Is it optimal and how do you implement this stuf? >>> >> >> I think

Re: Option types and pattern matching.

2015-10-26 Thread Jacob Carlborg via Digitalmars-d
On 2015-10-26 12:40, Edmund Smith wrote: You could also emulate constant matching using default parameters (albeit with the restriction that they must be after any non-default/constant parameters), since the defaults form part of the function's type. I tried making something like this earlier

[Issue 13819] ICE: backend\cg87.c 1495 with mixin, delegate and -O

2015-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13819 --- Comment #1 from ponce --- Still happens with DMD64 D Compiler v2.069.0-b2 --

Re: DMD is slow for matrix maths?

2015-10-26 Thread Dmitry Olshansky via Digitalmars-d
On 26-Oct-2015 16:44, H. S. Teoh via Digitalmars-d wrote: On Mon, Oct 26, 2015 at 11:37:16AM +, Etienne Cimon via Digitalmars-d wrote: On Monday, 26 October 2015 at 04:48:09 UTC, H. S. Teoh wrote: On Mon, Oct 26, 2015 at 02:37:16AM +, Etienne Cimon via Digitalmars-d wrote: If you must

Re: Playing SIMD

2015-10-26 Thread Don via Digitalmars-d
On Sunday, 25 October 2015 at 19:37:32 UTC, Iakh wrote: Here is my implementatation of SIMD find. Function returns index of ubyte in static 16 byte array with unique values. [snip] You need to be very careful with doing benchmarks on tiny test cases, they can be very misleading. Be aware

[Issue 12692] Add support for __simd in for 32-bits targets

2015-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12692 ponce changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: Improving assert-printing in DMD

2015-10-26 Thread Atila Neves via Digitalmars-d
On Thursday, 1 October 2015 at 11:51:29 UTC, Per Nordlöw wrote: On Tuesday, 29 September 2015 at 21:02:42 UTC, Nordlöw wrote: As a follow-up to https://github.com/D-Programming-Language/phobos/pull/3207#issuecomment-144073495 I added a long comment about a new more flexible solution to this

I need D to do (asm+D)bootloader.

2015-10-26 Thread guodemone via Digitalmars-d-announce
sorry,My english is poot. file asm.h /* 是bootasm.S汇编文件所需要的头文件,主要是一些与X86保护模式的段访问方式相关的宏定义 */ #ifndef __BOOT_ASM_H__ #define __BOOT_ASM_H__ /* Assembler macros to create x86 segments */ /* Normal segment */ #define SEG_NULLASM

Re: Playing SIMD

2015-10-26 Thread Andrei Alexandrescu via Digitalmars-d
On 10/26/2015 08:35 AM, Don wrote: On Sunday, 25 October 2015 at 19:37:32 UTC, Iakh wrote: Here is my implementatation of SIMD find. Function returns index of ubyte in static 16 byte array with unique values. [snip] You need to be very careful with doing benchmarks on tiny test cases, they

  1   2   >