Re: D.dev development status update

2010-08-01 Thread F. Almeida
== Quote from bioinfornatics (bioinfornat...@gmail.com)'s article where is software source? is available for linux? if is a frre software and avaible on linux, i would like package your project for fedora thanks best regards So far, all I can guarantee is that it is freeware, I haven't

Stackoverflow has added per tag wiki pages.

2010-08-01 Thread BCS
I've seeded the D tag's page from the D front page. If anyone wants to improve it but doesn't have access, send me the text. http://stackoverflow.com/questions/tagged?sort=infotagnames=d -- ... IXOYE

In the Bay Area on August 11?

2010-08-01 Thread Andrei Alexandrescu
I've been kindly invited by the ACCU Silicon Valley Chapter to give a talk on D at their next meeting. The talk starts at 7:00pm on Wednesday, August 11 and takes place in Mountain View. Attendance is free and opened to everyone. For details:

Re: A problem with D contracts

2010-08-01 Thread Walter Bright
bearophile wrote: But simple asserts sometimes are not enough to test more complex things. So other more serious contract systems allow for asserts that contain forall, max, min, sets, and few more simple things, this is an example from a system for Java: /*@ assert (\forall int i; 0 = i i n;

Re: Why don't other programming languages have ranges?

2010-08-01 Thread Walter Bright
BCS wrote: I once had a fire hydrant installed on my property. The city required an engineering analysis, which ran to quite a stack of paper. After approval, the workers came by to install it. They never looked at the analysis, or even the drawings, they just dug up the water main and stuck a

gdb bugs/patches

2010-08-01 Thread Brad Roberts
Who was it that has the appropriate paperwork on file to get patches into gdb? I've got a small diff that fixes a critical problem with it's demangler: diff --git a/gdb/d-lang.c b/gdb/d-lang.c index 6db521b..f17431b 100644 --- a/gdb/d-lang.c +++ b/gdb/d-lang.c @@ -37,8 +37,9 @@

What functions could be added to std.algorithm?

2010-08-01 Thread Philippe Sigaud
A few hours ago, in a thread on D contracts, KennyTM~ said: BTW, there should be an 'all = reduce!ab' and 'any = reduce!a||b' in std.algorithm, but short-circuited. I agree. all() and any/some() are both easy to code, I think, and useful in many situations. In D, they could work on any input

Re: Why don't other programming languages have ranges?

2010-08-01 Thread retard
Sat, 31 Jul 2010 23:38:17 +, BCS wrote: Hello retard, Has anyone except the almighty Andrei ever even downloaded a theorem prover? Yes, ACL2. http://www.dsource.org/projects/scrapple/browser/trunk/backmath Now I know why that sort of thing isn't done more often. Learning how to

Re: gdb bugs/patches

2010-08-01 Thread Robert Clipsham
On 01/08/10 10:01, Brad Roberts wrote: Who was it that has the appropriate paperwork on file to get patches into gdb? I've got a small diff that fixes a critical problem with it's demangler: diff --git a/gdb/d-lang.c b/gdb/d-lang.c index 6db521b..f17431b 100644 --- a/gdb/d-lang.c +++

Re: A problem with D contracts

2010-08-01 Thread bearophile
Walter Bright: It is not easier to statically analyze a forall rather than a foreach. The problem is that you can put any kind of code inside D contracts, this will make them them very to analyse automatically. The restricted semantics is a way to avoid this. I also see no evidence that

Re: A problem with D contracts

2010-08-01 Thread bearophile
Jonathan M Davis: IIRC TDPL, specifically mentions that contracts allow for I/O for debugging purposes. I have not yet read that part. I see print statements (and exceptions) inside contracts as something to kill with fire in my code. What's the purpose of printing stuff in contracts? Maybe

Documentation generation

2010-08-01 Thread bearophile
The purpose of a static language compiler is to help the programmer spot the bugs in the code very well and to compile it. It's not the job of a compiler to create nice HTML/XML documentation files. So I suggest to: 1) DMD can copy all documentation strings inside the JSON file generated with

Re: A problem with D contracts

2010-08-01 Thread godworshipper
bearophile Wrote: because the built-in ones are not designed in a serious way, all three of them are just toys :-) That's blasphemy! I thought you believed in D :-(

Re: Why don't other programming languages have ranges?

2010-08-01 Thread BCS
Hello retard, Sat, 31 Jul 2010 23:38:17 +, BCS wrote: Hello retard, Has anyone except the almighty Andrei ever even downloaded a theorem prover? Yes, ACL2. http://www.dsource.org/projects/scrapple/browser/trunk/backmath Now I know why that sort of thing isn't done more often.

Re: A problem with D contracts

2010-08-01 Thread bearophile
godworshipper: That's blasphemy! I thought you believed in D :-( I think I lost my temper a bit while answering Jonathan, I am sorry Jonathan. Bye, bearophile

Re: What functions could be added to std.algorithm?

2010-08-01 Thread Philippe Sigaud
On Sun, Aug 1, 2010 at 16:02, dsimcha dsim...@yahoo.com wrote: [flat / nested] Please, no. This is why I hate Tango and Java. It's too hard to find what you need, and you have to write too much import declaration boilerplate. I agree that Java pushed that too far for my taste also.

Re: A problem with D contracts

2010-08-01 Thread Norbert Nemec
I agree that contracts offer too much liberty. However, I would actually go one step further than bearophile: I find the need for assert statements not only superfluous but actually misleading. A contract violation is something conceptionally different from a broken assertion. Assertions and

Re: What functions could be added to std.algorithm?

2010-08-01 Thread Tomek Sowiński
Dnia 01-08-2010 o 16:32:50 Philippe Sigaud philippe.sig...@gmail.com napisał(a): I have to use Adam Ruppe's find D keyword website (very handy) regularly... Link, please. ;)

Re: What functions could be added to std.algorithm?

2010-08-01 Thread Adam Ruppe
On 8/1/10, Tomek Sowiński j...@ask.me wrote: Link, please. ;) http://dpldocs.info If any tried to use it last week, you would have noticed it was down: my motherboard died, and the parts to fix it didn't arrive until Friday. It should be up most the time now. You can put in a search term to

Re: std.concurrency and efficient returns

2010-08-01 Thread Robert Jacques
On Sun, 01 Aug 2010 06:24:18 -0400, Jonathan M Davis jmdavisp...@gmail.com wrote: Okay. From what I can tell, it seems to be a recurring pattern with threads that it's useful to spawn a thread, have it do some work, and then have it return the result and terminate. The appropriate way to do

Re: Why don't other programming languages have ranges?

2010-08-01 Thread Jeff Nowakowski
On 08/01/2010 02:35 AM, Walter Bright wrote: BCS wrote: I once had a fire hydrant installed on my property. The city required an engineering analysis, which ran to quite a stack of paper. After approval, the workers came by to install it. They never looked at the analysis, or even the drawings,

Shared

2010-08-01 Thread dsimcha
I've reread the relevant TDPL chapter and I still don't quite understand the following: 1. What is shared? Is it simply a piece of syntactic salt to make it hard to share data across threads by accident, or is there more to it? 2. Is it fully or mostly implemented?

Re: Shared

2010-08-01 Thread dsimcha
== Quote from dsimcha (dsim...@yahoo.com)'s article I've reread the relevant TDPL chapter and I still don't quite understand the following: 1. What is shared? Is it simply a piece of syntactic salt to make it hard to share data across threads by accident, or is there more to it? 2. Is it

Re: std.concurrency and efficient returns

2010-08-01 Thread dsimcha
== Quote from Jonathan M Davis (jmdavisp...@gmail.com)'s article Okay. From what I can tell, it seems to be a recurring pattern with threads that it's useful to spawn a thread, have it do some work, and then have it return the result and terminate. The appropriate way to do that seems to

Re: std.concurrency and efficient returns

2010-08-01 Thread awishformore
On 01/08/2010 21:25, awishformore wrote: On 01/08/2010 19:17, dsimcha wrote: == Quote from Jonathan M Davis (jmdavisp...@gmail.com)'s article Okay. From what I can tell, it seems to be a recurring pattern with threads that it's useful to spawn a thread, have it do some work, and then have it

Re: std.concurrency and efficient returns

2010-08-01 Thread awishformore
On 01/08/2010 19:17, dsimcha wrote: == Quote from Jonathan M Davis (jmdavisp...@gmail.com)'s article Okay. From what I can tell, it seems to be a recurring pattern with threads that it's useful to spawn a thread, have it do some work, and then have it return the result and terminate. The

Re: A problem with D contracts

2010-08-01 Thread Walter Bright
bearophile wrote: Walter Bright: It is not easier to statically analyze a forall rather than a foreach. The problem is that you can put any kind of code inside D contracts, this will make them them very to analyse automatically. The restricted semantics is a way to avoid this. All it means

Re: What functions could be added to std.algorithm?

2010-08-01 Thread Pelle
On 08/01/2010 05:25 PM, Adam Ruppe wrote: On 8/1/10, Tomek Sowińskij...@ask.me wrote: Link, please. ;) http://dpldocs.info If any tried to use it last week, you would have noticed it was down: my motherboard died, and the parts to fix it didn't arrive until Friday. It should be up most the

Re: A problem with D contracts

2010-08-01 Thread Walter Bright
Norbert Nemec wrote: I agree that contracts offer too much liberty. However, I would actually go one step further than bearophile: I find the need for assert statements not only superfluous but actually misleading. A contract violation is something conceptionally different from a broken

Re: A problem with D contracts

2010-08-01 Thread Walter Bright
bearophile wrote: Walter Bright: /*@ assert (\forall int i; 0 = i i n; a[i] != null); This does not make it simpler, it just makes things more complicated by now having two ways to do a foreach. The point here is to restrict a lot the kind of code and instructions you can put inside

Re: std.concurrency and efficient returns

2010-08-01 Thread Pelle
On 08/01/2010 09:28 PM, awishformore wrote: On 01/08/2010 21:25, awishformore wrote: On 01/08/2010 19:17, dsimcha wrote: == Quote from Jonathan M Davis (jmdavisp...@gmail.com)'s article Okay. From what I can tell, it seems to be a recurring pattern with threads that it's useful to spawn a

Re: A problem with D contracts

2010-08-01 Thread Walter Bright
bearophile wrote: Jonathan M Davis: IIRC TDPL, specifically mentions that contracts allow for I/O for debugging purposes. I have not yet read that part. I see print statements (and exceptions) inside contracts as something to kill with fire in my code. What's the purpose of printing stuff in

Re: std.concurrency and efficient returns

2010-08-01 Thread Robert Jacques
On Sun, 01 Aug 2010 16:02:43 -0400, Pelle pelle.mans...@gmail.com wrote: On 08/01/2010 09:28 PM, awishformore wrote: import core.thread; You don't have to use the message passing interface if you don't want to. Or use shared classes; you can pass those around too.

Re: Documentation generation

2010-08-01 Thread bearophile
Walter Bright: There are very good reasons why ddoc is part of dmd. Thank you for your many answers. I think you can even add them to the D2 FAQ :-) Bye, bearophile

Re: Documentation generation

2010-08-01 Thread Brad Roberts
On 8/1/2010 1:53 PM, bearophile wrote: I think you can... Bye, bearophile I've been avoiding saying this for a while, but I suspect a lot of people have thought it at one time or another. You probably ought to find a word other than 'can' to use. Of course he's capable of... whatever.

Re: gdb bugs/patches

2010-08-01 Thread Brad Roberts
On 8/1/2010 3:49 AM, Robert Clipsham wrote: On 01/08/10 10:01, Brad Roberts wrote: Who was it that has the appropriate paperwork on file to get patches into gdb? snip Thanks, Brad If I recall correctly all you need to do is send a message to the gdb patches mailing list[1] - you

Re: Axiomatic purity of D

2010-08-01 Thread Andrei Alexandrescu
On 07/30/2010 08:02 AM, Justin Johansson wrote: To what degree do the author and advocates of the D(2) Programming Language believe that it is axiomatically pure and to what degree to the naysayers believe that it is conversely impure. Further, does axiomatic purity in a PL really matter?

Re: TDPL: Overloading template functions

2010-08-01 Thread Philippe Sigaud
On Sat, Jul 31, 2010 at 17:24, Andrej Mitrovic andrej.mitrov...@gmail.comwrote: I think there really is some bug here. I tried to use your template helper function, and it seems the order in which I put two constraints in a template signature changes the way dmd compiles the code. Consider

Re: A problem with D contracts

2010-08-01 Thread Andrei Alexandrescu
On 08/01/2010 07:04 AM, bearophile wrote: Walter Bright: /*@ assert (\forall int i; 0= i i n; a[i] != null); This does not make it simpler, it just makes things more complicated by now having two ways to do a foreach. The point here is to restrict a lot the kind of code and instructions

Re: Why don't other programming languages have ranges?

2010-08-01 Thread Andrei Alexandrescu
On 08/01/2010 05:44 AM, retard wrote: Sat, 31 Jul 2010 23:38:17 +, BCS wrote: Hello retard, Has anyone except the almighty Andrei ever even downloaded a theorem prover? Yes, ACL2. http://www.dsource.org/projects/scrapple/browser/trunk/backmath Now I know why that sort of thing isn't

Re: Documentation generation

2010-08-01 Thread Lurker
Walter Bright Wrote: bearophile wrote: Removing that HTML ddoc parsing HTML generation from DMD allows such code to evolve faster and to be debugged more efficiently. Today some people are using There are very good reasons why ddoc is part of dmd. 1. Being a defined part of D means

Re: TDPL: Overloading template functions

2010-08-01 Thread Philippe Sigaud
On Sat, Jul 31, 2010 at 00:58, Andrej Mitrovic andrej.mitrov...@gmail.comwrote: could you please try this out with your new object.di if you have any time?). I hope Andrei won't mind for pasting this here: (snip) unittest { double[] d1 = [6.0, 1.5, 2.4, 3]; float[] d2 = [1.5,

Re: What functions could be added to std.algorithm?

2010-08-01 Thread Andrei Alexandrescu
On 08/01/2010 09:32 AM, Philippe Sigaud wrote: On Sun, Aug 1, 2010 at 16:02, dsimcha dsim...@yahoo.com mailto:dsim...@yahoo.com wrote: [flat / nested] Please, no. This is why I hate Tango and Java. It's too hard to find what you need, and you have to write too much import

Re: TDPL: Overloading template functions

2010-08-01 Thread Andrej Mitrovic
On Sun, Aug 1, 2010 at 11:15 PM, Philippe Sigaud philippe.sig...@gmail.comwrote: On Sat, Jul 31, 2010 at 17:24, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: I think there really is some bug here. I tried to use your template helper function, and it seems the order in which I put two

Re: Axiomatic purity of D

2010-08-01 Thread Jonathan M Davis
On Sunday 01 August 2010 14:13:40 Andrei Alexandrescu wrote: Most languages have not been proven sound. I know ML has been, and there is a reduced version of Java (Featherweight Java) that has been proven sound. I know that Java with generics has been shown unsound a long time ago

Re: Why don't other programming languages have ranges?

2010-08-01 Thread Justin Johansson
Andrei Alexandrescu wrote: On 08/01/2010 05:44 AM, retard wrote: Sat, 31 Jul 2010 23:38:17 +, BCS wrote: Hello retard, Has anyone except the almighty Andrei ever even downloaded a theorem prover? Yes, ACL2. http://www.dsource.org/projects/scrapple/browser/trunk/backmath Now I know

Re: What functions could be added to std.algorithm?

2010-08-01 Thread Jonathan M Davis
On Sunday 01 August 2010 07:32:50 Philippe Sigaud wrote: But, what about putting all() and some() in std.algorithm? An enhancement request already exists for these: http://d.puremagic.com/issues/show_bug.cgi?id=4405 - Jonathan M Davis

Re: Axiomatic purity of D

2010-08-01 Thread Justin Johansson
Andrei Alexandrescu wrote: lurker wrote: Justin Johansson Wrote: To what degree do the author and advocates of the D(2) Programming Language believe that it is axiomatically pure and to what degree to the naysayers believe that it is conversely impure. Further, does axiomatic purity in a PL

Re: Axiomatic purity of D

2010-08-01 Thread retard
Sun, 01 Aug 2010 16:02:56 -0700, Jonathan M Davis wrote: On Sunday 01 August 2010 14:13:40 Andrei Alexandrescu wrote: Most languages have not been proven sound. I know ML has been, and there is a reduced version of Java (Featherweight Java) that has been proven sound. I know that Java with

Re: Axiomatic purity of D

2010-08-01 Thread retard
Sun, 01 Aug 2010 23:33:38 +, retard wrote: Sun, 01 Aug 2010 16:02:56 -0700, Jonathan M Davis wrote: On Sunday 01 August 2010 14:13:40 Andrei Alexandrescu wrote: Most languages have not been proven sound. I know ML has been, and there is a reduced version of Java (Featherweight Java)

Re: Axiomatic purity of D

2010-08-01 Thread BCS
Hello retard, the brick wall book by B.P. link? -- ... IXOYE

Re: Axiomatic purity of D

2010-08-01 Thread Justin Johansson
BCS wrote: Hello retard, the brick wall book by B.P. link? I think the OP means Types and programming languages By Benjamin C. Pierce Andrei posted the link earlier in this thread.

Re: Axiomatic purity of D

2010-08-01 Thread retard
Sun, 01 Aug 2010 23:42:55 +, BCS wrote: Hello retard, the brick wall book by B.P. link? The link was on another reply in this thread: http://books.google.com/books?id=ti6zoAC9Ph8Cpg=PA95lpg=PA95dq=safety+% 3D+progress+%2B

Re: std.concurrency and efficient returns

2010-08-01 Thread Jonathan M Davis
FWIW, I posted an enhancement request on the subject: http://d.puremagic.com/issues/show_bug.cgi?id=4566 - Jonthan M Davis

Re: Mac OSX installer for dmd

2010-08-01 Thread Ryan W Sims
On 8/1/10 5:07 PM, Andrei Alexandrescu wrote: Hello, I got an email from someone who got an interest in D following my talk at Google. He tried to install dmd on OSX, but got turned off (and rightly so) for the unnecessary difficulties of that process and the lack of documentation. Nicely of

Re: Axiomatic purity of D

2010-08-01 Thread BCS
Hello retard, Sun, 01 Aug 2010 23:42:55 +, BCS wrote: Hello retard, the brick wall book by B.P. link? The link was on another reply in this thread: Added to the reading list... -- ... IXOYE

Re: Mac OSX installer for dmd

2010-08-01 Thread Walter Bright
Ryan W Sims wrote: On 8/1/10 5:07 PM, Andrei Alexandrescu wrote: I got an email from someone who got an interest in D following my talk at Google. He tried to install dmd on OSX, but got turned off (and rightly so) for the unnecessary difficulties of that process and the lack of documentation.

Re: Mac OSX installer for dmd

2010-08-01 Thread Andrei Alexandrescu
On 08/01/2010 07:22 PM, Ryan W Sims wrote: On 8/1/10 5:07 PM, Andrei Alexandrescu wrote: Ideally we'd have a one-click OSX installer for dmd - a .dmg file. Is someone able and willing to own this project? I think improving the out-of-the-box experience is important and urgent. I don't know

Re: Mac OSX installer for dmd

2010-08-01 Thread bearophile
Andrei Alexandrescu: I explained how D works (which I think is a very solid design, probably the best I've seen), The D module system has some holes, most of them are already reported in Bugzilla (some of them are more than just implementation bugs). From your words I presume you have never

Re: Mac OSX installer for dmd

2010-08-01 Thread Andrei Alexandrescu
On 08/01/2010 08:16 PM, bearophile wrote: Andrei Alexandrescu: I explained how D works (which I think is a very solid design, probably the best I've seen), The D module system has some holes, most of them are already reported in Bugzilla (some of them are more than just implementation bugs).

Re: std.concurrency and efficient returns

2010-08-01 Thread Robert Jacques
On Sun, 01 Aug 2010 19:22:10 -0400, Jonathan M Davis jmdavisp...@gmail.com wrote: On Sunday 01 August 2010 08:55:54 Robert Jacques wrote: Hi Jonathan, It sounds like what you really want is a task-based parallel programming library, as opposed to concurrent thread. I'd recommend Dave

Embedded software DbC

2010-08-01 Thread bearophile
A nice article found through Reddit, Design by Contract (DbC) for Embedded Software by Miro Samek, 2009: http://www.netrino.com/Embedded-Systems/How-To/Design-by-Contract-for-Embedded-Software It says nothing new, but it says such old things in a nice way, and I like how it compares assertions

Re: Mac OSX installer for dmd

2010-08-01 Thread Michel Fortin
On 2010-08-01 20:07:10 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org said: Ideally we'd have a one-click OSX installer for dmd - a .dmg file. Is someone able and willing to own this project? I think improving the out-of-the-box experience is important and urgent. I agree too.

Re: TDPL: Overloading template functions

2010-08-01 Thread Ryan W Sims
On 7/28/10 7:44 AM, Philippe Sigaud wrote: On Wed, Jul 28, 2010 at 05:50, Andrej Mitrovic andrej.mitrov...@gmail.com mailto:andrej.mitrov...@gmail.com wrote: I won't comment on the double/float issue, I do not anything about it. T[] find(T, E)(T[] haystack, E needle) if

Re: Mac OSX installer for dmd

2010-08-01 Thread BCS
Hello bearophile, Andrei Alexandrescu: I explained how D works (which I think is a very solid design, probably the best I've seen), The D module system has some holes, most of them are already reported in Bugzilla (some of them are more than just implementation bugs). From your words I

Re: Mac OSX installer for dmd

2010-08-01 Thread dsimcha
== Quote from bearophile (bearophileh...@lycos.com)'s article Andrei Alexandrescu: I explained how D works (which I think is a very solid design, probably the best I've seen), The D module system has some holes, most of them are already reported in Bugzilla (some of them are more than just

Re: Mac OSX installer for dmd

2010-08-01 Thread Andrei Alexandrescu
On 08/01/2010 10:06 PM, Michel Fortin wrote: On 2010-08-01 20:07:10 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org said: Ideally we'd have a one-click OSX installer for dmd - a .dmg file. Is someone able and willing to own this project? I think improving the out-of-the-box experience

Re: Phobos-compatible license on Google Code?

2010-08-01 Thread Justin Spahr-Summers
On Sat, 31 Jul 2010 17:06:26 +0100, div0 d...@sourceforge.net wrote: On 31/07/2010 03:50, Justin Spahr-Summers wrote: Yes, thank you. I misworded my original question. I was hoping to host on Google Code, because it's been the most reliable and functional (free) project hosting I've

Re: Why don't other programming languages have ranges?

2010-08-01 Thread Walter Bright
Jeff Nowakowski wrote: On 08/01/2010 02:35 AM, Walter Bright wrote: BCS wrote: I once had a fire hydrant installed on my property. The city required an engineering analysis, which ran to quite a stack of paper. After approval, the workers came by to install it. They never looked at the

Re: Mac OSX installer for dmd

2010-08-01 Thread Walter Bright
dsimcha wrote: I absolutely despise using qualified names because they are both syntactic noise and extra typing. D lets me just import tons of stuff and skip the qualified names in most cases. Most of the time it does what I mean, and it complains if and only if there's ambiguity about what I

Re: Embedded software DbC

2010-08-01 Thread Kagamin
bearophile Wrote: This is a paper that shows why DbC can not enough in some situations, by Ken Garlington, 1998: http://home.flash.net/~kennieg/ariane.html In the situation like the one of the Ariane I think the good solution is the introduce a fuzzy control system that has a degradation

Re: Naming suggestion for this particular delegate/function

2010-08-01 Thread Philippe Sigaud
On Sat, Jul 31, 2010 at 20:07, Bruno Medeiros brunodomedeiros+s...@com.gmail wrote: Consider the familiar functional idiom map ( http://en.wikipedia.org/wiki/Map_%28higher-order_function%29) What would you call such a function parameter (either for map or just generally). What parameter?

Re: Casting an expression to bool means testing for 0 or !=0 for arithmetic types

2010-08-01 Thread Pluto
== Quote from Simen kjaeraas (simen.kja...@gmail.com)'s article Pluto pl...@planets.not wrote: == Quote from Simen kjaeraas (simen.kja...@gmail.com)'s article Pluto pl...@planets.not wrote: This part has always bothered me. Could somebody please explain to me the rationale behind

Re: Casting an expression to bool means testing for 0 or !=0 for arithmetic types

2010-08-01 Thread Pluto
== Quote from Jonathan M Davis (jmdavisp...@gmail.com)'s article On Saturday 31 July 2010 20:15:58 Jason Spencer wrote: == Quote from Dmitry Olshansky (dmitry.o...@gmail.com)'s article [...snip] Just a thought. Jason I honestly don't think that exception handling is a particularly

Re: xfbuild, optlink and pragma(lib)

2010-08-01 Thread Mafi
Ok, OPTLINK is the problem. Without linking SDL, it complains about missing symbol (good) and creates a corrupt executable (so-so). With linking SDL in any way (explicitly or with pragma(lib)) it shows no errormessage (really bad) and does not create any executable (bad). Should I fill a bug

Re: Casting an expression to bool means testing for 0 or !=0 for arithmetic types

2010-08-01 Thread bearophile
Jason Spencer Wrote: Unless D has made great strides in exception performance (which is entirely possible), From my tests dmd exceptions are more than ten times slower than Oracle-Java ones. I have test code. Bye, bearophile

Re: xfbuild, optlink and pragma(lib)

2010-08-01 Thread Mike Parker
Mafi wrote: When I comment out the pragma(lib) optlink fails (correctly) and xfbuild crashes (:-(). Then I call optlink myself with libsdl.dll.a and it creates a corrupt exe without errormessages. Please help me. It seems that there are bugs over bugs. I don't konw what to do. I use

Re: Naming suggestion for this particular delegate/function

2010-08-01 Thread Kagamin
Bruno Medeiros Wrote: What would you call such a function parameter (either for map or just generally). That is, what would you call a function that takes one parameter of some type, and produces another object/data from that input? transform

Re: Doubled newlines

2010-08-01 Thread bearophile
Andrej Mitrovic: I'm getting normal newlines here (XP): Thank you for your test. Then maybe it's a problem that comes out on Windows Vista only, I don't know. - Jonathan M Davis: So, while Wnidows is arguably more correct, it causes problems and is arguably inferior.

Re: xfbuild, optlink and pragma(lib)

2010-08-01 Thread Mafi
libSDL.dll.a is a MingW- or Cygwin-compiled link library. That's not going to work on Windows with DMD and may very likely be the source of your problem. If you want to link with a DLL link lib, then you need to get the tool coff2omf[1] (part of the Extended Utilities Package[2]) run it on

Re: Doubled newlines

2010-08-01 Thread div0
On 01/08/2010 13:12, bearophile wrote: Andrej Mitrovic: The point is that probably there is a newline-related bug somewhere in Phobos and I'd like to find it. Bye, bearophile Yeah there is. I get doubled new lines as well when passing a handle opened with fopen to a CFile thingy.

Re: Doubled newlines

2010-08-01 Thread div0
On 01/08/2010 18:22, div0 wrote: On 01/08/2010 13:12, bearophile wrote: Andrej Mitrovic: The point is that probably there is a newline-related bug somewhere in Phobos and I'd like to find it. Bye, bearophile Yeah there is. I get doubled new lines as well when passing a handle opened with

Re: xfbuild, optlink and pragma(lib)

2010-08-01 Thread div0
On 01/08/2010 16:22, Mafi wrote: libSDL.dll.a is a MingW- or Cygwin-compiled link library. That's not going to work on Windows with DMD and may very likely be the source of your problem. If you want to link with a DLL link lib, then you need to get the tool coff2omf[1] (part of the Extended

Re: alias = compile-time variants?

2010-08-01 Thread Philippe Sigaud
On Sat, Jul 31, 2010 at 21:17, Lutger lutger.blijdest...@gmail.com wrote: Jason Spencer wrote: == Quote from Philippe Sigaud (philippe.sig...@gmail.com)'s article --0016e6d58a039d35e2048c9aa7e2 I thought they could only be symbols. That is, an alias is a 'link', a sort of pointer to

Sections in Ddoc?

2010-08-01 Thread Philippe Sigaud
Hi, as per Nick's advice, I was reading on Goldie's GenDocs template documentation system: http://www.semitwist.com/goldiedocs/v0.3/Docs/Tools/GenDocs/TemplateFormat/ That's a nice work, and I saw there something I'd like to do with Ddocs: sections. As in, document sections. Ideally there

Initializing static arrays without specifying size

2010-08-01 Thread Ziad
Hi all, I was wondering how I would go about initializing a static array without explicitly specifying how big it is, given I lay out the contents. For example, if I do: int[] a = [1, 2, 3, 4, 5]; auto a = [1, 2, 3, 4, 5]; both statements would result in a heap allocated array (slice). If I

Re: Casting an expression to bool means testing for 0 or !=0 for arithmetic types

2010-08-01 Thread Jonathan M Davis
On Sunday 01 August 2010 07:36:27 Jason Spencer wrote: == Quote from Jonathan M Davis (jmdavisp...@gmail.com)'s article For logic errors, efficiency isn't really an issue, since they shouldn't be happening. If they are, go fix your code and it won't be an issue. That gets less true as

Re: Doubled newlines

2010-08-01 Thread Jonathan M Davis
On Sunday 01 August 2010 05:12:04 bearophile wrote: Jonathan M Davis: So, while Wnidows is arguably more correct, it causes problems and is arguably inferior. The point is that probably there is a newline-related bug somewhere in Phobos and I'd like to find it. Oh, I don't disagree. I'm

Re: Initializing static arrays without specifying size

2010-08-01 Thread bearophile
Ziad: Is there a way to let the compiler automatically determine the size based on the argument list? I don't know a clean way to do it. See the related enhancement here: http://d.puremagic.com/issues/show_bug.cgi?id=3849 With other people I have proposed the syntax: int[$] a = [1, 2, 3]; But

A confusing expression?

2010-08-01 Thread bearophile
Time ago an automatic tool has said that in a line of C code similar to: int r = x / y * z; a division operator followed by a mult is confusing, and to add parentheses to improve the code: int r = (x / y) * z; When values are integral the position of parentheses can change the value of the

Re: A confusing expression?

2010-08-01 Thread mwarning
On Sun, 01 Aug 2010 19:22:42 -0400, bearophile wrote: Turning 'x / y * z' into a D syntax error (as done in bug http://d.puremagic.com/issues/show_bug.cgi?id=4077 ) looks excessive to me. A warning seems enough, but Walter is not a lover of warnings (and sometimes I agree, I'd like to turn

Re: A confusing expression?

2010-08-01 Thread bearophile
mwarning: Turning it into a syntax error sounds to be the right way to do to me. From a mathematical syntax pov, it's undefined behavior. Thank you for your answer. You may be right, but this a hard sell :-) I'd like to know what others think about it. Eventually if the conditions are fit I

std.file.read

2010-08-01 Thread bearophile
Can you tell me why std.file.read() returns a void[] instead of something like a ubyte[]? (Performing a cast(ubyte[]) in SafeD can be a problem. I presume in SafeD I have to use other safer functions to load binary data, like slurp() or something similar.) Bye, bearophile

Re: xfbuild, optlink and pragma(lib)

2010-08-01 Thread Mike Parker
Mafi wrote: The tool sounds cool but it seems that I have to buy it, so that's no option for me. So I tried to compile SDL myself. I have to say I'm to stupid for it. I tried to do the same thing as the makefile in powershell. After I hacked together some solution that worked dmc complained

null dereference exception vs. segfault?

2010-08-01 Thread Ryan W Sims
The following code fails with a Bus error (OSX speak for Segfault, if I understand correctly). // types.d import std.stdio; class A { int x = 42; } void fail_sometimes(int n) { A a; if (n == 0) { a = new A; // clearly a contrived example } assert(a.x == 42, Wrong

[Issue 4543] New: typedef circular definition and ICE

2010-08-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4543 Summary: typedef circular definition and ICE Product: D Version: D1 Platform: All OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component:

[Issue 4543] typedef circular definition and ICE

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

[Issue 4543] typedef circular definition and ICE

2010-08-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4543 --- Comment #2 from Iain Buclaw ibuc...@ubuntu.com 2010-08-01 05:33:11 PDT --- (In reply to comment #1) According to Andrei 'typedef' will be removed from the language. Is an 'alias' there giving the same troubles? That it does not. Also, I

[Issue 4543] typedef circular definition and ICE

2010-08-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4543 --- Comment #4 from bearophile_h...@eml.cc 2010-08-01 06:19:10 PDT --- You are right, typedef will be removed from D2 only. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail

[Issue 4543] typedef circular definition and ICE

2010-08-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4543 --- Comment #3 from bearophile_h...@eml.cc 2010-08-01 06:18:10 PDT --- You are right, typedef will be removed from D1 only. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail

  1   2   >