Re: eliminate junk from std.string?

2011-01-11 Thread Justin Johansson
On 12/01/11 10:00, Andrei Alexandrescu wrote: On 1/11/11 11:21 AM, Ary Borenszweig wrote: Why care where they come from? Why not make them intuitive? Say, like, "Always camel case"? If there's enough support for this, I'll do it. Yes please; it's got my vote.

Re: DVCS (was Re: Moving to D)

2011-01-11 Thread Russel Winder
On Tue, 2011-01-11 at 11:53 -0800, Walter Bright wrote: [ . . . ] > My display is 1920 x 1200. That just seems to cause grief for Ubuntu. Windows > has no issues at all with it. [ . . . ] My 1900x1200 screen is fine with Ubuntu. -- Russel. ===

Re: eliminate junk from std.string?

2011-01-11 Thread Jerry Quinn
Jerry Quinn Wrote: > > > Same comment for icmp(). Also, in the Unicode standard, case folding can > > > depend on the specific language. > > > > That uses toUniLower. Not sure how that works. > > And doesn't mention details about the Unicode standard version it implements. Actually it does.

Re: eliminate junk from std.string?

2011-01-11 Thread Jerry Quinn
Andrei Alexandrescu Wrote: > On 1/11/11 1:45 PM, Jerry Quinn wrote: > > Unclear if iswhite() refers to ASCII whitespace or Unicode. If Unicode, > > which version of the standard? > > Not sure. > > enum dchar LS = '\u2028'; /// UTF line > separator > enum dcha

Re: D Issue Tracking System

2011-01-11 Thread BCS
Hello Robert, On 2011-01-09 11:44:05 +0100, Jérôme M. Berger said: Is not it more or less a standard bugzilla [1] install? Really? Hmm... ok. Nevermind. I normally don't like bugzilla that much. Maybe this is a case where the defaults are right and the tweaks stink...

Re: eliminate junk from std.string?

2011-01-11 Thread Nick Sabalausky
"Andrei Alexandrescu" wrote in message news:iginid$1rt...@digitalmars.com... > On 1/11/11 11:21 AM, Ary Borenszweig wrote: >> Why care where they come from? Why not make them intuitive? Say, like, >> "Always >> camel case"? > > If there's enough support for this, I'll do it. > I've already been

Re: DVCS (was Re: Moving to D)

2011-01-11 Thread Jean Crystof
Andrej Mitrovic Wrote: > Notice the smiley face -> :D > > Yeah I didn't check the price, it's only 30$. But there's no telling > if that would work either. I can tell from our hobbyist group's experience with Compiz, native Linux games, Wine, multiplatform OpenGL game development on Linux, and

Re: DVCS (was Re: Moving to D)

2011-01-11 Thread Andrej Mitrovic
Notice the smiley face -> :D Yeah I didn't check the price, it's only 30$. But there's no telling if that would work either. Also, dirt cheap video cards are almost certainly going to cause problems. Even if the drivers worked perfectly, a year down the road things will start breaking down. Cheap

Re: DVCS (was Re: Moving to D)

2011-01-11 Thread Jean Crystof
Andrej Mitrovic Wrote: > Did you hear that, Walter? Just buy a 500$ video card so you can watch > youtube videos on Linux. Easy. :D Dear Sir, did you even open the link? It's the cheapest Nvidia card I could find by googling for 30 seconds. 28,58 euros translates to $37. I can't promise that ve

Re: D standard style [was: Re: eliminate junk from std.string?]

2011-01-11 Thread Michel Fortin
On 2011-01-11 20:28:27 -0500, spir said: But while we're at conventions, and before any change is actually done, we may take the opportunity to agree not only on morphology, but on semantics ;-) For instance, from online doc: string capitalize(string s); Capitalize first character of st

Re: eliminate junk from std.string?

2011-01-11 Thread Michel Fortin
On 2011-01-11 18:00:51 -0500, Andrei Alexandrescu said: On 1/11/11 11:21 AM, Ary Borenszweig wrote: Why care where they come from? Why not make them intuitive? Say, like, "Always camel case"? If there's enough support for this, I'll do it. I support this. -- Michel Fortin michel.for...@m

Re: VLERange: a range in between BidirectionalRange and RandomAccessRange

2011-01-11 Thread Michel Fortin
On 2011-01-11 20:28:26 -0500, Steven Wawryk said: Sorry if I'm jumping inhere without the appropriate background, but I don't understand why jumping through these hoops are necessary. Please let me know if I'm missing anything. Many problems can be solved by another layer of indirection. I

Re: DVCS (was Re: Moving to D)

