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
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 Friday, 5 October 2018 at 16:57:03 UTC, Seb wrote:
Yeah BUILD more or less only defines in which folder the
binaries will be stored as the default BUILD was RELEASE
historically and the real release build can take a while and
shouldn't be used by default (bad newcomer experience).
We tried t
On Friday, 5 October 2018 at 14:11:22 UTC, Per Nordlöw wrote:
Are there more DMD switches other than `BUILD=release` I need
to activate to produce the fastest possible compiler binary?
Apart for compiling it with LDC, that is.
Ahh, that wasn't so hard to find once I looked inside the correct
I just noticed that building DMD~master via
make -f posix.mak BUILD=debug
currently takes 3.2 secs while building it via
make -f posix.mak BUILD=release
takes only 3.0 secs on my Ubuntu 18.04 64-bit machine!
Are there more DMD switches other than `BUILD=release` I need to
activate to
On Tuesday, 2 October 2018 at 09:43:02 UTC, thedeemon wrote:
I guess you would want to scan the metadata without thrashing
all the pages. Keeping metadata together compactly is good for
cache.
Can you briefly elaborate on what use case(s) you hade in mind
when you wrote this?
On Tuesday, 2 October 2018 at 16:20:52 UTC, Basile B. wrote:
This works https://github.com/BBasile/druntime/pull/1. Not sure
if it will be useful.
Ahh, thanks!
I've just found my own way of iterating via a script at
https://github.com/nordlow/scripts/blob/master/dmd-own
that (re)compiles
Should a new fresh GC for D store block metadata inside the page
itself or in a (pool) structure separate from the page?
I'm already aware of Dmitry's suggestion to separate value-type
pools from pools of types possibly containing addresses.
On Monday, 1 October 2018 at 08:27:54 UTC, Basile B. wrote:
I think so. Apparently it's registered with a string, e.g
"manual" and you pass a special druntime option with your
program to select.
Actually i would be interested to make the interface with
assignable handlers since you don't seem t
On Sunday, 30 September 2018 at 19:53:02 UTC, Basile B. wrote:
this way you can very easily change-compile-test, without
recompiling the whole runtime and phobos each time.
Ok, thanks.
Is it possible to register an extra GC in a separate program by
overriding the logic in `gc.proxy` in drunti
How can I link my dmd-compiled program with a specific version of
the druntime?
I need this when experimenting with a new GC.
On Monday, 24 September 2018 at 14:31:45 UTC, Steven
Schveighoffer wrote:
It's not scanning the blocks. But it is scanning the stack.
Each time you are increasing the space it must search for a
given *target*. It also must *collect* any previous items at
the end of the scan. Note that a collec
On Monday, 24 September 2018 at 14:31:45 UTC, Steven
Schveighoffer wrote:
ever growing task. And really, this isn't that much (at the
end, you are still less than 1ms).
Compared to GCs like Go's this is an enormous latency for a
single allocation of value elements.
On Friday, 28 September 2018 at 09:14:18 UTC, Per Nordlöw wrote:
How is it possible for the GC to be 500-1000 times slower than
a malloc-free call for a single array containing just bytes
with no indirections for such a simple function!!!?
I really don't understand this...
I change the code
On Monday, 24 September 2018 at 14:31:45 UTC, Steven
Schveighoffer wrote:
Why is the overhead so big for a single allocation of an array
with elements containing no indirections (which the GC doesn't
need to scan for pointers).
It's not scanning the blocks. But it is scanning the stack.
Ok,
The code
import std.stdio;
void main(string[] args)
{
import std.datetime.stopwatch : benchmark;
import core.time : Duration;
import core.memory : GC;
immutable benchmarkCount = 1;
foreach (const i; 0 .. 10)
{
const byteCount = i*100_000_000;
const array
What effect does the scope qualifier have on a destructor such as
https://github.com/atilaneves/automem/blob/master/source/automem/vector.d#L92
and a postblit such as
https://github.com/atilaneves/automem/blob/master/source/automem/vector.d#L86
?
On Sunday, 16 September 2018 at 16:50:32 UTC, Neia Neutuladh
wrote:
On Sunday, 16 September 2018 at 16:28:20 UTC, Per Nordlöw wrote:
If I have
alias N = Nullable!(T, T nullValue)
fed as template parameter to another template how can I
at compile-time get the `nullValue` ?
import std.trai
If I have
alias N = Nullable!(T, T nullValue)
fed as template parameter to another template how can I
at compile-time get the `nullValue`
?
I need this to implement fast linear search over a slice of type
Nullable!(ulong, ulong.max)[]
searching for a non-null key without needing to
On Saturday, 1 September 2018 at 20:35:52 UTC, Per Nordlöw wrote:
On Saturday, 1 September 2018 at 19:52:14 UTC, kinke wrote:
`_Z7DtoLValP6DValue` may be suitable...
Is this a C++-symbol?
import core.demangle;
demangle("_Z7DtoLValP6DValue")
returns the same string...
It's C++.
Demangled v
On Saturday, 1 September 2018 at 19:52:14 UTC, kinke wrote:
`_Z7DtoLValP6DValue` may be suitable...
Is this a C++-symbol?
import core.demangle;
demangle("_Z7DtoLValP6DValue")
returns the same string...
per:~/Work/knet] $ dub run --compiler=ldmd2
--build=release-nobounds
The determined compiler type "ldc" doesn't match the expected
type "dmd". This will probably result in build errors.
WARNING: A deprecated branch based version specification is used
for the dependency gmp-d. Please use numbered
On Thursday, 30 August 2018 at 16:12:24 UTC, kinke wrote:
Nope, I now think this is more likely an issue with the default
config (etc/ldc2.conf). It contains a new section for
WebAssembly, which specificies `-link-internally`, which seems
to be wrongly used for non-WebAssembly too in your case.
Recently the benchmark
https://github.com/nordlow/phobos-next/tree/master/benchmarks/containers/dub.sdl
run as
dub run --compiler=ldc2 --build=release
has started to fail as
Performing "release" build using ldc2 for x86_64.
phobos-next ~master: target for configuration "library" is up to
On Friday, 24 August 2018 at 14:34:46 UTC, Per Nordlöw wrote:
On Friday, 24 August 2018 at 14:03:08 UTC, drug wrote:
imgui, but now I'm replacing it by nuklear.
Is nuklear a software project that can be found somewhere?
Ahh, I presume you mean
- https://github.com/vurtun/nuklear
- https://g
On Friday, 24 August 2018 at 14:03:08 UTC, drug wrote:
imgui, but now I'm replacing it by nuklear.
Is nuklear a software project that can be found somewhere?
Is anybody working on a D-based really fast OpenGL-based
visualization engine that supports tessellation of 2d primitives
on the GPU?
For instance, if I want to animate a huge amount of circles (in a
2d-graph) and I would like to only have to send an array of
centers and radiuses and optional
On Wednesday, 15 August 2018 at 10:38:23 UTC, Jonathan M Davis
wrote:
Would it be sane to add these to std.conv alongside existing
std.conv.to so that underlying logic in std.conv.to can be
reused?
If so, AFAICT, existing std.conv.to should be implemented on
Put something together to get ear
On Wednesday, 15 August 2018 at 09:26:26 UTC, Seb wrote:
If so, AFAICT, existing std.conv.to should be implemented on
top of std.conv.tryTo.
Well, for now you can use `ifThrown` from std.exception:
https://dlang.org/phobos/std_exception.html#ifThrown
---
"foo".to!int.ifThrown(42)
But the wh
Have anybody thought about non-throwing variants of std.conv.to
typically named `tryTo`
similar to what Folly
https://github.com/facebook/folly/blob/master/folly/docs/Conv.md#non-throwing-interfaces
does, for instance, as
tryTo(str).then([](int i) { use(i); });
?
Would it be sane to add
On Wednesday, 11 July 2018 at 04:17:49 UTC, Seb wrote:
https://github.com/dlang/druntime/pull/2249
Thanks!
On Tuesday, 10 July 2018 at 19:27:07 UTC, Steven Schveighoffer
wrote:
import etc.linux : registerMemoryErrorHandler;
Needs to be:
import etc.linux.memoryerror : registerMemoryErrorHandler;
On Tuesday, 10 July 2018 at 19:27:07 UTC, Steven Schveighoffer
wrote:
On 7/10/18 3:01 PM, Per Nordlöw wrote:
Is it possible to change run-time behaviour of null-class
dereferencing, on Linux, so that it gives some other
diagnostics than:
Program exited with code -11
Does DMD and LDC provide
Is it possible to change run-time behaviour of null-class
dereferencing, on Linux, so that it gives some other diagnostics
than:
Program exited with code -11
Does DMD and LDC provide different alternatives here?
On Thursday, 21 June 2018 at 20:15:42 UTC, Stefan Koch wrote:
To give some more context here:
CTFE is the most well tested feature in dmd.
So there is no room for sloppiness or functional differences!
As you previously mentioned the newCTFE engine works on a
completely different basis then the
On Wednesday, 20 June 2018 at 14:39:48 UTC, Per Nordlöw wrote:
Is there a way to avoid compile-time-string-concat plus mixin
here?
Using __traits(getMember, ...) should compile faster, right?
T toDefaulted(T)(scope const(char)[] value, T defaultValue) @safe
pure nothrow @nogc
if (is(T == enu
On Wednesday, 20 June 2018 at 09:54:29 UTC, Per Nordlöw wrote:
T toDefaulted(T)(scope const(char)[] value,
T defaultValue) @safe pure nothrow @nogc
if (is(T == enum))
{
switch (value)
{
static foreach (index, member; __traits(allMembers, T))
{
case
On Wednesday, 20 June 2018 at 09:37:00 UTC, Per Nordlöw wrote:
AFAICT, string-to-enum-conversion must include a switch
containing a static foreach over all the enumerators, right?
My suggestion for nothrow @nogc string-to-enum conversion with
default value
T toDefaulted(T)(scope const(char)
On Wednesday, 20 June 2018 at 09:52:04 UTC, Per Nordlöw wrote:
My suggestion for nothrow @nogc string-to-enum conversion with
default value
T toDefaulted(T)(scope const(char)[] value,
T defaultValue) @safe pure nothrow @nogc
if (is(T == enum))
{
switch (value)
{
On Wednesday, 20 June 2018 at 09:27:14 UTC, Per Nordlöw wrote:
On Monday, 18 June 2018 at 21:10:03 UTC, Steven Schveighoffer
wrote:
It just means re-doing std.conv.to, which is pretty hairy, but
also pretty well-organized.
Ok. Where in std.conv do the string-to-enum conversions take
place?
On Monday, 18 June 2018 at 21:10:03 UTC, Steven Schveighoffer
wrote:
It just means re-doing std.conv.to, which is pretty hairy, but
also pretty well-organized.
Ok. Where in std.conv do the string-to-enum conversions take
place?
I have a nothrow variant of std.conv.to defined as follows:
T toDefaulted(T, S, U)(S value, /*lazy*/ U defaultValue)
if (is(typeof(() { T r = defaultValue; }))) // TODO use
std.traits.isAssignable!(T, U) ?
{
try
{
import std.conv : to;
return value.to!T;
}
catch
The integer type in gmp-z just got export (binary serialization)
support at
https://github.com/nordlow/gmp-d/pull/8
Next up is import (binary deserialization).
What's the preferred D-style naming convention for wrapping
exporting and exporting to binary formats?
I'm thinking
Z.to!(U[])
On Wednesday, 9 May 2018 at 21:09:12 UTC, Meta wrote:
It's a context pointer to the enclosing function/object/struct.
Mark the struct as static to get rid of it.
Ok, but why an extra void* for `S.tupleof` and not for
`T.tupleof` which is also scoped inside a unittest?
On Wednesday, 9 May 2018 at 17:52:48 UTC, Meta wrote:
I wasn't able to reproduce it on dmd-nightly:
https://run.dlang.io/is/9wT8tH
What version of the compiler are you using?
Ahh, the struct needs to be in a unittest block for it to happen:
struct R
{
@disable this(this);
int* _ptr;
On Wednesday, 9 May 2018 at 14:36:38 UTC, Per Nordlöw wrote:
On Wednesday, 9 May 2018 at 14:34:02 UTC, Per Nordlöw wrote:
On Wednesday, 9 May 2018 at 14:20:41 UTC, Per Nordlöw wrote:
If so, we can temporarily modify the trait to exclude the
last `void*` member of the `S.tuple`. Given that it's
On Wednesday, 9 May 2018 at 14:34:02 UTC, Per Nordlöw wrote:
On Wednesday, 9 May 2018 at 14:20:41 UTC, Per Nordlöw wrote:
If so, we can temporarily modify the trait to exclude the last
`void*` member of the `S.tuple`. Given that it's always added
as the last member.
Also note that
pragma
On Wednesday, 9 May 2018 at 14:20:41 UTC, Per Nordlöw wrote:
If so, we can temporarily modify the trait to exclude the last
`void*` member of the `S.tuple`. Given that it's always added
as the last member.
Also note that
pragma(msg, __traits(isDisabled, S.this(this)));
fails to compile a
On Wednesday, 9 May 2018 at 14:20:41 UTC, Per Nordlöw wrote:
If so, we can temporarily modify the trait to exclude the last
`void*` member of the `S.tuple`. Given that it's always added
as the last member.
Note that `std.traits.isCopyable!S` cannot be used, because it
will return true when `S
On Wednesday, 9 May 2018 at 14:07:37 UTC, Per Nordlöw wrote:
This prevents the trait `mustAddGCRangeOfStructOrUnion` [1]
from detecting when a container with manual memory management
doesn't have to be scanned by the GC as in, for instance,
enum NoGc;
struct S
{
@disable th
Why (on earth) does
struct S
{
@disable this(this);
int* _ptr;
}
pragma(msg, typeof(S.tupleof));
prints
(int*, void*)
when
struct S
{
int* _ptr;
}
pragma(msg, typeof(S.tupleof));
prints
(int*)
?!!!
This prevents the trait `mustAddGCR
Is there a way to convert a `double` to a `string` in a `pure`
function?
I tried
@safe pure unittest
{
import std.conv : to;
const y = 3.14.to!string;
}
but it fails to compile as
`pure` function `foo.__unittest_L1_C12` cannot call impure
function `std.conv.to!string.to!double.to`
On Tuesday, 1 May 2018 at 12:03:15 UTC, ag0aep6g wrote:
By the way, you shouldn't mark toString as @trusted when `sink`
is @system.
Thanks
In which cases (if any) is it possible to make a delegate-style
implementation of toString such as
void toString(scope void delegate(const(char)[]) sink) const
@trusted pure
{
// sink("...");
// sink.formattedWrite!"..."(...);
}
pure?
I have a struct with a mixin(bitfields) containing many small
bitfields. I also have a class member in the struct.
And because I want the class member to compare by using `is` I
need to define
bool opEquals(const scope typeof(this) that) const @safe pure
nothrow @nogc
{
retu
On Wednesday, 25 April 2018 at 02:23:04 UTC, Mike Franklin wrote:
Are people using self assignment of structs as a way of
force-running the postblit? Is there a valid use case for that?
Mike
If they are, there should be a better way of force-running the
postblit.
On Tuesday, 10 April 2018 at 20:16:18 UTC, Steven Schveighoffer
wrote:
e.g. std.array.array is going to pre-allocate an array of the
correct length and fill it in, vs. appending each element as it
gets them from the range.
Personally, I would store the length because typically a
container ran
On Monday, 9 April 2018 at 13:51:47 UTC, Steven Schveighoffer
wrote:
Well, you know the type, because make returned it no? The
contract is, you call obj = make!X(args), then you have to call
dispose(obj), where obj is of the type X. That's how it knows.
If you are thinking you want to destroy
Is it possible to get the source expression sent to a lazy
function?
So that I can implement something like
show(Arg)(lazy Arg arg)
{
writeln(arg.sourceof, arg);
}
used as
show(1+2+3);
will print
1+2+3:6
On Saturday, 7 April 2018 at 07:50:37 UTC, Eduard Staniloiu wrote:
On Friday, 6 April 2018 at 21:49:37 UTC, Per Nordlöw wrote:
On Tuesday, 3 April 2018 at 09:14:28 UTC, Eduard Staniloiu
wrote:
So, say `reg` is your allocator, your workflow would be
auto obj = reg.make!Type(args);
/* do stuff *
On Tuesday, 3 April 2018 at 09:14:28 UTC, Eduard Staniloiu wrote:
So, say `reg` is your allocator, your workflow would be
auto obj = reg.make!Type(args);
/* do stuff */
reg.dispose(obj); // If Type has a __dtor, it will call
obj.__dtor
// and then reg.deallocate(obj)
If I d
Why isn't `std.conv.emplaceRef` public when `std.conv.emplace` is?
AFAICT,
emplaceRef(x, ...)
is a bit more @safe than
emplace(&x, ...)
...
On Monday, 2 April 2018 at 20:43:01 UTC, Alexandru Jercaianu
wrote:
I am not completely sure how to solve this, but maybe we can
find some clues here [1].
It seems like we should use addRoot on the buffer returned by
GC.instance.allocate to keep it alive.
Then, we can use addRange on each node a
On Monday, 2 April 2018 at 18:22:43 UTC, Steven Schveighoffer
wrote:
You may be interested in this proposal, which was inspired by
trying to implement a reserve feature for AAs (requires a
similar mechanism).
https://issues.dlang.org/show_bug.cgi?id=17881
Ok, thanks. I'll push for it.
One
As a follow-up to
https://forum.dlang.org/post/jfgpngdudtprzznrc...@forum.dlang.org
I managed to put together the benchmark
https://github.com/nordlow/phobos-next/blob/fa3526b15c746bda50a195f4e492ab2de9c15287/benchmarks/allocators/source/app.d
which run (via ldc)
dub run --build=release-nobou
On Sunday, 1 April 2018 at 10:59:55 UTC, Alexandru jercaianu
wrote:
On Saturday, 31 March 2018 at 20:17:26 UTC, Per Nordlöw wrote:
On Friday, 30 March 2018 at 23:09:33 UTC, Alexandru Jercaianu
wrote:
Hello,
You can try the following:
struct Node
{
char[64] arr;
}
enum
On Saturday, 31 March 2018 at 20:17:26 UTC, Per Nordlöw wrote:
auto reg = Region!(NullAllocator, 16)(cast(ubyte[])buf);
Thanks!
Turns out that Region allocator wasn't fully qualified:
https://github.com/dlang/phobos/pull/6400
This will make it possible to allocate with it in pure code
On Friday, 30 March 2018 at 23:09:33 UTC, Alexandru Jercaianu
wrote:
Hello,
You can try the following:
struct Node
{
char[64] arr;
}
enum numNodes = 100_000_000;
void[] buf = GCAllocator.instance.allocate(numNodes *
Node.sizeof);
auto reg = Region!(NullAlloc
On Saturday, 31 March 2018 at 19:31:37 UTC, Rubn wrote:
Be willing to change your code, the allocator can change at any
point. What you implement today may not work tomorrow, what you
fix to work for tomorrow may not end up working the next day
(in terms of releases). That really should be some
On Friday, 30 March 2018 at 20:38:35 UTC, rikki cattermole wrote:
Use a custom allocator (that could be backed by the GC) using
std.experimental.allocators :)
https://dlang.org/phobos/std_experimental_allocator.html
is massive.
I guess I should allocate my nodes using
auto node = theAllo
I'm working on a graph database with tens of millions of small
nodes containing typically around 8-64 bytes of member data. Is
there a faster way of allocating many small class objects such as
class Node
{
// abstract members
}
class StrNode : Node
{
string value;
}
// more Node-types
On Wednesday, 28 March 2018 at 01:39:40 UTC, Seb wrote:
Have a look at:
https://github.com/dlang/phobos/pull/6024
(review/feedbackon this PR is welcome!)
Exactly what I wanted. Thanks!
In use here
https://github.com/nordlow/phobos-next/blob/41b9e0dcfbb4eed6b2ee52d0465425556f14c00f/src/open_
On Wednesday, 28 March 2018 at 00:50:31 UTC, Ali Çehreli wrote:
On 03/27/2018 05:15 PM, Per Nordlöw wrote:
Is there a way to check if a struct `S` can be initialized
using zero bits only, so that we can allocate and initialize
an array of `S` in one go using `calloc`? If not, what should
such
Is there a way to check if a struct `S` can be initialized using
zero bits only, so that we can allocate and initialize an array
of `S` in one go using `calloc`? If not, what should such a trait
look like?
On Tuesday, 27 March 2018 at 22:00:42 UTC, Johan Engelen wrote:
Indeed.
Please try to manually link first (without dub) by modifying
the command on which dub errors:
```
ldmd2 -flto=thin
-of.dub/build/application-release-nobounds-lto-linux.posix-x86_64-ldc_2078-F2904BE3C4DA237C077E5C2B0B23442
On Thursday, 11 January 2018 at 12:24:36 UTC, Nordlöw wrote:
How do I check whether an aggregate member function (call for a
specific argument) is @nogc or not?
I want to check whether
Allocator.allocate(1)
(for a any Allocator) is @nogc or not?
Is
https://dlang.org/phobos/std_traits.ht
On Sunday, 12 November 2017 at 18:34:42 UTC, Eduard Staniloiu
wrote:
On Saturday, 11 November 2017 at 14:26:34 UTC, Nordlöw wrote:
Have anybody used allocators to construct class instances?
I might be wrong, but I think you are looking for
std.experimental.allocator.make [0]
[0] -
https://
On Tuesday, 24 October 2017 at 07:56:34 UTC, Biotronic wrote:
struct SuppressPostblit(T)
{
// Disguise T as a humble array.
private ubyte[T.sizeof] _payload;
...
A bit too hackish for my taste, but does the job still.
Thanks.
If I have a `struct X` (container in my case) with disabled
copying (postblit) and instead a .dup property, is it somehow
possible, unsafe or not, to have `X` as a member of another
`struct Y` with an enabled copy constructor which calls `X.dup`?
On Thursday, 19 October 2017 at 08:47:09 UTC, Per Nordlöw wrote:
These are all very performant containers, but currently lack
support for std.experimental.allocator.
Support for std.experimental.allocator is planned but currently
not a priority. EMSI-containers have an elegant integration and
On Thursday, 19 October 2017 at 08:47:09 UTC, Per Nordlöw wrote:
explicit via .dup member and when you want to copy or pass by
should be:
explicit via .dup member and when you want to _move_ from one
l-value to another l-value or pass by move
On Thursday, 19 October 2017 at 08:47:09 UTC, Per Nordlöw wrote:
The file hashmap.d provides both a HashSet and HashMap
implementation in one go using D's
compile-time-code-branching-mechanism `static if`.
Correction:
I've now broken it up into
-
https://github.com/nordlow/phobos-next/blob/
On Tuesday, 17 October 2017 at 14:14:19 UTC, Ivan wrote:
Hi,
I am a C/C++ programmer interested in using D as a replacement
for C/C++.
I do care a lot about performance and memory management, so
I want to use my own (or from std.experimental) memory
allocators.
Are there any good tutorials o
On Wednesday, 18 October 2017 at 09:01:30 UTC, Per Nordlöw wrote:
Creates an actor (goroutine, whatever), which spawns 10 new
actors, each of them spawns 10 more actors, etc. until one
million actors are created on the final level. Then, each of
them returns back its ordinal number (from 0 to 9
On Wednesday, 18 October 2017 at 10:36:41 UTC, Per Nordlöw wrote:
Yeah I've thought of that.
I still would like to have it built-in to the compiler.
Would such a change cause any serious breakage?
On Wednesday, 18 October 2017 at 10:17:38 UTC, Biotronic wrote:
Make them templates, that should solve the problem:
struct S(T) {
void foo()() {
compileerror;
}
}
Yeah I've thought of that.
I still would like to have it built-in to the compiler.
Are there any nearby plans to make more template instantiations
(especially aggregate members) lazy in DMD?
Are there any specific obstacles against doing that or has it
just not been prioritized?
I'm curious about Fiber/coroutine performance in D compared to
other languages such as Rust.
How should the following test be implemented in D?
Creates an actor (goroutine, whatever), which spawns 10 new
actors, each of them spawns 10 more actors, etc. until one
million actors are created on
On Monday, 2 October 2017 at 18:14:24 UTC, Jacob Carlborg wrote:
On 2017-10-02 17:57, Nordlöw wrote:
Is implementing opCall(size_t) for structures such as array
containers that already define opIndex and opSlice deprecated?
I can't find any documentation on the subject on when opCall
should b
On Tuesday, 12 September 2017 at 06:23:57 UTC, Jacob Carlborg
wrote:
It looks like the length needs to come first [1]. I think it
would be technically possible if you flipped the parameters but
you would become dependent on the ABI as well. I would
recommend a wrapper instead.
[1] https://dla
On Tuesday, 5 September 2017 at 15:43:02 UTC, Per Nordlöw wrote:
If a character literal has type char, always below 128, can we
always search for it's first byte offset in a string without
decoding the string to a range of dchars?
Follow up question: If a character literal has type char, can w
If a character literal has type char, always below 128, can we
always search for it's first byte offset in a string without
decoding the string to a range of dchars?
On Thursday, 31 August 2017 at 15:55:26 UTC, Stefan Koch wrote:
On Thursday, 31 August 2017 at 15:43:05 UTC, Per Nordlöw wrote:
Which allocator is best suited for allocating tree nodes (all
of equal size around 40-60 bytes in size) in one shot and then
delete them all in one go? My use case is
Which allocator is best suited for allocating tree nodes (all of
equal size around 40-60 bytes in size) in one shot and then
delete them all in one go? My use case is parse trees.
Is it recommended to cast an unaliased array to `immutable` after
it has been initialized?
The reason for asking is that I would like the following function
void[] rawReadNullTerminated(string path)
@safe
{
import std.stdio : File;
auto file = File(path, `rb`);
import std.array
Have anybody constructed an idiomatic D wrapper for FFTW?
http://www.fftw.org/fftw3_doc/Tutorial.html#Tutorial
I'm specifically concerned about
- `RefCounted`-wrapping of the C structures `fftw_complex` and
`fftw_plan`
- range semantics, lazy evaluation and caching of result in
stream-based
On Wednesday, 17 May 2017 at 19:56:52 UTC, Per Nordlöw wrote:
On Tuesday, 16 May 2017 at 10:57:08 UTC, FreeSlave wrote:
Not sure about renaming but copying is not atomic on Posix
because it does not handle interruption by signal. I opened
issue about that https://issues.dlang.org/show_bug.cgi
On Tuesday, 16 May 2017 at 10:57:08 UTC, FreeSlave wrote:
Not sure about renaming but copying is not atomic on Posix
because it does not handle interruption by signal. I opened
issue about that https://issues.dlang.org/show_bug.cgi?id=17296
The standard way is to copy the source to a tempora
On Monday, 15 May 2017 at 07:31:25 UTC, Nordlöw wrote:
On Monday, 15 May 2017 at 06:50:04 UTC, Nicholas Wilson wrote:
Yes, https://maikklein.github.io/post/soa-d/
Ok, great. Thanks.
I can't seem to find any Github code repo, tough. Does it exist?
Here's my fixed version of soa-d that doesn'
On Sunday, 30 April 2017 at 13:22:49 UTC, Stefan Koch wrote:
On Sunday, 30 April 2017 at 11:02:52 UTC, Nordlöw wrote:
Have anybody found a way to do transitive packing of bitfields?
For instance, in
import std.bitmanip : bitfields;
struct X
{
// one bit too many to fit in one byte
mi
301 - 400 of 418 matches
Mail list logo