Re: CTFE thoughts & functional approach

2016-02-01 Thread deadalnix via Digitalmars-d
On Sunday, 31 January 2016 at 13:59:06 UTC, Robert M. Münch wrote: I like CTFE and the meta programming idea for languages like D. However, I'm wondering why most (everyone?) is trying to do meta-programming using the same language as the one getting compiled. IMO the use-cases a pretty differ

Re: reduce -> fold?

2016-02-01 Thread Dragos Carp via Digitalmars-d
On Friday, 29 January 2016 at 20:40:18 UTC, Andrei Alexandrescu wrote: That'd be interesting if (a) lazy and (b) general a la https://dlang.org/library/std/range/recurrence.html. -- Andrei To be clear, by general you mean to allow functions with more than 2 arguments? For example if you have

Re: D vs Rust

2016-02-01 Thread bearophile via Digitalmars-d
xenon325: Doesn't http://wiki.dlang.org/DIP25 fix this ? I think DIP25 is designed to be only a partial solution, it's not a complete memory safety story. Bye, bearophile

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

2016-02-01 Thread Shachar Shemesh via Digitalmars-d
Hi all, I have a non-copyable struct with move semantics. In other words, a struct with @disable this(this), but with working overloads for the this(copy) and opAssign. Now I have an instance of that struct. I would like to be able to voluntarily give up ownership for the sake of another ins

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

2016-02-01 Thread Rikki Cattermole via Digitalmars-d
On 02/02/16 2:21 AM, Shachar Shemesh wrote: Hi all, I have a non-copyable struct with move semantics. In other words, a struct with @disable this(this), but with working overloads for the this(copy) and opAssign. Now I have an instance of that struct. I would like to be able to voluntarily give

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

2016-02-01 Thread Dicebot via Digitalmars-d
On Monday, 1 February 2016 at 13:21:02 UTC, Shachar Shemesh wrote: Hi all, I have a non-copyable struct with move semantics. In other words, a struct with @disable this(this), but with working overloads for the this(copy) and opAssign. Now I have an instance of that struct. I would like to b

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

2016-02-01 Thread Sönke Ludwig via Digitalmars-d
Am 01.02.2016 um 14:21 schrieb Shachar Shemesh: Hi all, I have a non-copyable struct with move semantics. In other words, a struct with @disable this(this), but with working overloads for the this(copy) and opAssign. Now I have an instance of that struct. I would like to be able to voluntarily

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

2016-02-01 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 1 February 2016 at 13:21:02 UTC, Shachar Shemesh wrote: q = std::move(p); I am unsure what is the correct way to do this under D. Note that C++ std::move(...) doesn't do anything related to state, it is only a type cast, so it is zero-overhead. What I have done to get semantics c

Re: D vs Rust

2016-02-01 Thread Marc Schütz via Digitalmars-d
On Monday, 1 February 2016 at 07:13:32 UTC, xenon325 wrote: On Sunday, 31 January 2016 at 16:18:21 UTC, bearophile wrote: And currently it's dead-easy to write unsafe code even in @safe D functions: int[] foo() pure @safe { int[2] a = [10, 20]; auto b = a[]; return b; } void main()

Re: What are the real advantages that D offers in multithreading?

2016-02-01 Thread Kagamin via Digitalmars-d
On Saturday, 30 January 2016 at 17:46:35 UTC, Sean Kelly wrote: Netty and NIO are an event dispatching mechanism (think libebevent) backed by a ForkJoinPool. No fibers there. Java /does/ have fibers in Quasar, though the implementation is a bit weird because the Java instruction set doesn't sup

Elm on error messages and compiler as an assistant

2016-02-01 Thread Laeeth Isharc via Digitalmars-d
http://elm-lang.org/blog/compilers-as-assistants

Re: Dwarf Exception Handling now on FreeBSD!

2016-02-01 Thread Charles via Digitalmars-d
On Monday, 1 February 2016 at 03:23:18 UTC, Walter Bright wrote: They have bits and pieces of the info, but nothing about what is actually generated to, say, catch an exception. Gotcha, is this something you'd expect to be easily obtainable (e.g. ask Microsoft Rep saying we want to make it e

Stable Partition3 Redux

2016-02-01 Thread Xinok via Digitalmars-d
I'm not sure what the convention is for resurrecting old threads but I felt it would be best to start fresh. For reference, the older thread is here: http://forum.dlang.org/thread/pyduqwmskkkoicsxi...@forum.dlang.org tl;dr - I studied a paper with the goal of implementing a stable 3-way parti

Re: GCAllocator goodAllocSize?

2016-02-01 Thread Jakob Ovrum via Digitalmars-d
On Sunday, 31 January 2016 at 18:52:48 UTC, Steven Schveighoffer wrote: 2. How does one allocate with an allocator for typed info? In other words, the GC will call the dtor, but only if it knows what type you put in there. With std.experimental.allocator, there isn't a way to do that. std.all

Re: GCAllocator goodAllocSize?

2016-02-01 Thread Jakob Ovrum via Digitalmars-d
On Tuesday, 2 February 2016 at 05:04:00 UTC, Jakob Ovrum wrote: On Sunday, 31 January 2016 at 18:52:48 UTC, Steven Schveighoffer wrote: 2. How does one allocate with an allocator for typed info? In other words, the GC will call the dtor, but only if it knows what type you put in there. With std