Re: Stroustrup's slides about c++11 and c++14

2014-09-14 Thread Sean Cavanaugh via Digitalmars-d
On 9/13/2014 3:10 PM, eles wrote: This presentation: https://parasol.tamu.edu/people/bs/622-GP/C++14TAMU.pdf He criticizes C99 VLA (slide 24) as being an abomination But the surprise comes at the end (slide 57), where he also criticizes... the static if as being a total abomination. Well,

Re: A Perspective on D from game industry

2014-06-18 Thread Sean Cavanaugh via Digitalmars-d
On 6/18/2014 1:05 AM, c0de517e wrote: On Wednesday, 18 June 2014 at 03:28:48 UTC, Sean Cavanaugh wrote: I had a nice sad 'ha ha' moment when I realized that msvc can't cope with restrict on the pointers feeding into the simd intrinsics; you have to cast it away. So much for that perf

Re: A Perspective on D from game industry

2014-06-17 Thread Sean Cavanaugh via Digitalmars-d
On 6/15/2014 4:34 PM, Joakim wrote: He clarifies in the comments: D is not 'high-performance' the same way as C and C++ are not. Systems is not the same as high-performance. Fortran always has been more 'high-performance' than C/C++ as it doesn't have pointer aliasing (think that C++

Re: Tail pad optimization, cache friendlyness and C++ interrop

2014-06-14 Thread Sean Cavanaugh via Digitalmars-d
On 6/11/2014 8:56 AM, Remo wrote: This is pretty strange behavior. At least on Windows I can not confirm this. Visual Studio 2013, Intel Compiler and Clang for windows have the same consistent behavior here. private do NOT affect struct size. But there is a parameter in Visual Studio that

Re: win64 as orphan?

2014-06-12 Thread Sean Cavanaugh via Digitalmars-d-learn
On 6/9/2014 11:42 AM, lurker wrote: i agree with you, but you should have posted in announce, so that adrei can use it for some marketing. i too wait now for a long, long time to use it with win64. i am also giving up - i guess it will stay a linux/apple show. maybe, as a multiple os compiler,

Re: what keeps a COM object alive?

2013-06-12 Thread Sean Cavanaugh
On 6/11/2013 10:38 PM, finalpatch wrote: A typical COM server would create a new object (derived from IUnknown), return it to the caller (potentially written in other languages). Because the object pointer now resides outside of D's managed heap, does that mean the object will be destroyed when

Re: DMD under 64-bit Windows 7 HOWTO

