Interview with InformIT part 2/3

2010-08-18 Thread Andrei Alexandrescu
http://www.informit.com/articles/article.aspx?p=1622265 Andrei

Re: Interview with InformIT part 2/3

2010-08-18 Thread Andrei Alexandrescu
On 08/18/2010 05:13 AM, Andrei Alexandrescu wrote: http://www.informit.com/articles/article.aspx?p=1622265 Andrei Now on reddit: http://www.reddit.com/r/programming/comments/d2j8n/d_programming_language_interview_with_andrei/ Thanks davebrk! Andrei

Re: Interview with InformIT part 2/3

2010-08-18 Thread Vladimir Panteleev
On Wed, 18 Aug 2010 13:13:25 +0300, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: http://www.informit.com/articles/article.aspx?p=1622265 Thanks, that was an interesting read. It's possible that I'm missing something, but I think that C++'s default constructors +

Re: Interview with InformIT part 2/3

2010-08-18 Thread Andrei Alexandrescu
On 08/18/2010 06:46 AM, Vladimir Panteleev wrote: On Wed, 18 Aug 2010 13:13:25 +0300, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: http://www.informit.com/articles/article.aspx?p=1622265 Thanks, that was an interesting read. It's possible that I'm missing something, but I think

Re: Interview with InformIT part 2/3

2010-08-18 Thread bearophile
Andrei Alexandrescu: http://www.reddit.com/r/programming/comments/d2j8n/d_programming_language_interview_with_andrei/ I will need time to digest this interesting second part of your interview, you say many complex things. In the meantime that Reddit thread is one of the worst I've seen on that

Re: Interview with InformIT part 2/3

2010-08-18 Thread Walter Bright
bearophile wrote: Currently in the D2 GC there is no notion of pinned/unpinned class instances, but eventually an attribute as @pinned may be added to D3, plus its related semantics. It adds complexity to the language and it needs to interact with the GC, so it will get useful as the D GC

Re: Interview with InformIT part 2/3

2010-08-18 Thread Michel Fortin
On 2010-08-18 06:13:25 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org said: http://www.informit.com/articles/article.aspx?p=1622265 Andrei Quoting: The most difficult scenario here is a class that has a struct as a member. If the struct has a destructor, it will be run

Re: Interview with InformIT part 2/3

2010-08-18 Thread Jonathan M Davis
On Wednesday, August 18, 2010 09:59:27 bearophile wrote: Andrei Alexandrescu: http://www.reddit.com/r/programming/comments/d2j8n/d_programming_language _interview_with_andrei/ I will need time to digest this interesting second part of your interview, you say many complex things. In the

Re: Interview with InformIT part 2/3

2010-08-18 Thread Leandro Lucarella
Walter Bright, el 18 de agosto a las 10:08 me escribiste: bearophile wrote: Currently in the D2 GC there is no notion of pinned/unpinned class instances, but eventually an attribute as @pinned may be added to D3, plus its related semantics. It adds complexity to the language and it needs to

Re: Interview with InformIT part 2/3

2010-08-18 Thread Walter Bright
Leandro Lucarella wrote: Walter Bright, el 18 de agosto a las 10:08 me escribiste: bearophile wrote: Currently in the D2 GC there is no notion of pinned/unpinned class instances, but eventually an attribute as @pinned may be added to D3, plus its related semantics. It adds complexity to the

Re: Interview with InformIT part 2/3

2010-08-18 Thread Andrei Alexandrescu
On 08/18/2010 11:59 AM, bearophile wrote: Andrei Alexandrescu: http://www.reddit.com/r/programming/comments/d2j8n/d_programming_language_interview_with_andrei/ I will need time to digest this interesting second part of your interview, you say many complex things. In the meantime that

Re: dmd 1.063 and 2.048 release

2010-08-18 Thread Ellery Newcomer
On 08/11/2010 02:15 AM, Walter Bright wrote: This is probably the last FreeBSD 7 release for D1. The next will be for FreeBSD 8! http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.063.zip http://www.digitalmars.com/d/2.0/changelog.html

Re: Interview with InformIT part 2/3

2010-08-18 Thread bearophile
Walter Bright: There is no need for a pin attribute, the gc can determine if a class needs pinning or not. The same is probably true for pure functions too, the compiler can determine what functions are pure and what are not pure. But the purpose of a @pinned is that: 1) The default becomes

Re: Interview with InformIT part 2/3

