Re: D1/D2: How to check if a method has been overridden

2010-09-08 Thread klickverbot
On 9/8/10 8:25 AM, Kagamin wrote: Isn't this info available through classinfo? How exactly would you look this up using classinfo? Maybe it's the lack of documentation, but I didn't see a way to achieve that with Classinfo and friends…

Re: D1/D2: How to check if a method has been overridden

2010-09-08 Thread Jacob Carlborg
On 2010-09-08 08:25, Kagamin wrote: klickverbot Wrote: Now, please tell me that there _is_ a way to do this (D1 and D2, but I don't mind if have to generate different code for the both)… Isn't this info available through classinfo? In D2 there is a way to get all the members of a class, inc

D2: immutable/const and delegates

2010-09-08 Thread klickverbot
I always thought I had understood the new const/immutable system of D2. But now this: --- import std.stdio; class A { void setI( int newI ) { i = newI; } int i; } void main() { immutable a = new immutable(A); writefln( "Before: %s", a.i ); ( &a.setI )( 42 ); writefl

Re: D1/D2: How to check if a method has been overridden

2010-09-08 Thread Max Samukha
On 09/08/2010 12:33 AM, klickverbot wrote: Well, I guess I should have wrote the following instead: You can avoid messing with vtable: class A { void foo( float a ) {} void foo( int a ) {} // hack to get the static address of an overload private static Fn funcAddr(Fn, alias

Re: D2: immutable/const and delegates

2010-09-08 Thread klickverbot
On 9/8/10 11:46 AM, klickverbot wrote: Am I severely misunderstanding something here, or is this a rather big hole in the type system? Ah, never mind, there is even a (more than two years old!) bug report about it: http://d.puremagic.com/issues/show_bug.cgi?id=1983

Re: D1/D2: How to check if a method has been overridden

2010-09-08 Thread klickverbot
Hm, strange, this is more or less the same solution I was using up to DMD 1.047, but it seems to work on DMD 2.048 too – I'll investigate why… Thanks a lot, anyway.

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread Steven Schveighoffer
On Tue, 07 Sep 2010 16:23:25 -0400, domino wrote: Walter Bright Wrote: domino wrote: > Ordinary man cannot have 5 TB of data because ALL standard movie/audio > CD/DVD/Bluray/HD-DVD discs have DRM copy protection. CDs are not copy protected. False. I have 10--20 discs with cactus data prot

Bizprac database.. Urgent

2010-09-08 Thread BLS
Hi Alex, Dein IB Expert produziert nich kompatible backups.. Melde dich bitte asap. :) Wir muessen HEUTE das product -reordering- in den Griff bekommen. Bjoern

SortedRange and new docs for std.container

2010-09-08 Thread Andrei Alexandrescu
Hello, I just added SortedRange as discussed a while ago in this newsgroup. I think it turned out pretty neat. Generally the range abstraction is turning out to be very solid. To get a SortedRange object for a given range r either call sort(r) if you want to sort one, or assumeSorted(r) if

Re: [OT] Use case for a 4-D matrix

2010-09-08 Thread BCS
Hello Tomek, Dnia 04-09-2010 o 08:03:12 John Demme napisal(a): As for the graphs, I essentially take two input graphs, represented in adjacency matrix form (two 2-d matrices of size n^2 each, assuming equal sized graphs). Then, I compute the Kronecker Tensor Graph Product[2], which creates a

Re: Bizprac database.. Urgent

2010-09-08 Thread retard
Wed, 08 Sep 2010 15:20:52 +0200, BLS wrote: Wrong target audience?

Re: Creation in Dylan

2010-09-08 Thread Pillsy
bearophile Wrote: > Regarding the recent small thread about the "new" statement, > this is how the Dylan language faces the problem (found through > Lambda The Ultimate): > http://www.opendylan.org/books/drm/Constructing_and_Initializing_Instances#make How would you make this work without open

Re: SortedRange and new docs for std.container

2010-09-08 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > Hello, > I just added SortedRange as discussed a while ago in this newsgroup. I > think it turned out pretty neat. Generally the range abstraction is > turning out to be very solid. > To get a SortedRange object for a giv

Re: SortedRange and new docs for std.container

2010-09-08 Thread Andrei Alexandrescu
On 9/8/10 9:21 CDT, dsimcha wrote: == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article Hello, I just added SortedRange as discussed a while ago in this newsgroup. I think it turned out pretty neat. Generally the range abstraction is turning out to be very solid. To get a

Re: Bizprac database.. Urgent

2010-09-08 Thread Simen kjaeraas
retard wrote: Wed, 08 Sep 2010 15:20:52 +0200, BLS wrote: Wrong target audience? Nein, wir sprechen ja hier alle Deutsch, ja? -- Simen

Re: SortedRange and new docs for std.container

2010-09-08 Thread bearophile
Andrei: > I've also fixed Zip (finally!) to get rid of a couple of dirty tricks. > It turns out that front()/front(v)/moveFront() are a correct way to > abstract proxy ranges like Zip is. In this changeset: http://www.dsource.org/projects/phobos/changeset/1968 I see code as: auto arr2 = t.fiel

Re: SortedRange and new docs for std.container

2010-09-08 Thread Andrej Mitrovic
I don't want to hijack the topic, but can I ask a question? In the Phobos docs I often see this kind of code: assert(equal(radial(a), [ 3, 4, 2, 5, 1 ][])); What is the purpose of the extra square brackets after the array literal? Because the code works both with and without them. On Wed, Sep 8

Re: Bizprac database.. Urgent

2010-09-08 Thread Daniel Gibson
Simen kjaeraas schrieb: retard wrote: Wed, 08 Sep 2010 15:20:52 +0200, BLS wrote: Wrong target audience? Nein, wir sprechen ja hier alle Deutsch, ja? Und müssen alle IB Expert fixen, damit es kompatible backups produziert.

Re: SortedRange and new docs for std.container

2010-09-08 Thread Andrei Alexandrescu
On 9/8/10 12:06 CDT, Andrej Mitrovic wrote: I don't want to hijack the topic, but can I ask a question? In the Phobos docs I often see this kind of code: assert(equal(radial(a), [ 3, 4, 2, 5, 1 ][])); What is the purpose of the extra square brackets after the array literal? Because the code wo

Re: SortedRange and new docs for std.container

2010-09-08 Thread Andrei Alexandrescu
On 9/8/10 11:52 CDT, bearophile wrote: Andrei: I've also fixed Zip (finally!) to get rid of a couple of dirty tricks. It turns out that front()/front(v)/moveFront() are a correct way to abstract proxy ranges like Zip is. In this changeset: http://www.dsource.org/projects/phobos/changeset/1968

Re: [OT] Use case for a 4-D matrix

2010-09-08 Thread John Demme
Tomek Sowiński wrote: > Dnia 04-09-2010 o 08:03:12 John Demme napisał(a): > >> As for the graphs, I essentially take two input graphs, represented in >> adjacency matrix form (two 2-d matrices of size n^2 each, assuming equal >> sized graphs). Then, I compute the Kronecker Tensor Graph Product[

Phobos + DCollections

2010-09-08 Thread William Bashir
Why not include most of DCollections in Phobos? std.container will surely benefit from having a rbtree, list and other data structures and implementing new versions for just for Phobos seems like NIH. Thanks

Re: Phobos + DCollections

2010-09-08 Thread bearophile
William Bashir: > Why not include most of DCollections in Phobos? std.container will surely > benefit from having a rbtree, list and other data structures and implementing > new versions for just for Phobos seems like NIH. Those data structures will be added. But Andrei wants to organize them in

Re: Phobos + DCollections

2010-09-08 Thread Steven Schveighoffer
On Wed, 08 Sep 2010 13:52:11 -0400, William Bashir wrote: Why not include most of DCollections in Phobos? std.container will surely benefit from having a rbtree, list and other data structures and implementing new versions for just for Phobos seems like NIH. FWIW, dcollections' RBTree is

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread Walter Bright
Steven Schveighoffer wrote: FWIW, Metallica's Garage Inc (the second disc) has some sort of anti-copy distortion. You can actually see a pattern on the data side of the disc. The result when you encode it via MP3 is some slight distortion, even at 160kb/s. It's pretty bearable though. I wou

Re: [OT] Use case for a 4-D matrix

2010-09-08 Thread Tomek Sowiński
Dnia 08-09-2010 o 15:58:31 BCS napisał(a): Can't you compute the Kronecker product lazily? E.g. a proxy object that computes a value in an overloaded opIndex. Even if your algorithms inspect (compute) the same value several times, you may still win -- the bottleneck these days is memory acce

Re: SortedRange and new docs for std.container

2010-09-08 Thread Jesse Phillips
Andrei Alexandrescu Wrote: > On 9/8/10 12:06 CDT, Andrej Mitrovic wrote: > > I don't want to hijack the topic, but can I ask a question? > > > > In the Phobos docs I often see this kind of code: > > > > assert(equal(radial(a), [ 3, 4, 2, 5, 1 ][])); > > > > What is the purpose of the extra square

Re: SortedRange and new docs for std.container

2010-09-08 Thread Andrej Mitrovic
Wow, you can actually interpret code on that site. Nice. I wonder how safe that is for them.. On Wed, Sep 8, 2010 at 9:47 PM, Jesse Phillips wrote: You can use literals to create static arrays by giving the type you want. > > http://ideone.com/qInPu > > The default was changed because Phobos was

Re: SortedRange and new docs for std.container

2010-09-08 Thread bearophile
Jesse Phillips: > The default was changed because Phobos was littered with [...][] in all the > tests... Andrei must have gotten annoyed. :) The default was changed because most times you want a dynamic array. (On the other hand I don't love the amount of memory allocations caused by the current

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread retard
Wed, 08 Sep 2010 11:58:39 -0700, Walter Bright wrote: > Steven Schveighoffer wrote: >> FWIW, Metallica's Garage Inc (the second disc) has some sort of >> anti-copy distortion. You can actually see a pattern on the data side >> of the disc. The result when you encode it via MP3 is some slight >>

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread retard
Wed, 08 Sep 2010 04:17:33 +, BCS wrote: > Hello domino, > >> Walter Bright Wrote: >> >>> domino wrote: >>> Ordinary man cannot have 5 TB of data because ALL standard movie/audio CD/DVD/Bluray/HD-DVD discs have DRM copy protection. >>> CDs are not copy protected. >>> >> Fals

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread Steven Schveighoffer
On Wed, 08 Sep 2010 14:58:39 -0400, Walter Bright wrote: Steven Schveighoffer wrote: FWIW, Metallica's Garage Inc (the second disc) has some sort of anti-copy distortion. You can actually see a pattern on the data side of the disc. The result when you encode it via MP3 is some slight

opDispatch and template parameters

2010-09-08 Thread Guillaume B.
Hi, Is this usage of opDispatch supposed to work: module test.d; import std.stdio; struct DispatchTest { void opDispatch(string name, string otherName)() { writeln(name, ":", otherName); } } void main() { DispatchTest t; //t.testName!("testOtherName")(); t.opD

Re: SortedRange and new docs for std.container

2010-09-08 Thread Tomek Sowiński
Dnia 08-09-2010 o 15:55:30 Andrei Alexandrescu napisał(a): I just added SortedRange as discussed a while ago in this newsgroup. I think it turned out pretty neat. Generally the range abstraction is turning out to be very solid. To get a SortedRange object for a given range r either call

foreach is slower than for?

2010-09-08 Thread Stanislav Blinov
I was wondering about it for some time: void foreach_loop(int arr[100]) { foreach(i,a; arr) { auto e = a; } } void for_loop(int arr[100]) { for (int i = 0; i < 100; ++i) { auto e = arr[i]; } } compiled with -O -release yields this: .text.void main.forea

Re: foreach is slower than for?

2010-09-08 Thread Tomek Sowiński
Dnia 08-09-2010 o 23:12:55 Stanislav Blinov napisał(a): I was wondering about it for some time: void foreach_loop(int arr[100]) { foreach(i,a; arr) { auto e = a; } } void for_loop(int arr[100]) { for (int i = 0; i < 100; ++i) { auto e = arr[i];

The D2 homepage is missing something

2010-09-08 Thread Andrej Mitrovic
http://www.digitalmars.com/d/2.0/index.html (hint: books list).

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread Walter Bright
Steven Schveighoffer wrote: On Wed, 08 Sep 2010 14:58:39 -0400, Walter Bright wrote: Steven Schveighoffer wrote: FWIW, Metallica's Garage Inc (the second disc) has some sort of anti-copy distortion. You can actually see a pattern on the data side of the disc. The result when you encode it

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread Walter Bright
retard wrote: You must be young then. I got my first CD-ROM drive with my Pentium 75. The first 1x external CD-ROM drives were pretty expensive. I think one used to cost around $600..800. Eh, my first CD-ROM drive was $1100 or so. Before 1994 I only had a CD walkman and a moderately cheap e

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread retard
Wed, 08 Sep 2010 19:15:15 -0700, Walter Bright wrote: > retard wrote: >> You must be young then. I got my first CD-ROM drive with my Pentium 75. >> The first 1x external CD-ROM drives were pretty expensive. I think one >> used to cost around $600..800. > > Eh, my first CD-ROM drive was $1100 or s

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread retard
Wed, 08 Sep 2010 19:12:37 -0700, Walter Bright wrote: > Steven Schveighoffer wrote: >> On Wed, 08 Sep 2010 14:58:39 -0400, Walter Bright >> wrote: >> >>> Steven Schveighoffer wrote: FWIW, Metallica's Garage Inc (the second disc) has some sort of anti-copy distortion. You can actually

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread Walter Bright
retard wrote: I doubt they have any power to fight the record company in these kinds of issues. A friend of a friend signed a deal with a record company owned by a multinational mother record company. Now they are told where to play concerts, how the cd distribution is organized, and when they

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread Daniel Gibson
retard schrieb: Wed, 08 Sep 2010 19:15:15 -0700, Walter Bright wrote: retard wrote: You must be young then. I got my first CD-ROM drive with my Pentium 75. The first 1x external CD-ROM drives were pretty expensive. I think one used to cost around $600..800. Eh, my first CD-ROM drive was $1100

Re: D1/D2: How to check if a method has been overridden

2010-09-08 Thread Kagamin
klickverbot Wrote: > On 9/8/10 8:25 AM, Kagamin wrote: > > Isn't this info available through classinfo? > > How exactly would you look this up using classinfo? Maybe it's the lack > of documentation, but I didn't see a way to achieve that with Classinfo > and friends… MemberInfo_function has f

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread Nick Sabalausky
"BCS" wrote in message news:a6268ff1bb248cd1ce96dc11...@news.digitalmars.com... > Hello Nick, > >> "domino" wrote in message >> news:i666vt$158...@digitalmars.com... >> >>> Walter Bright Wrote: >>> domino wrote: > Ordinary man cannot have 5 TB of data because ALL standard > mov

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread Nick Sabalausky
"Walter Bright" wrote in message news:i69g05$2cb...@digitalmars.com... > retard wrote: >> You must be young then. I got my first CD-ROM drive with my Pentium 75. >> The first 1x external CD-ROM drives were pretty expensive. I think one >> used to cost around $600..800. > > Eh, my first CD-ROM d

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread Eric Poggel
On 9/8/2010 11:15 PM, Walter Bright wrote: Contracts with children aren't legally binding because children are not considered legally competent. I may have to find some new minions.

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread Nick Sabalausky
"Daniel Gibson" wrote in message news:i69lsq$20g...@digitalmars.com... > > Fortunately the kind of music I listen to (Heavy Metal) is mostly > unaffected by copy protection and DRM on CDs. > Metallica is probably one of the few exceptions, because they're so big or > at the wrong lable or somet

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread Nick Sabalausky
"retard" wrote in message news:i68qac$7l...@digitalmars.com... > Wed, 08 Sep 2010 11:58:39 -0700, Walter Bright wrote: > >> Steven Schveighoffer wrote: >>> FWIW, Metallica's Garage Inc (the second disc) has some sort of >>> anti-copy distortion. You can actually see a pattern on the data side >>

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread Nick Sabalausky
"Walter Bright" wrote in message news:i69fr8$2cb...@digitalmars.com... > > In introducing such subtle distortion, Metallica runs the risk of being > labeled a band with lousy sound. IIRC, A lot of Metallica fans felt they had started putting out "lousy sound" back around the "Load" and "Reload

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread Nick Sabalausky
"retard" wrote in message news:i69i7v$2be...@digitalmars.com... > Wed, 08 Sep 2010 19:12:37 -0700, Walter Bright wrote: >> >> In introducing such subtle distortion, Metallica runs the risk of being >> labeled a band with lousy sound. > > I doubt they have any power to fight the record company in

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread retard
Thu, 09 Sep 2010 05:55:46 +0200, Daniel Gibson wrote: > retard schrieb: >> Wed, 08 Sep 2010 19:15:15 -0700, Walter Bright wrote: >> >>> retard wrote: You must be young then. I got my first CD-ROM drive with my Pentium 75. The first 1x external CD-ROM drives were pretty expensive. I

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread Nick Sabalausky
"Walter Bright" wrote in message news:i69jg8$2mu...@digitalmars.com... > retard wrote: >> I doubt they have any power to fight the record company in these kinds of >> issues. A friend of a friend signed a deal with a record company owned by >> a multinational mother record company. Now they are

Re: [Slight OT] TDPL in Russia

2010-09-08 Thread Walter Bright
Nick Sabalausky wrote: "Walter Bright" wrote in message Secondly, people ought to read contracts before they sign them. It's their own fault if they don't. Until recent years, if you wanted to be a successful musician (aside from scoring, and there's really only so much demand for that) you

Re: The D2 homepage is missing something

2010-09-08 Thread Peter Alexander
== Quote from Andrej Mitrovic (andrej.mitrov...@gmail.com)'s article > http://www.digitalmars.com/d/2.0/index.html (hint: books list). Wouldn't that just be "book list" at the moment?