Re: New home page

2010-10-10 Thread Stephan Soller
On 07.10.2010 23:59, Nick Sabalausky wrote: Stephan Sollerstephan.sol...@helionweb.de wrote in message news:i8kmuc$15...@digitalmars.com... On 07.10.2010 14:56, Nick Sabalausky wrote: Stephan Sollerstephan.sol...@helionweb.de wrote in message news:i8k8k9$230...@digitalmars.com... [1]:

Re: New home page

2010-10-10 Thread Stephan Soller
On 07.10.2010 11:41, Bruno Medeiros wrote: On 06/10/2010 15:25, Stephan Soller wrote: On 06.10.2010 02:08, Arlo White wrote: That's because HTML/CSS is a pretty terrible language for anything beyond simple layouts. It shares more with Word/PDF/PostScript in terms of its purpose and history

Re: D 2.0 Stacktrace - similar problems

2010-10-10 Thread Rainer Schuetze
Denis already explained the stack, here's some more info: - cv2pdb demangles the function names, but uses '@' instead of '.', because '.' in a symbol confuses the Visual Studio Debugger (I don't know why the '@' is not displayed.) - the D main function has symbol _Dmain, main is the C

Re: D Concurrent GC

2010-10-10 Thread Leandro Lucarella
Leandro Lucarella, el 8 de octubre a las 01:44 me escribiste: Denis Koroskin, el 8 de octubre a las 05:14 me escribiste: I tried using your GC under D2/Windows, and unfortunately it crashes with Access Violation (I used a version modified by Sean as a starting point with little changes to

Re: New home page

2010-10-10 Thread Nick Sabalausky
Lutger lutger.blijdest...@gmail.com wrote in message news:i8ta2d$1ln...@digitalmars.com... Nick Sabalausky wrote: Stephan Soller stephan.sol...@helionweb.de wrote in message Maybe you should consider looking into some other browsers? Opera, Chrome and other Gecko based browsers might give

Re: Why all the D hate?

2010-10-10 Thread Juanjo Alvarez
On Sun, 10 Oct 2010 13:04:57 +0900, Jordi jo...@rovira.cat wrote: Sorry, shameful mistake with my shell script skills. It is 50K lines :| Mine is 4000 lines, having started to learn D from Andrei's book three weeks ago. D is not perfect but for me is perfect enough and will no doubt be my

ParserCobinator like scala in D

2010-10-10 Thread 美馬久行
Since I want parser to make a Scripting Engine, I wrote ParserCombinator which is popular in Scala in D. However, when we devotedly write parser using ParserCombinator, the source code is very dirty. Like this convert!(parseSeq!(parseOption(parseChar!('a')), parseChar!('b')),

Re: Uniform Function Call syntax for properties

2010-10-10 Thread Robert Jacques
On Sun, 10 Oct 2010 00:58:39 -0400, Denis Koroskin 2kor...@gmail.com wrote: On Sun, 10 Oct 2010 08:44:59 +0400, Robert Jacques sandf...@jhu.edu wrote: On Sat, 09 Oct 2010 22:03:56 -0400, Denis Koroskin 2kor...@gmail.com wrote: On Sun, 10 Oct 2010 05:58:00 +0400, Robert Jacques

Re: Is D right for me?

2010-10-10 Thread Jonathan M Davis
On Saturday 09 October 2010 12:44:37 Walter Bright wrote: Gour D. wrote: Walter Few things work better than customers letting a company know Walter they are interested in such-and-such a product. Even a non-paying customer in the open-source world? At least it shows interest. No emails

Re: Is D right for me?

2010-10-10 Thread Gour D.
On Sun, 10 Oct 2010 00:46:47 -0700 Jonathan == Jonathan M Davis wrote: Jonathan Yes, a lack of positive feedback can be frustrating even if Jonathan you have the best code ever. And as much as the developers of Jonathan QtD likely want to use it for their own stuff, it's likely Jonathan not

Re: CMake for D2 ready for testers

2010-10-10 Thread Gour D.
On Sat, 9 Oct 2010 16:48:15 +0200 Gour == Gour D. g...@atmarama.net wrote: Gour Rationale? I forgot to add: x) deps are determined by hash and not by timestamps Sincerely, Gour -- Gour | Hlapicina, Croatia | GPG key: CDBF17CA

Re: [Theory] Halting problem

2010-10-10 Thread Norbert Nemec
Impossible to solve is often used synonymous to exponentially hard to solve meaning, as the problem size (e.g. size of finite memory) grows as N, the cost for solution grows as exp(N). Of course, the actual cost of an actual problem always depends on the pre-factor, but experience shows that

Re: Why all the D hate?

2010-10-10 Thread Justin Johansson
On 10/10/2010 5:24 PM, Juanjo Alvarez wrote: On Sun, 10 Oct 2010 13:04:57 +0900, Jordi jo...@rovira.cat wrote: Sorry, shameful mistake with my shell script skills. It is 50K lines :| Mine is 4000 lines, having started to learn D from Andrei's book three weeks ago. D is not perfect but for me

Re: [Theory] Halting problem

2010-10-10 Thread Justin Johansson
On 10/10/2010 8:07 PM, Norbert Nemec wrote: Impossible to solve is often used synonymous to exponentially hard to solve meaning, as the problem size (e.g. size of finite memory) grows as N, the cost for solution grows as exp(N). Of course, the actual cost of an actual problem always depends on

Re: Minor site suggestion regarding NG and bugs

2010-10-10 Thread Justin Johansson
On 10/10/2010 12:32 PM, Nick Sabalausky wrote: On whatever page(s) on digitalmars.com or d-programming-language.com refer to the newsgroups, there should probably be a note (with a link) indicating that bug reports should be posted to bug tracker rather than the NG. And also that

Re: ParserCobinator like scala in D

2010-10-10 Thread bearophile
Template Library: http://ideone.com/3rKF4 ParserCombinator: http://ideone.com/YlGP2 PEGParser: http://ideone.com/vkTyh Sample(Expression of four arithmetic operations): http://ideone.com/0uc3t What do you think about this? The code looks clean enough. I suggest to use 4 spaces as indent

[theory] What is a type?

2010-10-10 Thread Justin Johansson
Specifically I have a problem in trying to implement a functional language translator in D. My target language has a rather non-conventional type system, in which, superficially at least, types can be described as being Cartesian in nature. That is, types in this system have two orthogonal

Re: Tuple literal syntax

2010-10-10 Thread Stephan Soller
On 07.10.2010 17:36, Andrei Alexandrescu wrote: On 10/7/10 10:13 CDT, Kagamin wrote: Andrei Alexandrescu Wrote: struct Coord { int x, y, z; } one iota typesafer than alias Tuple!(int, x, int, y, int, z) Coord; Is there a real need for an alternative way to declare structs? Yes. Andrei

Re: Tuple literal syntax

2010-10-10 Thread Denis Koroskin
On Sun, 10 Oct 2010 17:39:52 +0400, Stephan Soller stephan.sol...@helionweb.de wrote: On 07.10.2010 17:36, Andrei Alexandrescu wrote: On 10/7/10 10:13 CDT, Kagamin wrote: Andrei Alexandrescu Wrote: struct Coord { int x, y, z; } one iota typesafer than alias Tuple!(int, x, int, y, int,

Re: Tuple literal syntax

2010-10-10 Thread Simen kjaeraas
Stephan Soller stephan.sol...@helionweb.de wrote: However as soon as these fields are named it looks to me like an ordinary structure. So why not just create something like an anonymous structure literal that behaves to structures like anonymous functions (or delegates) to functions?

Re: Tuple literal syntax

2010-10-10 Thread bearophile
Denis Koroskin: I don't mind having Tuple in a library, as long as I'm not insisted in using it *and* it doesn't affect other language features. More modern module-based languages as D are not like C. If they want some success they develop a community of programmers that share modules. You

Re: Tuple literal syntax

2010-10-10 Thread bearophile
Simen kjaeraas: Perhaps it would be possible to augment struct static initializers for this purpose? { int a; string b } foo( ) { return { 1, text }; } What kind of tuple unpacking syntax do you suggest for this? (I think at the moment the unpacking syntax is more important than the

Re: Tuple literal syntax

2010-10-10 Thread Simen kjaeraas
bearophile bearophileh...@lycos.com wrote: Simen kjaeraas: Perhaps it would be possible to augment struct static initializers for this purpose? { int a; string b } foo( ) { return { 1, text }; } What kind of tuple unpacking syntax do you suggest for this? (I think at the moment the

Re: Tuple literal syntax

2010-10-10 Thread Denis Koroskin
On Sun, 10 Oct 2010 18:33:35 +0400, bearophile bearophileh...@lycos.com wrote: Denis Koroskin: I don't mind having Tuple in a library, as long as I'm not insisted in using it *and* it doesn't affect other language features. More modern module-based languages as D are not like C. If they

Re: Tuple literal syntax

2010-10-10 Thread Andrei Alexandrescu
On 10/10/10 9:00 CDT, Denis Koroskin wrote: On Sun, 10 Oct 2010 17:39:52 +0400, Stephan Soller stephan.sol...@helionweb.de wrote: On 07.10.2010 17:36, Andrei Alexandrescu wrote: On 10/7/10 10:13 CDT, Kagamin wrote: Andrei Alexandrescu Wrote: struct Coord { int x, y, z; } one iota

Re: [Theory] Halting problem

2010-10-10 Thread %u
I am not sure where exactly the line lies where people tend to use impossible as a synonym for a hard problem, but I agree that np might well be around that border. It depends on trivial, but I wouldn't call integer factorization impossible. The point I was trying to make was that using

Re: Tuple literal syntax

2010-10-10 Thread bearophile
Andrei: Tuples with named fields are restricted in a number of ways compared to structs. They are expandable, they have indexed fields, they offer no encapsulation, etc. Lambda structs would be rather unwieldy. I personally am fine with tuples. Now the discussion is developing in a slower

Re: [Theory] Halting problem

2010-10-10 Thread Norbert Nemec
On 10/10/10 17:06, %u wrote: I am not sure where exactly the line lies where people tend to use impossible as a synonym for a hard problem, but I agree that np might well be around that border. It depends on trivial, but I wouldn't call integer factorization impossible. The point I was trying

; not required after pragma

2010-10-10 Thread Tomek Sowiński
pragma(msg, blabla) bug or feature? -- Tomek

Re: ; not required after pragma

2010-10-10 Thread Simen kjaeraas
Tomek Sowiński j...@ask.me wrote: pragma(msg, blabla) bug or feature? Feature. http://www.digitalmars.com/d/2.0/pragma.html: Pragmas can be used by themselves terminated with a ';', they can influence a statement, a block of statements, a declaration, or a block of declarations. E.g.

Re: [Theory] Halting problem

2010-10-10 Thread %u
== Quote from Norbert Nemec (norb...@nemec-online.de)'s article On 10/10/10 17:06, %u wrote: I am not sure where exactly the line lies where people tend to use impossible as a synonym for a hard problem, but I agree that np might well be around that border. It depends on trivial, but

Re: ; not required after pragma

2010-10-10 Thread Tomek Sowiński
Simen kjaeraas napisał: Tomek Sowiński j...@ask.me wrote: pragma(msg, blabla) bug or feature? Feature. http://www.digitalmars.com/d/2.0/pragma.html: Pragmas can be used by themselves terminated with a ';', they can influence a statement, a block of statements, a declaration, or a

Re: [Theory] Halting problem

2010-10-10 Thread Norbert Nemec
On 10/10/10 19:36, %u wrote: == Quote from Norbert Nemec (norb...@nemec-online.de)'s article In language design, the theoretical halting problem actually is often an argument because the compiler does not know the memory limitation at run time. The finite memory of the machine can therefore not

Re: [Theory] Halting problem

2010-10-10 Thread %u
== Quote from Norbert Nemec (norb...@nemec-online.de)'s article On 10/10/10 19:36, %u wrote: == Quote from Norbert Nemec (norb...@nemec-online.de)'s article In language design, the theoretical halting problem actually is often an argument because the compiler does not know the memory

convenient backward compatible template arguments type deduction

2010-10-10 Thread Mathias Laurenz Baumann
Greetings, Given: a template function foo(T) (T[] a, T[] b) { .. } It is being called using: foo(mutableString,immutableString); dmd will fail because it can't deduce the type. So far so expected. Now, there are situations where I don't care in my template whether any part is mutable or

Re: Schrödinger's Stride

2010-10-10 Thread Peter Alexander
On 10/10/10 7:34 PM, Tomek Sowiński wrote: Currently the contents of Stride depend on from which end we look at it: auto m = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]; // 3 rows, 4 columns auto col = stride(m, 4); assert(equal(col, [1, 1, 1])); assert(equal(retro(col), [4, 4, 4])); Is the quantum

Re: Is D right for me?

2010-10-10 Thread Walter Bright
Gour D. wrote: (64bit dmd, do you hear me?) Don't I know it. 64 bit support is absolutely essential for D's future.

Re: ; not required after pragma

2010-10-10 Thread Leandro Lucarella
Tomek Sowiński, el 10 de octubre a las 20:13 me escribiste: Simen kjaeraas napisał: Tomek Sowiński j...@ask.me wrote: pragma(msg, blabla) bug or feature? Feature. http://www.digitalmars.com/d/2.0/pragma.html: Pragmas can be used by themselves terminated with a ';', they can

Re: Is D right for me?

2010-10-10 Thread Walter Bright
Jonathan M Davis wrote: Of course, projects like QtD suffer from the same sort of problem as a compiler does in that it's not necessarily very useful until it's complete. Lots of people may be interested in using QtD, but if it's not at least close to done, it's not going to be useable enough

Re: ParserCobinator like scala in D

2010-10-10 Thread Sphere Research
Hi, you can aggregate all submissions on one page: ideone.com/user_login/page - just simply manage them on 'my submissions' panel, good luck! SphereResearch Team $BH~GO5W9T(B Wrote: Since I want parser to make a Scripting Engine, I wrote ParserCombinator which is popular in Scala in D.

Re: Tuple literal syntax

2010-10-10 Thread Philippe Sigaud
Whatever the conclusion on all this is, may I suggest to have a way to concatenate tuples? auto t1 = tuple(1, a); // or (|1, a|) or {1, a} or what have you. auto t2 = tuple((int i, string s) { return i;}); auto result = t1 ~ t2; result is a (int,string, int

assert(false) in release == splinter in eye

2010-10-10 Thread Christopher Bergqvist
Hi, Time for some Sunday nitpicking. While reading TDPL, one thing that stuck out to me was the special behavior of assert(false). Consider the following program compiled with -release. void main() { int a = 0; assert(a); } That program will run without errors. Changing the type of

Call C (or C++) with pointer to static function

2010-10-10 Thread Michael Stover
I am wondering if D would be a good choice for our differential equation modeling app. What it needs to be able to do is dynamically compile D code into a static function that can then be used to call C-code that expects a pointer to a static function. Longer description: It is a desktop app.

Re: Schrödinger's Stride

2010-10-10 Thread Tomek Sowiński
Peter Alexander napisał: On 10/10/10 7:34 PM, Tomek Sowiński wrote: Currently the contents of Stride depend on from which end we look at it: auto m = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]; // 3 rows, 4 columns auto col = stride(m, 4); assert(equal(col, [1, 1, 1])); assert(equal(retro(col),

Re: Schrödinger's Stride

2010-10-10 Thread Peter Alexander
On 10/10/10 9:45 PM, Tomek Sowiński wrote: Peter Alexander napisał: On 10/10/10 7:34 PM, Tomek Sowiński wrote: Currently the contents of Stride depend on from which end we look at it: auto m = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]; // 3 rows, 4 columns auto col = stride(m, 4);

Re: Tuple literal syntax

2010-10-10 Thread bearophile
Philippe Sigaud: may I suggest to have a way to concatenate tuples? I have implemented it, see enhancement request 4591 Bye, bearophile

Re: Schrödinger's Stride

2010-10-10 Thread Andrei Alexandrescu
On 10/10/10 13:34 CDT, Tomek Sowiński wrote: Currently the contents of Stride depend on from which end we look at it: auto m = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]; // 3 rows, 4 columns auto col = stride(m, 4); assert(equal(col, [1, 1, 1])); assert(equal(retro(col), [4, 4, 4])); Is the quantum

Re: assert(false) in release == splinter in eye

2010-10-10 Thread bearophile
Christopher Bergqvist: I would prefer it if assert() didn't have this special type of behavior, and that a halt keyword or equivalent was introduced. What do you think? A halt() intrinsic from sounds indeed cleaner. But I don't know if Walter is willing to add a keyword just for this purpose.

Re: Call C (or C++) with pointer to static function

2010-10-10 Thread Simen kjaeraas
On Sun, 10 Oct 2010 22:03:51 +0200, Michael Stover michael.r.sto...@gmail.com wrote: I am wondering if D would be a good choice for our differential equation modeling app. What it needs to be able to do is dynamically compile D code into a static function that can then be used to call

Re: Tuple literal syntax

2010-10-10 Thread Philippe Sigaud
On Sun, Oct 10, 2010 at 23:05, bearophile bearophileh...@lycos.com wrote: Philippe Sigaud: may I suggest to have a way to concatenate tuples? I have implemented it, see enhancement request 4591 Cool, I'll have a look. *does so* Wow, much more complicated that what I had in mind. I totally

[challenge] Bounded types

2010-10-10 Thread Philippe Sigaud
Hi, there is a long discussion about a date/time module on the Phobos mailing list, and among other very interesting things, it was suggested to add a Bounded template to Phobos. I'll extract this as a challenge to the D community. Bounded takes a type, a min value and a max value and gives back

Re: assert(false) in release == splinter in eye

2010-10-10 Thread Tomek Sowiński
Christopher Bergqvist napisał: Hi, Time for some Sunday nitpicking. While reading TDPL, one thing that stuck out to me was the special behavior of assert(false). Consider the following program compiled with -release. void main() { int a = 0; assert(a); } That program will

Re: [challenge] Bounded types

2010-10-10 Thread Adam D. Ruppe
I saw it on the Phobos list and whipped together a first try. Here's the code: import std.conv; class BoundedOverflowException : Exception { this(string msg) { super(msg); } } struct Bounded(T, T min, T max) { T _payload; static string

Re: Schrödinger's Stride

2010-10-10 Thread Tomek Sowiński
Andrei Alexandrescu napisał: On 10/10/10 13:34 CDT, Tomek Sowiński wrote: Currently the contents of Stride depend on from which end we look at it: auto m = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]; // 3 rows, 4 columns auto col = stride(m, 4); assert(equal(col, [1, 1, 1]));

