Less commas

2010-12-31 Thread bearophile
I'd like to restrict a bit the usage of the comma operator in D2, disallowing at compile-time some currently usages that some C style guides already suggest to avoid. If I see production code like the two examples below in production code, I change the code, and remove the commas. I think they

Re: streaming redux

2010-12-31 Thread Daniel Gibson
Am 30.12.2010 23:17, schrieb Andrei Alexandrescu: On 12/30/10 3:59 PM, Dmitry Olshansky wrote: On 28.12.2010 16:08, Daniel Gibson wrote: [snip] ## UnbufferedInputTransport: I'd like "void readFully(ubyte[] buffer)" which reads buffer.length bytes or throws an exception if that is not possible

Re: streaming redux

2010-12-31 Thread Daniel Gibson
Am 30.12.2010 22:59, schrieb Dmitry Olshansky: On 28.12.2010 16:08, Daniel Gibson wrote: [snip] ## UnbufferedInputTransport: I'd like "void readFully(ubyte[] buffer)" which reads buffer.length bytes or throws an exception if that is not possible This would also fix busy-waiting (it'd block unti

Re: PROPOSAL: Implicit conversions of integer literals to floating

2010-12-31 Thread Max Samukha
On 12/31/2010 02:44 AM, Walter Bright wrote: Andrei Alexandrescu wrote: I agree there's an issue here, but not only with floating point numbers: void fun(long); void fun(ulong); ... fun(2); // whaa? That's a feature, not a bug. void foo(string s); void foo(wstring s); foo("whoa"); This fa

Re: PROPOSAL: Implicit conversions of integer literals to floating point

2010-12-31 Thread Max Samukha
On 12/31/2010 04:47 AM, Andrej Mitrovic wrote: On 12/31/10, Manfred_Nowak wrote: Andrej Mitrovic wrote: "Overload sets can be merged with an alias declaration" [...] That's not the point. The point is it works with a long variable, but not with a long literal. ??? According to the specs

Re: Please comment on http://d-programming-language.org/

2010-12-31 Thread Thomas Mader
Am 2010-09-02 14:46, schrieb retard: Thu, 02 Sep 2010 13:31:03 +0100, Gareth Charnock wrote: PS: Google Chrome on a 1680x1050 resolution display. I'm afraid I really like the red flare; it makes the website look more visually appealing. A solid background colour would just look blander. Howev

Re: Please comment on http://d-programming-language.org/

2010-12-31 Thread Caligo
The main page has a quote from Michael. Who the hell is Michael? The Michael? The archangel? On Fri, Dec 31, 2010 at 3:45 AM, Thomas Mader wrote: > Am 2010-09-02 14:46, schrieb retard: > >> Thu, 02 Sep 2010 13:31:03 +0100, Gareth Charnock wrote: >> >> PS: Google Chrome on a 1680x1050 resolution

Re: Less commas

2010-12-31 Thread Caligo
On Fri, Dec 31, 2010 at 2:09 AM, bearophile wrote: > I'd like to restrict a bit the usage of the comma operator in D2, > disallowing at compile-time some currently usages that some C style guides > already suggest to avoid. > > If I see production code like the two examples below in production cod

Re: Something Go and Scala syntax

