Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread Timon Gehr
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

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread Peter Alexander
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.

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread maarten van damme
attention: don't feed the troll

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Timon Gehr
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread bearophile
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:

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Timon Gehr
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Peter Alexander
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Peter Alexander
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Andrei Alexandrescu
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

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread Walter Bright
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.

Re: Issue 4705

2011-09-19 Thread Simen Kjaeraas
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Timon Gehr
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:

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Timon Gehr
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.

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Nick Sabalausky
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 '$'.

Re: Issue 4705

2011-09-19 Thread Timon Gehr
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

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread Walter Bright
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.

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Andrei Alexandrescu
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Timon Gehr
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)

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Andrei Alexandrescu
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Timon Gehr
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.

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread dsimcha
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Andrei Alexandrescu
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread dsimcha
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; }

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Timon Gehr
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.

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread Xavier
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?

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Timon Gehr
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; }

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread Xavier
maarten van damme wrote: attention: don't feed the troll attemtion: don't vote for the politician, or simply don't vote.

:P

2011-09-19 Thread Xavier
you and your states attorney, you are not me

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Simen Kjaeraas
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[]

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Simen Kjaeraas
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 =

Herb Sutter: Writing modern C++

2011-09-19 Thread %u
nice video by the way he mentioned Andrei Alexandrescu around 12:00

Re: Herb Sutter: Writing modern C++

2011-09-19 Thread Peter Alexander
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

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread Peter Alexander
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.

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread dsimcha
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Simen Kjaeraas
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.

newsgroup problems?

2011-09-19 Thread maarten van damme
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

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread Walter Bright
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.

Re: Should unreachable code be considered an error?

2011-09-19 Thread Stewart Gordon
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();

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread dsimcha
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

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread Trass3r
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

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread mountain.li
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

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread Walter Bright
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

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread Trass3r
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

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread dsimcha
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

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread Trass3r
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

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread Trass3r
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

Is Something Broken

2011-09-19 Thread Andrew Wiley
Or has there actually been no ML traffic today?

what

2011-09-19 Thread Xavier
I dunno, I'm just hoping

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread Trass3r
Oh, I think it also doesn't turn #ifdefs into version()s so you potentially lose another big chunk of information.

D: ingorace is bliss

2011-09-19 Thread Xavier
The subjec says it all.

Re: Formal Review of region allocator begins

2011-09-19 Thread Robert Jacques
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

please help me

2011-09-19 Thread Xavier
I need help.

In my whole life

2011-09-19 Thread Xavier
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

I love Denise from afar

2011-09-19 Thread Xavier
in my whole life, it really sucks if you liked me a little

well I'm a grown up now

2011-09-19 Thread Xavier
why did you take her away from me?

I guess I am so bad

2011-09-19 Thread Xavier
what what?

Is D a POS?

2011-09-19 Thread Xavier
I can't fathom that it's chief desingner would chime in on this theaad. Huh, Walter.

Re: Issue 4705

2011-09-19 Thread Christophe
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

Re: Unittesting in static libraries

2011-09-19 Thread Steven Schveighoffer
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

DMD 2.055 and 2.054 in Gentoo

2011-09-19 Thread Marco Leise
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.

Re: Issue 4705

2011-09-19 Thread Kagamin
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

Re: Unittesting in static libraries

2011-09-19 Thread Steven Schveighoffer
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

D User Group (DUG) in London - who would be interested in attending?

2011-09-19 Thread Iain Buclaw
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Steven Schveighoffer
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

Is there a CPAN, CheeseShop, Hackage or NPM for D?

2011-09-19 Thread Chris Dew
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,

Re: Issue 4705

2011-09-19 Thread Kagamin
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.

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Timon Gehr
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Steven Schveighoffer
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Timon Gehr
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Steven Schveighoffer
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:

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Timon Gehr
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Steven Schveighoffer
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Timon Gehr
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Andrei Alexandrescu
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Steven Schveighoffer
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Steven Schveighoffer
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

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread renoX
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++

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Timon Gehr
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Kagamin
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.

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Steven Schveighoffer
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Andrei Alexandrescu
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Timon Gehr
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Robert Jacques
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.

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Steven Schveighoffer
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:

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Steven Schveighoffer
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

Re: Is there a CPAN, CheeseShop, Hackage or NPM for D?

2011-09-19 Thread Jacob Carlborg
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

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread Trass3r
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

Incomplete knowledge + all powerful casts = troubles

2011-09-19 Thread bearophile
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Steven Schveighoffer
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

Re: Incomplete knowledge + all powerful casts = troubles

2011-09-19 Thread Steven Schveighoffer
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

Re: Go and generic programming on reddit, also touches on D

2011-09-19 Thread Andrei Alexandrescu
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)

Re: Unittesting in static libraries

2011-09-19 Thread Rainer Schuetze
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)

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread Jacob Carlborg
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

Re: Incomplete knowledge + all powerful casts = troubles

2011-09-19 Thread Steven Schveighoffer
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

Re: Incomplete knowledge + all powerful casts = troubles

2011-09-19 Thread Trass3r
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

Re: Unittesting in static libraries

2011-09-19 Thread Steven Schveighoffer
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

Re: Incomplete knowledge + all powerful casts = troubles

2011-09-19 Thread Steven Schveighoffer
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

Re: DMD 2.055 and 2.054 in Gentoo

2011-09-19 Thread Alex Rønne Petersen
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

Re: Is Something Broken

2011-09-19 Thread Jonathan M Davis
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

Re: Would You Bet $100,000,000 on D?

2011-09-19 Thread Trass3r
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   2   >