Re: Speed of horizontal flip

2015-04-01 Thread thedeemon via Digitalmars-d-learn
std.algorithm.reverse uses ranges, and shamefully DMD is really bad at optimizing away range-induced costs.

[Issue 14391] New: Assigning to module results in unhelpful error message

2015-04-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14391 Issue ID: 14391 Summary: Assigning to module results in unhelpful error message Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: diagnostic

[Issue 14207] [REG2.065] Assertion failure: '(vd-storage_class (STCout | STCref)) ? isCtfeReferenceValid(newval) : isCtfeValueValid(newval)' on line 6724 in file 'interpret.c'

2015-04-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14207 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull Hardware|x86

Re: lambda code

2015-04-01 Thread Vlad Levenfeld via Digitalmars-d-learn
On Tuesday, 31 March 2015 at 13:25:47 UTC, John Colvin wrote: On Tuesday, 31 March 2015 at 12:49:36 UTC, Vlad Levenfeld wrote: Is there any way (or could there be any way, in the future) of getting the code from lambda expressions as a string? I've noticed that if I have an error with a

Re: Compile-time errors using Dub/DMD - missing dependencies

2015-04-01 Thread Cassandra Nix via Digitalmars-d
Thanks to the correct

Re: Benchmark of D against other languages

2015-04-01 Thread Martin Nowak via Digitalmars-d
On Thursday, 2 April 2015 at 04:11:02 UTC, weaselcat wrote: was it a conscious decision to make the AA [] operator not work like map/etc in C++? What do you mean?

Re: std.reflection prototype

2015-04-01 Thread bitwise via Digitalmars-d
Currently in object.d in druntime there's a template, RTInfo, declared something like this: [snip] Thanks for the breakdown! Those pull requests make a lot more sense when read in the proper context ;) The main reason for implementing RTInfo for modules is to implement reflection. With the

Re: Benchmark of D against other languages

2015-04-01 Thread Andrei Alexandrescu via Digitalmars-d
On 4/1/15 3:49 PM, Martin Nowak wrote: On 03/31/2015 08:20 PM, cym13 wrote: https://github.com/kostya/benchmarks We made a massive jump towards the upper ranks. [snip] This is amazing work. Thanks! -- Andrei

Compile-time errors using Dub/DMD - missing dependencies

2015-04-01 Thread Cassandra Nix via Digitalmars-d
New questions are sorry, but I have a few minor problems. Where can I find / install these dependencies? /usr/bin/ld: cannot find -levent /usr/bin/ld: cannot find -levent_pthreads /usr/bin/ld: cannot find -lssl /usr/bin/ld: cannot find -lcrypto

Re: Dgame RC #1

2015-04-01 Thread Craig Dillabaugh via Digitalmars-d-announce
On Wednesday, 1 April 2015 at 18:30:01 UTC, Namespace wrote: Since the weekend Dgame went into the release phase: https://github.com/Dgame/Dgame/releases/tag/v0.5.0-rc.1 http://dgame-dev.de/?page=download The Website (http://dgame-dev.de/) is fully updated and should be useable on every

Re: Dgame RC #1

2015-04-01 Thread Craig Dillabaugh via Digitalmars-d-announce
On Thursday, 2 April 2015 at 02:36:52 UTC, Craig Dillabaugh wrote: On Wednesday, 1 April 2015 at 18:30:01 UTC, Namespace wrote: Since the weekend Dgame went into the release phase: https://github.com/Dgame/Dgame/releases/tag/v0.5.0-rc.1 http://dgame-dev.de/?page=download The Website

Re: Benchmark of D against other languages

2015-04-01 Thread Martin Nowak via Digitalmars-d
On 04/02/2015 01:39 AM, bearophile wrote: built-in functions for arithmetics with overflow checking Your persistent interest in integer overflow checks make we wonder if you were responsible for this? http://www.around.com/ariane.html

Re: Dgame RC #1

2015-04-01 Thread stewarth via Digitalmars-d-announce
On Wednesday, 1 April 2015 at 18:30:01 UTC, Namespace wrote: Since the weekend Dgame went into the release phase: https://github.com/Dgame/Dgame/releases/tag/v0.5.0-rc.1 http://dgame-dev.de/?page=download The Website (http://dgame-dev.de/) is fully updated and should be useable on every

