[OT] Re: Card on fire

2016-07-12 Thread Leandro Motta Barros via Digitalmars-d
https://en.wikipedia.org/wiki/Magic_smoke On Tue, Jul 12, 2016 at 3:42 PM, deadalnix via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Tuesday, 12 July 2016 at 12:17:00 UTC, Steven Schveighoffer wrote: > >> I seriously doubt a fan would stop an electrical fire (in fact, probably >> mak

Re: Normal distribution

2016-02-20 Thread Leandro Motta Barros via Digitalmars-d
Maybe not good quality, but I like this one for my ludic purposes: https://github.com/lmbarros/sbxs_dlang/blob/master/src/sbxs/rand/rng.d#L283 It is an implementation of an approximation algorithm that used to be described here: http://home.online.no/~pjacklam/notes/invnorm/ But appears to

Re: Lost & found: laser pen

2015-06-18 Thread Leandro Motta Barros via Digitalmars-d
On Thu, Jun 18, 2015 at 5:13 PM, Jacob Carlborg via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On 17/06/15 21:02, Walter Bright wrote: > > If it looks like this, it's mine. >> >> >> http://www.independent.co.uk/incoming/article8435194.ece/alternates/w620/Goldfinger.jpg >> >> > Can you

Re: std.allocator: nomenclature needed

2015-05-15 Thread Leandro Motta Barros via Digitalmars-d
Not a naming suggestion, but a suggestion for a guideline on how to chose names: make it simpler for most users. If we still want one million users: 1. Most of them will never bother with std.allocator (by which I don't mean it is not necessary!) 2. Of those relatively few using std.allocator, mo

Re: Let's improve D's exceptions

2015-05-13 Thread Leandro Motta Barros via Digitalmars-d
I didn't give much attention to the details. but I like the spirit very much. LMB On Wed, May 13, 2015 at 12:08 PM, Adam D. Ruppe via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > Have you ever done: > > if(something) { >import std.conv; >throw new Exception("some error " ~ to!s

Re: A few notes on choosing between Go and D for a quick project

2015-03-13 Thread Leandro Motta Barros via Digitalmars-d
I've not being following this list too closely, so forgive me if this has been discussed before. Here's a simple suggestion that maybe could improve D docs a bit. Perhaps, psychologically, the worst about the docs is that the function signature is used as a kind of section title. What about just r

Re: Community and contribution [was: Re: http://wiki.dlang.org/DIP25]

2015-01-02 Thread Leandro Motta Barros via Digitalmars-d
On Fri, Jan 2, 2015 at 7:26 AM, Andrei Alexandrescu via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On 1/1/15 10:45 AM, Joseph Rushton Wakeling via Digitalmars-d wrote: > >> On 29/12/14 05:13, Andrei Alexandrescu via Digitalmars-d wrote: >> >>> I did want to say something about this. I'v

Re: RFC: std.concepts

2014-10-20 Thread Leandro Motta Barros via Digitalmars-d
Looks very nice! I think I could make use of it. (Though I use D only recreationally :-) ) LMB On Sun, Oct 19, 2014 at 7:10 PM, Shammah Chancellor via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > It was request that I create a NG thread about a module I was hoping to > merge with phobo

Re: Cumulative

2014-02-26 Thread Leandro Motta Barros
Hello, I'm coming late to the discussion, but I believe that you can use the following idiom to achieve the same results in a different way: class C { // This is not overridable public final void doStuff() { doSomethingWhichNeverChanges(); doExtraStuff(); } protected v

Re: package.d behavior

2014-01-27 Thread Leandro Motta Barros
On Fri, Jan 24, 2014 at 12:45 AM, Jesse Phillips < jesse.k.phillip...@gmail.com> wrote: > [...] > You should probably file a bug. I think this change should be valid (it > sounds like it wouldn't work, but didn't test) > There it is: https://d.puremagic.com/issues/show_bug.cgi?id=12014 LMB

Re: package.d behavior

2014-01-23 Thread Leandro Motta Barros
e been ignored given some forum issues last week -- when it appeared, it was already buried under several more recent messages. On Sat, Jan 18, 2014 at 10:32 AM, Leandro Motta Barros wrote: > Hello! > > About a month ago I asked in D.learn about the expected behavior of the > ne

package.d behavior

2014-01-19 Thread Leandro Motta Barros
Hello! About a month ago I asked in D.learn about the expected behavior of the new package.d feature [1]. I got a cuple of responses, but not really answers. Today I noticed a second post [2] with similar but still unanswered questions. So it seemed like a good idea to bring the discussion to the

Re: Singletons, alias this and DMD crashing

2013-05-09 Thread Leandro Motta Barros
Thanks for the comment! I noticed this wouldn't compile, though I haven't really wondered why so. My email was more about the compiler bug than about using alias this with singletons. Anyway, while trying to circumvent the compiler bug, I did this: import std.stdio; class SImpl { void foo()

Singletons, alias this and DMD crashing

2013-05-08 Thread Leandro Motta Barros
Hello, I was toying with the idea of adding an 'alias instance this' to a low-lock singleton, to allow calling MySingleton.method(), instead of MySingleton.instance.method(). When I tried this, however, DMD 2.062 crashed. Under Linux, after chewing the code for a long time, it exits with "Error:

Re: D rawkz! -- custom writefln formats

2013-01-17 Thread Leandro Motta Barros
*Great!* Thanks for posting this! I think it will be much easier to get a critical mass of enthusiastic D developers if we have some sort of "Effective D" (like Scott Meyer's "Effective C++") book/conf presentations/wiki page/whatever. This kind of stuff would fit in the "talk proposal for someon

Talk proposal (kinda): D Programming in D (Or: Writing idiomatic D code)

2012-11-21 Thread Leandro Motta Barros
Hello everyone! Well, this is actually a "talk proposal for someone else". I'd be the audience, not the speaker. TITLE: D Programming in D (Or: Writing idiomatic D code) ABSTRACT: Every language has its own sanctified idioms. Beginners learning a new language tend to use the idioms of the langua