Re: [OffTopic] GitHub for Mac

2011-06-23 Thread Jacob Carlborg
On 2011-06-22 21:27, Robert Clipsham wrote: GitHub have just released github for mac - handy tool if you're on a mac. Announcement: https://github.com/blog/878-announcing-github-for-mac Website: http://mac.github.com/ Doesn't do everything yet, eg bug reports, it does allow you to push/pull/vi

Re: Programming language benchmark

2011-06-23 Thread Don
bearophile wrote: Piotr Szturmaj: I don't know why there's no DMD flavor, though. The author of that bench has said: I have not evaluated DMD because I am running the programs on a Linux server I have no control of. The “libc” is quite old and incompatible with the binary release of dmd.<

Re: Naming conventions for functions in similar modules

2011-06-23 Thread SimonM
On 2011/06/23 00:22 AM, SimonM wrote: On 2011/06/22 19:16 PM, Andrei Alexandrescu wrote: On 6/22/11 11:53 AM, Walter Bright wrote: On 6/22/2011 4:47 AM, Lars T. Kyllingstad wrote: One problem: std.uni only contains functions for dealing with upper/ lower case and for checking whether something

Overloading const member function

2011-06-23 Thread Nub Public
Why doesn't overloading of const member functions work? struct S { int a, b; int A() const { return a; } ref int A() { return a; } int min() const { return A() < b ? A() : b; } } DMD2 compiler error: S.A () is not callable using argument types ()

Re: Overloading const member function

2011-06-23 Thread Daniel Gibson
Am 23.06.2011 10:11, schrieb Nub Public: > Why doesn't overloading of const member functions work? > > struct S { > int a, b; > > int A() const { return a; } > ref int A() { return a; } > > int min() const { return A() < b ? A() : b; } > } > > DMD2 compiler error: S.A ()

Re: Overloading const member function

2011-06-23 Thread Nub Public
On 6/23/2011 4:14 PM, Daniel Gibson wrote: Am 23.06.2011 10:11, schrieb Nub Public: Why doesn't overloading of const member functions work? struct S { int a, b; int A() const { return a; } ref int A() { return a; } int min() const { return A()< b ? A() : b; } } DMD2 comp

Re: Overloading const member function

2011-06-23 Thread kenji hara
2011/6/23 Daniel Gibson : > how do you want to call the different A() functions? i.e. how will D > know which one you want to call? In member function S.min, member function A is called from implicit 'this' variable typed const(S). So >>     int min() const { return A() < b ? A() : b; } is semanti

Re: Overloading const member function

2011-06-23 Thread kenji hara
This is definitely bug of current dmd. It is already filed in bugzilla, see http://d.puremagic.com/issues/show_bug.cgi?id=1983 . Kenji 2011/6/23 Nub Public : > Why doesn't overloading of const member functions work? > > struct S { >        int a, b; > >        int A() const { return a; } >      

Re: Overloading const member function

2011-06-23 Thread Nub Public
I see. Thanks. On 6/23/2011 4:19 PM, kenji hara wrote: This is definitely bug of current dmd. It is already filed in bugzilla, see http://d.puremagic.com/issues/show_bug.cgi?id=1983 . Kenji 2011/6/23 Nub Public: Why doesn't overloading of const member functions work? struct S { int a

Continuous Integration on GitHub used for D repos

2011-06-23 Thread Thomas Mader
Hi, do you use any Continuous Integration servers for any of the D repos? For instance to run the dmd testsuite? If yes which one? (CI Joe, Jenkins,...) Thomas

Re: Continuous Integration on GitHub used for D repos

2011-06-23 Thread Johann MacDonagh
On 6/23/2011 5:04 AM, Thomas Mader wrote: Hi, do you use any Continuous Integration servers for any of the D repos? For instance to run the dmd testsuite? If yes which one? (CI Joe, Jenkins,...) Thomas There's the auto-tester: http://d.puremagic.com/test-results/

[OT] GitHub pull request automation

2011-06-23 Thread Johann MacDonagh
Found this on reddit: http://www.splitbrain.org/blog/2011-06/19-automate_github_pull_requests Adds a new "git pull-request" command. Without any arguments, it lists all the pull requests for your repo. If you give it the pull request number, it will automatically create a new branch and pull d

Re: Web-news reader generates wrong links

2011-06-23 Thread Kagamin
Steven Schveighoffer Wrote: > This does not happen to me, but I think I've seen it before. I think it > has to do with some sort of cookie that webnews uses. The cookie expires at the end of session. The cookie seems to contain php session id, when it expires, a new session is created with de

Re: D demangling filter tool?

2011-06-23 Thread Robert Clipsham
On 23/06/2011 02:16, Michel Fortin wrote: On 2011-06-22 18:58:44 -0400, David Nadlinger said: Does anybody have a tool lying around which reads in some text (from a file or stdin) and replaces all mangled D names it comes across with the demangled text? I thought I would ask before quickly whi

Re: D demangling filter tool?