Re: [challenge] Bounded types

2010-10-10 Thread Tomek Sowiński
Philippe Sigaud napisał: As you can see, an open or closed for both ends policy could be interesting to add. In the previous example, is 1.0 a correct value? It can be handled as in std.random: Bounded!(T, min, max, string bounds = [)). But with [] as default. -- Tomek

Re: [challenge] Bounded types

2010-10-10 Thread Denis Koroskin
On Mon, 11 Oct 2010 01:16:05 +0400, Philippe Sigaud philippe.sig...@gmail.com wrote: Hi, there is a long discussion about a date/time module on the Phobos mailing list, and among other very interesting things, it was suggested to add a Bounded template to Phobos. I'll extract this as a

Re: [challenge] Bounded types

2010-10-10 Thread Adam D. Ruppe
Your code is wrong in many places. In short, exceptional situation should leave your object in correct state. Yeah, I know, but I wanted to get the overflow flag check working first and worry about transactional integrity later. The way I was thinking of doing it is storing the result in a

Re: [challenge] Bounded types

2010-10-10 Thread bearophile
Philippe Sigaud: there is a long discussion about a date/time module on the Phobos mailing list, and among other very interesting things, it was suggested to add a Bounded template to Phobos. I'll extract this as a challenge to the D community. I think they are also named ranged types, they