Re: Benchmark of D against other languages

2015-04-01 Thread Martin Nowak via Digitalmars-d
On 04/02/2015 03:35 AM, weaselcat wrote: the benchmark pointed out two sore areas in D(AA and std.json,) would be nice to see AA get updated as I often completely avoid using the built-in AA. I filed two ERs already, both are pretty isolated and not too hard to implement. I hope I don't have

Re: Accessing a field of a containing class from within a nested class

2015-04-01 Thread Charles Hixson via Digitalmars-d-learn
Yess.but there are LOTS of nodes/BTree, and each node would need to check whether the btFile was already initialized, et (ugh!) cetera. So while possible, that's an even worse answer than depending on people closing the BTree properly. I *am* going to separate the close routine from the

Re: dsq-1: open-source software synthesizer

2015-04-01 Thread Rikki Cattermole via Digitalmars-d-announce
On 2/04/2015 8:42 a.m., Joseph Rushton Wakeling wrote: On Monday, 30 March 2015 at 05:23:18 UTC, Rikki Cattermole wrote: This is a primarily a french license. It took me a good while to understand that it was compatible with e.g. MIT. Compatible in what way? Isn't CeCILL a copyleft license?

Re: Benchmark of D against other languages

2015-04-01 Thread weaselcat via Digitalmars-d
On Thursday, 2 April 2015 at 03:55:53 UTC, Martin Nowak wrote: On 04/02/2015 03:35 AM, weaselcat wrote: the benchmark pointed out two sore areas in D(AA and std.json,) would be nice to see AA get updated as I often completely avoid using the built-in AA. I filed two ERs already, both are

[Issue 14389] The (attributelist): attribute notation scope of effect

2015-04-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14389 --- Comment #3 from Ketmar Dark ket...@ketmar.no-ip.org --- or simply introduce syntax to unattribute something. this is much more useful, imo, and not breaking any existing code. by the way: class C { private: @safe: void foo() {} public:

[Issue 14389] The (attributelist): attribute notation scope of effect

2015-04-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14389 --- Comment #4 from Ketmar Dark ket...@ketmar.no-ip.org --- p.s. the funny technical note: compiler has no mention of throw or impure functions (i.e. you can't set that flags by simply changing the parser). what compiler has is three states (for

Re: extending 'import' using 'with'

2015-04-01 Thread Brad Anderson via Digitalmars-d
On Wednesday, 1 April 2015 at 10:21:46 UTC, Mike James wrote: Just a thought... How about adding the keyword 'with' to 'import' to save on typing :-) import org.eclipse.swt.widgets.Canvas, org.eclipse.swt.widgets.Composite, org.eclipse.swt.events.DisposeListener,

Template argument deduction from a function call question

