Re: Orange 1.0.0 beta - serialization library

2011-08-21 Thread Jacob Carlborg
On 2011-08-20 23:29, dsimcha wrote: On 8/20/2011 4:24 PM, Jacob Carlborg wrote: 2. What are the prospects for submitting this for inclusion in Phobos? Serialization is something basic and universally needed enough that it should not require a third-party library. From my part: * Remove all

Re: Orange 1.0.0 beta - serialization library

2011-08-21 Thread simendsjo
On 20.08.2011 19:45, dsimcha wrote: On 8/20/2011 12:50 PM, Andrej Mitrovic wrote: Masahiro Nakagawa seems to be working on msgpack: https://bitbucket.org/repeatedly/msgpack4d/ Yeah, this does look quite useful. I tried it a few weeks ago and ran into a couple showstopper bugs. I filed them

Re: Orange 1.0.0 beta - serialization library

2011-08-21 Thread Masahiro Nakagawa
On Sun, 21 Aug 2011 02:45:20 +0900, dsimcha dsim...@yahoo.com wrote: On 8/20/2011 12:50 PM, Andrej Mitrovic wrote: Masahiro Nakagawa seems to be working on msgpack: https://bitbucket.org/repeatedly/msgpack4d/ Yeah, this does look quite useful. I tried it a few weeks ago and ran into a

Re: Orange 1.0.0 beta - serialization library

2011-08-21 Thread Masahiro Nakagawa
On Sun, 21 Aug 2011 05:28:33 +0900, Jacob Carlborg d...@me.com wrote: On 2011-08-20 19:45, dsimcha wrote: On 8/20/2011 12:50 PM, Andrej Mitrovic wrote: Masahiro Nakagawa seems to be working on msgpack: https://bitbucket.org/repeatedly/msgpack4d/ Yeah, this does look quite useful. I tried it

Re: llvm's SAFECode bounds checking algorithm

2011-08-21 Thread Paulo Pinto
Am 20.08.2011 17:40, schrieb Walter Bright: http://llvm.org/pubs/2006-05-24-SAFECode-BoundsCheck.pdf What it does is rewrites the program to install runtime checks on pointers to ensure no array bounds overflows. It indicates to me the effort being poured into C to try to make it memory

Re: Clang with SAFECode

2011-08-21 Thread bearophile
Walter: Very little code in a D program needs to be @system, so I see little need for this. I'd like to know what percentage of code of a high-performance indie video game is @system :-) Bye, bearophile

Re: Mixin template evaluated to string can convert to string mixin expression implicitly

2011-08-21 Thread d coder
On Mon, Jun 27, 2011 at 2:09 PM, Don nos...@nospam.com wrote: kenji hara wrote: Issue in bugzilla: http://d.puremagic.com/issues/**show_bug.cgi?id=6207http://d.puremagic.com/issues/show_bug.cgi?id=6207 Test implementation:

static static again

2011-08-21 Thread bearophile
A not too much serious post fit for a slow Sunday :-) Time ago I have half-seriously suggested the static static, to be used to define a static variable that is static (shared) for all instantiations of one function template. With it you avoid a global variable, and you have the advantages of

Chances of D getting proper runtime reflection?

2011-08-21 Thread Jacob Carlborg
What are the chances of D getting proper runtime reflection? Something like this: class Foo { private int a; private void bar (int i) { a = i; } } auto foo = new Foo; Object o = foo; o.setInstanceVariable(a, 3); assert(foo.a == 3); This would be useful as well:

Re: llvm's SAFECode bounds checking algorithm

2011-08-21 Thread Robert Clipsham
On 20/08/2011 16:40, Walter Bright wrote: http://llvm.org/pubs/2006-05-24-SAFECode-BoundsCheck.pdf What it does is rewrites the program to install runtime checks on pointers to ensure no array bounds overflows. It indicates to me the effort being poured into C to try to make it memory safe,

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread bearophile
Jacob Carlborg: class Foo { private int a; private void bar (int i) { a = i; } } auto foo = new Foo; Object o = foo; o.setInstanceVariable(a, 3); assert(foo.a == 3); Is this related to the Delphi feature I've recently shown?

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Robert Clipsham
On 21/08/2011 11:55, Jacob Carlborg wrote: What are the chances of D getting proper runtime reflection? Something like this: class Foo { private int a; private void bar (int i) { a = i; } } auto foo = new Foo; Object o = foo; o.setInstanceVariable(a, 3); assert(foo.a == 3); This would be

Re: Failing DMD tests

