Re: [std.concurrency] prioritySend is 1000 times slower than send?

2010-09-29 Thread Denis Koroskin
On Wed, 29 Sep 2010 22:31:53 +0400, Steven Schveighoffer wrote: On Wed, 29 Sep 2010 14:25:07 -0400, osa wrote: P.S. demangle program example at http://www.digitalmars.com/d/2.0/phobos/std_demangle.html is broken -- it does not compile. P.P.S. std.demangle fails for some symbols, for e

Re: [contest] Is a Cow an animal ++

2010-09-29 Thread BCS
Hello Simen, BCS wrote: Checking that the sequence of member function calls on an object is valid is limited by how good your static analysts is. The type system *can't* help you as the exact same code may or may not be valid depending on arbitrary external aspects. You are of course correc

Re: Container Contravariance was Re: [typing] Type-erasure re generics

2010-09-29 Thread Jonathan M Davis
On Wednesday, September 29, 2010 16:19:48 Jesse Phillips wrote: > Jonathan M Davis Wrote: > > > Ok, then let us actually test that and show it is valid[1]: > > > > > > class A {} > > > class B:A {} > > > > > > void main() { > > > > > > A[] a = new B[6]; > > > a[0] = new A(); > > > > > >

Re: Container Contravariance was Re: [typing] Type-erasure re generics

2010-09-29 Thread Jesse Phillips
Jonathan M Davis Wrote: > > Ok, then let us actually test that and show it is valid[1]: > > > > class A {} > > class B:A {} > > > > void main() { > > A[] a = new B[6]; > > a[0] = new A(); > > } > > > > 1. http://ideone.com/5sUZt > > > > I have shown that what I am talking about is vali

Re: Fedora 14 will integrate D into the distribution

2010-09-29 Thread Iain Buclaw
== Quote from Seth Hoenig (seth.a.hoe...@gmail.com)'s article > --0016e6498b1e65d61504916adc7e > Content-Type: text/plain; charset=ISO-8859-1 > > Currently doing a marathon sprint to merge D2 frontend with 2.025 by the > > end of > > the month, or within the first week of next month, depending on h

Re: where to find Implements!

2010-09-29 Thread Jonathan M Davis
On Wednesday, September 29, 2010 13:49:23 BLS wrote: > Implements!(*I*MyInterface) // where IMyInterface is a plain vanilla > Interface > This was at least my hope 'cause IMHO this could make just f.i. the > range stuff more reliable. Except that there are no interfaces involved. Using isForwardRa

Re: where to find Implements!

2010-09-29 Thread Jonathan M Davis
On Wednesday, September 29, 2010 13:58:05 BLS wrote: > On 29/09/2010 22:28, Jonathan M Davis wrote: > > Look in > > std.range for the whole list, but isRandomAccesRange() handles random > > access ranges. Since there is no interface for ranges, you can't check > > generically whether a particular t

Re: where to find Implements!

2010-09-29 Thread BLS
On 29/09/2010 23:02, Simen kjaeraas wrote: BLS wrote: Hope is was not a pipe dream... I've no idea who has published it and where to find this snippet but in case that I am not completely wrong there should exist something like Implements!() for structures.. I wrote such a template about a y

Re: Container Contravariance was Re: [typing] Type-erasure re generics

2010-09-29 Thread Jonathan M Davis
On Wednesday, September 29, 2010 13:37:49 Jesse Phillips wrote: > Jonathan M Davis Wrote: > > Pelle's point still stands. > > > > a[0] = new A(); > > > > would be legal code if you could assign a B[] to an A[], and since an A > > isn't necessarily a B, that doesn't work at all. If the underlying

Re: where to find Implements!

2010-09-29 Thread Philippe Sigaud
On Wed, Sep 29, 2010 at 23:02, Simen kjaeraas wrote: > BLS wrote: > >> Hope is was not a pipe dream... >> I've no idea who has published it and where to find this snippet but in >> case that I am not completely wrong there should exist something like >> Implements!() for structures.. > > I wrote

Re: [contest] Is a Cow an animal ++

2010-09-29 Thread Philippe Sigaud
On Wed, Sep 29, 2010 at 23:10, bearophile wrote: > Philippe Sigaud: > >> If doing state passing like this is authorized, it might be doable >> doing 11/11 with D, at the type level. > > From what I have seen this puzzle gives few rules, but then the > implementation is quite free. It's not a true

Re: [typing] Type-erasure re generics

2010-09-29 Thread Philippe Sigaud
Jonathan: > It's just easier to cope with containers not being assignable to one another > just because the type of the elements of one is derived from the type of the > elements of the other. Scala does this with + or - annotation on types: List[+T] : List is parameterized by type T, and is cov

Re: [contest] Is a Cow an animal ++

2010-09-29 Thread bearophile
Philippe Sigaud: > If doing state passing like this is authorized, I might be doable > doing 11/11 with D, at the type level. >From what I have seen this puzzle gives few rules, but then the implementation >is quite free. It's not a true competition, with strict rules. I think the >spirit of th

Re: where to find Implements!

2010-09-29 Thread Simen kjaeraas
BLS wrote: Hope is was not a pipe dream... I've no idea who has published it and where to find this snippet but in case that I am not completely wrong there should exist something like Implements!() for structures.. I wrote such a template about a year ago, when Leandro Lucarella asked fo

Re: where to find Implements!

2010-09-29 Thread BLS
On 29/09/2010 22:28, Jonathan M Davis wrote: Look in std.range for the whole list, but isRandomAccesRange() handles random access ranges. Since there is no interface for ranges, you can't check generically whether a particular type correctly implements a particular range type - e.g is(mystruct :

Re: [contest] Is a Cow an animal ++

2010-09-29 Thread Philippe Sigaud
On Wed, Sep 29, 2010 at 21:59, miasma <_...@freenode.net.via_irc> wrote: Thanks for the code. It's always interesting to see some Scala! >    val (a_rabbit2, carrot2) = a_rabbit eat carrot >    val (a_cow2, grass2) = a_cow eat grass Ah, but you do not change the state of carrot or grass, or do y

Re: where to find Implements!

2010-09-29 Thread BLS
On 29/09/2010 22:22, Steven Schveighoffer wrote: On Wed, 29 Sep 2010 16:14:27 -0400, BLS wrote: On 29/09/2010 21:19, Jonathan M Davis wrote: On Wednesday, September 29, 2010 11:58:01 BLS wrote: Hope is was not a pipe dream... I've no idea who has published it and where to find this snippet b

Re: [contest] Is a Cow an animal ++

2010-09-29 Thread Simen kjaeraas
BCS wrote: Checking that the sequence of member function calls on an object is valid is limited by how good your static analysts is. The type system *can't* help you as the exact same code may or may not be valid depending on arbitrary external aspects. You are of course correct. Some su

Re: sorting hidden data.

2010-09-29 Thread Andrei Alexandrescu
On 9/29/10 13:10 PDT, Jacob Carlborg wrote: Would that be the uniform function call syntax that I've been waiting for since I first heard of it? Yah. One unpleasant issue I found with it (as it's already implemented for arrays) is a chicken-and-egg thing: say I want to provide operation moveF