Re: [challenge] Bounded types

2010-10-10 Thread Denis Koroskin
On Mon, 11 Oct 2010 02:24:55 +0400, Adam D. Ruppe destructiona...@gmail.com wrote: Your code is wrong in many places. In short, exceptional situation should leave your object in correct state. Yeah, I know, but I wanted to get the overflow flag check working first and worry about

Re: [challenge] Bounded types

2010-10-10 Thread bearophile
Denis Koroskin: Also, one should be able to define CheckedInt type as follows: alias Bounded!(int, int.min, int.max) CheckedInt; CheckedInt would allow easy integer overflow detection. Smart compiler would also optimize all the (int.min = value value = int.max) checks as redundant,

Re: [challenge] Bounded types

2010-10-10 Thread Adam D. Ruppe
I think scope(success) is an overkill here. Yeah. It is in my brain due to writing a lot of database code with it: db.query(START TRANSACTION); scope(success) db.query(COMMIT); scope(failure) db.query(ROLLBACK); Well done otherwise, looking forward for final version! Thanks. For future

Re: assert(false) in release == splinter in eye

2010-10-10 Thread Christopher Bergqvist
Thanks for the support guys. :) Unfortunately halt would still need to be a keyword if one wants to keep the full behavior of assert(0), where the compiler knows that it affects the control-flow of the program. Legal: int main() { assert(0); } Illegal (Error: function D main has no return

Re: Is D right for me?

2010-10-10 Thread bioinfornatics
LDC support 64 bit ;)

