Re: I'm off to Oredev, be back in a few days

2008-11-22 Thread Lars Ivar Igesund
torhu wrote: Lars Ivar Igesund wrote: Walter Bright wrote: Lars Ivar Igesund wrote: Walter Bright wrote: In Sweden! It is Øredev ;) When I get a keyboard that does umlauts, I'll stick them in! There were no umlauts there :D If anything, it shows your lack of a unicode enabled

Re: should D have a set of tutorials for it?

2008-11-22 Thread Lutger
Surely more tutorials is a good idea. Writing good tutorials is difficult though, and a lot of work. Have you considered contributing to this wikibook instead? http://en.wikibooks.org/wiki/A_Beginner%27s_Guide_to_D It states the intended audience includes people new to programming.

Re: code coverage under Linux

2008-11-22 Thread Gide Nwawudu
On Fri, 21 Nov 2008 12:38:58 -0500, Amaury [EMAIL PROTECTED] wrote: My DMD version is : Digital Mars D Compiler v1.030 What do you mean by my build option? the options to build my .d? I'm just trying the simple example of sieve : dmd -cov sieve.d ./sieve no .lst is created. Works for me, it

Matrix mul

2008-11-22 Thread bearophile
While writing code that works on matrices I have found something curious, so I have written the following little benchmark. As usual keep eyes open for possible bugs and mistakes of mine: import std.conv: toInt; import std.c.stdlib: rand, malloc; const int RAND_MAX = short.max; // RAND_MAX

Re: Nonstandard GCC features

2008-11-22 Thread Nick Sabalausky
Michel Fortin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 2008-11-21 07:43:47 -0500, bearophile [EMAIL PROTECTED] said: Just found this cute article on Reddit: GCC hacks in the Linux kernel, by M. Tim Jones:

64 bits D compiler ?

2008-11-22 Thread Vermi
Hi, I'm wondering : why the D compiler can't produce x86_64 code ? All seems to be ready in the langage for 64 bits. I need to produce a .dll file in both 32 and 64 bits, but I can't. Will we see soon a 64 bits version of the D Compiler or should I re-write my apps in C++ ? @+ Vermi

Re: 64 bits D compiler ?

2008-11-22 Thread Denis Koroskin
22.11.08 в 15:21 Vermi в своём письме писал(а): Hi, I'm wondering : why the D compiler can't produce x86_64 code ? All seems to be ready in the langage for 64 bits. I need to produce a .dll file in both 32 and 64 bits, but I can't. Will we see soon a 64 bits version of the D Compiler or

Re: 64 bits D compiler ?

