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

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: 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: 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: 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: 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: 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: 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'

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: 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

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: 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: 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 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: 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 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: 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: 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: 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: 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: 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: 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: 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: 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: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Adam D. Ruppe
On Tuesday, 13 March 2012 at 05:38:44 UTC, Nick Sabalausky wrote: OTOH, I don't like CSS drop-down menus. Maybe it's different in CSS3, but in CSS2 the only way to make CSS menus work is for them to open upon rollover, not click. Yeah, the way I do it is with a hybrid approach: menu.onclick

Re: Multiple return values...

2012-03-13 Thread Andrei Alexandrescu
On 3/13/12 4:12 AM, Manu wrote: I think I feel a sense of urgency towards the ABI aspect because it is a breaking change, and I suspect the longer anything like that is left, the less likely/more risky it becomes. If it gets delayed for 6-12 months, are you honestly more or less likely to say it'

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

2012-03-13 Thread Andrei Alexandrescu
On 3/13/12 6:02 AM, Peter Alexander wrote: 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 templat

Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread Xinok
On Tuesday, 13 March 2012 at 09:32:49 UTC, deadalnix wrote: Le 13/03/2012 10:19, Xinok a écrit : Would you mind sharing your smoothsort? I haven't implemented one myself and I'd love to test it out. It is on github : https://github.com/deadalnix/Dsort/blob/master/sort/smooth.d Thanks. I fo

[video] A better way to program

2012-03-13 Thread proxy
Very interesting talk about the merits of direct feedback in any creative process(first half) and being a developer activist(second half). "It eventually gets going and it isn't only about game programming at about 18 mins in you will find the same ideas applied to more abstract coding and ev

Re: Multiple return values...

2012-03-13 Thread Manu
On 13 March 2012 16:44, Andrei Alexandrescu wrote: > I thought more about it and we should be fine with two functions > (untested): > > enum Skip {}; > @property ref Skip skip() { >static __gshared Skip result; >return result; > } > > void scatter(T, U...)(auto ref T source, ref U targets)

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

2012-03-13 Thread deadalnix
Le 13/03/2012 15:46, Andrei Alexandrescu a écrit : On 3/13/12 6:02 AM, Peter Alexander wrote: 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

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

2012-03-13 Thread deadalnix
Le 13/03/2012 01:50, Walter Bright a écrit : On 3/12/2012 4:11 AM, deadalnix wrote: For struct, we have inference, ? No we don't. Ok my mistake. So why not dig in that direction ? so most of the time attributes will correct. const pure nothrow @safe are something we want, but is it someth

Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread Xinok
On Tuesday, 13 March 2012 at 14:31:59 UTC, Andrei Alexandrescu wrote: On 3/13/12 1:31 AM, Xinok wrote: - It's a natural merge sort, which is faster on partially sorted lists, and adds little overhead for mostly random lists. - It uses O(log n log n) additional space for merging. That's 1024 w

Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread Sean Kelly
How does the built-in sort do? I ask because the sort routine I wrote works the same way, which is optimized for ranges with a lot of common elements. On Mar 13, 2012, at 7:33 AM, Andrei Alexandrescu wrote: > On 3/13/12 4:02 AM, Xinok wrote: >> On Tuesday, 13 March 2012 at 06:53:30 UTC, Chad

Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread Sean Kelly
I forgot to mention that my routine uses the same basic algorithm as the built-in sort. On Mar 13, 2012, at 8:54 AM, Sean Kelly wrote: > How does the built-in sort do? I ask because the sort routine I wrote works > the same way, which is optimized for ranges with a lot of common elements. >

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

2012-03-13 Thread Alex Rønne Petersen
On 13-03-2012 16:56, deadalnix wrote: Le 13/03/2012 01:50, Walter Bright a écrit : On 3/12/2012 4:11 AM, deadalnix wrote: For struct, we have inference, ? No we don't. Ok my mistake. So why not dig in that direction ? so most of the time attributes will correct. const pure nothrow @safe

Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread deadalnix
Le 13/03/2012 16:08, Xinok a écrit : On Tuesday, 13 March 2012 at 09:32:49 UTC, deadalnix wrote: Le 13/03/2012 10:19, Xinok a écrit : Would you mind sharing your smoothsort? I haven't implemented one myself and I'd love to test it out. It is on github : https://github.com/deadalnix/Dsort/blob

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

