Re: dcollections 2.0b

2010-09-06 Thread BLS
On 24/08/2010 17:45, Steven Schveighoffer wrote: dcollections second beta version 2.0b is up. This fixes a few bugs, and adds some features such as passing in elements on construction. See the full changelog here: http://www.dsource.org/projects/dcollections/wiki/ChangeLog This release is

Re: CMake for D2 ready for testers

2010-09-06 Thread Nick Sabalausky
SK s...@metrokings.com wrote in message news:mailman.113.1283750971.858.digitalmar...@puremagic.com... Why labor over buggy Makefiles when you could be laboring over buggy CMake files at a much more productive level of abstraction? :o) With excellent help from Jens Mueller and Dean Calver,

Re: Bikeshedding fun: suggest a name for 64 bit Phobos library

2010-09-06 Thread Anders F Björklund
Brad Roberts wrote: On 9/5/2010 9:39 PM, Walter Bright wrote: We already have: libphobos.a Phobos 1, 32 bit libphobos2.a Phobos 2, 32 bit What should the 64 bit Phobos be named? No change in name, change in directory holding it. ie.. lib64/libphobos* That's what most major

Re: CMake for D2 ready for testers

2010-09-06 Thread Jonathan M Davis
On Sunday 05 September 2010 22:55:58 Nick Sabalausky wrote: SK s...@metrokings.com wrote in message news:mailman.113.1283750971.858.digitalmar...@puremagic.com... Why labor over buggy Makefiles when you could be laboring over buggy CMake files at a much more productive level of

Re: Bikeshedding fun: suggest a name for 64 bit Phobos library

2010-09-06 Thread KennyTM~
On Sep 6, 10 12:39, Walter Bright wrote: We already have: libphobos.a Phobos 1, 32 bit libphobos2.a Phobos 2, 32 bit What should the 64 bit Phobos be named? There is no need to change the name on Mac OS X because of fat binary.

Re: Please comment on http://d-programming-language.org/

2010-09-06 Thread Kagamin
Adam B Wrote: Using stylesheets can allow your users to view the site however is most pleasing to them. For example. Go to this page: http://www.thesitewizard.com/css/switch-alternate-css-styles.shtml and then in FireFox select: View- Page Style and switch between the two provided

Re: [Slight OT] TDPL in Russia

2010-09-06 Thread Max Samukha
On 09/04/2010 08:56 PM, Walter Bright wrote: Max Samukha wrote: On 04.09.2010 5:50, Walter Bright wrote: It still makes no sense to have it as a separate file. Yeah. Just like it makes no sense to have headers separate from object files. If I invented an object file format, you can bet

Re: Bikeshedding fun: suggest a name for 64 bit Phobos library

2010-09-06 Thread Stanislav Blinov
Walter Bright wrote: We already have: libphobos.a Phobos 1, 32 bit libphobos2.a Phobos 2, 32 bit What should the 64 bit Phobos be named? I'd agree that yet another name is not needed, but just for fun - you have another moon :) That name would fully reflect feelings of people

Re: [Slight OT] TDPL in Russia

2010-09-06 Thread domino
Sean Kelly Wrote: Walter Bright Wrote: retard wrote: Thu, 02 Sep 2010 16:03:59 -0400, Nick Sabalausky wrote: J. What happens when the battery gets old and won't hold a charge? You buy a new one, of course. Why this will never happen is that once a new model of the iShit

Re: Bikeshedding fun: suggest a name for 64 bit Phobos library

2010-09-06 Thread Jacob Carlborg
On 2010-09-06 08:24, Anders F Björklund wrote: Brad Roberts wrote: On 9/5/2010 9:39 PM, Walter Bright wrote: We already have: libphobos.a Phobos 1, 32 bit libphobos2.a Phobos 2, 32 bit What should the 64 bit Phobos be named? No change in name, change in directory holding it. ie..

Re: Cloning in D

2010-09-06 Thread Jacob Carlborg
On 2010-09-06 05:15, dsimcha wrote: I've started playing around with Orange a little to see whether it would meet D's cloning needs. IMHO one must-have feature for proper cloning that truly just works is full aliasing preservation. For example, the following code modified slightly from the

Re: CMake for D2 ready for testers

