Re: Thrift now officially supports D!

2012-03-29 Thread deadalnix
Le 28/03/2012 01:16, David Nadlinger a écrit : Apache Thrift is a cross-language serialization/RPC framework. During last year's Google Summer of Code, I worked on adding D as a target language – and a few days ago, the D implementation has been accepted into the upstream project! You can find

Re: Linux and D wallpaper :)

2012-03-29 Thread deadalnix
Le 29/03/2012 06:57, James Miller a écrit : On 29 March 2012 17:48, F i Lwitte2...@gmail.com wrote: Don't know if this is the place for this sort of announcement Found a great looking Linux logo over at gnome-look.org by kodama

Re: UFCS for D

2012-03-29 Thread deadalnix
Le 29/03/2012 02:21, Andrei Alexandrescu a écrit : http://www.reddit.com/r/programming/comments/rif9x/uniform_function_call_syntax_for_the_d/ Andrei The example of std.algorithm should have been used. The importance of such a syntax become obvious when using it.

Re: Pegged: Syntax Highlighting

2012-03-29 Thread Andrej Mitrovic
On 3/28/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On 3/28/12, Philippe Sigaud philippe.sig...@gmail.com wrote: OK, it's done and on Github. Thanks for the headup! I've more to report :) I don't know exactly which files I need to compile Pegged as a library. Which files are

Re: Pegged: Syntax Highlighting

2012-03-29 Thread Philippe Sigaud
On Thu, Mar 29, 2012 at 12:40, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: I don't know exactly which files I need to compile Pegged as a library. I propose we move this discussion the 'issues' part of Pegged Github page. No need to pollute the announce ML. FYI, you just need

Re: Linux and D wallpaper :)

2012-03-29 Thread Nick Sabalausky
F i L witte2...@gmail.com wrote in message news:jiviayjgetcocbsdm...@forum.dlang.org... Don't know if this is the place for this sort of announcement Found a great looking Linux logo over at gnome-look.org by kodama (http://gnome-look.org/content/show.php/Linux+Logo?content=142418). So I

Re: Linux and D wallpaper :)

