Re: Hello .NET, D Here Calling

2008-12-22 Thread Tim M
Is this Dusing libraries with same name or actuall common intermediate langauge. D has it's own gc and the advantage of using that plus other high level features without requiring additional runtime. This is what makes it good but sometimes I use C#. D Libraries that mimic .net libraries ma

Re: Things that may be removed

2008-12-22 Thread Mikola Lysenko
Stewart Gordon Wrote: > "Mikola Lysenko" wrote in message > news:giouum$1fn...@digitalmars.com... > > ifloat, idouble, ireal, cfloat, cdouble ... and of course creal > > Why? > > http://www.digitalmars.com/d/2.0/builtin.html > > Stewart. > > -- > My e-mail address is valid but not my primar

Re: Optimizing Immutable and Purity

2008-12-22 Thread Walter Bright
Bill Baxter wrote: On Tue, Dec 23, 2008 at 12:10 PM, bearophile wrote: Walter Bright: I didn't know gcc had pure functions. It doesn't have immutable data. If it does optimize with it, you can try it and see! It seems to work: [...] As you can see now there's just one call to bar. Bye, bearo

Re: Optimizing Immutable and Purity

2008-12-22 Thread Walter Bright
Bill Baxter wrote: On Tue, Dec 23, 2008 at 11:30 AM, Jerry Quinn wrote: This was an interesting read. It would be nice to see a discussion of how const is going to fit in in terms of optimization potential, since you can always cast it away. It's basically useless for optimizations I think.

Re: Hello .NET, D Here Calling

2008-12-22 Thread Nick Sabalausky
"bearophile" wrote in message news:gip4o7$1pq...@digitalmars.com... >>Advanced generative and metaprogramming capabilities for starters.< > > Uh... So far I don't see much advantages of using D# over C#. In C# > you even have advanced (and recently easy enough to use too) ways to even > gen

Re: Optimizing Immutable and Purity

2008-12-22 Thread Bill Baxter
On Tue, Dec 23, 2008 at 12:10 PM, bearophile wrote: > Walter Bright: >> I didn't know gcc had pure functions. It doesn't have immutable data. If >> it does optimize with it, you can try it and see! > > It seems to work: > [...] > As you can see now there's just one call to bar. > > Bye, > bearophi

Re: Optimizing Immutable and Purity

2008-12-22 Thread bearophile
Walter Bright: > I didn't know gcc had pure functions. It doesn't have immutable data. If > it does optimize with it, you can try it and see! It seems to work: // test1 int bar(int); int foo(int i) { return bar(i) + bar(i); } Asm with no optimization and default CPU, GCC 4.2.1: .fi

Re: Optimizing Immutable and Purity

2008-12-22 Thread Bill Baxter
On Tue, Dec 23, 2008 at 11:30 AM, Jerry Quinn wrote: > Walter Bright Wrote: > >> I've been working on improving the optimizer to take advantage of >> immutability and purity. >> >> http://www.reddit.com/r/reddit.com/comments/7l5x4/optimizing_immutable_and_purity/ >> >> http://dobbscodetalk.com/ind

Re: Optimizing Immutable and Purity

2008-12-22 Thread Jerry Quinn
Walter Bright Wrote: > I've been working on improving the optimizer to take advantage of > immutability and purity. > > http://www.reddit.com/r/reddit.com/comments/7l5x4/optimizing_immutable_and_purity/ > > http://dobbscodetalk.com/index.php?option=com_myblog&show=Optimizing-Immutable-and-Purit

Re: digitalmars.com main page is broken

2008-12-22 Thread Kenny B
Walter Bright wrote: > Denis Koroskin wrote: >> Walter Bright Wrote: >> >>> Denis Koroskin wrote: digitalmars.com main page is messed and shows php source code >>> What browser are you using? It looks correct when I load it. >> >> Check out http://digitalmars.com, not http://www.digitalmars.co

Re: Optimizing Immutable and Purity

2008-12-22 Thread Walter Bright
bearophile wrote: one rule that is fairly consistent is that fewer instructions execute faster.< Generally this isn't much true anymore. It is . Try it. On a real program, how much faster is my code going to get, if I maximize use of pure functions and immutable data? I don't know. I don't