2015-04-01 Thread Dzugaru via Digitalmars-d
Following recent IRC discussion. I want to write a generic list aggregate function that works with builtin types like int[] as well as custom classes/structs that define front, empty, popFront: import std.range; ElementType!S aggregate(alias func, S)(S list, ElementType!S accum =

Re: Template argument deduction from a function call question

2015-04-01 Thread Ali Çehreli via Digitalmars-d
On 04/01/2015 10:57 AM, Dzugaru wrote: ElementType!S aggregate(alias func, S)(S list, ElementType!S accum = ElementType!S.init) if(is(typeof(func(accum, accum)) == typeof(accum))) { [...] } I can't explain exactly why that doesn't work. However, I've discovered a number of times that

Re: Template argument deduction from a function call question

2015-04-01 Thread Ali Çehreli via Digitalmars-d
On 04/01/2015 11:15 AM, John Colvin wrote: Instead of using ElementType!S in the parameter list, introduce a third one (E), which you check in the template constraint: ElementType!S aggregate(alias func, S, E)(S list, E accum = E.init) if(is (E == ElementType!S)// --

Accessing a field of a containing class from within a nested class

2015-04-01 Thread Charles Hixson via Digitalmars-d-learn
The class Node is contained within the struct BTree. The field btFile is contained within the struct BTree. The statement is within a function within the Node class. I've tried many variations, here are a few: btFile.write(self.nodeId, cast(void*)(self)); results in: need 'this' for 'btFile'

Re: Benchmark of D against other languages

2015-04-01 Thread Namespace via Digitalmars-d
On Wednesday, 1 April 2015 at 08:52:06 UTC, bearophile wrote: Andrei Alexandrescu: Oh boy all classes with one-liner non-final methods. Manu must be dancing a gig right now :o). -- Andrei Yes, the right default for D language should be final, because lot of programmers are lazy and they

Re: The next iteration of scope

2015-04-01 Thread via Digitalmars-d
On Tuesday, 31 March 2015 at 20:07:19 UTC, Walter Bright wrote: Consider the code: struct Foo { C obj; } @safe void bar(C c, Foo* f) { f.obj = c; } Under the proposal, for @safe code, this would have to be written as: @safe void bar(static C c, Foo* f) ... Either that, or:

Re: C++ to D

2015-04-01 Thread Dennis Ritchie via Digitalmars-d-learn
On Wednesday, 1 April 2015 at 15:22:10 UTC, John Colvin wrote: Compile Time Function Evaluation (CTFE) is a very powerful tool to avoid having to enter in to all that C++ style mess. Yes, CTFE in D really cool. Thanks. I need to implement arithmetic (addition / subtraction) only use the type

Re: Template argument deduction from a function call question

2015-04-01 Thread John Colvin via Digitalmars-d
On Wednesday, 1 April 2015 at 17:57:12 UTC, Dzugaru wrote: Following recent IRC discussion. I want to write a generic list aggregate function that works with builtin types like int[] as well as custom classes/structs that define front, empty, popFront: import std.range; ElementType!S

Re: Template argument deduction from a function call question

2015-04-01 Thread Dzugaru via Digitalmars-d
On Wednesday, 1 April 2015 at 18:13:15 UTC, Ali Çehreli wrote: On 04/01/2015 10:57 AM, Dzugaru wrote: ElementType!S aggregate(alias func, S)(S list, ElementType!S accum = ElementType!S.init) if(is(typeof(func(accum, accum)) == typeof(accum))) { [...] } I can't explain exactly why that

Dgame RC #1

2015-04-01 Thread Namespace via Digitalmars-d-announce
Since the weekend Dgame went into the release phase: https://github.com/Dgame/Dgame/releases/tag/v0.5.0-rc.1 http://dgame-dev.de/?page=download The Website (http://dgame-dev.de/) is fully updated and should be useable on every device. Please let me know if you noticed unexpected behavior (at

Re: C++ to D

2015-04-01 Thread John Colvin via Digitalmars-d-learn
On Wednesday, 1 April 2015 at 17:03:34 UTC, Dennis Ritchie wrote: On Wednesday, 1 April 2015 at 15:22:10 UTC, John Colvin wrote: Compile Time Function Evaluation (CTFE) is a very powerful tool to avoid having to enter in to all that C++ style mess. Yes, CTFE in D really cool. Thanks. I need

Re: unittests are really part of the build, not a special run

2015-04-01 Thread Ary Borenszweig via Digitalmars-d
On Monday, 30 March 2015 at 22:20:08 UTC, Andrei Alexandrescu wrote: This is a tooling issue. I think D's built-in unittest blocks are a mistake. Yes, they are simple and for simple functions and algorithms they work pretty well. However, when you have a big complex project you start having

Re: C++ to D

2015-04-01 Thread John Colvin via Digitalmars-d-learn
On Wednesday, 1 April 2015 at 17:51:40 UTC, John Colvin wrote: On Wednesday, 1 April 2015 at 17:03:34 UTC, Dennis Ritchie wrote: On Wednesday, 1 April 2015 at 15:22:10 UTC, John Colvin wrote: Compile Time Function Evaluation (CTFE) is a very powerful tool to avoid having to enter in to all

Re: Template argument deduction from a function call question

2015-04-01 Thread John Colvin via Digitalmars-d
On Wednesday, 1 April 2015 at 18:13:15 UTC, Ali Çehreli wrote: On 04/01/2015 10:57 AM, Dzugaru wrote: ElementType!S aggregate(alias func, S)(S list, ElementType!S accum = ElementType!S.init) if(is(typeof(func(accum, accum)) == typeof(accum))) { [...] } I can't explain exactly why that

Re: Template argument deduction from a function call question

2015-04-01 Thread Dzugaru via Digitalmars-d
a) isn't this almost, if not exactly, the same as std.algorithm.reduce? b) you can write nice things like this: auto min = [2,4,1,3,5].aggregate!((a, b) = a b ? a : b)(int.max); c) the deduction failure looks like a bug to me, perhaps there is a good reason why it can't work in the

