Re: Likely closure memory corruption

2013-03-11 Thread Walter Bright
On 3/10/2013 10:46 PM, deadalnix wrote: http://d.puremagic.com/issues/show_bug.cgi?id=9685 Isn't it an already known bug ? If that's it, then good.

Re: D benchmarks

2013-03-11 Thread Zardoz
You can try with nBodySim https://github.com/Zardoz89/nBodySim I wrote it and tested with DMD 2.060, but should be working with 2.061 or 2.062. I used it to benchmark "parallel for" vs "serial for" in some computers with 2, 4 and 16 cores, getting a speedup like x13 in a 16 core machine. It hav

Re: About structs and performant handling

2013-03-11 Thread Namespace
As said in another post, I think auto ref suffer pretty much the same problem, but it is less problematic as you can't see the result on rvalues anyway, so the compiler cannot really screw you. It has the inconvenience of taking by ref many thing that would benefit from pass by value. The onl

Re: Migrating dmd to D?

2013-03-11 Thread Kagamin
On Thursday, 7 March 2013 at 18:56:05 UTC, Jeff Nowakowski wrote: And finally, while I think it's a shame that the reference compiler is proprietary, Debian has a non-free repository that DMD can be placed on as long as the binaries are redistributable. Are they? I have a vague memory of dmd

Re: I'd just like to say thanks for D

2013-03-11 Thread FG
On 2013-03-11 06:22, H. S. Teoh wrote: And now it's 2013 and g++ is still defaulting to the *old* C++?! I don't mind having to add -std=c++11 as much as dealing with its incomplete implementation. Still have to use the pcre library for regular expressions. http://gcc.gnu.org/onlinedocs/lib

Re: Translating sys/resource.h

2013-03-11 Thread Kagamin
http://svnweb.freebsd.org/base/head/sys/sys/resource.h?view=markup ?

Re: D benchmarks

2013-03-11 Thread Russel Winder
On Mon, 2013-03-11 at 00:36 +0100, David Nadlinger wrote: > Hi all, > > I am currently finalizing my material for the LDC DConf talk, and > I thought it would be nice to include a quick runtime performance > comparison between the different compilers, just to give the > audience a general sense

Re: About structs and performant handling

2013-03-11 Thread Namespace
On Sunday, 10 March 2013 at 19:27:01 UTC, Namespace wrote: But you could prohibit any manipulation of a '&' parameter. Eg. you could make him 'scope' by default (if 'scope' will work someday). A better solution would be to require that a Parameter with '&' need 'const scope' as storage class.

Re: D benchmarks

2013-03-11 Thread Minas Mina
You can use my raytracing in D project. https://github.com/minas1/D_Raytracing It's very incomplete at the current state by the way (no soft shadows, no texturing, no reflection, no antialiasing).

Re: Migrating dmd to D?

2013-03-11 Thread Jonathan M Davis
On Monday, March 11, 2013 10:10:54 Kagamin wrote: > On Thursday, 7 March 2013 at 18:56:05 UTC, Jeff Nowakowski wrote: > > And finally, while I think it's a shame that the reference > > compiler is proprietary, Debian has a non-free repository that > > DMD can be placed on as long as the binaries ar

Re: Migrating dmd to D?

2013-03-11 Thread deadalnix
On Monday, 11 March 2013 at 11:54:29 UTC, Jonathan M Davis wrote: On Monday, March 11, 2013 10:10:54 Kagamin wrote: On Thursday, 7 March 2013 at 18:56:05 UTC, Jeff Nowakowski wrote: > And finally, while I think it's a shame that the reference > compiler is proprietary, Debian has a non-free rep

Re: Any takers for http://d.puremagic.com/issues/show_bug.cgi?id=9673?

2013-03-11 Thread Timon Gehr
On 03/11/2013 07:51 AM, Rainer Schuetze wrote: On 11.03.2013 01:15, Timon Gehr wrote: On 03/11/2013 12:49 AM, Andrei Alexandrescu wrote: On 3/10/13 4:41 PM, Rainer Schuetze wrote: My point is that import dependencies in D are more viral than C++ headers because you cannot even remove them in

