Re: dlib - d utility library

2012-09-29 Thread Timur Gafarov
28.09.2012 20:47, Peter Alexander пишет: On Friday, 28 September 2012 at 09:43:34 UTC, Timur Gafarov wrote: dlib is a growing collection of native D language libraries serving as a framework for various higher-level projects - such as game engines, rendering pipelines and multimedia

Re: D 1.076 Alpha for Windows 64 bits, works with VS 2010

2012-09-29 Thread Nick Sabalausky
On Fri, 28 Sep 2012 18:20:12 -0700 Brad Roberts bra...@slice-2.puremagic.com wrote: On Fri, 28 Sep 2012, Walter Bright wrote: True, but I would never write code that tried to throw an exception across language boundaries, anyway. It's just asking for trouble. And that's fine for your

Re: D 1.076 Alpha for Windows 64 bits, works with VS 2010

2012-09-29 Thread Jonathan M Davis
On Saturday, September 29, 2012 06:41:01 Nick Sabalausky wrote: On Fri, 28 Sep 2012 18:20:12 -0700 Brad Roberts bra...@slice-2.puremagic.com wrote: On Fri, 28 Sep 2012, Walter Bright wrote: True, but I would never write code that tried to throw an exception across language boundaries,

Re: dlib - d utility library

2012-09-29 Thread Jacob Carlborg
On 2012-09-28 19:47, Peter Alexander wrote: A note on your Vector implementation. Currently you use the vector operators, e.g. Vector!(T,size) opAddAssign (Vector!(T,size) v) body { arrayof[] += v.arrayof[]; return this; } This is fine for large vectors,

Re: D 1.076 Alpha for Windows 64 bits, works with VS 2010

2012-09-29 Thread Jacob Carlborg
On 2012-09-29 03:01, Walter Bright wrote: True, but I would never write code that tried to throw an exception across language boundaries, anyway. It's just asking for trouble. If everything is working correctly and is compatible it shouldn't be any problems. -- /Jacob Carlborg

Re: D 1.076 Alpha for Windows 64 bits, works with VS 2010

2012-09-29 Thread Andrej Mitrovic
On 9/29/12, Jacob Carlborg d...@me.com wrote: On 2012-09-29 03:01, Walter Bright wrote: True, but I would never write code that tried to throw an exception across language boundaries, anyway. It's just asking for trouble. If everything is working correctly and is compatible it shouldn't be

Re: dlib - d utility library

2012-09-29 Thread Dmitry Olshansky
On 28-Sep-12 21:47, Peter Alexander wrote: On Friday, 28 September 2012 at 09:43:34 UTC, Timur Gafarov wrote: dlib is a growing collection of native D language libraries serving as a framework for various higher-level projects - such as game engines, rendering pipelines and multimedia

Re: dlib - d utility library

2012-09-29 Thread Dmitry Olshansky
On 29-Sep-12 20:39, Dmitry Olshansky wrote: On 28-Sep-12 21:47, Peter Alexander wrote: On Friday, 28 September 2012 at 09:43:34 UTC, Timur Gafarov wrote: dlib is a growing collection of native D language libraries serving as a framework for various higher-level projects - such as game engines,

Re: D 1.076 Alpha for Windows 64 bits, works with VS 2010

2012-09-29 Thread Jacob Carlborg
On 2012-09-29 18:08, Andrej Mitrovic wrote: Also how are we supposed to control when a C++ library throws? We could wrap every single function wrapper with a try/catch, but won't this create a massive slowdown? I'm not sure but I don't think so. As I understand it, DWARF on Posix and SEH on

Re: D 1.076 Alpha for Windows 64 bits, works with VS 2010

2012-09-29 Thread Andrej Mitrovic
On 9/29/12, Jacob Carlborg d...@me.com wrote: I'm not sure but I don't think so. As I understand it, DWARF on Posix and SEH on Windows are zero-cost exception handling systems. This means that there will be no performance loss at runtime as long as no exception is thrown. setjmp/longjmp on the

Re: Rust and D