Re: Template argument deduction from a function call question

2015-04-01 Thread Ali Çehreli via Digitalmars-d
On 04/01/2015 11:27 AM, Dzugaru wrote: This code does work when you provide second (non-default) argument to function, and doesn't if you do not (no way it can deduce E solely from checks I assume). My version, in constract, works when you do not provide second argument and doesn't if you

Re: Named unittests

2015-04-01 Thread Idan Arye via Digitalmars-d
On Wednesday, 1 April 2015 at 14:05:46 UTC, Jacob Carlborg wrote: On 2015-03-31 23:14, Idan Arye wrote: Building by unittest name! Imagine - instead of placing temporary code in `main` to develop a new feature or fix a bug, you put in a named unittest and tell your IDE/build-system to only

Re: Template argument deduction from a function call question

2015-04-01 Thread John Colvin via Digitalmars-d
On Wednesday, 1 April 2015 at 18:20:41 UTC, Dzugaru wrote: a) isn't this almost, if not exactly, the same as std.algorithm.reduce? b) you can write nice things like this: auto min = [2,4,1,3,5].aggregate!((a, b) = a b ? a : b)(int.max); c) the deduction failure looks like a bug to me,

Re: Named unittests

2015-04-01 Thread Idan Arye via Digitalmars-d
On Wednesday, 1 April 2015 at 14:07:14 UTC, Jacob Carlborg wrote: On 2015-04-01 00:02, Idan Arye wrote: I think you and I work under different assumptions of the goals for this feature. If we only want unittest names to be something that can be printed when the unittest runner runs the

Re: unittests are really part of the build, not a special run

2015-04-01 Thread Kapps via Digitalmars-d
On Wednesday, 1 April 2015 at 18:04:31 UTC, Ary Borenszweig wrote: On Monday, 30 March 2015 at 22:20:08 UTC, Andrei Alexandrescu wrote: This is a tooling issue. I think D's built-in unittest blocks are a mistake. Yes, they are simple and for simple functions and algorithms they work pretty

Re: Named unittests

2015-04-01 Thread Dicebot via Digitalmars-d
On Wednesday, 1 April 2015 at 18:35:14 UTC, Idan Arye wrote: The problem is not with running the tests, it's with building them. In heavily templated libraries(like, for example Phobos), building without unittests takes seconds and building with unitetests takes minutes - mainly because the

Re: The dmd.conf rant

2015-04-01 Thread Dicebot via Digitalmars-d
The way I have set it up personally, there is a single /etc/dmd.conf for latest released package and bunch of ~/devel/dlang-X/bin folders, each with own dmd binary and own dmd.conf side by side with that dmd binary - all added to PATH. Seems to pick up the matching one depending on which

Re: ARMv7 vs x86-64: Pathfinding benchmark of C++, D, Go, Nim, Ocaml, and more.

2015-04-01 Thread Iain Buclaw via Digitalmars-d
On 1 April 2015 at 21:39, Dicebot via Digitalmars-d digitalmars-d@puremagic.com wrote: On Tuesday, 31 March 2015 at 21:49:00 UTC, Laeeth Isharc wrote: fwiw - very much appreciate your volunteer effort and that you probably have better things to do. but in case you weren't aware and did have

Re: extending 'import' using 'with'

2015-04-01 Thread ketmar via Digitalmars-d
On Wed, 01 Apr 2015 19:36:53 +, Paulo Pinto wrote: On Wednesday, 1 April 2015 at 19:04:43 UTC, ketmar wrote: On Wed, 01 Apr 2015 16:16:58 +, Paulo Pinto wrote: Actually metaprogramming is how a lot of magic happens in Java and .NET. without on-the-fly code generation that's a

Re: Accessing a field of a containing class from within a nested class

2015-04-01 Thread anonymous via Digitalmars-d-learn
On Wednesday, 1 April 2015 at 18:26:49 UTC, Charles Hixson wrote: Perhaps BTree needs to be a class? yes