Re: Any takers for http://d.puremagic.com/issues/show_bug.cgi?id=9673?

2013-03-11 Thread Andrei Alexandrescu
On 3/11/13 8:34 AM, Timon Gehr wrote: On 03/11/2013 07:51 AM, Rainer Schuetze wrote: An import is listed in the module info struct as a dependency, if it has static constructors (or destructors) or if it imports modules that have static constructors. If a di-file misses an import, it might not e

Re: Any takers for http://d.puremagic.com/issues/show_bug.cgi?id=9673?

2013-03-11 Thread jerro
The better option would be to pass all source files to update in one invocation of dmd, so it won't get slower than a full rebuild, but this has been plagued with linker errors in the past (undefined and duplicate symbols). If it works, it could identify independent group of files which you now

Re: About structs and performant handling

2013-03-11 Thread Daniel Murphy
"deadalnix" wrote in message news:libldszmvkzcezcfk...@forum.dlang.org... > On Sunday, 10 March 2013 at 02:17:36 UTC, Daniel Murphy wrote: >> A better way to do with would be to change (or extend) the abi, so that >> structs over a certain size are always passed by reference with this >> paramete

Re: Likely closure memory corruption

2013-03-11 Thread Iain Buclaw
On 10 March 2013 21:01, Walter Bright wrote: > On 3/8/2013 8:25 AM, deadalnix wrote: > >> I have a struct. The struct have a context pointer. I have this method : >> >> @property >> auto save() inout { >> return inout(Lexer)(t, r.save, line, index); >> } >> >> The context pointer IS NOT COPI

Re: Likely closure memory corruption