Re: Container Contravariance was Re: [typing] Type-erasure re generics

2010-09-29 Thread Jesse Phillips
Jonathan M Davis Wrote: > Pelle's point still stands. > > a[0] = new A(); > > would be legal code if you could assign a B[] to an A[], and since an A isn't > necessarily a B, that doesn't work at all. If the underlying type were > actually > A[], then it would be fine to use varying types der

Re: sorting hidden data.

2010-09-29 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > On 9/29/10 10:43 PDT, Steven Schveighoffer wrote: > > What I mean is, why is it automatically assumed that if front does not > > return a ref, the only way to swap is via moveX? If T == int, why must > > we have a moveFro

Re: [BUG} dsss linker error when a module has @property

2010-09-29 Thread Nick Sabalausky
"Adam Cigánek" wrote in message news:mailman.349.1285773387.858.digitalmar...@puremagic.com... >Thanks Nick. xfbuild and rdmd look good, I'll take a closer look at >them. However, they both seem to be just build tools, but dsss was >also kind of package manager (like rubygems for ruby or CPAN for

Re: where to find Implements!

2010-09-29 Thread Jonathan M Davis
On Wednesday, September 29, 2010 13:14:27 BLS wrote: > On 29/09/2010 21:19, Jonathan M Davis wrote: > > On Wednesday, September 29, 2010 11:58:01 BLS wrote: > >> Hope is was not a pipe dream... > >> I've no idea who has published it and where to find this snippet but in > >> case that I am not comp

Re: sorting hidden data.

2010-09-29 Thread Jonathan M Davis
On Wednesday, September 29, 2010 12:55:40 Steven Schveighoffer wrote: > On Wed, 29 Sep 2010 15:46:19 -0400, Andrei Alexandrescu > > wrote: > > On 9/29/10 10:43 PDT, Steven Schveighoffer wrote: > >> What I mean is, why is it automatically assumed that if front does not > >> return a ref, the only

Re: where to find Implements!

2010-09-29 Thread Steven Schveighoffer
On Wed, 29 Sep 2010 16:14:27 -0400, BLS wrote: On 29/09/2010 21:19, Jonathan M Davis wrote: On Wednesday, September 29, 2010 11:58:01 BLS wrote: Hope is was not a pipe dream... I've no idea who has published it and where to find this snippet but in case that I am not completely wrong there sh