2011-01-11 Thread Andrej Mitrovic
Did you hear that, Walter? Just buy a 500$ video card so you can watch youtube videos on Linux. Easy. :D

Re: DVCS (was Re: Moving to D)

2011-01-11 Thread Jean Crystof
Walter Bright Wrote: > My mobo is an ASUS M2A-VM. No graphics cards, or any other cards plugged into > it. It's hardly weird or wacky or old (it was new at the time I bought it to > install Ubuntu). ASUS M2A-VM has 690G chipset. Wikipedia says: http://en.wikipedia.org/wiki/AMD_690_chipset_serie

Re: levenshteinDistanceAndPath Source bug

2011-01-11 Thread Jesse Phillips
Andrei Alexandrescu Wrote: > Fixed and readded unittest: > > http://www.dsource.org/projects/phobos/changeset/2315 > http://www.dsource.org/projects/phobos/changeset/2316 > > To post bugs, you may want to go to http://d.puremagic.com/issues. What > you post there will automatically appear in di

Re: DVCS (was Re: Moving to D)

2011-01-11 Thread Jean Crystof
Walter Bright Wrote: > retard wrote: > > One thing came to my mind. Unless you're using Ubuntu 8.04 LTS, > > I'm using 8.10, and I've noticed that no more updates are coming. Huh! You should seriously consider upgrading. If you are running any kind of services in the system or browsing the web,

Re: eliminate junk from std.string?

2011-01-11 Thread Daniel Gibson
Am 12.01.2011 03:10, schrieb Jonathan M Davis: On Tuesday, January 11, 2011 17:17:43 Daniel Gibson wrote: Am 12.01.2011 01:55, schrieb Jonathan M Davis: On Tuesday, January 11, 2011 16:23:13 Daniel Gibson wrote: Deprecating them is certainly a good idea, but I'd suggest to keep the deprecated

Re: eliminate junk from std.string?

2011-01-11 Thread Jonathan M Davis
On Tuesday, January 11, 2011 17:17:43 Daniel Gibson wrote: > Am 12.01.2011 01:55, schrieb Jonathan M Davis: > > On Tuesday, January 11, 2011 16:23:13 Daniel Gibson wrote: > >> Deprecating them is certainly a good idea, but I'd suggest to keep the > >> deprecated aliases around for longer (until D3)

Re: VLERange: a range in between BidirectionalRange and RandomAccessRange

2011-01-11 Thread spir
On 01/12/2011 02:22 AM, Andrei Alexandrescu wrote: IIUC, for the case of text, VLERange helps abstracting from the annoying fact that a codepoint is encoded as a variable number of code units. What I meant is issues like: auto text = "a\u0302"d; writeln(text); // "â" auto range = VLERange(text);

Re: eliminate junk from std.string?

2011-01-11 Thread spir
On 01/12/2011 02:17 AM, Daniel Gibson wrote: Somewhere in this thread: Am 11.01.2011 21:43, schrieb Walter Bright: > Nick Sabalausky wrote: >> I agree with this reasoning for having them. However, I don't think it >> means we shouldn't D-ify or Phobos-ify them, at least as far as >> capitali

Re: levenshteinDistanceAndPath Source bug

2011-01-11 Thread Andrei Alexandrescu
On 1/11/11 5:28 PM, tsukikage wrote: tsukikage wrote: Hello, there is a bug at std.algorithm source. dsource,org's source: 4120 levenshteinDistanceAndPath(alias equals = "a == b", Range1, Range2) 4121 (Range1 s, Range2 t) 4122 if (isForwardRange!(Range1) && isForwardRange!(Range2)) 4123 { 4124

Re: levenshteinDistanceAndPath Source bug

2011-01-11 Thread tsukikage
tsukikage wrote: Hello, there is a bug at std.algorithm source. dsource,org's source: 4120 levenshteinDistanceAndPath(alias equals = "a == b", Range1, Range2) 4121 (Range1 s, Range2 t) 4122 if (isForwardRange!(Range1) && isForwardRange!(Range2)) 4123 { 4124 Leve

D standard style [was: Re: eliminate junk from std.string?]

2011-01-11 Thread spir
On 01/12/2011 12:07 AM, Daniel Gibson wrote: Am 12.01.2011 00:00, schrieb Andrei Alexandrescu: On 1/11/11 11:21 AM, Ary Borenszweig wrote: Why care where they come from? Why not make them intuitive? Say, like, "Always camel case"? If there's enough support for this, I'll do it. Andrei Plea

Re: VLERange: a range in between BidirectionalRange and RandomAccessRange

2011-01-11 Thread Andrei Alexandrescu
On 1/11/11 4:46 PM, spir wrote: On 01/11/2011 08:09 PM, Andrei Alexandrescu wrote: The main (and massively ignored) issue when manipulating unicode text is rather that, unlike with legacy character sets, one codepoint does *not* represent a character in the common sense. In character sets like l