2012-03-13 Thread Jacob Carlborg
On 2012-03-13 13:31, Christian Manning wrote: 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.

Re: Multiple return values...

2012-03-13 Thread Andrei Alexandrescu
On 3/13/12 10:48 AM, Manu wrote: float t; ... (myStruct.pos, t, _, int err) = intersectThings(); I actually find the scatter syntax better than this. Anyway, I hope you'll agree there's not much difference pragmatically. Andrei

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

2012-03-13 Thread Andrei Alexandrescu
On 3/13/12 10:47 AM, deadalnix wrote: This problem is pretty close to garbage collection. Let's use pure as example, but it work with other qualifier too. function are marked pure, impure, or pure given all function called are pure (possibly pure). Then you go throw all possibly pure function an

Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread Andrei Alexandrescu
On 3/13/12 10:54 AM, Sean Kelly wrote: How does the built-in sort do? I ask because the sort routine I wrote works the same way, which is optimized for ranges with a lot of common elements. It's not about common (equal) elements, it's about elements for which comparisons do a lot of work beca

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

2012-03-13 Thread deadalnix
Le 13/03/2012 17:06, Andrei Alexandrescu a écrit : On 3/13/12 10:47 AM, deadalnix wrote: This problem is pretty close to garbage collection. Let's use pure as example, but it work with other qualifier too. function are marked pure, impure, or pure given all function called are pure (possibly pu

Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread Xinok
On Tuesday, 13 March 2012 at 16:04:55 UTC, deadalnix wrote: Le 13/03/2012 16:08, Xinok a écrit : On Tuesday, 13 March 2012 at 09:32:49 UTC, deadalnix wrote: Le 13/03/2012 10:19, Xinok a écrit : Would you mind sharing your smoothsort? I haven't implemented one myself and I'd love to test it ou

Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread Xinok
On Tuesday, 13 March 2012 at 16:11:05 UTC, Andrei Alexandrescu wrote: On 3/13/12 10:54 AM, Sean Kelly wrote: How does the built-in sort do? I ask because the sort routine I wrote works the same way, which is optimized for ranges with a lot of common elements. It's not about common (equal) e

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

2012-03-13 Thread H. S. Teoh
On Tue, Mar 13, 2012 at 11:06:00AM -0500, Andrei Alexandrescu wrote: > On 3/13/12 10:47 AM, deadalnix wrote: > >This problem is pretty close to garbage collection. Let's use pure as > >example, but it work with other qualifier too. > > > >function are marked pure, impure, or pure given all function

Re: [video] A better way to program

2012-03-13 Thread Vladimir Panteleev
On Tuesday, 13 March 2012 at 15:34:17 UTC, proxy wrote: Very interesting talk about the merits of direct feedback in any creative process(first half) and being a developer activist(second half). "It eventually gets going and it isn't only about game programming at about 18 mins in you will fi

Re: Multiple return values...

2012-03-13 Thread Manu
On 13 March 2012 18:07, Andrei Alexandrescu wrote: > On 3/13/12 10:48 AM, Manu wrote: > >> float t; >> ... >> (myStruct.pos, t, _, int err) = intersectThings(); >> > > I actually find the scatter syntax better than this. Anyway, I hope you'll > agree there's not much difference pragmatically. Th

Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread deadalnix
Le 13/03/2012 17:38, Xinok a écrit : On Tuesday, 13 March 2012 at 16:04:55 UTC, deadalnix wrote: Le 13/03/2012 16:08, Xinok a écrit : On Tuesday, 13 March 2012 at 09:32:49 UTC, deadalnix wrote: Le 13/03/2012 10:19, Xinok a écrit : Would you mind sharing your smoothsort? I haven't implemented

Re: Multiple return values...