2013-06-04 Thread Sean Cavanaugh
On 6/1/2013 11:08 PM, Sean Cavanaugh wrote: On 6/1/2013 11:06 PM, Sean Cavanaugh wrote: On 6/1/2013 8:57 PM, Adam Wilson wrote: Ok, so how did you get VisualD to not use OPTLINK? I have my project settings set to 'Combined compile and link' (bottom-most option of the General part

Re: Slow performance compared to C++, ideas?

2013-06-04 Thread Sean Cavanaugh
On 6/4/2013 12:58 AM, Andrei Alexandrescu wrote: Unless fresh arguments, facts, or perspectives come about, I am personally not convinced, based on this thread so far, that we should operate a language change. The best you could do without a language change is to establish some good

Re: Slow performance compared to C++, ideas?

2013-06-04 Thread Sean Cavanaugh
On 6/4/2013 2:25 AM, Walter Bright wrote: One possibility is to introduce virtual as a storage class that overrides final. Hence, one could write a class like: class C { final: void foo(); void baz(); virtual int abc(); void def(); } This would not break any existing

Re: Slow performance compared to C++, ideas?

2013-06-04 Thread Sean Cavanaugh
On 6/4/2013 2:46 AM, Walter Bright wrote: On 6/4/2013 12:32 AM, Sean Cavanaugh wrote: The problem isn't going to be in your own code, it will be in using everyone elses. If you're forced to use someone else's code and are not allowed to change it in any way, then you're always going to have

Re: DMD under 64-bit Windows 7 HOWTO

2013-06-01 Thread Sean Cavanaugh
On 5/25/2013 8:24 PM, Manu wrote: I might just add, that if you have Visual Studio installed (which I presume many Windows dev's do), then you don't need to do ANYTHING. DMD64 just works if VS is present. I didn't do a single thing to get DMD-Win64 working. And it's working great. You should

Re: DMD under 64-bit Windows 7 HOWTO

2013-06-01 Thread Sean Cavanaugh
On 6/1/2013 11:06 PM, Sean Cavanaugh wrote: On 6/1/2013 8:57 PM, Adam Wilson wrote: Ok, so how did you get VisualD to not use OPTLINK? I have my project settings set to 'Combined compile and link' (bottom-most option of the General part of the project settings). dmd is invoking the linker

Re: DMD under 64-bit Windows 7 HOWTO

2013-06-01 Thread Sean Cavanaugh
On 6/1/2013 8:57 PM, Adam Wilson wrote: Ok, so how did you get VisualD to not use OPTLINK? I have my project settings set to 'Combined compile and link' (bottom-most option of the General part of the project settings). dmd is invoking the linker specified in the sc.ini this way (its a

Re: Slow performance compared to C++, ideas?

2013-05-31 Thread Sean Cavanaugh
On 5/31/2013 4:42 AM, Manu wrote: People already have to type 'override' in every derived class, and they're happy to do that. Requiring to type 'virtual' in the base is hardly an inconvenience by contrast. Actually, it's quite orthogonal. D tends to prefer being explicit. Why bend the rules in

Re: DConf 2013 Day 1 Talk 6: Concurrent Garbage Collection for D by Leandro Lucarella

2013-05-27 Thread Sean Cavanaugh
On 5/24/2013 11:12 PM, Diggory wrote: On 64-bit windows there is also the GetWriteWatch function which lets you access the dirty flag in the page table = no page faults = super efficient concurrent generational GC. Just a shame it doesn't exist on 32-bit systems for some reason. There's all

Re: dmd 2.063 beta 5

2013-05-23 Thread Sean Cavanaugh
On 5/23/2013 11:17 PM, Walter Bright wrote: On 5/23/2013 8:53 PM, Steven Schveighoffer wrote: On Thu, 23 May 2013 23:38:32 -0400, Walter Bright newshou...@digitalmars.com wrote: On 5/23/2013 7:38 PM, Steven Schveighoffer wrote: This is one change where ALL code broken by this change is

Re: D on next-gen consoles and for game development

2013-05-23 Thread Sean Cavanaugh
On 5/24/2013 12:25 AM, deadalnix wrote: On Friday, 24 May 2013 at 00:44:14 UTC, Andrei Alexandrescu wrote: Custom allocators will probably be very useful, but if there's one thing STL has taught me, it's hard to use them effectively, and in practise, nobody ever uses them. Agreed. To

Re: WindowProc in a class - function and pointer problem

2013-05-23 Thread Sean Cavanaugh
On 5/22/2013 8:49 PM, evilrat wrote: On Wednesday, 22 May 2013 at 21:42:32 UTC, D-sturbed wrote: Yes I'm in the multiple Window case, every window is wraped in a class and has its own message handler. I know that Win, in its callback system, often lets you retrieve a pointer to something, and

Re: Interface vs pure abstract class - speed.

2013-05-13 Thread Sean Cavanaugh
On 5/12/2013 12:31 PM, SundayMorningRunner wrote: Hello, let's say I have the choice between using an abstract class or an interface to declare a plan, a template for the descendants. From the dmd compiler point of view, should I use the abstract class version (so I guess that for each method

Re: 1 matches bool, 2 matches long

2013-04-29 Thread Sean Cavanaugh
On 4/29/2013 7:30 AM, deadalnix wrote: (that is: ifzero(), infnonzero(), whilezero(), whilenonzero()). int x = 3; if (!!x) { // do something } Its not official but this already works in the C like langauges, as a way to 'promote to bool'

Re: Recipe and best practice for accessing COM

2012-09-09 Thread Sean Cavanaugh
On 9/9/2012 7:30 AM, newToCOM wrote: Still struggling.. test.d: --- ( ... ) /* Other imports */ import win32.directx.d2d1; alias win32.directx.d2d1.IID IID; IID IID_ID2D1Factory = { 0x06152247, 0x6F50, 0x465A, [0x92, 0x45, 0x11, 0x8B, 0xFD, 0x3B, 0x60, 0x07] };

Re: Recipe and best practice for accessing COM

2012-09-09 Thread Sean Cavanaugh
On 9/9/2012 7:57 AM, Sean Cavanaugh wrote: On 9/9/2012 7:30 AM, newToCOM wrote: I've been super busy at work so haven't had much time to respond to this thread. I also have a D version of something resembling ATL's CComPtr which I am finally happy enough with to share, that I could post

Re: GC vs. Manual Memory Management Real World Comparison

2012-09-06 Thread Sean Cavanaugh
On 9/6/2012 4:30 AM, Peter Alexander wrote: In addition to Walter's response, it is very rare for advanced compiler optimisations to make 2x difference on any non-trivial code. Not impossible, but it's definitely suspicious. I love trying to explain to people our debug builds are too slow

Re: More on vectorized comparisons

2012-08-23 Thread Sean Cavanaugh
On 8/22/2012 7:19 PM, bearophile wrote: Some time ago I have suggested to add support to vector comparisons in D, because this is sometimes useful and in the modern SIMD units there is hardware support for such operations: I think that code is semantically equivalent to: void main() {

Re: NaNs Just Don't Get No Respect

2012-08-20 Thread Sean Cavanaugh
On 8/20/2012 12:41 AM, Nick Sabalausky wrote: On Sun, 19 Aug 2012 01:21:03 -0500 Sean Cavanaughworksonmymach...@gmail.com wrote: Nobody knows how floats work, without being locked in a closet for a at least a week and told to change their doubles back into floats and fix their code, since

Re: NaNs Just Don't Get No Respect

2012-08-19 Thread Sean Cavanaugh
On 8/19/2012 12:12 AM, dennis luehring wrote: Am 19.08.2012 06:12, schrieb Jonathan M Davis: On Friday, August 17, 2012 17:03:13 Walter Bright wrote: Our discussion on this in the last few days inspired me to write a blog post about it:

Re: First working Win64 program!

2012-08-12 Thread Sean Cavanaugh
On 8/12/2012 4:12 PM, Walter Bright wrote: On 8/12/2012 1:38 AM, Alex Rønne Petersen wrote: One question: Will the 32-bit tool chain also be able to use the MSVC runtime and linker eventually? It's not the current plan. Frankly, I think 32 bits is rapidly becoming irrelevant on the desktop.

Re: First working Win64 program!

2012-08-12 Thread Sean Cavanaugh
On 8/12/2012 6:43 PM, torhu wrote: On 12.08.2012 23:21, Sean Cavanaugh wrote: Post windows 8 launch we should start seeing mainstream games shipping 32 and 64 bit binaries together in the same box. We already have moved off of 32 bit in house for our editors and tools. The biggest hangup

Re: First working Win64 program!

2012-08-12 Thread Sean Cavanaugh
On 8/12/2012 8:15 PM, Andrej Mitrovic wrote: On 8/13/12, Sean Cavanaughworksonmymach...@gmail.com wrote: we had to modify the code Sure enough I've found your name: http://www.microsoft.com/games/mgsgamecatalog/halopccredits.aspx I noticed you before here but never realized you worked on

Re: First working Win64 program!

2012-08-12 Thread Sean Cavanaugh
On 8/12/2012 8:22 PM, torhu wrote: Ok, so using LARGEADDRESSAWARE doesn't improve the situation on XP 64? What about on Vista 64? On XP64 it would help some, but the video adapter is still mapped to a huge contiguous range due to the XP driver model. Basically you get 1 extra GB (2.3GB

Strange fallout changing modules

2012-08-11 Thread Sean Cavanaugh
While working on project using COM I noticed that the win32 bindings project declares its own version of IUnknown and all the classes in the project derive from this. So I set out to see the feasibility of modifying the win32 module to use std.c.windows.com.IUnknown. This was a bit of work

Re: Strange fallout changing modules

2012-08-11 Thread Sean Cavanaugh
On 8/11/2012 1:50 AM, Sean Cavanaugh wrote: While working on project using COM I noticed that the win32 bindings project declares its own version of IUnknown and all the classes in the project derive from this. So I set out to see the feasibility of modifying the win32 module to use

Re: vector Cross/Dot using core.simd?

2012-08-11 Thread Sean Cavanaugh
On 8/11/2012 8:23 PM, F i L wrote: I'm trying to write a Cross and Dot function using core.simd.float4 and DMD Does anyone know anything about SIMD operations that may be able to help me translate these functions into a D equivalent? I would very much appreciate your help. Some reference:

Re: One against binary searches

2012-07-31 Thread Sean Cavanaugh
On 7/30/2012 12:28 PM, Don Clugston wrote: On 30/07/12 17:40, bearophile wrote: This author writes very detailed analyses of low-level computational matters, that appear on Reddit. This blog post he suggests to introduce offseted binary or quaternary search instead of binary search in Phobos:

Re: Recipe and best practice for accessing COM

2012-07-25 Thread Sean Cavanaugh
On 7/24/2012 2:01 PM, newToCOM wrote: I am trying to use COM to access Windows functionality and APIs. I have read the interface documentation and some documentation at MSDN. I have seen the included sample snippet for IHello and the slides Modern COM programming in D, but it is still not clear

Re: Is this actually supposed to be legal?

2012-07-17 Thread Sean Cavanaugh
On 7/17/2012 12:23 PM, Jonathan M Davis wrote: On Tuesday, July 17, 2012 14:48:32 David Nadlinger wrote: On Tuesday, 17 July 2012 at 05:24:26 UTC, Jonathan M Davis wrote: This code strikes me as being a bug: class MyBase(T) {} class MySubA : MyBase!MySubA {} class MySubB :

Re: LLVM IR influence on compiler debugging

2012-07-08 Thread Sean Cavanaugh
On 7/7/2012 11:05 PM, Andrei Alexandrescu wrote: Compilation is a huge bottleneck for any major C++ code base, and adding hardware (distributing compilation etc) is survival, but definitely doesn't scale to make the problem negligible. In contrast, programmers have considerable control about

Re: align(16) struct member throws an exception with movdqa

2012-06-13 Thread Sean Cavanaugh
On 6/11/2012 7:15 AM, Trass3r wrote: I think it has been fixed for the next version of DMD already. Any idea why align isn't letting me use movdqa? Cause align doesn't work the way you think it does. In fact I still don't understand how it works at all. The language align keyword can only

Re: Memory reordering explained by example

2012-05-18 Thread Sean Cavanaugh
On 5/16/2012 5:59 AM, Gor Gyolchanyan wrote: The problem is, that ancient processor architectures are used for modern processors and software. The correct solution to the concurrency problems would be a new architecture, designed to naturally deal with concurrency. We have them, they are

Re: What library functionality would you most like to see in D?

2012-05-11 Thread Sean Cavanaugh
On 5/10/2012 12:49 PM, Sean Kelly wrote: On Jul 30, 2011, at 10:27 PM, Jonathan M Davis wrote: I think that it would be useful to query the community for what piece of library functionality they don't currently have in D and would most like to see. For instance, there is no official logging

Re: Does D have too many features?

2012-05-08 Thread Sean Cavanaugh
On 5/8/2012 3:36 PM, foobar wrote: On Tuesday, 8 May 2012 at 19:00:01 UTC, deadalnix wrote: I think that goal is misunderstood. It is aimed at human being, not compiler. If one read D code that look like C, it should be able to understand it easily. I is not supped to compile with 100% exact

Re: Does D have too many features?

2012-05-08 Thread Sean Cavanaugh
On 5/8/2012 7:56 PM, Sean Cavanaugh wrote: On 5/8/2012 3:36 PM, foobar wrote: On Tuesday, 8 May 2012 at 19:00:01 UTC, deadalnix wrote: I think that goal is misunderstood. It is aimed at human being, not compiler. If one read D code that look like C, it should be able to understand it easily

Re: Does D have too many features?

2012-05-08 Thread Sean Cavanaugh
On 5/8/2012 7:56 PM, Sean Cavanaugh wrote: On 5/8/2012 3:36 PM, foobar wrote: On Tuesday, 8 May 2012 at 19:00:01 UTC, deadalnix wrote: I think that goal is misunderstood. It is aimed at human being, not compiler. If one read D code that look like C, it should be able to understand it easily

Re: Class methods in D?

2012-05-04 Thread Sean Cavanaugh
On 5/3/2012 1:32 PM, Simon wrote: On 03/05/2012 18:21, Mehrdad wrote: In Windows, you need to register a window class before you can actually create an instance of it. If you are mucking about on 'doze you might find my dubious port of the ATL window classes relevant:

Re: Class methods in D?

2012-05-04 Thread Sean Cavanaugh
On 5/3/2012 1:41 PM, Mehrdad wrote: On Thursday, 3 May 2012 at 18:32:18 UTC, Simon wrote: On 03/05/2012 18:21, Mehrdad wrote: In Windows, you need to register a window class before you can actually create an instance of it. If you are mucking about on 'doze you might find my dubious port of

Re: pure functions/methods

2012-04-20 Thread Sean Cavanaugh
On 4/20/2012 3:06 AM, Namespace wrote: The sense of pure functions isn't clear to me. What is the advantage of pure functions / methods? I inform the compiler with const that this method does not change the current object, and therefore he can optimize (at least in C++) this method. How and what

Re: Windows: Throwing Exceptions from Fibers in D2.059: Access Violation

2012-04-19 Thread Sean Cavanaugh
On 4/19/2012 10:00 PM, Jameson Ernst wrote: On Thursday, 19 April 2012 at 00:07:45 UTC, Sean Kelly wrote: On Apr 18, 2012, at 4:06 PM, Andrew Lauritzen wrote: I'm still interested in if anyone has any suggested workarounds or experience using Win32 fibers in D2 as well. The x32 Windows code

Re: The Downfall of Imperative Programming

2012-04-09 Thread Sean Cavanaugh
On 4/9/2012 3:28 PM, Mirko Pilger wrote: i guess this might be of interest to some. http://fpcomplete.com/the-downfall-of-imperative-programming/ http://www.reddit.com/r/programming/comments/s112h/the_downfall_of_imperative_programming_functional/ I would counter a flow based programming

Re: unzip parallel, 3x faster than 7zip

2012-04-06 Thread Sean Cavanaugh
On 4/5/2012 6:53 PM, Jay Norwood wrote: I'm curious why win7 is such a dog when removing directories. I see a lot of disk read activity going on which seems to dominate the delete time. This doesn't make any sense to me unless there is some file caching being triggered on files being

Re: Confused about github rebasing

2012-03-15 Thread Sean Cavanaugh
On 3/15/2012 3:56 PM, Alex Rønne Petersen wrote: On 15-03-2012 21:53, Gour wrote: On Thu, 15 Mar 2012 13:49:14 -0700 H. S. Teohhst...@quickfur.ath.cx wrote: Another question. How to I repair my current history, which is all messed up now? By not using DVCS which allows you to rewrite

Re: How about colors and terminal graphics in std.format?

2012-03-12 Thread Sean Cavanaugh
On 3/12/2012 10:58 PM, Chad J wrote: On 03/12/2012 10:37 PM, James Miller wrote: I do want to be able to format things besides color with the color formatting function. Maybe I can pick out the color format specifiers first and then pass the rest to format. It'd be a shame to reimplement

Re: Multiple return values...

2012-03-10 Thread Sean Cavanaugh
On 3/10/2012 4:37 AM, Manu wrote: If I pass a structure TO a function by value, I know what happens, a copy is written to the stack which the function expects to find there. This is only true if the compiler is forced to use the ABI, when inlining is impossible, or the type being passed is

Re: Breaking backwards compatiblity

2012-03-10 Thread Sean Cavanaugh
On 3/10/2012 3:49 PM, bearophile wrote: Walter: I'm talking about the name change. It's far and away the most common thing I have to edit when moving code from D1= D2. We need good/better ways to manage Change and make it faster and less painful, instead of refusing almost all change right

Re: Breaking backwards compatiblity

2012-03-10 Thread Sean Cavanaugh
On 3/10/2012 4:22 PM, Nick Sabalausky wrote: H. S. Teohhst...@quickfur.ath.cx wrote in message news:mailman.437.1331414346.4860.digitalmar...@puremagic.com... True. But I found Linux far more superior in terms of being usable on very old hardware. There have been exceptions to that: About

Re: Multiple return values...

2012-03-10 Thread Sean Cavanaugh
On 3/10/2012 8:08 PM, Mantis wrote: Tuple!(float, float) callee() { do something to achieve result in st0,st1 fst st0, st1 into stack load stack values into EAX, EDX ret } void caller() { call callee() push EAX, EDX into a stack fld stack values into st0, st1 do something with st0, st1 } As

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-07 Thread Sean Cavanaugh
On 3/7/2012 8:20 PM, Kapps wrote: On Wednesday, 7 March 2012 at 19:12:25 UTC, H. S. Teoh wrote: Supporting stuff like 5.hours will introduce additional complications to D's lexical structure, though. The lexer will have to understand it as (int:5)(.)(ident:hours) rather than

Re: 0 negative loop condition bug or misunderstanding on my part

2012-03-07 Thread Sean Cavanaugh
On 3/7/2012 12:57 PM, Jonathan M Davis wrote: On Wednesday, March 07, 2012 11:01:05 Timon Gehr wrote: On 03/07/2012 07:05 AM, ixid wrote: Ah, thank you, so it's wrapping. That seems like a bad idea, what is the I suspect that the reality of the matter is that if we disallowed implicit

Re: Extend vector ops to boolean operators?

2012-03-06 Thread Sean Cavanaugh
On 3/6/2012 2:30 PM, H. S. Teoh wrote: It'd be really cool if I could do this: void func(int[] vector, int[] bounds) { assert(vector[]= 0 vector[] bounds[]); ... } Is there any reason why we shouldn't implement this? T This same problem

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Sean Cavanaugh
On 2/25/2012 4:08 PM, Paulo Pinto wrote: Am 25.02.2012 21:26, schrieb Peter Alexander: On Saturday, 25 February 2012 at 20:13:42 UTC, so wrote: On Saturday, 25 February 2012 at 18:47:12 UTC, Nick Sabalausky wrote: Interesting. I wish he'd elaborate on why it's not an option for his daily

Re: Inheritance of purity

2012-02-24 Thread Sean Cavanaugh
On 2/24/2012 10:29 AM, H. S. Teoh wrote: On Fri, Feb 24, 2012 at 02:43:01AM -0800, Walter Bright wrote: [...] Like the switch from command line to GUI, perhaps there are some that are ready to switch from text files to some visually graphy thingy for source code. But D ain't such a language. I

Re: Linking with d3d11.dll/lib

2012-02-24 Thread Sean Cavanaugh
On 2/23/2012 5:03 PM, John Burton wrote: I'm trying to use the d3d11 bindings in http://www.dsource.org/projects/bindings/wiki/DirectX to call direct3d11 functions from my D program. I've managed to get the code to compiler but when it links I get this error - Error 42 Symbol Undefined

Re: Linking with d3d11.dll/lib

2012-02-23 Thread Sean Cavanaugh
On 2/23/2012 5:03 PM, John Burton wrote: I'm trying to use the d3d11 bindings in http://www.dsource.org/projects/bindings/wiki/DirectX to call direct3d11 functions from my D program. I've managed to get the code to compiler but when it links I get this error - Error 42 Symbol Undefined

Re: The Right Approach to Exceptions

2012-02-18 Thread Sean Cavanaugh
On 2/18/2012 7:56 PM, Zach wrote: On Sunday, 19 February 2012 at 01:29:40 UTC, Nick Sabalausky wrote: Another one for the file of Crazy shit Andrei says ;) From experience, I (and clearly many others here) find a sparse, flat exception hierarchy to be problematic and limiting. But even with a

Re: The Right Approach to Exceptions

2012-02-18 Thread Sean Cavanaugh
On 2/18/2012 11:07 PM, Walter Bright wrote: On 2/18/2012 8:08 PM, bearophile wrote: To improve this discussion a small benchmark is useful to see how much bloat this actually causes. It'll increase with reflection and perfect garbage collection. Are these coming? :)

Re: std.simd module

2012-02-04 Thread Sean Cavanaugh
On 2/4/2012 7:37 PM, Martin Nowak wrote: Am 05.02.2012, 02:13 Uhr, schrieb Manu turkey...@gmail.com: On 5 February 2012 03:08, Martin Nowak d...@dawgfoto.de wrote: Let me restate the main point. Your approach to a higher level module wraps intrinsics with named functions. There is little

Re: std.simd module

2012-02-04 Thread Sean Cavanaugh
Looks good so far: it could use float[2] code wherever there is float[3] code (magnitude2 etc) any/all should have template overloads to let you specificy exactly which channels match, and simple hardcoded ones for the common cases (any1, any2, any3, any4 aka the default 'any') I

Re: indent style for D

2012-01-29 Thread Sean Cavanaugh
On 1/29/2012 5:36 AM, Trass3r wrote: http://www.d-programming-language.org/dstyle.html in regard to indent-style, can someone shed some light what is recommended practice for it within D community? Everyone thinks his way is the best. Thats because it is :) curley braces on the same line

Re: dmd2

2012-01-29 Thread Sean Cavanaugh
On 1/29/2012 10:24 AM, Chad J wrote: Hey guys, I know this is a bit late given the deprecation of D1 and all, but why did we name the D2 compiler dmd instead of dmd2? It's rather annoyed me when trying to work with multiple D projects of mixed kind in the same environment. Using the same

Re: indent style for D

2012-01-29 Thread Sean Cavanaugh
On 1/29/2012 5:03 PM, Iain Buclaw wrote: On 29 January 2012 14:17, bearophilebearophileh...@lycos.com wrote: Denis Shelomovskij: Am I mistaken? If no, am I missing some major spaces advantages? If no, lets use tabs. D2 style guide should *require* D2 to be edited using a mono-spaced font,

Re: dmd2

2012-01-29 Thread Sean Cavanaugh
On 1/29/2012 3:37 PM, Timon Gehr wrote: On 01/29/2012 06:55 PM, Sean Cavanaugh wrote: On 1/29/2012 10:24 AM, Chad J wrote: Hey guys, I know this is a bit late given the deprecation of D1 and all, but why did we name the D2 compiler dmd instead of dmd2? It's rather annoyed me when trying

Re: Biggest Issue with D - Definition and Versioning

2012-01-17 Thread Sean Cavanaugh
Hmm my experiences are similar for 90% of companies, though I have seen some exceptions (Perforce is receptive of feedback and bugs, Certain divisions of Microsoft are communicative, but not MSConnect). The common denominator for communication looks pretty simple to me: If there is anyone

Re: SIMD support...

2012-01-17 Thread Sean Cavanaugh
On 1/16/2012 7:21 PM, Danni Coy wrote: (dual quaternions? Are they used in games?) yes While the GPU tends to do this particular step of the work, the answer in general is 'definitely'. One of the most immediate applications of dual quats was to improve the image quality of joints

Re: start on SIMD documentation

2012-01-14 Thread Sean Cavanaugh
What about the 256 bit types that are already present in AVX instruction set? I've written a several C++ based SIMD math libraries (for SSE2 up through AVX), and PPC's VMX instruction sets that you can find on game consoles. The variable type naming is probably the most annoying thing to

Re: SIMD support...

2012-01-14 Thread Sean Cavanaugh
MS has three types, __m128, __m128i and __m128d (float, int, double) Six if you count AVX's 256 forms. On 1/7/2012 6:54 PM, Peter Alexander wrote: On 7/01/12 9:28 PM, Andrei Alexandrescu wrote: I agree with Manu that we should just have a single type like __m128 in MSVC. The other types and

Re: SIMD support...

2012-01-14 Thread Sean Cavanaugh
On 1/6/2012 9:44 AM, Manu wrote: On 6 January 2012 17:01, Russel Winder rus...@russel.org.uk mailto:rus...@russel.org.uk wrote: As said, I think these questions are way outside the scope of SIMD vector libraries ;) Although this is a fundamental piece of the puzzle, since GPGPU is no use without

Re: SIMD support...

2012-01-14 Thread Sean Cavanaugh
On 1/6/2012 7:58 PM, Manu wrote: On 7 January 2012 03:46, Vladimir Panteleev vladi...@thecybershadow.net mailto:vladi...@thecybershadow.net wrote: I've never seen a memcpy on any console system I've ever worked on that takes advantage if its large registers... writing a fast memcpy is usually

Re: SIMD support...

2012-01-14 Thread Sean Cavanaugh
On 1/15/2012 12:09 AM, Walter Bright wrote: On 1/14/2012 9:58 PM, Sean Cavanaugh wrote: MS has three types, __m128, __m128i and __m128d (float, int, double) Six if you count AVX's 256 forms. On 1/7/2012 6:54 PM, Peter Alexander wrote: On 7/01/12 9:28 PM, Andrei Alexandrescu wrote: I agree

Re: SIMD support...

2012-01-14 Thread Sean Cavanaugh
On 1/13/2012 7:38 AM, Manu wrote: On 13 January 2012 08:34, Norbert Nemec norb...@nemec-online.de mailto:norb...@nemec-online.de wrote: This has already been concluded some days back, the language has a quite of types, just like GCC. So I would definitely like to help out on the SIMD stuff

Re: dmd 2.057 release

2012-01-03 Thread Sean Cavanaugh
On 1/3/2012 1:25 PM, Walter Bright wrote: On 1/3/2012 10:55 AM, Alex Rønne Petersen wrote: On 03-01-2012 19:47, Walter Bright wrote: On 1/3/2012 6:49 AM, Alex Rønne Petersen wrote: Perhaps some kind of experimental releases would be better. It could help getting new features out to the

Re: dmd and C++11

2012-01-01 Thread Sean Cavanaugh
On 12/29/2011 10:16 AM, Trass3r wrote: On Thursday, 29 December 2011 at 16:00:47 UTC, Vladimir Panteleev wrote: On Thursday, 29 December 2011 at 15:58:55 UTC, Trass3r wrote: What's the stance on using C++11 features in the dmd source code in the future? Well, how many C++11 features does DMC

Re: Carmack about static analysis

2011-12-27 Thread Sean Cavanaugh
On 12/25/2011 10:23 PM, Andrei Alexandrescu wrote: As a first step, we must make all allocations except stack type-aware, and leave only the stack to be imprecise. Couldn't the GC'ing the stack be handled in a similar style to how the Windows x64 ABI functions with respect to exception

Re: is d-runtime non-gc safe?

2011-12-07 Thread Sean Cavanaugh
On 12/5/2011 3:22 PM, Norbert Nemec wrote: On 05.12.2011 21:40, Tobias Pankrath wrote: Right - thanks for the hint! That would leave the following rules for real-time audio code in D: [snip] What's about message passing? Is message passing hard real time ready? The issue actually came up

Re: std.stdio overhaul by Steve Schveighoffer

2011-09-08 Thread Sean Cavanaugh
On 9/7/2011 2:19 AM, Jacob Carlborg wrote: On 2011-09-06 19:05, Daniel Murphy wrote: Andrei Alexandrescuseewebsiteforem...@erdani.org wrote in message news:j45isu$2t3h$1...@digitalmars.com... Yah, I also think the documentation makes it easy to clarify which module is the preferred one. I

Re: Programming Windows D Examples are now Online!

2011-07-09 Thread Sean Cavanaugh
On 6/21/2011 1:08 AM, Brad Anderson wrote: On Mon, Jun 20, 2011 at 10:14 PM, Andrej Mitrovic andrej.mitrov...@gmail.com mailto:andrej.mitrov...@gmail.com wrote: This is a translation project of Charles Petzold's Programming Windows (5th edition) book code samples. Currently over

Re: The issue with libraries that use Windows API prototypes

2011-07-09 Thread Sean Cavanaugh
On 7/9/2011 2:42 PM, Andrej Mitrovic wrote: Btw, the issue with those conflicting functions could be resolved by careful uses of selective imports: import win32.wingdi; // This overwrites win32\wingdi : wglMakeCurrent, wglDeleteContext, wglCreateContext; import derelict.opengl.wgl :

Re: reddit discussion about Go turns to D again

2011-05-15 Thread Sean Cavanaugh
On 5/15/2011 11:04 AM, dsimcha wrote: On 5/15/2011 11:41 AM, Robert Clipsham wrote: Automatically using a parallel algorithm if it's likely to improve speed? Awesome. I assume that std.parallelism sets up a thread pool upon program start so that you don't have the overhead of spawning threads

Re: reddit discussion about Go turns to D again

2011-05-15 Thread Sean Cavanaugh
On 5/15/2011 11:49 AM, dsimcha wrote: On 5/15/2011 12:21 PM, Sean Cavanaugh wrote: I haven't looked at the library in depth, but after taking a peek I'm left wondering how to configure the stack size. My concern is what to do if the parallel tasks are running out of stack, or (more likely

Re: reddit discussion about Go turns to D again

2011-05-15 Thread Sean Cavanaugh
On 5/15/2011 12:45 PM, dsimcha wrote: Fair enough. So I guess stackSize should just be a c'tor parameter and there should be a global for the default pool, kind of like defaultPoolThreads? Task.executeInNewThread() would also take a stack size. Definitely do-able, but I'm leery of cluttering

private module stuff

2011-05-08 Thread Sean Cavanaugh
So I was learning how to make a module of mine very strict with private parts, and was surprised I could only do this with global variables and functions. Enums, structs, and classes are fully visible outside the module regardless of being wrapped in a private{} or prefixed with private.

Re: private module stuff

2011-05-08 Thread Sean Cavanaugh
On 5/8/2011 4:05 AM, Jonathan M Davis wrote: Sean Cavanaugh: So I was learning how to make a module of mine very strict with private parts, and was surprised I could only do this with global variables and functions. Enums, structs, and classes are fully visible outside the module

Re: Beta List

2011-05-07 Thread Sean Cavanaugh
On 5/7/2011 12:24 AM, Andrej Mitrovic wrote: Here's a quick weblink: http://news.gmane.org/gmane.comp.lang.d.dmd.beta/cutoff=624 It works on my machine :-D

Re: Difference between stack-allocated class and struct

2011-05-03 Thread Sean Cavanaugh
Here is my prototype COM compile-time reflection based wrapper mixin (which I have abandoned in favor of alias this since it covers 95% of my use cases even though it isn't perfectly safe). I am new at D so you have been warned, though this part of the language seems pretty straightforward

Re: How about a Hash template?

2011-04-30 Thread Sean Cavanaugh
On 4/29/2011 6:19 PM, Alexander wrote: On 29.04.2011 21:58, Andrei Alexandrescu wrote: You need to replace the assert and compile with -O -release -inline. My results: [snip] Still, straight comparison wins - 2x faster ;) /Alexander When understanding the CPU platform you are on, one of

Re: Is int faster than byte/short?

2011-04-30 Thread Sean Cavanaugh
On 4/30/2011 10:34 AM, Mariusz Gliwiński wrote: Hello, I'm trying to learn high-performance real-time programming. One of my wonderings are: Should i use int/uint for all standard arithmetic operations or int/short/byte (depends on actual case)? I believe this question has following

Quirks of 'alias foo this'

2011-04-25 Thread Sean Cavanaugh
So my research into making a nice friendly to use COM interface wrapper for D has had a few odd turns and I am wondering if there is an answer to making the implementation nicer. I discovered the 'alias foo this' syntax to let structs nearly seamlessly impersonate a member variable. This has

Re: Implementing std.log

2011-04-24 Thread Sean Cavanaugh
On 4/20/2011 11:09 AM, Robert Clipsham wrote: Hey folks, I've just finished porting my web framework from D1/Tango to D2/Phobos, and in the transition lost logging functionality. As I'll be writing a logging library anyway, I wondered if there'd be interest in a std.log? If so, is there a

Re: GDC2, LDC2 Status Updates?

2011-04-24 Thread Sean Cavanaugh
On 4/24/2011 3:51 PM, Iain Buclaw wrote: As some anecdote goes, bugs will be found once you stop looking. Or when you want to show your app to someone else :) I suspect this increases geometrically with the number of people watching and how many times you tell other people how cool it will

Re: OOP, faster data layouts, compilers

2011-04-22 Thread Sean Cavanaugh
On 4/22/2011 2:20 PM, bearophile wrote: Kai Meyer: The purpose of the original post was to indicate that some low level research shows that underlying data structures (as applied to video game development) can have an impact on the performance of the application, which D (I think) cares very

Re: OOP, faster data layouts, compilers

2011-04-22 Thread Sean Cavanaugh
On 4/22/2011 4:41 PM, bearophile wrote: Sean Cavanaugh: In many ways the biggest thing I use regularly in game development that I would lose by moving to D would be good built-in SIMD support. The PC compilers from MS and Intel both have intrinsic data types and instructions that cover all

Getting function argument names?

2011-04-20 Thread Sean Cavanaugh
I am working on a template class to provide function wrappers for COM based objects, so the calling code doesn't have to dereference the underlying pointer. In C++ we get this behavior for 'free' by overloading operator-. In D I can create a fairly funky mixin template to inspect the

  1   2   >