2011-06-23 Thread David Nadlinger
On 6/23/11 12:57 PM, Robert Clipsham wrote: On 23/06/2011 02:16, Michel Fortin wrote: I made one a few months ago, but I can't seem to find it back now... Ah! found it: I don't suppo

Re: D demangling filter tool?

2011-06-23 Thread Robert Clipsham
On 23/06/2011 12:13, David Nadlinger wrote: On 6/23/11 12:57 PM, Robert Clipsham wrote: On 23/06/2011 02:16, Michel Fortin wrote: I made one a few months ago, but I can't seem to find it back now... Ah! found it:

Re: Overloading const member function

2011-06-23 Thread Trass3r
Am 23.06.2011, 10:11 Uhr, schrieb Nub Public : Why doesn't overloading of const member functions work? struct S { int a, b; int A() const { return a; } ref int A() { return a; } int min() const { return A() < b ? A() : b; } } DMD2 compiler erro

Re: D demangling filter tool?

2011-06-23 Thread Michel Fortin
On 2011-06-23 06:57:39 -0400, Robert Clipsham said: On 23/06/2011 02:16, Michel Fortin wrote: On 2011-06-22 18:58:44 -0400, David Nadlinger said: Does anybody have a tool lying around which reads in some text (from a file or stdin) and replaces all mangled D names it comes across with the d

Re: D demangling filter tool?

2011-06-23 Thread Michel Fortin
On 2011-06-23 07:25:45 -0400, Robert Clipsham said: On 23/06/2011 12:13, David Nadlinger wrote: On 6/23/11 12:57 PM, Robert Clipsham wrote: On 23/06/2011 02:16, Michel Fortin wrote: I made one a few months ago, but I can't seem to find it back now... Ah! found it:

Re: D demangling filter tool?

2011-06-23 Thread Robert Clipsham
On 23/06/2011 12:54, Michel Fortin wrote: https://gist.github.com/1042363 David Doesn't seem to work for me with the following: Undefined symbols for architecture i386: "__Dmain", referenced from: _D2rt6dmain24mainUiPPaZi7runMainMFZv in libphobos2.a(dmain2_2fa_1a5.o) ld: symbol(s) not found f

Re: Continuous Integration on GitHub used for D repos

2011-06-23 Thread Thomas Mader
On 2011-06-23 11:58, Johann MacDonagh wrote: On 6/23/2011 5:04 AM, Thomas Mader wrote: Hi, do you use any Continuous Integration servers for any of the D repos? For instance to run the dmd testsuite? If yes which one? (CI Joe, Jenkins,...) Thomas There's the auto-tester: http://d.puremagic.

Re: Strange behavior on shrinking a Dynamic Array -- Capacity reduces to 0

2011-06-23 Thread Steven Schveighoffer
On Thu, 23 Jun 2011 00:15:12 -0400, d coder wrote: Yes. Capacity is only non-zero for arrays which can safely be extended. If you shrink an array from length 10 to length 5, the GC is smart enough to know that that there may be a dangling reference to elements [5..10] and thus if the len

Re: D demangling filter tool?

2011-06-23 Thread KennyTM~
On Jun 23, 11 09:16, Michel Fortin wrote: On 2011-06-22 18:58:44 -0400, David Nadlinger said: Does anybody have a tool lying around which reads in some text (from a file or stdin) and replaces all mangled D names it comes across with the demangled text? I thought I would ask before quickly whi

Re: D demangling filter tool?

2011-06-23 Thread Sean Kelly
On Jun 23, 2011, at 5:26 AM, Robert Clipsham wrote: > > Shouldn't it also demangle __Dmain? In backtraces that's normally demangled > as D main(). Also thanks, that's got it working :) The double underscore may be throwing it off.

Re: Naming conventions for functions in similar modules

2011-06-23 Thread Andrei Alexandrescu
On 6/23/11 2:58 AM, SimonM wrote: On 2011/06/23 00:22 AM, SimonM wrote: On 2011/06/22 19:16 PM, Andrei Alexandrescu wrote: On 6/22/11 11:53 AM, Walter Bright wrote: On 6/22/2011 4:47 AM, Lars T. Kyllingstad wrote: One problem: std.uni only contains functions for dealing with upper/ lower case

Re: [OT] GitHub pull request automation

2011-06-23 Thread Andrei Alexandrescu
On 6/23/11 5:05 AM, Johann MacDonagh wrote: Found this on reddit: http://www.splitbrain.org/blog/2011-06/19-automate_github_pull_requests Adds a new "git pull-request" command. Without any arguments, it lists all the pull requests for your repo. If you give it the pull request number, it will a

Re: Naming conventions for functions in similar modules

2011-06-23 Thread Kagamin
Andrej Mitrovic Wrote: >> Did you try renamed imports? > >I guess that could work. I'm forgetting how many features we have in D. :p Huh, even C# has them, though usings there work rather like aliases. Can you alias a module in D?

Re: Strange behavior on shrinking a Dynamic Array -- Capacity reduces to 0