2012-03-13 Thread Andrei Alexandrescu
On 3/13/12 12:02 PM, Manu wrote: There's a few finicky differences. I'm still of the understanding (and I may be wrong, still mystified by some of D's more complicated template syntax) that once you give the returned tuple a name, it is structurally bound to the stack. At that point, passing any

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

2012-03-13 Thread Martin Nowak
On Tue, 13 Mar 2012 04:40:01 +0100, Andrei Alexandrescu wrote: I think the three others have a special regime because pointers to them must be saved for the sake of associative arrays. toString is used only generically, Andrei Adding a special case for AAs is not a good idea but these

Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread bearophile
Andrei Alexandrescu: > it's about elements for which > comparisons do a lot of work because they have common prefixes. Consider: > > auto arr = [ "aaa", "aab", "aac", "aad" ]; > sort!((a, b) => a > b)(arr); > > There will be a lot of redundant prefix comparisons because the sorting > method do

Re: Breaking backwards compatiblity

2012-03-13 Thread Simen Kjærås
On Tue, 13 Mar 2012 06:45:12 +0100, H. S. Teoh wrote: On Tue, Mar 13, 2012 at 04:10:20AM +0100, Simen Kjærås wrote: On Tue, 13 Mar 2012 03:50:49 +0100, Nick Sabalausky wrote: [...] >D is great for physics programming. Now you can have much, much more >than 26 variables :) True, though mo

Re: [video] A better way to program

2012-03-13 Thread proxy
On Tuesday, 13 March 2012 at 16:57:48 UTC, Vladimir Panteleev wrote: On Tuesday, 13 March 2012 at 15:34:17 UTC, proxy wrote: Very interesting talk about the merits of direct feedback in any creative process(first half) and being a developer activist(second half). "It eventually gets going and

Re: Multiple return values...

2012-03-13 Thread Manu
On 13 March 2012 19:25, Andrei Alexandrescu wrote: > On 3/13/12 12:02 PM, Manu wrote: > >> There's a few finicky differences. I'm still of the understanding (and I >> may be wrong, still mystified by some of D's more complicated template >> syntax) that once you give the returned tuple a name, it

Re: [video] A better way to program

2012-03-13 Thread Brad Anderson
On Tue, Mar 13, 2012 at 10:57 AM, Vladimir Panteleev < vladi...@thecybershadow.net> wrote: > On Tuesday, 13 March 2012 at 15:34:17 UTC, proxy wrote: > >> Very interesting talk about the merits of direct feedback in any creative >> process(first half) and being a developer activist(second half). >>

Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread Xinok
On Tuesday, 13 March 2012 at 06:32:01 UTC, 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

Re: Regarding implementing a stable sort for Phobos

2012-03-13 Thread Jesse Phillips
On Tuesday, 13 March 2012 at 14:31:59 UTC, Andrei Alexandrescu wrote: On 3/13/12 1:31 AM, Xinok wrote: - I wrote it to sort random-access ranges *without* slicing, but I think the exclusion of slicing makes it slower. I'm writing a separate implementation which uses slicing and I'll keep it if

Re: [video] A better way to program

2012-03-13 Thread Brad Anderson
On Tue, Mar 13, 2012 at 12:34 PM, Brad Anderson wrote: > On Tue, Mar 13, 2012 at 10:57 AM, Vladimir Panteleev < > vladi...@thecybershadow.net> wrote: > >> On Tuesday, 13 March 2012 at 15:34:17 UTC, proxy wrote: >> >>> Very interesting talk about the merits of direct feedback in any >>> creative p

Re: Multiple return values...

2012-03-13 Thread Jose Armando Garcia
On Tue, Mar 13, 2012 at 9:07 AM, Andrei Alexandrescu wrote: > On 3/13/12 10:48 AM, Manu wrote: >> >> float t; >> ... >> (myStruct.pos, t, _, int err) = intersectThings(); > This can be checked at compile time. The D compiler can check that the number of arguments and the types match. > > I actua

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Nick Sabalausky
"Ary Manzana" wrote in message news:jjne58$1ouf$1...@digitalmars.com... > 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... >> [

Negative integer modulo/division

2012-03-13 Thread bearophile
When I translate Python code to D I sometimes need in D the different integer division and the different modulo operation of Python3. They give different results with the operands are negative: Python2 code: for x in xrange(-10, 1): print x, "", x % 3, "", x // 3 Python output: -10 2 -

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Nick Sabalausky
"Ary Manzana" wrote in message news:jjne58$1ouf$1...@digitalmars.com... > > 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. > That's not even an accurate comparison anyway. Disabling CSS never does much to im

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:jjo65v$305$1...@digitalmars.com... > "Ary Manzana" wrote in message > news:jjne58$1ouf$1...@digitalmars.com... >> 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

[draft] New std.regex walkthrough

2012-03-13 Thread Dmitry Olshansky
For a couple of releases we have a new revamped std.regex, that as far as I'm concerned works nicely, thanks to my GSOC commitment last summer. Yet there was certain dark trend around std.regex/std.regexp as both had severe bugs, missing documentation and what not, enough to consider them unusa

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:jjmmh3$9jb$1...@digitalmars.com... > "Adam D. Ruppe" wrote in message > news:oxkxtvkuybdommyer...@forum.dlang.org... >> On Tuesday, 13 March 2012 at 04:24:45 UTC, Nick Sabalausky wrote: >>> 2. On the web, animation means JS. >> >> css3 does animations tha

Re: Multiple return values...

2012-03-13 Thread Andrei Alexandrescu
On 3/13/12 2:07 PM, Jose Armando Garcia wrote: On Tue, Mar 13, 2012 at 9:07 AM, Andrei Alexandrescu wrote: On 3/13/12 10:48 AM, Manu wrote: float t; ... (myStruct.pos, t, _, int err) = intersectThings(); This can be checked at compile time. The D compiler can check that the number of arg

Re: [draft] New std.regex walkthrough

2012-03-13 Thread Andrei Alexandrescu
On 3/13/12 2:27 PM, Dmitry Olshansky wrote: For a couple of releases we have a new revamped std.regex, that as far as I'm concerned works nicely, thanks to my GSOC commitment last summer. Yet there was certain dark trend around std.regex/std.regexp as both had severe bugs, missing documentation a

Re: Multiple return values...

2012-03-13 Thread Andrei Alexandrescu
On 3/13/12 1:20 PM, Manu wrote: What value does it add over Kenji's change? Is this because Kenji's change is unable to perform direct to existing variables? Yes. My understanding from early in the thread was that Kenji's change hides the returned tuple, and performs a convenient unpack. How

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread David Gileadi
On 3/13/12 12:28 PM, Nick Sabalausky wrote: Another thing is Flash. Almost *everyone* uses JS to embed flash. But *it's not needed*! I embed Flash with pure HTML and it works perfectly fine. Don't even need any server-side code! I thought that using JS to load Flash was to avoid Eolas lawsuits.

Re: [draft] New std.regex walkthrough

2012-03-13 Thread Nick Sabalausky
"Dmitry Olshansky" wrote in message news:jjo73v$4gv$1...@digitalmars.com... > For a couple of releases we have a new revamped std.regex, that as far as > I'm concerned works nicely, thanks to my GSOC commitment last summer. Yet > there was certain dark trend around std.regex/std.regexp as both

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Nick Sabalausky
"David Gileadi" wrote in message news:jjo7vn$648$1...@digitalmars.com... > On 3/13/12 12:28 PM, Nick Sabalausky wrote: >> Another thing is Flash. Almost *everyone* uses JS to embed flash. But >> *it's >> not needed*! I embed Flash with pure HTML and it works perfectly fine. >> Don't >> even nee

Re: [video] A better way to program

2012-03-13 Thread sclytrack
On 03/13/2012 05:57 PM, Vladimir Panteleev wrote: On Tuesday, 13 March 2012 at 15:34:17 UTC, proxy wrote: Very interesting talk about the merits of direct feedback in any creative process(first half) and being a developer activist(second half). "It eventually gets going and it isn't only about

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread H. S. Teoh
On Tue, Mar 13, 2012 at 12:42:47PM -0700, David Gileadi wrote: > On 3/13/12 12:28 PM, Nick Sabalausky wrote: > >Another thing is Flash. Almost *everyone* uses JS to embed flash. But > >*it's not needed*! I embed Flash with pure HTML and it works > >perfectly fine. Don't even need any server-side co

Re: [video] A better way to program

2012-03-13 Thread Nick Sabalausky
"proxy" wrote in message news:heezhlrlpjogvinob...@forum.dlang.org... > On Tuesday, 13 March 2012 at 16:57:48 UTC, Vladimir Panteleev wrote: >> On Tuesday, 13 March 2012 at 15:34:17 UTC, proxy wrote: >>> Very interesting talk about the merits of direct feedback in any >>> creative process(first

Re: Multiple return values...

2012-03-13 Thread Manu
On 13 March 2012 21:40, Andrei Alexandrescu wrote: > On 3/13/12 1:20 PM, Manu wrote: > >> What value does it add over Kenji's change? Is this because Kenji's >> change is unable to perform direct to existing variables? >> > > Yes. > > > My understanding from early in the thread was that Kenji's c

Re: [draft] New std.regex walkthrough

2012-03-13 Thread Dmitry Olshansky
On 13.03.2012 23:42, Nick Sabalausky wrote: "Dmitry Olshansky" wrote in message news:jjo73v$4gv$1...@digitalmars.com... For a couple of releases we have a new revamped std.regex, that as far as I'm concerned works nicely, thanks to my GSOC commitment last summer. Yet there was certain dark tren

Re: [draft] New std.regex walkthrough

2012-03-13 Thread Jesse Phillips
On Tuesday, 13 March 2012 at 19:27:59 UTC, Dmitry Olshansky wrote: For a couple of releases we have a new revamped std.regex, that as far as I'm concerned works nicely, thanks to my GSOC commitment last summer. Yet there was certain dark trend around std.regex/std.regexp as both had severe bugs

Re: [draft] New std.regex walkthrough

2012-03-13 Thread bearophile
Dmitry Olshansky: > It's about time to break this gloomy aura, and show that std.regex is > actually easy to use, that it does the thing and has some nice extras. This seems a good moment to ask people regarding this small problem, that we have already discussed a little in Bugizilla (there is

Re: [draft] New std.regex walkthrough

2012-03-13 Thread Dmitry Olshansky
On 14.03.2012 0:05, bearophile wrote: Dmitry Olshansky: It's about time to break this gloomy aura, and show that std.regex is actually easy to use, that it does the thing and has some nice extras. This seems a good moment to ask people regarding this small problem, that we have already discu

Re: [draft] New std.regex walkthrough

2012-03-13 Thread Brad Anderson
On Tue, Mar 13, 2012 at 1:27 PM, Dmitry Olshansky wrote: > For a couple of releases we have a new revamped std.regex, that as far as > I'm concerned works nicely, thanks to my GSOC commitment last summer. Yet > there was certain dark trend around std.regex/std.regexp as both had severe > bugs, mis

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

2012-03-13 Thread Christian Manning
On Tuesday, 13 March 2012 at 16:05:31 UTC, Jacob Carlborg wrote: On 2012-03-13 13:31, Christian Manning wrote: 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 manipu

Re: [draft] New std.regex walkthrough

2012-03-13 Thread H. S. Teoh
On Tue, Mar 13, 2012 at 11:27:57PM +0400, Dmitry Olshansky wrote: > For a couple of releases we have a new revamped std.regex, that as > far as I'm concerned works nicely, thanks to my GSOC commitment last > summer. Yet there was certain dark trend around std.regex/std.regexp > as both had severe b

Re: [draft] New std.regex walkthrough

2012-03-13 Thread Dmitry Olshansky
On 14.03.2012 0:32, Brad Anderson wrote: On Tue, Mar 13, 2012 at 1:27 PM, Dmitry Olshansky mailto:dmitry.o...@gmail.com>> wrote: For a couple of releases we have a new revamped std.regex, that as far as I'm concerned works nicely, thanks to my GSOC commitment last summer. Yet there w

Re: [draft] New std.regex walkthrough

2012-03-13 Thread Dmitry Olshansky
On 14.03.2012 0:54, H. S. Teoh wrote: On Tue, Mar 13, 2012 at 11:27:57PM +0400, Dmitry Olshansky wrote: For a couple of releases we have a new revamped std.regex, that as far as I'm concerned works nicely, thanks to my GSOC commitment last summer. Yet there was certain dark trend around std.rege

Re: Multiple return values...

2012-03-13 Thread Andrei Alexandrescu
On 3/13/12 2:57 PM, Manu wrote: And you think that's more readable and intuitive than: (v1, v2, v3) = fun(); ? Yes (e.g. when I see the commas my mind starts running in all directions because that's valid code nowadays that ignores v1 and v2 and keeps v3 as an lvalue). Let me put it another

Fortran DLL and D

2012-03-13 Thread Michael
Hi everyone) dmd 2.058 os: win 7 64 bit fortran compilers: gfortran, ftn95 I have a fortran code that compiled into dll: SUBROUTINE fsu (i) real :: x integer :: i x = 0.025 print *, 'The answer is x = ', x , i END SUBROUTINE fsu and simple D code import std.stdio; import core.

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

2012-03-13 Thread Vladimir Panteleev
On Tuesday, 13 March 2012 at 10:09:55 UTC, FeepingCreature wrote: However, there is a method to turn a signal handler into a regular function call that you can throw from. Very nice! The only similarity with a buffer overflow exploit is that we're overriding the continuation address. There is

Tuple unpacking syntax [Was: Re: Multiple return values...]

2012-03-13 Thread bearophile
Andrei Alexandrescu: > Let me put it another way: I don't see one syntax over another a deal > maker or deal breaker. At all. I am usually able to follow threads, but this time I am a bit lost (this discussion has mixed very different topics like ABIs, implementation efficiency of tuples and t

Re: [video] A better way to program

2012-03-13 Thread F i L
On Tuesday, 13 March 2012 at 15:34:17 UTC, proxy wrote: Very interesting talk about the merits of direct feedback in any creative process(first half) and being a developer activist(second half). "It eventually gets going and it isn't only about game programming at about 18 mins in you will fi

Re: Fortran DLL and D

2012-03-13 Thread Tobias Brandt
Fortran uses pass-by-ref by default. You could try integer, value :: i in the Fortran function declaration, OR *int in the MyHandler declaration.

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

2012-03-13 Thread kennytm
Andrei Alexandrescu wrote: > On 3/13/12 6:02 AM, Peter Alexander wrote: >> 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. >>> >>> A

Re: Tuple unpacking syntax [Was: Re: Multiple return values...]

2012-03-13 Thread Michael
Maybe [x, y] = func(); ?

Re: Fortran DLL and D

2012-03-13 Thread Andrej Mitrovic
I don't think this can work: alias void function(int) MyHandler; maybe: alias extern(C) void function(int) MyHandler; And there's no need to call it like this: '(*mh)(1)', call it mh(1).

Re: Fortran DLL and D

2012-03-13 Thread Michael
On Tuesday, 13 March 2012 at 22:30:02 UTC, Tobias Brandt wrote: Fortran uses pass-by-ref by default. You could try integer, value :: i in the Fortran function declaration, OR *int in the MyHandler declaration. in case integer, value :: i or integer, intent(in) :: i same results in

Re: Fortran DLL and D

2012-03-13 Thread Tobias Brandt
On 13 March 2012 23:53, Michael wrote: > On Tuesday, 13 March 2012 at 22:30:02 UTC, Tobias Brandt wrote: >> >> Fortran uses pass-by-ref by default. You could try >> >>    integer, value :: i >> >> in the Fortran function declaration, OR >> >>    *int >> >> in the MyHandler declaration. > > in case

Re: Fortran DLL and D

2012-03-13 Thread Michael
On Tuesday, 13 March 2012 at 22:42:38 UTC, Andrej Mitrovic wrote: I don't think this can work: alias void function(int) MyHandler; maybe: alias extern(C) void function(int) MyHandler; And there's no need to call it like this: '(*mh)(1)', call it mh(1). I know, it's short version. Anyway, o

Re: Fortran DLL and D

2012-03-13 Thread Michael
Thanks, but i still get the same.

Re: Tuple unpacking syntax [Was: Re: Multiple return values...]

2012-03-13 Thread foobar
On Tuesday, 13 March 2012 at 22:26:14 UTC, bearophile wrote: Andrei Alexandrescu: Let me put it another way: I don't see one syntax over another a deal maker or deal breaker. At all. I am usually able to follow threads, but this time I am a bit lost (this discussion has mixed very different

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

2012-03-13 Thread Walter Bright
On 3/13/2012 4:15 AM, Don Clugston wrote: 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? Break a lot of existing code?

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

2012-03-13 Thread Timon Gehr
On 03/13/2012 11:39 PM, kennytm wrote: Andrei Alexandrescu wrote: On 3/13/12 6:02 AM, Peter Alexander wrote: 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 g

  1   2   >