It's a design mistake, but there's a fold function
replacement for reduce that has the right order of arguments. I
don't know why fold isn't in Phobos yet.
https://github.com/D-Programming-Language/phobos/pull/1955
https://issues.dlang.org/show_bug.cgi?id=10670
Bye,
bearophile
On Monday, 5 January 2015 at 02:12:21 UTC, Ary Borenszweig wrote:
For the second, the compiler can tell that if you don't assign
anything more to it then it's immutable. So I'm not sure the
second one is true.
I'm inclined to believe there's some benefit to explicitly using
immutable as
H. S. Teoh via Digitalmars-d wrote in message
news:mailman.4136.1420439089.9932.digitalmar...@puremagic.com...
struct S
{
int a;
S(int a)
{
a = a;
}
};
I actually hit this bug in D. :-/
I like that I can just not define a constructor in D structs and it will
weaselcat wrote in message news:nopttywdkgouyxnlr...@forum.dlang.org...
I'm inclined to believe there's some benefit to explicitly using immutable
as Walter has written about it more than once, and it's in D's own
documentation.
While I'm sure the compiler can infer immutability, it probably
On 1/4/2015 5:33 PM, weaselcat wrote:
just realized I forgot the -release flag on ldmd, sped it up past clang and
within ~40ms of C++ with gcc.
gdc and dmd still woefully slow with functional version.
You can also find dramatic differences in C++ performance from one C++ compiler
to another.
weaselcat:
Why does reduce! take the seed as its first parameter btw? It
sort of messes up function chaining.
It's a design mistake, but there's a fold function replacement
for reduce that has the right order of arguments. I don't know
why fold isn't in Phobos yet.
Bye,
bearophile
H. S. Teoh:
When are we going to fix this?
Soon.
Bye,
bearophile
On Monday, 5 January 2015 at 01:21:07 UTC, Vlad Levenfeld wrote:
Could you elaborate on the difference between D's
templates/mixins and Nim's macros/type classes?
I'd suggest you read the available documentation on each feature;
for example Nim's user defined type classes are described here
On Mon, Jan 05, 2015 at 05:18:36PM +1100, Daniel Murphy via Digitalmars-d wrote:
Ary Borenszweig wrote in message news:m8d6g5$hna$1...@digitalmars.com...
Are there proofs of percentage of bugs caused by incorrectly mutating
variables that were supposed to be immutable? I don't remember
Hi all,
i'll like to share my project for building the bindings for QML
in both D and Nim programming languages.
The project is young and it's not complete, however at the
current state slots, signals and properties can be exposed to QML
from D. So a pure databound application can be created
On 23 December 2014 at 07:28, Dicebot via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On Tuesday, 23 December 2014 at 07:21:20 UTC, Iain Buclaw via Digitalmars-d
wrote:
Maybe you could set up a qemu-arm chroot?
Probably I should. Didn't bother originally because ARM support is not part
On Sunday, 21 December 2014 at 09:48:24 UTC, Dicebot wrote:
On Saturday, 20 December 2014 at 21:47:24 UTC, Walter Bright
wrote:
I did notice this:
I updated the ldc D compiler earlier today (incidentally, as
part of upgrading my system with pacman -Syu), and now it
doesn't compile at all. It
On 22 December 2014 at 11:45, logicchains via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On Sunday, 21 December 2014 at 09:48:24 UTC, Dicebot wrote:
On Saturday, 20 December 2014 at 21:47:24 UTC, Walter Bright wrote:
I did notice this:
I updated the ldc D compiler earlier today
On Monday, 22 December 2014 at 12:43:19 UTC, Iain Buclaw via
Digitalmars-d wrote:
On 22 December 2014 at 11:45, logicchains via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On Sunday, 21 December 2014 at 09:48:24 UTC, Dicebot wrote:
On Saturday, 20 December 2014 at 21:47:24 UTC, Walter
On Monday, 22 December 2014 at 12:43:19 UTC, Iain Buclaw via
Digitalmars-d wrote:
On 22 December 2014 at 11:45, logicchains via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On Sunday, 21 December 2014 at 09:48:24 UTC, Dicebot wrote:
On Saturday, 20 December 2014 at 21:47:24 UTC, Walter
On 22 December 2014 at 13:45, via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On Monday, 22 December 2014 at 12:43:19 UTC, Iain Buclaw via
Digitalmars-d wrote:
On 22 December 2014 at 11:45, logicchains via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On Sunday, 21 December 2014 at
On 22 December 2014 at 17:01, Iain Buclaw ibuc...@gdcproject.org wrote:
On 22 December 2014 at 13:45, via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On Monday, 22 December 2014 at 12:43:19 UTC, Iain Buclaw via
Digitalmars-d wrote:
On 22 December 2014 at 11:45, logicchains via
On Monday, 22 December 2014 at 11:45:55 UTC, logicchains wrote:
I installed the new Arch Linux LDC package but it still fails
with the same error: /usr/lib/libldruntime.so: undefined
reference to `__mulodi4'
I did get GDC to work on ARM, but for some reason the resulting
executable is
On 23 Dec 2014 07:15, Dicebot via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On Monday, 22 December 2014 at 11:45:55 UTC, logicchains wrote:
I installed the new Arch Linux LDC package but it still fails with the
same error: /usr/lib/libldruntime.so: undefined reference to `__mulodi4'
On Tuesday, 23 December 2014 at 07:21:20 UTC, Iain Buclaw via
Digitalmars-d wrote:
Maybe you could set up a qemu-arm chroot?
Probably I should. Didn't bother originally because ARM support
is not part of Arch Linux upstream - it is separate project with
own packaging infrastructure, they
On Saturday, 20 December 2014 at 21:47:24 UTC, Walter Bright
wrote:
I did notice this:
I updated the ldc D compiler earlier today (incidentally, as
part of upgrading my system with pacman -Syu), and now it
doesn't compile at all. It was previously compiling, and ran at
around 90% the speed
https://www.reddit.com/r/programming/comments/2pvf68/armv7_vs_x8664_pathfinding_benchmark_of_c_d_go/
Please take a look at this and ensure that the benchmark code is using D
correctly.
I did notice this:
I updated the ldc D compiler earlier today (incidentally, as part of upgrading
my system
On Saturday, 20 December 2014 at 21:47:24 UTC, Walter Bright
wrote:
https://www.reddit.com/r/programming/comments/2pvf68/armv7_vs_x8664_pathfinding_benchmark_of_c_d_go/
Please take a look at this and ensure that the benchmark code
is using D correctly...
There is already a topic about this:
MattCoder:
There is already a topic about this:
http://forum.dlang.org/thread/agevpeanzbpbtcjgx...@forum.dlang.org
Matheus.
And perhaps even a bug report of mine:
http://forum.dlang.org/thread/zpjjzbkwlisjemoxu...@forum.dlang.org?page=5#post-izyhysusezbidhqdncan:40forum.dlang.org
Bye,
On 12/20/2014 2:39 PM, bearophile wrote:
MattCoder:
There is already a topic about this:
http://forum.dlang.org/thread/agevpeanzbpbtcjgx...@forum.dlang.org
Matheus.
And perhaps even a bug report of mine:
Walter Bright:
Bug reports go into bugzilla. Reporting them in the n.g. means
they'll likely get ignored.
I'll take care of not letting it get ignored :-)
Bye,
bearophile
301 - 326 of 326 matches
Mail list logo