2010-09-06 Thread Nick Sabalausky
Jonathan M Davis jmdavisp...@gmail.com wrote in message news:mailman.114.1283754439.858.digitalmar...@puremagic.com... On Sunday 05 September 2010 22:55:58 Nick Sabalausky wrote: SK s...@metrokings.com wrote in message news:mailman.113.1283750971.858.digitalmar...@puremagic.com... Why labor

Re: CMake for D2 ready for testers

2010-09-06 Thread Jonathan M Davis
On Monday 06 September 2010 01:53:55 Nick Sabalausky wrote: Well, I guess what I mean is, compared to something like SCons, Rake or A-A-P. Those tools, like cmake, handle cross-platform no problem while providing far saner syntax than traditional make. But unline cmake, they don't have any

Re: Bikeshedding fun: suggest a name for 64 bit Phobos library

2010-09-06 Thread Anders F Björklund
Jacob Carlborg wrote: But since it's just a static library (still, right?) it's more a question of directories and -L-L DFLAGS Tango can be built as a dynamic library on Mac OS X since a while, just waiting for Sean to apply the rest of the patch for druntime (half of the patch is already

Re: burberry

2010-09-06 Thread dgfdsgsd
[url=http://www.uggbootsale-uk.org/ugg-classic-mini-boots.html]ugg boots[/url]This IP Address has been bloked from registering on the forumThis IP Address has been bloked from registering on the forum [url=http://www.uggbootsale-uk.org/ugg-classic-mini-boots.html]ugg[/url]This IP Address has

Re: this as lvalue?

2010-09-06 Thread bearophile
Andrej Mitrovic: ++ on that bug report. Then vote for it :-) Bye, bearophile

Re: [Challenge] implementing the ambiguous operator in D

2010-09-06 Thread Peter Alexander
== Quote from Andrei Alexandrescu Yah, per your follow-up post, it's a different problem. It's also a much more difficult one. I convinced myself crossProduct is impossible to implement if one input range and one infinite forward range are simultaneously present. It works with any number of

Re: CMake for D2 ready for testers

2010-09-06 Thread LMB
Haven't tried it yet, but thank you very much! This is something I missed a lot :-) LMB SK Wrote: Why labor over buggy Makefiles when you could be laboring over buggy CMake files at a much more productive level of abstraction? :o) With excellent help from Jens Mueller and Dean Calver,

Re: Bikeshedding fun: suggest a name for 64 bit Phobos library

2010-09-06 Thread Simen kjaeraas
On Mon, 06 Sep 2010 09:55:42 +0200, Stanislav Blinov stanislav.bli...@gmail.com wrote: Walter Bright wrote: We already have: libphobos.a Phobos 1, 32 bit libphobos2.a Phobos 2, 32 bit What should the 64 bit Phobos be named? I'd agree that yet another name is not needed, but

Re: [Challenge] implementing the ambiguous operator in D

2010-09-06 Thread Simen kjaeraas
Peter Alexander peter.alexander...@gmail.com wrote: I must be missing something, because I don't understand how you could possibly take the cross product of any number of infinite ranges (other than to just return the range of (a[0], b[i]) for all (infinitely many) i in b). Note that I'm

Re: Bikeshedding fun: suggest a name for 64 bit Phobos library

2010-09-06 Thread Simen kjaeraas
Simen kjaeraas simen.kja...@gmail.com wrote: On Mon, 06 Sep 2010 09:55:42 +0200, Stanislav Blinov stanislav.bli...@gmail.com wrote: Walter Bright wrote: We already have: libphobos.a Phobos 1, 32 bit libphobos2.a Phobos 2, 32 bit What should the 64 bit Phobos be named? I'd

Re: Cloning in D

2010-09-06 Thread Jacob Carlborg
On 2010-09-06 10:44, Jacob Carlborg wrote: On 2010-09-06 05:15, dsimcha wrote: I've started playing around with Orange a little to see whether it would meet D's cloning needs. IMHO one must-have feature for proper cloning that truly just works is full aliasing preservation. For example, the

Re: [Challenge] implementing the ambiguous operator in D

2010-09-06 Thread Simen kjaeraas
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I convinced myself crossProduct is impossible to implement if one input range and one infinite forward range are simultaneously present. It works with any number of infinite forward ranges, and also with other combinations. I couldn't

Re: Cloning in D

2010-09-06 Thread dsimcha
== Quote from Jacob Carlborg (d...@me.com)'s article I've looked at this problem now but I don't know I can detect the aliasing. Suggestions ? Well, here's what I was thinking of doing when I was thinking of rolling my own: Traverse the object graph once. Create some data structure of all

Re: [Challenge] implementing the ambiguous operator in D

2010-09-06 Thread Simen kjaeraas
Simen kjaeraas simen.kja...@gmail.com wrote: Special cases come for input ranges - I will not consider those. All forward ranges can be treated the same, regardless of infiniteness. Actually, input ranges make everything a lot easier - the best solution is the brute-force stupid solution. --

Re: [Challenge] implementing the ambiguous operator in D

2010-09-06 Thread Andrei Alexandrescu
On 09/06/2010 06:51 AM, Peter Alexander wrote: == Quote from Andrei Alexandrescu Yah, per your follow-up post, it's a different problem. It's also a much more difficult one. I convinced myself crossProduct is impossible to implement if one input range and one infinite forward range are

Re: Cloning in D

2010-09-06 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article On 09/05/2010 10:15 PM, dsimcha wrote: I've started playing around with Orange a little to see whether it would meet D's cloning needs. IMHO one must-have feature for proper cloning that truly just works is full

Re: CMake for D2 ready for testers

2010-09-06 Thread klickverbot
Thanks a lot – I was just thinking about writing something like that myself when I stumbled over this post! I have just switched to OS X, so I probably will be able to help you out in that regard. I'll report back when I have found time to have a look on it.

Re: Bikeshedding fun: suggest a name for 64 bit Phobos library

2010-09-06 Thread klickverbot
Please, please just call it libphobos2.a on Linux and move it to the 64bit library directory. On OS X, one might want to build it as universal binary, so no special casing needed there either. On Windows it is installed to the DMD directory anyway, so this is probably no issue either

Re: this as lvalue?

2010-09-06 Thread Andrej Mitrovic
Done. I only have 5 votes left though. This is no democracy!! :p On Mon, Sep 6, 2010 at 12:58 PM, bearophile bearophileh...@lycos.com wrote: Andrej Mitrovic: ++ on that bug report. Then vote for it :-) Bye, bearophile