2010-08-18 Thread Walter Bright
bearophile wrote: Walter Bright: There is no need for a pin attribute, the gc can determine if a class needs pinning or not. The same is probably true for pure functions too, the compiler can determine what functions are pure and what are not pure. But the purpose of a @pinned is that: 1)

Re: Interview with InformIT part 2/3

2010-08-18 Thread bearophile
Walter Bright: The other problem with a pinned/notpinned object is the object itself cannot control who or how someone is pointing to it. The type system may tell apart three kinds of pointers/references: 1) hand-managed pointers, to GC memory or C heap memory; 2) GC-managed pointers to pinned

Re: Interview with InformIT part 2/3

2010-08-18 Thread Walter Bright
bearophile wrote: Walter Bright: The other problem with a pinned/notpinned object is the object itself cannot control who or how someone is pointing to it. The type system may tell apart three kinds of pointers/references: 1) hand-managed pointers, to GC memory or C heap memory; 2) GC-managed

Re: Interview with InformIT part 2/3

2010-08-18 Thread bearophile
Walter Bright: Microsoft's managed C++ on .net comes with multiple pointer types - managed and unmanaged pointers - as far as I know, this was a technical success yet a massive failure with users. How do you define failure? Maybe for D2 multiple pointer types are a failure as you say, but

Re: Interview with InformIT part 2/3

2010-08-18 Thread Walter Bright
bearophile wrote: Walter Bright: Microsoft's managed C++ on .net comes with multiple pointer types - managed and unmanaged pointers - as far as I know, this was a technical success yet a massive failure with users. How do you define failure? Nobody wanted to use it. Maybe for D2 multiple

Re: Interview with InformIT part 2/3

2010-08-18 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:i4hvjh$91...@digitalmars.com... Being forced to use something doesn't make that thing a success. Unfortunately, I can think of a lot of counterexamples (any monopoly or oligopoly, for instance). But I agree in spirit :)

Re: to!()() leading/trailing whitespace

2010-08-18 Thread Norbert Nemec
On 17/08/10 02:49, Andrei Alexandrescu wrote: bearophile wrote: This post is about this enhancement request of mine that recently David Simcha has closed as wontfix: http://d.puremagic.com/issues/show_bug.cgi?id=4165 [snip] Phobos functions are meant as the most simpler bricks, that you may

Re: Current RDMD, please?

2010-08-18 Thread Nick Sabalausky
Nick Sabalausky a...@a.a wrote in message news:i4ev6m$1bp...@digitalmars.com... Nick Sabalausky a...@a.a wrote in message news:i4et66$141...@digitalmars.com... Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:i4emnt$bc...@digitalmars.com... I saw the q, and was

Re: Current RDMD, please?

2010-08-18 Thread Jacob Carlborg
On 2010-08-17 19:18, Walter Bright wrote: Jacob Carlborg wrote: Please build the Mac version on Mac OS X 10.5 if possible otherwise it will only run on Mac OS X 10.6. This should really be fixed in possible. 10.6 is over a year old, why not upgrade? I just haven't got around and do it on

Re: Current RDMD, please?

2010-08-18 Thread Jacob Carlborg
On 2010-08-17 19:35, lurker wrote: Walter Bright Wrote: Jacob Carlborg wrote: Please build the Mac version on Mac OS X 10.5 if possible otherwise it will only run on Mac OS X 10.6. This should really be fixed in possible. 10.6 is over a year old, why not upgrade? It costs money - money

Re: Current RDMD, please?

