Re: Well, it's been a total failure

2010-09-15 Thread KennyTM~
On Sep 16, 10 04:35, "Jérôme M. Berger" wrote: Nick Sabalausky wrote: "Jonathan M Davis" wrote in message news:mailman.225.1284568096.858.digitalmar...@puremagic.com... If you're on a non-Windows system, the mime-type becomes far more important than the extension. Most programs in Linux (and I

Re: One more update on d-programming-language.org

2010-09-15 Thread Robert Jacques
On Thu, 09 Sep 2010 20:07:20 -0400, Andrei Alexandrescu wrote: http://d-programming-language.org From David Gileadi: the annoying Google Translate bar behavior on browsers with other languages has been fixed, the behavior when shrinking and growing the window size has been improved, the R

Re: Well, it's been a total failure

2010-09-15 Thread Nick Sabalausky
"Jonathan M Davis" wrote in message news:mailman.227.1284590189.858.digitalmar...@puremagic.com... > On Wednesday, September 15, 2010 12:48:32 Nick Sabalausky wrote: >> "Jonathan M Davis" wrote in message >> news:mailman.225.1284568096.858.digitalmar...@puremagic.com... >> >> > If you're on a no

Re: Well, it's been a total failure

2010-09-15 Thread Andrei Alexandrescu
On 9/15/10 22:58 CDT, Ellery Newcomer wrote: On 09/12/2010 12:12 PM, Andrei Alexandrescu wrote: Apologies for the poor experience. It's because you don't have the 32-bit portability libraries on your 64-bit system. A 64-bit edition is in the works and would certainly make everything smoother.

Re: Well, it's been a total failure

2010-09-15 Thread Ellery Newcomer
On 09/12/2010 12:12 PM, Andrei Alexandrescu wrote: Apologies for the poor experience. It's because you don't have the 32-bit portability libraries on your 64-bit system. A 64-bit edition is in the works and would certainly make everything smoother. In the meantime you'd need to run: sudo apt-g

Right blame

2010-09-15 Thread bearophile
Is it possible to modify D error messages so when the precondition of a function fails, dmd shows a (more useful) error at the calling point instead of giving an assert error at the assert line number inside the precondition? Maybe this is possible once dmd is able to generate the stack trace on

Re: A summary of D's design principles

2010-09-15 Thread Walter Bright
Denis Koroskin wrote: On Wed, 15 Sep 2010 23:36:48 +0400, Walter Bright wrote: Simen kjaeraas wrote: bearophile wrote: One of yours fixed: - If it works in C, it works (almost) the same or not at all in D. Mind giving examples to this one? I thought this was a big no-no. I'm curious w

Re: Well, it's been a total failure

2010-09-15 Thread Jonathan M Davis
On Wednesday, September 15, 2010 12:48:32 Nick Sabalausky wrote: > "Jonathan M Davis" wrote in message > news:mailman.225.1284568096.858.digitalmar...@puremagic.com... > > > If you're on a non-Windows system, the mime-type becomes far more > > important than > > the extension. Most programs in Li

Re: A summary of D's design principles

2010-09-15 Thread Jonathan M Davis
On Wednesday, September 15, 2010 10:58:49 Andrei Alexandrescu wrote: > A coworker asked me where he could find a brief document of D's design > principles. This was after I'd mentioned the "no function hijacking" > stance. > > I think it would be a great idea if the up-and-coming > www.d-programmi

Re: A summary of D's design principles

2010-09-15 Thread Jeff Nowakowski
On 09/15/2010 01:58 PM, Andrei Alexandrescu wrote: I know we discussed this once in the past, but couldn't find the discussion. Yeah, like 3 months ago: http://www.digitalmars.com/d/archives/digitalmars/D/The_design_principles_of_D_aka_The_D_Manifesto_111570.html

2.049b

2010-09-15 Thread bearophile
Few notes about DMD v.2.049beta. The Changelog of 2.049beta says: Bugzilla 4603: array(iota(1, 0)) error. But it's not closed, here time ago I have explained why: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=115725 This is the recent "Phobos has way too m

Re: A summary of D's design principles

2010-09-15 Thread bearophile
Lars T. Kyllingstad: > This can be amended by requiring that fixed-size array parameters to > extern(C) functions be marked as 'ref'. > > See also: > http://d.puremagic.com/issues/show_bug.cgi?id=3604 Sometimes I translate some C code to D, in this case I have to watch for all the arrays, and u

Re: A summary of D's design principles

2010-09-15 Thread bearophile
Simen kjaeraas: > The former could be seen as bad style, I think this is the relevant passage from the C Standard: Objects with static storage duration (3.7.1) shall be zero-initialized (8.5) before any other initialization takes place. Zero-initialization and initialization with a constan

