On Saturday, 6 October 2018 at 13:17:22 UTC, bauss wrote:
Let's say you have a range with struct, but some of the struct
are duplicates of each other.
Is there a standard function in Phobos to remove duplicates?
My first thought was "uniq", but it can't really do it like
that, but it doesn't
My use case is sending data to a socket.
One part of my program generates blocks of bytes, and the socket
part tries to send them to the socket and then removes from the
queue the number that got sent.
I am currently using a byte[] and using concatenation and slicing
to maintain the queue bu
On Monday, 8 October 2018 at 09:39:55 UTC, John Burton wrote:
My use case is sending data to a socket.
One part of my program generates blocks of bytes, and the
socket part tries to send them to the socket and then removes
from the queue the number that got sent.
[...]
Try searching for "c
On Monday, 8 October 2018 at 06:15:46 UTC, eastanon wrote:
On Monday, 8 October 2018 at 05:18:35 UTC, bauss wrote:
On Sunday, 7 October 2018 at 20:27:47 UTC, eastanon wrote:
Are there reading resources on Data structures and Algorithms
in D? There are several such books in the C/C++ and Java
w
I want to understand how calls to `new` for classes and structs
are lowered by the compiler and druntime to a GC-allocation
(specifically how the `ba`-argument bits are determined) followed
by an initialization using default constructor or via a
user-defined constructor called using arguments t
On Monday, 8 October 2018 at 11:19:40 UTC, Per Nordlöw wrote:
I want to understand how calls to `new` for classes
see _d_newclass
and structs are lowered by the compiler and druntime to a
GC-allocation (specifically how the `ba`-argument bits are
determined) followed by an initialization usi
On Monday, 8 October 2018 at 11:19:40 UTC, Per Nordlöw wrote:
And how this is related to the trait `hasElaborateConstructor`
for both `classes` and `structs`.
There's no such trait as far as I'm aware. If there were, it'd
likely be checking for the presence of a '__ctor' member. Thing
is, it
On Sunday, 7 October 2018 at 20:27:47 UTC, eastanon wrote:
Are there reading resources on Data structures and Algorithms
in D? There are several such books in the C/C++ and Java world
and many senior/experienced D users might have come across them
in C. But for people who join D after reading A
On Mon, 2018-10-08 at 11:12 +, bauss via Digitalmars-d-learn wrote:
> On Monday, 8 October 2018 at 06:15:46 UTC, eastanon wrote:
> > On Monday, 8 October 2018 at 05:18:35 UTC, bauss wrote:
> > > On Sunday, 7 October 2018 at 20:27:47 UTC, eastanon wrote:
> > > > Are there reading resources on Da
On Sunday, 7 October 2018 at 20:27:47 UTC, eastanon wrote:
Are there reading resources on Data structures and Algorithms
in D? There are several such books in the C/C++ and Java world
and many senior/experienced D users might have come across them
in C. But for people who join D after reading A
On Monday, 27 July 2015 at 20:57:00 UTC, Jack Stouffer wrote:
On Monday, 27 July 2015 at 20:12:10 UTC, John Colvin wrote:
Yes, but then core.sync.semaphore doesn't support being
shared, so...
Ok, so I made the code run by using __gshared instead of
shared. It seems really odd that a semaphore
On 09/10/2018 4:43 AM, Matt Richardson wrote:
On Monday, 27 July 2015 at 20:57:00 UTC, Jack Stouffer wrote:
On Monday, 27 July 2015 at 20:12:10 UTC, John Colvin wrote:
Yes, but then core.sync.semaphore doesn't support being shared, so...
Ok, so I made the code run by using __gshared instead o
On Monday, 8 October 2018 at 13:47:44 UTC, Russel Winder wrote:
The purpose of these books is for students to learn the
academic material, not the creation of production libraries.
Most programming language libraries have all the algorithms
coded up in the libraries. And for those algorithms th
I recently rewrote some of my threading code in cgi.d and used
the core.sync.semaphore with core.threads... never once used
shared or __gshared.
I just passed the handle of the semaphore to the new thread
constructor. All seems to work.
I'm trying to compile the example
import std.experimental.allocator.building_blocks.free_list :
FreeList;
theAllocator = allocatorObject(FreeList!8());
at https://dlang.org/phobos/std_experimental_allocator.html but
fails first because of missing import
import std.experimental.a
On Monday, 8 October 2018 at 21:50:33 UTC, Per Nordlöw wrote:
I'm trying to compile the example
import std.experimental.allocator.building_blocks.free_list
: FreeList;
theAllocator = allocatorObject(FreeList!8());
at https://dlang.org/phobos/std_experimental_allocator.html but
fails
16 matches
Mail list logo