Re: CMake for D2 ready for testers

2010-09-06 Thread SK
On Mon, Sep 6, 2010 at 1:53 AM, Nick Sabalausky a...@a.a wrote: Jonathan M Davis jmdavisp...@gmail.com wrote in message news:mailman.114.1283754439.858.digitalmar...@puremagic.com... On Sunday 05 September 2010 22:55:58 Nick Sabalausky wrote: Not to be contentious, just curious about the

Re: [Slight OT] TDPL in Russia

2010-09-06 Thread BCS
Hello Nick, Steven Schveighoffer schvei...@yahoo.com wrote in message Obsolescence comes from three things: 1. Forced by big business strong-arming people into buying products via subscription model. 2. Physical breaking down. 3. The consumer *themself* deciding to get the new one

btw ... GDB 7.2 is stable - with D support :)

2010-09-06 Thread dennis luehring
http://www.gnu.org/software/gdb/

Re: CMake for D2 ready for testers

2010-09-06 Thread Gareth Charnock
I will definitely be checking this out. I've used CMake with C++ for quite a large project and it's been very good at of getting the done without being the infinite tower of turtles on turtles that autotools seems to be. (I never managed to learn autotools so perhaps they don't seem as bad

Does DMD build as a 32bit binary under linux?

2010-09-06 Thread BCS
I assuem that a 64bit DMD building 64bit binaries is one of the objective right now. How about a 64bit-32bit? (Or for that matter, 32bit-64bit.) -- ... IXOYE

Re: btw ... GDB 7.2 is stable - with D support :)

2010-09-06 Thread simendsjo
On 06.09.2010 19:58, dennis luehring wrote: http://www.gnu.org/software/gdb/ http://sourceware.org/gdb/download/onlinedocs/gdb/D.html#D It isn't the most impressive featurelist though..