2011-08-21 Thread Alex Rønne Petersen
On 21-08-2011 02:35, Jonathan M Davis wrote: On Sunday, August 21, 2011 00:27:03 Jesse Phillips wrote: On Sat, 20 Aug 2011 16:57:38 +0200, Alex Rønne Petersen wrote: Hi, I recently set up a Jenkins server which is running DMD builds and tests at: http://emoba.net:/jenkins/view/D/ It's

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Jacob Carlborg
On 2011-08-21 13:41, bearophile wrote: Jacob Carlborg: class Foo { private int a; private void bar (int i) { a = i; } } auto foo = new Foo; Object o = foo; o.setInstanceVariable(a, 3); assert(foo.a == 3); Is this related to the Delphi feature I've recently

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Jacob Carlborg
On 2011-08-21 13:42, Robert Clipsham wrote: On 21/08/2011 11:55, Jacob Carlborg wrote: What are the chances of D getting proper runtime reflection? Something like this: class Foo { private int a; private void bar (int i) { a = i; } } auto foo = new Foo; Object o = foo;

Re: llvm's SAFECode bounds checking algorithm

2011-08-21 Thread Timon Gehr
On 08/21/2011 12:55 PM, Robert Clipsham wrote: On 20/08/2011 16:40, Walter Bright wrote: http://llvm.org/pubs/2006-05-24-SAFECode-BoundsCheck.pdf What it does is rewrites the program to install runtime checks on pointers to ensure no array bounds overflows. It indicates to me the effort being

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Marco Leise
Am 21.08.2011, 14:11 Uhr, schrieb Jacob Carlborg d...@me.com: BTW, you're already paying for the class info. That could be a necessity of D's OOP implementation to fulfill the specification and while it is there that data was exported. Delphi used to have a compiler switch to include

Re: llvm's SAFECode bounds checking algorithm

2011-08-21 Thread Marco Leise
Am 21.08.2011, 12:55 Uhr, schrieb Robert Clipsham rob...@octarineparrot.com: On 20/08/2011 16:40, Walter Bright wrote: http://llvm.org/pubs/2006-05-24-SAFECode-BoundsCheck.pdf What it does is rewrites the program to install runtime checks on pointers to ensure no array bounds overflows. It

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Vladimir Panteleev
On Sun, 21 Aug 2011 15:16:11 +0300, Jacob Carlborg d...@me.com wrote: Yes, I know. But the point is to be able to do it without the use of mixins. It needs to work with third party types, otherwise there no use. It also needs to work when the static type is Object. You're already paying

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Robert Jacques
On Sun, 21 Aug 2011 06:55:52 -0400, Jacob Carlborg d...@me.com wrote: What are the chances of D getting proper runtime reflection? Something like this: class Foo { private int a; private void bar (int i) { a = i; } } auto foo = new Foo; Object o = foo;

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Alex Rønne Petersen
On 21-08-2011 15:13, Vladimir Panteleev wrote: On Sun, 21 Aug 2011 15:16:11 +0300, Jacob Carlborg d...@me.com wrote: Yes, I know. But the point is to be able to do it without the use of mixins. It needs to work with third party types, otherwise there no use. It also needs to work when the

Building phobos with different druntime path

2011-08-21 Thread Alex Rønne Petersen
Hi, Currently, the Phobos posix.mak assumes that druntime is checked out in ../druntime, and altering the variable on the make command line for some reason seems to do nothing. Is there any way to specify this path without modifying the makefile? Regards, Alex

Re: Building phobos with different druntime path

2011-08-21 Thread David Nadlinger
On 8/21/11 3:34 PM, Alex Rønne Petersen wrote: Currently, the Phobos posix.mak assumes that druntime is checked out in ../druntime, and altering the variable on the make command line for some reason seems to do nothing. Is there any way to specify this path without modifying the makefile?

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Vladimir Panteleev
On Sun, 21 Aug 2011 16:31:14 +0300, Alex Rønne Petersen xtzgzo...@gmail.com wrote: I really don't think this is a valid cause of concern in this day and age. Perhaps not for you. Look at Java and .NET. They're doing just fine even with all metadata being available. And that's why

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Jacob Carlborg
On 2011-08-21 14:55, Marco Leise wrote: Am 21.08.2011, 14:11 Uhr, schrieb Jacob Carlborg d...@me.com: BTW, you're already paying for the class info. That could be a necessity of D's OOP implementation to fulfill the specification and while it is there that data was exported. Delphi used to

How does one build dman?

