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
On Friday, 6 April 2018 at 12:26:36 UTC, Mike Parker wrote:
Congratulations to Zach Tollen and everyone who worked on DIP
1009. It took a painful amount of time to get it through the
process, but it had finally come out of the other side with an
approval. The proposal itself was approved early
Why isn't `std.conv.emplaceRef` public when `std.conv.emplace` is?
AFAICT,
emplaceRef(x, ...)
is a bit more @safe than
emplace(, ...)
...
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
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
On Wednesday, 28 March 2018 at 06:43:15 UTC, Shachar Shemesh
wrote:
https://github.com/dlang/DIPs/pull/109
I submitted it 12 days ago. So far, except for two thumbs up, I
got no official reaction of any kind for it.
I did get an unofficial list of suggestions from Andrei, which
I have now
On Sunday, 1 April 2018 at 18:32:00 UTC, Stefan Koch wrote:
On Sunday, 1 April 2018 at 16:48:32 UTC, Per Nordlöw wrote:
[...]
Oh I was not aware people would try this :)
I have fixed the build please pull.
Thanks!
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;
}
On Friday, 30 March 2018 at 20:46:32 UTC, Stefan Koch wrote:
85 to 90% maybe.
I expect that there will many bugs which were hidden by newCTFE
not supporting classes, which will now be out in the open and
have to be dealt with.
Also the code is in need of cleanup before I would release it
for
On Sunday, 1 April 2018 at 01:56:40 UTC, Jonathan M Davis wrote:
Another potential issue is whether any of this does or should
relate to
https://github.com/dlang/DIPs/pull/109
and it's solution for hooking into to moves. I'm not at all
sure that what happens with that needs to be related to
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 =
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
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 =
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
On Friday, 30 March 2018 at 19:48:02 UTC, Stefan Koch wrote:
Have a nice easter.
Stefan
Great, then there's hope.
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
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
On Tuesday, 27 March 2018 at 08:41:41 UTC, bauss wrote:
Perhaps
https://dlang.org/phobos/std_datetime_stopwatch.html#benchmark ?
That fulfils neither of my two requirements mentioned in above;
it requires explicit iteration count given by the caller and no
automatic printing of results.
Have anybody implemented anything near the expressiveness and
ease of use of Rust's builtin benchmarking features
https://doc.rust-lang.org/1.16.0/book/benchmark-tests.html
I'm mostly interested in completely automatic printing of results
such as
test tests::bench_add_two ... bench:
On Monday, 26 March 2018 at 22:13:02 UTC, Johan Engelen wrote:
On Monday, 26 March 2018 at 22:07:49 UTC, Nordlöw wrote:
When I try build my application using LDC and -flto=thin it
fails in the final linking
You must also pass `-flto=thin` during linking (a special
plugin is needed for LTO,
When I try build my application using LDC and -flto=thin it fails
in the final linking as
ldmd2
-of.dub/build/application-release-nobounds-lto-linux.posix-x86_64-ldc_2078-9FDE475789CA2E324E9DAE6A959C2B7F/knetquery
On Monday, 26 March 2018 at 21:11:12 UTC, jmh530 wrote:
Is each optimization level `x` in `-Ox` defined in the same
way for clang and ldc? If so, where's the best documentation
for it?
https://wiki.dlang.org/Using_LDC
Thx!
On Monday, 26 March 2018 at 16:02:30 UTC, Rene Zwanenburg wrote:
On Sunday, 25 March 2018 at 22:09:43 UTC, Nordlöw wrote:
eventhough I compile with -release -inline -nobounds flags.
Just to make sure: are you passing -O as well?
Yes I am, thanks, via the dub spec
buildType
On Monday, 26 March 2018 at 10:57:28 UTC, Seb wrote:
It doesn't add -noboundscheck by default.
Typically the Makefiles allow passing an initial DFLAG
variable, but that one doesn't seem to allow it, so I just
submitted a PR to do so
(https://github.com/dlang/dmd/pull/8089).
With this PR you
On Sunday, 25 March 2018 at 20:35:01 UTC, Seb wrote:
For building everything locally, it should be as easy as:
---
git clone https://github.com/dlang/dmd
git clone https://github.com/dlang/druntime
git clone https://github.com/dlang/phobos
cd phobos && make -f posix.mak -j10
How do I build a
On Sunday, 25 March 2018 at 22:30:50 UTC, kinke wrote:
void foo()
{
version(LDC) pragma(inline, true); // affects foo()
...
}
Wonderful, thanks!
Is there a way to make ldc do more aggressive inlining other than
pragma(inline, true)
?
Reason for asking is that
https://github.com/nordlow/phobos-next/blob/master/src/open_hashmap_or_hashset.d
achieves much better performance when I qualify some inner loop
functions with
On Sunday, 25 March 2018 at 18:43:09 UTC, Seb wrote:
Are you on a 32-bit system?
(For 64-bit -fPIC is the default since 2.072.2 - though DMD's
build scripts were only updated a few releases later)
No, I have my own build script for dmd, though because I can't
get Digger to work either.
If my homebuilt dmd fails to build my dub project with message
/usr/bin/ld: error:
.dub/build/application-unittest-linux.posix-x86_64-dmd_2079-C9019ECA621321CC168B385F53D82831/knetquery.o: requires dynamic R_X86_64_32 reloc against '_D6object9Throwable7__ClassZ' which may overflow at runtime;
On Thursday, 22 March 2018 at 14:58:56 UTC, Seb wrote:
For reference and completeness, a simple example:
```d
void main()
{
enum isDIP1000 = __traits(compiles, () @safe {
int x;
int* p;
p =
});
pragma(msg, isDIP1000);
}
```
normal:
On Thursday, 22 March 2018 at 11:16:37 UTC, Atila Neves wrote:
I wonder how they concluded that.
Atila
I too.
Is there a way to check in code whether a specific flag, -dip1000
in my case, was passed to the compiler?
On Tuesday, 13 March 2018 at 03:37:36 UTC, 9il wrote:
I have a lot of work for next months, but looking for a good
opportunity to make Mat happen.
Sounds great. In which repo will these changes happen?
Given an uninitialized (undefined content from, for instance,
malloc) value `x` of type `T`, when is it @safe to initalize `x`
with a simple assignment such as
x = y
in contrast to
emplace(, y);
?
My current guess is when
hasElaborateCopyConstructor!T
is `false`. Is this
On Friday, 16 March 2018 at 20:39:33 UTC, Andrei Alexandrescu
wrote:
My knee-jerk reaction is that's a rather peculiar primitive to
add to the standard library. -- Andrei
I'm needing it for variadic equal...I'll put it as a private
member in `equal`s template declaration for now.
Shouldn't `pureMalloc` at
https://dlang.org/library/core/memory/pure_malloc.html
be @system instead of @trusted?
Because it returns uninitialized memory just like
T x = void;
does, which is not allowed in @safe code.
On Saturday, 10 March 2018 at 21:31:41 UTC, ag0aep6g wrote:
auto forwardMap(alias fun, Ts ...)(Ts things)
{
import std.meta: aliasSeqOf, staticMap;
import std.range: iota;
import std.typecons: Tuple;
alias NewType(size_t i) = typeof(fun(things[i]));
alias NewTypes =
On Friday, 16 March 2018 at 17:41:22 UTC, H. S. Teoh wrote:
Given a forward range r, I want to test whether it has exactly
n elements that satisfy some given predicate pred. Is it
possible to do this using current Phobos algorithms such that
it does not traverse more members of the range than
On Saturday, 10 March 2018 at 21:31:41 UTC, ag0aep6g wrote:
Not tested beyond `f(1, 2.3, "foo")`:
auto forwardMap(alias fun, Ts ...)(Ts things)
{
import std.meta: aliasSeqOf, staticMap;
import std.range: iota;
import std.typecons: Tuple;
alias NewType(size_t i) =
On Friday, 16 March 2018 at 16:01:18 UTC, Steven Schveighoffer
wrote:
https://dlang.org/deprecate.html
Thanks!
Is there a list of language deprecations?
I want to show my codings fellows how strong and modern D's view
on deprecations are.
On Wednesday, 14 March 2018 at 21:22:01 UTC, Timothee Cour wrote:
would a PR for `dmd -unittest= (same syntax as -i)` be
welcome?
wouldn't that avoid all the complicatiosn with
version(StdUnittest) ?
eg use case:
# compile with unittests just for package foo (excluding
subpackage foo.bar)
On Tuesday, 13 March 2018 at 15:12:02 UTC, Nordlöw wrote:
Can I use address sanitizer (ASan) in LDC 1.8 to find use of
uninitialized memory in, in my case, a set of containers,
currently
https://github.com/nordlow/phobos-next/blob/master/src/open_hashmap_or_hashset.d
If so, what arguments
Can I use address sanitizer (ASan) in LDC 1.8 to find use of
uninitialized memory in, in my case, a set of containers,
currently
https://github.com/nordlow/phobos-next/blob/master/src/open_hashmap_or_hashset.d
If so, what arguments should I feed to ldc2's
-fsanitize=
If I have a function
bool f(Rs...)(Rs rs)
is it somehow possible to map and forward all its arguments `rs`
to another function
bool g(Rs...)(Rs rs);
through a call to some map-and-forward-like-function `forwardMap`
in something like
bool f(Rs...)(Rs rs)
{
alias
On Saturday, 10 March 2018 at 18:26:48 UTC, Simen Kjærås wrote:
Is there a way to break the `static foreach` loop prematurely
as quickly as `allSameTypeIterative` becomes false?
Sure:
@property
bool allSameTypeIterative(V...)()
//if (allSatisfy!(isType, V))
{
foreach (Vi; V)
if
On Saturday, 10 March 2018 at 13:30:18 UTC, Nordlöw wrote:
On Saturday, 10 March 2018 at 09:47:55 UTC, Nordlöw wrote:
Now that we have `static foreach` I just realized we can
start...
My recent definition now looks like
template allSameTypeIterative(V...)
// TODO restrict `V` to types only
{
On Saturday, 10 March 2018 at 09:47:55 UTC, Nordlöw wrote:
Now that we have `static foreach` I just realized we can
start...
My recent definition now looks like
template allSameTypeIterative(V...)
// TODO restrict `V` to types only
{
static if (V.length <= 1)
{
enum
On Saturday, 10 March 2018 at 08:49:19 UTC, Nordlöw wrote:
How do I most conveniently merge these into one single
`allSame` that can operate on mixtures of values and types?
I found the privately defined `isSame` in std.meta that does this.
On Saturday, 10 March 2018 at 00:09:18 UTC, Adam D. Ruppe wrote:
Looking for http libs? Behold:
http://search.dpldocs.info/?q=http
Nice!
On Saturday, 10 March 2018 at 09:47:55 UTC, Nordlöw wrote:
static if (V[0] != Vi)
{
enum allSameIterative = false;
}
Perhaps even better to do
static if (!is(typeof(allSameIterative) == bool) &&
// not yet defined
Now that we have `static foreach` I just realized we can start
making recursive implementations of traits such as
template allSame(V...)
if (isExpressions!V)
{
static if (V.length <= 1)
{
enum allSame = true;
}
else static if (V.length & 1) // odd count
{
On Friday, 9 March 2018 at 22:13:39 UTC, Simen Kjærås wrote:
static if (allEqual!(staticMap!(ElementEncodingType, Rs)))
{
// compare Rs byCodeUnit
}
NoDuplicates!V.length == 1
BTW, `NoDuplicates` can handle both types and values (mixed)
opposite to my `allSame` and `allSameType` defined
On Friday, 9 March 2018 at 19:24:03 UTC, Nordlöw wrote:
I'm looking for a function (that probably should be placed in
std.meta) named something like `areEqual` that checks whether
all it's arguments are equal or not.
Is there such as function already in Phobos?
My usage is
static if
I'm looking for a function (that probably should be placed in
std.meta) named something like `areEqual` that checks whether all
it's arguments are equal or not.
Is there such as function already in Phobos?
My usage is
static if (allEqual!(staticMap!(ElementEncodingType, Rs)))
{
//
Is using
https://dlang.org/changelog/2.079.0.html#default_after_variadic
for instance as
void show(Args...)(Args args,
string file = __FILE__,
uint line = __LINE__,
string fun = __FUNCTION__)
if (Args.length >= 1)
{
...
}
On Monday, 5 March 2018 at 16:07:49 UTC, Steven Schveighoffer
wrote:
No, I mean you call holeKey at *runtime*. Inlined, it's just
returning a constant, so it should reduce to a constant.
A compile-time constant visible to the optimizer?
On Monday, 5 March 2018 at 12:41:06 UTC, Steven Schveighoffer
wrote:
pragma(inline, true)
C lazyDeleted() pure nothrow @trusted { return
cast(C)((cast(size_t*)null) + 1); }
I still can't evaluate at compile-though...
enum holeKeyOffset = 0x1;
pragma(inline, true)
On Wednesday, 28 February 2018 at 20:07:50 UTC, Steven
Schveighoffer wrote:
auto x = cast(Object)((cast(size_t *)null) + 1);
Thanks, how do I store it as enum or static immutable struct
member?
In
@trusted pure unittest
{
class C { int value; }
C x;
C y =
When zeroing a slice of memory (either stack or heap) such as
enum n = 100;
ubyte[n] chunk;
should I use `memset` such as
memset(chunk.ptr, 0, n/2); // zero first half
or an array assignment such as
chunk[0 .. n/2] = 0; // zero first half
or are they equivalent in release
On Wednesday, 28 February 2018 at 20:07:50 UTC, Steven
Schveighoffer wrote:
auto x = cast(Object)((cast(size_t *)null) + 1);
Is this preferred performance-wise over `cast(void*)(size_t.max)`?
On Tuesday, 27 February 2018 at 20:14:01 UTC, Ali Çehreli wrote:
And to be sure, one can have an actual object that represents
nullness and use its pointer. (Similar to "the null object
pattern".)
Ali
Are there any pros to this pattern compared to just using `null`
in D?
On Tuesday, 27 February 2018 at 16:31:51 UTC, Steven
Schveighoffer wrote:
Why not use null?
-Steve
It's already used to indicate that a slot is free. :)
Is `cast(void*)size_t.max` always an invalid address?
Is so, could it be used to indicate removed/delete elements in
hash tables with open addressing and a key type being either a
pointer or class?
And will it work correctly with the GC?
I'm currently developing a combined HashMap and HashSet with open
addressing at
https://github.com/nordlow/phobos-next/blob/master/src/open_hashmap_or_hashset.d
with probing using steps of triangular numbers when length is a
power of two at
On Saturday, 17 February 2018 at 14:54:37 UTC, ag0aep6g wrote:
Nordlöw's methods are only weakly pure. They have mutable
indirections either in the return type or in a parameter type.
So calls to them should not be optimized away.
I found a solution at
On Friday, 16 February 2018 at 18:03:40 UTC, Ali Çehreli wrote:
auto pureF = assumePure();
pureF(42);
Ali
Thanks!
On Saturday, 17 February 2018 at 12:35:00 UTC, rikki cattermole
wrote:
in pure functions?
pure means no globals. As in none :)
I guess one solution is to make the member functions in
PureMallocator static and change how the template argument
`Allocator` for a container is used to call
On Saturday, 17 February 2018 at 12:35:00 UTC, rikki cattermole
wrote:
in pure functions?
pure means no globals. As in none :)
I don't understand.
I thought std.experimental.allocators API was designed to be able
express these needs, @andralex?
I'm struggling with making
https://github.com/nordlow/phobos-next/blob/master/src/pure_mallocator.d
callable in pure functions such as here
https://github.com/nordlow/phobos-next/blob/master/src/pure_mallocator.d#L84
Shouldn't a shared
static shared PureMallocator instance;
make it
On Saturday, 17 February 2018 at 12:33:25 UTC, Nordlöw wrote:
PureMallocator.instance.allocate(16);
currently errors as
pure_mallocator.d(84,16): Error: pure function
'pure_mallocator.__unittest_pure_mallocator_82_0' cannot access
mutable static data 'instance'
I'm struggling with my definition of assumePure that should make
a non-pure function `f` callable as pure `pureF`.
I've copied the definition of assumePure from the Phobos docs at
https://dlang.org/phobos/std_traits.html#SetFunctionAttributes
and managed to define pureF using it but I cannot
On Thursday, 8 February 2018 at 17:05:32 UTC, Atila Neves wrote:
This new release fixes bugs and speeds up opening files by
using `--nodeps --skip-registry=all` if the dependent packages
have already been downloaded.
Thanks!
https://nightlies.dlang.org/ has not been built since 2018-02-01.
What's wrong?
Can I build dmd master with ldc (need compilation speed) myself?
If so what's the preferred script?
On Wednesday, 24 January 2018 at 21:47:26 UTC, H. S. Teoh wrote:
On Wed, Jan 24, 2018 at 09:48:21PM +, Nordlöw via
Digitalmars-d-learn wrote:
Why is the memory overhead for a class instance as high as 3
words (24 bytes on 64-bit systems? I find that annoyingly much
for my knowledge
Why is the memory overhead for a class instance as high as 3
words (24 bytes on 64-bit systems? I find that annoyingly much
for my knowledge database application. I'm aware of extern(C++),
having one word overhead, but such extern(C++)-classes cannot use
all of D; I get compilation errors such
On Wednesday, 17 January 2018 at 13:19:42 UTC, Nordlöw wrote:
Why isn't polymorphic down-casts such as in the following
pattern matching on sub-class
class Base {}
class Sub : Base {}
@safe unittest
{
auto base = new Base();
if (auto sub = cast(Sub)base)
{
// use sub
}
Why isn't polymorphic down-casts such as in the following pattern
matching on sub-class
class Base {}
class Sub : Base {}
@safe unittest
{
auto base = new Base();
if (auto sub = cast(Sub)base)
{
// use sub
}
}
allowed in safe D?
On Monday, 15 January 2018 at 15:27:23 UTC, Meta wrote:
void main()
{
auto arr = [1, 2, 3];
arr.remove!(_ => _ == 1);
writeln(arr);
}
Or was that code meant as an example?
The problem occurs when the templated function is a member of the
struct `arr`. I've moved the algorithm
Why do I get errors like
template instance remove!((_) => _ == 1) cannot use local
'__lambda5' as parameter to non-global template remove()(in K key)
for
x.remove!(_ => _ == 1);
but not for
x.remove!"a == 11";
?
How are these two lambdas different?
The function `remove` is a
On Sunday, 14 January 2018 at 21:57:37 UTC, Nordlöw wrote:
Note that __trait(isLvalue, this) cannot be used to detect
whether `this` is an l-value or an r-value, which I find
strange.
Shall be
__traits(isRef, this)
On Sunday, 14 January 2018 at 14:04:46 UTC, kinke wrote:
That sounds reasonable. For something like `foreach (e;
makeRange().wrapRangeByRef())`, referencing the makeRange()
struct rvalue by pointer in the wrapped range won't work, as
the underlying range lifetime ends with the foreach range
Given my combined hashmap and hashset container `HashMapOrSet`
defined at
https://github.com/nordlow/phobos-next/blob/master/src/hashmap_or_hashset.d
with deterministic memory management and disabled copy
constructions and a member byElement() defined as
@property auto byElement()()
On Saturday, 13 January 2018 at 00:37:48 UTC, Chris M. wrote:
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
[...]
Yes please
Very much agree.
On Thursday, 11 January 2018 at 21:57:28 UTC, MrSmith wrote:
http://dpldocs.info/experimental-docs/std.experimental.allocator.makeArray.4.html
Thanks!
Is there no equivalent of `calloc()` for
`std.experimental.allocator`, something like
Allocator.zeroAllocate(size_t numberOfElements)
?
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
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.html#hasFunctionAttributes
the way to do it?
Why isn't
class X {}
class Y : X {}
X[] xs = cast(X[])(Y[].init);
compilable in safe D?
What's unsafe about such a cast?
On Monday, 25 December 2017 at 15:16:55 UTC, ag0aep6g wrote:
https://dlang.org/phobos/std_typecons.html#Rebindable
Thanks.
In a graph library I'm working on I have the following algorithm
bool hasContext(Node sub,// TODO in
Node sup) nothrow // TODO in
{
Node curr = sub;
while (true)
{
Node ctx = curr.context;
if (!ctx) { break;}
if (ctx is sup)
If I get the following stack trace ___without line numbers___
(instead ??:?) what's missing?
core.exception.AssertError@src/knet/linking.d(444): Assertion
failure
??:? _d_assertp [0x5092ab19]
??:? pure @safe knet.storage.Edge
On Monday, 4 December 2017 at 16:03:50 UTC, Nick Treleaven wrote:
On Thursday, 30 November 2017 at 16:31:25 UTC, Nordlöw wrote:
How would this interact with explicit scope-qualification of
`x`?
That would allow the compiler to avoid GC allocation for x. It
seems essentially the same case as
On Saturday, 2 December 2017 at 17:43:01 UTC, Andrei Alexandrescu
wrote:
Thanks,
Andrei
Done. Thanks.
On Thursday, 30 November 2017 at 16:50:02 UTC, Stefan Koch wrote:
On Thursday, 30 November 2017 at 16:31:25 UTC, Nordlöw wrote:
Are there any plans to D compilers to use recent DIP-1000 to
infer scoped destruction of GC-allocated data such as in the
following case:
T sum(T)(in T[] x) // x
501 - 600 of 1408 matches
Mail list logo