Re: eliminate junk from std.string?

2011-01-11 Thread Daniel Gibson
Am 12.01.2011 01:55, schrieb Jonathan M Davis: On Tuesday, January 11, 2011 16:23:13 Daniel Gibson wrote: Deprecating them is certainly a good idea, but I'd suggest to keep the deprecated aliases around for longer (until D3), so anybody porting a Phobos1-based application to D2/Phobos2 can use t

Re: DVCS (was Re: Moving to D)

2011-01-11 Thread Nick Sabalausky
"Daniel Gibson" wrote in message news:igijc7$27p...@digitalmars.com... > Am 11.01.2011 22:36, schrieb Walter Bright: >> Andrej Mitrovic wrote: >>> That's my biggest problem with Linux. Having technical problems is not >>> the issue, finding the right solution in the sea of forum posts is the >>>

Re: VLERange: a range in between BidirectionalRange and RandomAccessRange

2011-01-11 Thread Steven Wawryk
Sorry if I'm jumping inhere without the appropriate background, but I don't understand why jumping through these hoops are necessary. Please let me know if I'm missing anything. Many problems can be solved by another layer of indirection. Isn't a string essentially a bidirectional range of

levenshteinDistanceAndPath Source bug

2011-01-11 Thread tsukikage
Hello, there is a bug at std.algorithm source. dsource,org's source: 4120levenshteinDistanceAndPath(alias equals = "a == b", Range1, Range2) 4121(Range1 s, Range2 t) 4122if (isForwardRange!(Range1) && isForwardRange!(Range2)) 4123{ 4124Levenshtein!(Range, binaryFun

Re: eliminate junk from std.string?

2011-01-11 Thread spir
On 01/11/2011 09:11 PM, Ary Borenszweig wrote: "Welcome to D. Do you program in C, Javascript, Python or Ruby? Cool! Then you will feel at home." That phrase currently ends like this: "You don't? Oh, sorry, you will have to learn that some names are all lowercase, some not." But it could end l

Re: eliminate junk from std.string?

2011-01-11 Thread Jonathan M Davis
On Tuesday, January 11, 2011 16:23:13 Daniel Gibson wrote: > Am 12.01.2011 01:17, schrieb Jonathan M Davis: > > On Tuesday, January 11, 2011 16:07:11 Daniel Gibson wrote: > >> Am 12.01.2011 00:59, schrieb Jonathan M Davis: > >>> On Tuesday, January 11, 2011 15:29:54 Ary Borenszweig wrote: > So

Re: VLERange: a range in between BidirectionalRange and RandomAccessRange

2011-01-11 Thread spir
On 01/11/2011 08:09 PM, Andrei Alexandrescu wrote: The main (and massively ignored) issue when manipulating unicode text is rather that, unlike with legacy character sets, one codepoint does *not* represent a character in the common sense. In character sets like latin-1: * each code represents a

Re: eliminate junk from std.string?

2011-01-11 Thread Ary Borenszweig
You are right, deprecating those names and removing them in the long run is what I think should be done.

Re: DVCS (was Re: Moving to D)

2011-01-11 Thread Nick Sabalausky
"Walter Bright" wrote in message news:igb5uo$26a...@digitalmars.com... > Vladimir Panteleev wrote: >> From taking a quick look, I don't see meld's advantage over WinMerge >> (other than being cross-platform). > > Thanks for pointing me at winmerge. I've been looking for one to work on > Window

Re: DVCS (was Re: Moving to D)

2011-01-11 Thread Jesse Phillips
Andrej Mitrovic Wrote: > Google does seem to take into account whatever information it has on > you, which might explain why your own blog is a top result for you. > > If I log out of Google and delete my preferences, searching for "D" > won't find anything about the D language in the top results

Re: eliminate junk from std.string?

2011-01-11 Thread BlazingWhitester
On 2011-01-12 01:00:51 +0200, Andrei Alexandrescu said: On 1/11/11 11:21 AM, Ary Borenszweig wrote: Why care where they come from? Why not make them intuitive? Say, like, "Always camel case"? If there's enough support for this, I'll do it. Andrei ++vote. Uniformity in how functions are nam

Re: eliminate junk from std.string?

2011-01-11 Thread Daniel Gibson
Am 12.01.2011 01:17, schrieb Jonathan M Davis: On Tuesday, January 11, 2011 16:07:11 Daniel Gibson wrote: Am 12.01.2011 00:59, schrieb Jonathan M Davis: On Tuesday, January 11, 2011 15:29:54 Ary Borenszweig wrote: So what's a good use for aliases? 2. Deprecating a function name. For instance

