On Wednesday, 9 September 2015 at 20:28:35 UTC, Laeeth Isharc
wrote:
so setIntersection(arg[0],arg[1],arg[2] .. arg[$-1])
except that I don't know how many series are in arg at compile
time.
what's the most efficient way to use Phobos to find these? (I
could write a loop, but I am trying
On Monday, 20 July 2015 at 00:58:20 UTC, Charles Hixson wrote:
I have DMD64 D Compiler v2.067.1 installed, and in the
documentation of phobos what it says about std.stream is don't
use it on new code. It doesn't, however, appear to offer any
replacement. Certainly std.file, std.stdio, and
OK, so there was an old bug fixed in 2.067
(https://issues.dlang.org/show_bug.cgi?id=4421) so that now
unions apparently can't contain a struct that has invariants. It
kinda makes sense, although I don't see why the invariants can be
simply ignored, as they don't have as much importance as
On Sunday, 5 July 2015 at 14:44:30 UTC, John Colvin wrote:
struct A
{
ubyte[B.sizeof] mem;
@property ref B b()
{
return *cast(B*)(mem.ptr);
}
mixin std.typecons.Proxy!b;
}
Thanks, I followed your suggestion and effectively rolled out my
own union implementation.
On Thursday, 8 January 2015 at 01:22:54 UTC, Rikki Cattermole
wrote:
Have you got opEqual's defined?
Its wanting that and toHash I think.
Yes, I have opEquals defined. I've just tried to add dummy toHash
(returning a constant), but it doesn't help :(
OK, it seems I'll have to stick with
I'm trying to compile my software with the latest compiler, and
it spits out the following error:
$ make
...
rdmd --force --build-only -IBioD -g -L-Lhtslib -L-l:libhts.a
-L-l:libphobos2.a -ofbuild/sambamba.o main.d
...
On Saturday, 13 December 2014 at 09:24:51 UTC, Paul wrote:
You are testing i against an ever-increasing limit aren't you,
so it's an infinite loop.
Read more carefully. samples is unmodified, it's m_samples whose
length is changed.
On Saturday, 13 December 2014 at 08:59:19 UTC, Jeremy DeHaan
wrote:
I'll be trying to narrow it down even more tomorrow, but I was
hoping somone here might have some insight into this weird
issue I am having.
Could you upload the code to somewhere? With only a small
snippet, it's hard to get
writefln(%(%s-%), [a, b, c]) doesn't print the intended
a-b-c but surrounds each string with double quotes - a-b-c,
which I find inconsistent with the fact that writefln(%s, a
string) prints the string without any quotes.
How do I get the desired behaviour using just the format string?
Thanks! The Ali's book is indeed superb, covering even such minor
details.
Welcome to the world of multithreading.
You have just discovered that atomic operations are performance
killers, congratulations on this.
On Sunday, 24 August 2014 at 03:14:33 UTC, ketmar via
Digitalmars-d-learn wrote:
yes. this binary includes statically linked runtime and phobos,
plus
alot of template expansions. alas, template magic is not free.
OTOH, on Linux latest LDC does far better job in eliminating dead
code than
On Sunday, 24 August 2014 at 06:20:38 UTC, ketmar via
Digitalmars-d-learn wrote:
does ldc uses shared runtime here?
No, it doesn't:
$ ldd test
linux-vdso.so.1 (0x7fffce266000)
librt.so.1 = /usr/lib/librt.so.1 (0x7fc174193000)
libdl.so.2 = /usr/lib/libdl.so.2
Did you try setvbuf method of std.stdio.File?
Use a container adequate for the task at hand, e.g. red-black
tree.
On Sunday, 16 February 2014 at 12:51:10 UTC, bearophile wrote:
If you have a limited number of small values (like 30 ints)
using a sorted array is quite efficient, and keeps low the
binary size and the pressure on the code L1 cache :-)
Yup, I admit I over-generalized.
But this sorted array
On Thursday, 13 February 2014 at 20:56:32 UTC, Frustrated wrote:
how efficient is ufcs? It seems like it would be very slow in
general and way better to manually do the code. I wonder if
anyone has done any tests?
LDC and GDC are pretty darn good at inlining these UFCS chains,
but the yielded
On Tuesday, 4 February 2014 at 11:33:40 UTC, Russel Winder wrote:
The question is how to get this run.
Pointing out obvious things, part 2: wrap it into a C function
and call that function when loading the Python module.
library.d:
...
extern (C) export void attach() { Runtime.initialize();
On Sunday, 2 February 2014 at 15:31:30 UTC, Russel Winder wrote:
result is:
| LD_LIBRARY_PATH=. python execute.py
Segmentation fault
You should call Runtime.initialize() prior to calling any other D
functions.
19 matches
Mail list logo