Re: A summary of D's design principles

2010-09-15 Thread Lars T. Kyllingstad
On Wed, 15 Sep 2010 22:19:26 +0200, Simen kjaeraas wrote: > bearophile wrote: > >> Simen kjaeraas: >> >>> Mind giving examples to this one? I thought this was a big no-no. >> >> There are few silent differences, among them there are: - usage of >> global floating point variables/arrays that in s

Re: A summary of D's design principles

2010-09-15 Thread Jesse Phillips
Nick Sabalausky Wrote: > - Make the "right" thing easy and the "wrong" thing hard. I believe that is "The easy way is the safe and correct way."

Re: Well, it's been a total failure

2010-09-15 Thread retard
Wed, 15 Sep 2010 22:35:27 +0200, Jérôme M. Berger wrote: > Nick Sabalausky wrote: >> "Jonathan M Davis" wrote in message >> news:mailman.225.1284568096.858.digitalmar...@puremagic.com... >>> If you're on a non-Windows system, the mime-type becomes far more >>> important than >>> the extension. Mo

Re: Well, it's been a total failure

2010-09-15 Thread retard
Wed, 15 Sep 2010 15:48:32 -0400, Nick Sabalausky wrote: > "Jonathan M Davis" wrote in message > news:mailman.225.1284568096.858.digitalmar...@puremagic.com... >> >> If you're on a non-Windows system, the mime-type becomes far more >> important than >> the extension. Most programs in Linux (and I

Re: More embarrassing microbenchmars for D's GC.

2010-09-15 Thread Steven Schveighoffer
On Wed, 15 Sep 2010 15:53:38 -0400, Rounin wrote: I found this posting after investigating a huge slowdown in a D program I'd made using gprof, which showed the culprit to be a function called _D3gcx3Gcx4markMFPvPvZv, in which the program spent 87% of its time. That turned out to be the

Re: A summary of D's design principles

2010-09-15 Thread Denis Koroskin
On Wed, 15 Sep 2010 23:36:48 +0400, Walter Bright wrote: Simen kjaeraas wrote: bearophile wrote: One of yours fixed: - If it works in C, it works (almost) the same or not at all in D. Mind giving examples to this one? I thought this was a big no-no. I'm curious what bearophile is refe

Re: Well, it's been a total failure

2010-09-15 Thread Jérôme M. Berger
Nick Sabalausky wrote: > "Jonathan M Davis" wrote in message > news:mailman.225.1284568096.858.digitalmar...@puremagic.com... >> If you're on a non-Windows system, the mime-type becomes far more >> important than >> the extension. Most programs in Linux (and I believe MacOS X as well) >> don't

eval() (Was: One more update on d-programming-language.org)

2010-09-15 Thread Nick Sabalausky
"Philippe Sigaud" wrote in message news:mailman.214.1284496545.858.digitalmar...@puremagic.com... > On Tue, Sep 14, 2010 at 17:01, Andrei Alexandrescu < > seewebsiteforem...@erdani.org> wrote: >> >> I think we'll move forward with that one. I'll start working on the > content. Ideas for good tut

Re: A summary of D's design principles

2010-09-15 Thread Simen kjaeraas
bearophile wrote: Simen kjaeraas: Mind giving examples to this one? I thought this was a big no-no. There are few silent differences, among them there are: - usage of global floating point variables/arrays that in some C programs are used without initialization, assuming they are set to z

Re: More embarrassing microbenchmars for D's GC.

2010-09-15 Thread Rounin
I found this posting after investigating a huge slowdown in a D program I'd made using gprof, which showed the culprit to be a function called _D3gcx3Gcx4markMFPvPvZv, in which the program spent 87% of its time. That turned out to be the garbage collector. The program takes 1.74 seconds to run wit

Re: Well, it's been a total failure

2010-09-15 Thread Nick Sabalausky
"Jonathan M Davis" wrote in message news:mailman.225.1284568096.858.digitalmar...@puremagic.com... > > If you're on a non-Windows system, the mime-type becomes far more > important than > the extension. Most programs in Linux (and I believe MacOS X as well) > don't care > about the extension. T

Re: A summary of D's design principles

2010-09-15 Thread Nick Sabalausky
"Andrei Alexandrescu" wrote in message news:i6r1hn$2uu...@digitalmars.com... >A coworker asked me where he could find a brief document of D's design >principles. This was after I'd mentioned the "no function hijacking" >stance. > > I think it would be a great idea if the up-and-coming > www.d-

Re: A summary of D's design principles

2010-09-15 Thread Walter Bright
Simen kjaeraas wrote: bearophile wrote: One of yours fixed: - If it works in C, it works (almost) the same or not at all in D. Mind giving examples to this one? I thought this was a big no-no. I'm curious what bearophile is referring to, too. We've worked hard to ensure that C code either

