On Tuesday, 10 May 2016 at 04:48:23 UTC, Jeremy DeHaan wrote:
I went to build DMD on Windows for the first time tonight and I
have to say that it was a terrible experience when compared
with Linux.
First issue I ran into was having HOST_DC not being set. I'm
not sure if the DMD installer is
On Tuesday, 10 May 2016 at 09:57:11 UTC, pineapple wrote:
On Monday, 9 May 2016 at 18:56:15 UTC, Peter Häggman wrote:
No problem here (tested with everything in a single module). I
can't help more.
Front end version ?
Well, this is the full struct that has those malfeasant
overrides:
Am 10.05.2016 um 21:43 schrieb Lodovico Giaretta:
alias Node(T) = RefCounted!(_Node!T);
struct _Node(T)
{
Node!T parent; // error: recursive template expansion
}
I think this is expected. Can't have cycles like that in template
instantiations.
Am 10.05.2016 um 21:43 schrieb Lodovico Giaretta:
import std.typecons: RefCounted;
struct S
{
RefCounted!S s; // error: struct S no size yet for forward reference
}
This used to work with 2.067. I've filed a phobos regression for this
very code, and two related dmd issues with different
Hi,
I'm trying to use std.typecons.RefCounted on recursive structures
to emulate garbage-collected classes, but it doesn't work,
because the RefCounted implementation ends up creating a cycle in
the structure hierarchy.
import std.typecons: RefCounted;
struct S
{
RefCounted!S s; //
On Tuesday, 10 May 2016 at 09:39:53 UTC, chmike wrote:
Is there an equivalent in D of the C++11 std.bind template class
See http://dlang.org/phobos/std_functional.html#partial
Salut Christophe,
Did you have a look at
https://dlang.org/phobos/std_functional.html#partial ?
On Tuesday, 10 May 2016 at 15:18:50 UTC, ZombineDev wrote:
On Tuesday, 10 May 2016 at 10:21:30 UTC, ZombineDev wrote:
(You can try it at: https://dpaste.dzfl.pl/c0327f067fca)
import std.array : array;
import std.experimental.ndslice : byElement, indexSlice, sliced;
import std.range : iota,
On Tuesday, 10 May 2016 at 15:33:03 UTC, chmike wrote:
Thanks. This does the job but it's not as concise.
I've never missed C++'s bind functionality because D has first
class support for delegates.
If async_task is changed to the following:
void async_task(void delegate(int error) cb) { .
Thanks. This does the job but it's not as concise.
On Monday, 9 May 2016 at 18:50:32 UTC, Jay Norwood wrote:
I noticed some discussion of Cartesian indexes in Julia, where
the index is a tuple, along with some discussion of optimizing
the index created for cache efficiency. I could find
foreach(ref val, m.byElement()), but didn't find an
On Tuesday, 10 May 2016 at 10:21:30 UTC, ZombineDev wrote:
On Monday, 9 May 2016 at 18:50:32 UTC, Jay Norwood wrote:
I noticed some discussion of Cartesian indexes in Julia, where
the index is a tuple, along with some discussion of optimizing
the index created for cache efficiency. I could
On Tuesday, 10 May 2016 at 13:52:27 UTC, ag0aep6g wrote:
Am 10.05.2016 um 12:21 schrieb ZombineDev:
auto indexed_range = lockstep(
Tiny nitpick: lockstep doesn't return a range. It uses opApply
to support foreach.
Yes I know and I chose it in purpose, because it allows ref
access to
On Tuesday, 10 May 2016 at 13:34:36 UTC, chmike wrote:
My initial question is if there is a working group I could join
to work on this pure D async library. I'm interested in working
on the subject.
Considering libasync is only native D async library supported by
vibe.d right now, focusing
On 11/05/2016 1:34 AM, chmike wrote:
vibed uses libevent, a C library.
The discussion is regarding a possible pure D equivalent of libevent.
libasync is an interesting proposal but it is apparently slower than
libevent. I don't know the current status because vibed improved its
performance in
Am 10.05.2016 um 12:21 schrieb ZombineDev:
auto indexed_range = lockstep(
Tiny nitpick: lockstep doesn't return a range. It uses opApply to
support foreach.
vibed uses libevent, a C library.
The discussion is regarding a possible pure D equivalent of
libevent.
libasync is an interesting proposal but it is apparently slower
than libevent. I don't know the current status because vibed
improved its performance in the last months.
My initial
On Monday, 9 May 2016 at 22:33:37 UTC, John Colvin wrote:
There are lots of ways to approach this. Here's one possibility:
auto cars(Bar bar)
{
static struct Res
{
Bar bar;
Car opIndex(size_t i)
{
return /* e.g. getCar(bar, i); */
}
}
On Monday, 9 May 2016 at 18:50:32 UTC, Jay Norwood wrote:
I noticed some discussion of Cartesian indexes in Julia, where
the index is a tuple, along with some discussion of optimizing
the index created for cache efficiency. I could find
foreach(ref val, m.byElement()), but didn't find an
On Tuesday, 10 May 2016 at 09:58:38 UTC, ZombineDev wrote:
On Monday, 9 May 2016 at 09:14:31 UTC, chmike wrote:
[...]
Have you looked at http://vibed.org? It is the most successful
D library for async IO and it has several backends (some C and
some D). It also provides a high-level web
On Monday, 9 May 2016 at 18:56:15 UTC, Peter Häggman wrote:
No problem here (tested with everything in a single module). I
can't help more.
Front end version ?
Well, this is the full struct that has those malfeasant
overrides: http://pastebin.com/9h2s028J
On Monday, 9 May 2016 at 09:14:31 UTC, chmike wrote:
It seam that the scope of the event loop we are talking should
be clarified to avoid confusions.
There is the GUI event loop which is generally single threaded
for efficient access to the data structure representing the GUI
content. Single
I know this really isn't what you want, but it may help you:
void doFunc(int a, int b, string text) {
import std.stdio : writeln;
writeln(text, ": ", a, " <> ", b);
}
void receiver(void delegate(string text) del) {
del("Hey");
}
void main() {
struct
Is there an equivalent in D of the C++11 std.bind template class
[http://en.cppreference.com/w/cpp/utility/functional/bind] ?
Here is a blog post showing different examples of its use
https://oopscenities.net/2012/02/24/c11-stdfunction-and-stdbind/
A possible use case is for a callback
24 matches
Mail list logo