2011-06-23 Thread dsimcha
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article > On Thu, 23 Jun 2011 00:15:12 -0400, d coder wrote: > >> > >> > >> Yes. Capacity is only non-zero for arrays which can safely be extended. > >> If > >> you shrink an array from length 10 to length 5, the GC is smart enough > >> to

Re: D demangling filter tool?

2011-06-23 Thread Michel Fortin
On 2011-06-23 09:36:43 -0400, KennyTM~ said: On Jun 23, 11 09:16, Michel Fortin wrote: On 2011-06-22 18:58:44 -0400, David Nadlinger said: Does anybody have a tool lying around which reads in some text (from a file or stdin) and replaces all mangled D names it comes across with the demangle

Re: Naming conventions for functions in similar modules

2011-06-23 Thread Andrej Mitrovic
On 6/23/11, SimonM wrote: > Oh! Forgot about this: > import ascii = std.ascii; This doesn't help with std.string, because you'll inadvertently hide the string type: import string = std.string; // woops void main() { string x; } Error: module std.string is used as a type

[GSoC] Pass-by-value opAssign called with a ref doesn't call postblit, possible bug.

2011-06-23 Thread Cristi Cobzarenco
-- import std.stdio; struct Test { this( this ) { writeln( "Test.this(this)" ); } ~this() { writeln( "Test.~this()" );} void opAssign( Test rhs ) { writeln( "Test.opAssign" ); } } ref Test makeRef( ref Test test ) { return test; }

Re: [GSoC] Pass-by-value opAssign called with a ref doesn't call postblit, possible bug.

2011-06-23 Thread Cristi Cobzarenco
Ok a follow-up to my previous email, it has nothing to do with opAssign in particular. Any function that takes an argument by value, pass it the result of a function that returns a reference and it won't call the postblit. Calling it with a ref argument on the other hand works properly: import std

Re: [GSoC] Pass-by-value opAssign called with a ref doesn't call postblit, possible bug.

2011-06-23 Thread dsimcha
== Quote from Cristi Cobzarenco (cristi.cobzare...@gmail.com)'s article > --bcaec520ef993a51fd04a664c3d6 > Content-Type: text/plain; charset=ISO-8859-1 > Ok a follow-up to my previous email, it has nothing to do with opAssign in > particular. Any function that takes an argument by value, pass it th

Re: RAII implementation for Socket and Selector

2011-06-23 Thread jdrewsen
Den 20-06-2011 22:38, Jose Armando Garcia skrev: Hi everyone, For the past few of days I have been working on a RAII implementation for Socket and Selector. Sockets are a ref counted wrapper around the socket handle which closes the handle once the ref count goes to zero. It provides safe method

Re: [OT] GitHub pull request automation

2011-06-23 Thread jdrewsen
Den 23-06-2011 12:05, Johann MacDonagh skrev: Found this on reddit: http://www.splitbrain.org/blog/2011-06/19-automate_github_pull_requests Adds a new "git pull-request" command. Without any arguments, it lists all the pull requests for your repo. If you give it the pull request number, it will

Re: Is there a standard way to define to for user-defined types?

2011-06-23 Thread kenji hara
2011/6/21 Andrei Alexandrescu : > Kenji, you may want to package your 1 and 2 into a pull request, and 3 in a > separate pull request so we all can take a look. Just now I sent pull request #118 and #119. BTW, the functions are included in std.conv have odd order. This is what was intended? Kenj

Re: Is there a standard way to define to for user-defined types?

2011-06-23 Thread Andrei Alexandrescu
On 6/23/11 5:19 PM, kenji hara wrote: 2011/6/21 Andrei Alexandrescu: Kenji, you may want to package your 1 and 2 into a pull request, and 3 in a separate pull request so we all can take a look. Just now I sent pull request #118 and #119. Perfect. BTW, the functions are included in std.conv

Re: RAII implementation for Socket and Selector

2011-06-23 Thread Jose Armando Garcia
On Thu, Jun 23, 2011 at 5:13 PM, jdrewsen wrote: > Den 20-06-2011 22:38, Jose Armando Garcia skrev: >> >> Hi everyone, >> >> For the past few of days I have been working on a RAII implementation >> for Socket and Selector. Sockets are a ref counted wrapper around the >> socket handle which closes

D on ARM

2011-06-23 Thread Andrew Wiley
So it seems that ARM is going to be getting quite a bit bigger in the future, between the rise of smarter phones and Windows 8 support, and in general D just doesn't exist on ARM. GDC kind of works, but I've been unable to come up with a simple test case for a bug with the section-anchors optimizat

Re: D on ARM

2011-06-23 Thread Nick Sabalausky
"Andrew Wiley" wrote in message news:mailman.1177.130314.14074.digitalmar...@puremagic.com... > So it seems that ARM is going to be getting quite a bit bigger in the > future, between the rise of smarter phones and Windows 8 support, and in > general D just doesn't exist on ARM. > GDC kind of