Re: where to find Implements!

2010-09-29 Thread BLS
On 29/09/2010 21:19, Jonathan M Davis wrote: On Wednesday, September 29, 2010 11:58:01 BLS wrote: Hope is was not a pipe dream... I've no idea who has published it and where to find this snippet but in case that I am not completely wrong there should exist something like Implements!() for struct

Re: sorting hidden data.

2010-09-29 Thread Jacob Carlborg
On 2010-09-29 19:42, Andrei Alexandrescu wrote: On 9/29/10 9:52 PDT, dsimcha wrote: == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article On 9/29/10 6:22 PDT, Steven Schveighoffer wrote: std.algorithm.sort seems to require lvalue access to elements of a range, presumably

Re: Getting D ready for prime time

2010-09-29 Thread Jacob Carlborg
On 2010-09-29 17:56, dsimcha wrote: Here are my priorities for the core language and Phobos, in order of importance to me personally. Of course, more third-party libraries would be nice, but I think that's both obvious and beyond the scope of this discussion. b. Serialization. This is a b

Re: [typing] Type-erasure re generics

2010-09-29 Thread Jonathan M Davis
On Wednesday, September 29, 2010 12:36:02 Steven Schveighoffer wrote: > In such a case, would would it even _mean_ > > to try and assign one container type to another? Sure, if they're > > classes, and > > they share the same API, you may be able to get it to work thanks to the > > fact > > that y

Re: [contest] Is a Cow an animal ++

2010-09-29 Thread miasma
29.9.2010 18:57, Danny Wilson wrote: Op Wed, 29 Sep 2010 15:33:29 +0200 schreef retard : Wed, 29 Sep 2010 09:21:11 +0200, Norbert Nemec wrote: I experimented with this (a colleague of mine already solved all 11 cases at compile time with Scala) Would your colleague share the Scala solution?

Re: sorting hidden data.

2010-09-29 Thread Steven Schveighoffer
On Wed, 29 Sep 2010 15:46:19 -0400, Andrei Alexandrescu wrote: On 9/29/10 10:43 PDT, Steven Schveighoffer wrote: What I mean is, why is it automatically assumed that if front does not return a ref, the only way to swap is via moveX? If T == int, why must we have a moveFront to deal with it?

Re: sorting hidden data.

2010-09-29 Thread Andrei Alexandrescu
On 9/29/10 10:43 PDT, Steven Schveighoffer wrote: What I mean is, why is it automatically assumed that if front does not return a ref, the only way to swap is via moveX? If T == int, why must we have a moveFront to deal with it? IMO, all algorithms should default to copying unless alternatives ex

Re: [typing] Type-erasure re generics

2010-09-29 Thread Steven Schveighoffer
On Wed, 29 Sep 2010 15:36:02 -0400, Steven Schveighoffer wrote: On Wed, 29 Sep 2010 15:16:28 -0400, Jonathan M Davis But worse still, consider this: With templates, you could have a container type which used completely different implementations depending on the type(s) you use to insta

Re: [typing] Type-erasure re generics