Re: eliminate junk from std.string?

2011-01-11 Thread Jonathan M Davis
On Tuesday, January 11, 2011 16:07:11 Daniel Gibson wrote: > Am 12.01.2011 00:59, schrieb Jonathan M Davis: > > On Tuesday, January 11, 2011 15:29:54 Ary Borenszweig wrote: > >> So what's a good use for aliases? > > > > 2. Deprecating a function name. For instance, let's say that we rename > > spl

Re: eliminate junk from std.string?

2011-01-11 Thread Daniel Gibson
Am 12.01.2011 00:59, schrieb Jonathan M Davis: On Tuesday, January 11, 2011 15:29:54 Ary Borenszweig wrote: So what's a good use for aliases? 2. Deprecating a function name. For instance, let's say that we rename splitl to splitL or SplitLeft in std.string. Having a deprecated alias to splitl

Re: eliminate junk from std.string?

2011-01-11 Thread Jonathan M Davis
On Tuesday, January 11, 2011 15:29:54 Ary Borenszweig wrote: > So what's a good use for aliases? Oh, there's not necessarily anything wrong with aliases. The problem is if an API has a lot of them. The typical place to use typedef in C++ is when you have long, nasty template types which you don'

Re: eliminate junk from std.string?

2011-01-11 Thread Andrei Alexandrescu
On 1/11/11 1:45 PM, Jerry Quinn wrote: Andrei Alexandrescu Wrote: On 1/9/11 4:51 PM, Andrei Alexandrescu wrote: There's a lot of junk in std.string that should be gone. I'm trying to motivate myself to port some functions to different string widths and... it's not worth it. What functions do

Re: @templated()

2011-01-11 Thread Ary Borenszweig
Can't the compiler see what is used and where?

Re: eliminate junk from std.string?

2011-01-11 Thread Ary Borenszweig
So what's a good use for aliases?

Re: eliminate junk from std.string?

2011-01-11 Thread Andrei Alexandrescu
On 1/11/11 1:47 PM, Jerry Quinn wrote: Jerry Quinn Wrote: One set of functions I'd like to see are startsWith() and endsWith(). I find them frequently useful in Java and an irritating lack in the C++ standard library. Just adding that these functions are useful because they're more efficie

Re: @templated()

2011-01-11 Thread bearophile
I've now remembered that I have discussed this a bit in past, I am sorry for the partially dupe thread: http://www.digitalmars.com/d/archives/digitalmars/D/Few_ideas_to_reduce_template_bloat_108136.html Bye, bearophile

Re: eliminate junk from std.string?

2011-01-11 Thread David Nadlinger
On 1/12/11 12:00 AM, Andrei Alexandrescu wrote: If there's enough support for this, I'll do it. Andrei +1 from me – sticking to names commonly used in other programming languages is good for ease of adoption, but also inheriting the various naming convention is, in my humble opinion, just pl

Re: eliminate junk from std.string?

2011-01-11 Thread Daniel Gibson
Am 12.01.2011 00:00, schrieb Andrei Alexandrescu: On 1/11/11 11:21 AM, Ary Borenszweig wrote: Why care where they come from? Why not make them intuitive? Say, like, "Always camel case"? If there's enough support for this, I'll do it. Andrei Please do, having different naming conventions of

Re: eliminate junk from std.string?

2011-01-11 Thread Andrei Alexandrescu
On 1/11/11 12:09 PM, Ary Borenszweig wrote: Agreed. So what's wrong with improving things and leaving old things as aliases? Petrified lava. Andrei

Re: eliminate junk from std.string?

2011-01-11 Thread Andrei Alexandrescu
On 1/11/11 11:21 AM, Ary Borenszweig wrote: Why care where they come from? Why not make them intuitive? Say, like, "Always camel case"? If there's enough support for this, I'll do it. Andrei

Re: VLERange: a range in between BidirectionalRange and RandomAccessRange

2011-01-11 Thread Andrei Alexandrescu
On 1/11/11 11:21 AM, Steven Schveighoffer wrote: On Tue, 11 Jan 2011 11:54:08 -0500, Andrei Alexandrescu wrote: On 1/11/11 5:30 AM, Steven Schveighoffer wrote: While this makes it possible to write algorithms that only accept VLERanges, I don't think it solves the major problem with strings -

Re: VLERange: a range in between BidirectionalRange and RandomAccessRange

