On Sunday, 18 September 2016 at 15:48:27 UTC, Basile B. wrote:
On Sunday, 18 September 2016 at 15:40:55 UTC, Guillaume Piolat
wrote:
On Sunday, 18 September 2016 at 15:40:09 UTC, Basile B. wrote:
Hello, I'm sure it was working last time I've tried (I can't
say when, maybe > 6 months). I'm on li
On Sunday, 18 September 2016 at 15:48:27 UTC, Basile B. wrote:
On Sunday, 18 September 2016 at 15:40:55 UTC, Guillaume Piolat
wrote:
On Sunday, 18 September 2016 at 15:40:09 UTC, Basile B. wrote:
Hello, I'm sure it was working last time I've tried (I can't
say when, maybe > 6 months). I'm on li
On Sunday, 18 September 2016 at 15:40:09 UTC, Basile B. wrote:
Hello, I'm sure it was working last time I've tried (I can't
say when, maybe > 6 months). I'm on linux x86_64, GDB 7.8
If I send to GDB "break _d_assert" it will break correctly on
"assert(false);" so I can jump over. But the equiv
I've recently started an easing/interpolation family of function
in my D user library. It's based on something I know well since
I've already used them in 2012 in a VST plugin called GrainPlot
(RIP).
However for one of the function, I can't manage to get the
inverse.
A function that's fully
On Tuesday, 20 September 2016 at 12:35:18 UTC, Basile B. wrote:
I've recently started an easing/interpolation family of
function in my D user library. It's based on something I know
well since I've already used them in 2012 in a VST plugin
called GrainPlot (RIP).
However for one of the functi
On Tuesday, 20 September 2016 at 16:22:19 UTC, H. S. Teoh wrote:
On Tue, Sep 20, 2016 at 12:35:18PM +, Basile B. via
Digitalmars-d-learn wrote: [...]
The problem is here:
https://github.com/BBasile/iz/blob/master/import/iz/math.d#L849
- f(x,c) = 1.0 - pow(1.0 - pow(x, 2.0/c), c * 0.5);
- c
On Wednesday, 21 September 2016 at 01:34:06 UTC, Nicholas Wilson
wrote:
On Tuesday, 20 September 2016 at 12:35:18 UTC, Basile B. wrote:
I've recently started an easing/interpolation family of
function in my D user library. It's based on something I know
well since I've already used them in 2012
On Tuesday, 20 September 2016 at 12:35:18 UTC, Basile B. wrote:
The problem is here:
https://github.com/BBasile/iz/blob/master/import/iz/math.d#L849
- f(x,c) = 1.0 - pow(1.0 - pow(x, 2.0/c), c * 0.5);
- c(f0.5)) = ?
Which means that I ask you if you can isolate c for
y = 1.0 - pow(1.0 - pow(0.5
On Saturday, 24 September 2016 at 09:08:52 UTC, mikey wrote:
I'm trying to figure out how to best write a class with a
property that is only evaluated when it's called for the first
time. And that returns an object which shouldn't be modifiable
a part of the owning class.
I've had a go at doi
On Saturday, 24 September 2016 at 10:59:50 UTC, mikey wrote:
On Saturday, 24 September 2016 at 10:16:34 UTC, Basile B. wrote:
You don't need to cast, from "mutable" to "const" is implicit:
https://dlang.org/spec/const3.html#implicit_conversions
Ok, but using const would be an accepted way of d
On Sunday, 25 September 2016 at 04:54:31 UTC, grampus wrote:
Dear all
For example, I have a struct
struct point{int x;int y}
point a;
Is there an easy way to access x and y by using a["x"] and
a["y"]
I guess I need to overload [], but can't figure out how.
Someone can help? Thank you very m
On Sunday, 25 September 2016 at 09:01:44 UTC, Namespace wrote:
On Sunday, 25 September 2016 at 04:54:31 UTC, grampus wrote:
Dear all
For example, I have a struct
struct point{int x;int y}
point a;
Is there an easy way to access x and y by using a["x"] and
a["y"]
I guess I need to overload [
On Sunday, 25 September 2016 at 16:07:59 UTC, Basile B. wrote:
On Sunday, 25 September 2016 at 09:01:44 UTC, Namespace wrote:
On Sunday, 25 September 2016 at 04:54:31 UTC, grampus wrote:
Dear all
For example, I have a struct
struct point{int x;int y}
point a;
Is there an easy way to access x
On Sunday, 25 September 2016 at 16:26:11 UTC, Basile B. wrote:
On Sunday, 25 September 2016 at 16:07:59 UTC, Basile B. wrote:
On Sunday, 25 September 2016 at 09:01:44 UTC, Namespace wrote:
On Sunday, 25 September 2016 at 04:54:31 UTC, grampus wrote:
Dear all
For example, I have a struct
struc
On Tuesday, 27 September 2016 at 09:21:04 UTC, pineapple wrote:
I'd really like to define my own types that accept indexes for
opIndex and opSlice as template arguments. Is there any way to
do this? If not, this seems like an obvious thing to add to the
language - what's been holding it back?
On Sunday, 2 October 2016 at 15:54:38 UTC, Satoshi wrote:
Hello,
why
pure @safe nothrow @nogc struct Point {
}
isn't same as
struct Point {
pure: @safe: nothrow: @nogc:
}
??
This is not specified but attributes aren't applied to the scope
created by the declaration. Which is a good thing,
On Wednesday, 5 October 2016 at 11:45:49 UTC, Laeeth Isharc wrote:
I noticed the problem before - previously it was my fault.
I had a circulator dependency where A imported B, B did a
selective import of C and C imported A selectively. That led
to link problems with module constructors.
[..
On Wednesday, 5 October 2016 at 12:12:24 UTC, Basile B. wrote:
On Wednesday, 5 October 2016 at 11:45:49 UTC, Laeeth Isharc
wrote:
I noticed the problem before - previously it was my fault.
I had a circulator dependency where A imported B, B did a
selective import of C and C imported A selectiv
On Tuesday, 11 October 2016 at 20:17:19 UTC, Straivers wrote:
I have a class T with a templated function foo(string
name)(int, int, float) that will be mixed in via template, and
I want to determine if that class has mixed it in such that
foo(name = "bar"). How could I go about this? Thanks.
Is this a bug or a case of hijacking protection ?
struct S
{
void test(void*, size_t){}
}
void test(ref S,void[]){}
void main()
{
ubyte[] a;
(*new S).test(a);
}
On Monday, 17 October 2016 at 14:01:26 UTC, Basile B. wrote:
Is this a bug or a case of hijacking protection ?
struct S
{
void test(void*, size_t){}
}
void test(ref S,void[]){}
void main()
{
ubyte[] a;
(*new S).test(a);
}
¨¨
On Monday, 17 October 2016 at 14:12:33 UTC, timepp wrote:
there is "@disable", using @ as prefix;
there is "__gshared", using __ as prefix;
there is also "align", not using prefix.
I failed to summarize a rule here. Can anyone tell the
underlined philosophy?
It's an inconsistency of the langu
On Monday, 17 October 2016 at 15:45:56 UTC, ANtlord wrote:
On Monday, 17 October 2016 at 15:43:32 UTC, ANtlord wrote:
Hello! I've met an issue related to debugging by GDB. Directly
when I try to show call stack I get like this
http://pastebin.com/kRFRqznq. How can I make name of methods
more h
On Monday, 17 October 2016 at 17:46:05 UTC, Basile B. wrote:
On Monday, 17 October 2016 at 15:45:56 UTC, ANtlord wrote:
On Monday, 17 October 2016 at 15:43:32 UTC, ANtlord wrote:
[...]
Oh Sorry, I've forgotten about pointing technical parameters.
Ubuntu 14.04
GDB 7.7.1
DMD64 D Compiler v2.07
On Monday, 17 October 2016 at 17:43:19 UTC, Nordlöw wrote:
At
https://github.com/nordlow/phobos-next/blob/master/src/array_ex.d
I have an array container.
Everything works as expected in all unittests except for the
line at
https://github.com/nordlow/phobos-next/blob/master/src/array_ex.d#L
On Monday, 17 October 2016 at 19:14:49 UTC, ANtlord wrote:
On Monday, 17 October 2016 at 17:57:19 UTC, Martin Krejcirik
wrote:
On Monday, 17 October 2016 at 15:45:56 UTC, ANtlord wrote:
GDB 7.7.1
Use latest GDB, 7.10 has got much better D support.
Tested on GDB 7.11.1. Same case :(
redire
On Tuesday, 18 October 2016 at 21:00:12 UTC, Karabuta wrote:
On Monday, 17 October 2016 at 07:18:40 UTC, ketmar wrote:
On Monday, 17 October 2016 at 07:05:24 UTC, ketmar wrote:
[...]
oops, forgot to give some links. ;-)
nanovg and nanosvg ports:
http://repo.or.cz/iv.d.git/tree/HEAD:/nanovg
On Tuesday, 18 October 2016 at 22:12:47 UTC, Ali Çehreli wrote:
It may be embarrassing to discover this fact so late but you
can define struct members as 'auto':
import std.range;
import std.algorithm;
struct S {
auto r = only("a", "b").cycle;// <-- WOW!
}
pragma(msg, typeof(S.r));
/*
On Wednesday, 19 October 2016 at 08:34:57 UTC, Benjamin Thaut
wrote:
Lets assume I have a allocator which cains together multiple
building blocks from std.experimental.allocator and at the end
there is a mallocator providing the underlying memory. Now I
alloacte a type which contains a pointer
On Wednesday, 19 October 2016 at 10:25:51 UTC, Lodovico Giaretta
wrote:
Hi!
A simple question: is there a way to list all defined version
specifications?
Something like:
pragma(msg, __traits(allVersions));
Example output (DMD on Ubuntu x64, release build):
[all, D_InlineAsm_X86_64,
This very simple stuff:
class Item
{
alias children this;
Item[] children;
void populate()
{
children ~= new Item;
assert(children.length == 1);
}
}
void main()
{
Item root = new Item;
root.populate;
}
leads to an assertion failure. Am I too tired to
They would have for constraint
`if (isInputRange!Range && isInputRange!(ElementType!Range))`
In case you wouldn't see directly what would they be used for,
it's for tree-like structures. Each element in a Range is also an
input range.
I see 3 obvious functions/templates
- the most importa
On Friday, 21 October 2016 at 19:41:00 UTC, Basile B. wrote:
They would have for constraint
`if (isInputRange!Range && isInputRange!(ElementType!Range))`
In case you wouldn't see directly what would they be used for,
it's for tree-like structures. Each element in a Range is also
an input ra
On Wednesday, 26 October 2016 at 09:43:10 UTC, rikki cattermole
wrote:
Basically when you spawn a thread giving the function, you pass
it through another function which will catch any exceptions not
normally caught.
Of course this really should be the default behavior but
somebody else may be
On Thursday, 27 October 2016 at 14:04:23 UTC, Gianni Pisetta
wrote:
Hi all,
I have an AliasSeq composed of literal strings, variables and
delegates. I want to build a template Optimize that will return
an AliasSeq that have all adjacent literals concatenated into
one. So i writed something lik
On Friday, 28 October 2016 at 03:33:33 UTC, Basile B. wrote:
On Thursday, 27 October 2016 at 14:04:23 UTC, Gianni Pisetta
wrote:
So i searched for a metod to check if an alias is a literal
value, but found nothing. Anyone have any clue on how can be
done?
Thanks,
Gianni Pisetta
Hello, I thi
Here are the specifications of token strings:
"Token strings open with the characters q{ and close with the
token }. In between must be valid D tokens. The { and }"
So we can deduce that any invalid D token inside a token string
will lead to a compilation error. Indeed:
void main()
{
en
On Friday, 28 October 2016 at 06:21:38 UTC, Johan Engelen wrote:
On Friday, 28 October 2016 at 05:16:45 UTC, Basile B. wrote:
Here are the specifications of token strings:
"Token strings open with the characters q{ and close with the
token }. In between must be valid D tokens. The { and }"
S
I would need actually something like
https://github.com/CouscousPHP/Couscous but in D.
try this
echo "enum a = 0/0;" > d.d && dmd d.d -main
any reason for this ?
On Tuesday, 1 November 2016 at 22:01:23 UTC, Alfred Newman wrote:
Greetings,
I need some help with dub libraries.
Executing "dub list" in my machine, I got the following:
Packages present in the system and known to dub:
colorize ~master:
C:\Users\Alfred\AppData\Roaming\dub\packages\colorize-m
On Friday, 4 November 2016 at 15:50:36 UTC, Gianni Pisetta wrote:
Hi all,
I am having issues finding a solution for this, i want to check
if an alias is an istance of a variadic template nested in
another variadic template.
[...]
there is some sort of workaround?
Thanks,
Gianni
Hello, I'm n
On Saturday, 5 November 2016 at 02:24:00 UTC, Konstantin
Kutsevalov wrote:
Hi,
is there a way to catch system signal of "kill" command or
"shutdown"?
During the Run-time:
You can register a signal callback, like in this sample (hit
CTRL+C once running in a terminal):
On Saturday, 5 November 2016 at 06:17:51 UTC, Basile B. wrote:
On Saturday, 5 November 2016 at 02:24:00 UTC, Konstantin
Kutsevalov wrote:
Hi,
is there a way to catch system signal of "kill" command or
"shutdown"?
During the Run-time:
You can register a signal callback,
On Friday, 4 November 2016 at 17:37:10 UTC, Basile B. wrote:
On Friday, 4 November 2016 at 15:50:36 UTC, Gianni Pisetta
wrote:
Hi all,
I am having issues finding a solution for this, i want to
check if an alias is an istance of a variadic template nested
in another variadic template.
[...]
th
On Saturday, 5 November 2016 at 13:34:51 UTC, Gianni Pisetta
wrote:
When i have time i will test it with ldc and see if the result
is the same, then it will probably be a front-end bug and i
will report it as an issue.
Indeed, I've been fighting against that since a few minutes. We
cant selec
On Saturday, 5 November 2016 at 14:37:53 UTC, Basile B. wrote:
On Saturday, 5 November 2016 at 13:34:51 UTC, Gianni Pisetta
wrote:
[...]
Indeed, I've been fighting against that since a few minutes. We
cant select the Base of an eponymous template.
template isEponymousTemplate(T)
{
stat
On Saturday, 5 November 2016 at 13:43:34 UTC, Lodovico Giaretta
wrote:
On Saturday, 5 November 2016 at 13:34:51 UTC, Gianni Pisetta
wrote:
When i have time i will test it with ldc and see if the result
is the same, then it will probably be a front-end bug and i
will report it as an issue.
I t
On Monday, 7 November 2016 at 23:03:32 UTC, Picaud Vincent wrote:
I need:
1/ a way to detect compile-time constant vs "dynamic" values
/**
* Indicates if something is a value known at compile time.
*
* Params:
* V = The value to test.
* T = Optional, the expected value type.
*
On Monday, 7 November 2016 at 16:15:44 UTC, Konstantin Kutsevalov
wrote:
Is there a way to make new thread for class method?
E.g. I have some class and I need to run one of them method in
new thread.
I found wxamples only with function...
import core.thread;
class Foo
{
void method(){
On Saturday, 19 November 2016 at 08:59:36 UTC, xky wrote:
On Saturday, 19 November 2016 at 07:12:49 UTC, Nicholas Wilson
wrote:
If you're using x64 then you should be using the microsoft
linker.
ok
are you invoking the linker manually?
no...
So, I got msbuild.zip from another website and f
On Sunday, 20 November 2016 at 17:47:50 UTC, MGW wrote:
import core.sys.windows.windows: MessageBoxA;
void test() {
for(int i; i != 10; i++) {
ubyte[] buf;
for(int j; j != 1; j++) buf ~= 65;
MessageBoxA(null, "--on for--".ptr, "".pt
On Monday, 21 November 2016 at 17:26:37 UTC, Jonathan M Davis
wrote:
On Monday, November 21, 2016 17:01:56 Stefan via
Digitalmars-d-learn wrote:
[...]
[...]
there was an overload for toUpper that took string as an
optimization but that inadvertently meant that types that
implicitly converted
On Monday, 21 November 2016 at 21:32:16 UTC, mab-on wrote:
What i want is a clever mechanism to store the SemVer (or
Commit-ID) in the binary at compiletime - automatically.
Otherwise i have to think to update a const in the code every
time i build a new Version.
enum versionData = import
On Monday, 21 November 2016 at 23:46:41 UTC, Basile B. wrote:
On Monday, 21 November 2016 at 21:32:16 UTC, mab-on wrote:
What i want is a clever mechanism to store the SemVer (or
Commit-ID) in the binary at compiletime - automatically.
Otherwise i have to think to update a const in the code eve
On Wednesday, 23 November 2016 at 19:49:35 UTC, Rubikoid wrote:
For example, i have test.cpp:
#include
void test()
{
printf("test\n");
}
And test.d:
import std.stdio;
extern (C++) void test();
void main()
{
test();
readln();
}
How i should compile test.cpp using g++ to link it normall
On Sunday, 27 November 2016 at 22:19:26 UTC, Timothee Cour wrote:
Adding
```
b _d_throwc #does nothing
```
Try instead "b _d_throwdwarf". Changes made earlier this year to
EH made _d_throwc obsolete. The equivalent is now _d_throwdwarf.
Don't ask me why I wouldn't be able to answer.
On Monday, 28 November 2016 at 02:52:02 UTC, Basile B. wrote:
On Sunday, 27 November 2016 at 22:19:26 UTC, Timothee Cour
wrote:
Adding
```
b _d_throwc #does nothing
```
Don't ask me why I wouldn't be able to answer.
The only thing that I can say is that it's probably related to
one of the b
On Monday, 28 November 2016 at 14:35:36 UTC, Namespace wrote:
We have a handy dandy syntax for this:
if (MyClassInt subclass = cast(MyClassInt)value) {
writeln(subclass.value);
}
If it doesn't cast to said type (it will be null) that branch
won't execute.
Just out of interest: it loo
On Wednesday, 30 November 2016 at 14:53:21 UTC, ag0aep6g wrote:
On 11/30/2016 10:42 AM, Bauss wrote:
Usually casts to base classes can be determined if they're
valid at
compile-time.
Yeah, that's what I said. A cast to a base class is an
"upcast". Upcasts don't need run-time checks. The othe
On Thursday, 1 December 2016 at 00:36:30 UTC, Jake Pittis wrote:
How do I convert a double to a ubyte[]?
I've tried all sorts of things including converting the double
to a ulong and trying to serialize the ulong. For example test
bellow fails.
unittest {
double d = 3.14;
ulong
On Tuesday, 13 December 2016 at 23:37:59 UTC, Timon Gehr wrote:
On 14.12.2016 00:00, Timothee Cour via Digitalmars-d-learn
wrote:
what's the best (and DRY) way to achieve:
```
static if(__traits(compiles, expr))
fun(expr);
```
ie, without repeating the expression inside expr?
eg:
```
stati
On Wednesday, 14 December 2016 at 23:08:30 UTC, hardreset wrote:
I built Freetype with MSVC13 and tried to link it but DMD didnt
like the format, so what should compiler (free) should I use
for building DMD compatible static libs?
Once I've build the lib, made a di file, where do I put these
On Wednesday, 14 December 2016 at 22:06:35 UTC, Ali Çehreli wrote:
On 12/14/2016 09:25 AM, Basile B. wrote:
> On Tuesday, 13 December 2016 at 23:37:59 UTC, Timon Gehr
wrote:
>> I usually do
>>
>> enum code = q{expr};
>> static if(__traits(compiles,mixin(code)))
>> fun(mixin(code));
>
> Stran
On Sunday, 18 December 2016 at 13:14:08 UTC, Picaud Vincent wrote:
Reading std/bigint.d code:
https://github.com/dlang/phobos/blob/00c1cc3b0d354363793c8b419ce84da722578138/std/bigint.d#L589
I have seen this:
bool opEquals()(auto ref const BigInt y) const pure @nogc
{
return sign == y.sign &
On Monday, 19 December 2016 at 10:41:46 UTC, RazvanN wrote:
Hi,
I have a function which accepts 2 input Ranges and swaps the
first element in Range1 with the first element in Range2. The
swapping code looks something like this :
static if (is(typeof(swap(r1.front, r2.front
{
I'd like to build SKIA[1] as a static library and interface it
with D.
However it's hard to build, I don't get anything to their build
system...
Thanks for your help.
[1]https://skia.org/
On Monday, 9 January 2017 at 02:31:42 UTC, Chris M. wrote:
Right now I'm working on a project where I'm implementing a VM
in D. I'm on the rotate instructions, and realized I could
*almost* abstract the ror and rol instructions with the
following function
private void rot(string ins)(int *op1
On Tuesday, 10 January 2017 at 11:38:43 UTC, Guillaume Piolat
wrote:
On Tuesday, 10 January 2017 at 10:41:54 UTC, Basile B. wrote:
don't forget to flag
asm pure nothrow {}
otherwise it's slow.
Why?
It's an empirical observation. In september I tried to get why an
inline asm function was
On Wednesday, 11 January 2017 at 00:11:50 UTC, Chris M wrote:
On Tuesday, 10 January 2017 at 13:13:17 UTC, Basile B. wrote:
On Tuesday, 10 January 2017 at 11:38:43 UTC, Guillaume Piolat
wrote:
On Tuesday, 10 January 2017 at 10:41:54 UTC, Basile B. wrote:
don't forget to flag
asm pure nothrow
On Tuesday, 26 July 2016 at 13:32:00 UTC, Suliman wrote:
Ideally I need algorithm that can return bool if one polygon
overlapped/intersected by another. But I do not know math.
After some googling I found topic on SO[1] about point
inside/outside polygon. It's not directly what I need, but as
On Sunday, 15 January 2017 at 19:43:22 UTC, Nestor wrote:
I was reading some of the examples of writing a quine with D,
but apparently the language has evolved and they no longer
compiled unchanged.
So I tried to program one by myself using strings and
std.stdio, but the result seems long and
On Wednesday, 18 January 2017 at 00:09:42 UTC, Nordlöw wrote:
What's the easiest way to print a double in maximum precision?
%.6g for floats and %.17g for doubles. This is for example what's
used on std.json to get a perfect conversion from string to
value. the number is the maximum number of
On Wednesday, 13 March 2013 at 09:35:18 UTC, Andrea Fontana wrote:
I've tried to build documentation using ddoc format and dmd.
dmd -c -D -o- ...
Generated documentation looks ugly and without stylesheet. Am I
wrong? I expected a phobos-like documentation.
So, what do you use to generate you
On Thursday, 19 January 2017 at 17:06:39 UTC, Nemanja Boric wrote:
On Thursday, 19 January 2017 at 16:47:07 UTC, Basile B. wrote:
[...]
I've submitted few PRs but they never got merged. We're
maintaining, unofficially, fork that does compile and it's
available at:
https://github.com/socioma
On Thursday, 19 January 2017 at 15:20:37 UTC, Suliman wrote:
What do dflag: `-c do not link`. Should I pass it during the
generation of the docs? dub is append it's automatically, but
if I want to generate new docs every rebuild of app what is the
reason to use this flag?
Oh no 2013 !! I thou
On Sunday, 22 January 2017 at 00:31:38 UTC, Ali Çehreli wrote:
On 01/21/2017 03:36 PM, Ali Çehreli wrote:
> Change the signature and it works without copies:
>
> this(const(this)) {
> // ...
> }
Ugh... :( It's not a post-blit. Then what is it?
Ali
This is a __ctor that takes
On Sunday, 22 January 2017 at 03:42:21 UTC, Ali Çehreli wrote:
On 01/21/2017 07:22 PM, Basile B. wrote:
[...]
Wow! Thanks.
I know about 'alias this' but this (pun!) is new to me. TIL
indeed and WAT (four exclamation marks is right in this
case. :o) )
import std.stdio;
struct S {
On Monday, 23 January 2017 at 15:15:35 UTC, aberba wrote:
I'm creating a function to authenticate user login. I want to
determine login failure (Boolean) and error message (will be
sent to frontend) but D does have multiple return type
[...]
Yes, MRV can be done with a tuple
auto foo()
{
On Wednesday, 1 February 2017 at 11:39:46 UTC, Suliman wrote:
Full error log:
0x00580A4D in @trusted bool
std.file.cenforce!(bool).cenforce(bool, const(char)[],
const(wchar)*, immutable(char)[], uint)
0x00412AB6 in @safe void[]
std.file.read!(immutable(char)[]).read(immutable(char)[], uint)
On Sunday, 5 February 2017 at 14:59:04 UTC, Xavier Bigand wrote:
Hi,
I am trying to create an allocator that don't use the GC, and I
have issues for the initialization of member before calling the
constructor.
Here is my actual code :
mixin template NogcAllocator(T)
{
static T
On Tuesday, 7 February 2017 at 09:21:18 UTC, Kagamin wrote:
Can't find a reason why it's not inferred @safe (on linux). Any
idea?
Uh ? It's safe
Just tried
import std.stdio;
void main(string[] args) @safe
{
File f;
ubyte[] z;
z = f.rawRead(z);
}
And it compiles (DMD 2.
On Thursday, 16 February 2017 at 03:20:12 UTC, Jerry wrote:
I am trying to do opApply to work when the delegate passed when
it is and isn't nogc/nothrow. As soon as you involve a template
though, type inference goes out the door. I want to be able to
use opApply with templates (to get the auto
On Saturday, 4 March 2017 at 19:31:46 UTC, Andrey wrote:
On Saturday, 4 March 2017 at 17:57:16 UTC, John Colvin wrote:
but to be honest, I would just repeat myself a bit and write
if (regionAlign == RegionAlign.top ||
regionAlign == RegionAlign.bottom) {
}
That's exactly what I did, just
On Tuesday, 14 March 2017 at 14:35:11 UTC, Inquie wrote:
On Tuesday, 14 March 2017 at 05:33:28 UTC, thedeemon wrote:
[...]
Complexity is in the eye of the beholder. Children think many
things are complex when they are not.
If a library solution could be created that is as seamless as a
lan
On Wednesday, 15 March 2017 at 19:34:32 UTC, Ali Çehreli wrote:
On 03/15/2017 03:23 AM, Basile B. wrote:
> you can use a mixin template because
> they can introduce destructors that are called automatically
with the
> aggregate destrcutor
Wow! Is this specified anywhere or have you come across
On Thursday, 16 March 2017 at 07:49:19 UTC, Basile B. wrote:
On Wednesday, 15 March 2017 at 19:34:32 UTC, Ali Çehreli wrote:
On 03/15/2017 03:23 AM, Basile B. wrote:
> you can use a mixin template because
> they can introduce destructors that are called automatically
with the
> aggregate destrc
On Monday, 13 March 2017 at 17:29:41 UTC, Inquie wrote:
Does D have any nice way to specify a block for cold folding? I
have a very large set of structs and I'd like to be able to
code fold them all at once and together.
I have been using
static if(true)
{
... junk
}
but the static if is
On Saturday, 18 March 2017 at 11:29:43 UTC, alex1974 wrote:
I want to build a custom library with useful extensions to
phobos. They should be named like:
extensions.regex
extensions.path
extensions.files
...
Some libraries, like extensions.files contain several files
(e.g files.d, filesexcept
On Saturday, 18 March 2017 at 13:30:22 UTC, Hussien wrote:
On Saturday, 18 March 2017 at 13:16:49 UTC, Adam D. Ruppe wrote:
On Saturday, 18 March 2017 at 13:06:56 UTC, Hussien wrote:
So you are telling me there is no way to do this easily?
What are you actually trying to do?
Glad you asked!
On Saturday, 18 March 2017 at 15:30:27 UTC, Hussien wrote:
On Saturday, 18 March 2017 at 15:16:35 UTC, Basile B. wrote:
On Saturday, 18 March 2017 at 13:30:22 UTC, Hussien wrote:
On Saturday, 18 March 2017 at 13:16:49 UTC, Adam D. Ruppe
wrote:
On Saturday, 18 March 2017 at 13:06:56 UTC, Hussie
On Saturday, 18 March 2017 at 20:39:20 UTC, StarGrazer wrote:
I have some CTFE's and meta programming that cause dmd to run
out of memory ;/
I am generating simple classes, but a lot of them. dmd uses
about 2GB before it quites. It also only uses about 12% of cpu.
I have 16 GB total memory a
On Saturday, 18 March 2017 at 20:56:47 UTC, StarGrazer wrote:
On Saturday, 18 March 2017 at 20:43:29 UTC, Basile B. wrote:
On Saturday, 18 March 2017 at 20:39:20 UTC, StarGrazer wrote:
I have some CTFE's and meta programming that cause dmd to run
out of memory ;/
I am generating simple classe
On Sunday, 2 April 2017 at 19:24:14 UTC, Inquie wrote:
is it possible to create a delegate that takes an optional
number of parameters and/or return type?
T delegate(S...)(S) special_delegate;
I guess this is impossible?
alias Dg(Return, Params...) = Return delegate(Params);
Dg!(int,float,
On Sunday, 2 April 2017 at 20:48:09 UTC, Inquie wrote:
On Sunday, 2 April 2017 at 20:02:56 UTC, Basile B. wrote:
On Sunday, 2 April 2017 at 19:24:14 UTC, Inquie wrote:
is it possible to create a delegate that takes an optional
number of parameters and/or return type?
T delegate(S...)(S) speci
On Sunday, 2 April 2017 at 19:42:52 UTC, Inquie wrote:
I would like to write the output of a manifest constant at
compile time to a file instead of console using pragma(msg). Is
this possible?
No.
On Monday, 10 April 2017 at 21:04:10 UTC, Johan Fjeldtvedt wrote:
I have a couple of questions related to the following code:
https://gist.github.com/Jaffe-/b027287a884fc2e173a65601ec242676
1) This is a very simplified example, but what I'm trying to do
here is to call `foo` on each object in
On Wednesday, 12 April 2017 at 09:51:34 UTC, Russel Winder wrote:
Are Argon https://github.com/markuslaker/Argon or darg
https://github. com/jasonwhite/darg getting traction as the
default command line handling system for D or are they just
peripheral and everyone just uses std.getopt
https:/
On Monday, 17 April 2017 at 10:22:47 UTC, Dmitry wrote:
Hi there.
Currently for messages about errors I use code like this:
void add(string name, ref Scene scene)
{
if (name in listOfScenes)
{
EError(__FILE__, __LINE__, "scene already
exists".L, quoted(name)
On Monday, 17 April 2017 at 10:55:30 UTC, Jonathan M Davis wrote:
On Monday, April 17, 2017 10:30:35 Basile B. via
Digitalmars-d-learn wrote:
On Monday, 17 April 2017 at 10:22:47 UTC, Dmitry wrote:
void error(string msg, string file = __FILE__, size_t line =
__LINE__)
{
...
}
That's
601 - 700 of 726 matches
Mail list logo