2012-03-29 Thread mta`chrono
Cool! Nice work!

Re: avgtime - Small D util for your everyday benchmarking needs

2012-03-29 Thread Brad Anderson
On Wed, Mar 21, 2012 at 6:32 PM, Juan Manuel Cabo juanmanuel.c...@gmail.com wrote: This is a small util I wrote in D which is like the unix 'time' command but can repeat the command N times and show median, average, standard deviation, minimum and maximum. As you all know, it is not proper

Re: UFCS for D

2012-03-29 Thread Timon Gehr
On 03/29/2012 02:21 AM, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/rif9x/uniform_function_call_syntax_for_the_d/ Andrei I think the article does not mention that it also works for primitive types.

Re: UFCS for D

2012-03-29 Thread Simon
On 29/03/2012 01:21, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/rif9x/uniform_function_call_syntax_for_the_d/ Andrei I do wish you guys would just post the direct link as well. I hate reddit, I've zero interest in the comments on there and jumping through that

Re: UFCS for D

2012-03-29 Thread Nick Sabalausky
Simon s.d.hamm...@gmail.com wrote in message news:jl2j1u$1p3p$1...@digitalmars.com... On 29/03/2012 01:21, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/rif9x/uniform_function_call_syntax_for_the_d/ Andrei I do wish you guys would just post the direct link as

Re: Mono-D 0.3.5

2012-03-29 Thread F i L
On Monday, 26 March 2012 at 23:57:27 UTC, alex wrote: Couple of bug fixes + new refactoring feature: - [Expression Evaluator] Began with the expression eval stuff -- added few class stubs - [Resolver] Fixed 2 small completion bugs (very precise, indeed! :-D) - [Parser] Fixed block

Re: UFCS for D

2012-03-29 Thread Walter Bright
On 3/29/2012 3:00 PM, Nick Sabalausky wrote: Yea, reddit *is* extremely slow whenever there's a reasonable number of comments. And *that's* with JS *off* (and using it that way prevents you from doing *anything* there other than read existing comments, which of course is retarded). And then with

Re: UFCS for D

2012-03-29 Thread Steven Schveighoffer
On Wed, 28 Mar 2012 21:53:57 -0400, Jesse Phillips jessekphillip...@gmail.com wrote: I won't be going out of my way to check this, but there is a mention of adding the range primatives. This works, but it doesn't make the class a range for any other module, so std.algorithms won't

Re: UFCS for D

2012-03-29 Thread bearophile
Timon Gehr: I think the article does not mention that it also works for primitive types. But there is a small problem with primitive properties: http://d.puremagic.com/issues/show_bug.cgi?id=7773 Bye, bearophile

Re: UFCS for D

2012-03-29 Thread Walter Bright
On 3/29/2012 4:34 PM, Steven Schveighoffer wrote: One misleading suggestion from the article however, it's not very easy to create non-friend non-member functions using UFCS, considering that every function in a given module is a friend. In order to do this, you would need a helper module for

Re: UFCS for D

2012-03-29 Thread Steven Schveighoffer
On Thu, 29 Mar 2012 19:46:24 -0400, Walter Bright newshou...@digitalmars.com wrote: On 3/29/2012 4:34 PM, Steven Schveighoffer wrote: One misleading suggestion from the article however, it's not very easy to create non-friend non-member functions using UFCS, considering that every

Re: UFCS for D

2012-03-29 Thread Walter Bright
On 3/29/2012 5:09 PM, Steven Schveighoffer wrote: The reason being, if you change anything in class A, you do not have to worry about the implementation of getXSquared, because it simply has no access to the private implementation. You only have to worry about internal methods, and friend

Re: UFCS for D

2012-03-29 Thread Walter Bright
On 3/29/2012 5:10 PM, Steven Schveighoffer wrote: Is anyone else's computer complaining about drdobbs having an invalid certificate? I read the article, and then I wanted to reference it again, and I got the error. Now I'm hesitant to accept the certificate because it seems to come from a

Re: UFCS for D

2012-03-29 Thread Steven Schveighoffer
On Thu, 29 Mar 2012 20:27:46 -0400, Walter Bright newshou...@digitalmars.com wrote: On 3/29/2012 5:09 PM, Steven Schveighoffer wrote: The reason being, if you change anything in class A, you do not have to worry about the implementation of getXSquared, because it simply has no access to

Re: UFCS for D

2012-03-29 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:jl2um7$2eq5$1...@digitalmars.com... On 3/29/2012 5:09 PM, Steven Schveighoffer wrote: The reason being, if you change anything in class A, you do not have to worry about the implementation of getXSquared, because it simply has no

Re: UFCS for D

2012-03-29 Thread Nick Sabalausky
Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.wbyg2ywyeav7ka@localhost.localdomain... For builtin types (such as arrays or numbers), there wouldn't be a module that the type was defined. However, object.di is imported by everything, so extensions could be put in there.

Re: UFCS for D

2012-03-29 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:jl2p1f$252f$1...@digitalmars.com... On 3/29/2012 3:00 PM, Nick Sabalausky wrote: Yea, reddit *is* extremely slow whenever there's a reasonable number of comments. And *that's* with JS *off* (and using it that way prevents you from

Re: UFCS for D

2012-03-29 Thread Adam D. Ruppe
On Friday, 30 March 2012 at 01:55:23 UTC, Nick Sabalausky wrote: wishful musingI've been starting to think more and more that the everything in a module is a friend was a mistake,and that we should have instead just had a module access specifier like we have package./wishful musing Or, for

Re: UFCS for D

2012-03-29 Thread Nick Sabalausky
Adam D. Ruppe destructiona...@gmail.com wrote in message news:nidsvjszuhicjthlp...@forum.dlang.org... On Friday, 30 March 2012 at 01:55:23 UTC, Nick Sabalausky wrote: wishful musingI've been starting to think more and more that the everything in a module is a friend was a mistake,and that we

Re: UFCS for D

2012-03-29 Thread Steven Schveighoffer
On Friday, 30 March 2012 at 01:55:23 UTC, Nick Sabalausky wrote: Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.wbyg2ywyeav7ka@localhost.localdomain... For builtin types (such as arrays or numbers), there wouldn't be a module that the type was defined. However, object.di

Re: UFCS for D

2012-03-29 Thread Nick Sabalausky
Steven Schveighoffer schvei...@yahoo.com wrote in message news:kgwyziwlndczqtafb...@forum.dlang.org... On Friday, 30 March 2012 at 01:55:23 UTC, Nick Sabalausky wrote: Yea, that occurred to me, too. wishful musingI've been starting to think more and more that the everything in a module is a

Re: Documentation Layout

2012-03-29 Thread Jakob Ovrum
On Thursday, 29 March 2012 at 05:41:30 UTC, James Miller wrote: On 29 March 2012 18:26, Jakob Ovrum jakobov...@gmail.com wrote: There is a simple project called cuteDoc (name comes from the old candyDoc theme) which has a demo using the Phobos documentation:    http://robik.github.com/phobos/

Re: std.containers - WAT

2012-03-29 Thread Jonathan M Davis
On Wednesday, March 28, 2012 08:37:30 Andrei Alexandrescu wrote: On 3/27/12 10:58 PM, Alex Rønne Petersen wrote: I think one more thing that needs some changing is the usability of the documentation, right now you get a dense list at the top, in mostly-alphabetical order (I think it puts

Re: Array ops give sharing violation under Windows 7 64 bit?

2012-03-29 Thread Mehrdad
Is it really a bug, or is it this feature (NTFS tunneling)? http://blogs.msdn.com/b/oldnewthing/archive/2005/07/15/439261.aspx Walter Bright wrote in message news:jkmceb$r5f$1...@digitalmars.com... On 3/24/2012 2:55 PM, Andrej Mitrovic wrote: I can't reproduce this on Win7 x86. I've tried

Re: How to use D for cross platform development?

2012-03-29 Thread Chris W.
On Wednesday, 28 March 2012 at 15:31:26 UTC, Bennie Copeland wrote: Great to hear someone with experience with it. Was there any issues with the code that had to be tweaked depending on the OS? When I was looking at C++, there was implementation defined data type sizes, endieness,

Re: Documentation Layout

2012-03-29 Thread foobar
On Thursday, 29 March 2012 at 01:52:28 UTC, James Miller wrote: On 29 March 2012 13:58, Nathan M. Swan nathanms...@gmail.com wrote: On Wednesday, 28 March 2012 at 22:43:19 UTC, foobar wrote: Categories - worst idea ever. What's better: int a; // this is size OR int size; Same thing applies

Re: Documentation Layout

2012-03-29 Thread foobar
On Wednesday, 28 March 2012 at 23:30:32 UTC, Adam D. Ruppe wrote: On Wednesday, 28 March 2012 at 22:43:19 UTC, foobar wrote: Categories - worst idea ever. I was just trying to copy what std.algorithm does, which is ok by me. Though, my implementation allows multiple categories; it is more of

Alternative /hipster/ syntaxes for D

2012-03-29 Thread ezdiy
Hello, D syntax being C-ish one is great for oldschool class of programmers coming C/C++/Java/C# backgrounds, and although it's quite conscise one compared to, eg. javas, it's still much on the overly verbose side for some people (ie. at least for me :) The question is, how one would go

Re: Alternative /hipster/ syntaxes for D

2012-03-29 Thread simendsjo
On Thu, 29 Mar 2012 11:47:54 +0200, ezdiy eez...@gmail.com wrote: Hello, D syntax being C-ish one is great for oldschool class of programmers coming C/C++/Java/C# backgrounds, and although it's quite conscise one compared to, eg. javas, it's still much on the overly verbose side for some

Re: Alternative /hipster/ syntaxes for D

2012-03-29 Thread ezdiy
On Thursday, 29 March 2012 at 10:06:20 UTC, simendsjo wrote: On Thu, 29 Mar 2012 11:47:54 +0200, ezdiy eez...@gmail.com wrote: Hello, D syntax being C-ish one is great for oldschool class of programmers coming C/C++/Java/C# backgrounds, and although it's quite conscise one compared to, eg.

Re: Alternative /hipster/ syntaxes for D

2012-03-29 Thread deadalnix
Le 29/03/2012 11:47, ezdiy a écrit : Hello, D syntax being C-ish one is great for oldschool class of programmers coming C/C++/Java/C# backgrounds, and although it's quite conscise one compared to, eg. javas, it's still much on the overly verbose side for some people (ie. at least for me :) The

Re: Alternative /hipster/ syntaxes for D

2012-03-29 Thread ezdiy
On Thursday, 29 March 2012 at 10:49:45 UTC, deadalnix wrote: Le 29/03/2012 11:47, ezdiy a écrit : Hello, D syntax being C-ish one is great for oldschool class of programmers coming C/C++/Java/C# backgrounds, and although it's quite conscise one compared to, eg. javas, it's still much on the

Re: Alternative /hipster/ syntaxes for D

2012-03-29 Thread Iain Buclaw
On 29 March 2012 11:57, ezdiy eez...@gmail.com wrote: On Thursday, 29 March 2012 at 10:49:45 UTC, deadalnix wrote: Le 29/03/2012 11:47, ezdiy a écrit : Hello, D syntax being C-ish one is great for oldschool class of programmers coming C/C++/Java/C# backgrounds, and although it's quite

Re: Issue 3789, stucts equality

2012-03-29 Thread Andrej Mitrovic
On 3/27/12, Steven Schveighoffer schvei...@yahoo.com wrote: That's exactly what bug 3789 advocates for. Please vote up! http://d.puremagic.com/issues/show_bug.cgi?id=3789 Unrelated, but I don't understand bugzilla's stupid 10-vote limitation. As if I can only care about 10 bugs. I agree with

Re: Issue 3789, stucts equality

2012-03-29 Thread Andrej Mitrovic
On 3/29/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: Speaking of which, does anyone have some sort of template to autogenerate an opEquals that compares all fields of a struct via '=='? Well that took 2 seconds. import std.range; template safeOpEquals(T) { bool opEquals(T t)

Re: Issue 3789, stucts equality

2012-03-29 Thread Andrej Mitrovic
On 3/29/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: D makes things so damn easy. Correction, makes things easier. No need to pass the type of 'this': template safeOpEquals() { bool opEquals(typeof(this) t) { foreach (lhsField, rhsField; lockstep(this.tupleof,

Re: Issue 3789, stucts equality

2012-03-29 Thread Andrej Mitrovic
3/29/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: snip Crap, lockstep doesn't work on different types, it was iterating over the arrays. That went over my head. A slightly complicated version that actually works: import std.stdio; import std.conv; string tupleCompare(int len)() {

Re: How to use D for cross platform development?

2012-03-29 Thread Jacob Carlborg
On 2012-03-29 11:12, Chris W. wrote: I cannot give you any advice as regards C++, because I have never really used it - avoiding it like the plague. My strategy is to keep things as simple as possible and use C only as the glue. It's a bit like the Lua approach which only uses ANSI C to ensure

Re: Documentation Layout

2012-03-29 Thread Jacob Carlborg
On 2012-03-29 11:24, foobar wrote: Have you considered that perhaps the granularity of Phobos modules is too coarse? Perhaps the core issue is too many functions are placed in one single file without more consideration of their relation and organization? Regarding the documentation system

Re: How to use D for cross platform development?

2012-03-29 Thread Chris W.
On Thursday, 29 March 2012 at 12:10:17 UTC, Jacob Carlborg wrote: I have some with using Objective-C together with D. It's a lot more verbose and quite more complicated than using a C library with D. How complicated it is depends on what one want to do with the Objective-C library. Obviously

Re: Alternative /hipster/ syntaxes for D

2012-03-29 Thread deadalnix
Le 29/03/2012 13:22, Iain Buclaw a écrit : On 29 March 2012 11:57, ezdiyeez...@gmail.com wrote: On Thursday, 29 March 2012 at 10:49:45 UTC, deadalnix wrote: Le 29/03/2012 11:47, ezdiy a écrit : Hello, D syntax being C-ish one is great for oldschool class of programmers coming

Re: std.containers - WAT

2012-03-29 Thread Steven Schveighoffer
On Wed, 28 Mar 2012 10:37:30 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 3/27/12 10:58 PM, Alex Rønne Petersen wrote: I think one more thing that needs some changing is the usability of the documentation, right now you get a dense list at the top, in

Re: Use tango.core.Atomic.atomicLoad and atomicStore from Tango

2012-03-29 Thread mta`chrono
Am 26.03.2012 19:26, schrieb Lukasz Durniat: Problem has been solved by me. Can you please tell me how you'd solved it?