Re: Maxime's micro allocation benchmark much faster ?

2015-04-01 Thread FG via Digitalmars-d-learn
On 2015-04-01 at 16:52, John Colvin wrote: On Wednesday, 1 April 2015 at 14:22:57 UTC, Laeeth Isharc wrote: On Wednesday, 1 April 2015 at 10:35:05 UTC, John Colvin wrote: On Wednesday, 1 April 2015 at 10:09:12 UTC, FG wrote: On 2015-03-31 at 22:56, Laeeth Isharc wrote: 1mm allocations 2.066:

Re: extending 'import' using 'with'

2015-04-01 Thread Jacob Carlborg via Digitalmars-d
On 2015-04-01 12:21, Mike James wrote: Just a thought... How about adding the keyword 'with' to 'import' to save on typing :-) import org.eclipse.swt.widgets.Canvas, org.eclipse.swt.widgets.Composite, org.eclipse.swt.events.DisposeListener,

Re: Accessing a field of a containing class from within a nested class

2015-04-01 Thread Charles Hixson via Digitalmars-d-learn
On 04/01/2015 11:39 AM, anonymous via Digitalmars-d-learn wrote: On Wednesday, 1 April 2015 at 18:26:49 UTC, Charles Hixson wrote: Perhaps BTree needs to be a class? yes Thanks. Sigh. I was hoping to preserve the determinate closing that one gets with a struct.

Re: unittests are really part of the build, not a special run

2015-04-01 Thread Dicebot via Digitalmars-d
P.S. I hate all the Ruby testing facilities, hate with bloody passion.

Re: extending 'import' using 'with'

2015-04-01 Thread Paulo Pinto via Digitalmars-d
On Wednesday, 1 April 2015 at 19:04:43 UTC, ketmar wrote: On Wed, 01 Apr 2015 16:16:58 +, Paulo Pinto wrote: Actually metaprogramming is how a lot of magic happens in Java and .NET. without on-the-fly code generation that's a mockery. You can generate code on the fly as well, that is a

Re: ARMv7 vs x86-64: Pathfinding benchmark of C++, D, Go, Nim, Ocaml, and more.

2015-04-01 Thread Dicebot via Digitalmars-d
On Tuesday, 31 March 2015 at 21:49:00 UTC, Laeeth Isharc wrote: fwiw - very much appreciate your volunteer effort and that you probably have better things to do. but in case you weren't aware and did have time to look: I get the same linker error for _mulodi4. gdc works. (Arch ARM).

Re: Template argument deduction from a function call question

2015-04-01 Thread Dzugaru via Digitalmars-d
On Wednesday, 1 April 2015 at 18:37:24 UTC, Ali Çehreli wrote: On 04/01/2015 11:27 AM, Dzugaru wrote: This code does work when you provide second (non-default) argument to function, and doesn't if you do not (no way it can deduce E solely from checks I assume). My version, in constract,

[Issue 14305] DMD incorrectly interprets -of and -od with -lib

2015-04-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14305 --- Comment #2 from Temtaime temta...@gmail.com --- Seems that without -lib behavior is incorrect then. --

Re: dsq-1: open-source software synthesizer

2015-04-01 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Monday, 30 March 2015 at 05:23:18 UTC, Rikki Cattermole wrote: This is a primarily a french license. It took me a good while to understand that it was compatible with e.g. MIT. Compatible in what way? Isn't CeCILL a copyleft license? (It's not 100% obvious to me whether strong or weak

Re: Accessing a field of a containing class from within a nested class

2015-04-01 Thread Gary Willoughby via Digitalmars-d-learn
On Wednesday, 1 April 2015 at 18:26:49 UTC, Charles Hixson wrote: Perhaps BTree needs to be a class? I made it a struct because I want it to definitely close properly when it goes out of scope. Maybe `scoped` can help: http://dlang.org/phobos/std_typecons.html#.scoped

Re: unittests are really part of the build, not a special run

2015-04-01 Thread ketmar via Digitalmars-d
On Wed, 01 Apr 2015 19:18:52 +, Kapps wrote: Everything you propose can be done with a custom unittest runner, using the builtin unittest blocks. Compile-time reflection + UDAs + unittests is a surprisingly powerful combination, and I don't understand the proposals to make unittest name