2010-12-31 Thread bearophile
Adam Ruppe: > > The high usage frequency of "immutable" suggests its shortening > > according to Zipf law (http://en.wikipedia.org/wiki/Zipf%27s_law ) > > I don't see anything in that article relating to number of letters > in a word. You are right, Zipf's law is about something related but diff

Re: Less commas

2010-12-31 Thread bearophile
Caligo: > > What font are you using? Inconsolata-g, a very good non-proportional font designed to be used with anti-aliasing. Its main fault is that it doesn't have bold yet. One of its features is to tell apart commas and semicolons better, by the way. In it the lower-case L and the 1 glyphs

Re: Less commas

2010-12-31 Thread Caligo
On Fri, Dec 31, 2010 at 4:17 AM, bearophile wrote: > Caligo: > > > > What font are you using? > > Inconsolata-g, a very good non-proportional font designed to be used with > anti-aliasing. Its main fault is that it doesn't have bold yet. > > One of its features is to tell apart commas and semicolo

Re: TDPL ebook

2010-12-31 Thread Thomas Mader
Am 2010-08-27 22:04, schrieb Daniel Gibson: == Quote from sergk (kovrov+purema...@gmail.com)'s article Despite word "download" being mentioned. What safari really provide, is an "online version" of the book, not "electronic version". When I've bought paperback TDPL, I was kinda hoping to read "b

Re: Android development using D

2010-12-31 Thread Johannes Pfau
Michel Fortin wrote: >On 2010-12-30 09:44:46 -0500, Trass3r said: > >> Well you can always compile to native ARM code with gdc for example. > >But has the runtime been ported to ARM? > There was no explicit porting, but I think it just works. I compiled a hello world with gdc2 for ARM some time ag

Re: Please comment on http://d-programming-language.org/

2010-12-31 Thread Matthias Pleh
On 2010-12-31 10:45, Thomas Mader wrote: [...] How about a new logo for D in general? Are there any plans to make a contest or something similar to create a new D logo which has a modern looking design? vote ++ I also think that making the site valid is a very important thing, so are there

Re: Please comment on http://d-programming-language.org/

2010-12-31 Thread Thomas Mader
Am 2010-12-31 11:35, schrieb Matthias Pleh: On 2010-12-31 10:45, Thomas Mader wrote: I also think that making the site valid is a very important thing, so are there any plans to do so? If nobody wants it to do I could help. I think a better marketing of the D community would not only attract m

Re: Mac OS X: gdc-4.2 testing

2010-12-31 Thread Anders F Björklund
Iain Buclaw wrote: I uploaded packages for Mac OS X 10.6 Snow Leopard to SourceForge, for Apple GCC build 5664 ("gcc-4.2"): PPPS. Porters wanted for moving gdcmac to the latest LLVM-GCC platform. :~) It shouldn't be that tricky to port the GCC/GDC patches from Apple b5664 (Xcode 3.2.4) to LLV

Re: streaming redux

2010-12-31 Thread Johannes Pfau
Steven Schveighoffer wrote: >On Thu, 30 Dec 2010 16:49:15 -0500, Dmitry Olshansky > wrote: > >> [snip] >>> - >>> Question: Should we allow read to return an empty slice even if >>> atEnd is false? If we do, we allow non-blocking streams with burst >>> transfer. However, naive client code on n

Windows: gdc-4.5 development