Re: DMD source overview?

2010-09-15 Thread Nick Sabalausky
"Justin Johansson" wrote in message news:i6qaud$1n6...@digitalmars.com... > On 15/09/2010 12:31 PM, Nick Sabalausky wrote: >>> Anyway, this is probably all a moot point as much as DMD (v1 and v2) >>> has evolved since either of these projects have been synced up with >>> Walter's official DMD. >>

Re: A summary of D's design principles

2010-09-15 Thread bearophile
One more: If it runs, it may probably run at compile-time too. Bye, bearophile

Re: A summary of D's design principles

2010-09-15 Thread bearophile
Simen kjaeraas: > Mind giving examples to this one? I thought this was a big no-no. There are few silent differences, among them there are: - usage of global floating point variables/arrays that in some C programs are used without initialization, assuming they are set to zero. - fixed-sized arra

Re: A summary of D's design principles

2010-09-15 Thread Don
Andrei Alexandrescu wrote: A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance. I think it would be a great idea if the up-and-coming www.d-programming-language.org contained such a document. Idea

Re: A summary of D's design principles

2010-09-15 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > A coworker asked me where he could find a brief document of D's design > principles. This was after I'd mentioned the "no function hijacking" stance. > I think it would be a great idea if the up-and-coming > www.d-program

Re: A summary of D's design principles

2010-09-15 Thread Simen kjaeraas
bearophile wrote: One of yours fixed: - If it works in C, it works (almost) the same or not at all in D. Mind giving examples to this one? I thought this was a big no-no. -- Simen

Re: A summary of D's design principles

2010-09-15 Thread bearophile
Simen kjaeraas: > Easy things easy, difficult things possible. > > Safe before fast, but fast too. > > If it works in C, it works the same or not at all in D. > > Sugar is good for you, as is salt. In moderation. > > Too much power is not enough. (Where are my macros?!) > > Programmers are laz

Re: A summary of D's design principles

2010-09-15 Thread Simen kjaeraas
Andrei Alexandrescu wrote: A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance. I think it would be a great idea if the up-and-coming www.d-programming-language.org contained such a document.

A summary of D's design principles

2010-09-15 Thread Andrei Alexandrescu
A coworker asked me where he could find a brief document of D's design principles. This was after I'd mentioned the "no function hijacking" stance. I think it would be a great idea if the up-and-coming www.d-programming-language.org contained such a document. Ideas for what it could contain?

Re: Well, it's been a total failure

2010-09-15 Thread Jonathan M Davis
On Wednesday, September 15, 2010 06:08:49 Justin Johansson wrote: > On 14/09/2010 11:07 AM, bearophile wrote: > > Andrei Alexandrescu: > >> I didn't know there is an executable attribute on Windows. > > > > If you rename a txt file as .exe, if you click on it Windows tries to run > > it. > > > >>

Re: One more update on d-programming-language.org

2010-09-15 Thread Philippe Sigaud
On Wed, Sep 15, 2010 at 17:50, Johannes Pfau wrote: > On 14.09.2010 22:35, Philippe Sigaud wrote: > > * a small script that find ddocs comments from D code and find any > > frig missing parenthesis, telling the user were in the file she > > should look (and range of line spanning the comment)

Re: One more update on d-programming-language.org

2010-09-15 Thread Johannes Pfau
On 14.09.2010 22:35, Philippe Sigaud wrote: > * a small script that find ddocs comments from D code and find any > frig missing parenthesis, telling the user were in the file she > should look (and range of line spanning the comment). Finding ddocs > comments and counting open/closed parenthesi

Re: Safe std.parallelism

2010-09-15 Thread Simen kjaeraas
dsimcha wrote: 2. Just overload task(), map() and reduce() so that the overload marked @trusted can be used in SafeD and is as safe as std.concurrency, and the unsafe version can be called from @system code. This seems to me the best solution. 1. Create safeTask(), safeMap(), safeReduce

Safe std.parallelism

2010-09-15 Thread dsimcha
As I've mentioned before, my std.parallelism module (formerly parallelfuture; http://cis.jhu.edu/~dsimcha/d/phobos/std_parallelism.html, http://dsource.org/projects/scrapple/browser/trunk/parallelFuture/std_parallelism.d) is currently in review for inclusion in Phobos. Originally I thought that, f

Re: Some missing things in the current threading implementation

2010-09-15 Thread dsimcha
== Quote from Sönke_Ludwig (lud...@informatik.uni-luebeck.de)'s > If the language allows for creating an array, splitting it and > processing the chunks in separate threads - and that without any cast in > the user part of the code + the user code is safely checked - I think > everything would be f