Re: Things that may be removed

2008-12-22 Thread Jarrett Billingsley
On Mon, Dec 22, 2008 at 5:54 PM, Stewart Gordon wrote: > How does having built-in sort prevent anybody from implementing sort in a > library? It doesn't. But as I said: >> If a sort function can perform >> just as well or better than the built-in sort while being more >> flexible, what's the po

Re: Things that may be removed

2008-12-22 Thread bearophile
Stewart Gordon: > How does having built-in sort prevent anybody from implementing sort in a > library? The funny thing is they can be syntax-compatible too: in my libs there are sorted() and sort() (the first creates a new array and the second works in-place), they can be used like this: strin

Re: digitalmars.com main page is broken

2008-12-22 Thread Walter Bright
Denis Koroskin wrote: Walter Bright Wrote: Denis Koroskin wrote: digitalmars.com main page is messed and shows php source code What browser are you using? It looks correct when I load it. Check out http://digitalmars.com, not http://www.digitalmars.com The latter one works ok (thanks to Ad

Re: Things that may be removed

2008-12-22 Thread Stewart Gordon
"Mikola Lysenko" wrote in message news:giouum$1fn...@digitalmars.com... ifloat, idouble, ireal, cfloat, cdouble ... and of course creal Why? http://www.digitalmars.com/d/2.0/builtin.html Stewart. -- My e-mail address is valid but not my primary mailbox. Please keep replies on the 'group w

Re: Hello .NET, D Here Calling

2008-12-22 Thread Lutger
This is very exciting! .NET is the platform microsoft is pushing applications developers on, it will be very relevant for D if it can be used there. Loads of C++ developers seem to be migrating to C# too, I'm sure they will love D.NET. Right now I'm trying to get into the programming business

Re: Things that may be removed

2008-12-22 Thread Stewart Gordon
"Jarrett Billingsley" wrote in message news:mailman.245.1229956988.22690.digitalmar...@puremagic.com... I'd like to see better and faster "reverse" and "sort", but I think they are useful. Why do you want to see them removed? I think built-in types may enjoy more methods, not less. So they

Re: Optimizing Immutable and Purity

2008-12-22 Thread bearophile
Multiplication and pointer operations are both very common operation in C code, so this code shows well why I don't like them to be represented by the same symbol. Pascal uses ^ for poinetr operation (and ^ isn't used for the bitwise operation): int foo(int* a, int* b) { int i = *a * *b;

Re: Hello .NET, D Here Calling

2008-12-22 Thread Steven Schveighoffer
"bearophile" wrote > Steven Schveighoffer: > >>What is the advantage you see here?< > > You don't need a huge VM to run them. I know lot of people don't care of > this, so please ignore me. that is a good point. But you are also right that I don't care :) I already have to have .net for many o

Re: Hello .NET, D Here Calling

2008-12-22 Thread bearophile
Walter Bright: >Yes (but it will be .net assembly code, not x86 assembly).< I see, this is curious :-) And is inlining dotnet IL useful for something? :-) >All it is is expanding D's domain.< I understand the point, and you are right. >Advanced generative and metaprogramming capabilities for

Re: Things that may be removed

2008-12-22 Thread Bill Baxter
On Mon, Dec 22, 2008 at 11:43 PM, Jarrett Billingsley wrote: > On Mon, Dec 22, 2008 at 8:59 AM, bearophile wrote: >> Jarrett Billingsley: >>> I suppose you mean for normal arrays. How about reverse as well? >> >> I'd like to see better and faster "reverse" and "sort", but I think they are >> us

Re: Hello .NET, D Here Calling

2008-12-22 Thread John Reimer
Hello Walter, Progress on implementing D on .NET. http://www.reddit.com/r/programming/comments/7l5ce/hello_net_d_here_ca lling/ http://the-free-meme.blogspot.com/2008/12/hello-net-d-here-calling.htm l He mentioned this to me in an email recently when I was asking for help with zerobugs.

Re: Hello .NET, D Here Calling

2008-12-22 Thread Steven Schveighoffer
"bearophile" wrote > - But is the dotnet able to support all things D supports? For example can > you implement unions? Inline Asm code? How about the interface with > compiled C code? Etc. C++.net works just fine, and supports unions, etc. Anything that C++ supports. The difference is that y