Re: assert(false) in release == splinter in eye

2010-10-10 Thread bearophile
Tomek S.: BTW, does anybody know the reason for the assert(0) infernal syntax? I think it's a shorcut, to gain a functionality without adopting a specific syntax. An as it very often happens in language design, shortcuts later come back to bite your bum :-) Bye, bearophile

Re: Is D right for me?

2010-10-10 Thread Daniel Gibson
bioinfornatics schrieb: LDC support 64 bit ;) as well as GDC. But both currently lack an up-to-date D2 compiler (but the GDC guys are at least working on it, seems like they're currently at 2.029 - which is great - about 3 months ago they were still at 2.018 and in between was the big

Re: Call C (or C++) with pointer to static function

2010-10-10 Thread Michael Stover
I am under the impression that passing a pointer to a static function (ie, passing a pointer to a memory address that contains the starting point of a function) is not the same as defining a method that can be called by name from C code. I am not a C expert though. Can one call fortran libraries

Re: assert(false) in release == splinter in eye

2010-10-10 Thread Denis Koroskin
On Mon, 11 Oct 2010 03:53:07 +0400, Christopher Bergqvist ch...@digitalpoetry.se wrote: Thanks for the support guys. :) Unfortunately halt would still need to be a keyword if one wants to keep the full behavior of assert(0), where the compiler knows that it affects the control-flow of

