On Saturday, 18 August 2018 at 21:10:55 UTC, Tofu Ninja wrote:
On Saturday, 18 August 2018 at 11:27:29 UTC, Mike Wey wrote:
On 18-08-18 02:31, Tofu Ninja wrote:
On Friday, 17 August 2018 at 20:27:05 UTC, Tofu Ninja wrote:
Its this part that fails... always returns null
HMODULE h = cast(HMODUL
On Saturday, 18 August 2018 at 11:27:29 UTC, Mike Wey wrote:
On 18-08-18 02:31, Tofu Ninja wrote:
On Friday, 17 August 2018 at 20:27:05 UTC, Tofu Ninja wrote:
Its this part that fails... always returns null
HMODULE h = cast(HMODULE) Runtime.loadLibrary(dllName);
if (h is null) {
writeln("e
On Friday, 17 August 2018 at 20:27:05 UTC, Tofu Ninja wrote:
Its this part that fails... always returns null
HMODULE h = cast(HMODULE) Runtime.loadLibrary(dllName);
if (h is null) {
writeln("error loading");
return;
}
I there any way to see why Runtime.loadLibrary is failing?
Its this part that fails... always returns null
HMODULE h = cast(HMODULE) Runtime.loadLibrary(dllName);
if (h is null) {
writeln("error loading");
return;
}
Do shared libraries work? I am trying to load a D library into a
D program but Runtime.loadLibrary just returns null for me and I
am not sure what I am doing wrong.
import std.stdio;
import std.file : exists, getcwd, rename;
import core.thread;
import std.conv : to;
version(tofu_dynamic){
What is __traits(isFuture)? The language documents says it tests
for @future which doesn't really help as @future is undocumented.
On Friday, 15 December 2017 at 05:19:04 UTC, Tofu Ninja wrote:
TypeInfo_Class.interfaces has TypeInfo_Class and not
TypeInfo_Interface?
Is this correct? Or is it a bug?
Doesn't make much sense to me.
Also the following code prints false so there are some
consequences to this.
import std.std
TypeInfo_Class.interfaces has TypeInfo_Class and not
TypeInfo_Interface?
Is this correct? Or is it a bug?
Doesn't make much sense to me.
On Thursday, 7 December 2017 at 19:30:13 UTC, Tofu ninja wrote:
Is there a binding for it? Just a question, trying to convince
people at work to use D and that is something they asked about.
Guess not
Is there a binding for it? Just a question, trying to convince
people at work to use D and that is something they asked about.
On Wednesday, 6 December 2017 at 22:59:17 UTC, user1234 wrote:
On Wednesday, 6 December 2017 at 21:17:55 UTC, Tofu ninja wrote:
On Wednesday, 6 December 2017 at 21:12:20 UTC, Tofu ninja
wrote:
I am compiling with -m64 -shared -debug -g and a .pdb is
generated but visual studio says the dll was
On Wednesday, 6 December 2017 at 21:12:20 UTC, Tofu ninja wrote:
I am compiling with -m64 -shared -debug -g and a .pdb is
generated but visual studio says the dll was not compiled with
debug information, am I missing something or is this not
supported?
DMD32 D Compiler v2.076.0
Actually nev
I am compiling with -m64 -shared -debug -g and a .pdb is
generated but visual studio says the dll was not compiled with
debug information, am I missing something or is this not
supported?
DMD32 D Compiler v2.076.0
On Thursday, 20 April 2017 at 08:36:32 UTC, kinke wrote:
On Thursday, 20 April 2017 at 01:16:11 UTC, Tofu Ninja wrote:
My question is, why is it passed twice, both in xmm0 and rcx?
The MSDN docs say floating point are passed in xmm registers,
why is it also copied in into rcx? Is it necessary f
I am trying to learn the calling conventions in DMD, I am sure I
will have more than one question about them so as I come across
them I will ask them in this thread. I am mainly reading the MSDN
docs on the x64 calls and looking at disassemblies to confirm
what I learn.
While I was looking a
I only have an alias to the method without a this pointer, is
there any way to get the address?
Something like
struct T{
void foo(){}
}
alias A = Alias!(__traits(getMemeber, T, "foo"));
void* A_addres = ? // Somehow get the address from A
On Thursday, 26 January 2017 at 19:01:41 UTC, Tofu Ninja wrote:
Actually.. if I do dub describe on the root package it lists
both the exe and the lib as targets but the build settings for
the lib has "targetType": 6 which according to
dub/source/dub/compilers/buildsettings.d is staticLibrary...
On Thursday, 26 January 2017 at 18:26:27 UTC, Tofu Ninja wrote:
On Thursday, 26 January 2017 at 18:10:12 UTC, Tofu Ninja wrote:
On Thursday, 26 January 2017 at 18:00:57 UTC, Tofu Ninja wrote:
Is this not doable?
I guess an alternative question, is there any way to have
multiple binaries(an e
On Thursday, 26 January 2017 at 18:10:12 UTC, Tofu Ninja wrote:
On Thursday, 26 January 2017 at 18:00:57 UTC, Tofu Ninja wrote:
Is this not doable?
I guess an alternative question, is there any way to have
multiple binaries(an executable and a bunch of shared libs)
built from a single dub pa
On Thursday, 26 January 2017 at 18:00:57 UTC, Tofu Ninja wrote:
Is this not doable?
I guess an alternative question, is there any way to have
multiple binaries(an executable and a bunch of shared libs) built
from a single dub package? Or should I just give up on trying to
use dub for this...
On Sunday, 22 January 2017 at 08:16:49 UTC, Tofu Ninja wrote:
Trying to get a dub sub package to output as a shared lib but
for some reason I can only get it to output as a static lib.
dub.json
---
{
"name": "tofueng",
"targetType": "executable",
"targetPath" : "game",
Trying to get a dub sub package to output as a shared lib but for
some reason I can only get it to output as a static lib.
dub.json
---
{
"name": "tofueng",
"targetType": "executable",
"targetPath" : "game",
"sourcePaths": ["eng"],
"importPaths": ["eng"],
Well for now I am going to revert back to 2.071.2, 2.072 seems
broke as fuck.
Actually better question, why was this breaking change allowed?
The semantics of hashOf have completely changed, why was this
done??
What is the proper generic way to get the hash of something? It
seems that hashOf has been changed to no longer call toHash on
anything Just blindly casts to void[]. It actually seems now
toHash doesn't call any of the specializations of
core.internal.hash.hashOf except the one for void[].
On Sunday, 27 November 2016 at 07:38:53 UTC, Nicholas Wilson
wrote:
Whoops it would help if I read your question.
You want to use Iota in conjunction with staticMap.
alias pairs(int N, alias a, alias b) = AliasSeq(a[N],b[N]);
alias C = staticMap!(T,staticMap(pairs,Iota!N));
That didn't actual
Basically the title says it all.
alias A = AliasSeq!(...);
alias B = AliasSeq!(...);
static assert(A.length == B.length);
template T(An, Bn){ ... }
alias C = AliasSeq!(T!(A[0], B[0]) ... T!(A[n], B[n])); // how to
make this :/
How do I actually make the sequence C?
On Thursday, 24 November 2016 at 02:11:21 UTC, ketmar wrote:
On Thursday, 24 November 2016 at 00:51:01 UTC, Tofu Ninja wrote:
Even with std.traits, you can't know which arguments are
variadic.
sure, you can. see
http://dpldocs.info/experimental-docs/std.traits.variadicFunctionStyle.html
that
On Thursday, 24 November 2016 at 00:36:54 UTC, ketmar wrote:
On Thursday, 24 November 2016 at 00:19:04 UTC, Tofu Ninja wrote:
You still can't replicate a function with this.
you can, by using std.traits and string mixins.
Even with std.traits, you can't know which arguments are
variadic. The
On Thursday, 24 November 2016 at 00:15:07 UTC, ketmar wrote:
On Thursday, 24 November 2016 at 00:04:51 UTC, Tofu Ninja wrote:
On Wednesday, 23 November 2016 at 23:21:53 UTC, ketmar wrote:
On Wednesday, 23 November 2016 at 23:02:30 UTC, Tofu Ninja
wrote:
Being able to get an alias to (ref int)
On Wednesday, 23 November 2016 at 23:21:53 UTC, ketmar wrote:
On Wednesday, 23 November 2016 at 23:02:30 UTC, Tofu Ninja
wrote:
Being able to get an alias to (ref int) seems like a bug.
you are unable to alias it, `ref` will be erased on aliasing.
the only way to retain it is to have a tuple
On Wednesday, 23 November 2016 at 22:48:17 UTC, ketmar wrote:
On Wednesday, 23 November 2016 at 22:28:57 UTC, Tofu Ninja
wrote:
On Wednesday, 23 November 2016 at 22:19:28 UTC, ketmar wrote:
On Wednesday, 23 November 2016 at 22:14:25 UTC, Tofu Ninja
wrote:
What is a (ref int)? A tuple with "ref
On Wednesday, 23 November 2016 at 22:19:28 UTC, ketmar wrote:
On Wednesday, 23 November 2016 at 22:14:25 UTC, Tofu Ninja
wrote:
What is a (ref int)? A tuple with "ref int" as its only
member? Since when is ref int a type?
it is "type with modifier", like "const int" or "immutable int".
Since
On Sunday, 20 November 2016 at 12:06:15 UTC, Tofu Ninja wrote:
On Sunday, 20 November 2016 at 11:52:01 UTC, Tofu Ninja wrote:
...
Also does not include function linkage :/
Because of the lack of response, I am going to guess there is no
way to do this cleanly. Guess I am going to have to br
On Sunday, 20 November 2016 at 11:52:01 UTC, Tofu Ninja wrote:
...
Also does not include function linkage :/
On Sunday, 20 November 2016 at 11:23:37 UTC, Nicholas Wilson
wrote:
On Sunday, 20 November 2016 at 11:19:24 UTC, Tofu Ninja wrote:
I feel like this should be simple but I can't seem to figure
it out. How do I declare a function to have the same call
signature as another function/callable type?
I feel like this should be simple but I can't seem to figure it
out. How do I declare a function to have the same call signature
as another function/callable type?
Like if I have:
alias Sig = int function(int x, int y);
How do I define a function such that it will have the same call
signatur
On Thursday, 8 September 2016 at 19:56:45 UTC, Rainer Schuetze
wrote:
I think I fixed both issues in this build:
https://ci.appveyor.com/project/rainers/visuald/build/1.0.76/job/kq0a5bqpy7anou46/artifacts
Well that was fast :) It does appear to be fixed on my machine,
thanks a lot for the he
On Thursday, 8 September 2016 at 07:45:56 UTC, Rainer Schuetze
wrote:
Fixed it again. You can find a prebuilt binary of pipedmd.exe
here:
https://ci.appveyor.com/project/rainers/visuald/build/1.0.75/job/n9tf67jxcir6kpmg/artifacts
Thanks for the response, I think there is more going on than
I get "core.exception.RangeError@pipedmd(286): Range violation"
whenever I try to build from visual D. Is there any workaround
for this?
It was reported[1] almost 9 months ago, does not seem like it's
going to be fixed anytime soon. Visual D is completely broken for
me right now because of it
On Monday, 5 September 2016 at 19:03:00 UTC, Tofu Ninja wrote:
On Monday, 5 September 2016 at 17:25:45 UTC, Tofu Ninja wrote:
I am not sure what changed but I can no longer build using
visuald after generating from dub. When I try to build from
visual studio I get the following error
LINK :
On Monday, 5 September 2016 at 17:25:45 UTC, Tofu Ninja wrote:
I am not sure what changed but I can no longer build using
visuald after generating from dub. When I try to build from
visual studio I get the following error
LINK : warning LNK4001: no object files specified; libraries
used
LINK
On Monday, 5 September 2016 at 18:22:02 UTC, Guillaume Piolat
wrote:
On Monday, 5 September 2016 at 17:25:45 UTC, Tofu Ninja wrote:
I can build directly from dub with no problem, but building
from VS gives that error.
Building with dub uses the dmd settings in sc.ini
Building with VisualD ca
I am not sure what changed but I can no longer build using
visuald after generating from dub. When I try to build from
visual studio I get the following error
LINK : warning LNK4001: no object files specified; libraries used
LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
LIN
On Monday, 29 August 2016 at 12:53:26 UTC, Jesper Tholstrup wrote:
On Sunday, 28 August 2016 at 05:21:03 UTC, Tofu Ninja wrote:
Are unicode function names not supported in dmd?
bool ∩(A, B)(A a, B b){
return intersect(a, b);
}
Error: character 0x2229 is not a valid token
Personally, I
On Sunday, 28 August 2016 at 05:28:17 UTC, rikki cattermole wrote:
On 28/08/2016 5:21 PM, Tofu Ninja wrote:
...
Try Ÿ.
Yeah Ÿ and π both work but ∩ does not. I think I found my answer
though...
http://dlang.org/spec/lex.html#IdentifierChar
Identifiers start with a letter, _, or universal a
On Sunday, 28 August 2016 at 05:21:03 UTC, Tofu Ninja wrote:
...
Also visual D seems to recognize its not a valid character and
highlights the error which makes me think its known behavior.
On Sunday, 28 August 2016 at 05:21:03 UTC, Tofu Ninja wrote:
Are unicode function names not supported in dmd?
bool ∩(A, B)(A a, B b){
return intersect(a, b);
}
Error: character 0x2229 is not a valid token
I won't be terribly disappointed if I can't do this, I really
just tried it on a w
Are unicode function names not supported in dmd?
bool ∩(A, B)(A a, B b){
return intersect(a, b);
}
Error: character 0x2229 is not a valid token
I won't be terribly disappointed if I can't do this, I really
just tried it on a whim, but I thought dmd supported unicode.
So this is kind of an open ended question, just looking for
advice on doing it in general, if it's possible, and doing it
specifically in D on windows. I am not super familiar with how
shared libraries work so I had some questions.
I would like to attempt to use D to write scripts for a game
On Saturday, 9 July 2016 at 11:35:24 UTC, Tofu Ninja wrote:
On Saturday, 9 July 2016 at 11:29:18 UTC, ketmar wrote:
On Saturday, 9 July 2016 at 11:24:01 UTC, Tofu Ninja wrote:
Seems pretty silly to me...
due to universally beloved autodecoding.
Hmmm... I dont really know the history of auto
On Saturday, 9 July 2016 at 11:29:18 UTC, ketmar wrote:
On Saturday, 9 July 2016 at 11:24:01 UTC, Tofu Ninja wrote:
Seems pretty silly to me...
due to universally beloved autodecoding.
Hmmm... I dont really know the history of autodecoding, why was
that supposed to be a good idea?
Seems pretty silly to me...
On Friday, 24 June 2016 at 20:10:16 UTC, Tofu Ninja wrote:
I am glad I was not the only one who thought that sounded a
little crazy... I thought D was supposed to be type safe. I
think I will make a bug report and see where that goes.
https://issues.dlang.org/show_bug.cgi?id=16202
On Friday, 24 June 2016 at 08:52:48 UTC, Ola Fosheim Grøstad
wrote:
This is so wrong. _especially_ when you have parameter
overloading/templates. It means that you accidentally can trash
a computation by getting the wrong function. That is not
type-safe in my book.
Jonathan's max-value exampl
On Thursday, 23 June 2016 at 15:25:49 UTC, Steven Schveighoffer
wrote:
I disagree. I've used languages where converting floating point
types is not implicit, and it's painful. Most of the time, the
loss in precision isn't important.
-Steve
Which is why a flag would be nice, for some applicat
On Thursday, 23 June 2016 at 13:57:57 UTC, Steven Schveighoffer
wrote:
Whenever you work with floating point, the loss of precision
must be expected -- a finite type cannot represent an infinite
precision number.
The loss in precision should still be a warning. If I am using
reals then I obvi
On Wednesday, 22 June 2016 at 14:17:42 UTC, Jonathan M Davis
wrote:
Well, that particular value should probably work thanks to VRP
(value range propagation), since 10 can fit into float with no
loss of precision. However, what's far more disconcerting is
that
real x = real.max;
float y = x;
On Wednesday, 22 June 2016 at 08:57:38 UTC, Guillaume Piolat
wrote:
On Wednesday, 22 June 2016 at 05:04:42 UTC, Tofu Ninja wrote:
Is this intended behavior? I can't seem to find it documented
anywhere, I would think the loss in precision would atleast be
a warning.
real x = 10;
float y = x; /
Is this intended behavior? I can't seem to find it documented
anywhere, I would think the loss in precision would atleast be a
warning.
real x = 10;
float y = x; // No error or warning
real to double and double to float also work.
On Friday, 17 June 2016 at 08:49:47 UTC, Tofu Ninja wrote:
Is there a way to generate a single visuald project file for
all dub configurations, selecting the configuration from the
visual studio configuration manager? Or do I have to generate a
separate project for each configuration?
I am gu
Is there a way to generate a single visuald project file for all
dub configurations, selecting the configuration from the visual
studio configuration manager? Or do I have to generate a separate
project for each configuration?
On Tuesday, 14 June 2016 at 13:53:10 UTC, ketmar wrote:
__gshared globals are gc scanned.
Ah cool, thanks
I had to login to my work computer just to read your answer lol
Title says it all...
On Wednesday, 20 April 2016 at 18:48:58 UTC, Alex Parrill wrote:
On Wednesday, 20 April 2016 at 12:32:48 UTC, Tofu Ninja wrote:
Is there a way to shallow copy an object when the type is
known? I cant seem to figure out if there is a standard way. I
can't just implement a copy function for the c
On Wednesday, 20 April 2016 at 12:32:48 UTC, Tofu Ninja wrote:
Is there a way to shallow copy an object when the type is
known? I cant seem to figure out if there is a standard way. I
can't just implement a copy function for the class, I need a
generic solution.
I feel like
void shallow_copy
Is there a way to shallow copy an object when the type is known?
I cant seem to figure out if there is a standard way. I can't
just implement a copy function for the class, I need a generic
solution.
On Tuesday, 19 April 2016 at 16:16:39 UTC, ZombineDev wrote:
On Monday, 18 April 2016 at 23:00:42 UTC, captaindet wrote:
On 2016-04-18 14:12, Tofu Ninja wrote:
Also is there a way to have a named substructure, not a
nested structure
but something to just add an additional name, maybe something
On Monday, 18 April 2016 at 23:00:42 UTC, captaindet wrote:
not sure what you mean by "named substructure, not a nested
structure" but this works:
struct Outer{
struct Inner{
int x;
int y;
int z;
}
Inner inner;
int
On Monday, 18 April 2016 at 03:33:53 UTC, Adam D. Ruppe wrote:
The struct inside union is the main pure-language use case I
know of though.
Actually curiously I found another potential use, applying
attributes/UDAs to multiple members at once.
enum testUDA;
struct T{
@testUDA
On Monday, 18 April 2016 at 03:33:53 UTC, Adam D. Ruppe wrote:
The struct inside union is the main pure-language use case I
know of though.
I understand the reason for allowing it in a union, I just don't
see the reason it was extended to all aggregates as it seems to
do nothing.
On Monday, 18 April 2016 at 02:42:15 UTC, Nicholas Wilson wrote:
On Monday, 18 April 2016 at 02:12:24 UTC, Tofu Ninja wrote:
Just out of curiosity, what is the point of the following?
struct a{
struct{
int x;
int y;
int z;
}
}
As
Just out of curiosity, what is the point of the following?
struct a{
struct{
int x;
int y;
int z;
}
}
As far as I can tell, the anonymous structure does nothing. How
is it different from
struct a{
int x;
int y;
So I wrote a simple ref counted string type because using the
built in strings without the GC is extremely painful. It there
any way I can get strings to implicitly convert to my custom
string type?
Some way to make this work...
struct rstring {...}
void fun(rstring s) {...}
...
fun("hello wo
Is the TypeInfo given by typeid() guaranteed to be the same for a
type regardless of where I call it? I guess my question is, is
the TypeInfo a valid way to dynamically check types?
I am implementing a message passing system for an
entity-component system, I was planning to use structs as
mes
On Thursday, 4 February 2016 at 17:56:06 UTC, Marco Leise wrote:
Am Mon, 01 Feb 2016 02:56:06 +
schrieb Tofu Ninja :
Just out of curiosity, does anyone have an octree
implementation for D laying around? Just looking to save some
time.
I have one written in Delphi that you could prune til
On Saturday, 6 February 2016 at 15:02:16 UTC, H. S. Teoh wrote:
Not really sure, but opIndex() with no arguments is supposed to
be the current way of implement the [] slicing operator for
user-defined types. I'm not sure when foreach started
supporting that, but it's certainly a nice thing!
On Saturday, 6 February 2016 at 14:43:52 UTC, Tofu Ninja wrote:
Foreach seems to work if there is an opIndex() with no
arguments that returns a range interface, is this documented? I
can't seem to find anything that say this is supposed to
happen. I am not really complaining, its nice, but I ju
Foreach seems to work if there is an opIndex() with no arguments
that returns a range interface, is this documented? I can't seem
to find anything that say this is supposed to happen. I am not
really complaining, its nice, but I just didnt really expect it
because I feel like I remember this be
Just out of curiosity, does anyone have an octree implementation
for D laying around? Just looking to save some time.
For some reason it complains that link.exe is missing. Anyone
know what's up?
dmd test.d
dmd test.d -m64
Can't run '\bin\link.exe', check PATH
On Friday, 29 January 2016 at 18:26:15 UTC, Tofu Ninja wrote:
For some reason it complains that link.exe is missing. Anyone
know what's up?
dmd test.d
dmd test.d -m64
Can't run '\bin\link.exe', check PATH
link.exe is definitely on PATH...
where link.exe
C:\D\dmd2\windows\bin\link.exe
On Sunday, 24 January 2016 at 15:08:33 UTC, H. S. Teoh wrote:
On Sun, Jan 24, 2016 at 12:38:22PM +, Tofu Ninja via
Digitalmars-d-learn wrote:
I tried looking for this in phobos but cant seem to find it
which is really annoying. For my uses this works:
What kind of data do you need to
I tried looking for this in phobos but cant seem to find it which
is really annoying. For my uses this works:
struct fileOutRange
{
File f;
void put(ubyte[] a)
{
f.rawWrite(a);
}
}
But was just wondering if there was a real output range for files
On Friday, 4 December 2015 at 04:08:33 UTC, Tofu Ninja wrote:
On Thursday, 3 December 2015 at 21:04:00 UTC, Nordlöw wrote:
...
I think reflection will be a bad choice for this because of
private members and what not.
I think the correct way is:
void reset(C)(ref C c)
{
static if(is(
On Thursday, 3 December 2015 at 21:04:00 UTC, Nordlöw wrote:
...
I think reflection will be a bad choice for this because of
private members and what not.
I think the correct way is:
void reset(C)(ref C c)
{
static if(is(C == class))
{
auto init = typeid(c).in
On Tuesday, 1 December 2015 at 08:58:56 UTC, BBaz wrote:
I think that `is(CAllocatorImpl!Alloc)` should work too then.
According to the 'is' version, int is an allocator. No idea why
it thinks this works...
enum isAllocator(Alloc) = is(CAllocatorImpl!Alloc);
static assert(isAllocator!int);
Is there something like isInputRange for allocators, I tried
looking for something but couldn't find anything? If not, why not?
On Monday, 30 November 2015 at 14:21:49 UTC, Tofu Ninja wrote:
Is there something like isInputRange for allocators, I tried
looking for something but couldn't find anything? If not, why
not?
Aka, some way to check that type T is an allocator.
On Friday, 20 November 2015 at 20:39:58 UTC, Ilya wrote:
Can DMD frontend optimize
string concatenation
```
enum Double(S) = S ~ S;
assert(condition, "Text " ~ Double!"+" ~ ___FUNCTION__);
```
to
```
assert(condition, "Text ++_function_name_");
```
?
If you really want to make sure it is c
On Saturday, 21 November 2015 at 00:30:45 UTC, userABCabc123
wrote:
Yes:
class Foo
{
void bar(){writeln(__PRETTY_FUNCTION__);}
}
auto uncollectedDelegate(T, string name)(ref T t)
{
import std.experimental.allocator.mallocator;
struct Dg{void* ptr, funcptr;}
On Friday, 20 November 2015 at 12:49:02 UTC, Rikki Cattermole
wrote:
Dunno if its been fixed in ~master (doubt it), but all you need
to do in your code, is copy it in.
Cool, that worked.
I've personally marked (well voted anyway) for this bug to be
critical.
It seems I'm the only one who thin
On Tuesday, 10 November 2015 at 11:39:56 UTC, Rikki Cattermole
wrote:
One already exists.
I've confirmed it in the build scripts. It only effects Windows.
Any fix for this right now?
On Wednesday, 23 September 2015 at 03:26:29 UTC, John Colvin
wrote:
On Wednesday, 23 September 2015 at 02:10:22 UTC, Tofu Ninja
wrote:
Trying to implement a bi directional range and it is slightly
unclear what the semantics are supposed to be and just wanted
some clarification.
Are bidirectio
Trying to implement a bi directional range and it is slightly
unclear what the semantics are supposed to be and just wanted
some clarification.
Are bidirectional ranges supposed to be able to support switching
direction mid iteration? Like if I do popFront popFront popBack
should that be equa
On Friday, 14 August 2015 at 22:25:15 UTC, DarthCthulhu wrote:
Ahh, that is a much cleaner way to do it rather than using a
singleton.
By 'module level', I assume you mean in the module that defines
the Logger class? An 'import debug.logger' or somesuch would
then give all relevant modules
On Thursday, 13 August 2015 at 22:29:17 UTC, MrSmith wrote:
http://dlang.org/phobos/core_thread.html#.Fiber
Man I feel like I saw that before but when I went looking for it
I couldn't find it. Didn't think to check in core. :/
Welp that solves my question, thanks :D
Is there any way to have a yieldable function that can be resumed
at a later time in D?
Some thing like:
void test()
{
writeln("A");
yeild();
writeln("B");
}
...
auto x = yieldable!test();
x.resume(); // prints "A"
x.resume(); // prints "B"
x.resume(); // throws an error or som
On Friday, 7 August 2015 at 14:45:44 UTC, Nordlöw wrote:
On Friday, 7 August 2015 at 14:30:55 UTC, Nordlöw wrote:
Any suggestions on adding support for `binaryFun!pred` aswell?
I cracked it.
template isSortedRange(T, alias pred = "a < b")
{
import std.traits : TemplateArgsOf;
static
On Friday, 7 August 2015 at 10:01:39 UTC, Timon Gehr wrote:
On 08/07/2015 11:03 AM, Tofu Ninja wrote:
On Friday, 7 August 2015 at 08:18:04 UTC, Nordlöw wrote:
On Friday, 7 August 2015 at 05:21:32 UTC, Tofu Ninja wrote:
HAHAH wow, this is hilarious, I just checked, nothing in
std.algo
takes adv
1 - 100 of 153 matches
Mail list logo