2010-08-18 Thread Jacob Carlborg
On 2010-08-17 21:18, Walter Bright wrote: Nick Sabalausky wrote: Andrej Mitrovic andrej.mitrov...@gmail.com wrote in message news:mailman.343.1282068838.13841.digitalmar...@puremagic.com... But he's a Mac user! :p Heh, that was exactly my thought ;) I'm not a mac user (nearly-immediate

Re: htod, no version for Linux?

2010-08-18 Thread Jacob Carlborg
On 2010-08-17 21:54, Walter Bright wrote: Paul Dufresne wrote: I downloaded htod.zip and found there is only htod.exe inside. Any version for Linux? No. The problem is it is built out of the DM C compiler, which does not parse gcc extensions found in Linux. How about the rest of the

Re: range chunks

2010-08-18 Thread Rory Mcguire
Peter Alexander wrote: On 7/08/10 3:06 PM, bearophile wrote: Peter Alexander: (I just Googled for quicksort pseudocode and sure enough, all of the top 10 entries that actually contained code defined a partition function that does what std.algorithm.partition does). Yes, it's named

Re: htod, no version for Linux?

2010-08-18 Thread Stewart Gordon
Walter Bright wrote: Paul Dufresne wrote: I downloaded htod.zip and found there is only htod.exe inside. Any version for Linux? No. The problem is it is built out of the DM C compiler, which does not parse gcc extensions found in Linux. But if the headers the user wants to convert are

Re: htod, no version for Linux?

2010-08-18 Thread Michael Strashun
On 08/18/2010 05:44 PM, Stewart Gordon wrote: Walter Bright wrote: Paul Dufresne wrote: I downloaded htod.zip and found there is only htod.exe inside. Any version for Linux? No. The problem is it is built out of the DM C compiler, which does not parse gcc extensions found in Linux. But if

Re: htod, no version for Linux?

2010-08-18 Thread Walter Bright
Jacob Carlborg wrote: On 2010-08-17 21:54, Walter Bright wrote: Paul Dufresne wrote: I downloaded htod.zip and found there is only htod.exe inside. Any version for Linux? No. The problem is it is built out of the DM C compiler, which does not parse gcc extensions found in Linux. How about

Re: htod, no version for Linux?

2010-08-18 Thread Stewart Gordon
Walter Bright wrote: Jacob Carlborg wrote: On 2010-08-17 21:54, Walter Bright wrote: snip No. The problem is it is built out of the DM C compiler, which does not parse gcc extensions found in Linux. Cross-platform compatibility is a separate issue from compatibility with vendor-specific

Re: htod, no version for Linux?

2010-08-18 Thread dsimcha
== Quote from Stewart Gordon (smjg_1...@yahoo.com)'s article Walter Bright wrote: Jacob Carlborg wrote: On 2010-08-17 21:54, Walter Bright wrote: snip No. The problem is it is built out of the DM C compiler, which does not parse gcc extensions found in Linux. Cross-platform

DMD 64bit Status?

2010-08-18 Thread Jonathan Crapuchettes
Can anyone tell me the status of the DMD 64bit compiler? I'm going to be working on a project in the next month that will involve 18,000 x 18,000 double matrices. 32bit will only allow me to work with 1 at a time and I need to be able to handle minimum of 2 at a time. I have thought of using

Re: DMD 64bit Status?

2010-08-18 Thread Michael Parrott
Jonathan Crapuchettes Wrote: Can anyone tell me the status of the DMD 64bit compiler? I'm going to be working on a project in the next month that will involve 18,000 x 18,000 double matrices. 32bit will only allow me to work with 1 at a time and I need to be able to handle minimum of 2

Re: DMD 64bit Status?

2010-08-18 Thread Jonathan M Davis
On Wednesday, August 18, 2010 14:29:04 Jonathan Crapuchettes wrote: Can anyone tell me the status of the DMD 64bit compiler? I'm going to be working on a project in the next month that will involve 18,000 x 18,000 double matrices. 32bit will only allow me to work with 1 at a time and I need to

Re: DMD 64bit Status?

2010-08-18 Thread dsimcha
== Quote from Jonathan Crapuchettes (jcrapuchet...@gmail.com)'s article Can anyone tell me the status of the DMD 64bit compiler? I'm going to be working on a project in the next month that will involve 18,000 x 18,000 double matrices. 32bit will only allow me to work with 1 at a time and I

Re: htod, no version for Linux?

2010-08-18 Thread Stewart Gordon
dsimcha wrote: snip Well, if we don't care about GNU extensions, then I'll ask again, what's wrong with Wine? I'm not saying it wouldn't be nice to have a Linux port of htod, but if Wine provides an easy workaround, I think it should be a very low priority. Some users may object to installing

Why C++ compiles slowly

2010-08-18 Thread Walter Bright
http://www.drdobbs.com/blog/archives/2010/08/c_compilation_s.html I'll be doing a followup on why D compiles fast.

Re: Why C++ compiles slowly

2010-08-18 Thread Marianne Gagnon
Very right, and even more I might add a thing : the STL itself is just HUGE; and unless you live in a shell, you're going to use some library; that some library in all likeliness will include the STL directly or indirectly; and each and everyone of your files end up building the entire STL

Re: Why C++ compiles slowly

2010-08-18 Thread Justin Johansson
On 19/08/10 10:35, Walter Bright wrote: http://www.drdobbs.com/blog/archives/2010/08/c_compilation_s.html I'll be doing a followup on why D compiles fast. While I am not a compiler writer, I do have a fairly good understanding of compiler mechanics. I think the length and depth of your

Re: DMD 64bit Status?

2010-08-18 Thread Jonathan M Davis
On Wednesday, August 18, 2010 14:34:42 Michael Parrott wrote: Jonathan Crapuchettes Wrote: Can anyone tell me the status of the DMD 64bit compiler? I'm going to be working on a project in the next month that will involve 18,000 x 18,000 double matrices. 32bit will only allow me to work with

Re: Why C++ compiles slowly

2010-08-18 Thread bearophile
Walter Bright: http://www.drdobbs.com/blog/archives/2010/08/c_compilation_s.html I'll be doing a followup on why D compiles fast. Thank you, the article is nice and I didn't know most of the things it contains. the compiler is doomed to uselessly reprocess them when one file is #include'd

Immutability and strings

2010-08-18 Thread Andrej Mitrovic
Here's something from TDPL, page 292: string process(string input) { return input; }; string s1 = blah; string s2 = process(s1); assert(s1 == blah); // never fails I've added the return in process(), it wasn't there. Andrei states that it's impossible for s2 to be changed after the

Re: Immutability and strings

2010-08-18 Thread Jonathan M Davis
On Wednesday, August 18, 2010 19:11:35 Andrej Mitrovic wrote: It's just nitpicking, I know. And I'm sure Andrei was specifically documenting only that first example. But I do think it was worth mentioning that immutability on individual elements isn't a safe bet unless you're sure the function

Why foreach(c; someString) must yield dchar

2010-08-18 Thread dsimcha
I've been hacking in Phobos and parallelfuture and I've come to the conclusion that having typeof(c) in the expression foreach(c; string.init) not be a dchar is simply ridiculous. I don't care how much existing code gets broken, this needs to be fixed. Otherwise, all generic code will have to

Re: Why foreach(c; someString) must yield dchar

2010-08-18 Thread Jonathan M Davis
On Wednesday 18 August 2010 19:37:04 dsimcha wrote: I've been hacking in Phobos and parallelfuture and I've come to the conclusion that having typeof(c) in the expression foreach(c; string.init) not be a dchar is simply ridiculous. I don't care how much existing code gets broken, this needs

Re: Why foreach(c; someString) must yield dchar

2010-08-18 Thread Rainer Deyke
On 8/18/2010 20:37, dsimcha wrote: I've been hacking in Phobos and parallelfuture and I've come to the conclusion that having typeof(c) in the expression foreach(c; string.init) not be a dchar is simply ridiculous. I have long ago come to the opposite conclusion. An array of 'char' should act

Re: Why foreach(c; someString) must yield dchar

2010-08-18 Thread Rainer Deyke
On 8/18/2010 21:12, Jonathan M Davis wrote: The one thing about it that bugs me is that it means that foreach acts differently with chars and wchars then it does with everything else, but really, that's a _lot_ less of an issue than the problems that you get with generic programming

Re: Immutability and strings

2010-08-18 Thread Kagamin
Andrej Mitrovic Wrote: I agree that in this case s1 and s2 will remain the same. But this has to do *not just* with immutability, but with the fact that s1 is passed by value. I think that should be mentioned here. In the first example a string reference is passed by value. In the second

Re: array operations enhancements

2010-08-18 Thread Don
F. Almeida wrote: It is an excellent feature of D2 that one can do double a[]; double b[]; double c[]; //... c = a[] + 2.0*b[]; But this is still limited, as we cannot include function calls in these operations. What if the compiler was able to introduce them in the assignment loop,

Re: Reading stdin in Windows 7

2010-08-18 Thread Jesse Phillips
Stanislav Blinov Wrote: Hello, I'm receiving strange results with reading stdin on Windows 7. Consider this code: module test; import std.stdio; void main(string[] args) { foreach (int i, string line; lines(stdin)) { write(line); }

Re: How to avoid the console from apearing.

2010-08-18 Thread Nick Sabalausky
Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.vhl46mdneav...@localhost.localdomain... Changes are afoot to std.process, we recently got a blocker fixed (not yet in svn, but someone submitted a correct patch) Issue #?

Best choice for messages (std.concurrency)

2010-08-18 Thread nsf
Hi. I'm trying to replicate in D my Go demo app which basically draws mandelbrot fractal using multiple goroutines. In Go it's fairly easy to communicate between threads, because the memory model is C like. D 2.0 on the other hand has this thing TLS by default. And I saw simple examples of

Re: Best choice for messages (std.concurrency)

2010-08-18 Thread Jonathan M Davis
On Wednesday, August 18, 2010 13:48:08 nsf wrote: Hi. I'm trying to replicate in D my Go demo app which basically draws mandelbrot fractal using multiple goroutines. In Go it's fairly easy to communicate between threads, because the memory model is C like. D 2.0 on the other hand has this

Re: Best choice for messages (std.concurrency)

2010-08-18 Thread Russel Winder
On Wed, 2010-08-18 at 20:48 +, nsf wrote: Hi. I'm trying to replicate in D my Go demo app which basically draws mandelbrot fractal using multiple goroutines. In Go it's fairly easy to communicate between threads, because the memory model is C like. D 2.0 on the other hand has this thing

[Issue 4653] More unit test functions should be added - like assertEqual() and assertNotEqual()

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4653 --- Comment #5 from Jonathan M Davis jmdavisp...@gmail.com 2010-08-17 23:08:49 PDT --- Created an attachment (id=723) Some useful unit testing functions. Okay. I'm attaching some functions that I've already done which seem quite useful -

[Issue 4672] New: rdmd fails when -I is needed

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4672 Summary: rdmd fails when -I is needed Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component:

[Issue 4672] [patch] rdmd fails when -I is needed

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4672 --- Comment #1 from Nick Sabalausky cbkbbej...@mailinator.com 2010-08-18 01:57:19 PDT --- Created an attachment (id=724) Modified rdmd -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving

[Issue 4673] New: Bug in std.string (isNumeric)

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4673 Summary: Bug in std.string (isNumeric) Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component:

[Issue 4661] Array Literal Incompatible Type Error Msg Should Include Line Number

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4661 --- Comment #7 from bearophile_h...@eml.cc 2010-08-18 03:23:38 PDT --- Given the way templates work in D, the original code can't work, but I'd like to receive the error line number here. This problem is a good example to show the difference

[Issue 4673] Bug in std.string (isNumeric)

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4673 bearophile_h...@eml.cc changed: What|Removed |Added CC||bearophile_h...@eml.cc ---

[Issue 4673] Bug in std.string (isNumeric)

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4673 --- Comment #2 from Petit Vincent petitv.i...@gmail.com 2010-08-18 12:51:37 CEST --- (In reply to comment #1) This reduced case shows that parse() doesn't accept F or L, so I don't see the problem yet: import std.conv; void main() {

[Issue 4673] Bug in std.string (isNumeric)

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4673 --- Comment #3 from bearophile_h...@eml.cc 2010-08-18 04:07:13 PDT --- You are right, my reduced version was useless, this shows the problem: import std.string: isNumeric; void main() { assert(isNumeric(F)); assert(isNumeric(L));

[Issue 4674] New: Change std.typecons.alignForSize's signature to (string[] names...)

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4674 Summary: Change std.typecons.alignForSize's signature to (string[] names...) Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity:

[Issue 3220] Compile time union crash when passed to template

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3220 Don clugd...@yahoo.com.au changed: What|Removed |Added Keywords||ice-on-invalid-code

[Issue 4652] Compiler hangs on template with zero-length tuple and another argument

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4652 Don clugd...@yahoo.com.au changed: What|Removed |Added Keywords||patch --- Comment #4 from

[Issue 4532] Position specifiers don't work in format

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4532 --- Comment #2 from Stewart Gordon s...@iname.com 2010-08-18 08:47:04 PDT --- I've just looked at the code and seem to have figured out what's going on. Traditionally, std.format.doFormat is the function that underlies all the writef*

[Issue 4667] Goto skipping variable initializations

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4667 Stewart Gordon s...@iname.com changed: What|Removed |Added CC||s...@iname.com ---

[Issue 4673] Bug in std.string (isNumeric)

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4673 kenn...@gmail.com changed: What|Removed |Added CC||kenn...@gmail.com --- Comment #4

[Issue 4675] New: Eponymous Template should hide internal names

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4675 Summary: Eponymous Template should hide internal names Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2

[Issue 4346] More flexible std.array.array

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4346 David Simcha dsim...@yahoo.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 4126] std.range.ElementType doesn't work with opApply

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4126 David Simcha dsim...@yahoo.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 4676] New: Overload resolution rejects valid code when mixing variadics, non-variadics

2010-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4676 Summary: Overload resolution rejects valid code when mixing variadics, non-variadics Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW

[Issue 4676] Overload resolution rejects valid code when mixing variadics, non-variadics

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