Re: [challenge] Bounded types

2010-10-10 Thread Yao G.
On Sun, 10 Oct 2010 16:16:05 -0500, Philippe Sigaud philippe.sig...@gmail.com wrote: I don't have a bounded type, but a wrapping integer, ported from Boost: http://bitbucket.org/gomez/yao-library/src/tip/src/yao/datetime/core.d#cl-551 I posted this on the Phobos list, but it seems that

Re: Is D right for me?

2010-10-10 Thread Jonathan M Davis
On Sunday 10 October 2010 17:27:55 Daniel Gibson wrote: bioinfornatics schrieb: LDC support 64 bit ;) as well as GDC. But both currently lack an up-to-date D2 compiler (but the GDC guys are at least working on it, seems like they're currently at 2.029 - which is great - about 3 months

Re: [challenge] Bounded types

2010-10-10 Thread Jonathan M Davis
On Sunday 10 October 2010 18:55:15 Yao G. wrote: On Sun, 10 Oct 2010 16:16:05 -0500, Philippe Sigaud philippe.sig...@gmail.com wrote: I don't have a bounded type, but a wrapping integer, ported from Boost: http://bitbucket.org/gomez/yao-library/src/tip/src/yao/datetime/core.d#cl -551 I

Re: Is D right for me?

2010-10-10 Thread Andrei Alexandrescu
On 10/10/10 20:59 CDT, Jonathan M Davis wrote: On Sunday 10 October 2010 17:27:55 Daniel Gibson wrote: bioinfornatics schrieb: LDC support 64 bit ;) as well as GDC. But both currently lack an up-to-date D2 compiler (but the GDC guys are at least working on it, seems like they're currently

Re: Is D right for me?

2010-10-10 Thread Jonathan M Davis
On Sunday 10 October 2010 21:26:28 Andrei Alexandrescu wrote: A stream solution is in the works (it's discussed periodically on the Phobos list), but they haven't sorted out quite what they want to do with it yet. The Phobos API in general is in flux, though pieces of it are likely to stay

Re: [challenge] Bounded types

2010-10-10 Thread Andrei Alexandrescu
On 10/10/10 21:13 CDT, Denis Koroskin wrote: On Mon, 11 Oct 2010 05:55:15 +0400, Yao G. yao.go...@spam.gmail.com wrote: On Sun, 10 Oct 2010 16:16:05 -0500, Philippe Sigaud philippe.sig...@gmail.com wrote: I don't have a bounded type, but a wrapping integer, ported from Boost:

Re: CMake for D2 ready for testers

2010-10-10 Thread SK
On Fri, Oct 8, 2010 at 12:41 PM, Jens Mueller jens.k.muel...@gmx.de wrote: I also think CMake isn't that shiny. But you can get the job done once you're familiar with it. My sentiments exactly. Discussing the beauties of a particular build system is all well and good, but what really matters

How do you create a .di file for multiple .d files?

2010-10-10 Thread Jonathan M Davis
Okay, I'm trying to figure out how to take multiple .d files and use a single .di file for them. It looks like if you have x.di file with a corresponding x.d file (so, only one .d file), you put package x; at the top of both files, and dmd is able to deal with it, knowing that the .d file

Re: [D1] assert failure expression.c

2010-10-10 Thread Joel Christensen
Looks like there's no problem to me, except with the code. char[] foo() { char[2] res = 1 ; res[1] = ;; // should be res[1] = ';'; return res; } I don't think you can have an incomplete mixin.

[D1] gc safety

2010-10-10 Thread %u
How gc unfriendly is an union of objects and sizet_t? union{ size_t arr[10]; Class obj[10]; } And, if multiple arrays contain exclusively the same objects, is it then safe/useful to mark all but the smallest array with gc.hasNoPointers? Any object removal/addition happens simultaneous

[Issue 4398] dmd always uses Windows name mangling for _d_throw

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4398 nfx...@gmail.com changed: What|Removed |Added CC||nfx...@gmail.com --- Comment #14

[Issue 4398] dmd always uses Windows name mangling for _d_throw

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4398 --- Comment #15 from nfx...@gmail.com 2010-10-10 05:48:52 PDT --- (In reply to comment #14) patch I mean bug. Uf dmd had a healthy development model, this should have been fixed 5 minutes after the bug was reported. -- Configure issuemail:

[Issue 4398] dmd always uses Windows name mangling for _d_throw

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4398 --- Comment #16 from Marenz dmdtrac...@supradigital.org 2010-10-10 06:20:39 PDT --- (In reply to comment #5) To avoid code duplication in case extern(System) won't help you here you can use string mixins. P.S. Is it the only issue that

[Issue 4398] dmd always uses Windows name mangling for _d_throw

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4398 --- Comment #17 from Jacob Carlborg d...@me.com 2010-10-10 06:29:39 PDT --- I don't think that the attached patches are correct. As far as I can see looking at the makefiles, deh.c is used on windows and deh2.d is used on posix. So _d_throw in

[Issue 4398] dmd always uses Windows name mangling for _d_throw

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4398 --- Comment #18 from Jacob Carlborg d...@me.com 2010-10-10 06:30:33 PDT --- (In reply to comment #17) I don't think that the attached patches are correct. As far as I can see looking at the makefiles, deh.c is used on windows and deh2.d is

[Issue 4398] dmd always uses Windows name mangling for _d_throw

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4398 --- Comment #19 from Marenz dmdtrac...@supradigital.org 2010-10-10 06:35:05 PDT --- (In reply to comment #18) (In reply to comment #17) I don't think that the attached patches are correct. As far as I can see looking at the makefiles,

[Issue 4398] dmd always uses Windows name mangling for _d_throw

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4398 --- Comment #20 from Jacob Carlborg d...@me.com 2010-10-10 06:42:16 PDT --- (In reply to comment #19) (In reply to comment #18) (In reply to comment #17) I don't think that the attached patches are correct. As far as I can see looking

[Issue 3092] Indexing a tuple produces a tuple containing the indexed element

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3092 --- Comment #5 from Manuel K�nig manuel...@gmx.net 2010-10-10 06:55:54 PDT --- Some updates: template TupleBug(values...) { pragma(msg, values: , values); } alias TupleBug!(int, int) _0; // prints 'values: (int, int)' alias TupleBug!(int,

[Issue 4398] dmd always uses Windows name mangling for _d_throw

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4398 Johannes Pfau johannesp...@gmail.com changed: What|Removed |Added Attachment #685 is|0 |1

[Issue 4398] dmd always uses Windows name mangling for _d_throw

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4398 --- Comment #22 from Johannes Pfau johannesp...@gmail.com 2010-10-10 08:54:35 PDT --- True, deh.c should stay as it is. My understanding of C and druntime wasn't that great at the time I wrote the patch. I'll attach an updated patch, but

[Issue 5033] Add explicit 'frame context' and 'this' type modifiers for callback functions

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5033 Austin Hastings ah0801...@yahoo.com changed: What|Removed |Added Severity|normal |enhancement --

[Issue 5034] New: Ranged (or bounded) array initializer

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5034 Summary: Ranged (or bounded) array initializer Product: D Version: D2 Platform: Other OS/Version: Other Status: NEW Keywords: spec Severity: enhancement

[Issue 5034] Ranged (or bounded) array initializer

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5034 --- Comment #1 from Shin Fujishiro rsi...@gmail.com 2010-10-10 13:47:50 PDT --- A syntax for filling the rest would also help. I don't come up with any good syntax though. Maybe something like follows: int[char.max+1] table = [ 'a':

[Issue 5035] New: Schrödinger's Stride

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5035 Summary: Schrödinger's Stride Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos

[Issue 5036] New: Remove caching from ranges

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5036 Summary: Remove caching from ranges Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos

[Issue 5036] Remove caching from ranges

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5036 Tomasz Sowiński tomeks...@gmail.com changed: What|Removed |Added Status|NEW |ASSIGNED

[Issue 5037] New: std.variant.Algebraic test use case

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5037 Summary: std.variant.Algebraic test use case Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2

[Issue 5035] Schrödinger's Stride

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5035 --- Comment #1 from Tomasz Sowiński tomeks...@gmail.com 2010-10-10 15:04:46 PDT --- Please also see to that this passes: auto m = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]; // 3 rows, 4 columns auto col = stride(m[1..$], 4); assert(equal(col, [2,

[Issue 5038] Change class 'invariant' syntax to emulate 'unittest'

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5038 Austin Hastings ah0801...@yahoo.com changed: What|Removed |Added Severity|normal |enhancement --

[Issue 5038] Change class 'invariant' syntax to emulate 'unittest'

2010-10-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5038 bearophile_h...@eml.cc changed: What|Removed |Added CC||bearophile_h...@eml.cc ---