2010-09-29 Thread Steven Schveighoffer
On Wed, 29 Sep 2010 15:16:28 -0400, Jonathan M Davis wrote: On Wednesday, September 29, 2010 11:54:30 Steven Schveighoffer wrote: I think it may have to be more than just const: class C(T) { static T globalval; } class A {} class B : A {} void foo(C!B c) { const(C!A) c2 = c; c2.

Re: where to find Implements!

2010-09-29 Thread Jonathan M Davis
On Wednesday, September 29, 2010 11:58:01 BLS wrote: > Hope is was not a pipe dream... > I've no idea who has published it and where to find this snippet but in > case that I am not completely wrong there should exist something like > Implements!() for structures.. > ??? > Bjoern And what would th

Re: Fedora 14 will integrate D into the distribution

2010-09-29 Thread Seth Hoenig
> Currently doing a marathon sprint to merge D2 frontend with 2.025 by the > end of > the month, or within the first week of next month, depending on how many > things > get broken in the process... > > Iain > The end of this month? As in about 30 hours from now? Because that would be really impr

Re: [typing] Type-erasure re generics

2010-09-29 Thread Jonathan M Davis
On Wednesday, September 29, 2010 11:54:30 Steven Schveighoffer wrote: > I think it may have to be more than just const: > > class C(T) > { > static T globalval; > } > > class A {} > class B : A {} > > void foo(C!B c) > { >const(C!A) c2 = c; >c2.globalval = new A; > } > > If the enti

where to find Implements!

2010-09-29 Thread BLS
Hope is was not a pipe dream... I've no idea who has published it and where to find this snippet but in case that I am not completely wrong there should exist something like Implements!() for structures.. ??? Bjoern

Re: [typing] Type-erasure re generics

2010-09-29 Thread Steven Schveighoffer
On Wed, 29 Sep 2010 14:39:43 -0400, Jonathan M Davis wrote: On Wednesday, September 29, 2010 11:11:53 Steven Schveighoffer wrote: I think actually that concept is in the latest C# with type contra-variance. Essentially, you should be able to implicitly cast Container!(B) to const(Container!

Re: [typing] Type-erasure re generics

2010-09-29 Thread Jonathan M Davis
On Wednesday, September 29, 2010 11:11:53 Steven Schveighoffer wrote: > I think actually that concept is in the latest C# with type > contra-variance. > > Essentially, you should be able to implicitly cast Container!(B) to > const(Container!(A)) conceptually, but actually you may have to require >

Re: Container Contravariance was Re: [typing] Type-erasure re generics

2010-09-29 Thread Jonathan M Davis
On Wednesday, September 29, 2010 11:20:11 Jesse Phillips wrote: > Jesse Phillips Wrote: > > I will first quote Wikipedia about C#[1]: > > > > "For example, in C# 3.0 generic parameters did not support co or > > contravariance; List was not equivalent to List > > as one might intuit; however, this

Re: [std.concurrency] prioritySend is 1000 times slower than send?

2010-09-29 Thread Steven Schveighoffer
On Wed, 29 Sep 2010 14:25:07 -0400, osa wrote: P.S. demangle program example at http://www.digitalmars.com/d/2.0/phobos/std_demangle.html is broken -- it does not compile. P.P.S. std.demangle fails for some symbols, for example: _D3std5array13__T5emptyTyaZ5emptyFNdxAyaZb _

[std.concurrency] prioritySend is 1000 times slower than send?

2010-09-29 Thread osa
I started using std.concurrency in some projects and overall it feels like a solid (albeit minimalistic) design. However, current implementation has some issues. For example, I've noticed that using prioritySend slows everything considerably. Here is a simple benchmark to demonstrate the proble

Re: sorting hidden data.

2010-09-29 Thread Steven Schveighoffer
On Wed, 29 Sep 2010 14:07:36 -0400, BLS wrote: On 29/09/2010 15:22, Steven Schveighoffer wrote: I'm adding a new class to dcollections -- Deque of STL fame. Hi Steve, thank you for adding the dequeue data structure! :) hehe, I haven't had any real interesting D projects to do for a while :

Re: Container Contravariance was Re: [typing] Type-erasure re generics

2010-09-29 Thread Jesse Phillips
Jesse Phillips Wrote: > I will first quote Wikipedia about C#[1]: > > "For example, in C# 3.0 generic parameters did not support co or > contravariance; List was not equivalent to List as > one might intuit; however, this is now supported in C# 4.0, though standard > arrays have always support

Re: [typing] Type-erasure re generics

2010-09-29 Thread Steven Schveighoffer
On Wed, 29 Sep 2010 13:44:32 -0400, Jonathan M Davis wrote: On Wednesday, September 29, 2010 10:18:17 Pelle wrote: On 09/29/2010 05:53 PM, Jesse Phillips wrote: > The only benefit, which should be solve in another manner is having this > code work: > > class A {} > class B:A {} > > class

Re: sorting hidden data.

2010-09-29 Thread Steven Schveighoffer
On Wed, 29 Sep 2010 13:40:49 -0400, dsimcha wrote: I somewhat agree, but apparently noone noticed my other post. moveFront() and friends **have default behavior** via the module level function std.range.moveFront() in most cases, and when they don't it is for a good reason. If Phobos dire

Re: sorting hidden data.

2010-09-29 Thread BLS
On 29/09/2010 15:22, Steven Schveighoffer wrote: I'm adding a new class to dcollections -- Deque of STL fame. Hi Steve, thank you for adding the dequeue data structure! :) since you have trouble regarding my email address .. nanali at wanadoo fr would be nice if we can discuss (and hopefully

Container Contravariance was Re: [typing] Type-erasure re generics

2010-09-29 Thread Jesse Phillips
> On Wednesday, September 29, 2010 10:18:17 Pelle wrote: > > On 09/29/2010 05:53 PM, Jesse Phillips wrote: > > > The only benefit, which should be solve in another manner is having this > > > code work: > > > > > > class A {} > > > class B:A {} > > > > > > class Container(T) {} > > > > > > void

Re: [typing] Type-erasure re generics

2010-09-29 Thread Jonathan M Davis
On Wednesday, September 29, 2010 10:18:17 Pelle wrote: > On 09/29/2010 05:53 PM, Jesse Phillips wrote: > > The only benefit, which should be solve in another manner is having this > > code work: > > > > class A {} > > class B:A {} > > > > class Container(T) {} > > > > void main() { > > > >

Re: sorting hidden data.

2010-09-29 Thread Steven Schveighoffer
On Wed, 29 Sep 2010 13:25:23 -0400, Andrei Alexandrescu wrote: On 9/29/10 10:10 PDT, Steven Schveighoffer wrote: On Wed, 29 Sep 2010 12:26:39 -0400, Andrei Alexandrescu wrote: On 9/29/10 6:22 PDT, Steven Schveighoffer wrote: std.algorithm.sort seems to require lvalue access to elements o

Re: sorting hidden data.

2010-09-29 Thread Andrei Alexandrescu
On 9/29/10 9:52 PDT, dsimcha wrote: == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article On 9/29/10 6:22 PDT, Steven Schveighoffer wrote: std.algorithm.sort seems to require lvalue access to elements of a range, presumably so it can call swap on two elements during sortin

Re: sorting hidden data.

2010-09-29 Thread dsimcha
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article > On Wed, 29 Sep 2010 12:26:39 -0400, Andrei Alexandrescu > wrote: > > On 9/29/10 6:22 PDT, Steven Schveighoffer wrote: > >> std.algorithm.sort seems to require lvalue access to elements of a > >> range, presumably so it can call s

Re: A summary of D's design principles

2010-09-29 Thread Jonathan M Davis
On Wednesday, September 29, 2010 07:59:25 Sclytrack wrote: > > > D C# > > > > > > --- --- <-- high level > > > > > > | --- > > > > > > --- <-- low level > > C# > --- > > | <-gc > >Delphi| > --- | > > | |

Re: sorting hidden data.

2010-09-29 Thread Andrei Alexandrescu
On 9/29/10 10:10 PDT, Steven Schveighoffer wrote: On Wed, 29 Sep 2010 12:26:39 -0400, Andrei Alexandrescu wrote: On 9/29/10 6:22 PDT, Steven Schveighoffer wrote: std.algorithm.sort seems to require lvalue access to elements of a range, presumably so it can call swap on two elements during sor

Re: A summary of D's design principles

2010-09-29 Thread Jonathan M Davis
On Wednesday, September 29, 2010 05:39:25 Sclytrack wrote: > > nobody gets pissed off and defensive when he compares D unfavorably to > > Python. > > > > > No matter what I say, I'm always wrong. Even quotes from encyclopedias > > > or research papers are more wrong when I share them. > > Compile

Re: sorting hidden data.

2010-09-29 Thread Pelle
On 09/29/2010 07:10 PM, Steven Schveighoffer wrote: On Wed, 29 Sep 2010 12:26:39 -0400, Andrei Alexandrescu wrote: On 9/29/10 6:22 PDT, Steven Schveighoffer wrote: std.algorithm.sort seems to require lvalue access to elements of a range, presumably so it can call swap on two elements during s

Re: [typing] Type-erasure re generics

2010-09-29 Thread Pelle
On 09/29/2010 05:53 PM, Jesse Phillips wrote: The only benefit, which should be solve in another manner is having this code work: class A {} class B:A {} class Container(T) {} void main() { Container!(A) a = new Container!(B)(); } Sorry for falling off topic, but that code shouldn't wo

Re: sorting hidden data.

2010-09-29 Thread Steven Schveighoffer
On Wed, 29 Sep 2010 12:26:39 -0400, Andrei Alexandrescu wrote: On 9/29/10 6:22 PDT, Steven Schveighoffer wrote: std.algorithm.sort seems to require lvalue access to elements of a range, presumably so it can call swap on two elements during sorting. So while a range can technically allow chan

Re: Fedora 14 will integrate D into the distribution

2010-09-29 Thread Iain Buclaw
== Quote from Daniel Gibson (metalcae...@gmail.com)'s article > On Wed, Sep 29, 2010 at 12:01 PM, Iain Buclaw wrote: > > As far as I'm aware, they won't accept it because the latest release of GCC > > it > > works against is 4.4.x. Fedora ships 4.5.x, and will be moving onto the > > 4.6.x > > de

Re: [destructors] Getting D ready for prime time

2010-09-29 Thread Michel Fortin
On 2010-09-29 11:01:43 -0400, Justin Johansson said: To cut to the chase, what are the biggest issues/ showstoppers/etc that stand in the way for D to attract a prime-time audience? Everyone is going to have his pet issue. Here's mine: In

Re: sorting hidden data.

2010-09-29 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > On 9/29/10 6:22 PDT, Steven Schveighoffer wrote: > > std.algorithm.sort seems to require lvalue access to elements of a > > range, presumably so it can call swap on two elements during sorting. So > > while a range can te

Re: A summary of D's design principles

2010-09-29 Thread Walter Bright
Steven Schveighoffer wrote: You mean, C# doesn't provide access to the lower level constructs? IMO D is at the same level even if it does provide inline assembler. The simple fact is, you don't *have* to use low level features of D, you can stick to the C#-level constructs. Hell, you can eve

Re: [typing] Type-erasure re generics

2010-09-29 Thread Andrei Alexandrescu
On 9/29/10 9:30 PDT, Justin Johansson wrote: On 30/09/2010 2:18 AM, Jonathan M Davis wrote: On Wednesday 29 September 2010 08:14:38 Justin Johansson wrote: Can someone please inform me if D does type-erasure on generic types as does Java? Wow. Goodness no. Generics and templates are _complet

Re: [typing] Type-erasure re generics

2010-09-29 Thread bearophile
Jonathan M Davis: > And maybe someday dmd will get the aforementioned optimization would be make > template instantiations with the same size for their type actually use one > set > of underlying code. LDC is already able to do it in not too much complex situations if you compile D1 code usin

Re: Getting D ready for prime time

2010-09-29 Thread Jesse Phillips
Justin Johansson Wrote: > On 30/09/2010 1:56 AM, dsimcha wrote: > > Here are my priorities for the core language and Phobos, in order of > > importance to > > me personally. Of course, more third-party libraries would be nice, but I > > think > > that's both obvious and beyond the scope of this

Re: [typing] Type-erasure re generics

2010-09-29 Thread Justin Johansson
On 30/09/2010 2:18 AM, Jonathan M Davis wrote: On Wednesday 29 September 2010 08:14:38 Justin Johansson wrote: Can someone please inform me if D does type-erasure on generic types as does Java? Wow. Goodness no. Generics and templates are _completely_ different. Java is the only language tha

Re: sorting hidden data.

2010-09-29 Thread Andrei Alexandrescu
On 9/29/10 6:22 PDT, Steven Schveighoffer wrote: std.algorithm.sort seems to require lvalue access to elements of a range, presumably so it can call swap on two elements during sorting. So while a range can technically allow changing of data, it cannot be passed to swap. e.g. struct myrange { @

[database and libs] Re: Getting D ready for prime time

2010-09-29 Thread Adam D. Ruppe
On Wed, Sep 29, 2010 at 03:56:10PM +, dsimcha wrote: > d. Basic database support. I'd kill to have a D port/binding of SqlLite in > Phobos, and SqlLite is public domain. I have something, but I haven't touched it for a while now. Still compiles though, at least on my box! http://arsdnet.n

Re: [typing] Type-erasure re generics

2010-09-29 Thread Jonathan M Davis
On Wednesday 29 September 2010 08:14:38 Justin Johansson wrote: > Sorry if I should ask to this on D.help. > > Can someone please inform me if D does type-erasure on generic > types as does Java? > > Here's one Java reference on the subject that I found. > http://download.oracle.com/javase/tutori

Re: Getting D ready for prime time

2010-09-29 Thread Justin Johansson
On 30/09/2010 1:56 AM, dsimcha wrote: Here are my priorities for the core language and Phobos, in order of importance to me personally. Of course, more third-party libraries would be nice, but I think that's both obvious and beyond the scope of this discussion. Thanks for your effort in contr

Re: [typing] Type-erasure re generics

2010-09-29 Thread Jacob Carlborg
On 2010-09-29 17:14, Justin Johansson wrote: Sorry if I should ask to this on D.help. Can someone please inform me if D does type-erasure on generic types as does Java? Here's one Java reference on the subject that I found. http://download.oracle.com/javase/tutorial/java/generics/erasure.html

Re: [contest] Is a Cow an animal ++

2010-09-29 Thread Justin Johansson
On 30/09/2010 1:57 AM, Danny Wilson wrote: Op Wed, 29 Sep 2010 15:33:29 +0200 schreef retard : Wed, 29 Sep 2010 09:21:11 +0200, Norbert Nemec wrote: I experimented with this (a colleague of mine already solved all 11 cases at compile time with Scala) Would your colleague share the Scala solu

Re: [contest] Is a Cow an animal ++

2010-09-29 Thread Danny Wilson
Op Wed, 29 Sep 2010 15:33:29 +0200 schreef retard : Wed, 29 Sep 2010 09:21:11 +0200, Norbert Nemec wrote: I experimented with this (a colleague of mine already solved all 11 cases at compile time with Scala) Would your colleague share the Scala solution? :-)

Re: Getting D ready for prime time

2010-09-29 Thread dsimcha
Here are my priorities for the core language and Phobos, in order of importance to me personally. Of course, more third-party libraries would be nice, but I think that's both obvious and beyond the scope of this discussion. 1. Finish 64-bit support. 2. Fix the worst bugs in inout and alias th

Re: [typing] Type-erasure re generics

2010-09-29 Thread Jesse Phillips
Justin Johansson Wrote: > Also I would like to be informed as to the positives and negatives > aspects of type-erasure as might be appropriate in a D versus Java > context. Here is a quote that is most relevant: "[Type-erasure is] a process where the compiler removes all information related to

Re: [typing] Type-erasure re generics

2010-09-29 Thread Justin Johansson
More apologies, perhaps a subject line of [RTTI] Type-erasure in D generics would be more apt? RTTI: run-time type identification/information -- JJ

Re: [BUG} dsss linker error when a module has @property

2010-09-29 Thread Adam Cigánek
Thanks Nick. xfbuild and rdmd look good, I'll take a closer look at them. However, they both seem to be just build tools, but dsss was also kind of package manager (like rubygems for ruby or CPAN for perl). Was the idea of package manager for D abandoned? Or is there an alternative? 2010/9/28 Nick

[typing] Type-erasure re generics

2010-09-29 Thread Justin Johansson
Sorry if I should ask to this on D.help. Can someone please inform me if D does type-erasure on generic types as does Java? Here's one Java reference on the subject that I found. http://download.oracle.com/javase/tutorial/java/generics/erasure.html Also I would like to be informed as to the pos

Getting D ready for prime time

2010-09-29 Thread Justin Johansson
To cut to the chase, what are the biggest issues/ showstoppers/etc that stand in the way for D to attract a prime-time audience? Being a prudent self-examining community (hopefully), from time-to-time we should inquire of the PL market what are the current issues with D that might be perceived by

Re: A summary of D's design principles

2010-09-29 Thread Sclytrack
> > D C# > > --- --- <-- high level > > | | > > | | > > | | > > | --- > > | > > --- <-- low level > > C# --- | <-gc Delphi| --- | | | <-custom attributes, reflection, generic collection

Re: [contest] Is a Cow an animal ++

2010-09-29 Thread BCS
Hello Simen, BCS wrote: The given test as is might be all catchable but add loops and references into the picture and I think it turns into the halting problem. Would you mind explaining in further detail? I am not really sure what you mean. Cow c; while(someFn()) { c = new Cow(); c.s

Re: [contest] Is a Cow an animal ++

2010-09-29 Thread retard
Wed, 29 Sep 2010 09:21:11 +0200, Norbert Nemec wrote: > IMHO, the test misses the point of compile-time metaprogramming: The > concept of "state" belongs to run-time. The D compile-time language is > purely functional and does not know a state or even an "order of > execution". > > The conditions

sorting hidden data.

2010-09-29 Thread Steven Schveighoffer
I'm adding a new class to dcollections -- Deque of STL fame. A deque implements dcollections' List interface, and one of the requirements of the List interface is to be able to sort elements. One important property of most dcollections containers is that data is not exposed. This means you

Re: A summary of D's design principles

2010-09-29 Thread retard
Wed, 29 Sep 2010 15:17:17 +0200, Pelle wrote: > On 09/29/2010 01:22 PM, retard wrote: >> Wed, 29 Sep 2010 07:00:33 -0400, Steven Schveighoffer wrote: >> >>> On Tue, 28 Sep 2010 17:38:43 -0400, retard >>> wrote: >>> Tue, 28 Sep 2010 16:20:27 -0400, Steven Schveighoffer wrote: Does C# hav

Re: [contest] Is a Cow an animal ++

2010-09-29 Thread Simen kjaeraas
BCS wrote: The given test as is might be all catchable but add loops and references into the picture and I think it turns into the halting problem. Would you mind explaining in further detail? I am not really sure what you mean. -- Simen

Re: A summary of D's design principles

2010-09-29 Thread Pelle
On 09/29/2010 01:22 PM, retard wrote: Wed, 29 Sep 2010 07:00:33 -0400, Steven Schveighoffer wrote: On Tue, 28 Sep 2010 17:38:43 -0400, retard wrote: Tue, 28 Sep 2010 16:20:27 -0400, Steven Schveighoffer wrote: Does C# have access to inline assembler? Agreed, it doesn't provide many new high

Re: [contest] Is a Cow an animal ++

2010-09-29 Thread BCS
Hello Simen, bearophile wrote: The fourth C++ version contains a line that I am am not even sure how to translate to D (maybe there is a workaround with template constraints): (void) static_cast((Kind *) 0); This is a static assert of sorts. Basically, the function will only compile if Kin

Re: A summary of D's design principles

2010-09-29 Thread Sclytrack
> nobody gets pissed off and defensive when he compares D unfavorably to > Python. > > No matter what I say, I'm always wrong. Even quotes from encyclopedias or > > research papers are more wrong when I share them. Compile-time custom annotation might be hard to implement. Do we really need it? G

Re: Fedora 14 will integrate D into the distribution

2010-09-29 Thread Anders F Björklund
Daniel Gibson wrote: I am the the fedora packager, in official repo we use ldc as compiler because fedora want promote only open source project. It not an old version, ldc works fine for D1 and in this repo http://blog.fedora-fr.org/bioinfornatics/post/Repo-for-D-programming They are a ldc comp

Re: A summary of D's design principles

2010-09-29 Thread Steven Schveighoffer
On Wed, 29 Sep 2010 07:22:08 -0400, retard wrote: Wed, 29 Sep 2010 07:00:33 -0400, Steven Schveighoffer wrote: On Tue, 28 Sep 2010 17:38:43 -0400, retard wrote: Tue, 28 Sep 2010 16:20:27 -0400, Steven Schveighoffer wrote: Does C# have access to inline assembler? Agreed, it doesn't provide

Re: Fedora 14 will integrate D into the distribution

2010-09-29 Thread klickverbot
On 9/29/10 1:29 PM, Daniel Gibson wrote: On Wed, Sep 29, 2010 at 1:20 PM, bioinfornatics wrote: And gdc is not a gcc project So? It's licensed under GPL, isn't that sufficient? (Besides the doesn't-support-gcc-4.5/4.6 issue) No, because in order to include your code with mainline GCC, yo

Re: Fedora 14 will integrate D into the distribution

2010-09-29 Thread Daniel Gibson
On Wed, Sep 29, 2010 at 1:20 PM, bioinfornatics wrote: > And gdc is not a gcc project > So? It's licensed under GPL, isn't that sufficient? (Besides the doesn't-support-gcc-4.5/4.6 issue)

Re: Fedora 14 will integrate D into the distribution

2010-09-29 Thread bioinfornatics
yes, you are right And gdc is not a gcc project

Re: A summary of D's design principles

2010-09-29 Thread retard
Wed, 29 Sep 2010 07:00:33 -0400, Steven Schveighoffer wrote: > On Tue, 28 Sep 2010 17:38:43 -0400, retard wrote: > >> Tue, 28 Sep 2010 16:20:27 -0400, Steven Schveighoffer wrote: >> Does C# >> have access to inline assembler? Agreed, it doesn't provide many new >> high level features compared to

Re: A summary of D's design principles

2010-09-29 Thread Steven Schveighoffer
On Tue, 28 Sep 2010 17:38:43 -0400, retard wrote: Tue, 28 Sep 2010 16:20:27 -0400, Steven Schveighoffer wrote: On Tue, 28 Sep 2010 15:36:32 -0400, retard wrote: Tue, 28 Sep 2010 13:22:09 -0400, bearophile wrote: Jesse Phillips: This is exactly how it should be marketed. It has the produ

Re: Fedora 14 will integrate D into the distribution

2010-09-29 Thread Steven Schveighoffer
On Wed, 29 Sep 2010 06:54:02 -0400, Daniel Gibson wrote: On Wed, Sep 29, 2010 at 12:01 PM, Iain Buclaw wrote: As far as I'm aware, they won't accept it because the latest release of GCC it works against is 4.4.x. Fedora ships 4.5.x, and will be moving onto the 4.6.x devel snapshot in a

Re: A summary of D's design principles

2010-09-29 Thread Steven Schveighoffer
On Tue, 28 Sep 2010 17:32:38 -0400, retard wrote: Tue, 28 Sep 2010 16:20:27 -0400, Steven Schveighoffer wrote: And you are still posting on this NG because...? The amount of religious stupidity never fails to impress me. I've never seen a community with this badly brainwashed zealots. You

Re: Fedora 14 will integrate D into the distribution

2010-09-29 Thread Daniel Gibson
On Wed, Sep 29, 2010 at 12:01 PM, Iain Buclaw wrote: > As far as I'm aware, they won't accept it because the latest release of GCC it > works against is 4.4.x. Fedora ships 4.5.x, and will be moving onto the 4.6.x > devel snapshot in a few months. > > The Pascal compiler has a similar problem too.

Re: Fedora 14 will integrate D into the distribution

2010-09-29 Thread Iain Buclaw
As far as I'm aware, they won't accept it because the latest release of GCC it works against is 4.4.x. Fedora ships 4.5.x, and will be moving onto the 4.6.x devel snapshot in a few months. The Pascal compiler has a similar problem too... Iain

  1   2   >