Re: Hello .NET, D Here Calling

2008-12-22 Thread Walter Bright
bearophile wrote: Walter Bright Wrote: Progress on implementing D on .NET.< - This sounds quite incredible :-) Cristi is an awesome and prolific developer. (He wrote the Zerobugs D debugger for Linux.) - The more implementations of D there are, the more the language will have a chance t

Re: Optimizing Immutable and Purity

2008-12-22 Thread Denis Koroskin
On Tue, 23 Dec 2008 01:10:52 +0300, Walter Bright wrote: I've been working on improving the optimizer to take advantage of immutability and purity. http://www.reddit.com/r/reddit.com/comments/7l5x4/optimizing_immutable_and_purity/ http://dobbscodetalk.com/index.php?option=com_myblog&show=O

Re: Optimizing Immutable and Purity

2008-12-22 Thread bearophile
Walter Bright: > http://dobbscodetalk.com/index.php?option=com_myblog&show=Optimizing-Immutable-and-Purity.html&Itemid=29 Better link: http://dobbscodetalk.com/index.php?option=com_myblog&show=Optimizing-Immutable-and-Purity.html&Itemid=29 (Not read yet). Bye, bearophile

Re: Hello .NET, D Here Calling

2008-12-22 Thread bearophile
There's also a risk: D has already unstable standard library (the division between the Phobos and Tango communities, with now just a common kernel). D# will have to use the libs of the dotnet, so it will use yet another standard lib. This will split in 3 parts the D community. Bye, bearophile

Optimizing Immutable and Purity

2008-12-22 Thread Walter Bright
I've been working on improving the optimizer to take advantage of immutability and purity. http://www.reddit.com/r/reddit.com/comments/7l5x4/optimizing_immutable_and_purity/ http://dobbscodetalk.com/index.php?option=com_myblog&show=Optimizing-Immutable-and-Purity.html&Itemid=29

Re: Hello .NET, D Here Calling

2008-12-22 Thread bearophile
Walter Bright Wrote: >Progress on implementing D on .NET.< - This sounds quite incredible :-) - The more implementations of D there are, the more the language will have a chance to stick and become used, so I think this is a good thing, regardless what I say below. - But is the dotnet able to s

Re: Things that may be removed

2008-12-22 Thread bearophile
Mikola Lysenko: > ifloat, idouble, ireal, cfloat, cdouble ... and of course creal cfloat and cdouble seem useful to me. They aren't redundant ways to do something. Bye, bearophile

Re: Things that may be removed

2008-12-22 Thread Mikola Lysenko
ifloat, idouble, ireal, cfloat, cdouble ... and of course creal

Hello .NET, D Here Calling

2008-12-22 Thread Walter Bright
Progress on implementing D on .NET. http://www.reddit.com/r/programming/comments/7l5ce/hello_net_d_here_calling/ http://the-free-meme.blogspot.com/2008/12/hello-net-d-here-calling.html

Re: digitalmars.com main page is broken

2008-12-22 Thread Denis Koroskin
Walter Bright Wrote: > Denis Koroskin wrote: > > digitalmars.com main page is messed and shows php source code > > What browser are you using? It looks correct when I load it. Check out http://digitalmars.com, not http://www.digitalmars.com The latter one works ok (thanks to Adrei who noticed i

10 programming languages worth checking out

2008-12-22 Thread Walter Bright
Scroll down a bit for the D section. http://www.reddit.com/r/programming/comments/7kwm5/10_programming_languages_worth_checking_out/

Re: digitalmars.com main page is broken

2008-12-22 Thread Walter Bright
Denis Koroskin wrote: digitalmars.com main page is messed and shows php source code What browser are you using? It looks correct when I load it.

Re: digitalmars.com main page is broken

2008-12-22 Thread bearophile
Walter Bright: > Denis Koroskin wrote: > > digitalmars.com main page is messed and shows php source code > > What browser are you using? It looks correct when I load it. I am using Firefox 3.05 and it looks broken, I can see the code: "; } @curl_close($ch); } else if (@ini_get('allow_url_fopen')

Re: Things that may be removed

