Re: checkedint call removal

2014-07-31 Thread John Colvin via Digitalmars-d
On Thursday, 31 July 2014 at 08:23:44 UTC, Daniel Murphy wrote: "Daniel Murphy" wrote in message news:lrct2d$1me8$1...@digitalmars.com... > Wait, what? I thought the whole point of enforce is that it > will *not* > be removed by the compiler, no matter what? No, the compiler is free to remo

Re: checkedint call removal

2014-07-31 Thread John Colvin via Digitalmars-d
On Wednesday, 30 July 2014 at 18:23:06 UTC, Daniel Murphy wrote: "John Colvin" wrote in message news:oyzjykmvgzdzkprzu...@forum.dlang.org... > Don't use -release. haha yeah, or that! debug enforce(...) would also work just fine. It depends if you're happy with

Re: assume, assert, enforce, @safe

2014-07-31 Thread John Colvin via Digitalmars-d
On Thursday, 31 July 2014 at 07:47:51 UTC, Walter Bright wrote: On 7/30/2014 4:51 PM, Tobias Müller wrote: With relatively 'dumb' compilers, this is not a big problem, but optimizers are more and more clever and will take profit of such assumptions if they can. If D wishes to be competitive,

Re: checkedint call removal

2014-07-30 Thread John Colvin via Digitalmars-d
On Wednesday, 30 July 2014 at 16:43:47 UTC, Daniel Murphy wrote: "John Colvin" wrote in message news:mmnpehpddzkduycyd...@forum.dlang.org... So what is the recommended way of inserting a check of the sort that Ola would like? debug enforce(expr); perhaps? Seeing as that st

Re: checkedint call removal

2014-07-30 Thread John Colvin via Digitalmars-d
On Wednesday, 30 July 2014 at 15:49:33 UTC, Daniel Murphy wrote: "Tofu Ninja" wrote in message news:dtjqnyucskwnqjvks...@forum.dlang.org... Question? If an if condition throws or returns in its body is it ok for the optimizer to 'assume' that the condition is false after and make optimizati

Re: checkedint call removal

2014-07-30 Thread John Colvin via Digitalmars-d
On Wednesday, 30 July 2014 at 16:25:41 UTC, John Colvin wrote: On Wednesday, 30 July 2014 at 15:49:33 UTC, Daniel Murphy wrote: "Tofu Ninja" wrote in message news:dtjqnyucskwnqjvks...@forum.dlang.org... Question? If an if condition throws or returns in its body is it ok for the

Re: checkedint call removal

2014-07-30 Thread John Colvin via Digitalmars-d
On Wednesday, 30 July 2014 at 15:12:58 UTC, Ary Borenszweig wrote: On 7/30/14, 11:44 AM, Daniel Murphy wrote: "Ary Borenszweig" wrote in message news:lravtd$2siq$1...@digitalmars.com... Now, if you compile in release mode, according to Walter, all the "asserts" are gone (which, as a side not

Re: checkedint call removal

2014-07-29 Thread John Colvin via Digitalmars-d
On Tuesday, 29 July 2014 at 10:13:45 UTC, Dicebot wrote: This is one of problems. When writing library function you don't exactly know if input is going to be user input. Use enforces - and it won't be possible to optimize away redundant checks. Use assertions and issue may slip uncaught. I h

Re: checkedint call removal

2014-07-29 Thread John Colvin via Digitalmars-d
On Tuesday, 29 July 2014 at 09:40:27 UTC, Marc Schütz wrote: On Monday, 28 July 2014 at 15:52:23 UTC, John Colvin wrote: On Monday, 28 July 2014 at 15:20:44 UTC, Ola Fosheim Grøstad wrote: If asserts were used as optimization constraints all available code is fair game as optimisation

Re: Setting array length to 0 discards reserved allocation?

2014-07-29 Thread John Colvin via Digitalmars-d
On Tuesday, 29 July 2014 at 07:46:34 UTC, Andrew Godfrey wrote: On Sunday, 27 July 2014 at 05:51:46 UTC, Jakob Ovrum wrote: On Saturday, 26 July 2014 at 23:06:02 UTC, Andrew Godfrey wrote: Thereafter can come sub-slice examples and so on. Does this make sense? Yes, the reference documentation

Re: Voting: std.logger

2014-07-29 Thread John Colvin via Digitalmars-d
On Tuesday, 29 July 2014 at 05:11:33 UTC, Dicebot wrote: 1) Yes / No for inclusion into std.experimental Yes. It's ready for an official stamp. 2) Yes / No for inclusion into Phobos in its current state No. Full advantage should be taken of the std.experimental time. 3) If you have answer

Re: checkedint call removal

