D tool

2011-02-18 Thread Russel Winder
Walter Bright has just released version 1.067 and 2.052 of DMD which offers 64-bit support on Linux for the D language. Also there is a GDC for version 2 of the language which is not handled in the current D tool. I will do some development of a new D tool (based on the current one that is in the

ICOOOLPS 2011

2011-02-18 Thread spir
Hello, Just forwarding this information, thought some of you may be interested: Workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems (ICOOOLPS) == Welcome to the sixth workshop on the Implementation, Compilation, Optimization

DMD versions

2011-02-18 Thread Russel Winder
What is the official way of programmatically determining the version number of the currently executing dmd? Thanks. -- Russel. = Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.win...@ekiga.net 41 Buckmaster

Re: DMD versions

2011-02-18 Thread Steven Schveighoffer
On Fri, 18 Feb 2011 07:36:18 -0500, Russel Winder wrote: What is the official way of programmatically determining the version number of the currently executing dmd? Thanks. AFAIK, there isn't a way. You can only determine D2 vs D1. It would be a good feature to add to druntime though.

Re: DMD versions

2011-02-18 Thread Matthias Pleh
Am 18.02.2011 13:51, schrieb Steven Schveighoffer: On Fri, 18 Feb 2011 07:36:18 -0500, Russel Winder wrote: What is the official way of programmatically determining the version number of the currently executing dmd? Thanks. AFAIK, there isn't a way. You can only determine D2 vs D1. It wou

Re: DMD versions

2011-02-18 Thread Steven Schveighoffer
On Fri, 18 Feb 2011 07:56:46 -0500, Matthias Pleh wrote: There is the special Token __VERSION__ which gives an integer. http://www.digitalmars.com/d/2.0/lex.html That works ;) I looked on the "conditional compilation" page. -Steve

Re: DMD versions

2011-02-18 Thread Lars T. Kyllingstad
On Fri, 18 Feb 2011 08:08:46 -0500, Steven Schveighoffer wrote: > On Fri, 18 Feb 2011 07:56:46 -0500, Matthias Pleh > wrote: > > >> >> There is the special Token __VERSION__ which gives an integer. >> >> http://www.digitalmars.com/d/2.0/lex.html >> >> > That works ;) I looked on the "condition

Re: tooling quality and some random rant

2011-02-18 Thread nedbrek
Hello all, "Walter Bright" wrote in message news:ijeih9$2aso$2...@digitalmars.com... > Don wrote: >> That would really be fun. >> BTW, the current Intel processors are basically the same as Pentium Pro, >> with a few improvements. The strange thing is, because of all of the >> reordering that

Re: DMD versions

2011-02-18 Thread Russel Winder
On Fri, 2011-02-18 at 13:20 +, Lars T. Kyllingstad wrote: > On Fri, 18 Feb 2011 08:08:46 -0500, Steven Schveighoffer wrote: > > > On Fri, 18 Feb 2011 07:56:46 -0500, Matthias Pleh > > wrote: > > > > > >> > >> There is the special Token __VERSION__ which gives an integer. > >> > >> http://ww

Re: DMD versions

2011-02-18 Thread Jens Mueller
Russel Winder wrote: > On Fri, 2011-02-18 at 13:20 +, Lars T. Kyllingstad wrote: > > On Fri, 18 Feb 2011 08:08:46 -0500, Steven Schveighoffer wrote: > > > > > On Fri, 18 Feb 2011 07:56:46 -0500, Matthias Pleh > > > wrote: > > > > > > > > >> > > >> There is the special Token __VERSION__ whic

Re: ICOOOLPS 2011

2011-02-18 Thread Andrei Alexandrescu
On 2/18/11 6:15 AM, spir wrote: Hello, Just forwarding this information, thought some of you may be interested: Workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems (ICOOOLPS) [snip] Just tell me if ever such "spam" is "unwelcome" on D's

Re: DMD versions

2011-02-18 Thread Russel Winder
On Fri, 2011-02-18 at 14:47 +0100, Jens Mueller wrote: [ . . . ] > If you start dmd without any arguments it will give you the information > as well. > $ dmd > Digital Mars D Compiler v2.052 > ... > > So you can parse the first line of this output. OK, that is the same as "dmd --help", I can make

Re: Integer conversions too pedantic in 64-bit

2011-02-18 Thread Nick Sabalausky
"Jonathan M Davis" wrote in message news:mailman.1758.1298013272.4748.digitalmar...@puremagic.com... > On Thursday 17 February 2011 23:09:32 Russel Winder wrote: >> On Thu, 2011-02-17 at 11:09 -0800, Walter Bright wrote: >> > Russel Winder wrote: >> > > Do not be afraid of the word. Fear leads t

Interfaces and Unit testing

2011-02-18 Thread Erik Meer
Does using interfaces extensively have a performance drawback like using inheritance has? Why do I ask? I was thinking about adopting a coding practice where I define explicit interfaces for all public aspects of my classes, and then couples the interfaces closely to unit tests. Then, whenever

DMD 2.0562

2011-02-18 Thread Russel Winder
I had thought std.date was deprecated, it actually seems to have been decimated? Actually it seems to be trying to use datetime anyway? |> dmd -I. -O -release -inline -m64 -c -ofpi_d2_sequential.o pi_d2_sequential.d std.date and std.dateparse have been scheduled for deprecation. Please use std.

Re: Interfaces and Unit testing

2011-02-18 Thread Kagamin
Erik Meer Wrote: > Does using interfaces extensively have a performance drawback like using > inheritance has? > > Why do I ask? I was thinking about adopting a coding practice where I define > explicit interfaces for all public aspects of my classes, and then couples > the interfaces closely

Re: DVCS vs. Subversion brittleness (was Re: Moving to D)

2011-02-18 Thread Bruno Medeiros
On 16/02/2011 17:54, Ulrik Mikaelsson wrote: 2011/2/16 Russel Winder: Definitely the case. There can only be one repository that represents the official state of a given project. That isn't really the issue in the move from CVCS systems to DVCS systems. Just note that not all projects have

64bit phobos on Windows?

2011-02-18 Thread Richard Webb
I know that 64bit support on Windows is behind Linux etc for various reasons, but i thought i'd tried building some things with -m64 just to test, and got a bunch of errors like std\file.d(223): Error: undefined identifier GetLastError std\file.d(2067): Error: undefined identifier WIN32_FIND_DATA

Re: DVCS vs. Subversion brittleness (was Re: Moving to D)

2011-02-18 Thread Ulrik Mikaelsson
2011/2/17 Bruno Medeiros : > > Yeah, that's true. Some projects, the Linux kernel being one of the best > examples, are more distributed in nature than not, in actual organizational > terms. But projects like that are (and will remain) in the minority, a > minority which is probably a very, very sm

Re: Interfaces and Unit testing

2011-02-18 Thread Steven Schveighoffer
On Fri, 18 Feb 2011 09:43:19 -0500, Erik Meer wrote: Does using interfaces extensively have a performance drawback like using inheritance has? Why do I ask? I was thinking about adopting a coding practice where I define explicit interfaces for all public aspects of my classes, and then c

Re: 64bit phobos on Windows?

2011-02-18 Thread dsimcha
== Quote from Richard Webb (we...@beardmouse.org.uk)'s article > I know that 64bit support on Windows is behind Linux etc for various reasons, > but i thought i'd tried building some things with -m64 just to test, and got a > bunch of errors like > std\file.d(223): Error: undefined identifier GetLa

Re: Integer conversions too pedantic in 64-bit

2011-02-18 Thread Alexander Malakhov
Don писал(а) в своём письме Wed, 16 Feb 2011 17:21:06 +0600: Exactly. It is NOT the same as the 8 & 16 bit case. The thing is, the fraction of cases where the MSB is important has been decreasing *exponentially* from the 8-bit days. [...] Some facts to back your opinion: * today's most

Re: Interfaces and Unit testing

2011-02-18 Thread Jesse Phillips
As mentioned by Steven there are other ways to this without Interfaces. Templates are one very nice way and you may also find: AutoImplements BlackHole WhiteHole http://digitalmars.com/d/2.0/phobos/std_typecons.html#AutoImplement Useful. I thought there was also going to be something that would

Re: DMD 2.0562

2011-02-18 Thread Lars T. Kyllingstad
On Fri, 18 Feb 2011 15:26:20 +, Russel Winder wrote: > I had thought std.date was deprecated, it actually seems to have been > decimated? Actually it seems to be trying to use datetime anyway? > > > |> dmd -I. -O -release -inline -m64 -c -ofpi_d2_sequential.o > pi_d2_sequential.d std.date a

Re: Interfaces and Unit testing

2011-02-18 Thread Erik Meer
Steven Schveighoffer Wrote: > On Fri, 18 Feb 2011 09:43:19 -0500, Erik Meer wrote: > > > Does using interfaces extensively have a performance drawback like using > > inheritance has? > > > > Why do I ask? I was thinking about adopting a coding practice where I > > define explicit interfaces

RND engines benchs

2011-02-18 Thread bearophile
Timings, n = 100_000_000, seconds, best of 6: Xorshift: 1.08 MinstdRand: 1.15 Mt19937:1.92 DMD 2.052. It seems that compared to MinstdRand, Xorshift is both faster and gives higher quality outputs :-) import std.stdio, std.random; void main() { uint r; //auto rnd = Xorshift(

Re: DMD 2.0562

2011-02-18 Thread Jonathan M Davis
On Friday, February 18, 2011 09:41:07 Lars T. Kyllingstad wrote: > On Fri, 18 Feb 2011 15:26:20 +, Russel Winder wrote: > > I had thought std.date was deprecated, it actually seems to have been > > decimated? Actually it seems to be trying to use datetime anyway? > > > > |> dmd -I. -O -releas

Re: Stupid little iota of an idea

2011-02-18 Thread Don
Nick Sabalausky wrote: "bearophile" wrote in message news:ij473k$1tfn$1...@digitalmars.com... Andrei: Aside from the fact that "range" has another meaning in D, the word does not convey the notion that iota adds incremental steps to move from one number to another. "Iota" does convey that not

Re: Integer conversions too pedantic in 64-bit

2011-02-18 Thread Walter Bright
Russel Winder wrote: Star Wars is like Dr Who you expect revisionist history in every episode. I hate an inconsistent storyline, so the trick is to assume each episode is a completely separate story unrelated to any other episode. My trick was to lose all interest in SW. Have you seen the ser

Short strings optimization

2011-02-18 Thread bearophile
I've found this simple blog post: http://journal.thobe.org/2011/02/better-support-for-short-strings-in.html It suggests the creation of a ShortArray struct, that like arrays is size_t.sizeof*2, that's usable for short arrays and short strings. In 64 bit mode that's 16 bytes long, just like a dyn

Re: Integer conversions too pedantic in 64-bit

2011-02-18 Thread Nick Sabalausky
"Walter Bright" wrote in message news:ijmnp7$433$1...@digitalmars.com... > Russel Winder wrote: >> Star Wars is like Dr Who you expect revisionist history in every >> episode. I hate an inconsistent storyline, so the trick is to assume >> each episode is a completely separate story unrelated to

Re: Stupid little iota of an idea

2011-02-18 Thread Lars T. Kyllingstad
On Fri, 18 Feb 2011 22:10:37 +0100, Don wrote: > Nick Sabalausky wrote: >> I like "interval", too. >> >> I do think the name "iota" is a nice extra reason to just use a..b or >> a..b:c like you say. It also makes it clear that it's a series of >> discrete values rather than a true mathematical ra

Re: Stupid little iota of an idea

2011-02-18 Thread Simen kjaeraas
Lars T. Kyllingstad wrote: I guess steps() would be a possible name for iota(), but then I would have to come up with a new name for my range. ;) Might I suggest iota()? ;) -- Simen

Re: RND engines benchs

2011-02-18 Thread %u
== Quote from bearophile (bearophileh...@lycos.com)'s article > Timings, n = 100_000_000, seconds, best of 6: > Xorshift: 1.08 > MinstdRand: 1.15 > Mt19937:1.92 > DMD 2.052. It seems that compared to MinstdRand, Xorshift is both faster and gives higher quality outputs :-) > import std.s

Re: Integer conversions too pedantic in 64-bit

2011-02-18 Thread Jonathan M Davis
On Friday, February 18, 2011 14:20:03 Nick Sabalausky wrote: > "Walter Bright" wrote in message > news:ijmnp7$433$1...@digitalmars.com... > > > Russel Winder wrote: > >> Star Wars is like Dr Who you expect revisionist history in every > >> episode. I hate an inconsistent storyline, so the trick

Re: DMD 2.0562

2011-02-18 Thread Russel Winder
On Fri, 2011-02-18 at 10:31 -0800, Jonathan M Davis wrote: [ . . . ] > Yeah. Make sure that your dmd.conf is up-to-date. There are a number of > changes > in it with the most recent release - not only the addition of librt, but the > lib > directories were changed as well. So, everyone should e

Re: DMD 2.0562

2011-02-18 Thread Jonathan M Davis
On Friday, February 18, 2011 16:58:50 Russel Winder wrote: > On Fri, 2011-02-18 at 10:31 -0800, Jonathan M Davis wrote: > [ . . . ] > > > Yeah. Make sure that your dmd.conf is up-to-date. There are a number of > > changes in it with the most recent release - not only the addition of > > librt, but

