Re: blog: Overlooked Essentials for Optimizing Code

2010-10-30 Thread BCS
Hello Bruno, Which degree did 'Software engineers' take then? You know, that's one thing that kinda irks me: Why is it called 'Software engineers' when I've never seen engineering taught in a CS course (not to be confused with real "computer engineering" courses that are a lot more like EE

Re: GCC 4.6

2010-10-30 Thread Jimmy Cao
On Sat, Oct 30, 2010 at 11:22 PM, Gary Whatmore wrote: > > You could study without interrupting Walter. > > Interrupting? Breaks do interrupt work time, but that's the point. We all need a break, and so does Walter once in a while (I hope). > We should punish the third group more with useless

Re: GCC 4.6

2010-10-30 Thread Nick Sabalausky
"Gary Whatmore" wrote in message news:iaiqtd$2r5...@digitalmars.com... > > We should punish the third group more with useless discussion and let the > important persons finish their jobs quick. > > It's not necessarily evil to lure them in using questionable methods. Yes, we should just be a bu

Re: GCC 4.6

2010-10-30 Thread Gary Whatmore
bearophile Wrote: > Walter: > > > You post lists of features every day. > > I hate wasting your time, so please ignore my posts you aren't interested in. > I write those things because I like to think and discuss about new ways to > explain semantics to computers. Most of those things are for

Re: Ruling out arbitrary cost copy construction?

2010-10-30 Thread Rainer Deyke
On 10/30/2010 21:56, Andrei Alexandrescu wrote: > Walter and I discussed the matter again today and we're on the brink of > deciding that cheap copy construction is to be assumed. This simplifies > the language and the library a great deal, and makes it perfectly good > for 95% of the cases. For a

Ubuntu Gutsy Gibbon listed on download page.

2010-10-30 Thread Iain Buclaw
Just stumbled upon a small cosmetic thing on the download page: http://www.digitalmars.com/d/download.html In the table for how to obtain/install GDC, it lists 'Ubuntu Gutsy Gibbon' in the OS column. Gutsy Gibbon reached it's end of life in April '09, so may as well update that field to a more ge

Re: Ruling out arbitrary cost copy construction?

2010-10-30 Thread Andrei Alexandrescu
On 10/30/2010 09:40 PM, Michel Fortin wrote: On 2010-10-30 20:49:38 -0400, Andrei Alexandrescu said: On 10/30/10 2:24 CDT, Don wrote: At the moment, I think it's impossible. Has anyone succesfully implemented refcounting in D? As long as bug 3516 (Destructor not called on temporaries) remains

Re: GCC 4.6

2010-10-30 Thread bearophile
Walter: > You post lists of features every day. I hate wasting your time, so please ignore my posts you aren't interested in. I write those things because I like to think and discuss about new ways to explain semantics to computers. Most of those things are for discussion, not for inclusion in

Re: Ruling out arbitrary cost copy construction?

2010-10-30 Thread Michel Fortin
On 2010-10-30 20:49:38 -0400, Andrei Alexandrescu said: On 10/30/10 2:24 CDT, Don wrote: At the moment, I think it's impossible. Has anyone succesfully implemented refcounting in D? As long as bug 3516 (Destructor not called on temporaries) remains open, it doesn't seem to be possible. Is tha

Re: GCC 4.6

2010-10-30 Thread Walter Bright
Nick Sabalausky wrote: On a more serious note though, just focusing on what something's good at amounts to wearing blinders and is exactly what turned Java into a puritanical piece of shit: "Java's good at objects, so let's pretend nothing else exists." And it's what made Haskell into something

/usr/bin/shell & Ubuntu 10.10

2010-10-30 Thread Mike Chaten
I filed issue 5047 when I upgraded to Ubuntu 10.10 from 10.04. The problem revolves around the fact that, by default, 10.10 installs byobu which contains it's own /usr/bin/shell. According to the docs, shell is a "S

Re: GCC 4.6

2010-10-30 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:iaifev$26j...@digitalmars.com... > "Walter Bright" wrote in message > news:iaiehl$24s...@digitalmars.com... >> bearophile wrote: >> >>> If you focus only on your strong points you will not improve yourself, >>> this is a basic rule for any serious artist

Re: GCC 4.6

2010-10-30 Thread Nick Sabalausky
"Walter Bright" wrote in message news:iaiehl$24s...@digitalmars.com... > bearophile wrote: > >> If you focus only on your strong points you will not improve yourself, >> this is a basic rule for any serious artist or athlete. > > Would you criticize a long distance runner for being lousy at wrest

Re: TDPL Errata

2010-10-30 Thread Andrei Alexandrescu
On 10/30/10 18:10 CDT, u...@domain.invalid wrote: Page 36, Table 2.3 The ASCII values for backspace, formfeed, line feed and carriage return seem to be given in octal Jos Thanks, Jos! Added with credit (as much as I could give) to http://erdani.com/tdpl/errata/. Andrei

Re: GCC 4.6

2010-10-30 Thread Walter Bright
Bearophile, let me start by emphasizing that you are a valuable member of the D community. bearophile wrote: Walter: bearophile wrote: The -Wshadow option now warns if a local variable or type declaration shadows another type in C++. Note that the compiler will not warn if a local variable

Re: [nomenclature] systems language

2010-10-30 Thread Walter Bright
Don wrote: Did the term "systems programming language" exist before C? I mean, asm isn't a "systems programming language", it's asm! Seems to me that it's a market segment term, which just means "competes with C". The first I encountered the term was the BLISS programming language. I think it

Re: Ruling out arbitrary cost copy construction?

2010-10-30 Thread Andrei Alexandrescu
On 10/30/10 2:24 CDT, Don wrote: Andrei Alexandrescu wrote: If anything, I'm inclined to say that we assume that the postblit is O(1) and let the programmer worry about any inefficiencies. We can point out that anything worse that O(1) will be a performance problem, but it seems to me that any a

Re: GCC 4.6

2010-10-30 Thread bearophile
Walter: > bearophile wrote: > >> The -Wshadow option now warns if a local variable or type declaration > >> shadows another > >> type in C++. Note that the compiler will not warn if a local variable > >> shadows a > >> struct/class/enum, but will warn if it shadows an explicit typedef. > > > >

Re: GCC 4.6

2010-10-30 Thread Walter Bright
bearophile wrote: The -Wshadow option now warns if a local variable or type declaration shadows another type in C++. Note that the compiler will not warn if a local variable shadows a struct/class/enum, but will warn if it shadows an explicit typedef. This seems interesting. Yeah, D has had

TDPL Errata

2010-10-30 Thread user
Page 36, Table 2.3 The ASCII values for backspace, formfeed, line feed and carriage return seem to be given in octal Jos

Re: [nomenclature] systems language

2010-10-30 Thread Don
Walter Bright wrote: Iain Buclaw wrote: == Quote from Walter Bright (newshou...@digitalmars.com)'s article div0 wrote: There's nothing special about a systems language; it's just they have explicit facilities that make certain low level functionality easier to implement. You could implement an

Re: Ruling out arbitrary cost copy construction?

2010-10-30 Thread Don
bearophile wrote: Lot of time ago I have instead suggest BigInt.sizeof == size_t.sizeof, because in most programs you need integers smaller than 63 bit, 31 bits are enough. This increases the performance a little on 32 bit systems. The compiler also has to make sure the tests for out-of-small

Re: Ruling out arbitrary cost copy construction?

2010-10-30 Thread bearophile
> Lot of time ago I have instead suggest BigInt.sizeof == size_t.sizeof, > because in most programs you need integers smaller than 63 bit, 31 bits are > enough. This increases the performance a little on 32 bit systems. The compiler also has to make sure the tests for out-of-smallint-range are

Re: Ruling out arbitrary cost copy construction?

2010-10-30 Thread bearophile
Walter Bright: > I think it's also important to make BigInt.sizeof == ulong.sizeof. To that > end, > you can use the least significant bit to mean "this is not a pointer", as in > a > 63 bit integer << 1. Lot of time ago I have instead suggest BigInt.sizeof == size_t.sizeof, because in most

GCC 4.6

2010-10-30 Thread bearophile
They keep adding more and more stuff to GCC, some unfinished notes about GCC 4.6, there are some interesting things: http://gcc.gnu.org/gcc-4.6/changes.html Some points: > Improved auto-detection of const and pure functions. Newly, noreturn > functions are auto-detected. -Wsuggest-attribute=

Re: Ruling out arbitrary cost copy construction?

2010-10-30 Thread Walter Bright
Don wrote: The most important issues would be fixed with a small-value optimisation (values x where -long.max <= x <= long.max stored in the struct). Drat, I thought it already did that. I think it's also important to make BigInt.sizeof == ulong.sizeof. To that end, you can use the least sign

Magpie language

2010-10-30 Thread bearophile
Found through Reddit. Magpie is a little Jython-like language, the author probably isn't a big expert of type systems or languages in general, and Magpie probably doesn't scope much as academic language, but the last version of its type system is cute, we'll see what it will be able to do: http

Re: Ruling out arbitrary cost copy construction?

2010-10-30 Thread Don
dsimcha wrote: == Quote from Don (nos...@nospam.com)'s article Andrei Alexandrescu wrote: If anything, I'm inclined to say that we assume that the postblit is O(1) and let the programmer worry about any inefficiencies. We can point out that anything worse that O(1) will be a performance problem

Re: [OT] Interfacing C functions with safer ptr/length

2010-10-30 Thread Stanislav Blinov
Walter Bright wrote: Walter Bright wrote: tls wrote: Walter is dead? I've been feeling much better lately. But I do have a peculiar hunger for brains now. *That* movie?

Re: [nomenclature] systems language

2010-10-30 Thread Walter Bright
Iain Buclaw wrote: == Quote from Walter Bright (newshou...@digitalmars.com)'s article div0 wrote: There's nothing special about a systems language; it's just they have explicit facilities that make certain low level functionality easier to implement. You could implement an OS in BASIC using PEE

Re: Interfacing C functions with safer ptr/length

2010-10-30 Thread Walter Bright
tls wrote: Walter is dead? I've been feeling much better lately.

Re: Interfacing C functions with safer ptr/length

2010-10-30 Thread Walter Bright
Walter Bright wrote: tls wrote: Walter is dead? I've been feeling much better lately. But I do have a peculiar hunger for brains now.

Re: Ruling out arbitrary cost copy construction?

2010-10-30 Thread dsimcha
== Quote from Don (nos...@nospam.com)'s article > Andrei Alexandrescu wrote: > >> If anything, I'm inclined to say that we assume that the postblit is > >> O(1) and > >> let the programmer worry about any inefficiencies. We can point out > >> that anything > >> worse that O(1) will be a performance

Re: Interfacing C functions with safer ptr/length

2010-10-30 Thread tls
Andrei Alexandrescu Wrote: > On 10/29/10 21:11 CDT, bearophile wrote: > > I am toying with more ideas to strengthen D type system a bit in few spots. > > This is a minor thing, I don't know if this is a common enough situation to > > deserve compiler support, maybe not. > > > > If I want to use

Re: Interfacing C functions with safer ptr/length

2010-10-30 Thread Andrei Alexandrescu
On 10/29/10 21:11 CDT, bearophile wrote: I am toying with more ideas to strengthen D type system a bit in few spots. This is a minor thing, I don't know if this is a common enough situation to deserve compiler support, maybe not. If I want to use a C function from D code, and such C function h

Re: Ruling out arbitrary cost copy construction?

2010-10-30 Thread Don
Andrei Alexandrescu wrote: If anything, I'm inclined to say that we assume that the postblit is O(1) and let the programmer worry about any inefficiencies. We can point out that anything worse that O(1) will be a performance problem, but it seems to me that any attempt to either accomodate arbi

GDC, Debian and Ubuntu

2010-10-30 Thread Russel Winder
Just noting that in Maverick the gdc package points at gdc-4.3 rather than gdc-4.4. I guess best advice is to remove gdc and install gdc-4.4? Sadly, although gdc-4.4 is in Debian Sid, it isn't in Debian Squeeze, it only has gdc pointing to gdc-4.3. At least for the AMD64 architecture I am using.