2010-12-31 Thread Anders F Björklund
I was able to patch and build the latest GDC version on Win64 MinGW. (http://mingw-w64.sourceforge.net/) This uses the "regular" GCC version, without patches. I used gcc-4.5.1 for testing, with binutils-2.20.51. The normal build is multilib, so it allows both 32/64 and cross-compiling from anot

Re: Please comment on http://d-programming-language.org/

2010-12-31 Thread Matthias Pleh
On 2010-12-31 11:40, Thomas Mader wrote: Am 2010-12-31 11:35, schrieb Matthias Pleh: On 2010-12-31 10:45, Thomas Mader wrote: I also think that making the site valid is a very important thing, so are there any plans to do so? If nobody wants it to do I could help. I think a better marketing o

Re: Less commas

2010-12-31 Thread Peter Alexander
On 31/12/10 8:09 AM, bearophile wrote: I'd like to restrict a bit the usage of the comma operator in D2, disallowing at compile-time some currently usages that some C style guides already suggest to avoid. If I see production code like the two examples below in production code, I change the c

Re: streaming redux

2010-12-31 Thread Dmitry Olshansky
On 31.12.2010 11:35, Daniel Gibson wrote: Am 30.12.2010 22:59, schrieb Dmitry Olshansky: On 28.12.2010 16:08, Daniel Gibson wrote: [snip] ## UnbufferedInputTransport: I'd like "void readFully(ubyte[] buffer)" which reads buffer.length bytes or throws an exception if that is not possible This w

Re: Clay language

2010-12-31 Thread Jérôme M. Berger
Andrei Alexandrescu wrote: > And I stand by that claim. One aspect that seems to have been forgotten > is that types usually implement either op= in terms of op or vice versa. > That savings alone is large. > This could have been done with a couple of stdlib mixins "generateOpsFromOpAssign

Re: Less commas

2010-12-31 Thread bearophile
Peter Alexander: > I don't believe it is the job of the compiler to enforce personal style > preferences. D2 compiler enforces several good style preferences. Those two style preferences are not just mine, they are enforced by a known C lint tool too. So are the two things I've shown bad/impor

Re: Clay language

2010-12-31 Thread Steven Schveighoffer
On Thu, 30 Dec 2010 21:14:28 -0500, Simen kjaeraas wrote: Andrej Mitrovic wrote: On 12/31/10, Simen kjaeraas wrote: This will give you both: class A { void bar(this T) ( ) { writeln(typeid(T)); writeln(typeid(this)); } } class B : A { } void main( ) {

Re: streaming redux

2010-12-31 Thread Steven Schveighoffer
On Fri, 31 Dec 2010 03:28:12 -0500, Daniel Gibson wrote: Am 30.12.2010 23:17, schrieb Andrei Alexandrescu: On 12/30/10 3:59 PM, Dmitry Olshansky wrote: On 28.12.2010 16:08, Daniel Gibson wrote: [snip] ## UnbufferedInputTransport: I'd like "void readFully(ubyte[] buffer)" which reads buffe

Re: Clay language

2010-12-31 Thread Simen kjaeraas
Steven Schveighoffer wrote: We thus see that the template this parameter has absolutely no value. No, it does have value: [snip] Hey, look! covariance with templates :) Ah, yes indeed. It seems I have misunderstood the purpose of the feature. -- Simen

Re: Please comment on http://d-programming-language.org/

2010-12-31 Thread Andrei Alexandrescu
On 12/31/10 3:45 AM, Thomas Mader wrote: Am 2010-09-02 14:46, schrieb retard: Thu, 02 Sep 2010 13:31:03 +0100, Gareth Charnock wrote: PS: Google Chrome on a 1680x1050 resolution display. I'm afraid I really like the red flare; it makes the website look more visually appealing. A solid backgro

Re: Please comment on http://d-programming-language.org/

2010-12-31 Thread Andrei Alexandrescu
On 12/31/10 4:35 AM, Matthias Pleh wrote: On 2010-12-31 10:45, Thomas Mader wrote: [...] How about a new logo for D in general? Are there any plans to make a contest or something similar to create a new D logo which has a modern looking design? vote ++ I also think that making the site va

Re: Clay language

2010-12-31 Thread Andrei Alexandrescu
On 12/31/10 7:30 AM, "Jérôme M. Berger" wrote: Andrei Alexandrescu wrote: And I stand by that claim. One aspect that seems to have been forgotten is that types usually implement either op= in terms of op or vice versa. That savings alone is large. This could have been done with a coupl

Re: Clay language

2010-12-31 Thread Andrei Alexandrescu
On 12/31/10 9:32 AM, Andrei Alexandrescu wrote: On 12/31/10 7:30 AM, "Jérôme M. Berger" wrote: Andrei Alexandrescu wrote: And I stand by that claim. One aspect that seems to have been forgotten is that types usually implement either op= in terms of op or vice versa. That savings alone is large.

Re: Clay language

2010-12-31 Thread Steven Schveighoffer
On Fri, 31 Dec 2010 10:35:19 -0500, Andrei Alexandrescu wrote: On 12/31/10 9:32 AM, Andrei Alexandrescu wrote: On 12/31/10 7:30 AM, "Jérôme M. Berger" wrote: Andrei Alexandrescu wrote: And I stand by that claim. One aspect that seems to have been forgotten is that types usually implement

Re: Please comment on http://d-programming-language.org/

2010-12-31 Thread Gour
On Fri, 31 Dec 2010 09:30:54 -0600 >> "Andrei" == Andrei Alexandrescu wrote: Andrei> Looks good. May I use it on d-programming-language.org? How is it that I didn't know before about that site? Sincerely, Gour -- Gour | Hlapicina, Croatia | GPG key: CDBF17CA ---

While we were discussing lambda syntax..

2010-12-31 Thread Andrej Mitrovic
There was some heated discussion about the disadvantages of using strings as a predicate, and coming up with some new syntax that DMD would support. Some people did not like using strings and would rather use _ or _0/_1 instead of this: auto arr = [0,1,2,3,4]; auto plusOne = map!("a + b")(arr);

Happy New Year!!!

2010-12-31 Thread Stanislav Blinov
Somebody's already celebrating, somebody's only anticipating, but regardless HAPPY NEW YEAR, EVERYONE!!! HAPPY NEW YEAR, D!!!

Re: While we were discussing lambda syntax..

2010-12-31 Thread Alex_Dovhal
"Andrej Mitrovic" wrote: > There was some heated discussion about the disadvantages of using strings > as a predicate, and coming up with some new syntax that DMD would support. > Some people did not like using strings and would rather use _ or _0/_1 > instead of this: > > auto arr = [0,1,2,3,

Re: Happy New Year!!!

2010-12-31 Thread Guilherme Vieira
On Fri, Dec 31, 2010 at 2:43 PM, Stanislav Blinov < stanislav.bli...@gmail.com> wrote: > Somebody's already celebrating, somebody's only anticipating, but > regardless > > HAPPY NEW YEAR, EVERYONE!!! HAPPY NEW YEAR, D!!! > > Happy new year from Brazil :) -- Atenciosamente / Sincerely, Guilherme

Re: Clay language

2010-12-31 Thread Andrei Alexandrescu
On 12/31/10 9:47 AM, Steven Schveighoffer wrote: On Fri, 31 Dec 2010 10:35:19 -0500, Andrei Alexandrescu wrote: On 12/31/10 9:32 AM, Andrei Alexandrescu wrote: On 12/31/10 7:30 AM, "Jérôme M. Berger" wrote: Andrei Alexandrescu wrote: And I stand by that claim. One aspect that seems to have

Re: Android development using D

2010-12-31 Thread Trass3r
But the "native" code still need the VM to run, right? Nope.

Re: Clay language

2010-12-31 Thread Steven Schveighoffer
On Fri, 31 Dec 2010 12:09:04 -0500, Andrei Alexandrescu wrote: On 12/31/10 9:47 AM, Steven Schveighoffer wrote: On Fri, 31 Dec 2010 10:35:19 -0500, Andrei Alexandrescu wrote: On 12/31/10 9:32 AM, Andrei Alexandrescu wrote: On 12/31/10 7:30 AM, "Jérôme M. Berger" wrote: Andrei Alexandres

Re: Serenity web framework - early feedback wanted

2010-12-31 Thread Robert Clipsham
On 30/12/10 20:12, Jacob Carlborg wrote: I have to say that I'm a bit septic to all/most web frameworks, because in my opinion they're trying to create a Rails implementation in the given language but they all fail due to the language is not powerful enough. But I think you have taken a different

Re: Serenity web framework - early feedback wanted

2010-12-31 Thread Robert Clipsham
On 30/12/10 14:01, Lutger Blijdestijn wrote: Very interesting project, will you commit to D1 or consider supporting D2 in the future? I'm not committed, and there is always the possibility of moving to D2 later on. For a small portion of my reasoning as to why I'm not using it at the moment,

D for game development

2010-12-31 Thread Andrei Alexandrescu
A discussion to which I think some of us could add value: http://stackoverflow.com/questions/4516283/the-d-programming-language-for-game-development Andrei

const - Best practices

2010-12-31 Thread Peter Alexander
Ok, so while I'm still not 100% satisfied with the lack of logical const in D, I'm willing to see how far I can get without bitwise const without going crazy, and I just want to clarify some things. Andrei has commented a couple of times on the fact that D's const has more guarantees than C++'

Re: Please comment on http://d-programming-language.org/

2010-12-31 Thread Matthias Pleh
BTW: > Am 2010-09-02 14:46, schrieb retard: >> We need a more professional looking SVG version of the D man then! ... there is already a SVG logo for the D-man since 5 years, but obviousily it get not adopted :/ http://w148.de/~mmartin/d/logo.html Looks good. May I use it on d-programming-la

Re: Happy New Year!!!

2010-12-31 Thread Andrei Alexandrescu
On 12/31/10 11:00 AM, Guilherme Vieira wrote: On Fri, Dec 31, 2010 at 2:43 PM, Stanislav Blinov mailto:stanislav.bli...@gmail.com>> wrote: Somebody's already celebrating, somebody's only anticipating, but regardless HAPPY NEW YEAR, EVERYONE!!! HAPPY NEW YEAR, D!!! Happy new year f

Re: Less commas

2010-12-31 Thread Walter Bright
bearophile wrote: I think they are confusing, and may hide bugs. This is, again, an example of what I was talking about earlier. I've never, ever seen this as an issue in 30 years of programming. There are plenty of problems that actually adversely affect programs one can work on. We don't ne

Re: const - Best practices

2010-12-31 Thread Rob
"Peter Alexander" wrote in message news:ifl719$2hp...@digitalmars.com... > Ok, so while I'm still not 100% satisfied with the lack of logical > const in D, I'm willing to see how far I can get without bitwise const > without going crazy, and I just want to clarify some things. > > Andrei has c

Re: const - Best practices

2010-12-31 Thread Jimmy Cao
I'm wondering about this, too.

mangledName!(U) not working?

2010-12-31 Thread %u
Hi all, I'm trying the code below: class Temp { int field; pragma(msg, mangledName!(field)); } and getting this printed: "DummyS25_D4ntfs5types4Temp5fieldi" Obviously this isn't correct (the "Dummy" should've been removed)... so am I missing something, or is this a bug? I search

Re: mangledName!(U) not working?

2010-12-31 Thread Andrej Mitrovic
I think I've run into the same issue: www.mail-archive.com/digitalmars-d@puremagic.com/msg45256.html std.demangle will be updated in the next release, otherwise you have to use core.demangle for now. On 1/1/11, %u wrote: > Hi all, > > I'm trying the code below: > > class Temp > { > int fie

Re: Optimizing delegates

2010-12-31 Thread Walter Bright
loser wrote: It's only complex if you're an incompetent compiler writer. I can confirm that it is complex.

Re: Happy New Year!!!

2010-12-31 Thread Andrej Mitrovic
Happy New Year! On 12/31/10, Andrei Alexandrescu wrote: > On 12/31/10 11:00 AM, Guilherme Vieira wrote: >> On Fri, Dec 31, 2010 at 2:43 PM, Stanislav Blinov >> mailto:stanislav.bli...@gmail.com>> wrote: >> >> Somebody's already celebrating, somebody's only anticipating, but >> regardless

Re: Happy New Year!!!

2010-12-31 Thread Lutger Blijdestijn
Happy new year, best wishes to everyone and D!

A New Year's present for the community

2010-12-31 Thread Andrei Alexandrescu
I worked on this up until now: all TDPL examples are now available for download. http://erdani.com/tdpl/examples/ Download all.zip to get everything, or individual files sorted per chapter. The format is still rough (I plan to give better names to files so they're easily associated with page

A New Year's present for the community

2010-12-31 Thread Andrei Alexandrescu
I worked on this up until now: all TDPL examples are now available for download. http://erdani.com/tdpl/code/ Download all.zip to get everything, or individual files sorted per chapter. The format is still rough (I plan to give better names to files so they're easily associated with page numb

Re: A New Year's present for the community

2010-12-31 Thread Gour
On Fri, 31 Dec 2010 23:01:42 -0600 >> "Andrei" == Andrei Alexandrescu >> wrote: Andrei> I worked on this up until now: all TDPL examples are now Andrei> available for download. THANK YOU!! Andrei> Better yet, you will know and you can track which examples work Andrei> and which don't wi