On 09/18/2011 05:41 AM, Xavier wrote:
Timon Gehr wrote:
On 09/17/2011 10:57 AM, Josh Simmons wrote:
On Sat, Sep 17, 2011 at 6:46 PM, Nick Sabalauskya@a.a wrote:
Are you seriously trying say that that implies each successive one
is inherently no better than the previous? If so, then that's
On 18/09/11 8:59 AM, Marco Leise wrote:
Am 17.09.2011, 22:33 Uhr, schrieb Peter Alexander
peter.alexander...@gmail.com:
On 17/09/11 7:52 PM, Marco Leise wrote:
Am 17.09.2011, 20:01 Uhr, schrieb Adam D. Ruppe
destructiona...@gmail.com:
Ah, that explains it. I usually don't use the -O switch.
attention: don't feed the troll
On 09/18/2011 03:48 AM, Andrei Alexandrescu wrote:
Quite interesting.
http://www.reddit.com/r/programming/comments/kikut/think_in_go_gos_alternative_to_the/
2 hours ago, Andrei Alexandrescu wrote:
The problem is, Vector was just an example of a multitude of
containers. The huge problem
Andrei Alexandrescu:
In that thread you have said:
http://www.reddit.com/r/programming/comments/kikut/think_in_go_gos_alternative_to_the/c2krft0
I'm interested in furthering D's grok of dependent types.
This blog post shows some basic nice examples of dependent types in ATS
language:
On 09/18/2011 07:16 PM, Peter Alexander wrote:
On 18/09/11 5:08 PM, Timon Gehr wrote:
On 09/18/2011 03:48 AM, Andrei Alexandrescu wrote:
Quite interesting.
http://www.reddit.com/r/programming/comments/kikut/think_in_go_gos_alternative_to_the/
2 hours ago, Andrei Alexandrescu wrote:
The
On 18/09/11 5:08 PM, Timon Gehr wrote:
On 09/18/2011 03:48 AM, Andrei Alexandrescu wrote:
Quite interesting.
http://www.reddit.com/r/programming/comments/kikut/think_in_go_gos_alternative_to_the/
2 hours ago, Andrei Alexandrescu wrote:
The problem is, Vector was just an example of a
On 18/09/11 6:55 PM, Timon Gehr wrote:
On 09/18/2011 07:16 PM, Peter Alexander wrote:
On 18/09/11 5:08 PM, Timon Gehr wrote:
On 09/18/2011 03:48 AM, Andrei Alexandrescu wrote:
Quite interesting.
http://www.reddit.com/r/programming/comments/kikut/think_in_go_gos_alternative_to_the/
2
On 9/18/11 11:08 AM, Timon Gehr wrote:
On 09/18/2011 03:48 AM, Andrei Alexandrescu wrote:
Quite interesting.
http://www.reddit.com/r/programming/comments/kikut/think_in_go_gos_alternative_to_the/
2 hours ago, Andrei Alexandrescu wrote:
The problem is, Vector was just an example of a
On 9/18/2011 2:49 AM, Peter Alexander wrote:
Unity builds help a lot with link time.
dmd does something similar if you build an executable by putting multiple
modules on the command line. It will create one big object file, instead of one
per module.
On Sat, 17 Sep 2011 16:06:44 +0200, Timon Gehr timon.g...@gmx.ch wrote:
xyz!ab([1,2,3,1,2,3]) is 1
xyz!ab([1,2,3,1,2,3]) is 3
Question is what's a good name for xyz. It returns the element X of the
range such that pred(E, X) is false for all E in the range. Then we'd
defined xyzCount and
On 09/18/2011 08:28 PM, Andrei Alexandrescu wrote:
On 9/18/11 11:08 AM, Timon Gehr wrote:
On 09/18/2011 03:48 AM, Andrei Alexandrescu wrote:
Quite interesting.
http://www.reddit.com/r/programming/comments/kikut/think_in_go_gos_alternative_to_the/
2 hours ago, Andrei Alexandrescu wrote:
On 09/18/2011 08:17 PM, Peter Alexander wrote:
On 18/09/11 6:55 PM, Timon Gehr wrote:
On 09/18/2011 07:16 PM, Peter Alexander wrote:
On 18/09/11 5:08 PM, Timon Gehr wrote:
On 09/18/2011 03:48 AM, Andrei Alexandrescu wrote:
Quite interesting.
Timon Gehr timon.g...@gmx.ch wrote in message
news:j55h4f$1ia5$1...@digitalmars.com...
The only advantages slices have left
are (a) type syntax, i.e. T[] instead of Slice!T, (b) literal syntax,
i.e. [ 1, 2, 3 ] instead of slice(1, 2, 3), and (c) a couple of stray
language bugs such as '$'.
On 09/18/2011 09:38 PM, Simen Kjaeraas wrote:
On Sat, 17 Sep 2011 16:06:44 +0200, Timon Gehr timon.g...@gmx.ch wrote:
xyz!ab([1,2,3,1,2,3]) is 1
xyz!ab([1,2,3,1,2,3]) is 3
Question is what's a good name for xyz. It returns the element X of the
range such that pred(E, X) is false for all E in
On 9/18/2011 3:27 AM, Jérôme M. Berger wrote:
Note that you can also use partial linking to help with link times
while iterating development on large projects. At least on Linux
(with the -r or -i options to ld), I do not know about optlink.
Optlink does not do incremental linking.
On 9/18/11 2:34 PM, Timon Gehr wrote:
On 09/18/2011 08:28 PM, Andrei Alexandrescu wrote:
On 9/18/11 11:08 AM, Timon Gehr wrote:
On 09/18/2011 03:48 AM, Andrei Alexandrescu wrote:
Quite interesting.
http://www.reddit.com/r/programming/comments/kikut/think_in_go_gos_alternative_to_the/
2
On 09/18/2011 09:46 PM, Nick Sabalausky wrote:
Timon Gehrtimon.g...@gmx.ch wrote in message
news:j55h4f$1ia5$1...@digitalmars.com...
The only advantages slices have left
are (a) type syntax, i.e. T[] instead of Slice!T, (b) literal syntax,
i.e. [ 1, 2, 3 ] instead of slice(1, 2, 3), and (c)
On 9/18/11 2:46 PM, Nick Sabalausky wrote:
Timon Gehrtimon.g...@gmx.ch wrote in message
news:j55h4f$1ia5$1...@digitalmars.com...
The only advantages slices have left
are (a) type syntax, i.e. T[] instead of Slice!T, (b) literal syntax,
i.e. [ 1, 2, 3 ] instead of slice(1, 2, 3), and (c) a
On 09/18/2011 10:09 PM, Andrei Alexandrescu wrote:
On 9/18/11 2:46 PM, Nick Sabalausky wrote:
Timon Gehrtimon.g...@gmx.ch wrote in message
news:j55h4f$1ia5$1...@digitalmars.com...
The only advantages slices have left
are (a) type syntax, i.e. T[] instead of Slice!T, (b) literal syntax,
i.e.
On 9/18/2011 4:09 PM, Andrei Alexandrescu wrote:
opDollar is more powerful because it can be made to work with infinite
ranges.
Andrei
Yes, this is important. IMHO, though, the default behavior of the $
operator should be to call range.length if it exists and opDollar isn't
explicitly
On 9/18/11 3:19 PM, dsimcha wrote:
On 9/18/2011 4:09 PM, Andrei Alexandrescu wrote:
opDollar is more powerful because it can be made to work with infinite
ranges.
Andrei
Yes, this is important. IMHO, though, the default behavior of the $
operator should be to call range.length if it exists
On 9/18/2011 4:16 PM, Timon Gehr wrote:
What would it return?
A dummy type, e.g.:
struct Repeat(T) {
T val;
T front() @property { return val; }
void popFront() {}
enum empty = false;
static struct Dollar {}
Dollar opDollar() {
return Dollar.init;
}
On 09/18/2011 10:06 PM, Andrei Alexandrescu wrote:
On 9/18/11 2:34 PM, Timon Gehr wrote:
On 09/18/2011 08:28 PM, Andrei Alexandrescu wrote:
On 9/18/11 11:08 AM, Timon Gehr wrote:
On 09/18/2011 03:48 AM, Andrei Alexandrescu wrote:
Quite interesting.
Timon Gehr wrote:
On 09/18/2011 05:41 AM, Xavier wrote:
Timon Gehr wrote:
On 09/17/2011 10:57 AM, Josh Simmons wrote:
On Sat, Sep 17, 2011 at 6:46 PM, Nick Sabalauskya@a.a wrote:
Are you seriously trying say that that implies each successive one
is inherently no better than the previous?
On 09/18/2011 10:21 PM, dsimcha wrote:
On 9/18/2011 4:16 PM, Timon Gehr wrote:
What would it return?
A dummy type, e.g.:
struct Repeat(T) {
T val;
T front() @property { return val; }
void popFront() {}
enum empty = false;
static struct Dollar {}
Dollar opDollar() {
return Dollar.init;
}
maarten van damme wrote:
attention: don't feed the troll
attemtion: don't vote for the politician, or simply don't vote.
you and your states attorney, you are not me
On Sun, 18 Sep 2011 22:09:19 +0200, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 9/18/11 2:46 PM, Nick Sabalausky wrote:
Timon Gehrtimon.g...@gmx.ch wrote in message
news:j55h4f$1ia5$1...@digitalmars.com...
The only advantages slices have left
are (a) type syntax, i.e. T[]
On Sun, 18 Sep 2011 22:37:03 +0200, Timon Gehr timon.g...@gmx.ch wrote:
On 09/18/2011 10:21 PM, dsimcha wrote:
On 9/18/2011 4:16 PM, Timon Gehr wrote:
What would it return?
A dummy type, e.g.:
struct Repeat(T) {
T val;
T front() @property { return val; }
void popFront() {}
enum empty =
nice video
by the way he mentioned Andrei Alexandrescu around 12:00
On 18/09/11 10:14 PM, %u wrote:
nice video
by the way he mentioned Andrei Alexandrescu around 12:00
Link, for those that want to watch it :-)
http://channel9.msdn.com/Events/BUILD/BUILD2011/TOOL-835T
On 18/09/11 7:59 PM, Walter Bright wrote:
On 9/18/2011 2:49 AM, Peter Alexander wrote:
Unity builds help a lot with link time.
dmd does something similar if you build an executable by putting
multiple modules on the command line. It will create one big object
file, instead of one per module.
On 9/18/2011 4:32 PM, Andrei Alexandrescu wrote:
struct MyRange
{
...
alias length opDollar;
}
I do agree that most of the time this is what you want anyway, so that
line would occur a lot of times...
Andrei
The problem with this is that everything in std.algorithm and std.range
would have
On Sun, 18 Sep 2011 22:32:44 +0200, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 9/18/11 3:19 PM, dsimcha wrote:
On 9/18/2011 4:09 PM, Andrei Alexandrescu wrote:
opDollar is more powerful because it can be made to work with infinite
ranges.
Andrei
Yes, this is important.
I have a strange problem, I hope here is the right place to post it.
I get no new mail or replies posted on the newsgroup on my email adress and
when I ask the web interface to send my password to my mail adress it
doesn't do it.
I can however see further discussions on the web interface. am I the
On 9/18/2011 3:33 PM, Peter Alexander wrote:
Does dmd also cache commonly imported modules in this case?
e.g.
// foo.d
/+ lots of code +/
// bar.d
import foo;
// baz.d
import foo;
dmd foo.d bar.d baz.d
How many times is foo parsed? Once?
Once.
On 31/08/2011 09:56, Don wrote:
snip
What if range.empty is simply the compile-time constant 'false'?
That's exactly the case I've just covered.
Isn't:
if (false) {...}
unreachable code?
If it doesn't create an error, what would?
doSomething();
return;
doSomethingElse();
On 9/18/2011 9:00 PM, Trass3r wrote:
We really need a proper tool to convert C/C++ headers, probably based on
Clang.
That way one could even add partial conversion support for source files
afterwards to ease porting.
And C++ interoperability needs to be improved.
It's just insane to wrap a
3. Depending on what the project was, I would probably be worried about
available libraries. If, for example, the project required the use of
DirectX, I'd just use C++.
That's a major problem.
With D you spend way too much time creating bindings or even wrappers to
access external
Peter Alexander Wrote:
Yes
I recently stumbled across this (old) blog post:
http://prog21.dadgum.com/13.html
In summary, the author asks if you were offered $100,000,000 for some
big software project, would you use your pet programming language?
This is interesting, because if we
On 9/18/2011 6:06 PM, dsimcha wrote:
I imagine C++ would be virtually impossible, but how hard can it possibly be to
translate **non-preprocessor-abusing** C code to D? D is almost a superset of C.
The only incompatibilities I can think of are the preprocessor/module system,
bitfields, and some
Am 19.09.2011, 03:06 Uhr, schrieb dsimcha dsim...@yahoo.com:
On 9/18/2011 9:00 PM, Trass3r wrote:
And C++ interoperability needs to be improved.
It's just insane to wrap a monster like Qt in C code and then recreating
the whole class hierarchy at the D site - both performance and
executable
On 9/18/2011 9:18 PM, Walter Bright wrote:
On 9/18/2011 6:06 PM, dsimcha wrote:
I imagine C++ would be virtually impossible, but how hard can it
possibly be to
translate **non-preprocessor-abusing** C code to D? D is almost a
superset of C.
The only incompatibilities I can think of are the
Am 19.09.2011, 03:06 Uhr, schrieb dsimcha dsim...@yahoo.com:
how hard can it possibly be to translate **non-preprocessor-abusing** C
code to D? D is almost a superset of C. The only incompatibilities I
can think of are the preprocessor/module system, bitfields, and some
minor syntactic
http://www.digitalmars.com/d/2.0/htod.html
It's windows-only, discards const, doesn't turn static arrays into
pointers IIRC and it depends on the dmc toolchain and system includes, so
the library you want to use basically needs to be compatible with dmc.
All in all I'm much faster with a
Or has there actually been no ML traffic today?
I dunno, I'm just hoping
Oh, I think it also doesn't turn #ifdefs into version()s so you
potentially lose another big chunk of information.
The subjec says it all.
On Sat, 17 Sep 2011 23:28:58 -0400, dsimcha dsim...@yahoo.com wrote:
Ok, implemented. It definitely makes the design cleaner. Thanks again.
The delay was just because I had waited a while to see if any other
comments came up that would make me change my mind or turn the whole
design upside
I need help.
I remeber everything. how could I say I love Denise? I came from where?
This is a true story I still don't know?
I want them both here with me
in my whole life, it really sucks if you liked me a little
why did you take her away from me?
what what?
I can't fathom that it's chief desingner would chime in on this theaad.
Huh, Walter.
Simen Kjaeraas , dans le message (digitalmars.D:144599), a écrit :
That said, there are cases where a b is not enough, owing to some
types not having a nice and simple comparison. Hence, binary
predicates should also be allowed. I just feel that in the general
case, binary predicates dilute
On Sat, 17 Sep 2011 11:11:35 -0400, Jérôme M. Berger jeber...@free.fr
wrote:
Steven Schveighoffer wrote:
On Fri, 16 Sep 2011 15:14:50 -0400, Jérôme M. Berger jeber...@free.fr
wrote:
Andrej Mitrovic wrote:
I'd like to turn some attention to unittests, which don't seem to work
with static
This is just a quick note, that I added two ebuilds for DMD to the sunrise
overlay. If you use Gentoo, type *:
layman -a sunrise
emerge dmd
* That requires an installed layman and unmasked dev-lang/dmd.
Andrei Alexandrescu Wrote:
On 9/16/11 4:33 AM, Kagamin wrote:
Jonathan M Davis Wrote:
I think that that's up for debate. I would fully expect a min/max function
to
be using a comparator function, which means using a binary predicate.
1. how would they treat the function?
2. do
On Sat, 17 Sep 2011 01:34:35 -0400, Rainer Schuetze r.sagita...@gmx.de
wrote:
I think the main issue here is that a module that is compiled to a
library, is split into a lot of small object files (one for each
function or global variable) before being combined to the library. This
allows
Some of us Great British IRC users in #d have been discussing this for some
time now, but now we'd like to see this organised and put into fruition. :)
Dejan as a KCL student thinks he should be able to arrange a conference there,
and if not, has friends at UCL. So if we can managed to get this
On Sun, 18 Sep 2011 15:34:16 -0400, Timon Gehr timon.g...@gmx.ch wrote:
On 09/18/2011 08:28 PM, Andrei Alexandrescu wrote:
That would allow us to e.g. switch from the
pointer+length representation to the arguably better pointer+pointer
representation with ease.
In what way is that
Hi,
Apologies if this post appears twice - it hadn't appeared on the
website after 2 hours had passed, so I'm reposting it directly on
the website, rather than via email.
I've just successfully used D for tiny commercial project, and I've
really enjoyed it (I normally use Python, Java or NodeJS,
Andrei Alexandrescu Wrote:
I just figured an annoying case for sort through mapping: how would one
sort a range of ulong descending? Or a range of pointers for that matter?
Sort ascending and reverse.
On 09/19/2011 01:25 PM, Steven Schveighoffer wrote:
On Sun, 18 Sep 2011 15:34:16 -0400, Timon Gehr timon.g...@gmx.ch wrote:
On 09/18/2011 08:28 PM, Andrei Alexandrescu wrote:
That would allow us to e.g. switch from the
pointer+length representation to the arguably better pointer+pointer
On Sun, 18 Sep 2011 16:16:23 -0400, Timon Gehr timon.g...@gmx.ch wrote:
On 09/18/2011 10:09 PM, Andrei Alexandrescu wrote:
On 9/18/11 2:46 PM, Nick Sabalausky wrote:
Timon Gehrtimon.g...@gmx.ch wrote in message
news:j55h4f$1ia5$1...@digitalmars.com...
The only advantages slices have left
On 09/19/2011 01:15 PM, Steven Schveighoffer wrote:
On Sun, 18 Sep 2011 16:16:23 -0400, Timon Gehr timon.g...@gmx.ch wrote:
On 09/18/2011 10:09 PM, Andrei Alexandrescu wrote:
On 9/18/11 2:46 PM, Nick Sabalausky wrote:
Timon Gehrtimon.g...@gmx.ch wrote in message
On Mon, 19 Sep 2011 09:49:14 -0400, Timon Gehr timon.g...@gmx.ch wrote:
On 09/19/2011 01:15 PM, Steven Schveighoffer wrote:
On Sun, 18 Sep 2011 16:16:23 -0400, Timon Gehr timon.g...@gmx.ch
wrote:
On 09/18/2011 10:09 PM, Andrei Alexandrescu wrote:
On 9/18/11 2:46 PM, Nick Sabalausky wrote:
On 09/19/2011 04:02 PM, Steven Schveighoffer wrote:
On Mon, 19 Sep 2011 09:49:14 -0400, Timon Gehr timon.g...@gmx.ch wrote:
On 09/19/2011 01:15 PM, Steven Schveighoffer wrote:
On Sun, 18 Sep 2011 16:16:23 -0400, Timon Gehr timon.g...@gmx.ch
wrote:
On 09/18/2011 10:09 PM, Andrei Alexandrescu
On Mon, 19 Sep 2011 10:24:33 -0400, Timon Gehr timon.g...@gmx.ch wrote:
On 09/19/2011 04:02 PM, Steven Schveighoffer wrote:
So I think it's not only limiting to require x.length to be $, it's very
wrong in some cases.
Also, think of a string. It has no length (well technically, it does,
but
On 09/19/2011 04:08 PM, Andrei Alexandrescu wrote:
On 9/19/11 6:25 AM, Steven Schveighoffer wrote:
On Sun, 18 Sep 2011 15:34:16 -0400, Timon Gehr timon.g...@gmx.ch wrote:
On 09/18/2011 08:28 PM, Andrei Alexandrescu wrote:
That would allow us to e.g. switch from the
pointer+length
On 9/19/11 6:25 AM, Steven Schveighoffer wrote:
On Sun, 18 Sep 2011 15:34:16 -0400, Timon Gehr timon.g...@gmx.ch wrote:
On 09/18/2011 08:28 PM, Andrei Alexandrescu wrote:
That would allow us to e.g. switch from the
pointer+length representation to the arguably better pointer+pointer
On Mon, 19 Sep 2011 10:08:32 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 9/19/11 6:25 AM, Steven Schveighoffer wrote:
On Sun, 18 Sep 2011 15:34:16 -0400, Timon Gehr timon.g...@gmx.ch
wrote:
On 09/18/2011 08:28 PM, Andrei Alexandrescu wrote:
That would allow us to
On Mon, 19 Sep 2011 10:38:21 -0400, Steven Schveighoffer
schvei...@yahoo.com wrote:
For example a = a[1..$] shouldn't have to calculate a.length, it should
just be a.ptr += 5.
oops, victim of half-editing there :)
Meant to say a = a[5..$]
-Steve
Python is a great Python but an awful C++, not to mention the
converse. D, on the other hand, is arguably a much better C++ and
also a pretty good Python.
Pretty good as in pretty bad for integer operations where Python3
use big int and D silently corrupt your data in case of overflow
like C/C++
On 09/19/2011 04:43 PM, Steven Schveighoffer wrote:
On Mon, 19 Sep 2011 10:24:33 -0400, Timon Gehr timon.g...@gmx.ch wrote:
On 09/19/2011 04:02 PM, Steven Schveighoffer wrote:
So I think it's not only limiting to require x.length to be $, it's very
wrong in some cases.
Also, think of a
Steven Schveighoffer Wrote:
auto set = new TreeSet!uint(1, 3, 5, 7, 9);
assert(set.length == 5);
auto range = set[1..set.length];
assert(walkLength(range) == 2); // probably not what you expected
Where you got that 1?
How to slice it from begin to 7?
Looks like an operator overload abuse.
On Mon, 19 Sep 2011 11:03:15 -0400, Timon Gehr timon.g...@gmx.ch wrote:
On 09/19/2011 04:43 PM, Steven Schveighoffer wrote:
On Mon, 19 Sep 2011 10:24:33 -0400, Timon Gehr timon.g...@gmx.ch
wrote:
On 09/19/2011 04:02 PM, Steven Schveighoffer wrote:
So I think it's not only limiting to
On 9/19/11 10:46 AM, Robert Jacques wrote:
So, on balance, I'd say the two pointers representation is categorically
worse than the fat pointer representation.
Benchmark. A few of your assumptions don't hold.
Andrei
On 09/19/2011 05:52 PM, Steven Schveighoffer wrote:
On Mon, 19 Sep 2011 11:03:15 -0400, Timon Gehr timon.g...@gmx.ch wrote:
On 09/19/2011 04:43 PM, Steven Schveighoffer wrote:
On Mon, 19 Sep 2011 10:24:33 -0400, Timon Gehr timon.g...@gmx.ch
wrote:
On 09/19/2011 04:02 PM, Steven
On Mon, 19 Sep 2011 10:08:32 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 9/19/11 6:25 AM, Steven Schveighoffer wrote:
On Sun, 18 Sep 2011 15:34:16 -0400, Timon Gehr timon.g...@gmx.ch wrote:
On 09/18/2011 08:28 PM, Andrei Alexandrescu wrote:
That would allow us to e.g.
On Mon, 19 Sep 2011 11:46:44 -0400, Robert Jacques sandf...@jhu.edu
wrote:
On Mon, 19 Sep 2011 10:08:32 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 9/19/11 6:25 AM, Steven Schveighoffer wrote:
On Sun, 18 Sep 2011 15:34:16 -0400, Timon Gehr timon.g...@gmx.ch
wrote:
On Mon, 19 Sep 2011 11:17:01 -0400, Kagamin s...@here.lot wrote:
Steven Schveighoffer Wrote:
auto set = new TreeSet!uint(1, 3, 5, 7, 9);
assert(set.length == 5);
auto range = set[1..set.length];
assert(walkLength(range) == 2); // probably not what you expected
Where you got that 1?
1 is
On 2011-09-19 13:16, Chris Dew wrote:
Hi,
Apologies if this post appears twice - it hadn't appeared on the
website after 2 hours had passed, so I'm reposting it directly on
the website, rather than via email.
I've just successfully used D for tiny commercial project, and I've
really enjoyed it
Am 19.09.2011, 18:43 Uhr, schrieb Jacob Carlborg d...@me.com:
We really need a proper tool to convert C/C++ headers, probably based on
Clang.
It's in the works: https://github.com/jacob-carlborg/clang
It's currently most focused on porting Objective-C headers. Don't count
on it in the near
This is a simplified version of some older D code of mine.
The cast is needed to convert int-uint:
uint foo(T)(T x) if (is(T == uint)) {
uint ans = 0;
while (x = 1)
ans++;
return ans;
}
void bar(int x) {
auto xx = foo(cast(uint)x);
}
void main() {}
I have improved it
On Mon, 19 Sep 2011 12:00:46 -0400, Timon Gehr timon.g...@gmx.ch wrote:
On 09/19/2011 05:52 PM, Steven Schveighoffer wrote:
$ should denote the end point of the aggregate, but it does not have to
be equivalent to length, or even an integer/uint. It should just mean
end.
Point taken. What
On Mon, 19 Sep 2011 13:23:32 -0400, bearophile bearophileh...@lycos.com
wrote:
This is a simplified version of some older D code of mine.
The cast is needed to convert int-uint:
uint foo(T)(T x) if (is(T == uint)) {
uint ans = 0;
while (x = 1)
ans++;
return ans;
}
void
On 9/19/11 11:12 AM, Andrei Alexandrescu wrote:
On 9/19/11 10:46 AM, Robert Jacques wrote:
So, on balance, I'd say the two pointers representation is categorically
worse than the fat pointer representation.
Benchmark. A few of your assumptions don't hold.
Andrei
s/don't/may not/
:o)
On 9/19/2011 3:55 AM, Steven Schveighoffer wrote:
On Sat, 17 Sep 2011 01:34:35 -0400, Rainer Schuetze r.sagita...@gmx.de
wrote:
I think the main issue here is that a module that is compiled to a
library, is split into a lot of small object files (one for each
function or global variable)
On 2011-09-19 03:00, Trass3r wrote:
3. Depending on what the project was, I would probably be worried
about available libraries. If, for example, the project required the
use of DirectX, I'd just use C++.
That's a major problem.
With D you spend way too much time creating bindings or even
On Mon, 19 Sep 2011 13:54:20 -0400, Trass3r u...@known.com wrote:
Unfortunately now the code contains a small bug. The cast now converts
const(int)-uint, and foo() will modify a const value, that gives
undefined effects in D2.
I get the point, but in this particular case it's not a real
Unfortunately now the code contains a small bug. The cast now converts
const(int)-uint, and foo() will modify a const value, that gives
undefined effects in D2.
I get the point, but in this particular case it's not a real bug since foo
doesn't take it by ref.
The int is copied anyways, no
On Mon, 19 Sep 2011 22:40:06 -0400, Rainer Schuetze r.sagita...@gmx.de
wrote:
On 9/19/2011 3:55 AM, Steven Schveighoffer wrote:
On Sat, 17 Sep 2011 01:34:35 -0400, Rainer Schuetze r.sagita...@gmx.de
wrote:
I think the main issue here is that a module that is compiled to a
library, is
On Mon, 19 Sep 2011 14:01:02 -0400, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Mon, 19 Sep 2011 13:54:20 -0400, Trass3r u...@known.com wrote:
Unfortunately now the code contains a small bug. The cast now converts
const(int)-uint, and foo() will modify a const value, that gives
On 19-09-2011 10:20, Marco Leise wrote:
This is just a quick note, that I added two ebuilds for DMD to the
sunrise overlay. If you use Gentoo, type *:
layman -a sunrise
emerge dmd
* That requires an installed layman and unmasked dev-lang/dmd.
Cool, thanks!
- Alex
Looking at the web client, it looks stuff has been being
posted today, but nothing is being e-mailed to me, so I think
that something is broken with the mailing list.
- Jonathan M Davis
It does use the rewrite facilities. Maybe I said it was a hack how it's
incorporated with clang. It's not built as a plugin and it doesn't use
clang as a library. The repository contains the whole clang source code
and I've added a new rewriter. It works just as the existing Objective-C
1 - 100 of 165 matches
Mail list logo