2013-03-11 Thread Iain Buclaw
On 11 March 2013 05:46, deadalnix wrote: > On Sunday, 10 March 2013 at 21:01:11 UTC, Walter Bright wrote: > >> On 3/8/2013 8:25 AM, deadalnix wrote: >> >>> I have a struct. The struct have a context pointer. I have this method : >>> >>> @property >>> auto save() inout { >>> return inout(Lexer

Re: Migrating dmd to D?

2013-03-11 Thread Daniel Murphy
"Daniel Murphy" wrote in message news:khfoa6$fm7$1...@digitalmars.com... > "Daniel Murphy" wrote in message > news:kgumek$2tp4$1...@digitalmars.com... >> "Zach the Mystic" wrote in message >> news:pabfuaorrjbljxzrg...@forum.dlang.org... Something like this https://github.com/yebblie

Re: I'd just like to say thanks for D

2013-03-11 Thread H. S. Teoh
On Mon, Mar 11, 2013 at 07:13:32AM +0100, Lars T. Kyllingstad wrote: > On Monday, 11 March 2013 at 05:24:34 UTC, H. S. Teoh wrote: > >- Ahem. Next, the compiler complains, "you wrote a template name with > > no parameters; that's illegal!" Perfectly legal complaint, but the > > line concerned rea

Re: Migrating dmd to D?

2013-03-11 Thread dennis luehring
Am 11.03.2013 15:20, schrieb Daniel Murphy: "Daniel Murphy" wrote in message news:khfoa6$fm7$1...@digitalmars.com... "Daniel Murphy" wrote in message news:kgumek$2tp4$1...@digitalmars.com... "Zach the Mystic" wrote in message news:pabfuaorrjbljxzrg...@forum.dlang.org... Something like this

cost of @safe and safety inference

2013-03-11 Thread monarch_dodra
I was on vacation last week, mostly without internet and even less D, which gave me the time to have existential thoughts (about D ^^). The issue I'm thinking about is @safe. @safe has a double function: 1) Restrict any any usage of "unsafe" code. 2) Bounds check slices, even in release mode.

Re: Migrating dmd to D?

2013-03-11 Thread Daniel Murphy
"dennis luehring" wrote in message news:khkqug$v57$1...@digitalmars.com... > Am 11.03.2013 15:20, schrieb Daniel Murphy: >> "Daniel Murphy" wrote in message >> news:khfoa6$fm7$1...@digitalmars.com... >>> "Daniel Murphy" wrote in message >>> news:kgumek$2tp4$1...@digitalmars.com... "Zach th

Re: cost of @safe and safety inference

2013-03-11 Thread deadalnix
If anything, safety must be opt-out. I conclude the exact opposite : function must be @safe by default or inferred as templates.

Re: Migrating dmd to D?

2013-03-11 Thread dennis luehring
Am 11.03.2013 16:23, schrieb Daniel Murphy: "dennis luehring" wrote in message news:khkqug$v57$1...@digitalmars.com... Am 11.03.2013 15:20, schrieb Daniel Murphy: "Daniel Murphy" wrote in message news:khfoa6$fm7$1...@digitalmars.com... "Daniel Murphy" wrote in message news:kgumek$2tp4$1...@

Re: cost of @safe and safety inference

2013-03-11 Thread monarch_dodra
On Monday, 11 March 2013 at 15:20:05 UTC, deadalnix wrote: If anything, safety must be opt-out. I conclude the exact opposite : function must be @safe by default or inferred as templates. That would have been nice too, but too crippling as is. If and when we have all those sweet non-escapabl

Re: Migrating dmd to D?

2013-03-11 Thread Daniel Murphy
"dennis luehring" wrote in message news:khku3t$15ja$1...@digitalmars.com... > Am 11.03.2013 16:23, schrieb Daniel Murphy: >> "dennis luehring" wrote in message >> news:khkqug$v57$1...@digitalmars.com... >>> Am 11.03.2013 15:20, schrieb Daniel Murphy: "Daniel Murphy" wrote in message n

Re: Any takers for http://d.puremagic.com/issues/show_bug.cgi?id=9673?

2013-03-11 Thread Vladimir Panteleev
On Monday, 11 March 2013 at 13:27:47 UTC, jerro wrote: Aside from linker errors, there is one more (minor) issue with this approach. If there are multiple source files with the same name and there is no -of flag, DMD will generate an object file for just one of them. This could be worked around

std.asio?

2013-03-11 Thread Martin Drasar
Hi, I started to work on a networking heavy project and I found out that there is nothing like boost.asio in D's standard library. So I looked around and discovered that vibe.d has nice fiber-based asynchronous library, but sadly it does not play along well with threads. Then I looked some more an

G++ 4.8 function multi versioning

2013-03-11 Thread bearophile
An interesting feature of G++ 4.8: http://gcc.gnu.org/wiki/FunctionMultiVersioning It allows to write various versions of a function, for different CPUs. To work it uses new built-in functions like __builtin_cpu_supports and __builtin_cpu_is, run-time dispatch, the attribute syntax, plus th

Re: cost of @safe and safety inference

2013-03-11 Thread kenji hara
If you want to opt-out safety from template function foo, you can just add @system attribute to it. int[] a; @system int foo()() { return a[0]; } void main() { foo!()(); } $ dmd -run test core.exception.RangeError@test(3): Range violation $ dmd -release -run test object.Error: Access Violation

Re: std.asio?

2013-03-11 Thread Nick Sabalausky
On Mon, 11 Mar 2013 17:06:40 +0100 Martin Drasar wrote: > So I looked > around and discovered that vibe.d has nice fiber-based asynchronous > library, but sadly it does not play along well with threads. Thread support is being worked on for vibe.d.

Re: std.asio?

2013-03-11 Thread Robert
On Mon, 2013-03-11 at 17:06 +0100, Martin Drasar wrote: > Hi, > > I started to work on a networking heavy project and I found out that > there is nothing like boost.asio in D's standard library. So I looked > around and discovered that vibe.d has nice fiber-based asynchronous > library, but sadly

Re: Migrating dmd to D?

2013-03-11 Thread Iain Buclaw
On 11 March 2013 16:01, Daniel Murphy wrote: > "dennis luehring" wrote in message > news:khku3t$15ja$1...@digitalmars.com... > > Am 11.03.2013 16:23, schrieb Daniel Murphy: > >> "dennis luehring" wrote in message > >> news:khkqug$v57$1...@digitalmars.com... > >>> Am 11.03.2013 15:20, schrieb Da

Re: I'd just like to say thanks for D

2013-03-11 Thread Ali Çehreli
This has become a C++ thread but... :) On 03/11/2013 02:30 AM, FG wrote: > the good old stream code: > > std::stringstream ss; ss << number; out = ss.str(); > > Seriously? If I could at least chain that... > > out = std::stringstream(number).str(); > > Unfortunately, no. We consider Boost a par

Re: I'd just like to say thanks for D

2013-03-11 Thread Jonathan M Davis
On Sunday, March 10, 2013 13:56:54 Maxim Fomin wrote: > I found this is interesting to hear that somebody with excellent > D project knowledge is happy with the language taking into > accounts bugs, non-completed features, limited third library > support and poor tool chain. Of course I am. Anyone

Re: The new std.process is ready for review

2013-03-11 Thread Steven Schveighoffer
On Mon, 11 Mar 2013 01:24:17 -0400, Marco Leise wrote: Am Sun, 10 Mar 2013 21:10:24 -0400 schrieb "Steven Schveighoffer" : I think we can find a mix. Since fork gives you a convenient location to close all open file descriptors, we should do so by default. But if you want standard posix b

Re: C++ guys hate static_if?

2013-03-11 Thread Nick Treleaven
On 09/03/2013 11:15, Artur Skawina wrote: Seriously though, they point out several problems, some of which are C++ context specific (like mixing CPP w/ static-if and lack of introspection). Other mentioned issues are not real problems in practice, or not even problems at all. What's left is: -

Re: D benchmarks

2013-03-11 Thread Dmitry Olshansky
11-Mar-2013 03:36, David Nadlinger пишет: Hi all, I am currently finalizing my material for the LDC DConf talk, and I thought it would be nice to include a quick runtime performance comparison between the different compilers, just to give the audience a general sense of what to expect. Thus, I

Re: I'd just like to say thanks for D

2013-03-11 Thread Dmitry Olshansky
11-Mar-2013 13:30, FG пишет: On 2013-03-11 06:22, H. S. Teoh wrote: And now it's 2013 and g++ is still defaulting to the *old* C++?! I don't mind having to add -std=c++11 as much as dealing with its incomplete implementation. Still have to use the pcre library for regular expressions. http:

Re: C++ guys hate static_if?

2013-03-11 Thread Jouko Koski
"Nick Treleaven" wrote: On 09/03/2013 11:15, Artur Skawina wrote: > - static-if not creating scopes/is/ confusing, but what would be a > better > alternative? Isn't it only confusing to newbies? It's not hard to learn and recognize. Maybe. This is just precisely the way how it all b

Re: C++ guys hate static_if?

2013-03-11 Thread Timon Gehr
On 03/11/2013 07:55 PM, Jouko Koski wrote: "Nick Treleaven" wrote: On 09/03/2013 11:15, Artur Skawina wrote: > - static-if not creating scopes/is/ confusing, but what would be a > better > alternative? Isn't it only confusing to newbies? It's not hard to learn and recognize. Maybe.

Re: I'd just like to say thanks for D

2013-03-11 Thread Andrei Alexandrescu
On 3/11/13 1:39 PM, Ali Çehreli wrote: This has become a C++ thread but... :) On 03/11/2013 02:30 AM, FG wrote: > the good old stream code: > > std::stringstream ss; ss << number; out = ss.str(); > > Seriously? If I could at least chain that... > > out = std::stringstream(number).str();

