Re: Here's looking at you, kid
On Friday, 20 November 2015 at 11:44:02 UTC, Chris wrote: On Friday, 20 November 2015 at 08:51:13 UTC, Warwick wrote: But keep burying you heads in the ground. Would you bother to define "beginners"? The getting started page says.. "absolute begginners" and IIRC "does not assume any prior programming experience". Or something like that. It's not my definition.
Re: Here's looking at you, kid
On Friday, 20 November 2015 at 01:28:00 UTC, rsw0x wrote: On Friday, 20 November 2015 at 00:47:17 UTC, Warwick wrote: On Thursday, 19 November 2015 at 12:28:44 UTC, Andrei Alexandrescu wrote: On 11/18/2015 11:02 PM, Saurabh Das wrote: [...] Generally a language reference is not good for learning a language. -- Andrei IE. There's nothing on the D website that is "good for learning" D. There's an offsite tutorial aimed at "absolute begginers". ing great set of options aint it. Ali's book is not a tutorial or aimed at absolute beginners, it's /the/ material for learning D and in my opinion a great reference book. It says on the website and I quote... "a great starting point for absolute beginners" But the fundamental problem and what everyone seems to be refusing to acknowledge is that in spite of what *you think people should be doing* many visitors are ending up using language reference to learn D. Or they use that reference to get their first impressions. It's like going to a restaurant and being given the recipes instead of the menu. But keep burying you heads in the ground.
Re: Here's looking at you, kid
On Thursday, 19 November 2015 at 12:28:44 UTC, Andrei Alexandrescu wrote: On 11/18/2015 11:02 PM, Saurabh Das wrote: On Thursday, 19 November 2015 at 02:22:14 UTC, Jeremy DeHaan It is a decent reference for you because you understand it. For programmers who aren't as experienced / knowledgeable as you, it's looks like gibberish. We have to put ourselves in the shoes of those who are just getting into the language / less experienced and thus reduce the level of difficulty in the documentation. ie: Make it more verbose, less technical, friendlier. Generally a language reference is not good for learning a language. -- Andrei IE. There's nothing on the D website that is "good for learning" D. There's an offsite tutorial aimed at "absolute begginers". ing great set of options aint it.
Re: Here's looking at you, kid
On Sunday, 15 November 2015 at 14:27:50 UTC, Jonathan M Davis wrote: On Sunday, 15 November 2015 at 13:50:36 UTC, Warwick wrote: Who is that a reference for? I mean what user needs that information in that format? Sure if your actually writing a D compiler yourself that is probably useful... but if your a user? Honestly, I do think that that's useful as a user, but I'm also familiar with how a compiler works and tend to look at a language form a very technical perspective, whereas many others tend to try and figure out the bare minimum to get stuff done and don't care much about the details. Funilly enough that's exactly how it comes over... as a reference written for experienced D users or compiler guys. The average user / programmer coming from another language? Where's the reference for them?
Re: Here's looking at you, kid
On Sunday, 15 November 2015 at 11:46:54 UTC, Saurabh Das wrote: On Friday, 13 November 2015 at 22:34:18 UTC, Andrei Alexandrescu wrote: Hi everyone, Recently there's been an uptick of site visits on dlang.org and also dmd downloads (http://erdani.com/d/downloads.daily.png). Amid increased scrutiny it's important to focus on improving documentation. I suggest everyone in the community to consider improving dlang.org in any way. For Phobos in particular, the lack of documentation and examples for some really useful artifacts is damaging. Sometimes all it takes is adding "///" to one unittest. Thanks, Andrei This is slightly off-topic, but: I've been encouraging my friends and colleagues to use Dlang over the last year and the one pain point they constantly tell me about is that the documentation website is "difficult to use" and "looks intimidating". The problem is you click on "Language Reference" and what you actually get is a "Language Specification". For example you click on "Modules" and you get this... = Module: ModuleDeclaration DeclDefs DeclDefs DeclDefs: DeclDef DeclDef DeclDefs DeclDef: AttributeSpecifier Declaration Constructor Destructor Postblit Allocator Deallocator Invariant UnitTest AliasThis StaticConstructor StaticDestructor SharedStaticConstructor SharedStaticDestructor ConditionalDeclaration DebugSpecification VersionSpecification StaticAssert TemplateDeclaration TemplateMixinDeclaration TemplateMixin MixinDeclaration ; === Who is that a reference for? I mean what user needs that information in that format? Sure if your actually writing a D compiler yourself that is probably useful... but if your a user?
Re: -> and :: operators
On Sunday, 11 October 2015 at 13:50:18 UTC, Idan Arye wrote: On Sunday, 11 October 2015 at 13:05:41 UTC, Warwick wrote: On Sunday, 11 October 2015 at 09:43:04 UTC, Idan Arye wrote: On Friday, 9 October 2015 at 19:48:39 UTC, Dmitry Olshansky wrote: At the risk of sounding like a broken record the Delphi variant of Object Pascal started doing that some time around Delphi 4 or Delphi 5 IIRC. (So mid to late 90s). IE. You accessed members with the dot operator whether it was an object (like D Delphi's objects are heap based / reference semantics), a struct, or a pointer to a struct. You should have elaborated then. The other guys talked about the invention of reference types, so I assumed you did as well. Sorry I've been on pills to prevent premature elaboration. :-)
Re: -> and :: operators
On Sunday, 11 October 2015 at 09:43:04 UTC, Idan Arye wrote: On Friday, 9 October 2015 at 19:48:39 UTC, Dmitry Olshansky wrote: This is the innovation in D(regarding this issue) - that on struct types, the same operator is used for BOTH the value type and the pointer to it. At the risk of sounding like a broken record the Delphi variant of Object Pascal started doing that some time around Delphi 4 or Delphi 5 IIRC. (So mid to late 90s). IE. You accessed members with the dot operator whether it was an object (like D Delphi's objects are heap based / reference semantics), a struct, or a pointer to a struct.
Re: -> and :: operators
On Friday, 9 October 2015 at 19:48:39 UTC, Dmitry Olshansky wrote: On 09-Oct-2015 21:44, Freddy wrote: Stole from D? You mean java right? There is no value type objects in Java so no. More likely C#. Delphi / Object Pascal had it in the mid 90s IIRC. Long before C#, and possibly before Java was released.
Re: Casting double to ulong weirdness
On Tuesday, 25 August 2015 at 20:00:11 UTC, bachmeier wrote: On Tuesday, 25 August 2015 at 18:15:03 UTC, Ola Fosheim Grøstad wrote: I'm pretty sure Walter has stated the reason that you cannot count on exact precision, but I don't remember what it is. Probably because DMD is spewing out x87 code. The x87 FPU converts everything to its internal working bit depth before it does the math op. You can set it to work at different bit depths but IIRC it's a fairly expensive operation to change the FPU flags. You really dont want to be doing it every time some mixes a double and a float. The compilers that dont exhibit this problem might set the x87 to work at 64 bit at startup or more likely they are using scalar SSE. You cant mix different depth operands in SSE. You cant multiply a float by double for example, you have to convert one of them so they have the same type. So in SSE the bit depth of every op is always explicit.
Re: Casting double to ulong weirdness
On Monday, 24 August 2015 at 18:16:44 UTC, Justin Whear wrote: On Mon, 24 Aug 2015 18:06:07 +, rumbu wrote: BTW, 1.2 and 12.0 are directly representable as double In C++: printf("%.20f\r\n", 1.2); printf("%.20f\r\n", 12.0); will output: 1.2000 12. Either upcasting to real is the wrong decision here, either the writeln string conversion is wrong. No it's not, this must be some sort of constant-folding or precision increase. Maybe the constant folding is using a different rounding mode to the runtime?