Re: Dgame RC #1

2015-04-01 Thread CraigDillabaugh via Digitalmars-d-announce
On Wednesday, 1 April 2015 at 18:30:01 UTC, Namespace wrote: Since the weekend Dgame went into the release phase: https://github.com/Dgame/Dgame/releases/tag/v0.5.0-rc.1 http://dgame-dev.de/?page=download The Website (http://dgame-dev.de/) is fully updated and should be useable on every

Re: Named unittests

2015-04-01 Thread Jacob Carlborg via Digitalmars-d
On 2015-04-01 20:35, Idan Arye wrote: If we could tell the compiler to only build a single, specific test the development cycle can become orders of magnitude faster. There should be a lot of option to run tests: * Base on a file * Line number * Name * Tag And so on. -- /Jacob Carlborg

Re: unittests are really part of the build, not a special run

2015-04-01 Thread Jacob Carlborg via Digitalmars-d
On 2015-04-01 20:04, Ary Borenszweig wrote: By the way, this is the way we do it in Crystal. The source code for the spec library is here, if you need some inspiration: https://github.com/manastech/crystal/tree/master/src/spec . It's just 687 lines long. Ahhh, looks like my old buddy RSpec

Re: extending 'import' using 'with'

2015-04-01 Thread ketmar via Digitalmars-d
On Wed, 01 Apr 2015 16:16:58 +, Paulo Pinto wrote: Actually metaprogramming is how a lot of magic happens in Java and .NET. without on-the-fly code generation that's a mockery. signature.asc Description: PGP signature

Re: operators in language reference

2015-04-01 Thread ketmar via Digitalmars-d
On Wed, 01 Apr 2015 15:50:19 +, Dominikus Dittes Scherkl wrote: At least a reference to another (concurrent!) language is not so good. why, C/C++ aren't a rivals. it's like telling that mongolfier (C/C++) is a rival to jet airplane (D). signature.asc Description: PGP signature

Re: unittests are really part of the build, not a special run

2015-04-01 Thread Ary Borenszweig via Digitalmars-d
On 4/1/15 3:57 PM, Jacob Carlborg wrote: On 2015-04-01 20:04, Ary Borenszweig wrote: By the way, this is the way we do it in Crystal. The source code for the spec library is here, if you need some inspiration: https://github.com/manastech/crystal/tree/master/src/spec . It's just 687 lines

Re: unittests are really part of the build, not a special run

2015-04-01 Thread Dicebot via Digitalmars-d
On Wednesday, 1 April 2015 at 18:04:31 UTC, Ary Borenszweig wrote: On Monday, 30 March 2015 at 22:20:08 UTC, Andrei Alexandrescu wrote: This is a tooling issue. I think D's built-in unittest blocks are a mistake. Yes, they are simple and for simple functions and algorithms they work pretty

Re: dsq-1: open-source software synthesizer

2015-04-01 Thread Mathias Lang via Digitalmars-d-announce
2015-04-01 13:54 GMT+02:00 Rikki Cattermole via Digitalmars-d-announce digitalmars-d-announce@puremagic.com: There are more types of abstractions than just classes vs interfaces. What goes into a module for example is a prime example of an abstraction. A purpose. Which also have it's

[Issue 14305] DMD incorrectly interprets -of and -od with -lib

2015-04-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14305 Temtaime temta...@gmail.com changed: What|Removed |Added CC||temta...@gmail.com --- Comment

Re: unittests are really part of the build, not a special run

2015-04-01 Thread Nick Sabalausky via Digitalmars-d
On 03/31/2015 05:12 PM, Atila Neves wrote: I actually thought about the whole it should fail to build if any of the unit tests fail idea 2 or 3 weeks ago, so this sounds good. WRT to the error messages and their recognition by text editors, a _massive_ improvement would be compiler-assisted

some memory allocation/GC benchmarks here - fwiw

2015-04-01 Thread Laeeth Isharc via Digitalmars-d-learn
(not translated into D yet) http://blog.mgm-tp.com/2013/12/benchmarking-g1-and-other-java-7-garbage-collectors/ http://www.mm-net.org.uk/resources/benchmarks.html http://www.ccs.neu.edu/home/will/GC/sourcecode.html http://yoda.arachsys.com/csharp/benchmark.html it's possible we already have