2008-11-22 Thread Nick Sabalausky
Vermi [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I'm wondering : why the D compiler can't produce x86_64 code ? All seems to be ready in the langage for 64 bits. I need to produce a .dll file in both 32 and 64 bits, but I can't. Will we see soon a 64 bits version of the

Re: 64 bits D compiler ?

2008-11-22 Thread Nick Sabalausky
Nick Sabalausky [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Vermi [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I'm wondering : why the D compiler can't produce x86_64 code ? All seems to be ready in the langage for 64 bits. I need to produce a .dll file in

Re: 64 bits D compiler ?

2008-11-22 Thread Tomas Lindquist Olsen
On Sat, Nov 22, 2008 at 1:25 PM, Denis Koroskin [EMAIL PROTECTED] wrote: 22.11.08 в 15:21 Vermi в своём письме писал(а): Hi, I'm wondering : why the D compiler can't produce x86_64 code ? All seems to be ready in the langage for 64 bits. I need to produce a .dll file in both 32 and 64

Re: 64 bits D compiler ?

2008-11-22 Thread Vermi
Lutger Wrote: Vermi wrote: Hi, I'm wondering : why the D compiler can't produce x86_64 code ? All seems to be ready in the langage for 64 bits. I need to produce a .dll file in both 32 and 64 bits, but I can't. Will we see soon a 64 bits version of the D Compiler or should I re-write

Re: Functions as Struct Properties

2008-11-22 Thread Nick Sabalausky
Sam S E [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, We already have the notation: int[] array; void foo(int[] a, int x); foo(array, 3); array.foo(3); // means the same thing so why not extend this to struct first arguments? --Sam A lot of people want that to be

Re: Matrix mul

2008-11-22 Thread bearophile
Andrei Alexandrescu: My guess is that if you turn that off, the differences won't be as large (or even detectable for certain ranges of N). The array bounds aren't controlled, the code is compiled with -O -release -inline. Do you see array bound controls in the asm code at the bottom of my

Re: Functions as Struct Properties

2008-11-22 Thread Sam S E
Nick Sabalausky Wrote: Sam S E [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, We already have the notation: int[] array; void foo(int[] a, int x); foo(array, 3); array.foo(3); // means the same thing so why not extend this to struct first arguments? --Sam

Re: should D have a set of tutorials for it?

2008-11-22 Thread Michael P.
Lutger Wrote: Surely more tutorials is a good idea. Writing good tutorials is difficult though, and a lot of work. Have you considered contributing to this wikibook instead? http://en.wikibooks.org/wiki/A_Beginner%27s_Guide_to_D It states the intended audience includes people new to

Re: should D have a set of tutorials for it?

2008-11-22 Thread Walter Bright
Michael P. wrote: I would be completely willing to right them, if they would get even a little bit of usage. If they're good, I can do some promotion of them.

foreach

2008-11-22 Thread Sam S E
Does foreach use delegates? Isn't that unnecessary overhead? --Sam

Re: D

2008-11-22 Thread Tony
Jarrett Billingsley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Thu, Nov 20, 2008 at 1:33 AM, Tony [EMAIL PROTECTED] wrote: (...lots of stuff...) I'm not actually going to reply to your post. Not because I feel you've beaten me or something, but because, well, you're

Re: D

2008-11-22 Thread Tony
dsimcha [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] == Quote from bearophile ([EMAIL PROTECTED])'s article D is a fringe language, and it's not an easy one (system language and all that), so there's never shortage of unusual people in this newsgroup :-) Java groups are so

Re: D

2008-11-22 Thread Tony
BCS [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Reply to dsimcha, == Quote from bearophile ([EMAIL PROTECTED])'s article D is a fringe language, and it's not an easy one (system language and all that), so there's never shortage of unusual people in this newsgroup :-) Java

Re: D

2008-11-22 Thread Tony
Robert Fraser [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Christopher Wright wrote: On a more serious note, the standard library and available IDEs often have more to do with ease of use of a language than the language itself (assuming the language is reasonable). I

Re: Matrix mul

2008-11-22 Thread Don
bearophile wrote: While writing code that works on matrices I have found something curious... Here's what I think is going on. AFAIK, D hasn't got any special code for initializing jagged arrays. So auto A = new double[][](N, N); involves N+1 memory allocations. As well as being

Re: foreach

2008-11-22 Thread Jarrett Billingsley
On Sat, Nov 22, 2008 at 11:40 PM, Sam S E [EMAIL PROTECTED] wrote: Does foreach use delegates? Isn't that unnecessary overhead? --Sam It does use delegates, for iterating over most types. When iterating over arrays, the compiler turns it into a sort of for loop instead. Is it unnecessary

Re: Matrix mul

2008-11-22 Thread Tom S
Don wrote: bearophile wrote: While writing code that works on matrices I have found something curious... Here's what I think is going on. AFAIK, D hasn't got any special code for initializing jagged arrays. So auto A = new double[][](N, N); involves N+1 memory allocations. As well

Getting environment variables?

2008-11-22 Thread Christopher Wright
Hey all, How do I get environment variables in a D program? I specifically want the path to a user's home folder. Ta muchly.

Re: Getting environment variables?

2008-11-22 Thread Jarrett Billingsley
On Sat, Nov 22, 2008 at 12:55 PM, Christopher Wright [EMAIL PROTECTED] wrote: Hey all, How do I get environment variables in a D program? I specifically want the path to a user's home folder. Ta muchly. In Tango, there's tango.sys.Environment

Re: Getting environment variables?

2008-11-22 Thread BCS
Reply to Christopher, I thought (perhaps wrongly) C allowed you to declare main as taking a list of environment variables, It does.

[Issue 1977] integral arithmetic operation only on int?

2008-11-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1977 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

[Issue 1977] integral arithmetic operation only on int?

2008-11-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1977 [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID

[Issue 2093] string concatenation modifies original

2008-11-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2093 --- Comment #7 from [EMAIL PROTECTED] 2008-11-22 08:43 --- (In reply to comment #4) Currently an 'owner' is anyone who has a pointer to array's beginning: char[] s = hello.dup; char[] s1 = s[0..4]; s1 ~= !; assert(s != s1); //

[Issue 1977] Relax warnings for implicit narrowing conversions caused by promotions

2008-11-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1977 --- Comment #11 from [EMAIL PROTECTED] 2008-11-22 12:51 --- (In reply to comment #9) (In reply to comment #8) The plan is to have sensible bitwise operations preserve the size of their operands. Only arithmetic and shift will

[Issue 1977] Relax warnings for implicit narrowing conversions caused by promotions

2008-11-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1977 --- Comment #12 from [EMAIL PROTECTED] 2008-11-22 13:22 --- (In reply to comment #10) (In reply to comment #7) In general, we want to go with the simple rule is to have an operation return the tightest type that won't

[Issue 2093] string concatenation modifies original

2008-11-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2093 --- Comment #13 from [EMAIL PROTECTED] 2008-11-22 16:31 --- (In reply to comment #12) It seems to me then that this is a design choice - does the string length belong to the string or to the reference? For slices it must be the