Re: Cloning in D

2010-09-06 Thread Jacob Carlborg
On 2010-09-06 16:01, dsimcha wrote: == Quote from Jacob Carlborg (d...@me.com)'s article I've looked at this problem now but I don't know I can detect the aliasing. Suggestions ? Well, here's what I was thinking of doing when I was thinking of rolling my own: Traverse the object graph once.

Re: Cloning in D

2010-09-06 Thread Jacob Carlborg
On 2010-09-06 16:12, Andrei Alexandrescu wrote: On 09/05/2010 10:15 PM, dsimcha wrote: I've started playing around with Orange a little to see whether it would meet D's cloning needs. IMHO one must-have feature for proper cloning that truly just works is full aliasing preservation. What do

Re: [Slight OT] TDPL in Russia

2010-09-06 Thread Walter Bright
BCS wrote: Aside from a memeory card, name one things you've ever known someone else to want to add to a phone? A keyboard.

Re: Logger For D Design Doc

2010-09-06 Thread BCS
Hello sybrandy, Hello, As promised, I took some time to create a small document (just a text file) to describe a potential logger for D. Glog was a major influence on how the design turned out, though there are some differences. Please note it's not a 100% solution yet. Hopefully this is

Re: Does DMD build as a 32bit binary under linux?

2010-09-06 Thread Walter Bright
BCS wrote: I assuem that a 64bit DMD building 64bit binaries is one of the objective right now. How about a 64bit-32bit? (Or for that matter, 32bit-64bit.) There's not much reason to provide a 64 bit binary of dmd. I doubt it would run any faster, and there's no need for a compiler to

Re: Cloning in D

2010-09-06 Thread BLS
On 06/09/2010 05:15, dsimcha wrote: I've started playing around with Orange a little to see whether it would meet D's cloning needs. Clone respective member-wise clone ( I prefer copy and deep copy) should be part of object. no std._tricks period.

Re: [Challenge] implementing the ambiguous operator in D

2010-09-06 Thread Simen kjaeraas
Attached latest version. It bugs out with an infinite loop, and I'm too tired to look more at it now. -- Simen autoRefTuple.d Description: Binary data combine.d Description: Binary data

Re: Does DMD build as a 32bit binary under linux?

2010-09-06 Thread dsimcha
== Quote from Walter Bright (newshou...@digitalmars.com)'s article There's not much reason to provide a 64 bit binary of dmd. How about using a computer that you don't have admin access to that doesn't offer good support for 32-bit binaries? Then again, for these cases you could just compile a

Re: [Challenge] implementing the ambiguous operator in D

2010-09-06 Thread Peter Alexander
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article We've discussed this before. Crosscartesian product of multiple infinite ranges can be easily done by applying Cantor's trick for proving that rational numbers are just as numerous than natural numbers. Google for

Re: Please comment on http://d-programming-language.org/

2010-09-06 Thread Nick Sabalausky
Kagamin s...@here.lot wrote in message news:i621j7$1uj...@digitalmars.com... It's not just about color scheme, style can change layout. That's more of an occasional trick though. CSS is pretty bad at layouts in general.

Re: [Slight OT] TDPL in Russia

2010-09-06 Thread Nick Sabalausky
BCS n...@anon.com wrote in message news:a6268ff1b9068cd1bc36b696...@news.digitalmars.com... Hello Nick, In and of itself, maybe. But thinness typically necessitates other design compromises, all for a benefit that is, as you say, petty. What compromises? What is it missing that could be

Re: Does DMD build as a 32bit binary under linux?