Re: Integer conversions too pedantic in 64-bit

2011-02-18 Thread Walter Bright
Jonathan M Davis wrote: The prequel movies definitely have some inconsistencies with the originals, but for the most part, they weren't huge. I suspect that the real trouble comes in when you read the books (which I haven't). Huge? How about it never occurs to Vader to search for Luke at the m

Re: Integer conversions too pedantic in 64-bit

2011-02-18 Thread Jonathan M Davis
On Friday, February 18, 2011 17:39:34 Walter Bright wrote: > Jonathan M Davis wrote: > > The prequel movies definitely have some inconsistencies with the > > originals, but for the most part, they weren't huge. I suspect that the > > real trouble comes in when you read the books (which I haven't).

O(N) Garbage collection?

2011-02-18 Thread dsimcha
I've been trying out D's new 64-bit compiler and a serious barrier to using it effectively seems to be abysmal garbage collection performance with large heaps. It seems like the time for a garbage collection to run scales linearly with the size of the heap *even if most of the heap is marked as

Re: Integer conversions too pedantic in 64-bit

2011-02-18 Thread Walter Bright
Jonathan M Davis wrote: Vader had no clue So much for his force!

Re: Integer conversions too pedantic in 64-bit

2011-02-18 Thread Don
Walter Bright wrote: Jonathan M Davis wrote: The prequel movies definitely have some inconsistencies with the originals, but for the most part, they weren't huge. I suspect that the real trouble comes in when you read the books (which I haven't). Huge? How about it never occurs to Vader to se

Re: Integer conversions too pedantic in 64-bit

2011-02-18 Thread Walter Bright
Don wrote: I nominate the second prequel for the worst movie of all time. I never saw the third one. You didn't miss a thing.

Re: tooling quality and some random rant

2011-02-18 Thread Walter Bright
nedbrek wrote: Reordering happens in the scheduler. A simple model is "Fetch", "Schedule", "Retire". Fetch and retire are done in program order. For code that is hitting well in the cache, the biggest bottleneck is that "4" decoder (the complex instruction decoder). Reducing the number of co

Re: Integer conversions too pedantic in 64-bit

2011-02-18 Thread Russel Winder
On Fri, 2011-02-18 at 17:52 -0800, Jonathan M Davis wrote: > On Friday, February 18, 2011 17:39:34 Walter Bright wrote: > > Jonathan M Davis wrote: > > > The prequel movies definitely have some inconsistencies with the > > > originals, but for the most part, they weren't huge. I suspect that the >