On Monday, 25 February 2019 at 06:51:20 UTC, Yevano wrote:
This only works for at most 3 parameter delegates. If I want to
add more, I have to linearly add more static ifs in the obvious
way. However, I believe I can make this function scalable using
string mixins and other magic. Any insight i
On Monday, 25 February 2019 at 04:08:38 UTC, Jonathan M Davis
wrote:
One issue that's commonly brought up about dmd's inliner is
that it's in the front-end, which apparently is a poor way to
do inlining. One side effect of that though would be that
unless the ldc folks go to extra effort to dis
On Monday, 25 February 2019 at 02:49:36 UTC, James Blachly wrote:
Any ideas why DMD2 cannot inline this, but LDC2 has no problem
doing so -- or suggestions for what I can do to make DMD2
inline it?
Alternatively, I could version(DigitalMars) and version(LDC),
but AFAICT this requires me to du
On Monday, 25 February 2019 at 07:03:21 UTC, Nicholas Wilson
wrote:
import std.traits;
Abstraction L(alias f)() {
alias Args = Parameters!f;
Args v;
foreach(i; 0 .. v.length) v[i] = new Variable;
auto _f = f(v);
auto abstraction = new Abstraction(v[$-1],_f);
foreach
On Monday, 25 February 2019 at 06:51:20 UTC, Yevano wrote:
I am writing a domain specific language of sorts in D for the
lambda calculus. One of my requirements is that I should be
able to generate expressions like this:
new Abstraction(v1, M)
like this:
L!(x => M)
It is common to want to w
I am writing a domain specific language of sorts in D for the
lambda calculus. One of my requirements is that I should be able
to generate expressions like this:
new Abstraction(v1, M)
like this:
L!(x => M)
It is common to want to write things like
L!(x => L!(y => M))
but it is much nicer
On 25.02.2019 1:51, 0x wrote:
How to disable dub from checking internet before building, it's slowing
down build whenever it does this.
`--skip-registry=all` let you avoid checking of all dependencies
(https://dub.pm/commandline)
On Sunday, 24 February 2019 at 22:51:45 UTC, 0x wrote:
How to disable dub from checking internet before building, it's
slowing down build whenever it does this.
Its not too well described but --nodeps skips dependency
resolution (just uses the locked dependencies). Since dub only
does
On Sunday, February 24, 2019 7:49:36 PM MST James Blachly via Digitalmars-d-
learn wrote:
> Any ideas why DMD2 cannot inline this, but LDC2 has no problem doing so
> -- or suggestions for what I can do to make DMD2 inline it?
The unfortunate reality of the matter is that dmd's inliner is very poor
Any ideas why DMD2 cannot inline this, but LDC2 has no problem doing so
-- or suggestions for what I can do to make DMD2 inline it?
Alternatively, I could version(DigitalMars) and version(LDC), but AFAICT
this requires me to duplicate the entire template, because I cannot
figure out how to mak
On Sunday, 24 February 2019 at 10:53:09 UTC, aliak wrote:
Because from what I understand, an Error is something you
should not be catching and represents something unrecoverable.
And it the docs say that it's unsafe to continue execution. But
the following code is very recoverable and I don't s
On Sunday, 24 February 2019 at 13:09:15 UTC, Victor Porton wrote:
Let f be a variadic function:
Result f(...);
How to implement variadic function g which calls f with the
same arguments as one it receives?
Result g(...) {
// ...
}
If you must use C-style variadic arguments, then your onl
On Sunday, February 24, 2019 5:42:32 AM MST Dennis via Digitalmars-d-learn
wrote:
> On Sunday, 24 February 2019 at 10:53:09 UTC, aliak wrote:
> > But the following code is very recoverable and I don't see how
>
> > it's unsafe to continue executing:
> There is no guarantee that a final switch thro
How to disable dub from checking internet before building, it's
slowing down build whenever it does this.
Hi everyone,
I've stumbled on another possible bug:
-
import std.stdio;
import std.conv;
void main() {
"[ \"test\" ]".to!(dstring[]).writeln;
}
-
It gives following error:
-
/dlang/dmd/linux/bin64/../../src/phobos/std/conv.d(222): Error:
te
On Sunday, 24 February 2019 at 13:09:15 UTC, Victor Porton wrote:
Let f be a variadic function:
Result f(...);
How to implement variadic function g which calls f with the
same arguments as one it receives?
Result g(...) {
// ...
}
I don’t know if you can, but if at least g is a variadic
Em 24/02/2019 11:34, Adam D. Ruppe via Digitalmars-d-learn escreveu:
Those don't have printable characters associated, so they all look the
same. Try writeln(cast(int) code) - casting it to int so you can see
the number - and you should see the different results.
Or even
terminal.writeln("
On Sunday, 24 February 2019 at 14:34:45 UTC, Adam D. Ruppe wrote:
supported key list:
well, obviously, plus the normal printable characters like
letters, numbers, tab, space, enter... but those have char values
so no need to list in an enum.
On Sunday, 24 February 2019 at 13:09:15 UTC, Victor Porton wrote:
Let f be a variadic function:
Result f(...);
How to implement variadic function g which calls f with the
same arguments as one it receives?
Result g(...) {
// ...
}
void f(A...)(A a)
{
foreach(t; a)
writeln(t);
On Sunday, 24 February 2019 at 12:37:21 UTC, Cleverson Casarin
Uliana wrote:
OK, it built the executable, but it doesn't work for every key,
e.g. when I try with arrow and function keys, it always returns
the same symbol, so I'm unable to distinguish what key has been
pressed:
Those don't hav
Let f be a variadic function:
Result f(...);
How to implement variadic function g which calls f with the same
arguments as one it receives?
Result g(...) {
// ...
}
On Tuesday, 25 September 2018 at 05:18:55 UTC, Sobaya wrote:
On Thursday, 20 September 2018 at 12:48:14 UTC, Nicholas Wilson
wrote:
On Thursday, 20 September 2018 at 12:43:02 UTC, Nicholas
Wilson wrote:
Hmm, I can reproduce. Will look into it.
pragma(LDC_intrinsic, "llvm.nvvm.cos.approx.f")
f
Em 24/02/2019 00:19, Adam D. Ruppe via Digitalmars-d-learn escreveu:
You just need to pass the terminal.d file to your build too.
dmd yourfile.d terminal.d
so it knows to include it.
OK, it built the executable, but it doesn't work for every key, e.g.
when I try with arrow and function keys,
On Sunday, 24 February 2019 at 10:53:09 UTC, aliak wrote:
But the following code is very recoverable and I don't see how
it's unsafe to continue executing:
There is no guarantee that a final switch throws an Error. From
what I've heard of Walter [1] (though I can't find it in the
spec), the d
On Sunday, 24 February 2019 at 12:10:22 UTC, Bastiaan Veelo wrote:
1) You get "immutable(Color)(#{overlap raw, colors})" on
immutable Color because the `Color.toString()` method is not
const (corrected in the Gist). This is a bug in
pixelperfectengine. Likewise, getters like `green()` should be
On Saturday, 23 February 2019 at 23:35:14 UTC, solidstate1991
wrote:
On Saturday, 23 February 2019 at 19:21:10 UTC, Bastiaan Veelo
wrote:
It works for me:
https://run.dlang.io/gist/473b0021487275751accaebeb00be05c
-- Bastiaan
Still no luck, not even with memcpy.
There's even more mystery as
On Sunday, 24 February 2019 at 10:53:09 UTC, aliak wrote:
Because from what I understand, an Error is something you
should not be catching and represents something unrecoverable.
And it the docs say that it's unsafe to continue execution. But
the following code is very recoverable and I don't s
Because from what I understand, an Error is something you should
not be catching and represents something unrecoverable. And it
the docs say that it's unsafe to continue execution. But the
following code is very recoverable and I don't see how it's
unsafe to continue executing:
import optiona
28 matches
Mail list logo