2010-09-06 Thread bearophile
Walter Bright: I doubt it would run any faster, I can't know. and there's no need for a compiler to consume 5 GB of memory. I don't know. But currently it's not hard for me to reach about 1 GB of used RAM with template/CTFE-heavy code (once a certain CTFE bug is fixed, the needed memory

Re: [Slight OT] TDPL in Russia

2010-09-06 Thread Nick Sabalausky
Nick Sabalausky a...@a.a wrote in message news:i63jvb$29f...@digitalmars.com... BCS n...@anon.com wrote in message news:a6268ff1b9068cd1bc36b696...@news.digitalmars.com... Hello Nick, In and of itself, maybe. But thinness typically necessitates other design compromises, all for a benefit

Re: [Slight OT] TDPL in Russia

2010-09-06 Thread Nick Sabalausky
Nick Sabalausky a...@a.a wrote in message news:i63k4d$29q...@digitalmars.com... Nick Sabalausky a...@a.a wrote in message news:i63jvb$29f...@digitalmars.com... BCS n...@anon.com wrote in message news:a6268ff1b9068cd1bc36b696...@news.digitalmars.com... Aside from a memeory card, name one

Re: Cloning in D

2010-09-06 Thread Andrei Alexandrescu
On 09/06/2010 02:56 PM, BLS wrote: On 06/09/2010 05:15, dsimcha wrote: I've started playing around with Orange a little to see whether it would meet D's cloning needs. Clone respective member-wise clone ( I prefer copy and deep copy) should be part of object. no std._tricks period. Though

Re: readf for the novice

2010-09-06 Thread Andrej Mitrovic
Those look really nice, they could especially be used in tutorials. I'm replicating some D1 examples from the dsource page to be D2 compatible, and I could add a bunch of more D2 examples as well. I'd be willing to write some tutorials for these if they get their way into Phobos. Jesse

Re: Does DMD build as a 32bit binary under linux?

2010-09-06 Thread BCS
Hello Walter, BCS wrote: I assuem that a 64bit DMD building 64bit binaries is one of the objective right now. How about a 64bit-32bit? (Or for that matter, 32bit-64bit.) There's not much reason to provide a 64 bit binary of dmd. I doubt it would run any faster, and there's no need for a

Re: [Slight OT] TDPL in Russia

2010-09-06 Thread BCS
Hello Walter, BCS wrote: Aside from a memeory card, name one things you've ever known someone else to want to add to a phone? A keyboard. People want a phone that has a key board from the get go. How many people actually want to /add/ one to the phone they have? -- ... IXOYE

Re: [Slight OT] TDPL in Russia

2010-09-06 Thread BCS
Hello Nick, BCS n...@anon.com wrote in message news:a6268ff1b9068cd1bc36b696...@news.digitalmars.com... Hello Nick, In and of itself, maybe. But thinness typically necessitates other design compromises, all for a benefit that is, as you say, petty. What compromises? What is it missing

Re: [Slight OT] TDPL in Russia

2010-09-06 Thread BCS
Hello Nick, Nick Sabalausky a...@a.a wrote in message news:i63k4d$29q...@digitalmars.com... Nick Sabalausky a...@a.a wrote in message news:i63jvb$29f...@digitalmars.com... BCS n...@anon.com wrote in message news:a6268ff1b9068cd1bc36b696...@news.digitalmars.com... Aside from a memeory

Re: Cloning in D

2010-09-06 Thread Michel Fortin
On 2010-09-06 17:00:26 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org said: On 09/06/2010 02:56 PM, BLS wrote: On 06/09/2010 05:15, dsimcha wrote: I've started playing around with Orange a little to see whether it would meet D's cloning needs. Clone respective member-wise clone (

Re: Cloning in D

2010-09-06 Thread dsimcha
== Quote from Michel Fortin (michel.for...@michelf.com)'s article I'm under the impression that a too permissive generic implementation of cloning is going to break things in various scenarios. In general you raise some very good issues, but IMHO the right way to do cloning is to have

Re: [Challenge] implementing the ambiguous operator in D

2010-09-06 Thread Andrei Alexandrescu
On 09/06/2010 04:34 PM, Philippe Sigaud wrote: Which gives us: (0,0),(0,1),(1,0),(0,2),(1,1),(2,0),(0,3), .. See the indices: sum of 0, then sum of 1, then sum of 2, ... You never get stuck in an infinite line since these diagonal slices are finite. I don't think iteration for constant index

Re: btw ... GDB 7.2 is stable - with D support :)

2010-09-06 Thread Leandro Lucarella
simendsjo, el 6 de septiembre a las 20:25 me escribiste: On 06.09.2010 19:58, dennis luehring wrote: http://www.gnu.org/software/gdb/ http://sourceware.org/gdb/download/onlinedocs/gdb/D.html#D It isn't the most impressive featurelist though.. Demangling is the true killer feature (is

Re: Cloning in D

2010-09-06 Thread Michel Fortin
On 2010-09-06 20:55:16 -0400, dsimcha dsim...@yahoo.com said: == Quote from Michel Fortin (michel.for...@michelf.com)'s article I'm under the impression that a too permissive generic implementation of cloning is going to break things in various scenarios. In general you raise some very good

Re: Please comment on http://d-programming-language.org/

2010-09-06 Thread Robert Jacques
On Thu, 02 Sep 2010 03:03:33 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Time to zero in on the overall design and start working on the content. Please give the design one more round of comments. Thanks, Andrei Hi Andrei, The site is still extremely buggy (i.e.

Re: [Slight OT] TDPL in Russia

2010-09-06 Thread Nick Sabalausky
BCS n...@anon.com wrote in message news:a6268ff1b9958cd1bfa01297...@news.digitalmars.com... Hello Nick, Ugh, don't even get me started on MicroSD. Ordinary SD is already too small if you ask me, although I still put up with it anyway. Now MicroSD, well I can't say anything about it without

Re: [Slight OT] TDPL in Russia

2010-09-06 Thread BCS
Hello Nick, BCS n...@anon.com wrote in message news:a6268ff1b9958cd1bfa01297...@news.digitalmars.com... Hello Nick, Ugh, don't even get me started on MicroSD. Ordinary SD is already too small if you ask me, although I still put up with it anyway. Now MicroSD, well I can't say anything about

Bitwise ranges

2010-09-06 Thread Stanislav Blinov
Hello, I'm working on range adapters that should allow reading and writing individual bits from/to other ranges. Right now for simplicity I only allow that for ranges that have numerics as ElementType. Making an input bitwise range is pretty straightforward: popFront on original range is

Re: Bitwise ranges

2010-09-06 Thread bearophile
Stanislav Blinov: What I'm stuck with is an output bitwise range. If the adapted output range works via mutable front/popFront mechanism, implementing bitwise output is almost identical to bitwise input. But when adapted range provides output interface via put() method, I have no possible

Re: Bitwise ranges

2010-09-06 Thread Stanislav Blinov
06.09.2010 15:37, bearophile wrote: I am not sure, but this looks related to the idea of Vectorized Lazines that I have shown time ago (from MonetDB/X100), and that later has partially appeared in the Clojure language as Chunked Sequences:

Re: Understanding isInfinite(Range)

2010-09-06 Thread Pelle
On 09/04/2010 02:11 PM, Simen kjaeraas wrote: Peter Alexander peter.alexander...@gmail.com wrote: == Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article On Fri, 03 Sep 2010 11:12:29 -0400, Andrej Mitrovic andrej.mitrov...@test.com wrote: What does char[1 + Range.empty] do? It

Re: Understanding isInfinite(Range)

2010-09-06 Thread Philippe Sigaud
On Mon, Sep 6, 2010 at 18:47, Pelle pelle.mans...@gmail.com wrote: On 09/04/2010 02:11 PM, Simen kjaeraas wrote: Is there a way you could write an isStatic(expr) template? Using template isStatic( alias T ) { enum isStatic = is( char[1+T] ); } unittest { int n = 3; assert( !isStatic!n

Re: Understanding isInfinite(Range)

2010-09-06 Thread Stanislav Blinov
Andrej Mitrovic wrote: Apparently I can't post to D.learn from gmail without waiting for a review? What the..? Anyway, I've posted this: On a related note, I always wanted to make a template to replace the dreaded is(typeof('delegate literal'())); calls. For example, instead of this: enum

Re: Understanding isInfinite(Range)

2010-09-06 Thread Mafi
Am 06.09.2010 21:24, schrieb Andrej Mitrovic: Apparently I can't post to D.learn from gmail without waiting for a review? What the..? Anyway, I've posted this: On a related note, I always wanted to make a template to replace the dreaded is(typeof('delegate literal'())); calls. For example,

Re: Understanding isInfinite(Range)

2010-09-06 Thread Andrej Mitrovic
I'd love to see this used more in Phobos. I don't know if there are any drawbacks, but this looks and works nicely: import std.stdio : writeln; void main() { writeln(isInputRange!(N)); } class N { N test; bool empty() { return false; } @property

Re: Understanding isInfinite(Range)

2010-09-06 Thread Pelle
On 09/06/2010 08:53 PM, Philippe Sigaud wrote: On Mon, Sep 6, 2010 at 18:47, Pelle pelle.mans...@gmail.com mailto:pelle.mans...@gmail.com wrote: On 09/04/2010 02:11 PM, Simen kjaeraas wrote: Is there a way you could write an isStatic(expr) template? Using template

Re: Understanding isInfinite(Range)

2010-09-06 Thread Andrej Mitrovic
Is this legal?: enum a = test; a = test2; Because it seems to compile. But that shouldn't work afaik..? I can't reassign other enum types: enum b = 4; b = 5; // error which is expected. Pelle Wrote: On 09/06/2010 08:53 PM, Philippe Sigaud wrote: On Mon, Sep 6, 2010 at 18:47, Pelle

alias this ...

2010-09-06 Thread BLS
// ..snip point3D p; // Da p.x = 10; p.y = 20; p.z = 100; point3D = = new point3D(10,20,30) // Njet //etc } struct point { int x; int y; } struct point3D { point p; alias p this; int z; // NOPE :( /*static point3D opcall(int _x, int _y, int

Re: alias this ...

2010-09-06 Thread BLS
On 06/09/2010 22:36, BLS wrote: point3D = = new point3D(10,20,30) // Njet //etc should be point3D p3 = new point3D(10,20,30) // Njet sorry

Re: Understanding isInfinite(Range)

2010-09-06 Thread Stanislav Blinov
Andrej Mitrovic wrote: I'd love to see this used more in Phobos. I don't know if there are any drawbacks, but this looks and works nicely: import std.stdio : writeln; void main() { writeln(isInputRange!(N)); } class N { N test; bool empty() { return false; }

Re: alias this ...

2010-09-06 Thread Stanislav Blinov
BLS wrote: On 06/09/2010 22:36, BLS wrote: point3D = = new point3D(10,20,30) // Njet //etc should be point3D p3 = new point3D(10,20,30) // Njet sorry Struct is value type, not reference type like class. You don't need 'new' to create it, just uncomment your constructor ('this') and

Re: Understanding isInfinite(Range)

2010-09-06 Thread Stanislav Blinov
Andrej Mitrovic wrote: It does look nice. It would look even nicer if __traits gets renamed to meta. By the way, there's no stopping writing template isValidCode(alias code) { enum bool isValidCode = __traits(compiles, code); } :)

Re: Understanding isInfinite(Range)

2010-09-06 Thread Andrej Mitrovic
is(typeof( is used a lot in Phobos. There's some ~260 calls like that, a quick search revealed. :p Stanislav Blinov Wrote: If I remember correctly, it has been discussed not long ago that those is(typeof(...))s should really be __traits(compiles). Maybe it's just some code was written

Re: Understanding isInfinite(Range)

2010-09-06 Thread Andrej Mitrovic
That still won't work. Observe: import std.stdio : writeln; void main() { writeln(isInputRange!(N)); } class N { N test; //~ bool empty() // oops, were not an input range anymore //~ { //~ return false; //~ } @property void popFront() { }

Re: Understanding isInfinite(Range)

2010-09-06 Thread Stanislav Blinov
Andrej Mitrovic wrote: That still won't work. Observe: Oops, sorry, I was too quick to conclude.

Using getchar

2010-09-06 Thread Andrej Mitrovic
I have some D1 code that I'm transfering to D2, and it's using getchar. I think I need to flush the buffer or something because the loop tends to skip: import std.c.stdio; import std.stdio; void main() { char k; for(int i = 0; i 10; i++) { writef(Press key #%d:\t\n, i);

Re: Understanding isInfinite(Range)

2010-09-06 Thread Philippe Sigaud
On Mon, Sep 6, 2010 at 23:31, Andrej Mitrovic andrej.mitrov...@test.comwrote: That still won't work. Observe: template isInputRange(R) { enum bool isInputRange = isValidCode!( { R r;// can define a range object if (r.empty) {} // can test for

Re: Using getchar

2010-09-06 Thread Stanislav Blinov
Andrej Mitrovic wrote: Someone on the NGs started creating some user-friendly input functions, something like getInput!char(variable), or similar. But I can't find the topic, anyone know the link perhaps? It was fairly recent that someone posted it. It was Jesse Phillips:

Re: Understanding isInfinite(Range)

2010-09-06 Thread bearophile
Andrej Mitrovic: enum a = test; a = test2; Because it seems to compile. But that shouldn't work afaik..? I have two open bug reports on this (and a third one was open by Don). Bye, bearophile

Re: Understanding isInfinite(Range)

2010-09-06 Thread Andrej Mitrovic
I'm sorry, but what does q{..} mean? Philippe Sigaud Wrote: On Mon, Sep 6, 2010 at 23:31, Andrej Mitrovic andrej.mitrov...@test.comwrote: That still won't work. Observe: template isInputRange(R) { enum bool isInputRange = isValidCode!( { R r;

Re: Using getchar

2010-09-06 Thread Andrej Mitrovic
Thanks. Stanislav Blinov Wrote: Andrej Mitrovic wrote: Someone on the NGs started creating some user-friendly input functions, something like getInput!char(variable), or similar. But I can't find the topic, anyone know the link perhaps? It was fairly recent that someone posted

Re: Understanding isInfinite(Range)

2010-09-06 Thread bearophile
Andrej Mitrovic: I'm sorry, but what does q{..} mean? q{} is just a different syntax to write or `` It's a controversial feature. q{} isn't recognized by editors as a string, so they colour the syntax it contains normally as code, and not as a string. So it's a bit useful if you want to

Re: Understanding isInfinite(Range)

2010-09-06 Thread Andrej Mitrovic
Heh. I'd rather want text editors to use syntax highlighting on comments as well, but use a different background color. Then I would know it's a comment but it would also make any embedded code in the comment actually readable. bearophile bearophileh...@lycos.com Wrote: Andrej Mitrovic:

Re: Understanding isInfinite(Range)

2010-09-06 Thread Andrej Mitrovic
I meant string literals. But comments as well. Andrej Mitrovic Wrote: Heh. I'd rather want text editors to use syntax highlighting on comments as well, but use a different background color. Then I would know it's a comment but it would also make any embedded code in the comment actually

[Issue 4828] New: ICE w/ non-boolean dot expression sth.template_instance in static if

2010-09-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4828 Summary: ICE w/ non-boolean dot expression sth.template_instance in static if Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords:

[Issue 4820] Regression(1.058, 2.044) in DStress caused by changeset 452

2010-09-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4820 Don clugd...@yahoo.com.au changed: What|Removed |Added CC||clugd...@yahoo.com.au

[Issue 4820] Regression(1.058, 2.044) in DStress caused by changeset 452

2010-09-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4820 --- Comment #1 from Don clugd...@yahoo.com.au 2010-09-06 00:44:52 PDT --- Thanks for the superb bug report! Reduced test case shows it's nothing to do with lazy: void nextis(void delegate() dg = {}) {} void main() { nextis(); } This is

[Issue 4828] ICE w/ non-boolean dot expression sth.template_instance in static if

2010-09-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4828 Don clugd...@yahoo.com.au changed: What|Removed |Added CC||clugd...@yahoo.com.au ---

[Issue 4829] New: Linux build fails

2010-09-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4829 Summary: Linux build fails Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD

[Issue 4830] New: mtype.c:879: void Type::check(): Assertion `tn-mod == 4' failed

2010-09-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4830 Summary: mtype.c:879: void Type::check(): Assertion `tn-mod == 4' failed Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Severity:

[Issue 4830] Regression(2.038) ICE mtype.c:879: void Type::check(): Assertion `tn-mod == 4' failed

2010-09-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4830 Don clugd...@yahoo.com.au changed: What|Removed |Added CC||clugd...@yahoo.com.au

[Issue 4831] New: Optlink failed to parse PATH env variable with -g option

2010-09-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4831 Summary: Optlink failed to parse PATH env variable with -g option Product: D Version: D2 Platform: All OS/Version: Windows Status: NEW Severity: blocker

[Issue 4832] New: Functions external to class break immutability

2010-09-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4832 Summary: Functions external to class break immutability Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2

  1   2   >