2011-08-21 Thread Alex Rønne Petersen
Hi, dman seems to require some sort of browser (std.net.browser) component. Where does this sit? Are any other dependencies required in order to build it? Regards, Alex

Re: Building phobos with different druntime path

2011-08-21 Thread Alex Rønne Petersen
On 21-08-2011 15:36, David Nadlinger wrote: On 8/21/11 3:34 PM, Alex Rønne Petersen wrote: Currently, the Phobos posix.mak assumes that druntime is checked out in ../druntime, and altering the variable on the make command line for some reason seems to do nothing. Is there any way to specify

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Jacob Carlborg
On 2011-08-21 15:13, Vladimir Panteleev wrote: On Sun, 21 Aug 2011 15:16:11 +0300, Jacob Carlborg d...@me.com wrote: Yes, I know. But the point is to be able to do it without the use of mixins. It needs to work with third party types, otherwise there no use. It also needs to work when the

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Jacob Carlborg
On 2011-08-21 15:20, Robert Jacques wrote: On Sun, 21 Aug 2011 06:55:52 -0400, Jacob Carlborg d...@me.com wrote: What are the chances of D getting proper runtime reflection? Something like this: class Foo { private int a; private void bar (int i) { a = i; } } auto foo = new Foo; Object o =

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Robert Clipsham
On 21/08/2011 16:05, Jacob Carlborg wrote: This is for a serialization library where third party types need to be serializable. I don't like the idea of annotate everything that should be serializable. You don't need to annotate it: void serialize(T)(T something); You have access to all the

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Vladimir Panteleev
On Sun, 21 Aug 2011 18:05:20 +0300, Jacob Carlborg d...@me.com wrote: This is for a serialization library where third party types need to be serializable. I don't like the idea of annotate everything that should be serializable. I think you misunderstood what I meant. I did not imply that

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Robert Clipsham
On 21/08/2011 14:13, Vladimir Panteleev wrote: On Sun, 21 Aug 2011 15:16:11 +0300, Jacob Carlborg d...@me.com wrote: Yes, I know. But the point is to be able to do it without the use of mixins. It needs to work with third party types, otherwise there no use. It also needs to work when the

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Jakob Ovrum
On 2011/08/21 22:13, Vladimir Panteleev wrote: On Sun, 21 Aug 2011 15:16:11 +0300, Jacob Carlborg d...@me.com wrote: Yes, I know. But the point is to be able to do it without the use of mixins. It needs to work with third party types, otherwise there no use. It also needs to work when the

Re: Optional braces

2011-08-21 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:j2luh6$23bb$1...@digitalmars.com... One thing I'd subjectively like is to require braces on both branches of if/else if at least one has braces. Yuck! I'd really hate that.

Re: Optional braces

2011-08-21 Thread bearophile
Nick Sabalausky: Yuck! I'd really hate that. Recently I have converted this Python code: def foo(sol): global best if is_solution(sol[-1]): if best or len(sol) len(best): best = list(sol) else: for next in alternatives(sol[-1]): if next not

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Jacob Carlborg
On 2011-08-21 17:30, Robert Clipsham wrote: On 21/08/2011 16:05, Jacob Carlborg wrote: This is for a serialization library where third party types need to be serializable. I don't like the idea of annotate everything that should be serializable. You don't need to annotate it: void

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Jacob Carlborg
On 2011-08-21 17:30, Vladimir Panteleev wrote: On Sun, 21 Aug 2011 18:05:20 +0300, Jacob Carlborg d...@me.com wrote: This is for a serialization library where third party types need to be serializable. I don't like the idea of annotate everything that should be serializable. I think you

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Jacob Carlborg
On 2011-08-21 18:18, Jakob Ovrum wrote: On 2011/08/21 22:13, Vladimir Panteleev wrote: On Sun, 21 Aug 2011 15:16:11 +0300, Jacob Carlborg d...@me.com wrote: Yes, I know. But the point is to be able to do it without the use of mixins. It needs to work with third party types, otherwise there no

Re: Optional braces