2008-12-22 Thread Denis Koroskin
On Mon, 22 Dec 2008 21:30:20 +0300, Max Samukha wrote: On Mon, 22 Dec 2008 10:55:27 -0600, Andrei Alexandrescu wrote: Also, is() is a built-in thing so traits can't do all it does. Probably, he meant __traits. Another thing to remove is the underscores. Keywords are highlighted in all edi

Re: Things that may be removed

2008-12-22 Thread Andrei Alexandrescu
dsimcha wrote: == Quote from Don (nos...@nospam.com)'s article * The postincrement and postdecrement operators (make x++, x-- identical to ++x, --x, except that it is illegal to use the return value. Why? This is a nice piece of syntactic sugar to make relatively simple code more concise.

Re: Things that may be removed

2008-12-22 Thread dsimcha
== Quote from Don (nos...@nospam.com)'s article > bearophile wrote: > > There are some things I'd like to see added to the D language, but what > > things can be removed from it? > > > > "Perfection is attained, not when no more can be added, but when no more can be removed." > > -- Antoine de Sai

Re: Things that may be removed

2008-12-22 Thread John Reimer
Hello Don, bearophile wrote: There are some things I'd like to see added to the D language, but what things can be removed from it? "Perfection is attained, not when no more can be added, but when no more can be removed." -- Antoine de Saint-Exupéry. :-) "There should be one-- and preferably

Re: Things that may be removed

2008-12-22 Thread Andrei Alexandrescu
Don wrote: bearophile wrote: There are some things I'd like to see added to the D language, but what things can be removed from it? "Perfection is attained, not when no more can be added, but when no more can be removed." -- Antoine de Saint-Exupéry. :-) "There should be one-- and preferabl

Re: digitalmars.com main page is broken

2008-12-22 Thread Andrei Alexandrescu
Denis Koroskin wrote: digitalmars.com main page is messed and shows php source code Heh, and www.digitalmars.com looks correct. Andrei

digitalmars.com main page is broken

2008-12-22 Thread Denis Koroskin
digitalmars.com main page is messed and shows php source code

Re: Things that may be removed

2008-12-22 Thread Jarrett Billingsley
On Mon, Dec 22, 2008 at 8:59 AM, bearophile wrote: > Jarrett Billingsley: >> I suppose you mean for normal arrays. How about reverse as well? > > I'd like to see better and faster "reverse" and "sort", but I think they are > useful. Why do you want to see them removed? I think built-in types may

Image of objects and classes

2008-12-22 Thread bearophile
There's something I'd like to see something added to the standard D documentation: one or two images that show the details of how in D objects and classes are represented in memory. I am talking about a black&while image with boxes for the fields and arrows for the pointers, that shows for a cou

Re: Things that may be removed

2008-12-22 Thread bearophile
Jarrett Billingsley: > I suppose you mean for normal arrays. How about reverse as well? I'd like to see better and faster "reverse" and "sort", but I think they are useful. Why do you want to see them removed? I think built-in types may enjoy more methods, not less. Bye, bearophile

Re: Things that may be removed

2008-12-22 Thread bearophile
Don: Thank you for your list, the first true good answer to this post of mine :-) > * C-style declarations I agree that having two ways to do the same thing is generally very bad. But I have personally seen how much useful they are when translating C code to D, so I think some intermediate sol

Re: Things that may be removed

2008-12-22 Thread Jarrett Billingsley
On Mon, Dec 22, 2008 at 7:46 AM, Don wrote: > That is an excellent question. > Some items in my list are controversial, the first two have already been > mentioned. > > * C-style declarations > * SFINAE > * \n, \r as a string (free up the backslash character) > * #line (make it a pragma instead) >

Re: Things that may be removed

2008-12-22 Thread KennyTM~
Don wrote: bearophile wrote: There are some things I'd like to see added to the D language, but what things can be removed from it? "Perfection is attained, not when no more can be added, but when no more can be removed." -- Antoine de Saint-Exupéry. :-) "There should be one-- and preferabl

Re: Things that may be removed

2008-12-22 Thread Don
bearophile wrote: There are some things I'd like to see added to the D language, but what things can be removed from it? "Perfection is attained, not when no more can be added, but when no more can be removed." -- Antoine de Saint-Exupéry. :-) "There should be one-- and preferably only one --