On 03/21/2018 01:47 AM, Ontonator wrote:
The following code does not compile:
void main() {}
class SuperClass {}
class TemplatedClass(T : SuperClass) {}
class A : SuperClass {
alias T = TemplatedClass!B;
}
class B : SuperClass {
alias T = TemplatedClass!C;
}
class C : SuperClass {}
On Wednesday, March 21, 2018 00:47:18 Ontonator via Digitalmars-d-learn
wrote:
> The following code does not compile:
> > void main() {}
> >
> > class SuperClass {}
> >
> > class TemplatedClass(T : SuperClass) {}
> >
> > class A : SuperClass {
> >
> > alias T = TemplatedClass!B;
> >
> > }
> >
The following code does not compile:
void main() {}
class SuperClass {}
class TemplatedClass(T : SuperClass) {}
class A : SuperClass {
alias T = TemplatedClass!B;
}
class B : SuperClass {
alias T = TemplatedClass!C;
}
class C : SuperClass {}
It gives the error:
test.d(12): Error: c
On Tuesday, 20 March 2018 at 23:45:20 UTC, H. S. Teoh wrote:
The tricky part is, who's going to do the work of going
through *all* of dmd's error messages and rewriting them with
said metadata.
We did it for the stupid syntax highlighting thing... and this
has bigger win, though it is also m
On Tue, Mar 20, 2018 at 11:05:59PM +, Adam D. Ruppe via Digitalmars-d-learn
wrote:
> On Tuesday, 20 March 2018 at 21:18:01 UTC, H. S. Teoh wrote:
> > Which means error messages would need to be constructed as an
> > abstract object that the error message printer can then inspect to
> > determi
On Tuesday, 20 March 2018 at 21:18:01 UTC, H. S. Teoh wrote:
Which means error messages would need to be constructed as an
abstract object that the error message printer can then inspect
to determine which symbol(s) should be FQNs.
I've talked before about XML error messages. I'd actually lik
On Tue, Mar 20, 2018 at 10:04:30PM +0100, Jacob Carlborg via
Digitalmars-d-learn wrote:
> On 2018-03-19 19:03, H. S. Teoh wrote:
>
> > Yeah, the compiler really ought to be outputting FQNs in error
> > messages, since otherwise you get baffling A != A messages. Though
> > outputting FQNs everywh
On 2018-03-19 18:29, Russel Winder wrote:
I had assumed that a directory of modules was a package. So for
example:
A/a.d
A/b.d
were two modules in package A. Especially given there is a module
statement at the beginning of each module:
A/a.d has module A.a;
A/b.d has module A
On 2018-03-19 19:03, H. S. Teoh wrote:
Yeah, the compiler really ought to be outputting FQNs in error messages,
since otherwise you get baffling A != A messages. Though outputting
FQNs everywhere has the tendency of bloating error messages to
unreadable lengths, esp. when templates are involved
On Tuesday, 20 March 2018 at 16:56:59 UTC, Dennis wrote:
On Tuesday, 20 March 2018 at 12:18:16 UTC, Adam D. Ruppe wrote:
On Tuesday, 20 March 2018 at 09:44:41 UTC, Dennis wrote:
I suspect you are seeing the Windows antivirus hitting you. D
runtime starts up in a tiny fraction of a second, you
On Tuesday, 20 March 2018 at 12:18:16 UTC, Adam D. Ruppe wrote:
On Tuesday, 20 March 2018 at 09:44:41 UTC, Dennis wrote:
I suspect you are seeing the Windows antivirus hitting you. D
runtime starts up in a tiny fraction of a second, you shouldn't
be noticing it.
You're totally right, disablin
On Tuesday, 20 March 2018 at 10:37:55 UTC, zunkree wrote:
So, how to build static binary for macOS?
I don't see a need to do that. I build static binaries on Linux
because they work across all distros and all versions. But for
macOS, there are no distros. For supporting multiple versions, or
On Tuesday, 20 March 2018 at 12:18:16 UTC, Adam D. Ruppe wrote:
Go into the Windows security center and uncheck the real time
virus check protection. I betcha you'll see this delay (and a
similar one on dmd itself, your compiles could be running at
half-speed with this too) disappear and everyt
On Tuesday, 20 March 2018 at 15:06:14 UTC, Dukc wrote:
Won't quite do it, because that would not iterate backwards.
Linq has no chunking, so you would need to write it, maybe
similar to SelectMany, but with the opposite meaning.
public static IEnumerable> Enumerate(this
IEnumerable range)
{
On Tuesday, 20 March 2018 at 08:05:14 UTC, Kagamin wrote:
On Monday, 19 March 2018 at 17:33:31 UTC, Dukc wrote:
public static int Foo(int[] input)
{ int result = 10;
for (int i = input.Length / 4; i >= 0; i -= 4)
{ int sum = 0;
for (int j = i; j < i +4 && j < input.Length; j+
On Tuesday, 20 March 2018 at 09:44:41 UTC, Dennis wrote:
I suppose initializing the runtime takes a lot of time.
I suspect you are seeing the Windows antivirus hitting you. D
runtime starts up in a tiny fraction of a second, you shouldn't
be noticing it.
Go into the Windows security center
On Tuesday, 20 March 2018 at 10:46:11 UTC, Dennis wrote:
On Tuesday, 20 March 2018 at 10:20:55 UTC, Dennis wrote:
On Tuesday, 20 March 2018 at 09:51:09 UTC, bauss wrote:
Besides if it was and it took 1 second to startup, then it
wouldn't matter in practice with an actual application.
This is
On Tuesday, 20 March 2018 at 12:07:12 UTC, bauss wrote:
On Tuesday, 20 March 2018 at 10:46:11 UTC, Dennis wrote:
On Tuesday, 20 March 2018 at 10:20:55 UTC, Dennis wrote:
On Tuesday, 20 March 2018 at 09:51:09 UTC, bauss wrote:
Besides if it was and it took 1 second to startup, then it
wouldn't
On Tuesday, 20 March 2018 at 10:37:55 UTC, zunkree wrote:
On Sunday, 18 March 2018 at 14:36:04 UTC, Jacob Carlborg wrote:
FYI, -static is not support on macOS.
So, how to build static binary for macOS?
Static binaries aren't really supported by Apple (anymore).
What do you need it for?
—
On Tuesday, 20 March 2018 at 09:44:41 UTC, Dennis wrote:
Are there ways to reduce this to below 0.1s, or should I just
leave idiomatic D and make a betterC program?
The best solution would be to profile the startup process and
file a bug accordingly. ;)
— David
On Tuesday, 20 March 2018 at 10:20:55 UTC, Dennis wrote:
On Tuesday, 20 March 2018 at 09:51:09 UTC, bauss wrote:
Besides if it was and it took 1 second to startup, then it
wouldn't matter in practice with an actual application.
This is not concerning for large applications indeed. But say,
I
On Sunday, 18 March 2018 at 14:36:04 UTC, Jacob Carlborg wrote:
On 2018-03-17 16:42, Seb wrote:
Yes, use -static
Here's how we build the DTour:
https://github.com/dlang-tour/core/blob/master/dub.sdl
FYI, -static is not support on macOS.
So, how to build static binary for macOS?
On Saturday, 17 March 2018 at 15:42:06 UTC, Seb wrote:
On Saturday, 17 March 2018 at 14:44:42 UTC, zunkree wrote:
Hi,
Is there a way to build static linked executable with dub for
vibe-d based app?
Regards,
zunkree
Yes, use -static
Here's how we build the DTour:
https://github.com/dlang-
On Tuesday, 20 March 2018 at 09:51:09 UTC, bauss wrote:
Besides if it was and it took 1 second to startup, then it
wouldn't matter in practice with an actual application.
This is not concerning for large applications indeed. But say, I
want to implement my own `dir` (= `ls` on Unix) in D. Woul
On Tuesday, 20 March 2018 at 09:44:41 UTC, Dennis wrote:
Simply running a "hello world.exe" takes, on my pc:
1.12s When compiled with dmd
0.62s When compiled with ldc
0.05s When compiled with dmc (C program) or dmd/ldc as a
-betterC program
I suppose initializing the runtime takes a lot of ti
Simply running a "hello world.exe" takes, on my pc:
1.12s When compiled with dmd
0.62s When compiled with ldc
0.05s When compiled with dmc (C program) or dmd/ldc as a -betterC
program
I suppose initializing the runtime takes a lot of time. When
making a simple command line utility, half a sec
On Monday, 19 March 2018 at 17:33:31 UTC, Dukc wrote:
public static int Foo(int[] input)
{ int result = 10;
for (int i = input.Length / 4; i >= 0; i -= 4)
{ int sum = 0;
for (int j = i; j < i +4 && j < input.Length; j++) sum
+= input[j];
sum *= i;
result = (r
27 matches
Mail list logo