Re: Well, it's been a total failure

2010-09-15 Thread Steven Schveighoffer
On Tue, 14 Sep 2010 17:57:17 -0400, Walter Bright wrote: Steven Schveighoffer wrote: I'm not sure what this does, I really *really* hope it doesn't set the attrs of all files to a+x. You can download the new beta and see how it worked! I did, seems to work good, thanks! -Steve

Re: Well, it's been a total failure

2010-09-15 Thread Justin Johansson
On 15/09/2010 10:38 PM, Justin Johansson wrote: There is not a lot of use in creating your own "readable" file suffices (alla file extensions). Unless your file extension is known on the platform you are using then there may be no hope of reasonable opening your file with the requisite applicatio

Re: Well, it's been a total failure

2010-09-15 Thread Justin Johansson
On 14/09/2010 11:07 AM, bearophile wrote: Andrei Alexandrescu: I didn't know there is an executable attribute on Windows. If you rename a txt file as .exe, if you click on it Windows tries to run it. This reminds me of the discussion of yesteryear - people were complaining about C++ files

Re: [challenge] To implement XPath 2.0 in D

2010-09-15 Thread Justin Johansson
On 14/09/2010 12:16 AM, Justin Johansson wrote: Is D2 suitable to implementing the W3C specifications for XPath 2.0, and particularly the XPath & XQuery Data Model (XDM), with both coding succinctness and runtime time and space efficiency? Now, by suitability, I don't mean if it can be done. Of

Re: One more update on d-programming-language.org

2010-09-15 Thread bearophile
Mafi: > Maybe it's a silly question but what's wrong with > s[($+i)%$] //Wow, looks like Perl Python built-in collections indexes aren't modular, they are allowed only in the range [-length, length[ Bye, bearophile

Re: One more update on d-programming-language.org

2010-09-15 Thread bearophile
Seth Hoenig: > [1] http://live.gnome.org/Vala/ValaForJavaProgrammers It seems Vala is shaping up into a comprehensive D-like language. Few of the interesting features: --- Vala supports string templates: @"...". String templates may contain expressions, prefixed by a $ sign. strin

Re: DMD source overview?

2010-09-15 Thread Justin Johansson
On 15/09/2010 12:31 PM, Nick Sabalausky wrote: Anyway, this is probably all a moot point as much as DMD (v1 and v2) has evolved since either of these projects have been synced up with Walter's official DMD. Good luck with your project. It sounds interesting. Thanks. I hope I can pull it off q

Re: One more update on d-programming-language.org

2010-09-15 Thread Mafi
Am 15.09.2010 12:33, schrieb bearophile: Seth Hoenig: [1] http://live.gnome.org/Vala/ValaForJavaProgrammers http://live.gnome.org/Vala/ValaForCSharpProgrammers I will read those pages. On the D site there are pages about D1 for C/C++ programmers. I will eventually write a page about D2 for Py

Re: One more update on d-programming-language.org

2010-09-15 Thread Justin Johansson
On 15/09/2010 6:05 AM, Philippe Sigaud wrote: An interesting example is having a script that loads a D file, modifies its source, asks for DMD to compile it and then runs it and get its result. It could be the first brick to get a REPL / idmd (interactive dmd). Maybe more a [challenge] subject th

Re: One more update on d-programming-language.org

2010-09-15 Thread bearophile
Seth Hoenig: > Another idea: The vala team made nice, very comprehensive side-by-side > comparisons[1] between vala-java, and vala-c#, which makes the transition > into vala very smooth and easy, There is also the rosettacode, where every day we add D implementations of the tasks, D is among the

Re: One more update on d-programming-language.org

2010-09-15 Thread bearophile
Seth Hoenig: > [1] http://live.gnome.org/Vala/ValaForJavaProgrammers > http://live.gnome.org/Vala/ValaForCSharpProgrammers I will read those pages. On the D site there are pages about D1 for C/C++ programmers. I will eventually write a page about D2 for Python programmers. In the meantime: http:/

Re: R-values and const ref

2010-09-15 Thread Max Samukha
On 09/09/2010 06:26 PM, Steven Schveighoffer wrote: Yes, I forgot that you are allowed to overload via ref. That would make sense for virtual functions. That forces us to provide multiple overloads, each matching one of the possible combinations of rvalue/lvalue arguments. A function with n

Re: Well, it's been a total failure

2010-09-15 Thread Stephan
On 15.09.2010 00:10, chmod+x wrote: Walter Bright Wrote: Steven Schveighoffer wrote: I'm not sure what this does, I really *really* hope it doesn't set the attrs of all files to a+x. You can download the new beta and see how it worked! Now it works. However, you're wasting bandwidth becaus