Re: Accessing a field of a containing class from within a nested class

2015-04-01 Thread Ali Çehreli via Digitalmars-d-learn
On 04/01/2015 11:25 AM, Charles Hixson via Digitalmars-d-learn wrote: The class Node is contained within the struct BTree. The field btFile is contained within the struct BTree. The statement is within a function within the Node class. I've tried many variations, here are a few:

Re: Benchmark of D against other languages

2015-04-01 Thread Martin Nowak via Digitalmars-d
On 04/01/2015 10:31 PM, novice2 wrote: Can DMD compiler do it itself, as one of optimizations? Even more interesting a complete blog post about devirtualization. http://hubicka.blogspot.de/2014/02/devirtualization-in-c-part-4-analyzing.html

Re: Benchmark of D against other languages

2015-04-01 Thread Martin Nowak via Digitalmars-d
On 04/01/2015 10:31 PM, novice2 wrote: Can DMD compiler do it itself, as one of optimizations? You could do it as part of LTO or whole program optimization. It requires another compiler/linker phase, so it's not easy to achieve, maybe the LDC/GDC people have LTO running? GCC5 comes with a big

Redirecting dead links on the website

2015-04-01 Thread w0rp via Digitalmars-d
Phobos documentation was restructured, and the new structure is good. However, changing the URLs for the documentation has left behind a few broken links, some of which I'm seeign in Google search results. For example, this page I just saw. http://dlang.org/library/std/traits/ValueType.html

[Issue 14305] DMD incorrectly interprets -of and -od with -lib

2015-04-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14305 --- Comment #3 from Vladimir Panteleev thecybersha...@gmail.com --- (In reply to Temtaime from comment #1) I think current behavior is correct. -od is not just for the output file, but also for intermediate files (.obj). -of should override -od for

Re: extending 'import' using 'with'

2015-04-01 Thread Russel Winder via Digitalmars-d
On Wed, 2015-04-01 at 13:35 +, ketmar via Digitalmars-d wrote: people with Java/C/C++/etc. background tend to forget about the power of metaprogramming: they have no such tool at hand, so they don't even think about it. Java metaprogramming is a real pain, so just use Groovy. (Though

[Issue 14389] New: The (attributelist): attribute notation scope of effect

2015-04-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14389 Issue ID: 14389 Summary: The (attributelist): attribute notation scope of effect Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 14389] The (attributelist): attribute notation scope of effect

2015-04-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14389 Adam D. Ruppe destructiona...@gmail.com changed: What|Removed |Added CC|

[Issue 14390] New: [REG2.068a] ICE or bad has forward references error with circular class structure

2015-04-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14390 Issue ID: 14390 Summary: [REG2.068a] ICE or bad has forward references error with circular class structure Product: D Version: D2 Hardware: All OS: All

Re: unittests are really part of the build, not a special run

2015-04-01 Thread Atila Neves via Digitalmars-d
On Wednesday, 1 April 2015 at 18:04:31 UTC, Ary Borenszweig wrote: On Monday, 30 March 2015 at 22:20:08 UTC, Andrei Alexandrescu wrote: This is a tooling issue. I think D's built-in unittest blocks are a mistake. Yes, they are simple and for simple functions and algorithms they work pretty

Re: unittests are really part of the build, not a special run

2015-04-01 Thread Atila Neves via Digitalmars-d
On Wednesday, 1 April 2015 at 19:31:37 UTC, Dicebot wrote: P.S. I hate all the Ruby testing facilities, hate with bloody passion. You're going to _love_ my DConf talk ;) I was expecting that already, you let me know what you thought of them last year! Atila

Re: Benchmark of D against other languages

2015-04-01 Thread weaselcat via Digitalmars-d
On Wednesday, 1 April 2015 at 20:31:18 UTC, novice2 wrote: I am sorry for so dumb question, but: when peoples talking about D and speed, then they always say mark method final. Can DMD compiler do it itself, as one of optimizations? afaik there's no reason the compiler couldn't infer it for

Re: ARMv7 vs x86-64: Pathfinding benchmark of C++, D, Go, Nim, Ocaml, and more.