2012-09-29 Thread Nick Sabalausky
On Fri, 28 Sep 2012 18:33:31 -0700 José Armando García Sancio jsan...@gmail.com wrote: On Fri, Sep 28, 2012 at 3:21 PM, Nick Sabalausky seewebsitetocontac...@semitwist.com wrote: (My apologies if the article's author is reading this, no offense was intended.) Doubt it. I believe the

Re: I have a feature request: Named enum scope inference

2012-09-29 Thread kenji hara
2012/9/29 Tommi tommitiss...@hotmail.com: On Saturday, 29 September 2012 at 04:26:01 UTC, Alex Rønne Petersen wrote: It's an awful lot of magic (it's not as easy in the implementation as it sounds like) for questionable gain when we have the with statement IMO. it's not as easy in the

Re: Rust and D

2012-09-29 Thread Peter Alexander
On Saturday, 29 September 2012 at 06:11:30 UTC, Nick Sabalausky wrote: (Had to look up that name) Ahh, I see. That explains the dismissal of metaprogramming and generics, and the dismissal Go's objectors via a roundabout strawman (Ie by complaining about the act of complaining, and by

Re: I have a feature request: Named enum scope inference

2012-09-29 Thread Iain Buclaw
On 29 September 2012 04:12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On 9/29/12, Jonathan M Davis jmdavisp...@gmx.com wrote: you could simply use with to solve the problem: with(MyFruit) { switch(fruit) { case apple: break; case orange: break;

Re: Rust and D

2012-09-29 Thread Nick Sabalausky
On Sat, 29 Sep 2012 10:08:29 +0200 Peter Alexander peter.alexander...@gmail.com wrote: He's not dismissive of their importance. The point was that if you can dismiss a language based solely on its lack of generics Goes back to my other original point: --- 2. [He's dismissing]

Re: Rust and D

2012-09-29 Thread Peter Alexander
On Saturday, 29 September 2012 at 10:27:26 UTC, Nick Sabalausky wrote: If he were talking about some minor insignificant feature, then I agree it'd be goofy to reject a language solely because of that. But that's not what's happening. Generics are a major thing. Many people *do* find them to

Re: Rust and D

2012-09-29 Thread Peter Alexander
On Saturday, 29 September 2012 at 10:27:26 UTC, Nick Sabalausky wrote: Problem is, that's irrelevant: The important point he's missing is If feature X is helpful, then why should I *bother* going without, when there are plenty of other languages (such as the one I'm already using) that *do*

Re: Rust and D

2012-09-29 Thread Paulo Pinto
On Saturday, 29 September 2012 at 10:53:57 UTC, Peter Alexander wrote: On Saturday, 29 September 2012 at 10:27:26 UTC, Nick Sabalausky wrote: If he were talking about some minor insignificant feature, then I agree it'd be goofy to reject a language solely because of that. But that's not what's

Re: I have a feature request: Named enum scope inference

2012-09-29 Thread Bernard Helyer
Yeah, to respond to the larger topic, the with statement is more than enough here. I'm not convinced that complicating lookup rules further is worth it.

Re: Rust and D

2012-09-29 Thread Peter Alexander
On Saturday, 29 September 2012 at 11:18:40 UTC, Paulo Pinto wrote: On Saturday, 29 September 2012 at 10:53:57 UTC, Peter Alexander My question to you: Is it okay to reject D solely with these arguments? If not, how is this any different from rejecting Go solely from its lack of generics?

Re: Rust and D

2012-09-29 Thread Thiez
On Saturday, 29 September 2012 at 10:53:57 UTC, Peter Alexander wrote: So, with this in mind, do you think these hypothetical people are all justified? (a) [Go programmer]: D is rubbish because it doesn't have channels. (b) [Lisp programmer]: D is rubbish because it doesn't have

Re: Rust and D

2012-09-29 Thread Andrei Alexandrescu
On 9/28/12 5:54 PM, Peter Alexander wrote: On Friday, 28 September 2012 at 17:42:07 UTC, Froglegs wrote: The Rust website says this: Generic types yes, only simple, non-turing-complete substitution After seeing that I just assumed the language was worthless and ignored it.. is there something

Re: DIP19: Remove comma operator from D and provision better syntactic support for tuples

2012-09-29 Thread Jacob Carlborg
On 2012-09-28 19:09, deadalnix wrote: It is ambiguous with the comma declaration syntax. I could live without it. -- /Jacob Carlborg

Re: dynamic library building and loading

2012-09-29 Thread Jacob Carlborg
On 2012-09-28 20:25, Maxim Fomin wrote: I tried to check how TLS, EX, etc. (mostly exposed to dll issue) are working and here is some kind of test: https://github.com/mxfm/sharedtest. Unfortunately scope(exit) isn't executed when it is situated in a shared library and which calls some throwing

Re: dynamic library building and loading

2012-09-29 Thread Jacob Carlborg
On 2012-09-28 19:54, Rob T wrote: I suppose the answer is very complicated, but why can't the runtime execute as a shared lib? Is it a design limitation of the runtime model? This sort of problem should have been dealt with from the ground up, not now. What can be done to fix it, or is it a

Re: Rust and D

2012-09-29 Thread Peter Alexander
On Saturday, 29 September 2012 at 12:09:35 UTC, Thiez wrote: Would you agree D would be better if it had those features? Maybe. Maybe not. It's irrelevant. How about we rephrase to something less inflammatory: [Go programmer]: I prefer not to use D because it doesn't have channels. [Lisp

Re: Rust and D

2012-09-29 Thread Nick Sabalausky
On Sat, 29 Sep 2012 08:15:56 -0400 Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: (I don't see how the parallel with the actress anecdote holds, as the punchline there is that an actor has to imagine being in other lines of work as the very part of acting.) I'd been thinking the

Re: Rust and D

2012-09-29 Thread Nick Sabalausky
On Sat, 29 Sep 2012 13:06:33 +0200 Peter Alexander peter.alexander...@gmail.com wrote: The answer to that question is obvious: you should bother going without because other languages provide other things that your pet language does not (e.g. channels + simplicity in this case). Searching

Re: Rust and D

2012-09-29 Thread Paulo Pinto
On Saturday, 29 September 2012 at 12:04:50 UTC, Peter Alexander wrote: On Saturday, 29 September 2012 at 11:18:40 UTC, Paulo Pinto wrote: On Saturday, 29 September 2012 at 10:53:57 UTC, Peter Alexander My question to you: Is it okay to reject D solely with these arguments? If not, how is this

Re: Rust and D

2012-09-29 Thread Peter Alexander
On Saturday, 29 September 2012 at 14:03:52 UTC, Nick Sabalausky wrote: And sometimes I need to get work done instead of trying out all of the 100's of languages out there in some altruistic quest to be fair to everybody. Nothing wrong with that, but rejecting a language because you don't

Re: I have a feature request: Named enum scope inference

2012-09-29 Thread Tommi
On Saturday, 29 September 2012 at 05:47:59 UTC, Bernard Helyer wrote: Except a theoretical feature doesn't exist, so someone has to write the code. So no, it's not an 'unacceptable argument'. I'll explain my way of seeing this in the form we all understand: code. bool tryImplement(Feature

Re: Rust and D

2012-09-29 Thread Nick Sabalausky
On Sat, 29 Sep 2012 12:54:26 +0200 Peter Alexander peter.alexander...@gmail.com wrote: On Saturday, 29 September 2012 at 10:27:26 UTC, Nick Sabalausky wrote: If he were talking about some minor insignificant feature, then I agree it'd be goofy to reject a language solely because of

Re: Rust and D

2012-09-29 Thread Nick Sabalausky
On Sat, 29 Sep 2012 14:05:19 +0200 Peter Alexander peter.alexander...@gmail.com wrote: Interestingly, Rob Pike comments on this world view: http://commandcenter.blogspot.co.uk/2012/06/less-is-exponentially-more.html Early in the rollout of Go I was told by someone that he could not

Re: I have a feature request: Named enum scope inference

2012-09-29 Thread Ben Davis
On 29/09/2012 04:11, Andrej Mitrovic wrote: On 9/29/12, David Piepgrass qwertie...@gmail.com wrote: I like the spirit of this feature, but as Alex pointed out, ambiguity is possible (which could theoretically cause errors in existing code) It could also cause subtle problems because enum

Re: Rust and D

2012-09-29 Thread Nick Sabalausky
On Sat, 29 Sep 2012 16:15:51 +0200 Peter Alexander peter.alexander...@gmail.com wrote: On Saturday, 29 September 2012 at 14:03:52 UTC, Nick Sabalausky wrote: And sometimes I need to get work done instead of trying out all of the 100's of languages out there in some altruistic quest to

Re: I have a feature request: Named enum scope inference

2012-09-29 Thread Tommi
On Saturday, 29 September 2012 at 07:04:19 UTC, kenji hara wrote: After a while, you may add a global variable in module scope. enum E { foo ,bar } int foo = 10; void test(E e) {} void main() { test(foo); // foo is defined, and look up module scope foo. // Then, now the code is

Getting started with D - Phobos documentation sucks

2012-09-29 Thread Mr. Anonymous
Hi guys. I was browsing the book Programming in D by Ali Çehreli. It was pretty much clear, and then I stumbled upon this on page 89: 20.9 Exercises 1. Browse the documentations of the std.string, std.array, std.algorithm, and std.range modules. OK, let's open the D website and browse the

Re: Getting started with D - Phobos documentation sucks

2012-09-29 Thread Timon Gehr
On 09/29/2012 05:30 PM, Mr. Anonymous wrote: Hi guys. I was browsing the book Programming in D by Ali Çehreli. It was pretty much clear, and then I stumbled upon this on page 89: 20.9 Exercises 1. Browse the documentations of the std.string, std.array, std.algorithm, and std.range modules.

Re: dynamic library building and loading

2012-09-29 Thread Maxim Fomin
On Saturday, 29 September 2012 at 13:19:01 UTC, Jacob Carlborg wrote: That's a fairly uninteresting test. I am not a D developer which means I have no incentive in blindly portraying D as a language having shared libraries support when in fact it has some issues. I am a D user which has

Re: Getting started with D - Phobos documentation sucks

2012-09-29 Thread MattCoder
On Saturday, 29 September 2012 at 15:29:46 UTC, Mr. Anonymous wrote: 1. Browse the documentations of the std.string, std.array, std.algorithm, and std.range modules. OK, let's open the D website and browse the documentation of std.string: http://dlang.org/phobos/std_string.html What do we

Re: Getting started with D - Phobos documentation sucks

2012-09-29 Thread Mr. Anonymous
On Saturday, 29 September 2012 at 15:46:36 UTC, MattCoder wrote: On Saturday, 29 September 2012 at 15:29:46 UTC, Mr. Anonymous wrote: 1. Browse the documentations of the std.string, std.array, std.algorithm, and std.range modules. OK, let's open the D website and browse the documentation of

Re: Getting started with D - Phobos documentation sucks

2012-09-29 Thread Tommi
On Saturday, 29 September 2012 at 15:29:46 UTC, Mr. Anonymous wrote: Hi guys. I was browsing the book Programming in D by Ali Çehreli. It was pretty much clear, and then I stumbled upon this on page 89: 20.9 Exercises 1. Browse the documentations of the std.string, std.array, std.algorithm,

Re: dynamic library building and loading

2012-09-29 Thread Jacob Carlborg
On 2012-09-29 17:40, Maxim Fomin wrote: I was not taking about dynamic loading, but about dynamic linking. If I understand topic right, the issue is the former, not the latter. The title of the thread says ... and loading. BTW, in majority cases dynamic loading gives no advantages over

Re: Getting started with D - Phobos documentation sucks

2012-09-29 Thread MattCoder
On Saturday, 29 September 2012 at 15:53:17 UTC, Mr. Anonymous wrote: Don't get me wrong, I'm not saying somebody owes me something. I love D and appreciate the effort the community puts in it, otherwise I probably wouldn't write this post. I'm just saying that, in my opinion, it's a high

Re: Getting started with D - Phobos documentation sucks

2012-09-29 Thread Tommi
And there's also the D Templates Tutorial at: https://github.com/PhilippeSigaud/D-templates-tutorial/blob/master/dtemplates.pdf (click View Raw on that page)

Re: Getting started with D - Phobos documentation sucks

2012-09-29 Thread Andrei Alexandrescu
On 9/29/12 11:30 AM, Mr. Anonymous wrote: I think documentation is really important, and something has to be done about it. How can a newcomer get started with D when he doesn't have a readable documentation of Phobos? Agree. It's high time we replace the silly litany of names at the top with

Re: Rust and D

2012-09-29 Thread Peter Alexander
On Saturday, 29 September 2012 at 14:27:03 UTC, Nick Sabalausky wrote: My question to you: Is it okay to reject D solely with these arguments? If it's in-line with their needs, then yes. It'd be both selfish and absurd for us to demand that everyone tries out and becomes proficient with our

Re: Getting started with D - Phobos documentation sucks

2012-09-29 Thread monarch_dodra
On Saturday, 29 September 2012 at 16:34:41 UTC, Andrei Alexandrescu wrote: On 9/29/12 11:30 AM, Mr. Anonymous wrote: I think documentation is really important, and something has to be done about it. How can a newcomer get started with D when he doesn't have a readable documentation of Phobos?

Re: Getting started with D - Phobos documentation sucks

2012-09-29 Thread Adam D. Ruppe
On Saturday, 29 September 2012 at 17:03:26 UTC, monarch_dodra wrote: Well, they *are* better than nothing at all. Sure, in the best of worlds, we'd have lovingly hand written indexes and documentation, such as for std_algorithm. However, for those modules that *don't* have that hand written

Re: Getting started with D - Phobos documentation sucks

2012-09-29 Thread deadalnix
Le 29/09/2012 19:09, Adam D. Ruppe a écrit : On Saturday, 29 September 2012 at 17:03:26 UTC, monarch_dodra wrote: Well, they *are* better than nothing at all. Sure, in the best of worlds, we'd have lovingly hand written indexes and documentation, such as for std_algorithm. However, for those

Re: Getting started with D - Phobos documentation sucks

2012-09-29 Thread Dmitry Olshansky
On 29-Sep-12 21:13, deadalnix wrote: Le 29/09/2012 19:09, Adam D. Ruppe a écrit : On Saturday, 29 September 2012 at 17:03:26 UTC, monarch_dodra wrote: Well, they *are* better than nothing at all. Sure, in the best of worlds, we'd have lovingly hand written indexes and documentation, such as

Re: Rust and D

2012-09-29 Thread Nick Sabalausky
On Sat, 29 Sep 2012 19:04:01 +0200 Peter Alexander peter.alexander...@gmail.com wrote: On Saturday, 29 September 2012 at 14:27:03 UTC, Nick Sabalausky wrote: My question to you: Is it okay to reject D solely with these arguments? If it's in-line with their needs, then yes. It'd be

Re: I have a feature request: Named enum scope inference

2012-09-29 Thread Tommi
But, if we were allowed to make a breaking change, then this is how I think it should work: // in a module scope... enum E { foo, bar }; - // These cause a compile error foo is ambiguous: 1) E foo = E.bar; 2) E foo = E.foo; 3) enum

Re: I have a feature request: Named enum scope inference

2012-09-29 Thread Andrei Alexandrescu
On 9/29/12 2:44 PM, Tommi wrote: But, if we were allowed to make a breaking change I stopped reading here :o). Andrei

Re: Rust and D

2012-09-29 Thread Walter Bright
On 9/29/2012 1:08 AM, Peter Alexander wrote: As you can see, no matter what you think of these features, the arguments are pointless because it is very clear that you can do meaningful work without them. We get by without channels, homoiconicity, and full program type inference; just as the Go

Re: Rust and D

2012-09-29 Thread Walter Bright
On 9/29/2012 3:54 AM, Peter Alexander wrote: So, with this in mind, do you think these hypothetical people are all justified? (a) [Go programmer]: D is rubbish because it doesn't have channels. (b) [Lisp programmer]: D is rubbish because it doesn't have homoiconicity. (c) [Haskell programmer]:

Re: Rust and D

2012-09-29 Thread Walter Bright
On 9/29/2012 5:05 AM, Peter Alexander wrote: There's two ways to interpret this sentence: 1. You claim it is okay to reject Go because it differs from other statically typed languages, or 2. You claim that all statically typed languages must have generics to be worth using. I hope it is not 1,

Re: Rust and D

2012-09-29 Thread Jesse Phillips
On Saturday, 29 September 2012 at 17:03:33 UTC, Peter Alexander wrote: I'm sure most people here have seen similar arguments against D. The complaint I've seen in a similar vain have been, D is too complex it has everything and the kitchen sink if someone asks for it, it gets added And

Re: Rust and D

2012-09-29 Thread Franciszek Czekała
On Saturday, 29 September 2012 at 19:09:46 UTC, Walter Bright wrote: On 9/29/2012 1:08 AM, Peter Alexander wrote: As you can see, no matter what you think of these features, the arguments are pointless because it is very clear that you can do meaningful work without them. We get by without

Re: Rust and D

2012-09-29 Thread Peter Alexander
On Saturday, 29 September 2012 at 19:09:46 UTC, Walter Bright wrote: On 9/29/2012 1:08 AM, Peter Alexander wrote: As you can see, no matter what you think of these features, the arguments are pointless because it is very clear that you can do meaningful work without them. We get by without

Re: I have a feature request: Named enum scope inference

2012-09-29 Thread Tommi
Scratch my previous post. It had a weird rule where the types of identifiers had a say in whether or not there's ambiguity in the name lookup. That's just silly. It should always be an ambiguity error if the names are identical. This new rule is easier to conceptualize too. Basically you just

Re: Rust and D

2012-09-29 Thread Timon Gehr
On 09/29/2012 09:12 PM, Walter Bright wrote: On 9/29/2012 3:54 AM, Peter Alexander wrote: So, with this in mind, do you think these hypothetical people are all justified? (a) [Go programmer]: D is rubbish because it doesn't have channels. (b) [Lisp programmer]: D is rubbish because it doesn't

Re: Rust and D

2012-09-29 Thread Nick Sabalausky
On Sun, 30 Sep 2012 00:12:33 +0200 Peter Alexander peter.alexander...@gmail.com wrote: On Saturday, 29 September 2012 at 19:09:46 UTC, Walter Bright wrote: I think that argument is making the claims that: 1. all features are equally valuable 2. if one can get by without a feature,

Re: Rust and D

2012-09-29 Thread jerro
1. all features are equally valuable 2. if one can get by without a feature, then that feature is not needed Both of those are invalid. I'm not making claim 1, and claim 2 is true by definition. Brainfuck has all the needed language features by that definition.

Re: I have a feature request: Named enum scope inference

2012-09-29 Thread Tommi
Although it's not very obvious what is a hot-spot and what is not. enum Char { a, b, c, d } Char a = c; // OK: 'c' is in a hot-spot Char b = c + 1; // ERROR: 'c' is undefined, because it's not in // a hot-spot and therefore Char enumerations // aren't visible.

Re: I have a feature request: Named enum scope inference

2012-09-29 Thread Mehrdad
On Saturday, 29 September 2012 at 02:57:42 UTC, David Piepgrass wrote: I have a feature request: Named enum scope inference The idea is, that whenever a named enum value is expected, you don't need to explicitly specify the scope of the enum value. This would reduce redundancy in typing, just

Re: I have a feature request: Named enum scope inference

2012-09-29 Thread Rob T
On Saturday, 29 September 2012 at 23:49:47 UTC, Tommi wrote: It is quite a mess. I think I'm ready to admit that this is not a feature we'd like to have in this language (probably not in any language for that matter). Using with should do the trick just fine for the few situations where

Re: Getting started with D - Phobos documentation sucks

2012-09-29 Thread Adam D. Ruppe
On Saturday, 29 September 2012 at 17:20:48 UTC, Dmitry Olshansky wrote: Agreed. What's needed to make it a reality ? Need to integrate my helper program into the website build process. Program here: http://arsdnet.net/d-web-site/improveddoc.d libs needed

Re: Getting started with D - Phobos documentation sucks

2012-09-29 Thread Jonathan M Davis
On Sunday, September 30, 2012 04:17:59 Adam D. Ruppe wrote: When I tried this earlier, I couldn't even get the basic website to build on my box from github. I think it needs github phobos too but meh, I moved on to something else and never got back to it. Unless something's changed recently,

Re: Rust and D

2012-09-29 Thread Froglegs
Go looks like a horrible combination of C and Lua, lacking the speed of C and the power of Lua(and I'd bet LuaJIT beats Go for performance). Not all features are equal, for me, meta programming is such a useful thing that a language better have something damn impressive to replace

Re: Finite state machine in D

2012-09-29 Thread Druzhinin Alexandr
28.09.2012 01:24, Philippe Sigaud пишет: Here is an example: http://dpaste.dzfl.pl/81a63163 it's really interesting for me. Seeing your code in another thread, yes code generation could help here. I have a template tutorial (a bit light on code generation) that might help you on this.

Re: Using Cairo library bindings on Windows

2012-09-29 Thread KillerSponge
On Friday, 28 September 2012 at 22:20:54 UTC, Andrej Mitrovic wrote: On 9/28/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: I have some win32 cairo samples on my github page. Here you go: https://github.com/AndrejMitrovic/cairoDSamples Just follow the readme instructions. Wow, thank

Re: compiler assertion

2012-09-29 Thread Zhenya
On Saturday, 29 September 2012 at 13:03:31 UTC, Philippe Sigaud wrote: On Fri, Sep 28, 2012 at 10:32 PM, Zhenya zh...@list.ru wrote: Thank you,understood. This should work, hopefully: import std.stdio; import std.typetuple; template sum(U...) { static if(U.length == 0)

Re: Using Cairo library bindings on Windows

2012-09-29 Thread Andrej Mitrovic
On 9/29/12, KillerSponge killerspo...@gmail.com wrote: Wow, thank you so much for the quick reply and all the effort! I am going to try this out as soon as I can (which probably won't be until Monday, sorry..) and let you know how it works out :) No problem. I also have some samples written

Struct assignment, possible DMD bug?

2012-09-29 Thread ixid
This behaviour seems inconsistent and unintuitive: void main() { int[3] a = [1,2,3]; a = [4, a[0], 6]; struct S { int a, b, c; } S s = S(1,2,3); s = S(4, s.a, 6); assert(a == [4,1,6]); assert(s == S(4,4,6)); }

Re: Struct assignment, possible DMD bug?

2012-09-29 Thread Maxim Fomin
On Saturday, 29 September 2012 at 16:05:03 UTC, ixid wrote: This behaviour seems inconsistent and unintuitive: void main() { int[3] a = [1,2,3]; a = [4, a[0], 6]; struct S { int a, b, c; } S s = S(1,2,3); s = S(4, s.a, 6);

Re: Struct assignment, possible DMD bug?

2012-09-29 Thread Timon Gehr
On 09/29/2012 06:26 PM, Maxim Fomin wrote: On Saturday, 29 September 2012 at 16:05:03 UTC, ixid wrote: This behaviour seems inconsistent and unintuitive: void main() { int[3] a = [1,2,3]; a = [4, a[0], 6]; struct S { int a, b, c; } S s = S(1,2,3); s = S(4,

Re: Struct assignment, possible DMD bug?

2012-09-29 Thread Tommi
On Saturday, 29 September 2012 at 18:16:24 UTC, Timon Gehr wrote: This seems to be a DMD bug. And a pretty serious looking one at that. That bug could make nukes fly to wrong coordinates, and that just ruins everybody's day.

Re: Struct assignment, possible DMD bug?

2012-09-29 Thread Ali Çehreli
On 09/29/2012 11:16 AM, Timon Gehr wrote: On 09/29/2012 06:26 PM, Maxim Fomin wrote: S s = S(1,2,3); s = S(4, s.a, 6); assert(a == [4,1,6]); assert(s == S(4,4,6)); } Setting the struct writes s.a before evaluating it while the reverse is true of the array assignment. Using DMD 2.0.60.

Re: Struct assignment, possible DMD bug?

2012-09-29 Thread Ali Çehreli
On 09/29/2012 04:02 PM, Timon Gehr wrote: On 09/30/2012 12:51 AM, Ali Çehreli wrote: On 09/29/2012 11:16 AM, Timon Gehr wrote: On 09/29/2012 06:26 PM, Maxim Fomin wrote: S s = S(1,2,3); s = S(4, s.a, 6); assert(a == [4,1,6]); assert(s == S(4,4,6)); } Setting the struct writes

Very strange problem with comparing floating point numbers

2012-09-29 Thread Ivan Agafonov
// Tell me about this sutation, may be it is a bug? import std.math; import std.stdio; struct Vector(int size) { union { float[size] array = 0; struct { static if (size == 2) float x, y;

Re: Struct assignment, possible DMD bug?

2012-09-29 Thread ixid
On Sunday, 30 September 2012 at 00:24:34 UTC, Ali Çehreli wrote: On 09/29/2012 04:02 PM, Timon Gehr wrote: On 09/30/2012 12:51 AM, Ali Çehreli wrote: On 09/29/2012 11:16 AM, Timon Gehr wrote: On 09/29/2012 06:26 PM, Maxim Fomin wrote: S s = S(1,2,3); s = S(4, s.a, 6); assert(a ==

Re: Struct assignment, possible DMD bug?

2012-09-29 Thread Ali Çehreli
On 09/29/2012 08:13 PM, ixid wrote: On Sunday, 30 September 2012 at 00:24:34 UTC, Ali Çehreli wrote: On 09/29/2012 04:02 PM, Timon Gehr wrote: On 09/30/2012 12:51 AM, Ali Çehreli wrote: On 09/29/2012 11:16 AM, Timon Gehr wrote: On 09/29/2012 06:26 PM, Maxim Fomin wrote: S s =

[Issue 8734] Compiler must verify exe path is writable before attempting compilation

2012-09-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8734 --- Comment #3 from Walter Bright bugzi...@digitalmars.com 2012-09-28 23:29:56 PDT --- I think it would slow things down in general. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this

[Issue 8734] Compiler must verify exe path is writable before attempting compilation

2012-09-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8734 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 8736] New: DMD should translate slashes in -of on Windows

2012-09-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8736 Summary: DMD should translate slashes in -of on Windows Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2

[Issue 8737] New: Associative Array (AA) KeyType is not Unqual-able

2012-09-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8737 Summary: Associative Array (AA) KeyType is not Unqual-able Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: major Priority: P2

[Issue 8737] Associative Array (AA) KeyType is not Unqual-able

2012-09-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8737 --- Comment #1 from monarchdo...@gmail.com 2012-09-29 15:55:11 PDT --- (In reply to comment #0) Here, the implementer of foo is unable to tranform his keys, because their types are not mutable. I meant to The real problem is that KeyType

[Issue 8733] Normalize -of path on Windows

2012-09-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8733 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added CC|

[Issue 8736] DMD should translate slashes in -of on Windows

2012-09-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8736 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 8128] unittest blocks should be allowed in interfaces

2012-09-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8128 --- Comment #3 from github-bugzi...@puremagic.com 2012-09-29 18:52:28 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 8738] New: Struct assignment constructor order of operations DMD 2.0.6

2012-09-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8738 Summary: Struct assignment constructor order of operations DMD 2.0.6 Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal