Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread Andrei Alexandrescu
On 3/13/12 1:31 AM, Xinok wrote: I've been playing with sorting algorithms a lot in recent months, so I want to implement a *working* stable sort for Phobos which is broken at the moment. I have a working library and I'm still adding to it. It's much more complex than a simple merge sort, being o

Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread Andrei Alexandrescu
On 3/13/12 4:02 AM, Xinok wrote: On Tuesday, 13 March 2012 at 06:53:30 UTC, Chad J wrote: Hey, I'd love to see more sorting algorithms in phobos. Being stuck with one seems kind of... wrong. Things like this are better left to 3rd party libs. Phobos already has two, a stable and unstable sort,

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Adam D. Ruppe
On Tuesday, 13 March 2012 at 12:22:00 UTC, Ary Manzana wrote: But if people didn't have an option to disable JS, we wouldn't have this discussion. I think it as having an option to disable CSS. You can disable css :P Keeping your site working without css is a lot harder IMO than doing the sam

Re: Feq questions about the D language

2012-03-13 Thread Peter Alexander
On Monday, 12 March 2012 at 02:33:23 UTC, Andrei Alexandrescu wrote: On 3/11/12 5:37 PM, Timon Gehr wrote: On 03/11/2012 10:57 PM, Caligo wrote: And just for the record, there are software projects that are millions of lines of code in C/C++ and have ZERO workarounds. Also, I have never encoun

Re: Multiple return values...

2012-03-13 Thread Manu
On 13 March 2012 13:27, Iain Buclaw wrote: > What about alternative optimisations for MRV, rather than stating that > it should always be returned in registers where possible (and breaking > ABI on all target platforms). What about, for example, using named > return value optimisation in this ca

Re: How about colors and terminal graphics in std.format?

2012-03-13 Thread Christian Manning
On Tuesday, 13 March 2012 at 07:45:19 UTC, Jacob Carlborg wrote: On 2012-03-13 02:36, Christian Manning wrote: It would be great if an std.terminal contained general stuff for manipulating/querying a terminal portably, as well as colour output, eg. get terminal size, move cursor around, erase

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Ary Manzana
On 03/13/2012 01:52 AM, Nick Sabalausky wrote: "Ary Manzana" wrote in message news:jjmhja$3a$2...@digitalmars.com... On 03/12/2012 10:58 PM, H. S. Teoh wrote: The problem today is that JS is the "next cool thing", so everyone is jumping on the bandwagon, and everything from a single-page pers

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Ary Manzana
On 03/13/2012 02:14 AM, H. S. Teoh wrote: On Mon, Mar 12, 2012 at 10:35:54PM -0400, Nick Sabalausky wrote: "Jonathan M Davis" wrote in message news:mailman.572.1331601463.4860.digitalmar...@puremagic.com... [...] All I'm saying is that if it makes sense for the web developer to use javascript

Re: toHash => pure, nothrow, const, @safe

2012-03-13 Thread Martin Nowak
On Tue, 13 Mar 2012 01:40:08 +0100, Walter Bright wrote: On 3/12/2012 1:56 PM, Martin Nowak wrote: It doesn't require all source code. It just means that without source code nothing can be inferred and the attributes fall back to what has been annotated by hand. Hello endless bug reports o

Re: Multiple return values...

2012-03-13 Thread Iain Buclaw
On 13 March 2012 09:12, Manu wrote: > On 13 March 2012 06:45, Andrei Alexandrescu > wrote: >> >> You see, at this point I have no idea what to believe anymore. You argued >> very strongly from the position of one whose life depends on efficiency. >> Here and there you'd mix some remark about synt

Re: toHash => pure, nothrow, const, @safe

2012-03-13 Thread Don Clugston
On 13/03/12 03:05, Walter Bright wrote: On 3/12/2012 6:15 PM, Stewart Gordon wrote: And what about toString? Good question. What do you suggest? Why can't we just kill that abomination?

Re: toHash => pure, nothrow, const, @safe

2012-03-13 Thread deadalnix
Le 13/03/2012 12:02, Peter Alexander a écrit : On Monday, 12 March 2012 at 09:40:15 UTC, Walter Bright wrote: On 3/12/2012 1:08 AM, Martin Nowak wrote: What's wrong with auto-inference. Inferred attributes are only strengthening guarantees. Auto-inference is currently done for lambdas and tem