2011-08-21 Thread Jacob Carlborg
On 2011-08-21 20:02, bearophile wrote: Nick Sabalausky: Yuck! I'd really hate that. Recently I have converted this Python code: def foo(sol): global best if is_solution(sol[-1]): if best or len(sol) len(best): best = list(sol) else: for next

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Mehrdad
On 8/21/2011 3:55 AM, Jacob Carlborg wrote: What are the chances of D getting proper runtime reflection? Something like this: class Foo { private int a; private void bar (int i) { a = i; } } auto foo = new Foo; Object o = foo; o.setInstanceVariable(a, 3); assert(foo.a

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Adam D. Ruppe
On Sun, Aug 21, 2011 at 12:07:17PM -0700, Mehrdad wrote: http://stackoverflow.com/questions/7102648/using-dynamic-typing-in-d-a-statically-typed-language There's an easy fix for that question: blah opDispatch(string name)(blah) if ( name != popFront ) { }

Re: Should unreachable code be considered an error?

2011-08-21 Thread Don
Sean Kelly wrote: On Aug 18, 2011, at 10:29 AM, Nick Sabalausky wrote: Bernard Helyer b.hel...@gmail.com wrote in message news:j2ithq$12kd$1...@digitalmars.com... I asked the Ars forums ( http://arstechnica.com/civis/viewtopic.php? f=20t=1153378p=21965411 ) and I ask the same of you: should

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Vladimir Panteleev
On Sun, 21 Aug 2011 21:21:05 +0300, Jacob Carlborg d...@me.com wrote: Would that be possible to do for third party types available in a pre-compiled library? If said types are in the .di files, sure, why not? Otherwise, the answer is obvious... but as someone else mentioned in this

Re: How does one build dman?

2011-08-21 Thread Vladimir Panteleev
On Sun, 21 Aug 2011 18:03:46 +0300, Alex Rønne Petersen xtzgzo...@gmail.com wrote: Hi, dman seems to require some sort of browser (std.net.browser) component. Where does this sit? Are any other dependencies required in order to build it? std.net.browser is a module that Walter just

Re: Optional braces

2011-08-21 Thread Jonathan M Davis
On Sunday, August 21, 2011 12:47:22 Nick Sabalausky wrote: Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:j2luh6$23bb$1...@digitalmars.com... One thing I'd subjectively like is to require braces on both branches of if/else if at least one has braces. Yuck! I'd

Re: Optional braces

2011-08-21 Thread Nick Sabalausky
bearophile bearophileh...@lycos.com wrote in message news:j2rh7g$2tfq$1...@digitalmars.com... To this innocent-looking D code, do you see the problem? void foo(Pair[] sol) { if (isSolution(sol[$-1])) if (!best.length || sol.length best.length) best = sol.dup; else

Re: Optional braces

2011-08-21 Thread Andrei Alexandrescu
On 8/21/11 4:02 PM, Nick Sabalausky wrote: bearophilebearophileh...@lycos.com wrote in message news:j2rh7g$2tfq$1...@digitalmars.com... To this innocent-looking D code, do you see the problem? void foo(Pair[] sol) { if (isSolution(sol[$-1])) if (!best.length || sol.length

Re: Optional braces

2011-08-21 Thread Timon Gehr
On 08/21/2011 11:02 PM, Nick Sabalausky wrote: bearophilebearophileh...@lycos.com wrote in message news:j2rh7g$2tfq$1...@digitalmars.com... To this innocent-looking D code, do you see the problem? void foo(Pair[] sol) { if (isSolution(sol[$-1])) if (!best.length || sol.length

Re: etc.curl: Formal review begin

2011-08-21 Thread Jesse Phillips
On Sat, 20 Aug 2011 23:57:54 +, Jesse Phillips wrote: On Thu, 18 Aug 2011 01:12:20 +0200, David Nadlinger wrote: At this point, I would like to invite everyone to spend some time testing the module and reading its documentation and code. It is essential for a working open source code

Re: etc.curl: Formal review begin

2011-08-21 Thread Jonathan M Davis
On Sunday, August 21, 2011 21:44:33 Jesse Phillips wrote: On Sat, 20 Aug 2011 23:57:54 +, Jesse Phillips wrote: On Thu, 18 Aug 2011 01:12:20 +0200, David Nadlinger wrote: At this point, I would like to invite everyone to spend some time testing the module and reading its documentation

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Andrei Alexandrescu
On 8/21/11 1:19 PM, Jacob Carlborg wrote: On 2011-08-21 17:30, Robert Clipsham wrote: On 21/08/2011 16:05, Jacob Carlborg wrote: This is for a serialization library where third party types need to be serializable. I don't like the idea of annotate everything that should be serializable. You

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread dsimcha
On 8/21/2011 6:35 PM, Andrei Alexandrescu wrote: On 8/21/11 1:19 PM, Jacob Carlborg wrote: On 2011-08-21 17:30, Robert Clipsham wrote: On 21/08/2011 16:05, Jacob Carlborg wrote: This is for a serialization library where third party types need to be serializable. I don't like the idea of

Re: Optional braces

2011-08-21 Thread bearophile
Andrei Alexandrescu: Yah, it's pretty neat, and very much in the spirit of D. I'd missed it. Thank you Andrei. This problem is know as Dangling else problem. When a bug receives a name, you know it's common enough. This is one of the about one dozen of tiny/small breaking changes I'd like for

Re: Chances of D getting proper runtime reflection?

2011-08-21 Thread Robert Jacques
On Sun, 21 Aug 2011 11:20:14 -0400, Jacob Carlborg d...@me.com wrote: On 2011-08-21 15:20, Robert Jacques wrote: On Sun, 21 Aug 2011 06:55:52 -0400, Jacob Carlborg d...@me.com wrote: What are the chances of D getting proper runtime reflection? Something like this: class Foo { private int a;

Re: Optional braces

2011-08-21 Thread Jonathan M Davis
On Sunday, August 21, 2011 20:36:55 bearophile wrote: Andrei Alexandrescu: Yah, it's pretty neat, and very much in the spirit of D. I'd missed it. Thank you Andrei. This problem is know as Dangling else problem. When a bug receives a name, you know it's common enough. This is one of the

Re: Optional braces

2011-08-21 Thread bearophile
Jonathan M Davis: Except that it's not a bug. It's an issue that crops up in grammars for programming languages. Right, I have just seen I was wrong :-) There is classic solution to the problem which D follows. So, there is no ambiguity, and there is no bug. It's very much by design.

Re: How does one build dman?

2011-08-21 Thread Alex Rønne Petersen
On 21-08-2011 21:48, Vladimir Panteleev wrote: On Sun, 21 Aug 2011 18:03:46 +0300, Alex Rønne Petersen xtzgzo...@gmail.com wrote: Hi, dman seems to require some sort of browser (std.net.browser) component. Where does this sit? Are any other dependencies required in order to build it?

Re: Regarding nothrow and @safe

2011-08-21 Thread Jacob Carlborg
On 2011-08-21 02:26, Jonathan M Davis wrote: On Saturday, August 20, 2011 18:18:25 Sean Eskapp wrote: bearophile: As far as I know they have decided to make memory overflow errors, so they are not exceptions, you can't catch them. Other people will confirm this or not. In this case, how

where is ddoc.

2011-08-21 Thread maarten van damme
as with most tools mentioned on the digitalmars homepage I am unable to find ddoc. I know it exists, judging by the whole page dedicated to it but the tool itself is never mentioned in any download page. Not to offend anyone but the digitalmars homepage really could use some rethinking. It was one

Re: where is ddoc.

2011-08-21 Thread simendsjo
On 21.08.2011 13:32, maarten van damme wrote: as with most tools mentioned on the digitalmars homepage I am unable to find ddoc. I know it exists, judging by the whole page dedicated to it but the tool itself is never mentioned in any download page. Not to offend anyone but the digitalmars

Re: where is ddoc.

2011-08-21 Thread Mike Parker
On 8/21/2011 8:32 PM, maarten van damme wrote: It would be great to also have a link to the full phobos documentation generated with candydoc on the digitalmars d page instead of http://www.digitalmars.com/d/2.0/phobos/ , candydoc generates something more readable and structured. The new

[Issue 6136] Vector operation array[]^^ not supported yet

2011-08-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6136 Iain Buclaw ibuc...@ubuntu.com changed: What|Removed |Added CC||ibuc...@ubuntu.com

[Issue 3661] ^^ not supported in array operations.

2011-08-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3661 Iain Buclaw ibuc...@ubuntu.com changed: What|Removed |Added CC||ibuc...@ubuntu.com

[Issue 6136] Vector operation array[]^^ not supported yet

2011-08-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6136 Iain Buclaw ibuc...@ubuntu.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 3661] ^^ not supported in array operations.

2011-08-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3661 Iain Buclaw ibuc...@ubuntu.com changed: What|Removed |Added CC||bearophile_h...@eml.cc

[Issue 6518] break inside a static foreach inside a switch

2011-08-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6518 --- Comment #3 from Kenji Hara k.hara...@gmail.com 2011-08-21 07:00:55 PDT --- More simple test case. enum Foo : uint { A } void main() { Foo foo; switch (foo) { enum op = A; case Foo.A: break; default:

[Issue 6542] New: Add IFTI (Implicit Function Template Instantiation) to glossary

2011-08-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6542 Summary: Add IFTI (Implicit Function Template Instantiation) to glossary Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Severity:

[Issue 6543] New: RDMD -I character limitation

2011-08-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6543 Summary: RDMD -I character limitation Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD