Am Thu, 20 Jun 2013 22:53:13 +0200
schrieb Adam D. Ruppe destructiona...@gmail.com:
On Thursday, 20 June 2013 at 20:47:19 UTC, Michael wrote:
Also 3 types of pointers scares me.
This actually doesn't scare me because it is kinda useful for
certain situations. However, I don't think it
On Sunday, 23 June 2013 at 15:30:16 UTC, Marco Leise wrote:
They have compiler support which removes the syntactical noise
of
templates and makes them behave more natural.
Indeed. I don't mind the syntax (actually, I prefer RefCounted!T
to ~T or whatever symbol rust uses) but there's some
On 6/19/2013 11:02 PM, Kai Nacke wrote:
On Wednesday, 19 June 2013 at 20:40:39 UTC, qznc wrote:
LDC is explicitly mentioned in the LLVM 3.3 Release Notes [0]. In contrast
to other frontends, LDC seems to follow upstream much more closely (or
maybe is forced to due to bugs?).
Anyhow, kudos to
Manu:
This is interesting. I didn't know about this.
An important thing here is: what's the semantics present in that
language that is missing in D (and that is useful for the
optimizer)? Is it possible/worth to add it?
Bye,
bearophile
Jacob Carlborg:
http://michelf.ca/projects/d-objc/syntax/
Instead of:
extern (Objective-C)
Is it better to use a naming more D-idiomatic?
extern (Objective_C)
Regarding this syntax:
void insertItem(ObjcObject object, NSInteger value)
[insertItemWithObjectValue:atIndex:];
Is it
On 2013-06-23, 23:02, bearophile wrote:
Jacob Carlborg:
http://michelf.ca/projects/d-objc/syntax/
Instead of:
extern (Objective-C)
Is it better to use a naming more D-idiomatic?
extern (Objective_C)
There's already some precedence in extern (C++).
--
Simen
On Saturday, 22 June 2013 at 21:45:48 UTC, Juan Manuel Cabo wrote:
Right, the author of the article used ldc. I'm always used
to dmd.
You know that you can use ldmd2 to invoke LDC using the same
flags as DMD?
This time I used LDC 0.11.0, with:
ldc2 -O -release -disable-boundscheck
On Sunday, 23 June 2013 at 04:08:22 UTC, Vladimir Panteleev wrote:
On Saturday, 22 June 2013 at 20:09:01 UTC, monarch_dodra wrote:
#2: Extremelly bad compatibility with simple no
bidir/non-slicing ranges: There is no way to iterate over a
specific part of a range, and making a range out of
rvalue references
SCNR
On 2013-06-22 23:41, Walter Bright wrote:
Compiling std.algorithm for unittests consumes all the memory on many
machines. I've been looking into what is allocating all that memory, and
it isn't so easy without adding instrumentation code anywhere.
Anyone know of a convenient tool to do this on
On Sunday, 23 June 2013 at 09:10:03 UTC, monarch_dodra wrote:
All of these will *iterate* over part of said range, but none
will actually return the subrange I iterated on.
`until` does not iterate, it simply returns a range which ends
when your condition is satisfied.
V
[ . . X
On Sunday, 23 June 2013 at 09:44:09 UTC, Vladimir Panteleev wrote:
On Sunday, 23 June 2013 at 09:10:03 UTC, monarch_dodra wrote:
All of these will *iterate* over part of said range, but none
will actually return the subrange I iterated on.
`until` does not iterate, it simply returns a range
On Sunday, 23 June 2013 at 09:54:56 UTC, monarch_dodra wrote:
Isn't this what `until` does?
Not quite, it returns an object that returns those items when
iterated on. But it is not the same type.
OK, I think we had a misunderstanding what iterate meant. I
used it in the meaning iterate the
On Sunday, 23 June 2013 at 10:37:34 UTC, Vladimir Panteleev wrote:
The problem always boils down the fact that while we can get
the same iteration scheme, it's never the same range type:
Range r = some_range;
r = r.until!a == 5; //Does not compile Until!Range and Range
do not match
r =
On 06/23/2013 10:54 AM, monarch_dodra wrote:
Not quite, it returns an object that returns those items when iterated on. But
it is not the same type.
Why does that matter to you? One of the nice things about ranges is that the
strict object type seems to matter less than the interface and the
On Sunday, 23 June 2013 at 11:06:07 UTC, Joseph Rushton Wakeling
wrote:
On 06/23/2013 10:54 AM, monarch_dodra wrote:
Not quite, it returns an object that returns those items when
iterated on. But
it is not the same type.
Why does that matter to you? One of the nice things about
ranges is
On 06/23/2013 12:34 PM, monarch_dodra wrote:
That's a very I have a range and want to iterate on it view. Which is fine
and
it works in that case (and I have no problems there).
But as soon as you need an algorithm that actually *handles* ranges: swaps
them,
merges them, searches in them
I just wanted to get the contents of a smiple html page using
std.net.curl (on Windows)
So I did (exactly like in the library documentation example)
string contents = get(dlang.org);
But this won't even compile, not with dmd 2.062 and not with 2.063
main.d(8): Error: cannot implicitly
On Sunday, 23 June 2013 at 11:04:17 UTC, monarch_dodra wrote:
It's a bit more than that, it's also about limiting template
bloat. For example:
To mitigate template bloat, you can downgrade compile-time
polymorphism to runtime polymorphism. D provides the facilities
for this, e.g. using the
On Sunday, 23 June 2013 at 12:08:08 UTC, Benjamin Thaut wrote:
I just wanted to get the contents of a smiple html page using
std.net.curl (on Windows)
So I did (exactly like in the library documentation example)
string contents = get(dlang.org);
Looks like a documentation bug.
Am 22.06.2013 23:41, schrieb Walter Bright:
Compiling std.algorithm for unittests consumes all the memory on many machines.
I've been looking into what is allocating all that memory, and it isn't so easy
without adding instrumentation code anywhere.
Anyone know of a convenient tool to do this
Am 23.06.2013 14:08, schrieb Benjamin Thaut:
I just wanted to get the contents of a smiple html page using
std.net.curl (on Windows)
So I did (exactly like in the library documentation example)
string contents = get(dlang.org);
But this won't even compile, not with dmd 2.062 and not with
On 06/23/2013 05:42 AM, Joseph Rushton Wakeling wrote:
On Saturday, 22 June 2013 at 21:45:48 UTC, Juan Manuel Cabo wrote:
Right, the author of the article used ldc. I'm always used
to dmd.
You know that you can use ldmd2 to invoke LDC using the same flags as DMD?
This time I used LDC
On Sunday, 23 June 2013 at 09:37:26 UTC, Jacob Carlborg wrote:
On 2013-06-22 23:41, Walter Bright wrote:
Compiling std.algorithm for unittests consumes all the memory
on many
machines. I've been looking into what is allocating all that
memory, and
it isn't so easy without adding
On 22.06.2013 02:07, Manu wrote:
It would certainly be nice in Win32, but I tend to think Win32 COFF
should be much higher priority.
I have removed the dust from these patches and pushed them successfully
through the test suite and unittests:
https://github.com/rainers/dmd/tree/coff32
On 6/23/13, Timothee Cour thelastmamm...@gmail.com wrote:
What we need:
__traits(getTemplate, A!T) = A
__traits(getTemplateArguments, A!(T,foo)) = (T,foo) (ie returns a
tuple as in parameterTypeTuple or similar)
http://d.puremagic.com/issues/show_bug.cgi?id=4265
On 6/23/13 4:04 AM, monarch_dodra wrote:
R range;
auto r3 = findSplit(range);
void do_it(r3[0]);
void do_it(r3[1]);
void do_it(r3[2]);
This will actually instantiate 2 different do_it functions.
Yah, this is a good summary. If individual iterators are accessible,
findSplit can return three
On 6/23/13 7:39 AM, Andrei Alexandrescu wrote:
Again, we can make things work by introducing a primitive for
bidirectional ranges:
R before(R r1, R r2);
Assuming r2 is reachable from r1, returns the portion of r1 that lies
before r2. (Definition: a range r2 is reachable from another range r1
23-Jun-2013 06:13, Brad Anderson пишет:
On Sunday, 23 June 2013 at 01:34:53 UTC, Andrei Alexandrescu wrote:
On 6/22/13 2:58 PM, monarch_dodra wrote:
long story short: we don't have rfind. C++ does.
We do, just that it's for random-access ranges. C++ offers it for
bidirectional ranges too. We
On 2013-06-23 15:12, qznc wrote:
That would be SystemTap on Linux. However, I wonder if it is the right
tool for the job.
Mac OS X has Instruments as well, which is used for these type of tasks.
It's built on top of Dtrace:
http://en.wikipedia.org/wiki/Instruments_(application)
--
/Jacob
I think what's happening is the compiler considers chars to be
integral types (like they were in C), which means some implicit
conversions between char, int, dchar, and others happen.
So
char[] a;
int b = 1000;
a ~= b;
the a ~= b is more like a ~= cast(dchar) b, and then dchar -
char means
On 6/21/13 4:02 PM, Walter Bright wrote:
On 6/21/2013 3:35 PM, Andrei Alexandrescu wrote:
On 6/21/13 3:22 PM, Adam D. Ruppe wrote:
Just for laughs I just slapped together a strstr
Post it and I'll destroy it.
Can I play, too? Mine from the Digital Mars C library. Haven't looked at
it since
On Sunday, 23 June 2013 at 14:47:17 UTC, Andrei Alexandrescu
wrote:
On 6/23/13 7:39 AM, Andrei Alexandrescu wrote:
Again, we can make things work by introducing a primitive for
bidirectional ranges:
R before(R r1, R r2);
Assuming r2 is reachable from r1, returns the portion of r1
that lies
On 6/22/13 12:28 PM, Adam D. Ruppe wrote:
On Saturday, 22 June 2013 at 16:38:31 UTC, Andrei Alexandrescu wrote:
Huh, even the shortest impl I can think of is about the same length:
inout(char)* mystrstr(inout(char)* haystack, const(char*) needle) {
assert(haystack !is null);
if(needle is null)
On Sunday, 23 June 2013 at 16:07:05 UTC, Andrei Alexandrescu
wrote:
Still buggy. The empty string must be a prefix of any string
including the empty string.
Huh. Well, that makes sense. Just change while to do while and
you've got that. Probably compiles to exactly the same code as
your
On 6/23/13 9:21 AM, Adam D. Ruppe wrote:
http://arsdnet.net/dcode/dhp.d
It works by just reading the file and translating everything outside the
?d? into a giant writeln(string literal), pasting in the D code, then
compile+running it, inserting a bunch of imports so it works.
dom.d now
Nice, thanks! Didn't know this syntax is allowed in template
specialization too.
On Sunday, 23 June 2013 at 14:47:17 UTC, Andrei Alexandrescu
wrote:
On 6/23/13 7:39 AM, Andrei Alexandrescu wrote:
Again, we can make things work by introducing a primitive for
bidirectional ranges:
R before(R r1, R r2);
Assuming r2 is reachable from r1, returns the portion of r1
that lies
Adam D. Ruppe:
char[] a;
int b = 1000;
a ~= b;
the a ~= b is more like a ~= cast(dchar) b, and then dchar
- char means it may be multibyte encoded, going from utf-32 to
utf-8.
I didn't know that, is this already in Bugzilla?
Bye,
bearophile
I've said it before, but this man is a genius! :)
On 23 June 2013 23:33, Rainer Schuetze r.sagita...@gmx.de wrote:
On 22.06.2013 02:07, Manu wrote:
It would certainly be nice in Win32, but I tend to think Win32 COFF
should be much higher priority.
I have removed the dust from these
Am Sun, 23 Jun 2013 18:37:16 +0200
schrieb bearophile bearophileh...@lycos.com:
Adam D. Ruppe:
char[] a;
int b = 1000;
a ~= b;
the a ~= b is more like a ~= cast(dchar) b, and then dchar
- char means it may be multibyte encoded, going from utf-32 to
utf-8.
No no no, this is not
On Sunday, 23 June 2013 at 16:37:18 UTC, bearophile wrote:
I didn't know that, is this already in Bugzilla?
I don't know, but if it is, it is probably marked as won't fix
because I'm pretty sure this has come up before, but it is
actually by design because a char in C is considered an
On Sunday, 23 June 2013 at 17:12:41 UTC, Marco Leise wrote:
int b = 228; // CP850 value for 'ä'. Note: fits in a single
byte!
228 (e4 in hex) is also the Unicode code point for ä, which is
[195, 164] when encoded as UTF-8. see:
On Sunday, 23 June 2013 at 16:28:56 UTC, Andrei Alexandrescu
wrote:
foreach(ln; stdin.byLine(KeepTerminator.yes)) {
Yeah.
Would be awesome if an Apache extension would make it trivial
to write Web pages in D.
Just use cgi or fastcgi, both are really easy to configure on
apache (often
Am Sun, 23 Jun 2013 19:12:21 +0200
schrieb Marco Leise marco.le...@gmx.de:
Am Sun, 23 Jun 2013 18:37:16 +0200
schrieb bearophile bearophileh...@lycos.com:
Adam D. Ruppe:
char[] a;
int b = 1000;
a ~= b;
the a ~= b is more like a ~= cast(dchar) b, and then dchar
- char
I knew a little Go and then by chance had a look at Python. The
similarities in syntax were striking. Because of the very quick
build times, Go feels like a scripting language. However, it
really falls short on OOP. Delegates in Go can mimic inheritance
to some extend, but method overriding
On 6/23/2013 5:21 AM, dennis luehring wrote:
Am 22.06.2013 23:41, schrieb Walter Bright:
Compiling std.algorithm for unittests consumes all the memory on many machines.
I've been looking into what is allocating all that memory, and it isn't so easy
without adding instrumentation code anywhere.
On 6/23/13 10:34 AM, Adam D. Ruppe wrote:
Just use cgi or fastcgi, both are really easy to configure on apache
(often needing nothing more than copying your executable into /cgi-bin/,
or adding three lines to ,htaccess), and being separate processes, if
you crash them it is no big deal. No need
On 6/23/13 9:33 AM, monarch_dodra wrote:
BTW, kind of off topic, but since we are talking about bidirectional
ranges, and DList is the most relevant object: Do you think you would
have time to review my DList fix?
https://github.com/D-Programming-Language/phobos/pull/953
As Dmity said: are we
On Sunday, 23 June 2013 at 17:34:52 UTC, Adam D. Ruppe wrote:
Would be awesome if an Apache extension would make it trivial
to write Web pages in D.
Just use cgi or fastcgi, both are really easy to configure on
apache (often needing nothing more than copying your executable
into /cgi-bin/,
On Sunday, 23 June 2013 at 17:54:01 UTC, Andrei Alexandrescu
wrote:
On 6/23/13 10:34 AM, Adam D. Ruppe wrote:
We should do what php does, it was very successful. I assume
it's a dynamic library.
And what reason behind this other than millions of lemmings
can't be wrong? This approach is
On 6/23/13 11:04 AM, Dicebot wrote:
On Sunday, 23 June 2013 at 17:54:01 UTC, Andrei Alexandrescu wrote:
On 6/23/13 10:34 AM, Adam D. Ruppe wrote:
We should do what php does, it was very successful. I assume it's a
dynamic library.
And what reason behind this other than millions of lemmings
On 2013-06-23 15:33, Rainer Schuetze wrote:
I have removed the dust from these patches and pushed them successfully
through the test suite and unittests:
https://github.com/rainers/dmd/tree/coff32
https://github.com/rainers/druntime/tree/coff32
https://github.com/rainers/phobos/tree/coff32
On Sunday, 23 June 2013 at 18:02:04 UTC, Dicebot wrote:
I can see reasons for wanting to keep it behind reverse proxy
like nginx, but Apache?
Generally, I don't trust random http servers connected to the
open internet for correctness, stability, security, and logging.
Especially not my
On Sunday, 23 June 2013 at 18:24:05 UTC, Andrei Alexandrescu
wrote:
Would separate processes work better under high load? Educate
me.
One nice thing is you can spread separate processes across
several machines. Another advantage of *cgi|embedded_httpd is
that it is portable to other web
On 06/18/2013 09:41 PM, Walter Bright wrote: I often struggle with
understanding how github works. A problem I was
having often is that I have 3 repositories to deal with:
IMHO it's much easier to understand git from bottom up.
Git is based on a very simple object model.
It only knows 4 types
BTW I should mention, I wasn't actually trying to do an Apache
module. I wanted to do a D server that watches the files for
changes, then recompiles them as needed and reloads the resulting
file as a shared lib.
I could just run the compiled executable too, cgi style, but here
I was more
On Sunday, 23 June 2013 at 17:54:01 UTC, Andrei Alexandrescu
wrote:
I assume it's a dynamic library.
PHP can work as fastcgi too.
But I kinda want to play with this now with shared libraries
just for
something to do so maybe I will.
Awesome!
Eh, not so much. I started playing and got a
Am 20.06.2013 11:26, schrieb Jacob Carlborg:
On 2013-06-20 00:13, Paulo Pinto wrote:
The issue is not to test third party libraries, far from it.
The problem is that you cannot mock them, specially if you rely a lot on
non virtual methods or pure function calls. Or on framework code that
Cool)))
Any chances to see it [coff32] in official build?
On 2013-06-23 21:50, Paulo Pinto wrote:
No, but if your code calls something that ends up calling again other
part of your code, you might need to mock it somehow.
I'm using same approach there. If I'm testing method a and it also
calls method b. I assume method b works and I don't mock it.
https://github.com/D-Programming-Language/dmd/blob/master/src/root/stringtable.c#L21
Profiling shows the calcHash function is a significant contributor to
compilation time (3.25% of total time). So making it faster is a win. Even
making dmd 1% faster would be a nice win - all those little
On 06/23/2013 01:34 PM, monarch_dodra wrote:
...
But as soon as you need an algorithm that actually *handles* ranges:
swaps them, merges them, searches in them and splices them, then things
get hairy.
For example, try implementing a sort (either merge or q) with a
non-sliceable range... very
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds secondscalls ms/call ms/call name
5.19 0.08 0.08 945494 0.00 0.00 _aaGetRvalue(AA*, void*)
3.90 0.14 0.06 926415 0.00 0.00
On 06/23/2013 11:22 PM, Walter Bright wrote:
https://github.com/D-Programming-Language/dmd/blob/master/src/root/stringtable.c#L21
Profiling shows the calcHash function is a significant contributor to
compilation time (3.25% of total time). So making it faster is a win.
Even making dmd 1%
On 06/22/2013 11:20 AM, Dicebot wrote:
D has export keyword that I always expected to do exactly this until
have found out it is actually platform-dependent and useless.
It's buggy and useful.
http://d.puremagic.com/issues/show_bug.cgi?id=9816
We should try to strive for -fvisibility=hidden on
On 06/23/2013 06:22 PM, Walter Bright wrote:
https://github.com/D-Programming-Language/dmd/blob/master/src/root/stringtable.c#L21
Profiling shows the calcHash function is a significant contributor to
compilation time (3.25% of total time). So making
it faster is a win. Even making dmd 1%
On 06/22/2013 06:45 AM, Timothee Cour wrote:
Example2:
auto foo(){return import std.stdio;;}
mixin(foo);
void fun2(){import b;}
void main(){writeln(ok);}
lazy semantic analysis will analyze main, foo but not fun2, which is not
used. foo is analyzed because it is used in a module-level
On Sunday, 23 June 2013 at 17:54:01 UTC, Andrei Alexandrescu
wrote:
Awesome!
I realized initializing the runtime might have been a mistake
when loading the .so and moreover I was using the wrong calling
convention. Fixed that and now the shared library thing works. On
Linux at least, I
On Sunday, June 23, 2013 19:25:41 Adam D. Ruppe wrote:
On Sunday, 23 June 2013 at 16:37:18 UTC, bearophile wrote:
I didn't know that, is this already in Bugzilla?
I don't know, but if it is, it is probably marked as won't fix
because I'm pretty sure this has come up before, but it is
https://github.com/D-Programming-Language/phobos/pull/1367
comments welcome.
On 06/23/2013 11:22 PM, Walter Bright wrote:
Profiling shows the calcHash function is a significant contributor to
compilation time (3.25% of total time). So making it faster is a win.
Even making dmd 1% faster would be a nice win - all those little drops
add up.
You'll find a benchmark at
On 06/24/2013 02:23 AM, Martin Nowak wrote:
exports for anyhow.
for Windows that is
On 06/23/2013 09:20 PM, Juan Manuel Cabo wrote:
On 06/23/2013 06:22 PM, Walter Bright wrote:
https://github.com/D-Programming-Language/dmd/blob/master/src/root/stringtable.c#L21
Profiling shows the calcHash function is a significant contributor to
compilation time (3.25% of total time). So
On Sun, Jun 23, 2013 at 5:36 PM, Martin Nowak c...@dawg.eu wrote:
On 06/22/2013 06:45 AM, Timothee Cour wrote:
Example2:
auto foo(){return import std.stdio;;}
mixin(foo);
void fun2(){import b;}
void main(){writeln(ok);}
lazy semantic analysis will analyze main, foo but not
On 6/23/13 11:51 AM, Adam D. Ruppe wrote:
I think it is just an accident of history that mod_php ever got used.
Classic cgi implementations were still slow enough (especially with an
interpreted language) that people wanted to try something else, but the
other world of options hadn't taken root
can you give more context ? what was the command line to get this?
I thought lexing was not a bottleneck, yet it seems to be in second place?
On Sun, Jun 23, 2013 at 2:28 PM, Walter Bright
newshou...@digitalmars.comwrote:
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative
On Sun, Jun 23, 2013 at 2:22 PM, Walter Bright
newshou...@digitalmars.comwrote:
https://github.com/D-**Programming-Language/dmd/blob/**
master/src/root/stringtable.c#**L21https://github.com/D-Programming-Language/dmd/blob/master/src/root/stringtable.c#L21
Profiling shows the calcHash function
On 6/23/2013 8:39 PM, Timothee Cour wrote:
can you give more context ? what was the command line to get this?
Compile on Linux with -pg. Run with:
dmd -main -unittest std/algorithm
I thought lexing was not a bottleneck, yet it seems to be in second place?
The fun with profilers is they
On Sun, Jun 23, 2013 at 8:55 PM, Walter Bright
newshou...@digitalmars.comwrote:
On 6/23/2013 8:39 PM, Timothee Cour wrote:
can you give more context ? what was the command line to get this?
Compile on Linux with -pg. Run with:
dmd -main -unittest std/algorithm
I thought lexing was
Am Sun, 23 Jun 2013 17:50:01 -0700
schrieb Jonathan M Davis jmdavisp...@gmx.com:
I don't think that we even succeeded at coming close to
convincing Walter that _bool_ isn't an integral type and shouldn't be treated
as such (when it was discussed right before deconf), and that should be a far
On Monday, June 24, 2013 07:20:10 Marco Leise wrote:
Am Sun, 23 Jun 2013 17:50:01 -0700
schrieb Jonathan M Davis jmdavisp...@gmx.com:
I don't think that we even succeeded at coming close to
convincing Walter that _bool_ isn't an integral type and shouldn't be
treated as such (when it was
On Monday, 24 June 2013 at 02:39:30 UTC, Andrei Alexandrescu
wrote:
On 6/23/13 11:51 AM, Adam D. Ruppe wrote:
I think it is just an accident of history that mod_php ever
got used.
Classic cgi implementations were still slow enough (especially
with an
interpreted language) that people wanted to
https://code.google.com/p/xxhash/
BSD 2-Clause License
On 2013-06-22 23:47, Timon Gehr wrote:
No, it is arbitrary.
I think the spec says you can only mixin whole expression. But for some
reason you can use a mixin in a __traits expression without having the
whole expression in a mixin.
--
/Jacob Carlborg
On 2013-06-22 23:51, Timon Gehr wrote:
If that is the only problem then the solution is to allow overloading on
static, which is easy to do.
You still need to call the static method on the class/struct if there's
an ambiguity.
--
/Jacob Carlborg
Does anybody know some good looking or with good features?
btw, I'm wondering why is some basic version of Candy Doc bundled
with DMD.
Thanks.
On Sunday, June 23, 2013 11:30:11 Jacob Carlborg wrote:
On 2013-06-22 23:51, Timon Gehr wrote:
If that is the only problem then the solution is to allow overloading on
static, which is easy to do.
You still need to call the static method on the class/struct if there's
an ambiguity.
I
I don't see what's so terrible about it
It's bug prone.
class Foo {
public:
static void test1() { }
void test2() { }
}
Foo f;
f.test1(); /// Oh nice, that works, f is not null.
f.test2(); /// WTF? f is null?
Also I don't know why I should call static methods from an
On Sunday, June 23, 2013 12:02:42 Namespace wrote:
I don't see what's so terrible about it
It's bug prone.
class Foo {
public:
static void test1() { }
void test2() { }
}
Foo f;
f.test1(); /// Oh nice, that works, f is not null.
f.test2(); /// WTF? f is null?
I fail to
On 06/22/13 21:52, Timothee Cour wrote:
Is there a reason the language spec disallows this?
void main(){
auto a=mixin(1);//OK
alias b=a;//OK
mixin(alias c=a;);//OK
// alias c=mixin(a);//NG : Error: basic type expected, not mixin
}
How would that be different from auto c=mixin(a);?
On Sunday, 23 June 2013 at 10:09:39 UTC, Jonathan M Davis wrote:
On Sunday, June 23, 2013 12:02:42 Namespace wrote:
I don't see what's so terrible about it
It's bug prone.
class Foo {
public:
static void test1() { }
void test2() { }
}
Foo f;
f.test1(); /// Oh nice, that
On Sunday, June 23, 2013 12:48:15 monarch_dodra wrote:
C++ doesn't allow it. I don't know about the rest.
Yes it does. I just tested it. This code compiles and runs just fine
#include iostream
using namespace std;
class C
{
public:
static void foo()
{
cout I'm static! endl;
I'm trying to create a fairly generic component system, where an
object iterates over a bunch of other objects that all implement
a certain interface.
And this all works fine, however, I would also like to be able to
get objects of a specific type (a la instanceOf), and I can't
figure out how
On Sunday, 23 June 2013 at 11:04:59 UTC, Lemonfiend wrote:
I'm trying to create a fairly generic component system, where
an object iterates over a bunch of other objects that all
implement a certain interface.
And this all works fine, however, I would also like to be able
to get objects of a
On Sunday, 23 June 2013 at 10:59:06 UTC, Jonathan M Davis wrote:
On Sunday, June 23, 2013 12:48:15 monarch_dodra wrote:
C++ doesn't allow it. I don't know about the rest.
Yes it does.
- Jonathan M Davis
Oh. Wow. That's news to me actually. I thought I new everything
about C++ ^^
Am 23.06.2013 11:47, schrieb Michal Minich:
Does anybody know some good looking or with good features?
btw, I'm wondering why is some basic version of Candy Doc bundled with DMD.
Thanks.
There is cuteDoc: https://github.com/JakobOvrum/cuteDoc - But it seems
like Robik deleted his repo...
On 06/23/13 13:23, Timon Gehr wrote:
On 06/23/2013 12:19 PM, Artur Skawina wrote:
On 06/22/13 21:52, Timothee Cour wrote:
Is there a reason the language spec disallows this?
void main(){
auto a=mixin(1);//OK
alias b=a;//OK
mixin(alias c=a;);//OK
// alias
Is this code available in any repo/archive somewhere?
/Per
I am thinking about opening an enhancement request, but this time
I first prefer to ask your opinion here.
For this code:
void main() {
ubyte x;
ubyte y = x 1;
}
The range analysis determines that it's conceivable to the result
of that expression to not fit in y, so the D compiler
1 - 100 of 140 matches
Mail list logo