Re: Pretty please: Named arguments

2011-02-28 Thread spir
On 02/28/2011 08:03 AM, Bekenn wrote: Consider the following line from a project I'm playing around with: HRESULT hr = m_Device.Present(null, null, null, null); Quick: What behavior does that third argument specify? If you said, "Well, /obviously/, that's a handle to an alternative destination

Re: [OT] Round 2: Webpage design and "Name That Color!"

2011-02-27 Thread spir
On 02/27/2011 09:21 AM, Nick Sabalausky wrote: "spir" wrote in message news:mailman.1875.1298389603.4748.digitalmar...@puremagic.com... On 02/22/2011 03:22 AM, Nick Sabalausky wrote: "Nick Sabalausky" wrote in message news:ijpvpl$2l8u$1...@digitalmars.com... I've b

Re: Enum "Inheritance"?

2011-02-27 Thread spir
On 02/27/2011 07:21 AM, %u wrote: Actually, on a second thought, I just noticed that the union method *is* extensible, since you're putting things in different unions... I think I'll give it a shot, thanks! :) And you can always "super-compose" unions. This view, in fact, is similar to the (fa

Re: Enum "Inheritance"?

2011-02-27 Thread spir
On 02/27/2011 04:20 AM, Nick Sabalausky wrote: "Nick Sabalausky" wrote in message news:ikcepj$248p$1...@digitalmars.com... I think your main original problem was that there isn't really a way to compose enums additively, only subtractive. That just gave me an idea: I think you should be abl

Re: "Regular Expression Matching Can Be Simple And Fast (but...) "

2011-02-24 Thread spir
On 02/24/2011 11:43 PM, Nick Sabalausky wrote: Actually, that's one of the things I really hate about academic writings in general (not that this article is particularly academic, as far as academic-themed stuff goes): There's rarely a decent overview. You're expected to implicitly piece together

Re: Should conversion of mutable return value to immutable allowed?

2011-02-24 Thread spir
On 02/24/2011 07:08 PM, Ali Çehreli wrote: Implicit conversions to immutable in the following two functions feel harmless. Has this been discussed before? string foo() { char[] s; return s; // Error: cannot implicitly convert expression // (s) of type char[] to string } string bar() { char[] s;

Re: "Regular Expression Matching Can Be Simple And Fast (but...) "

2011-02-24 Thread spir
On 02/24/2011 03:26 PM, spir wrote: Hello, "Regular Expression Matching Can Be Simple And Fast (but is slow in Java, Perl, PHP, Python, Ruby, ...)" A *very* interesting and well written article about slow & fast regex engines, why and how: http://swtch.com/~rsc/regexp/regexp1.htm

"Regular Expression Matching Can Be Simple And Fast (but...) "

2011-02-24 Thread spir
Hello, "Regular Expression Matching Can Be Simple And Fast (but is slow in Java, Perl, PHP, Python, Ruby, ...)" A *very* interesting and well written article about slow & fast regex engines, why and how: http://swtch.com/~rsc/regexp/regexp1.html Denis -- _ vita es estrany spir

Re: Lazy lists

2011-02-24 Thread spir
On 02/24/2011 09:55 AM, Russel Winder wrote: On Wed, 2011-02-23 at 23:51 +0100, spir wrote: [ . . . ] (sequence(["#"])(nextCarpet) drop n next) foreach println Hey guys, it's PostScript, no it's Forth ;-) Note that method chaining in typical OO syntax w

Re: Lazy lists

2011-02-23 Thread spir
On 02/23/2011 01:57 PM, Andrei Alexandrescu wrote: On 2/23/11 5:10 AM, Jacob Carlborg wrote: On 2011-02-23 03:28, bearophile wrote: This is a Scala implementation of a function that prints the carpet: def nextCarpet(carpet: List[String]): List[String] = ( carpet.map(x => x + x + x) ::: carpet

Re: Lazy lists

2011-02-22 Thread spir
On 02/23/2011 03:28 AM, bearophile wrote: A task from the RosettaCode site asks to generate a Sierpinski carpet like this, on given order: ### # ## ## ## ## ## ## ## ## # ### ### ## ## ### # # # ## # # ## # # # ### ##

Re: Frustratingly D

2011-02-22 Thread spir
On 02/23/2011 01:15 AM, bearophile wrote: Nicholas: auto a = obj.method( "guess what i'm returning" ); I like auto. I use it sometimes. But it's not always clear what's taking place in the examples. I believe you should exclude auto from all examples except when explaining auto. Unfortun

Re: We need to rethink remove in std.container

2011-02-22 Thread spir
On 02/22/2011 03:13 PM, Steven Schveighoffer wrote: I wonder if there is a way we could generalize "give me the implementation-specific representation of the first item *reference*" If this means a generalisation of what D's builtin 'in' provides, then I think this would be great. Then, passin

Re: [OT] Round 2: Webpage design and "Name That Color!"

2011-02-22 Thread spir
On 02/22/2011 03:22 AM, Nick Sabalausky wrote: "Nick Sabalausky" wrote in message news:ijpvpl$2l8u$1...@digitalmars.com... I've been updating the docs for my Goldie project in preparation of a new release, and figured the they looked a bit...sterile, so I've tweaked the CSS a bit. And, well, I

Re: float equality

2011-02-22 Thread spir
On 02/21/2011 10:17 PM, so wrote: If one doesn't know what floating point is and insists on using it, it is his own responsibility to face the consequences. I don't buy this argument. Why not? A logical flaw on my part or the statement being somewhat harsh? Because i don't think it is the for

Re: float equality

2011-02-21 Thread spir
On 02/21/2011 08:52 AM, Kevin Bealer wrote: == Quote from Walter Bright (newshou...@digitalmars.com)'s article ... I do understand that if you have a full symbolic representation, you can do so with zero losses. But Kevin's proposal was not that, it was for a ratio representation. All it repres

Re: float equality

2011-02-21 Thread spir
On 02/21/2011 05:32 AM, Walter Bright wrote: Kevin Bealer wrote: == Quote from Walter Bright (newshou...@digitalmars.com)'s article Kevin Bealer wrote: You could switch to this: struct { BigInt numerator; BigInt denominator; }; Bingo -- no compromise. It cannot represent irrational numbers

Re: float equality

2011-02-20 Thread spir
On 02/20/2011 09:43 PM, Walter Bright wrote: Jonathan M Davis wrote: It may be that you would still end up with situations where two values that you would think would be the same aren't due to rounding error or whatnot. However, with a fixed point value, you wouldn't have the problem where a par

Re: float equality

2011-02-20 Thread spir
On 02/20/2011 06:17 AM, Jonathan M Davis wrote: On Saturday 19 February 2011 20:46:50 Walter Bright wrote: bearophile wrote: Walter: That'll just trade one set of problems for another. But the second set of problems may be smaller :-) There's a total lack of evidence for that. Furthermore,

Re: [OT] Webpage design and "Name That Color!"

2011-02-20 Thread spir
On 02/20/2011 03:53 AM, Nick Sabalausky wrote: I've been updating the docs for my Goldie project in preparation of a new release, and figured the they looked a bit...sterile, so I've tweaked the CSS a bit. And, well, I think I've stumbled upon a heisencolor...(or a heisenhue, rather) Without rea

Re: Optional module names export list

2011-02-19 Thread spir
On 02/20/2011 12:46 AM, bearophile wrote: In a Python module if you define a name with a starting underscore, that name will be private to that module, and it will not be imported if a command "from module_name import *" is used: class Name1: pass def name2(): pass _private_name3 = 3 name4 = 4

Re: float equality

2011-02-19 Thread spir
On 02/19/2011 04:40 PM, Don wrote: spir wrote: On 02/19/2011 01:21 PM, Jonathan M Davis wrote: On Saturday 19 February 2011 04:06:38 spir wrote: Hello, What do you think of this? unittest { assert(-1.1 + 2.2 == 1.1); // pass assert(-1.1 + 2.2 + 3.3 == 4.4); // pass assert(-1.1 + 3.3 + 2.2

Re: float equality

2011-02-19 Thread spir
On 02/19/2011 02:41 PM, bearophile wrote: spir: Well, about consistency, I meant cases 2 vs 3. Floating point values are not the real values you are used in mathematics. They are approximations, and generally for them associative and distributive properties don't hold:

Re: float equality

2011-02-19 Thread spir
On 02/19/2011 01:21 PM, Jonathan M Davis wrote: On Saturday 19 February 2011 04:06:38 spir wrote: Hello, What do you think of this? unittest { assert(-1.1 + 2.2 == 1.1); // pass assert(-1.1 + 2.2 + 3.3 == 4.4);// pass assert(-1.1 + 3.3 + 2.2 == 4.4);// fail

float equality

2011-02-19 Thread spir
Hello, What do you think of this? unittest { assert(-1.1 + 2.2 == 1.1); // pass assert(-1.1 + 2.2 + 3.3 == 4.4);// pass assert(-1.1 + 3.3 + 2.2 == 4.4);// fail assert(-1.1 + 3.3 == 2.2); // fail } There is approxEquals in stdlib, right; but shouldn't bu

ICOOOLPS 2011

2011-02-18 Thread spir
Hello, Just forwarding this information, thought some of you may be interested: Workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems (ICOOOLPS) == Welcome to the sixth workshop on the Implementation, Compilation, Optimization

Re: alias this question

2011-02-17 Thread spir
On 02/17/2011 11:41 AM, Jacob Carlborg wrote: On 2011-02-16 20:42, Christopher Nicholson-Sauls wrote: On 02/13/11 10:30, Olli Aalto wrote: I encountered a problem with alias this, when the aliased member is private. I'm using the latest dmd2. It reports the follwing: src\main.d(14): Error: stru

Re: Integer conversions too pedantic in 64-bit

2011-02-17 Thread spir
On 02/17/2011 10:13 AM, Don wrote: David Nadlinger wrote: On 2/17/11 8:56 AM, Denis Koroskin wrote: I second that. word/uword are shorter than ssize_t/size_t and more in line with other type names. I like it. I agree that size_t/ptrdiff_t are misnomers and I'd love to kill them with fire, bu

Re: Integer conversions too pedantic in 64-bit

2011-02-17 Thread spir
On 02/17/2011 05:19 AM, Kevin Bealer wrote: == Quote from spir (denis.s...@gmail.com)'s article On 02/16/2011 03:07 AM, Jonathan M Davis wrote: On Tuesday, February 15, 2011 15:13:33 spir wrote: On 02/15/2011 11:24 PM, Jonathan M Davis wrote: Is there some low level reason why size_t s

Re: Integer conversions too pedantic in 64-bit

2011-02-16 Thread spir
On 02/16/2011 12:21 PM, Don wrote: spir wrote: On 02/16/2011 03:07 AM, Jonathan M Davis wrote: On Tuesday, February 15, 2011 15:13:33 spir wrote: On 02/15/2011 11:24 PM, Jonathan M Davis wrote: Is there some low level reason why size_t should be signed or something I'm completely mi

Re: Integer conversions too pedantic in 64-bit

2011-02-16 Thread spir
On 02/16/2011 03:07 AM, Jonathan M Davis wrote: On Tuesday, February 15, 2011 15:13:33 spir wrote: On 02/15/2011 11:24 PM, Jonathan M Davis wrote: Is there some low level reason why size_t should be signed or something I'm completely missing? My personal issue with unsigned ints in ge

Re: Integer conversions too pedantic in 64-bit

2011-02-16 Thread spir
On 02/16/2011 04:49 AM, Michel Fortin wrote: On 2011-02-15 22:41:32 -0500, "Nick Sabalausky" said: I like "nint". But is it unsigned or signed? Do we need 'unint' too? I think 'word' & 'uword' would be a better choice. I can't say I'm too displeased with 'size_t', but it's true that the 'si

Re: std.range.zip performance

2011-02-16 Thread spir
On 02/16/2011 03:36 AM, Andrei Alexandrescu wrote: Initial: 58 seconds. Eliminated the switch in popFront: 53s. Replaced emplace with assignment: 23s. Specialized emplace for non-struct types, reinserted: 23s. Eliminated the loop in empty (replaced with return ranges[0].empty;): 17s. I'm sur

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 11:24 PM, Jonathan M Davis wrote: Is there some low level reason why size_t should be signed or something I'm completely missing? My personal issue with unsigned ints in general as implemented in C-like languages is that the range of non-negative signed integers is half of the r

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 10:49 PM, Michel Fortin wrote: On 2011-02-15 16:33:33 -0500, Walter Bright said: Nick Sabalausky wrote: "Walter Bright" wrote in message news:ijeil4$2aso$3...@digitalmars.com... spir wrote: Having to constantly explain that "_t" means type, that "

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 10:40 PM, Daniel Gibson wrote: Am 15.02.2011 20:15, schrieb Rainer Schuetze: I think David has raised a good point here that seems to have been lost in the discussion about naming. Please note that the C name of the machine word integer was usually called "int". The C standard on

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 10:45 PM, Nick Sabalausky wrote: "Adam Ruppe" wrote in message news:ije0gi$18vo$1...@digitalmars.com... Sometimes I think we should troll the users a little and make a release with names like so: alias size_t TypeUsedForArraySizes_Indexes_AndOtherRelatedTasksThatNeedAnUnsignedMac

Re: Removed?

2011-02-15 Thread spir
On 02/15/2011 07:44 PM, Walter Bright wrote: Andrei Alexandrescu wrote: As an aside, it's quite remarkable that such a movement and others similar originated in the Capitalist world. History will tell, but I see it as possible for the spirit to stay put. It's the internet that has made large

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 03:25 PM, Daniel Gibson wrote: Am 15.02.2011 15:18, schrieb spir: On 02/15/2011 02:01 PM, Daniel Gibson wrote: Am 15.02.2011 12:50, schrieb spir: On 02/15/2011 03:44 AM, Piotr Szturmaj wrote: spir wrote: Rename size-t, or rather introduce a meaningful standard alias? (would

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 08:05 PM, Walter Bright wrote: foobar wrote: 1. that size_t is inconsistent with D's style guide. the "_t" suffix is a C++ convention and not a D one. While it makes sense for [former?] C++ programmers it will confuse newcomers to D from other languages that would expect the langua

Re: Removed? (Wikipedia deletionism)

2011-02-15 Thread spir
On 02/15/2011 01:36 PM, Aaron Smith wrote: spir Wrote: On 02/15/2011 02:25 AM, bearophile wrote: D is much much more notable than Nemerle, Alice ML, Pure, Nosica, Kiev, Einstein, Alma-0, Joy, Zonnon, Y, Cat, Fancy, Ambi, Ptolemy, Mythryl, COMIT, Ioke, EASY, Aikido, A+, Adenine, Afnix

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 02:36 PM, Steven Schveighoffer wrote: On Mon, 14 Feb 2011 20:58:17 -0500, Nick Sabalausky wrote: "Jonathan M Davis" wrote in message news:mailman.1650.1297733226.4748.digitalmar...@puremagic.com... On Monday, February 14, 2011 17:06:43 spir wrote: Rename size-t,

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 02:01 PM, Daniel Gibson wrote: Am 15.02.2011 12:50, schrieb spir: On 02/15/2011 03:44 AM, Piotr Szturmaj wrote: spir wrote: Rename size-t, or rather introduce a meaningful standard alias? (would vote for Natural) Maybe ptrint and ptruint? If ptr means pointer, then it&#

Re: Removed? (Wikipedia deletionism)

2011-02-15 Thread spir
On 02/15/2011 01:22 PM, Aaron Smith wrote: Vladimir Panteleev Wrote: On Tue, 15 Feb 2011 03:00:59 +0200, Aaron Smith wrote: Thank god we have TDPL, otherwise the D page would quickly lose this battle. D is much much more notable than Nemerle, Alice ML, Pure, Nosica, Kiev, Einstein, Alma-0, J

Re: 'live' testing style

2011-02-15 Thread spir
On 02/15/2011 10:00 AM, Lars T. Kyllingstad wrote: On Sun, 13 Feb 2011 23:03:06 +0100, spir wrote: 1. Named unittests allowing test suites in the form of (just an example): unittest test1 { ... } unittest test2 { ... } unittest test3 { ... } unittest { test1

Re: Removed?

2011-02-15 Thread spir
On 02/15/2011 09:43 AM, Daniel Gibson wrote: Am 15.02.2011 09:24, schrieb Walter Bright: Andrew Wiley wrote: No, they have a point. That philosophy doesn't work because at some point, there's too much information. Too much to edit to make sure it meets standards, too much to browse (if the link

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 03:44 AM, Piotr Szturmaj wrote: spir wrote: Rename size-t, or rather introduce a meaningful standard alias? (would vote for Natural) Maybe ptrint and ptruint? If ptr means pointer, then it's wrong: size-t is used for more than that, I guess. Strangely enough, while "

Re: Removed?

2011-02-15 Thread spir
On 02/15/2011 09:11 AM, Andrew Wiley wrote: When you open that door, useful content gets drowned in floods of things like useless biographies and advertisements for things no one has heard of. But who says which are useful? You? Soft-bots? Academics? (who, as Bearophile said, are the ones bene

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 06:51 AM, Walter Bright wrote: Andrej Mitrovic wrote: The question is then do you want to be more consistent with the language (abolish size_t and make something nicer), or be consistent with the known standards (C99 ISO, et all.). I'd vote for a change, but I know it will never h

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 05:50 AM, Andrej Mitrovic wrote: The question is then do you want to be more consistent with the language (abolish size_t and make something nicer), or be consistent with the known standards (C99 ISO, et all.). I'd vote for a change, but I know it will never happen (even though it

Re: Removed?

2011-02-15 Thread spir
On 02/15/2011 08:56 AM, Daniel Gibson wrote: Am 15.02.2011 01:05, schrieb bearophile: Nemerle and Factor removed from Wikipedia? What are those deletionists doing? http://www.reddit.com/r/programming/comments/fkt7t/nemerle_factor_alice_ml_and_other_programming/ Is D page too at risk of deleti

Re: Removed? (Wikipedia deletionism)

2011-02-15 Thread spir
On 02/15/2011 02:25 AM, bearophile wrote: D is much much more notable than Nemerle, Alice ML, Pure, Nosica, Kiev, Einstein, Alma-0, Joy, Zonnon, Y, Cat, Fancy, Ambi, Ptolemy, Mythryl, COMIT, Ioke, EASY, Aikido, A+, Adenine, Afnix, Bsisith, ChinesePython, AngelScript, Algae, Agena, Taxi, Inger,

Re: tooling quality and some random rant

2011-02-15 Thread spir
On 02/15/2011 03:47 AM, bearophile wrote: Don: But still, cache effects are more important than instruction scheduling in 99% of cases. I agree. CPUs have prefetching instructions, but D doesn't expose them as intrinsics. A bit more higher level visibility for those instructions may be posit

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 03:26 AM, Jonathan M Davis wrote: On Monday, February 14, 2011 18:19:35 Nick Sabalausky wrote: "Jonathan M Davis" wrote in message news:mailman.1655.1297736016.4748.digitalmar...@puremagic.com... I believe that t is for type. The same goes for types such as time_t. The size part

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 03:11 AM, Don wrote: Nick Sabalausky wrote: "Jonathan M Davis" wrote in message news:mailman.1650.1297733226.4748.digitalmar...@puremagic.com... On Monday, February 14, 2011 17:06:43 spir wrote: Rename size-t, or rather introduce a meaningful standard alias? (woul

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 02:58 AM, Nick Sabalausky wrote: "Jonathan M Davis" wrote in message news:mailman.1650.1297733226.4748.digitalmar...@puremagic.com... On Monday, February 14, 2011 17:06:43 spir wrote: Rename size-t, or rather introduce a meaningful standard alias? (would vote for Natu

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 02:55 AM, Nick Sabalausky wrote: "Nick Sabalausky" wrote in message news:ijcm8d$1lf5$1...@digitalmars.com... "spir" wrote in message news:mailman.1648.1297732015.4748.digitalmar...@puremagic.com... Rename size-t, or rather introduce a meaningful standard al

Re: Integer conversions too pedantic in 64-bit

2011-02-15 Thread spir
On 02/15/2011 02:28 AM, Jonathan M Davis wrote: On Monday, February 14, 2011 17:06:43 spir wrote: On 02/15/2011 01:56 AM, Jonathan M Davis wrote: On Monday, February 14, 2011 16:30:09 Andrej Mitrovic wrote: Here's something I've noticed (x86 code): void main() { ulon

Re: 'live' testing style

2011-02-15 Thread spir
On 02/15/2011 02:42 AM, Jonathan M Davis wrote: On Monday, February 14, 2011 17:26:26 Don wrote: Jonathan M Davis wrote: On Monday, February 14, 2011 12:49:11 Tomek Sowiński wrote: spir napisał: * Why isn't testList a unittest block? Using named funcs, I can switch on& off spec

Re: Removed? (Wikipedia deletionism)

2011-02-14 Thread spir
On 02/15/2011 02:00 AM, Aaron Smith wrote: Thank god we have TDPL, otherwise the D page would quickly lose this battle. D is much much more notable than Nemerle, Alice ML, Pure, Nosica, Kiev, Einstein, Alma-0, Joy, Zonnon, Y, Cat, Fancy, Ambi, Ptolemy, Mythryl, COMIT, Ioke, EASY, Aikido, A+, A

Re: Removed? (Wikipedia deletionism)

2011-02-14 Thread spir
On 02/15/2011 01:38 AM, Vladimir Panteleev wrote: On Tue, 15 Feb 2011 02:05:32 +0200, bearophile wrote: (Months ago those sick people have deleted some pages written by me in hours or days. This is not nice). Wikipedia articles must prove that they are notable enough, and people unfamiliar w

Re: Integer conversions too pedantic in 64-bit

2011-02-14 Thread spir
On 02/15/2011 01:56 AM, Jonathan M Davis wrote: On Monday, February 14, 2011 16:30:09 Andrej Mitrovic wrote: Here's something I've noticed (x86 code): void main() { ulong size = 2; int[] arr = new int[](size); } This will error with: sizetTest.d(8): Error: cannot implicitly convert e

Re: 'live' testing style

2011-02-14 Thread spir
On 02/14/2011 09:49 PM, Tomek Sowiński wrote: spir napisał: * Why isn't testList a unittest block? Using named funcs, I can switch on& off specific test suites by (un)commenting their call from the main and unique unittest block. Else, either they all run, or none. During developmen

Re: tooling quality and some random rant

2011-02-14 Thread spir
On 02/14/2011 06:54 PM, Steven Schveighoffer wrote: On Sun, 13 Feb 2011 14:12:02 -0500, Walter Bright wrote: Vladimir Panteleev wrote: On Sun, 13 Feb 2011 20:26:50 +0200, Walter Bright wrote: golgeliyele wrote: I don't think C++ and gcc set a good bar here. Short of writing our own link

Re: std.xml should just go

2011-02-14 Thread spir
On 02/14/2011 04:11 PM, Steven Schveighoffer wrote: On Fri, 11 Feb 2011 19:06:48 -0500, Andrei Alexandrescu wrote: On 2/11/11 8:31 AM, Bruno Medeiros wrote: On 04/02/2011 16:14, Eric Poggel wrote: On 2/3/2011 10:20 PM, Andrei Alexandrescu wrote: At this point there is no turning back from r

Re: tooling quality and some random rant

2011-02-14 Thread spir
On 02/14/2011 02:29 AM, Denis Koroskin wrote: On Mon, 14 Feb 2011 02:01:53 +0300, Walter Bright wrote: Michel Fortin wrote: But note I was replying to your reply to Denis who asked specifically for demangled names for missing symbols. This by itself would be a useful improvement. I agree wi

Re: inlining or not inlining...

2011-02-14 Thread spir
On 02/14/2011 04:42 AM, Walter Bright wrote: In that vein, it is exceedingly miserable that assemblers do not accept struct declarations in C format. I always have to painstakingly translate them, and double check that all the offsets and alignment are correct. What a pain. Does D's inline asm

Re: tooling quality and some random rant

2011-02-13 Thread spir
On 02/13/2011 10:35 PM, Nick Sabalausky wrote: "spir" wrote in message news:mailman.1602.1297626622.4748.digitalmar...@puremagic.com... Also, I really miss a D for D lexical- syntactic- semantic- analyser that would produce D data structures. This would open the door hoards o

'live' testing style

2011-02-13 Thread spir
Hello, Back to the subject of using unittest and assert. I'll try to illustrate a testing style that seems to be rare in the D community, is not properly supported by D builtin tools --while this would require only minimal improvements--, and is imo rather sensible, practicle and efficient. U

Re: tooling quality and some random rant

2011-02-13 Thread spir
On 02/13/2011 08:30 PM, Walter Bright wrote: 1. people just check out when they see pages and pages of wacky switches. Has anyone ever actually read all of man gcc? + 12_000 /lines/ in my version Denis -- _ vita es estrany spir.wikidot.com

Re: tooling quality and some random rant

2011-02-13 Thread spir
On 02/13/2011 07:53 PM, Walter Bright wrote: Paulo Pinto wrote: Why C and not directly D? It is really bad adversting for D to know that when its creator came around to rewrite the linker, Walter decided to use C instead of D. That's a very good question. The answer is in the technical detai

Re: tooling quality and some random rant

2011-02-13 Thread spir
On 02/13/2011 04:07 PM, Gary Whatmore wrote: his might sound like blasphemy, but I believe the skills and knowledge for developing large scale applications in language XYZ cannot be extrapolated from small code snippets or from experience with projects in other languages. You just need to eat

Re: tooling quality and some random rant

2011-02-13 Thread spir
On 02/13/2011 01:59 PM, bearophile wrote: Walter: In C++, you get essentially the same thing from g++: /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' collect2: ld returned 1 exit status Lot of people come here be

Re: Stupid little iota of an idea

2011-02-13 Thread spir
On 02/13/2011 01:17 PM, foobar wrote: Lutger Blijdestijn Wrote: first rule of usability: don't listen to users http://www.useit.com/alertbox/20010805.html I fail to see how that page ( which talks about website design ) applies to what I've said. It says that you should look at what peopl

Re: alias this question

2011-02-13 Thread spir
On 02/13/2011 05:30 PM, Olli Aalto wrote: I encountered a problem with alias this, when the aliased member is private. I'm using the latest dmd2. It reports the follwing: src\main.d(14): Error: struct K.K member s is not accessible If I change the private modifier on the s member to public it wo

Re: tooling quality and some random rant

2011-02-13 Thread spir
ou did not watch properly, or indeed the win version output differently. On linux, I get: spir@d:~$ dmd --help Digital Mars D Compiler v2.051 Copyright (c) 1999-2010 by Digital Mars written by Walter Bright Documentation: http://www.digitalmars.com/d/2.0/index.html Usage: dmd files.d ... { -swi

Re: Stupid little iota of an idea

2011-02-12 Thread spir
On 02/12/2011 10:57 PM, Andrej Mitrovic wrote: I'd maybe vote for the syntax change. But maybe we could extend the array slice syntax to construct ranges: filter!`a % 2 == 0`([1..5]) auto r = [0 .. 5]; So if the slice sits on its own it becomes a range. Or is this too scary/ambiguous? I don't

Re: inlining or not inlining...

2011-02-12 Thread spir
On 02/13/2011 04:13 AM, so wrote: On Sat, 12 Feb 2011 13:20:36 +0200, spir wrote: On 02/12/2011 12:15 PM, Jim wrote: Sorry about that, but I think that is a closely related discussion. @inline is certainly a verb -- even imperative mood, so not just asking for information. Why do you need

Re: Stupid little iota of an idea

2011-02-12 Thread spir
On 02/12/2011 06:02 PM, Jacob Carlborg wrote: On 2011-02-12 00:55, Andrei Alexandrescu wrote: On 2/11/11 7:07 AM, foobar wrote: Andrei Alexandrescu Wrote: I don't find the name "iota" stupid. Andrei Of course _you_ don't. However practically all the users _do_ find it poorly named, includ

Re: Stupid little iota of an idea

2011-02-12 Thread spir
On 02/12/2011 02:05 PM, Andrei Alexandrescu wrote: On 2/12/11 6:52 AM, spir wrote: On 02/12/2011 12:25 PM, Andrei Alexandrescu wrote: On 2/12/11 5:02 AM, bearophile wrote: Jonathan M Davis: interval is slightly better, but as you mention, the step value muddles that abstraction. It'

Re: std.xml should just go

2011-02-12 Thread spir
On 02/12/2011 03:17 PM, bearophile wrote: Jonathan M Davis: It's a problem of semantics. ~ is intended for eager concatenation. That's how it's designed and what it's expected to mean. This is written nowhere. I am referring to my second proposal. It makes code more generic, because it allow

Re: Stupid little iota of an idea

2011-02-12 Thread spir
On 02/12/2011 02:36 PM, Jonathan M Davis wrote: With something like walk or interval, the name gives you a better idea of what it does, but it's _still_ not good enough for you to know based on the name and, since they mean something closer to what the function actually does but not quite, they r

Re: Stupid little iota of an idea

2011-02-12 Thread spir
On 02/12/2011 01:46 PM, J Chapman wrote: series Unfortunately series in maths means the sum of a sequence (at least in F, but I bet the same applies in E). Rather evokes accum/reduce/fold (for people who think at the sense in maths). Denis -- _ vita es estrany spir.wikidot.c

Re: Stupid little iota of an idea

2011-02-12 Thread spir
On 02/12/2011 12:25 PM, Andrei Alexandrescu wrote: On 2/12/11 5:02 AM, bearophile wrote: Jonathan M Davis: interval is slightly better, but as you mention, the step value muddles that abstraction. It's not muddled enough to make it worse than iota(). "iota" has nearly no relation with its pu

Re: inlining or not inlining...

2011-02-12 Thread spir
On 02/12/2011 12:42 PM, Jim wrote: spir Wrote: On 02/12/2011 12:15 PM, Jim wrote: Sorry about that, but I think that is a closely related discussion. @inline is certainly a verb -- even imperative mood, so not just asking for information. Why do you need information if you can't affec

affordance

2011-02-12 Thread spir
Hello, http://en.wikipedia.org/wiki/Affordance Just discovered this term by following links related to Donald Norman (evoked in previous thread). Especially like the definition "indicating the easy discoverability of possible actions". I think this could (should?) be a core design principle o

Re: inlining or not inlining...

2011-02-12 Thread spir
On 02/12/2011 12:15 PM, Jim wrote: Sorry about that, but I think that is a closely related discussion. @inline is certainly a verb -- even imperative mood, so not just asking for information. Why do you need information if you can't affect the outcome? I want to know it. First, because it's va

Re: Stupid little iota of an idea

2011-02-12 Thread spir
On 02/12/2011 12:02 PM, bearophile wrote: genSequence is pretty much the only > thing that I've been able to think of that I like at all, sequence(10,20,2) is another option, as long as "interval". Know what? I've been thinking for a while that "sequence" would be quite a good name for D ran

Re: Stupid little iota of an idea

2011-02-12 Thread spir
On 02/12/2011 04:49 AM, spir wrote: That page looks listing various meanings in foreign languages, but mostly stincks with the greek letter; it does not mention any sense everday sense iota actually has. Example fro fr.wiktionary: Oops, sorry for that noise, Denis -- _ vita es

Re: Stupid little iota of an idea

2011-02-12 Thread spir
On 02/12/2011 02:40 AM, Walter Bright wrote: Andrei Alexandrescu wrote: Not all users dislike iota, and besides arguments ad populum are fallacious. Iota rocks. But have at it - vote away, and I'll be glad if a better name for iota comes about. delta Like it, but for a single step (of arbit

Re: Stupid little iota of an idea

2011-02-12 Thread spir
On 02/12/2011 09:44 AM, "Jérôme M. Berger" wrote: spir wrote: On 02/12/2011 03:05 AM, Jonathan M Davis wrote: While iota isn't clear, it _does_ have the advantage that you're not going to _mis_understand Maybe you say this because iota does not mean anything for you (?).

Re: inlining or not inlining...

2011-02-12 Thread spir
On 02/12/2011 10:46 AM, Christopher Nicholson-Sauls wrote: All of this is hardly related to the simple feature I initially asked for: string escString (string s) @tellmeifnotinlined { s2 = s.replace("\n","\\n"); s2 = s.replace("\t","\\t"); return s2;

Re: Stupid little iota of an idea

2011-02-11 Thread spir
On 02/12/2011 03:05 AM, Jonathan M Davis wrote: While iota isn't clear, it _does_ have the advantage that you're not going to _mis_understand Maybe you say this because iota does not mean anything for you (?). I can easily imagine various appropriate uses of iota in a PL, like: * smallest re

Re: Stupid little iota of an idea

2011-02-11 Thread spir
On 02/12/2011 02:36 AM, Daniel Gibson wrote: Am 12.02.2011 02:25, schrieb bearophile: Michel Fortin: No one noticed yet that the a..b:c syntax causes ambiguity? Tell me, how do you rewrite this using the new proposed syntax: auto aa = [iota(a, b, c): 1, iota(d, e): 2]; Right, that's

Re: Stupid little iota of an idea

2011-02-11 Thread spir
On 02/12/2011 01:55 AM, bearophile wrote: 4) My fourth choice is "iota". It's short and it sticks in mind. 'Ψ' "psi" (beeing the forelast letter of the alphabet, just before omega, as everyone knows) would nicely suggest we're dealing with intervals half-open on the right-hand side. Denis -

Re: Stupid little iota of an idea

2011-02-11 Thread spir
On 02/12/2011 01:46 AM, so wrote: atob(1, 6) // easy to mix things like atoi ptoq(1, 6) // rocks imo! walk(1, 6) // now you have admit this is the best. Not bad, after all walk is a series of steps ;-) Denis -- _ vita es estrany spir.wikidot.com

Re: Stupid little iota of an idea

2011-02-11 Thread spir
On 02/12/2011 01:26 AM, so wrote: Not all users dislike iota, and besides arguments ad populum are fallacious. Iota rocks. But have at it - vote away, and I'll be glad if a better name for iota comes about. Andrei You asked for it! atob(1, 6) // easy to mix things like atoi ptoq(1, 6) // rock

Re: Stupid little iota of an idea

2011-02-11 Thread spir
On 02/12/2011 12:55 AM, Andrei Alexandrescu wrote: Not all users dislike iota, and besides arguments ad populum are fallacious. Iota rocks. But have at it - vote away, and I'll be glad if a better name for iota comes about. Proposed "interval" (which I understand as a quasi-synonym of range, ap

Re: 0nnn octal notation considered harmful

2011-02-11 Thread spir
On 02/11/2011 10:54 PM, Nick Sabalausky wrote: "spir" wrote in message news:mailman.1504.1297453559.4748.digitalmar...@puremagic.com... Hello, Just had a strange bug --in a test func!-- caused by this notation. This is due in my case to the practice (common, I guess) of "prett

Re: inlining or not inlining...

2011-02-11 Thread spir
On 02/11/2011 10:08 PM, bearophile wrote: spir: About inline, note that no-one asks for information on every potentially inlinable func, blindly. But having a way to know that about /this/ func one is wondering about would be great: just append @inline to it, recompile, et voilà! you know

<    1   2   3   4   5   6   7   8   9   10   >