Re: Issue 3789, stucts equality

2012-03-29 Thread Steven Schveighoffer
On Thu, 29 Mar 2012 07:49:28 -0400, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On 3/27/12, Steven Schveighoffer schvei...@yahoo.com wrote: That's exactly what bug 3789 advocates for. Please vote up! http://d.puremagic.com/issues/show_bug.cgi?id=3789 Unrelated, but I don't

Re: Alternative /hipster/ syntaxes for D

2012-03-29 Thread Iain Buclaw
On 29 March 2012 14:21, deadalnix deadal...@gmail.com wrote: Le 29/03/2012 13:22, Iain Buclaw a écrit : On 29 March 2012 11:57, ezdiyeez...@gmail.com  wrote: On Thursday, 29 March 2012 at 10:49:45 UTC, deadalnix wrote: Le 29/03/2012 11:47, ezdiy a écrit : Hello, D syntax being C-ish

Re: Documentation Layout

2012-03-29 Thread Ary Manzana
On 3/29/12 5:24 PM, foobar wrote: On Thursday, 29 March 2012 at 01:52:28 UTC, James Miller wrote: On 29 March 2012 13:58, Nathan M. Swan nathanms...@gmail.com wrote: On Wednesday, 28 March 2012 at 22:43:19 UTC, foobar wrote: Have you considered that perhaps the granularity of Phobos modules