Re: I'd just like to say thanks for D

2013-03-11 Thread Brad Anderson
On Monday, 11 March 2013 at 19:25:47 UTC, Andrei Alexandrescu wrote: On 3/11/13 1:39 PM, Ali Çehreli wrote: This has become a C++ thread but... :) On 03/11/2013 02:30 AM, FG wrote: > the good old stream code: > > std::stringstream ss; ss << number; out = ss.str(); > > Seriously? If I could at

Re: Any takers for http://d.puremagic.com/issues/show_bug.cgi?id=9673?

2013-03-11 Thread jerro
What about -oq? I assume you meant -op? I didn't know about -op flag, it seems it does solve this problem.

Re: C++ guys hate static_if?

2013-03-11 Thread Jonathan M Davis
On Monday, March 11, 2013 20:14:07 Timon Gehr wrote: > Actually, in D, static if creates its own scopes for declarations made > inside the static if condition. No, it doesn't, and it would be _way_ less useful if it did, particularly with regards to struct and class definitions. Take this code, f

Re: Release process and backwards compatibility

2013-03-11 Thread Jesse Phillips
On Saturday, 9 March 2013 at 06:22:15 UTC, deadalnix wrote: Many things can be done to mitigate that stuff. Thank you, Now we need to come up with ways to help facilitate making these changes. The first, obvious one, is to provide a version of the compiler without the fix (bug with other f

Re: I'd just like to say thanks for D

2013-03-11 Thread Walter Bright
On 3/10/2013 5:47 PM, Rob T wrote: A good start is to support a particular industry that no one else is currently catering to in enough detail. If we could figure out who is using D commercially to try and figure out what is seen as being the main strengths, then the language and its libraries co

Re: Release process and backwards compatibility

2013-03-11 Thread Jesse Phillips
On Saturday, 9 March 2013 at 07:19:34 UTC, Dicebot wrote: Any well-thought change is the way forwards as it improves the language. And is actually a regression. I disagree with your definition of regression and prefer: "A return to a former or less developed state." You tend to separate "good

Re: I'd just like to say thanks for D

2013-03-11 Thread Andrei Alexandrescu
On 3/11/13 3:31 PM, Brad Anderson wrote: Speaking of which, I noticed Facebook's Folly had a conv.h with a to<>. Was that inspired by Phobos' std.conv? https://github.com/facebook/folly/blob/master/folly/docs/Conv.md We use some text file formats (notably Hadoop/Hive) which require extensive

Re: C++ guys hate static_if?

2013-03-11 Thread Timon Gehr
On 03/11/2013 09:19 PM, Jonathan M Davis wrote: On Monday, March 11, 2013 20:14:07 Timon Gehr wrote: Actually, in D, static if creates its own scopes for declarations made inside the static if condition. No, it doesn't, Yes it does. and it would be _way_ less useful if it did, I don't th

Re: C++ guys hate static_if?

2013-03-11 Thread H. S. Teoh
On Mon, Mar 11, 2013 at 10:31:53PM +0100, Timon Gehr wrote: > On 03/11/2013 09:19 PM, Jonathan M Davis wrote: > >On Monday, March 11, 2013 20:14:07 Timon Gehr wrote: > >>Actually, in D, static if creates its own scopes for declarations > >>made inside the static if condition. > > > >No, it doesn't,

Re: C++ guys hate static_if?

2013-03-11 Thread monarch_dodra
On Monday, 11 March 2013 at 22:12:46 UTC, monarch_dodra wrote: On Monday, 11 March 2013 at 21:31:53 UTC, Timon Gehr wrote: On 03/11/2013 09:19 PM, Jonathan M Davis wrote: On Monday, March 11, 2013 20:14:07 Timon Gehr wrote: Actually, in D, static if creates its own scopes for declarations made

Re: C++ guys hate static_if?

2013-03-11 Thread monarch_dodra
On Monday, 11 March 2013 at 21:31:53 UTC, Timon Gehr wrote: On 03/11/2013 09:19 PM, Jonathan M Davis wrote: On Monday, March 11, 2013 20:14:07 Timon Gehr wrote: Actually, in D, static if creates its own scopes for declarations made inside the static if condition. No, it doesn't, Yes it doe

Re: C++ guys hate static_if?

2013-03-11 Thread ponce
On Saturday, 9 March 2013 at 00:48:59 UTC, DypthroposTheImposter wrote: See the static_if paper here: http://isocpp.org/forums Under the post "constraints and static if" there is a link to a document about static_if https://docs.google.com/viewer?a=v&pid=forums&srcid=MDIyMDc3NjUwMTczOTM

Re: C++ guys hate static_if?

2013-03-11 Thread monarch_dodra
On Monday, 11 March 2013 at 22:08:10 UTC, H. S. Teoh wrote: On Mon, Mar 11, 2013 at 10:31:53PM +0100, Timon Gehr wrote: On 03/11/2013 09:19 PM, Jonathan M Davis wrote: >On Monday, March 11, 2013 20:14:07 Timon Gehr wrote: >>Actually, in D, static if creates its own scopes for >>declarations >>

Re: C++ guys hate static_if?

2013-03-11 Thread Era Scarecrow
On Monday, 11 March 2013 at 21:31:53 UTC, Timon Gehr wrote: On 03/11/2013 09:19 PM, Jonathan M Davis wrote: On Monday, March 11, 2013 20:14:07 Timon Gehr wrote: Actually, in D, static if creates its own scopes for declarations made inside the static if condition. No, it doesn't, Yes it doe

Re: C++ guys hate static_if?

2013-03-11 Thread Jesse Phillips
On Monday, 11 March 2013 at 21:31:53 UTC, Timon Gehr wrote: static if(is(typeof(var) == int)) int j = 22; What is the point? Your example code does not make any declaration inside the static if condition. I'm not sure what your definition of declaration is, but that looks like o

Re: The new std.process is ready for review

2013-03-11 Thread Steven Schveighoffer
On Sat, 09 Mar 2013 23:52:26 -0500, Vladimir Panteleev wrote: On Sunday, 10 March 2013 at 03:48:36 UTC, Steven Schveighoffer wrote: IIRC, you were able to get something working there with std.process2. Is that example still working? I'm trying to see what could be different that's c

Re: Migrating dmd to D?

2013-03-11 Thread FG
On 2013-03-11 18:36, Iain Buclaw wrote: (The D conversion seems to think it's lisp). (LOL)

Re: Migrating dmd to D?

2013-03-11 Thread Martin Nowak
On 03/03/2013 08:34 PM, Dicebot wrote: I'd argue that at least templates should not require run-time stuff at all. Templates do not require any runtime support.

Re: Any takers for http://d.puremagic.com/issues/show_bug.cgi?id=9673?

2013-03-11 Thread Vladimir Panteleev
On Monday, 11 March 2013 at 19:44:31 UTC, jerro wrote: What about -oq? I assume you meant -op? I didn't know about -op flag, it seems it does solve this problem. Oops, it looks like -oq is something ldc-specific. It implements your exact suggestion (creates a.b.c.obj instead of c.obj or a/

Re: C++ guys hate static_if?

2013-03-11 Thread Timon Gehr
On 03/11/2013 11:06 PM, H. S. Teoh wrote: On Mon, Mar 11, 2013 at 10:31:53PM +0100, Timon Gehr wrote: On 03/11/2013 09:19 PM, Jonathan M Davis wrote: On Monday, March 11, 2013 20:14:07 Timon Gehr wrote: Actually, in D, static if creates its own scopes for declarations made inside the static if

Re: C++ guys hate static_if?

2013-03-11 Thread Timon Gehr
On 03/11/2013 11:15 PM, monarch_dodra wrote: ... I think that's bug material. The "is" definition should end at the end of that block. http://d.puremagic.com/issues/show_bug.cgi?id=9693

Re: C++ guys hate static_if?

2013-03-11 Thread Jonathan M Davis
On Monday, March 11, 2013 23:12:45 monarch_dodra wrote: > What *are* you talking about??? I can count 4 declarations in 2 > static ifs? What is your definition of "declaration" and "scope". > > There's a misunderstanding somewhere here. Can YOU show us an > example where there is a declaration tha

Re: C++ guys hate static_if?

2013-03-11 Thread Andrej Mitrovic
On 3/12/13, Jonathan M Davis wrote: > There's clearly a fundamental misunderstanding Clearly 10 people in here haven't read his sentence properly where he said "in the static if **condition**", and not the static if *block*.

Re: C++ guys hate static_if?

2013-03-11 Thread Nick Sabalausky
On Mon, 11 Mar 2013 20:53:59 -0400 "Jonathan M Davis" wrote: > On Monday, March 11, 2013 23:12:45 monarch_dodra wrote: > > What *are* you talking about??? I can count 4 declarations in 2 > > static ifs? What is your definition of "declaration" and "scope". > > > > There's a misunderstanding some

Re: C++ guys hate static_if?

2013-03-11 Thread H. S. Teoh
On Mon, Mar 11, 2013 at 09:03:20PM -0400, Nick Sabalausky wrote: > On Mon, 11 Mar 2013 20:53:59 -0400 > "Jonathan M Davis" wrote: > > > On Monday, March 11, 2013 23:12:45 monarch_dodra wrote: > > > What *are* you talking about??? I can count 4 declarations in 2 > > > static ifs? What is your defi

Re: C++ guys hate static_if?

2013-03-11 Thread deadalnix
On Monday, 11 March 2013 at 22:42:26 UTC, Era Scarecrow wrote: On Monday, 11 March 2013 at 21:31:53 UTC, Timon Gehr wrote: On 03/11/2013 09:19 PM, Jonathan M Davis wrote: On Monday, March 11, 2013 20:14:07 Timon Gehr wrote: Actually, in D, static if creates its own scopes for declarations made

Re: C++ guys hate static_if?

2013-03-11 Thread deadalnix
On Tuesday, 12 March 2013 at 00:54:18 UTC, Jonathan M Davis wrote: On Monday, March 11, 2013 23:12:45 monarch_dodra wrote: What *are* you talking about??? I can count 4 declarations in 2 static ifs? What is your definition of "declaration" and "scope". There's a misunderstanding somewhere her

Re: C++ guys hate static_if?

2013-03-11 Thread so
On Saturday, 9 March 2013 at 14:09:39 UTC, Andrei Alexandrescu wrote: Wow. That's quite out of character for Bjarne. I think it's quite a poor piece. Andrei I simply didn't have the stomach to read it after the first paragraph. They have no idea what they are talking about. It is as if th

Re: Migrating dmd to D?

2013-03-11 Thread Daniel Murphy
"Iain Buclaw" wrote in message news:mailman.357.1363023395.14496.digitalmar...@puremagic.com... > > (The D conversion seems to think it's lisp). > Expression resolveLoc(Loc loc, Scope sc) { tracein("resolveLoc"); scope(success) traceout("resolveLoc"); scope(failure) traceerr(

Re: C++ guys hate static_if?

2013-03-11 Thread TommiT
On Saturday, 9 March 2013 at 16:42:56 UTC, deadalnix wrote: On Saturday, 9 March 2013 at 15:22:55 UTC, monarch_dodra wrote: [..] BTW, in regards to template constraints (not the rest), he does have a point. We have raised the exact same issues here on the boards more than once. The more I th

Re: C++ guys hate static_if?

2013-03-11 Thread Jesse Phillips
On Tuesday, 12 March 2013 at 01:00:58 UTC, Andrej Mitrovic wrote: On 3/12/13, Jonathan M Davis wrote: There's clearly a fundamental misunderstanding Clearly 10 people in here haven't read his sentence properly where he said "in the static if **condition**", and not the static if *block*.

One case of array assignments

2013-03-11 Thread bearophile
A small question relative to this issue (see it for more info): http://d.puremagic.com/issues/show_bug.cgi?id=4565 Today this syntax compiles: void main() { int[1][3] a2; a2[0][] = 1; a2[1][] = 2; a2[2][] = 3; } This used to compile fine, but today it gives warnings (and this

Re: Any takers for http://d.puremagic.com/issues/show_bug.cgi?id=9673?

2013-03-11 Thread Marco Leise
Am Tue, 12 Mar 2013 01:09:52 +0100 schrieb "Vladimir Panteleev" : > On Monday, 11 March 2013 at 19:44:31 UTC, jerro wrote: > >> What about -oq? > > > > I assume you meant -op? I didn't know about -op flag, it seems > > it does solve this problem. > > Oops, it looks like -oq is something ldc-spec

Re: C++ guys hate static_if?

2013-03-11 Thread deadalnix
On Tuesday, 12 March 2013 at 02:39:06 UTC, TommiT wrote: On Saturday, 9 March 2013 at 16:42:56 UTC, deadalnix wrote: On Saturday, 9 March 2013 at 15:22:55 UTC, monarch_dodra wrote: [..] BTW, in regards to template constraints (not the rest), he does have a point. We have raised the exact same

Re: Any takers for http://d.puremagic.com/issues/show_bug.cgi?id=9673?

2013-03-11 Thread jerro
Oops, it looks like -oq is something ldc-specific. It implements your exact suggestion (creates a.b.c.obj instead of c.obj or a/b/c.obj). Thanks, didn't know about that one either. It does seem nice - too bad it's only supported by LDC.

Re: C++ guys hate static_if?

2013-03-11 Thread Walter Bright
On 3/11/2013 8:43 PM, deadalnix wrote: Yes, that is the idea. It seems really cool. It's interfaces without the vtable[]. It's still solely based on type signatures. D constraints make pretty much anything that can be computed at compile time a testable gate.

Re: Any takers for http://d.puremagic.com/issues/show_bug.cgi?id=9673?

2013-03-11 Thread Andrej Mitrovic
On 3/12/13, jerro wrote: >> Oops, it looks like -oq is something ldc-specific. It >> implements your exact suggestion (creates a.b.c.obj instead of >> c.obj or a/b/c.obj). > > Thanks, didn't know about that one either. It does seem nice - > too bad it's only supported by LDC. > You can always fil

Re: C++ guys hate static_if?

2013-03-11 Thread deadalnix
On Tuesday, 12 March 2013 at 04:34:05 UTC, Walter Bright wrote: On 3/11/2013 8:43 PM, deadalnix wrote: Yes, that is the idea. It seems really cool. It's interfaces without the vtable[]. It's still solely based on type signatures. D constraints make pretty much anything that can be computed a

Re: Migrating dmd to D?

2013-03-11 Thread dennis luehring
Am 12.03.2013 03:25, schrieb Daniel Murphy: "Iain Buclaw" wrote in message news:mailman.357.1363023395.14496.digitalmar...@puremagic.com... (The D conversion seems to think it's lisp). Expression resolveLoc(Loc loc, Scope sc) { tracein("resolveLoc"); scope(success) trace

Re: C++ guys hate static_if?

2013-03-11 Thread Walter Bright
On 3/11/2013 10:49 PM, deadalnix wrote: And this is very similar to our template constraint system and static if, except we are meta here (ie, meta dynamic typing vs meta static typing). The issue I have with it is it is only able to express concepts as types. Values are important, too, as the

Re: C++ guys hate static_if?

2013-03-11 Thread deadalnix
On Tuesday, 12 March 2013 at 06:05:54 UTC, Walter Bright wrote: On 3/11/2013 10:49 PM, deadalnix wrote: And this is very similar to our template constraint system and static if, except we are meta here (ie, meta dynamic typing vs meta static typing). The issue I have with it is it is only abl

Re: C++ guys hate static_if?

2013-03-11 Thread Walter Bright
On 3/11/2013 11:17 PM, deadalnix wrote: Both definitively have advantages and drawbacks. Does the C++ team have any plan on making concept work with values ? I don't know. Concepts are for instance THE perfect match for all kind of range we have. Not for infinite ranges, which depend on emp

Re: About structs and performant handling

2013-03-11 Thread Zach the Mystic
On Monday, 11 March 2013 at 10:55:50 UTC, Namespace wrote: On Sunday, 10 March 2013 at 19:27:01 UTC, Namespace wrote: But you could prohibit any manipulation of a '&' parameter. Eg. you could make him 'scope' by default (if 'scope' will work someday). A better solution would be to require tha