2015-04-01 Thread Dicebot via Digitalmars-d
On Wednesday, 1 April 2015 at 20:40:02 UTC, Laeeth Isharc wrote: Experimenting on my oneplusone phone running arch (geekbench3 2.9k) and will be back in range in a week. How much RAM do you think you need? If it is just a PKGBUILD issue - any amount will do. If building ldc itself will be

Re: Benchmark of D against other languages

2015-04-01 Thread Russel Winder via Digitalmars-d
On Wed, 2015-04-01 at 07:48 -0700, Andrei Alexandrescu via Digitalmars-d wrote: Everybody compared to nobody. It's a statistics thing :o). You keep pulling me up for linguistic and logical inexactness, I feel no compunction… I trust your bit of the Alexandrescu tribe is doing well given the

Re: extending 'import' using 'with'

2015-04-01 Thread Russel Winder via Digitalmars-d
On Wed, 2015-04-01 at 19:04 +, ketmar via Digitalmars-d wrote: On Wed, 01 Apr 2015 16:16:58 +, Paulo Pinto wrote: Actually metaprogramming is how a lot of magic happens in Java and .NET. without on-the-fly code generation that's a mockery. You must not have done much JVM-based

[Issue 14389] The (attributelist): attribute notation scope of effect

2015-04-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14389 --- Comment #2 from Daniel Čejchan czda...@gmail.com --- @Adam D. Ruppe:(In reply to Adam D. Ruppe from comment #1) class C { private: @safe: void foo() {} } Should foo still be private? I think a lot of people use this pattern

Re: The next iteration of scope

2015-04-01 Thread Walter Bright via Digitalmars-d
On 4/1/2015 10:00 AM, Marc =?UTF-8?B?U2Now7x0eiI=?= schue...@gmx.net wrote: On Tuesday, 31 March 2015 at 20:07:19 UTC, Walter Bright wrote: Consider the code: struct Foo { C obj; } @safe void bar(C c, Foo* f) { f.obj = c; } Under the proposal, for @safe code, this would have to be written

Re: Benchmark of D against other languages

2015-04-01 Thread novice2 via Digitalmars-d
I am sorry for so dumb question, but: when peoples talking about D and speed, then they always say mark method final. Can DMD compiler do it itself, as one of optimizations?

Re: ARMv7 vs x86-64: Pathfinding benchmark of C++, D, Go, Nim, Ocaml, and more.

2015-04-01 Thread Laeeth Isharc via Digitalmars-d
On Wednesday, 1 April 2015 at 19:39:07 UTC, Dicebot wrote: On Tuesday, 31 March 2015 at 21:49:00 UTC, Laeeth Isharc wrote: fwiw - very much appreciate your volunteer effort and that you probably have better things to do. but in case you weren't aware and did have time to look: I get the same

Re: Benchmark of D against other languages

2015-04-01 Thread weaselcat via Digitalmars-d
On Wednesday, 1 April 2015 at 22:15:42 UTC, Martin Nowak wrote: On 04/01/2015 10:31 PM, novice2 wrote: Can DMD compiler do it itself, as one of optimizations? You could do it as part of LTO or whole program optimization. It requires another compiler/linker phase, so it's not easy to achieve,

Re: Benchmark of D against other languages

2015-04-01 Thread deadalnix via Digitalmars-d
On Wednesday, 1 April 2015 at 22:30:55 UTC, weaselcat wrote: On Wednesday, 1 April 2015 at 22:15:42 UTC, Martin Nowak wrote: On 04/01/2015 10:31 PM, novice2 wrote: Can DMD compiler do it itself, as one of optimizations? You could do it as part of LTO or whole program optimization. It

Re: Benchmark of D against other languages

2015-04-01 Thread Martin Nowak via Digitalmars-d
On 03/31/2015 08:20 PM, cym13 wrote: https://github.com/kostya/benchmarks We made a massive jump towards the upper ranks. #4 ¹ https://github.com/kostya/benchmarks/tree/master/brainfuck#user-content-benchmark-benchb #2

Re: The next iteration of scope

2015-04-01 Thread bearophile via Digitalmars-d
Walter Bright: I'm thinking of a modest step which would be a subset of your proposal: 1. implement 'scope' and 'return' for arrays, classes, and pointers 2. implement inference for templates and lambdas 3. enable it with the -dip25 switch and see how far that takes us. This is

<    1   2