Re: toHash => pure, nothrow, const, @safe

2012-03-13 Thread Peter Alexander
On Monday, 12 March 2012 at 09:40:15 UTC, Walter Bright wrote: On 3/12/2012 1:08 AM, Martin Nowak wrote: What's wrong with auto-inference. Inferred attributes are only strengthening guarantees. Auto-inference is currently done for lambdas and template functions - why? - because the function'

Re: Turning a SIGSEGV into a regular function call under Linux, allowing throw

2012-03-13 Thread FeepingCreature
On 03/13/12 11:23, deadalnix wrote: > Le 13/03/2012 11:09, FeepingCreature a écrit : >> Note: I worked out this method for my own language, Neat, but the basic >> approach should be portable to D's exceptions as well. >> >> I've seen it argued a lot over the years (even argued it myself) that it's

Re: Turning a SIGSEGV into a regular function call under Linux, allowing throw

2012-03-13 Thread deadalnix
Le 13/03/2012 11:09, FeepingCreature a écrit : Note: I worked out this method for my own language, Neat, but the basic approach should be portable to D's exceptions as well. I've seen it argued a lot over the years (even argued it myself) that it's impossible to throw from Linux signal handler

Turning a SIGSEGV into a regular function call under Linux, allowing throw

2012-03-13 Thread FeepingCreature
Note: I worked out this method for my own language, Neat, but the basic approach should be portable to D's exceptions as well. I've seen it argued a lot over the years (even argued it myself) that it's impossible to throw from Linux signal handlers. This is basically correct, because they const

Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread deadalnix
Le 13/03/2012 10:19, Xinok a écrit : On Tuesday, 13 March 2012 at 08:37:06 UTC, deadalnix wrote: I have a radix sort (that need some rework to be phobos quality) and a smoothsort (that could be included in phobos). Would you mind sharing your smoothsort? I haven't implemented one myself and I'

Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread Xinok
On Tuesday, 13 March 2012 at 08:37:06 UTC, deadalnix wrote: I have a radix sort (that need some rework to be phobos quality) and a smoothsort (that could be included in phobos). Would you mind sharing your smoothsort? I haven't implemented one myself and I'd love to test it out. Radix sort, on

Re: Multiple return values...

2012-03-13 Thread Manu
On 13 March 2012 06:45, Andrei Alexandrescu wrote: > You see, at this point I have no idea what to believe anymore. You argued > very strongly from the position of one whose life depends on efficiency. > Here and there you'd mix some remark about syntax, and I'd like "whaa?..." > but generally dis

Re: Feq questions about the D language

2012-03-13 Thread Don Clugston
On 12/03/12 01:20, Walter Bright wrote: On 3/11/2012 2:57 PM, Caligo wrote: And just for the record, there are software projects that are millions of lines of code in C/C++ and have ZERO workarounds. Also, I have never encountered a bug in GCC when programming in C++, even when trying out the la

Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread Xinok
On Tuesday, 13 March 2012 at 06:53:30 UTC, Chad J wrote: Hey, I'd love to see more sorting algorithms in phobos. Being stuck with one seems kind of... wrong. Things like this are better left to 3rd party libs. Phobos already has two, a stable and unstable sort, which fulfill 99% of cases.

Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread deadalnix
Le 13/03/2012 07:53, Chad J a écrit : On 03/13/2012 02:31 AM, Xinok wrote: I've been playing with sorting algorithms a lot in recent months, so I want to implement a *working* stable sort for Phobos which is broken at the moment. I have a working library and I'm still adding to it. It's much mor

Re: How about colors and terminal graphics in std.format?

2012-03-13 Thread Jacob Carlborg
On 2012-03-13 02:36, Christian Manning wrote: It would be great if an std.terminal contained general stuff for manipulating/querying a terminal portably, as well as colour output, eg. get terminal size, move cursor around, erase line... just things to help with building UIs, progress bars, etc.

Re: toHash => pure, nothrow, const, @safe

2012-03-13 Thread Jacob Carlborg
On 2012-03-13 01:40, Walter Bright wrote: On 3/12/2012 1:56 PM, Martin Nowak wrote: It doesn't require all source code. It just means that without source code nothing can be inferred and the attributes fall back to what has been annotated by hand. Hello endless bug reports of the form: "It co

<    1   2