Re: How to use D for cross platform development?

2012-03-29 Thread Jacob Carlborg
On 2012-03-29 14:44, Chris W. wrote: Thanks for the link. Objective-C is basically C and can be implemented in C style as far as I know. Is it worth going down to the C level like so: Yes that would be possible. struct NSObject { struct objc_class* isa; } struct objc_class { Class isa;

Re: Annoyances with traits

2012-03-29 Thread F i L
I'd like to add to what I suggested earlier. Conversion between types is a common and expected behavior. Because std.conv is small, and the new UFCS is here, I think object.d could benefit. Hear what I had in mind: + Move std.conv functionality to object.d + Move Object.toString() from the base

Re: Issue 3789, stucts equality

2012-03-29 Thread Artur Skawina
On 03/29/12 14:07, Andrej Mitrovic wrote: 3/29/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: snip Crap, lockstep doesn't work on different types, it was iterating over the arrays. That went over my head. A slightly complicated version that actually works: import std.stdio;

Re: Array ops give sharing violation under Windows 7 64 bit?

2012-03-29 Thread Walter Bright
On 3/28/2012 12:10 AM, Don wrote: On 27.03.2012 00:42, Andrej Mitrovic wrote: On 3/26/12, Walter Brightnewshou...@digitalmars.com wrote: On 3/25/2012 2:50 PM, Kagamin wrote: Microsoft has antivirus bundled with windows. Go to security center and see whether Windows Defender is working.

Re: Array ops give sharing violation under Windows 7 64 bit?

2012-03-29 Thread Walter Bright
The names involved were short, so it should not have triggered that. On 3/29/2012 1:01 AM, Mehrdad wrote: Is it really a bug, or is it this feature (NTFS tunneling)? http://blogs.msdn.com/b/oldnewthing/archive/2005/07/15/439261.aspx Walter Bright wrote in message

Re: How to use D for cross platform development?

2012-03-29 Thread Bennie Copeland
On Thursday, 29 March 2012 at 16:36:57 UTC, Jacob Carlborg wrote: On 2012-03-29 14:44, Chris W. wrote: Thanks for the link. Objective-C is basically C and can be implemented in C style as far as I know. Is it worth going down to the C level like so: Yes that would be possible. struct

Re: cent and ucent?

2012-03-29 Thread ponce
Le 29/01/2012 02:17, Alex Rønne Petersen a écrit : Are there any current plans to implement cent and ucent? I implemented cent and ucent as a library, using division algorithm from Ian Kaplan. https://github.com/p0nce/gfm/blob/master/math/softcent.d Suggestions welcome.

Re: Issue 3789, stucts equality

2012-03-29 Thread Alvaro
El 27/03/2012 22:20, Steven Schveighoffer escribió: On Mon, 26 Mar 2012 17:25:07 -0400, Alvaro alvarodotseg...@gmail.com wrote: Maybe it makes more sense that struct==struct applies == to each of its fields. It would be the same as bitwise comparison for simple primitive types, but would be

Re: How to use D for cross platform development?

2012-03-29 Thread Gour
On Thu, 29 Mar 2012 21:03:05 +0200 Bennie Copeland mugen.kano...@gmail.com wrote: Thanks for your help. My primary use case is to provide a native look and feel GUI on the Mac. So, to the extent of creating the interface using Cocoa and tying it back to the core code written in D. Have

Re: std.containers - WAT

2012-03-29 Thread Tobias Pankrath
This is precisely the wrong way to fix this. DDoc needs to be fixed in the compiler. It's one of the lowest hanging fruits I think we have (a great concept (using compiler knowledge of code structure to generate documentaiton) that is poorly implemented). -Steve Would be a good change to

Re: std.containers - WAT

2012-03-29 Thread Adam D. Ruppe
The ddoc macros can do a LOT better than it looks in phobos.

Re: std.containers - WAT

2012-03-29 Thread Steven Schveighoffer
On Thu, 29 Mar 2012 16:53:42 -0400, Adam D. Ruppe destructiona...@gmail.com wrote: The ddoc macros can do a LOT better than it looks in phobos. My concern is not with the macros. The raw data availability and cross linking is severely lacking. Just the fact that we need javascript to

Re: std.containers - WAT

2012-03-29 Thread Jonathan M Davis
On Thursday, March 29, 2012 17:04:13 Steven Schveighoffer wrote: On Thu, 29 Mar 2012 16:53:42 -0400, Adam D. Ruppe destructiona...@gmail.com wrote: The ddoc macros can do a LOT better than it looks in phobos. My concern is not with the macros. The raw data availability and cross

Re: Annoyances with traits

2012-03-29 Thread Manu
On 29 March 2012 20:07, F i L witte2...@gmail.com wrote: auto name = Jacque Fresco; auto age = 96; writeln(Hi, I'm , name, .); writeln(I'm , age.text(), years old); writeln(This shit's got to go!); // ;) Hah! Nicely played ;)

Re: Annoyances with traits

2012-03-29 Thread F i L
On Thursday, 29 March 2012 at 21:29:04 UTC, Manu wrote: On 29 March 2012 20:07, F i L witte2...@gmail.com wrote: auto name = Jacque Fresco; auto age = 96; writeln(Hi, I'm , name, .); writeln(I'm , age.text(), years old); writeln(This shit's got to go!); // ;) Hah!

Re: Issue 3789, stucts equality

2012-03-29 Thread bearophile
Alvaro: BTW, today I encountered a problem that is probably related to this bug. if you have a map with BigInt as key, it duplicates keys: int[BigInt] a; a[BigInt(3)] = 1; a[BigInt(3)] = 2; writeln(a); prints [3:2, 3:1] Thank you for your example. BigInt usage has several other

Re: std.containers - WAT

2012-03-29 Thread Adam D. Ruppe
On Thursday, 29 March 2012 at 21:04:13 UTC, Steven Schveighoffer wrote: Just the fact that we need javascript to generate the links at the top should tell you something. It tells the data *is* there, but it needs fancier processing... We could put fancier stuff in the compiler, but that's

Function definition in multiple modules

2012-03-29 Thread Martin Drasar
Hi, I have a class that implements a lot of interfaces and I would like to separate the definition into different files, i.e. implementation of one interface in one file. Something akin to this C++ code: a.cpp: class A { void b(); void c(); }; b.cpp: void A::b() {} c.cpp: void A::c() {}

Re: Installing Modules

2012-03-29 Thread Johannes Pfau
Am Thu, 29 Mar 2012 06:15:07 +0200 schrieb TJB broug...@gmail.com: Thank you for your patience with me. I now have the following simple test code: import scid.matrix; void main() {} Then I run and get the following error: $ dmd -I/usr/local/src main.d The command Jesse posted

Re: Does D have a Verbatim String Literal?

2012-03-29 Thread simendsjo
On Thu, 29 Mar 2012 11:15:21 +0200, Bennie Copeland mugen.kano...@gmail.com wrote: For example in C# I can write @Hello \t World; and it will print Hello \t World exactly without requiring me to escape the \t. Does D have a similar feature? There are two ways: import std.stdio; void

Re: Function definition in multiple modules

2012-03-29 Thread simendsjo
On Thu, 29 Mar 2012 10:33:03 +0200, Martin Drasar dra...@ics.muni.cz wrote: Hi, I have a class that implements a lot of interfaces and I would like to separate the definition into different files, i.e. implementation of one interface in one file. Something akin to this C++ code: a.cpp:

Does D have a Verbatim String Literal?

2012-03-29 Thread Bennie Copeland
For example in C# I can write @Hello \t World; and it will print Hello \t World exactly without requiring me to escape the \t. Does D have a similar feature?

Re: Function definition in multiple modules

2012-03-29 Thread simendsjo
On Thu, 29 Mar 2012 11:31:57 +0200, Martin Drasar dra...@ics.muni.cz wrote: On 29.3.2012 11:16, simendsjo wrote: D has interface files, .di. These can be automatically generated by the compiler using the -H switch. (snip) I would like to split the X class definition into two files. One

Re: Does D have a Verbatim String Literal?

2012-03-29 Thread Bennie Copeland
On Thursday, 29 March 2012 at 09:18:38 UTC, simendsjo wrote: On Thu, 29 Mar 2012 11:15:21 +0200, Bennie Copeland mugen.kano...@gmail.com wrote: For example in C# I can write @Hello \t World; and it will print Hello \t World exactly without requiring me to escape the \t. Does D have a similar

Re: Function definition in multiple modules

2012-03-29 Thread Martin Drasar
On 29.3.2012 12:02, simendsjo wrote: Your looking for partial classes? D doesn't have this as far as I know. alias this should work for more than one value in the future, and then (I think) you should be able to do something like this: class XIB : IB {} class XIA : IA {} class X : IA, IB

Re: Function definition in multiple modules

2012-03-29 Thread simendsjo
On Thu, 29 Mar 2012 12:58:56 +0200, Martin Drasar dra...@ics.muni.cz wrote: On 29.3.2012 12:02, simendsjo wrote: Your looking for partial classes? D doesn't have this as far as I know. alias this should work for more than one value in the future, and then (I think) you should be able to do

Re: Function definition in multiple modules

2012-03-29 Thread Martin Drasar
On 29.3.2012 13:05, simendsjo wrote: It's not string mixins: mixin template XIA() { void a() { ... } // regular function } class X : IA { mixin XIA!() } XIA is injected into X, so X now looks like class X : IA { void a() { ... } } I should have thought and experiment more

Re: GC collecting too much..

2012-03-29 Thread simendsjo
On Mon, 26 Mar 2012 20:15:40 +0200, simendsjo simend...@gmail.com wrote: On Mon, 26 Mar 2012 17:10:34 +0200, Timon Gehr timon.g...@gmx.ch wrote: On 03/26/2012 11:55 AM, simendsjo wrote: It seems threads created in the c library is totally unknown to D. How can I make D aware of these threads

don't know how to make 'src\unittest.d' error while rebuilding Phobos

2012-03-29 Thread Gleb
Hi folks! I'm trying to recompile Phobos to work with curl under Win7 as described here: digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.Darticle_id=161483 As far as I understand, I need to build druntime before building phobos, because phobos depends on druntime's libraries.

Re: GC collecting too much..

2012-03-29 Thread simendsjo
On Thu, 29 Mar 2012 14:14:10 +0200, simendsjo simend...@gmail.com wrote: On Mon, 26 Mar 2012 20:15:40 +0200, simendsjo simend...@gmail.com wrote: On Mon, 26 Mar 2012 17:10:34 +0200, Timon Gehr timon.g...@gmx.ch wrote: On 03/26/2012 11:55 AM, simendsjo wrote: It seems threads created in

Re: don't know how to make 'src\unittest.d' error while rebuilding Phobos

2012-03-29 Thread Dmitry Olshansky
On 29.03.2012 17:51, Gleb wrote: Hi folks! I'm trying to recompile Phobos to work with curl under Win7 as described here: digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.Darticle_id=161483 As far as I understand, I need to build druntime before building phobos, because phobos

Stack traces in 2.059HEAD?

2012-03-29 Thread simendsjo
My stacktraces have changed a bit... t.d: vaid main() { assert(false); } 2.058: core.exception.AssertError@t(2): Assertion failure t(_d_assertm+0x2a) [0x4144be] t() [0x414492] t(_Dmain+0xe) [0x414476] t(extern (C) int rt.dmain2.main(int, char**).void runMain()+0x17)

Re: Printing stacktrace on segfault

2012-03-29 Thread simendsjo
On Tue, 27 Mar 2012 16:30:01 +0200, David d...@dav1d.de wrote: Am 27.03.2012 12:04, schrieb simendsjo: Is there a way to print a stacktrace on segfaults on linux? I haven't found one, but you can use gdb, the only thing you've to do is to compile with -g and -gc (or you use gdc) Thanks.

Re: Installing Modules

2012-03-29 Thread Jesse Phillips
On Thursday, 29 March 2012 at 08:55:41 UTC, Johannes Pfau wrote: The command Jesse posted is missing a -L-lscid and you'll probably also need -L-L/usr/local/lib So the complete command should be: Ah, you are right, though I selected /usr/local/lib as it is already part of LD's search path.

Re: don't know how to make 'src\unittest.d' error while rebuilding Phobos

2012-03-29 Thread Gleb
Dmitry, thank you for your answer! On Thursday, 29 March 2012 at 13:57:05 UTC, Dmitry Olshansky wrote: This should work: make -f win32.mak I've already gave this a try. I managed to get phobos built without unittests but I can't built my program with new phobos.lib. An error message is as

Re: don't know how to make 'src\unittest.d' error while rebuilding Phobos

2012-03-29 Thread Jesse Phillips
On Thursday, 29 March 2012 at 16:51:24 UTC, Gleb wrote: OPTLINK (R) for Win32 Release 8.00.12 Copyright (C) Digital Mars 1989-2010 All rights reserved. http://www.digitalmars.com/ctg/optlink.html D:\UserFiles\D\dmd2\windows\bin\..\lib\phobos.lib(file) Error 42: Symbol Undefined

Re: std.conv length=0

2012-03-29 Thread Jesse Phillips
On Thursday, 29 March 2012 at 04:25:54 UTC, James Miller wrote: I find the distaste of reviving a thread strange. It would be like removing the reopened feature of bug tracking software (who wants to transpose all that information). I have no problem with it, if I did, I would have said so.

Re: don't know how to make 'src\unittest.d' error while rebuilding Phobos

2012-03-29 Thread Dmitry Olshansky
On 29.03.2012 20:51, Gleb wrote: Dmitry, thank you for your answer! On Thursday, 29 March 2012 at 13:57:05 UTC, Dmitry Olshansky wrote: This should work: make -f win32.mak I've already gave this a try. I managed to get phobos built without unittests but I can't built my program with new

Re: don't know how to make 'src\unittest.d' error while rebuilding Phobos

2012-03-29 Thread Gleb
Thank you for the answers. Unfortunately, the program compiles correctly with the original phobos.lib in dmd2\windows\lib, but does not compile with the new one in the same directory.

Problem interacting with the console

2012-03-29 Thread Jacob Carlborg
I'm trying to port a C application to D. The problem I have is interacting with the console. I'm using the POSIX read function, the problem is that in the D version the read function seems to never return. The C version works fine and prints ** after I press a key. I've created a small

Where does U in Rebindable.Rebindable come from?

2012-03-29 Thread simendsjo
If you look at the struct, it uses the type U in, among others, the union. The only place I could see U referenced is in the first static if, but I cannot recreate this behavior: void main() { static if(is(int X == const(U), U)) { } else { static

Re: Where does U in Rebindable.Rebindable come from?

2012-03-29 Thread Tove
On Thursday, 29 March 2012 at 20:15:43 UTC, simendsjo wrote: If you look at the struct, it uses the type U in, among others, the union. The only place I could see U referenced is in the first static if, but I cannot recreate this behavior: void main() { static if(is(int X == const(U),

Re: Where does U in Rebindable.Rebindable come from?

2012-03-29 Thread Ali Çehreli
On 03/29/2012 01:51 PM, Tove wrote: On Thursday, 29 March 2012 at 20:15:43 UTC, simendsjo wrote: If you look at the struct, it uses the type U in, among others, the union. The only place I could see U referenced is in the first static if, but I cannot recreate this behavior: void main() {

Re: Where does U in Rebindable.Rebindable come from?

2012-03-29 Thread Simen Kjærås
On Thu, 29 Mar 2012 22:15:41 +0200, simendsjo simend...@gmail.com wrote: If you look at the struct, it uses the type U in, among others, the union. The only place I could see U referenced is in the first static if, but I cannot recreate this behavior: void main() { static if(is(int X

Re: Installing Modules

2012-03-29 Thread TJB
On Thursday, 29 March 2012 at 15:15:35 UTC, Jesse Phillips wrote: On Thursday, 29 March 2012 at 08:55:41 UTC, Johannes Pfau wrote: The command Jesse posted is missing a -L-lscid and you'll probably also need -L-L/usr/local/lib So the complete command should be: Ah, you are right, though I

Compiling DMD's source code in Mac OSX

2012-03-29 Thread Ary Manzana
Hi, Does anyone have a build script or something similar for compiling DMD under Mac? I cloned the repo but all I can see is a win32.mak file. I renamed it to Makefile and tried make but no luck. I don't have much experience with make or makefiles. Thanks, Ary

Re: Compiling DMD's source code in Mac OSX

2012-03-29 Thread Jonathan M Davis
On Friday, March 30, 2012 09:15:11 Ary Manzana wrote: Hi, Does anyone have a build script or something similar for compiling DMD under Mac? I cloned the repo but all I can see is a win32.mak file. I renamed it to Makefile and tried make but no luck. I don't have much experience with make

[Issue 7745] Regression (1.x git-415e48a) Methods defined in external object files when a pointer to it is taken

2012-03-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7745 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED

  1   2   >