2011-01-11 Thread Andrei Alexandrescu
On 1/11/11 11:13 AM, Michel Fortin wrote: On 2011-01-11 11:36:54 -0500, Andrei Alexandrescu said: On 1/11/11 4:41 AM, Michel Fortin wrote: For instance, say we have a conversion range taking a Unicode string and converting it to ISO Latin 1. The best (lossy) conversion for "œ" is "oe" (one ch

Re: VLERange: a range in between BidirectionalRange and RandomAccessRange

2011-01-11 Thread Tomek Sowiński
Andrei Alexandrescu napisał: > I've been thinking on how to better deal with Unicode strings. Currently > strings are formally bidirectional ranges with a surreptitious random > access interface. The random access interface accesses the support of > the string, which is understood to hold data

Re: @templated()

2011-01-11 Thread Andrej Mitrovic
I think that hardcoding instructions in user code for how the compiler should do its optimizations is a bad idea. But that's just me!

Re: DVCS (was Re: Moving to D)

2011-01-11 Thread Andrej Mitrovic
Google does seem to take into account whatever information it has on you, which might explain why your own blog is a top result for you. If I log out of Google and delete my preferences, searching for "D" won't find anything about the D language in the top results. But if I log in and search "D" a

@templated()

2011-01-11 Thread bearophile
(I am busy, I am late with some answers, I am sorry, I will catch up) This paper is "Minimizing Dependencies within Generic Classes for Faster and Smaller Programs", by Dan Tsafrir, Bjarne Stroustrup and others: http://www2.research.att.com/~bs/SCARY.pdf The article shows problems of C++/D templ

Re: eliminate junk from std.string?

2011-01-11 Thread Jonathan M Davis
On Tuesday, January 11, 2011 11:12:44 Nick Sabalausky wrote: > "spir" wrote in message > news:mailman.550.1294771968.4748.digitalmar...@puremagic.com... > > > On 01/11/2011 07:14 PM, Nick Sabalausky wrote: > >> "Daniel Gibson" wrote in message > >> news:igi6n5$27p...@digitalmars.com... > >> > >

Re: eliminate junk from std.string?

2011-01-11 Thread Jonathan M Davis
On Tuesday, January 11, 2011 12:44:57 Nick Sabalausky wrote: > "Walter Bright" wrote in message > news:igibu6$154...@digitalmars.com... > > > Ary Borenszweig wrote: > >> Why care where they come from? Why not make them intuitive? Say, like, > >> "Always > >> camel case"? > > > > Because people a

Re: std.unittests for (final?) review [Update]

2011-01-11 Thread Jonathan M Davis
On Tuesday, January 11, 2011 12:25:53 Tomek Sowiński wrote: > Jonathan M Davis napisał: > > On Monday, January 10, 2011 13:48:50 Tomek Sowiński wrote: > > > Jonathan M Davis napisał: > > > > I followed Andrei's suggestion and merged most of the functions into > > > > a highly flexible assertPred. I

Re: eliminate junk from std.string?

2011-01-11 Thread Dmitry Olshansky
On 12.01.2011 0:47, Jerry Quinn wrote: Jerry Quinn Wrote: One set of functions I'd like to see are startsWith() and endsWith(). I find them frequently useful in Java and an irritating lack in the C++ standard library. Just adding that these functions are useful because they're more efficien

Re: DVCS (was Re: Moving to D)

2011-01-11 Thread Daniel Gibson
Am 11.01.2011 22:36, schrieb Walter Bright: Andrej Mitrovic wrote: That's my biggest problem with Linux. Having technical problems is not the issue, finding the right solution in the sea of forum posts is the problem. The worst ones begin with "you might try this..." or "I think this might wor

Re: eliminate junk from std.string?

2011-01-11 Thread Jerry Quinn
Jerry Quinn Wrote: > One set of functions I'd like to see are startsWith() and endsWith(). I find > them frequently useful in Java and an irritating lack in the C++ standard > library. Just adding that these functions are useful because they're more efficient than doing a find and checking th

Re: eliminate junk from std.string?

2011-01-11 Thread Jerry Quinn
Andrei Alexandrescu Wrote: > On 1/9/11 4:51 PM, Andrei Alexandrescu wrote: > > There's a lot of junk in std.string that should be gone. I'm trying to > > motivate myself to port some functions to different string widths and... > > it's not worth it. > > > > What functions do you think we should re

Re: DVCS (was Re: Moving to D)

2011-01-11 Thread Walter Bright
Andrej Mitrovic wrote: That's my biggest problem with Linux. Having technical problems is not the issue, finding the right solution in the sea of forum posts is the problem. The worst ones begin with "you might try this..." or "I think this might work, but YMMV..." How do these wind up being t

Re: eliminate junk from std.string?

2011-01-11 Thread Daniel Gibson
Am 11.01.2011 21:11, schrieb Ary Borenszweig: "Welcome to D. Do you program in C, Javascript, Python or Ruby? Cool! Then you will feel at home." That phrase currently ends like this: "You don't? Oh, sorry, you will have to learn that some names are all lowercase, some not." I agree. Using di

Re: DVCS (was Re: Moving to D)

2011-01-11 Thread Andrej Mitrovic
On 1/11/11, Walter Bright wrote: > Yeah, I've spent a lot of time googling for solutions to problems with > Linux. > You know what? I get pages of results from support forums - every solution > is > different and comes with statements like "seems to work", "doesn't work for > me", > etc. The advic

Re: eliminate junk from std.string?

2011-01-11 Thread Nick Sabalausky
"Walter Bright" wrote in message news:igifgt$1cu...@digitalmars.com... > Nick Sabalausky wrote: >> I agree with this reasoning for having them. However, I don't think it >> means we shouldn't D-ify or Phobos-ify them, at least as far as >> capitalization conventions. > > I also object to rather

Re: eliminate junk from std.string?

2011-01-11 Thread Nick Sabalausky
"Walter Bright" wrote in message news:igibu6$154...@digitalmars.com... > Ary Borenszweig wrote: >> Why care where they come from? Why not make them intuitive? Say, like, >> "Always >> camel case"? > > Because people are used to those names due to their wide use. It's the > same reason that we s

Re: eliminate junk from std.string?

2011-01-11 Thread Adam D. Ruppe
On Tue, Jan 11, 2011 at 12:43:28PM -0800, Walter Bright wrote: > Naming of things isn't nearly as critical an issue in D as it is in, say, > C, because of the excellent antihijacking support in D's module system. And the spell checker will quickly point out messed up capitalization at compile tim

Re: filling an array of structures

2011-01-11 Thread Ali Çehreli
Brad wrote: > Given an array of structures that you need to populate. > Also assume the structure is quite large and has many > elements to fill in. > > S s[]; > while (something) { > s.length += 1; > auto sp = &s[$-1]; // method 1 > sp.a = 1; > ... > with (s[$-1]) { // method 2 >

Re: eliminate junk from std.string?

2011-01-11 Thread Walter Bright
Ary Borenszweig wrote: Agreed. So what's wrong with improving things and leaving old things as aliases? I want to add that having multiple names for the same thing doesn't really do anyone any good.

Re: eliminate junk from std.string?

2011-01-11 Thread Walter Bright
Nick Sabalausky wrote: I agree with this reasoning for having them. However, I don't think it means we shouldn't D-ify or Phobos-ify them, at least as far as capitalization conventions. I also object to rather pointlessly annoying people wanting to move their code from D1 to D2 by renaming ev

Re: eliminate junk from std.string?

2011-01-11 Thread Nick Sabalausky
"Walter Bright" wrote in message news:igib2q$12g...@digitalmars.com... > Adam Ruppe wrote: >> I don't know about bearophile, but I used a lot of the functions >> you are talking about removing in my HTML -> Plain Text conversion >> function used for emails and other similar environments. squeeze

Re: eliminate junk from std.string?

2011-01-11 Thread Walter Bright
Lars T. Kyllingstad wrote: 1. What are the hexdigits, digits, octdigits, lowercase, letters, uppercase, and whitespace arrays useful for? The only thing I can think of is to check whether a character belongs to one of them, One example is conversion from a number to text. hexdigits[n] comes t

Re: eliminate junk from std.string?

2011-01-11 Thread Walter Bright
Ary Borenszweig wrote: Agreed. So what's wrong with improving things and leaving old things as aliases? Clutter. One of the risks with Phobos development is it becoming a river miles wide, and only an inch deep. In other words, endless gobs of shallow, trite functions, with very little depth

Re: eliminate junk from std.string?

2011-01-11 Thread Max Samukha
On 01/11/2011 08:18 PM, Nick Sabalausky wrote: "Max Samukha" wrote in message news:ighvca$ap...@digitalmars.com... On 01/11/2011 05:36 PM, Ary Borenszweig wrote: Yes, what I meant was that the names are stripl and stripr yet the description of those functions are strip leading and strip traili

Re: std.unittests for (final?) review [Update]

2011-01-11 Thread Tomek Sowiński
Jonathan M Davis napisał: > On Monday, January 10, 2011 13:48:50 Tomek Sowiński wrote: > > Jonathan M Davis napisał: > > > I followed Andrei's suggestion and merged most of the functions into a > > > highly flexible assertPred. I also renamed the functions as suggested > > > and attempted to fully

Re: eliminate junk from std.string?

2011-01-11 Thread Max Samukha
On 01/11/2011 09:42 PM, Walter Bright wrote: Ary Borenszweig wrote: Why care where they come from? Why not make them intuitive? Say, like, "Always camel case"? Because people are used to those names due to their wide use. It's the same reason that we still use Qwerty keyboards. We should be

Re: either

2011-01-11 Thread Justin Johansson
On 12/01/11 06:28, KennyTM~ wrote: On Jan 11, 11 17:10, Justin Johansson wrote: On 10/01/11 05:42, Andrei Alexandrescu wrote: I wrote a simple helper, in spirit with some recent discussions: unittest { assert(1 == either(1, 2, 3)); assert(4 != either(1, 2, 3)); assert("abac" != either("aasd", "

Re: eliminate junk from std.string?

2011-01-11 Thread Ary Borenszweig
"Welcome to D. Do you program in C, Javascript, Python or Ruby? Cool! Then you will feel at home." That phrase currently ends like this: "You don't? Oh, sorry, you will have to learn that some names are all lowercase, some not." But it could end like this: "You don't? Don't worry. D has the con

Re: eliminate junk from std.string?

2011-01-11 Thread Ary Borenszweig
Agreed. So what's wrong with improving things and leaving old things as aliases?

Re: DVCS (was Re: Moving to D)

2011-01-11 Thread Walter Bright
retard wrote: One thing came to my mind. Unless you're using Ubuntu 8.04 LTS, I'm using 8.10, and I've noticed that no more updates are coming. your Ubuntu version isn't supported anymore. They might have already removed the package repositories for unsupported versions and that might indeed

Re: DVCS (was Re: Moving to D)

2011-01-11 Thread Walter Bright
retard wrote: Ubuntu has a menu entry for "restricted drivers". It provides support for both ATI/AMD (Radeon 8500 or better, appeared in 1998 or 1999!) and NVIDIA cards (Geforce 256 or better, appeared in 1999!) and I think it automatically suggests (a pop-up window) correct drivers in the late

Re: eliminate junk from std.string?

2011-01-11 Thread Daniel Gibson
Am 11.01.2011 20:42, schrieb Walter Bright: Ary Borenszweig wrote: Why care where they come from? Why not make them intuitive? Say, like, "Always camel case"? Because people are used to those names due to their wide use. It's the same reason that we still use Qwerty keyboards. And C++ :-P

Re: eliminate junk from std.string?

2011-01-11 Thread Walter Bright
Ary Borenszweig wrote: Why care where they come from? Why not make them intuitive? Say, like, "Always camel case"? Because people are used to those names due to their wide use. It's the same reason that we still use Qwerty keyboards.

Re: either

2011-01-11 Thread KennyTM~
On Jan 11, 11 17:10, Justin Johansson wrote: On 10/01/11 05:42, Andrei Alexandrescu wrote: I wrote a simple helper, in spirit with some recent discussions: // either struct Either(Ts...) { Tuple!Ts data_; bool opEquals(E)(E e) { foreach (i, T; Ts) { if (data_[i] == e) return true; } return fals

Re: eliminate junk from std.string?

2011-01-11 Thread Walter Bright
Adam Ruppe wrote: I don't know about bearophile, but I used a lot of the functions you are talking about removing in my HTML -> Plain Text conversion function used for emails and other similar environments. squeeze the whitespace, align text, wrap for the target, etc. As has been pointed out, a

Re: eliminate junk from std.string?

2011-01-11 Thread Walter Bright
Nick Sabalausky wrote: "Andrej Mitrovic" wrote in message news:mailman.543.1294713068.4748.digitalmar...@puremagic.com... Speaking of regex.. I see there are two enums in std.regex, email and url, which are regular expressions. Why not collect more of these common regexes? And we could pack the

Re: VLERange: a range in between BidirectionalRange and RandomAccessRange

2011-01-11 Thread Steven Schveighoffer
On Tue, 11 Jan 2011 11:54:08 -0500, Andrei Alexandrescu wrote: On 1/11/11 5:30 AM, Steven Schveighoffer wrote: While this makes it possible to write algorithms that only accept VLERanges, I don't think it solves the major problem with strings -- they are treated as arrays by the compiler.

Re: eliminate junk from std.string?

2011-01-11 Thread Walter Bright
Nick Sabalausky wrote: Seriously though, I'm pretty sure a lot of native english speakers don't know "sans" either, unless they're familiar with font-related terminology. "In lieu of" is widely-known though, at least in the US. I used to keep a dictionary on my desk, but now I just google defi

Re: eliminate junk from std.string?

2011-01-11 Thread Ary Borenszweig
Why care where they come from? Why not make them intuitive? Say, like, "Always camel case"?

Re: eliminate junk from std.string?

2011-01-11 Thread Nick Sabalausky
"spir" wrote in message news:mailman.550.1294771968.4748.digitalmar...@puremagic.com... > On 01/11/2011 07:14 PM, Nick Sabalausky wrote: >> "Daniel Gibson" wrote in message >> news:igi6n5$27p...@digitalmars.com... >>> Am 11.01.2011 19:07, schrieb Nick Sabalausky: Thoust words are true.

Re: VLERange: a range in between BidirectionalRange and RandomAccessRange

2011-01-11 Thread Michel Fortin
On 2011-01-11 11:36:54 -0500, Andrei Alexandrescu said: On 1/11/11 4:41 AM, Michel Fortin wrote: For instance, say we have a conversion range taking a Unicode string and converting it to ISO Latin 1. The best (lossy) conversion for "œ" is "oe" (one chararacter to two characters), in this case

Re: VLERange: a range in between BidirectionalRange and RandomAccessRange

2011-01-11 Thread Andrei Alexandrescu
On 1/11/11 9:09 AM, spir wrote: On 01/11/2011 05:36 PM, Andrei Alexandrescu wrote: On 1/11/11 4:41 AM, Michel Fortin wrote: On 2011-01-10 22:57:36 -0500, Andrei Alexandrescu said: In addition to these (and connecting the two), a VLERange would offer two additional primitives: 1. size_t stepS

Re: eliminate junk from std.string?

2011-01-11 Thread Walter Bright
Nick Sabalausky wrote: "Andrei Alexandrescu" wrote in message news:igi18o$e5...@digitalmars.com... On 1/11/11 6:34 AM, Ary Borenszweig wrote: Oh, one more thing: can the names be consistent? inpattern countChars expandtabs chompPrefix toupper toupperInPlace ?? If this can't be done for backw

Re: eliminate junk from std.string?

2011-01-11 Thread spir
On 01/11/2011 07:01 PM, Nick Sabalausky wrote: The names are for compatibility with... other languages :o|. > Would that other language be Walterish or C? If C, it's not like using the wrong case will suddendly change the semantics of the function. And if the worry is other non-phobos functions

Re: eliminate junk from std.string?

2011-01-11 Thread Justin Johansson
On 12/01/11 05:07, Nick Sabalausky wrote: "Steven Schveighoffer" wrote in message news:op.vo5kspmfeav...@steve-laptop... On Tue, 11 Jan 2011 11:39:11 -0500, Andrei Alexandrescu wrote: On 1/11/11 6:29 AM, Ary Borenszweig wrote: Hi Andrei, It looks nice. Just a small comment: in many of you

Re: eliminate junk from std.string?

2011-01-11 Thread spir
On 01/11/2011 07:14 PM, Nick Sabalausky wrote: "Daniel Gibson" wrote in message news:igi6n5$27p...@digitalmars.com... Am 11.01.2011 19:07, schrieb Nick Sabalausky: Thoust words are true. Seriously though, I'm pretty sure a lot of native english speakers don't know "sans" either, unless they'r

Re: eliminate junk from std.string?

2011-01-11 Thread Nick Sabalausky
"Max Samukha" wrote in message news:ighvca$ap...@digitalmars.com... > On 01/11/2011 05:36 PM, Ary Borenszweig wrote: >> Yes, what I meant was that the names are stripl and stripr yet the >> description of >> those functions are strip leading and strip trailing... at least put >> strip left >> a

Re: eliminate junk from std.string?

2011-01-11 Thread Nick Sabalausky
"Daniel Gibson" wrote in message news:igi6n5$27p...@digitalmars.com... > Am 11.01.2011 19:07, schrieb Nick Sabalausky: >> Thoust words are true. >> >> Seriously though, I'm pretty sure a lot of native english speakers don't >> know "sans" either, unless they're familiar with font-related >> term

Re: VLERange: a range in between BidirectionalRange and RandomAccessRange

2011-01-11 Thread spir
On 01/11/2011 02:30 PM, Steven Schveighoffer wrote: On Mon, 10 Jan 2011 22:57:36 -0500, Andrei Alexandrescu wrote: I've been thinking on how to better deal with Unicode strings. Currently strings are formally bidirectional ranges with a surreptitious random access interface. The random access

Re: VLERange: a range in between BidirectionalRange and RandomAccessRange

2011-01-11 Thread spir
On 01/11/2011 05:36 PM, Andrei Alexandrescu wrote: On 1/11/11 4:41 AM, Michel Fortin wrote: On 2011-01-10 22:57:36 -0500, Andrei Alexandrescu said: In addition to these (and connecting the two), a VLERange would offer two additional primitives: 1. size_t stepSize(size_t offset) gives the leng

  1   2   >