[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 >>

Re: Properties don't work as expected

2016-07-05 Thread Leandro Motta Barros via Digitalmars-d-learn
D is being used productively by some companies, so I guess we can call it production-ready. This doesn't meant there are not rough corners. The language is being actively developed, and I see that some work is being done on those rough corners. However, keep in mind that: 1) Maybe what you

Re: blog.dlang.org

2016-06-21 Thread Leandro Motta Barros via Digitalmars-d-learn
Try http://dlang.org/blog/ But, indeed, I would expect blog.dlang.org to work... Cheers, LMB On Tue, Jun 21, 2016 at 6:47 PM, Christian Köstlin < digitalmars-d-learn@puremagic.com> wrote: > I just wanted to have a look at the new blog post about ldc, and entered > blog.dlang.org without

Re: OpenGL Setup?

2016-06-17 Thread Leandro Motta Barros via Digitalmars-d-learn
I have been using Textadept ( http://foicica.com/textadept/ ) with Textadept-d ( https://github.com/Hackerpilot/textadept-d ). I use mostly on Linux for development, but I've recently spent two or three days on Windows and things worked well enough for me. (Coming for someone who has used Emacs

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

Re: Coverage

2016-02-16 Thread Leandro Motta Barros via Digitalmars-d-learn
I had one case these days in which I also had a lot of data to use in the test. I was able to put the data as very large regular D arrays, but this increased my compilation times a lot (not to mention the time to run the unit tests). I decided to enclose this specific unit test (including the

Re: Coverage

2016-02-16 Thread Leandro Motta Barros via Digitalmars-d-learn
You probably already though of it, but: can't you create a unittest that calls your code as many times as desired, passing different input each time? LMB On Tue, Feb 16, 2016 at 10:16 AM, Sebastiaan Koppe via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > I currently run

Re: reggae v0.5.0: new features in the D meta-build system

2015-09-16 Thread Leandro Motta Barros via Digitalmars-d-announce
This link should work for everyone: http://code.dlang.org/packages/reggae (I never tried reggae. Maybe I should, it looks good.) LMB On Wed, Sep 16, 2015 at 11:07 AM, Atila Neves via Digitalmars-d-announce < digitalmars-d-announce@puremagic.com> wrote: >

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 fit that in

Re: Now official: we are livestreaming DConf 2015

2015-05-27 Thread Leandro Motta Barros via Digitalmars-d-announce
Thanks so much for doing this! Really nice to follow DConf in real time! LMB On Wed, May 27, 2015 at 4:01 PM, Andrei Alexandrescu via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: Thanks to John Colvin! He rigged his webcam centrally so we can livestream DConf 2015 in

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,

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 ~

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

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've given a

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 phobos.

Module-level attributes and unit tests

2014-08-23 Thread Leandro Motta Barros via Digitalmars-d-learn
Hello, I have a module which is completelly @nogc, and as such I'd like to just say @nogc: at the top of the file and be happy. However, my unit tests for this same module do some GC allocation, so the module fails to compile. Is there a way to disable @nogc for the unit tests only? Would

Re: Module-level attributes and unit tests

2014-08-23 Thread Leandro Motta Barros via Digitalmars-d-learn
Thanks, this was helpful! LMB On Sat, Aug 23, 2014 at 1:22 PM, monarch_dodra via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Saturday, 23 August 2014 at 15:26:02 UTC, Leandro Motta Barros via Digitalmars-d-learn wrote: Hello, I have a module which is completelly

Re: pointer array?

2014-07-30 Thread Leandro Motta Barros via Digitalmars-d-learn
Justin's answers seems correct to me, and I don't know anything about your specific use case, but I cannot resist to add: Think twice before doing this kind of things. I know that sometimes this is necessary or handy, but one of the great things about D is that it provides so many higher-level

Re: pointer array?

2014-07-30 Thread Leandro Motta Barros via Digitalmars-d-learn
Can't you call it directly? extern(C) { int add (int a, int b)'; } // ... auto ret = add(123, 456); LMB On Wed, Jul 30, 2014 at 2:55 PM, seany via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Can you post the signatures of some of the C functions you're trying to

Re: Any GPL video games in D2

2014-06-25 Thread Leandro Motta Barros via Digitalmars-d-learn
Hi, Some time ago I wrote this Tetris-like game: https://bitbucket.org/lmb/anytris (also on GitHub: https://github.com/lmbarros/Anytris) Nothing fancy. I am sure there are better examples out there. And maybe this is not the best code to show to students ;-) Also, license is ZLib -- I assume it