2014-07-28 Thread John Colvin via Digitalmars-d
On Monday, 28 July 2014 at 15:52:23 UTC, John Colvin wrote: On Monday, 28 July 2014 at 15:20:44 UTC, Ola Fosheim Grøstad wrote: If asserts were used as optimization constraints all available code is fair game as optimisation constraints. What you are asking for is a special case for `assert

Re: checkedint call removal

2014-07-28 Thread John Colvin via Digitalmars-d
On Monday, 28 July 2014 at 15:20:44 UTC, Ola Fosheim Grøstad wrote: If asserts were used as optimization constraints all available code is fair game as optimisation constraints. What you are asking for is a special case for `assert` such that the optimiser is blind to it. bool foo(int a) {

Re: checkedint call removal

2014-07-28 Thread John Colvin via Digitalmars-d
On Monday, 28 July 2014 at 12:52:07 UTC, John Colvin wrote: On Monday, 28 July 2014 at 12:08:39 UTC, Daniel Murphy wrote: "John Colvin" wrote in message news:iguetbdxlyilavliz...@forum.dlang.org... To what extent can a compiler use assertions? Can it work backwards from an assert

Re: checkedint call removal

2014-07-28 Thread John Colvin via Digitalmars-d
On Monday, 28 July 2014 at 12:08:39 UTC, Daniel Murphy wrote: "John Colvin" wrote in message news:iguetbdxlyilavliz...@forum.dlang.org... To what extent can a compiler use assertions? Can it work backwards from an assert to affect previous code? void foo(int a) { enf

Re: What Programming Book Should I Read Next?

2014-07-28 Thread John Colvin via Digitalmars-d
On Monday, 28 July 2014 at 11:32:15 UTC, Kagamin wrote: On Monday, 28 July 2014 at 07:42:39 UTC, Peter Alexander wrote: I suppose it depends on what "related to programming" means. I presume you, like everyone else, could not write a general purpose AI, so we all still have that to learn. Why

Re: checkedint call removal

2014-07-28 Thread John Colvin via Digitalmars-d
On Sunday, 27 July 2014 at 20:20:54 UTC, Walter Bright wrote: On 7/27/2014 6:52 AM, bearophile wrote: A possible piece of the solution is the recently suggested __trait(valueRange, exp), but alone that's not enough. Instead of adding more language features, purpose existing ones: assert(

Re: What Programming Book Should I Read Next?

2014-07-28 Thread John Colvin via Digitalmars-d
On Saturday, 26 July 2014 at 23:42:33 UTC, Adam D. Ruppe wrote: On the topic of professional growth, I was asked this week in a work meeting what I think I can do for mine and I didn't really have an answer. Maybe this is arrogant or whatever, but my view is that I'm kinda maxed out as a

Re: Open source Windows debugger

2014-07-27 Thread John Colvin via Digitalmars-d
On Sunday, 27 July 2014 at 20:39:53 UTC, Vladimir Panteleev wrote: On Sunday, 27 July 2014 at 19:07:14 UTC, Walter Bright wrote: http://x64dbg.com/#start Anyone want to give this a whirl? It looks like an open-source clone of OllyDbg. Looking at the advertised features, it seems to be aimed

Re: checkedint call removal

2014-07-27 Thread John Colvin via Digitalmars-d
On Sunday, 27 July 2014 at 20:20:54 UTC, Walter Bright wrote: On 7/27/2014 6:52 AM, bearophile wrote: A possible piece of the solution is the recently suggested __trait(valueRange, exp), but alone that's not enough. Instead of adding more language features, purpose existing ones: assert(

Re: Template argument deduction and default args

2014-07-24 Thread John Colvin via Digitalmars-d
On Thursday, 24 July 2014 at 11:39:13 UTC, Manu via Digitalmars-d wrote: On 24 July 2014 21:30, Manu wrote: On 24 July 2014 21:25, Manu wrote: On 24 July 2014 19:37, John Colvin via Digitalmars-d < digitalmars-d@puremagic.com> wrote: On Thursday, 24 July 2014 at 04:53:41 UTC, Ma

Re: Template argument deduction and default args

2014-07-24 Thread John Colvin via Digitalmars-d
On Thursday, 24 July 2014 at 11:25:28 UTC, Manu via Digitalmars-d wrote: On 24 July 2014 19:37, John Colvin via Digitalmars-d < digitalmars-d@puremagic.com> wrote: On Thursday, 24 July 2014 at 04:53:41 UTC, Manu via Digitalmars-d wrote: I'm running into consistent problems with d

Re: Template argument deduction and default args

2014-07-24 Thread John Colvin via Digitalmars-d
On Thursday, 24 July 2014 at 04:53:41 UTC, Manu via Digitalmars-d wrote: I'm running into consistent problems with default args and argument deduction in templates. There seem to be 2 consistent classes of problem: struct S(size_t len = 10) { ubyte[len] data; } S!100 x; // this works fine S

Re: WAT: opCmp and opEquals woes

2014-07-23 Thread John Colvin via Digitalmars-d
On Wednesday, 23 July 2014 at 18:53:57 UTC, H. S. Teoh via Digitalmars-d wrote: However, surely all orderable types are equality-comparable! just because 2 objects don't have a defined ordering between them doesn't mean they are equal in a more general sense. Yes it's a gotcha but I think it

Re: Java compilation [was GCs in the news]

2014-07-23 Thread John Colvin via Digitalmars-d
On Wednesday, 23 July 2014 at 08:46:32 UTC, Russel Winder via Digitalmars-d wrote: On Tue, 2014-07-22 at 10:55 +, Paulo Pinto via Digitalmars-d wrote: […] The JVM JIT was originally targeted to SELF, not Java. I think you'll find HotSpot evolved from a Smalltalk JIT originally. Borland

Re: Passing static array to C variadic function

2014-07-22 Thread John Colvin via Digitalmars-d
On Tuesday, 22 July 2014 at 13:28:27 UTC, Daniel Gibson wrote: Am 22.07.2014 11:01, schrieb Daniel Murphy: Old D code (from the 32-bit only days) used to do this successfully: printf("Hello %.*s\n", "segfault"); So it relied on both the length and pointer being passed. Unfortunately this

Re: Passing static array to C variadic function

2014-07-21 Thread John Colvin via Digitalmars-d
On Sunday, 20 July 2014 at 16:00:41 UTC, Daniel Gibson wrote: Hi, I have a C variadic function (passed from C code into my D code via function pointer) that I need to call with a static array. So according to the D documentation, static arrays are passed by value in D2 and by reference in C a

Re: [OT] Uploading DConf videos

2014-07-19 Thread John Colvin via Digitalmars-d
On Thursday, 17 July 2014 at 18:54:18 UTC, Andrei Alexandrescu wrote: I'm not an expert in videos but as I mentioned I've studied a few options last year before deciding to use archive.org as our reference upload site. I got curious just now, so I just uploaded two screenshots: http://i.imgur

Re: Integer overflow and underflow semantics?

2014-07-18 Thread John Colvin via Digitalmars-d
On Friday, 18 July 2014 at 08:49:43 UTC, Walter Bright wrote: On 7/17/2014 4:56 AM, David Nadlinger wrote: Oh dear, you'd be in for a very nasty surprise if you relied on this. ;) When I wrote that part of the spec, it was long before these sorts of optimizations appeared, and it never occurr

Re: Encouraging memory efficiency

2014-07-18 Thread John Colvin via Digitalmars-d
On Thursday, 17 July 2014 at 16:28:00 UTC, Tero wrote: Just watched Don's DConf 2014 talk where he said D has to be ruthless about memory inefficiency. Here's one thing that I think could help avoid unnecessary garbage: built-in syntax for this: import core.stdc.stdlib : alloca; ubyte[] buffer

Re: DIP62: Volatile type qualifier for unoptimizable variables in embedded programming

2014-07-17 Thread John Colvin via Digitalmars-d
On Thursday, 17 July 2014 at 19:56:23 UTC, Johannes Pfau wrote: Am Thu, 17 Jul 2014 11:43:04 -0700 schrieb Andrei Alexandrescu : On 7/17/14, 9:06 AM, John Colvin wrote: > On Thursday, 17 July 2014 at 15:58:05 UTC, Andrei > Alexandrescu > wrote: >> I think an approach based on

Re: DIP62: Volatile type qualifier for unoptimizable variables in embedded programming

2014-07-17 Thread John Colvin via Digitalmars-d
On Thursday, 17 July 2014 at 15:58:05 UTC, Andrei Alexandrescu wrote: I think an approach based on functions peek/poke is a lot more promising. D programs must define sequences of std calls anyway, otherwise even the simplest programs that use writeln("What's your name?") followed by a readln()

Re: Integer overflow and underflow semantics?

2014-07-17 Thread John Colvin via Digitalmars-d
On Wednesday, 16 July 2014 at 21:26:41 UTC, Gary Willoughby wrote: This was asked a few years ago and i could find a definitive answer. http://forum.dlang.org/thread/jo2c0a$31hh$1...@digitalmars.com On Saturday, 5 May 2012 at 04:57:48 UTC, Alex Rønne Petersen wrote: I don't think the language

Re: LinkedIn Article to be: Why you need to start moving off C/C++ to D, now.

2014-07-15 Thread John Colvin via Digitalmars-d
On Tuesday, 15 July 2014 at 21:13:22 UTC, Paulo Pinto wrote: Am 15.07.2014 22:58, schrieb deadalnix: On Tuesday, 15 July 2014 at 20:03:15 UTC, Chris wrote: From the link above: "It’s a common but false belief that reference counting (using shared pointers in particular) is better than garbage

Re: LinkedIn Article to be: Why you need to start moving off C/C++ to D, now.

2014-07-15 Thread John Colvin via Digitalmars-d
On Tuesday, 15 July 2014 at 20:03:15 UTC, Chris wrote: On Monday, 14 July 2014 at 23:43:57 UTC, H. S. Teoh via Digitalmars-d wrote: On Mon, Jul 14, 2014 at 11:22:53PM +, John Carter via Digitalmars-d wrote: [...] Any other good blog posts / social media comments / pointers I can digest an

Re: The Comma Operator's Deprecation Can't Come Soon Enough

2014-07-15 Thread John Colvin via Digitalmars-d
On Tuesday, 15 July 2014 at 18:08:15 UTC, Martin Krejcirik wrote: Example? For loop with multiple variables and various one liners of questionable utility aside: import std.stdio; bool funk() { static int count; return ++count > 1 ? true : false; } void main() { bool flag = f

Re: Random points from a D n00b CTO

2014-07-15 Thread John Colvin via Digitalmars-d
On Tuesday, 15 July 2014 at 17:13:46 UTC, Kagamin wrote: On Monday, 14 July 2014 at 14:19:49 UTC, John Colvin wrote: However, I would say that it is not recommended. Very large heaps aren't conducive to good GC performance (especially with D's current GC). I now use a hybrid approach

Re: The Comma Operator's Deprecation Can't Come Soon Enough

2014-07-15 Thread John Colvin via Digitalmars-d
On Tuesday, 15 July 2014 at 16:45:02 UTC, Jane Doe wrote: On Tuesday, 15 July 2014 at 16:16:19 UTC, Andrej Mitrovic via Digitalmars-d wrote: On 7/15/14, Frustrated via Digitalmars-d wrote: On Tuesday, 15 July 2014 at 08:01:40 UTC, Meta wrote: The 2nd "argument" to typeof makes no sense. It sho

Re: File extension of c++ files used on d compiler sources

2014-07-15 Thread John Colvin via Digitalmars-d
On Monday, 14 July 2014 at 23:14:52 UTC, Domingo Alvarez Duarte wrote: Hello ! I'm starting to look at the d compiler sources and I'm using netbeans to navigate through the sources, netbeans is very good at showing warnings/errors with it's own internal parser, but because all the c++ source

Re: How can I dump an expression into log and execute it

2014-07-14 Thread John Colvin via Digitalmars-d
On Monday, 14 July 2014 at 16:46:08 UTC, Dicebot wrote: On Monday, 14 July 2014 at 16:10:54 UTC, Ary Borenszweig wrote: Making macros look like regular function calls, that you might not like. For me, it makes the code more readable. Instead of this: class Foo mixin(property :foo) end Or th

Re: Random points from a D n00b CTO

2014-07-14 Thread John Colvin via Digitalmars-d
On Monday, 14 July 2014 at 14:09:02 UTC, bearophile wrote: Vic: Xeon CPU lets you use 128Gig, 386 gig, 512 gig, etc. It has become cheap to do that. I need a system programing lang to do that better. Perhaps the D GC was never tested with such amounts of RAM (and generally in D what is not

Re: Opportunities for D

2014-07-11 Thread John Colvin via Digitalmars-d
On Thursday, 10 July 2014 at 22:50:51 UTC, Walter Bright wrote: On 7/10/2014 1:52 PM, bearophile wrote: Walter Bright: I can't imagine users going to the bother of typing all that, let alone what happens when they do it wrong. Most users don't really have a good handle on what the lifetimes o

Re: Proposal for design of 'scope' (Was: Re: Opportunities for D)

2014-07-10 Thread John Colvin via Digitalmars-d
On Thursday, 10 July 2014 at 20:13:18 UTC, Marc Schütz wrote: On Thursday, 10 July 2014 at 20:10:38 UTC, Marc Schütz wrote: snip That's curious. I actually replied to H. S. Teoh in his new thread, but somehow it ended up here... You are in the new thread...

Re: Char.length

2014-07-10 Thread John Colvin via Digitalmars-d
On Thursday, 10 July 2014 at 17:01:45 UTC, Jane Doe wrote: One thing that bothers me quite a bit is that char's do not have length. This makes it difficult in templates that can take either strings or chars. While one can write a template that returns the length of a string or char, I would i

Re: Opportunities for D

2014-07-10 Thread John Colvin via Digitalmars-d
On Thursday, 10 July 2014 at 14:54:51 UTC, Dicebot wrote: E.g. https://github.com/D-Programming-Language/phobos/pull/1527 is some apparently work that's just sitting there abandoned. Hm, slightly OT: is it considered widely acceptable to take over such pull requests by reopening rebased one w

Re: Opportunities for D

2014-07-10 Thread John Colvin via Digitalmars-d
On Thursday, 10 July 2014 at 14:14:20 UTC, Dicebot wrote: On Thursday, 10 July 2014 at 14:09:41 UTC, John Colvin wrote: To be fair to Walter/Andrei, you need to be clear who your lieutenant is before you can delegate to them. Who has stepped up to take charge of concurrency in D? I think it

Re: Opportunities for D

2014-07-10 Thread John Colvin via Digitalmars-d
On Thursday, 10 July 2014 at 12:54:19 UTC, Dicebot wrote: On Thursday, 10 July 2014 at 12:13:03 UTC, bearophile wrote: Dicebot: I can't blame Sonke or anyone else for not wanting to waste his time on pushing more stuff upstream considering how miserable contribution experience is right now.

Re: Opportunities for D

2014-07-10 Thread John Colvin via Digitalmars-d
On Thursday, 10 July 2014 at 13:09:42 UTC, bearophile wrote: Dicebot: No one but Walter / Andrei can do anything about it. Right now we are in weird situation when they call for "lieutenants" but are not ready to abandon decision power. It can't possibly work that way. No amount of volunteer

Re: Bottom line re GC in D

2014-07-08 Thread John Colvin via Digitalmars-d
On Tuesday, 8 July 2014 at 11:31:49 UTC, Oluca wrote: On Tuesday, 8 July 2014 at 11:26:55 UTC, John Colvin wrote: On Tuesday, 8 July 2014 at 11:22:42 UTC, John Colvin wrote: On Tuesday, 8 July 2014 at 06:23:13 UTC, Jeremy DeHaan wrote: I remember that slices was one thing you would no longer

Re: Bottom line re GC in D

2014-07-08 Thread John Colvin via Digitalmars-d
On Tuesday, 8 July 2014 at 11:22:42 UTC, John Colvin wrote: On Tuesday, 8 July 2014 at 06:23:13 UTC, Jeremy DeHaan wrote: I remember that slices was one thing you would no longer have if you disable the GC, but I can't think of any others. You can definitely use slices without the G

Re: Bottom line re GC in D

2014-07-08 Thread John Colvin via Digitalmars-d
On Tuesday, 8 July 2014 at 10:25:17 UTC, Oluca wrote: On Tuesday, 8 July 2014 at 10:07:18 UTC, Tobias Pankrath wrote: On Tuesday, 8 July 2014 at 09:57:15 UTC, Oluca wrote: - No, it can't be disabled if you want to keep using "impressive features" of the language. What do CTFE, mixins, Ds pow

Re: Bottom line re GC in D

2014-07-08 Thread John Colvin via Digitalmars-d
On Tuesday, 8 July 2014 at 06:23:13 UTC, Jeremy DeHaan wrote: I remember that slices was one thing you would no longer have if you disable the GC, but I can't think of any others. You can definitely use slices without the GC and they are still awesome without the GC. What you cannot do is cre

Re: std.math performance (SSE vs. real)

2014-07-04 Thread John Colvin via Digitalmars-d
On Friday, 4 July 2014 at 17:05:16 UTC, Walter Bright wrote: On 7/4/2014 3:38 AM, Don wrote: What is "the longest type supported by the native hardware"? I don't know what that means, and I don't think it even makes sense. Most of the time, it is quite clear. For example, Sparc has 128-bit

Re: GDC/ARM: Help needed: Porting std.math.internal.gammafunction

2014-07-03 Thread John Colvin via Digitalmars-d
On Thursday, 3 July 2014 at 17:54:17 UTC, John Colvin wrote: On Thursday, 3 July 2014 at 15:35:35 UTC, Johannes Pfau wrote: Hi, std.math.internal.gammafunction is the last module with failing unittest on ARM, simply because it assumes that reals are always in x86 extended precision format

Re: GDC/ARM: Help needed: Porting std.math.internal.gammafunction

2014-07-03 Thread John Colvin via Digitalmars-d
On Thursday, 3 July 2014 at 15:35:35 UTC, Johannes Pfau wrote: Hi, std.math.internal.gammafunction is the last module with failing unittest on ARM, simply because it assumes that reals are always in x86 extended precision format which is obviously not true on ARM. I haven't got the required

Re: GDC/ARM: Help needed: Porting std.math.internal.gammafunction

2014-07-03 Thread John Colvin via Digitalmars-d
On Thursday, 3 July 2014 at 17:03:51 UTC, Johannes Pfau wrote: Am Thu, 03 Jul 2014 16:47:41 + schrieb "John Colvin" : testing the latest gdc release, writeln and friends are broken for 64bit reals. Use core.stdc.stdio.printf with %lf instead. Actually mixing code compiled w

Re: GDC/ARM: Help needed: Porting std.math.internal.gammafunction

2014-07-03 Thread John Colvin via Digitalmars-d
On Thursday, 3 July 2014 at 15:35:35 UTC, Johannes Pfau wrote: Hi, std.math.internal.gammafunction is the last module with failing unittest on ARM, simply because it assumes that reals are always in x86 extended precision format which is obviously not true on ARM. I haven't got the required

Re: Optimizing Java using D

2014-07-03 Thread John Colvin via Digitalmars-d
On Thursday, 3 July 2014 at 15:40:33 UTC, Wanderer wrote: On Thursday, 3 July 2014 at 11:30:57 UTC, Alix Pexton wrote: Saying that one is always more significant than the other is far too much of an oversimplification. I just thought, with the presence of structs in D, things are not that sim

Re: [OT] Intel for mobile

2014-07-02 Thread John Colvin via Digitalmars-d
On Wednesday, 2 July 2014 at 09:13:50 UTC, Chris wrote: Will Intel get into the mobile market in the next couple of years? I've heard that some mobile devices are now fitted with Intel processors. First tablets and now a Lenovo smartphone. I used to have an intel az210 phone. Terrible build qu

Re: std.math performance (SSE vs. real)

2014-06-30 Thread John Colvin via Digitalmars-d
On Monday, 30 June 2014 at 16:29:06 UTC, Element 126 wrote: On 06/29/2014 11:04 PM, John Colvin wrote: [...] mixin(`alias real` ~ (real.sizeof*8).stringof ~ ` = real;`); is more useful to me. Be careful : this code is tricky ! real.sizeof is the storage size, ie 16 bytes on x86_64. The

Re: std.math performance (SSE vs. real)

2014-06-29 Thread John Colvin via Digitalmars-d
On Sunday, 29 June 2014 at 19:22:16 UTC, Walter Bright wrote: On 6/29/2014 11:21 AM, Russel Winder via Digitalmars-d wrote: Because when reading the code you haven't got a f### clue how accurate the floating point number is until you ask and answer the question "and which processor are you

Re: std.math performance (SSE vs. real)

2014-06-28 Thread John Colvin via Digitalmars-d
On Saturday, 28 June 2014 at 14:01:13 UTC, Andrei Alexandrescu wrote: On 6/28/14, 3:42 AM, Walter Bright wrote: Inverting matrices is commonplace for solving N equations with N unknowns. Actually nobody does that. Also, one consideration is that the focus of numeric work changes with time;

Re: std.math performance (SSE vs. real)

2014-06-28 Thread John Colvin via Digitalmars-d
On Saturday, 28 June 2014 at 10:34:00 UTC, Russel Winder via Digitalmars-d wrote: So D should perhaps make a breaking change and have types int32, int64, float32, float64, float80, and get away from the vagaries of bizarre type relationships with hardware? `real`* is the only builtin numeri

Re: std.math performance (SSE vs. real)

2014-06-28 Thread John Colvin via Digitalmars-d
On Saturday, 28 June 2014 at 06:16:51 UTC, Walter Bright wrote: On 6/27/2014 10:18 PM, Walter Bright wrote: On 6/27/2014 4:10 AM, John Colvin wrote: *The number of algorithms that are both numerically stable/correct and benefit significantly from > 64bit doubles is very small. To be bl

Re: std.math performance (SSE vs. real)

2014-06-27 Thread John Colvin via Digitalmars-d
On Friday, 27 June 2014 at 13:04:31 UTC, dennis luehring wrote: Am 27.06.2014 14:20, schrieb Russel Winder via Digitalmars-d: On Fri, 2014-06-27 at 11:10 +, John Colvin via Digitalmars-d wrote: [
] I understand why the current situation exists. In 2000 x87 was the standard and the 80bit

Re: std.math performance (SSE vs. real)

2014-06-27 Thread John Colvin via Digitalmars-d
On Friday, 27 June 2014 at 10:51:05 UTC, Manu via Digitalmars-d wrote: On 27 June 2014 11:31, David Nadlinger via Digitalmars-d wrote: Hi all, right now, the use of std.math over core.stdc.math can cause a huge performance problem in typical floating point graphics code. An instance of this

Re: Is this a bug?

2014-06-26 Thread John Colvin via Digitalmars-d
On Thursday, 26 June 2014 at 12:38:40 UTC, John Colvin wrote: On Thursday, 26 June 2014 at 10:09:53 UTC, Rene Zwanenburg wrote: I /think/ this is a bug, but I'm not 100% sure. The following compiles without any problems, as it should: import std.typecons; alias Handle(T) = RefCount

Re: Is this a bug?

2014-06-26 Thread John Colvin via Digitalmars-d
On Thursday, 26 June 2014 at 10:09:53 UTC, Rene Zwanenburg wrote: I /think/ this is a bug, but I'm not 100% sure. The following compiles without any problems, as it should: import std.typecons; alias Handle(T) = RefCounted!(T, RefCountedAutoInitialize.no); auto initialized(T)() if(is(T == Ref

Re: Is void* compatible with function pointers?

2014-06-23 Thread John Colvin via Digitalmars-d
On Tuesday, 24 June 2014 at 04:24:51 UTC, deadalnix wrote: On Tuesday, 24 June 2014 at 01:41:13 UTC, Steven Schveighoffer wrote: This is because most CPUs consider the instructions as immutable. Even x86 do not provide any guarantee (which makes it very hard to swap implementation outside of a

Re: Druntime DMD/LDC/GDC architecture

2014-06-23 Thread John Colvin via Digitalmars-d
On Monday, 23 June 2014 at 18:09:46 UTC, Ilya Yaroshenko wrote: Hello all! very simple code: -- double[] a, c; ... c[] += a[]; -- The DMD version I can find in _arraySliceSliceAddass_d, https://github.com/D-Programming-Language/druntime/blob/master/src/rt/array

Re: A Perspective on D from game industry

2014-06-17 Thread John Colvin via Digitalmars-d
On Tuesday, 17 June 2014 at 13:52:48 UTC, Dicebot wrote: On Tuesday, 17 June 2014 at 13:36:48 UTC, John Colvin wrote: also, foreach that works outside of function scope would be awesome: mixin template A(TL ...) { foreach(i, T; TL) { mixin("T v" ~ i

Re: A Perspective on D from game industry

2014-06-17 Thread John Colvin via Digitalmars-d
On Tuesday, 17 June 2014 at 13:24:11 UTC, Dicebot wrote: On Tuesday, 17 June 2014 at 13:13:00 UTC, Artur Skawina via Digitalmars-d wrote: artur (who implemented both features last weekend; it started out as a fun "let's-see-how-D-would-look-if-it-had-this"-project, but after making them work an

Re: Is D production-ready?

2014-06-16 Thread John Colvin via Digitalmars-d
On Monday, 16 June 2014 at 10:24:46 UTC, John Petal wrote: I can't really see anything besides abandoned libraries written in D. Is it possible – for example – to write a simple 2D game, or an automation program, or a text editor in D? I know the language is perfectly capable, but I'm not sure

Re: A Perspective on D from game industry

2014-06-15 Thread John Colvin via Digitalmars-d
On Sunday, 15 June 2014 at 20:20:37 UTC, Brad Roberts via Digitalmars-d wrote: You'll likely toss me into the same boat as the post you're ranting about, but please, watch the misogynistic language here. Unnecessarily offensive in the context, yes, but reasonable people can and do disagree on

Re: Null pointer dereferencing in D

2014-06-14 Thread John Colvin via Digitalmars-d
On Saturday, 14 June 2014 at 14:51:10 UTC, Dicebot wrote: On Saturday, 14 June 2014 at 13:38:40 UTC, Maxim Fomin wrote: Which is effectively a type system hole with @disable this : struct A { @disable this(); } auto a = A.init; Why this is a type hole if initializer is explicitly provided? T

Re: Null pointer dereferencing in D

2014-06-14 Thread John Colvin via Digitalmars-d
On Saturday, 14 June 2014 at 15:22:07 UTC, Andrei Alexandrescu wrote: On 6/14/14, 5:33 AM, Dicebot wrote: On Saturday, 14 June 2014 at 10:15:49 UTC, Marc Schütz wrote: Huh? Types with `@disable this()` still have an `init` value. All it does is disallow instantiating the type without specifyin

Re: [OT] Extra time spent

2014-06-11 Thread John Colvin via Digitalmars-d
On Wednesday, 11 June 2014 at 07:30:41 UTC, Kagamin wrote: And last time I did an indie game (ages ago) I was very surprised how much difference I noticed (even on ordinary speakers) when encoding the music as 128kbps MP3, as opposed to 128kbps Vorbis and 320kbps MP3. I can only hear a differ

Re: [OT] Extra time spent

2014-06-09 Thread John Colvin via Digitalmars-d
On Monday, 9 June 2014 at 16:37:18 UTC, Nick Sabalausky wrote: On 6/8/2014 9:51 AM, Andrei Alexandrescu wrote: On 6/8/14, 10:46 AM, SomeDude wrote: You want in ear isolating earphones. Basically earplugs that play music. Since the ambiant noise is greatly reduced, you don't need to play loud

Re: SurveyMonkey for D users OS - Results

2014-06-07 Thread John Colvin via Digitalmars-d
On Saturday, 7 June 2014 at 09:53:52 UTC, Paulo Pinto wrote: Am 07.06.2014 11:47, schrieb Dicebot: On Saturday, 7 June 2014 at 04:34:06 UTC, Paulo Pinto wrote: Am 07.06.2014 01:38, schrieb Dicebot: On Friday, 6 June 2014 at 22:04:35 UTC, Paulo Pinto wrote: Bleeding edge distros have best h/w s

Re: Using up-to-date GDC [was Re: Swift is based LLVM,what will the D's LDC do?]

2014-06-05 Thread John Colvin via Digitalmars-d
On Thursday, 5 June 2014 at 11:35:23 UTC, Dicebot wrote: On Thursday, 5 June 2014 at 11:24:47 UTC, John Colvin wrote: On Thursday, 5 June 2014 at 06:50:04 UTC, Iain Buclaw via Digitalmars-d wrote: Don't quote me, but the only way distributions can ship DMD is via a script that does a dow

Re: Using up-to-date GDC [was Re: Swift is based LLVM,what will the D's LDC do?]

2014-06-05 Thread John Colvin via Digitalmars-d
On Thursday, 5 June 2014 at 12:45:06 UTC, John Colvin wrote: On Thursday, 5 June 2014 at 11:35:23 UTC, Dicebot wrote: On Thursday, 5 June 2014 at 11:24:47 UTC, John Colvin wrote: On Thursday, 5 June 2014 at 06:50:04 UTC, Iain Buclaw via Digitalmars-d wrote: Don't quote me, but the onl

Re: Using up-to-date GDC [was Re: Swift is based LLVM,what will the D's LDC do?]

2014-06-05 Thread John Colvin via Digitalmars-d
On Thursday, 5 June 2014 at 06:50:04 UTC, Iain Buclaw via Digitalmars-d wrote: Don't quote me, but the only way distributions can ship DMD is via a script that does a download from dlang.org, extract, install process (like eg: flashplayer). Unless I'm misunderstanding how the arch repositorie

Re: (git HEAD) std.datetime spewing deprecation messages

2014-06-04 Thread John Colvin via Digitalmars-d
On Wednesday, 4 June 2014 at 17:06:22 UTC, Meta wrote: On Wednesday, 4 June 2014 at 15:51:58 UTC, John Colvin wrote: Assuming hours, minutes and seconds are already declared, you can do this already TypeTuple!(hours, minutes, seconds) = dur.parts; A full working example of the syntax

Re: (git HEAD) std.datetime spewing deprecation messages

2014-06-04 Thread John Colvin via Digitalmars-d
On Wednesday, 4 June 2014 at 14:16:31 UTC, Meta wrote: On Wednesday, 4 June 2014 at 11:28:52 UTC, Kagamin wrote: Does one really needs only one component, but not the others? Maybe it should provide full computed broken form instead of separate components? auto d=dur.breakUp; d.hours; d.minut

Re: Performance

2014-06-03 Thread John Colvin via Digitalmars-d
On Tuesday, 3 June 2014 at 11:25:31 UTC, Marco Leise wrote: I don't want to believe that the OS has an effect on a loop that doesn't make any calls to the OS. There's always the scheduler, swap etc. Not that they should have any effect on *this* benchmark of course.

Re: [OT] Extra time spent

2014-06-02 Thread John Colvin via Digitalmars-d
On Monday, 2 June 2014 at 01:30:08 UTC, Adam D. Ruppe wrote: On Monday, 2 June 2014 at 00:26:31 UTC, Jonathan M Davis via Digitalmars-d wrote: I would have expected that the kinds of folks who would post here would be doing a fair bit with their computers in their free time (especially those wh

Re: Performance

2014-05-31 Thread John Colvin via Digitalmars-d
On Saturday, 31 May 2014 at 14:01:52 UTC, Andrei Alexandrescu wrote: On 5/30/14, 11:36 PM, Russel Winder via Digitalmars-d wrote: As well as the average (mean), you must provide standard deviation and degrees of freedom so that a proper error analysis and t-tests are feasible. Or put it another

Re: Hardware Traps for Integer Overflow

2014-05-30 Thread John Colvin via Digitalmars-d
On Friday, 30 May 2014 at 07:00:58 UTC, Marco Leise wrote: Am Thu, 29 May 2014 20:10:13 + schrieb "John Colvin" : On Thursday, 29 May 2014 at 20:01:25 UTC, Tobias Pankrath wrote: > On Thursday, 29 May 2014 at 15:32:54 UTC, Wanderer wrote: >> I don't see any valid a

Re: D Users Survey: Primary OS?

2014-05-29 Thread John Colvin via Digitalmars-d
On Thursday, 29 May 2014 at 20:07:53 UTC, Adam D. Ruppe wrote: I mostly use slackware linux (64 bit OS but i prefer to build 32 bit programs) for D stuff. I also use a variety of Windows systems from time to time, especially if I want to distribute a gui to other users (always 32 bit programs).

Re: Hardware Traps for Integer Overflow

2014-05-29 Thread John Colvin via Digitalmars-d
On Thursday, 29 May 2014 at 20:01:25 UTC, Tobias Pankrath wrote: On Thursday, 29 May 2014 at 15:32:54 UTC, Wanderer wrote: I don't see any valid alternatives. What should ideally happen if you increment 0x..? Should the value remain the same? I know at least one firmware running in ca

Re: D Users Survey: Primary OS?

2014-05-29 Thread John Colvin via Digitalmars-d
On Thursday, 29 May 2014 at 18:24:57 UTC, Tom Browder via Digitalmars-d wrote: Has anyone done a survey of the primary OS of D users? I (a D newbie) use Debian Linux (64-bit), but I get the feeling that many (if not most) users are on some version of Windows. Thanks. Best regards, -Tom Ar

Re: Thanks for a great DConf

2014-05-25 Thread John Colvin via Digitalmars-d
On Sunday, 25 May 2014 at 18:39:44 UTC, SomeDude wrote: On Sunday, 25 May 2014 at 18:37:46 UTC, SomeDude wrote: On Saturday, 24 May 2014 at 23:37:44 UTC, aliyome wrote: On Saturday, 24 May 2014 at 20:34:03 UTC, monarch_dodra wrote: On Saturday, 24 May 2014 at 17:40:29 UTC, Nick Sabalausky wrot

Re: Associative Arrays max length? 32bit/64bit

2014-05-25 Thread John Colvin via Digitalmars-d
On Sunday, 25 May 2014 at 06:54:47 UTC, Steven Schveighoffer wrote: On Sat, 24 May 2014 21:39:14 -0700, H. S. Teoh via Digitalmars-d wrote: On Sat, May 24, 2014 at 06:05:49PM -0700, Steven Schveighoffer via Digitalmars-d wrote: On Sat, 24 May 2014 02:54:01 -0700, FG wrote: [...] >Really? T

Pull requests with busy/unavailable authors

2014-05-25 Thread John Colvin via Digitalmars-d
What is the etiquette for taking over a pull request to speed it to merge? Would the following be acceptable? Create up to date fork branch of upstream. Apply the commits from said pull request to this new branch. Add extra commits as appropriate. Create new pull request(s).

Re: Easy & huge GC optimizations

2014-05-23 Thread John Colvin via Digitalmars-d
On Friday, 23 May 2014 at 13:43:53 UTC, Chris wrote: On Friday, 23 May 2014 at 06:17:43 UTC, Rainer Schuetze wrote: On 22.05.2014 21:04, Etienne wrote: On 2014-05-22 2:12 PM, Rainer Schuetze wrote: "NO_INTERIOR" is currently only used for the hash array used by associative arrays. It is a

Re: Thank you Kenji

2014-05-23 Thread John Colvin via Digitalmars-d
On Friday, 23 May 2014 at 08:23:21 UTC, Philippe Sigaud via Digitalmars-d wrote: For those who don't know Kenji because he rarely posts on the forums, Brad put up a slide at Dconf yesterday showing the top committers by pull requests over the last three years and Kenji was at the top for '12 an

Re: try to install Tango+D2 but compile with error symbol undefined (Window)

2014-05-21 Thread John Colvin via Digitalmars-d
On Wednesday, 21 May 2014 at 13:18:34 UTC, JJDuck wrote: I try to use Tango and Phobo together in D2 and I downloaded the package from link(https://github.com/SiegeLord/Tango-D2 and follow its installation process(https://github.com/SiegeLord/Tango-D2/wiki/Installation#linux-gdc). But it has

Re: Mass-enabling D => License question

2014-05-21 Thread John Colvin via Digitalmars-d
On Tuesday, 20 May 2014 at 22:50:45 UTC, John Colvin wrote: On Tuesday, 20 May 2014 at 20:44:57 UTC, Andre wrote: Hi, I like D due to its clear syntax and power. For a business application developer what is really missing is a full blown IDE which enables Rapid Application Development

Re: Mass-enabling D => License question

2014-05-20 Thread John Colvin via Digitalmars-d
On Tuesday, 20 May 2014 at 20:44:57 UTC, Andre wrote: Hi, I like D due to its clear syntax and power. For a business application developer what is really missing is a full blown IDE which enables Rapid Application Development. => GUI => Database => Internet components => Refactoring => ... an

Re: DFL is really cool,Who can contact Christopher E. Miller?

2014-05-18 Thread John Colvin via Digitalmars-d
On Sunday, 18 May 2014 at 17:58:04 UTC, jack death wrote: this sucks. it would be nice to get a gui lib that works with 32 and 64 bit. create a nice language and don't the tools/libs to use it. with your attitude you will not have a chance to became main stream. D bindings exist for an - admi

<    3   4   5   6   7   8   9   10   11   12   >