Re: Whither Tango?

2010-02-21 Thread Rainer Deyke
On 2/21/2010 23:07, Jonathan M Davis wrote: > I don't see how iota makes the rest of phobos harder to learn. It's one > poorly named function. All the rest could have brilliant names or absolutely > horrific names, and iota wouldn't really have any impact on them either way. Function names don'

Re: D hates to be dynamic linked

2010-02-21 Thread Rainer Schuetze
Hi, as I'm also hitting some problems with DLLs, here are some issues that I am now aware of (sorry, can't tell for linux shared objects, but I guess the situation is similar): 1. For D2, there is a major blocker with DLLs loaded after intialization on XP because of no TLS support from the O

Re: D2 Closure

2010-02-21 Thread Nathan Tuggy
On 2010-02-21 21:50, Nick Sabalausky wrote: VBScript (Or maybe it's just VB6. Not sure about VB.NET) allows the above by doing this: f (a, b, , , e) That's the one thing about VB that I actually kinda liked. Of coruse, it may not be a perfect approach, but at least you *can* leave middle params

Re: Whither Tango?

2010-02-21 Thread Jonathan M Davis
Rainer Deyke wrote: > On 2/21/2010 17:42, Jonathan M Davis wrote: >> Rainer Deyke wrote: >> If I had to pick one, I'd go for genSequence since I prefer the idea of >> "generating" a sequence to "making" one. I do like ioto for it's >> memorability though. > > The memorability of iota doesn't scal

Re: D2 Closure

2010-02-21 Thread Nick Sabalausky
"Michel Fortin" wrote in message news:hlk4le$13h...@digitalmars.com... > On 2010-02-18 12:18:47 -0500, Martin Franklin > said: > >> Its time to dump C-like languages - I have the evidence. >> >> http://www.modulaware.com/mdlt28.htm > > Nice read... and it gives me a new feature idea for D! The

Re: Whither Tango?

2010-02-21 Thread Rainer Deyke
On 2/21/2010 17:42, Jonathan M Davis wrote: > Rainer Deyke wrote: > If I had to pick one, I'd go for genSequence since I prefer the idea of > "generating" a sequence to "making" one. I do like ioto for it's > memorability though. The memorability of iota doesn't scale. There are 24 letters in t

Re: Whither Tango?

2010-02-21 Thread Jonathan M Davis
Rainer Deyke wrote: > On 2/20/2010 20:44, Jonathan M Davis wrote: >> Rainer Deyke wrote: >>> 'makeRange' is descriptive. That's what the function does. It creates >>> and returns a range, in the D sense of the word "range". >> >> Well, technically speaking, it returns a Sequence, but a Sequence

Re: Unit tests

2010-02-21 Thread Trip Volpe
Paul D. Anderson Wrote: > I know there are a lot of D programmers rooting for enhancements to the > unittests in D (and I don't want to re-open that discussion), but are there > any of the best and brightest among us who have developed a module to allow > for named tests and tests that keep run

Re: D hates to be dynamic linked

2010-02-21 Thread Walter Bright
Igor Lesik wrote: The first step is to make phobos into a shared .so library. Is anyone willing to try it and sort out just what the issues are? I may give it a try, if nobody else wants to jump on it. Thanks! dmd has the first step, it supports -fPIC.

Questions about IEEE754 floating point in D

2010-02-21 Thread Trip Volpe
I'm currently writing a compiler for my own language in D, and one of the things I'm implementing at the moment is the processing of floating-point literals. My primary reference is William Clinger's "How to read floating point numbers accurately," which is available here: ftp://ftp.ccs.neu.edu

Re: Design of intuitive interfaces

2010-02-21 Thread Ary Borenszweig
KennyTM~ wrote: On Feb 22, 10 06:07, Ary Borenszweig wrote: Michel Fortin wrote: On 2010-02-21 10:19:06 -0500, bearophile said: Michel Fortin: array.sort(predicate) // sort in place using predicate array.sorted(predicate) // create sorted copy using predicate array.isSorted(predicate) // t

Re: Design of intuitive interfaces

2010-02-21 Thread KennyTM~
On Feb 22, 10 06:07, Ary Borenszweig wrote: Michel Fortin wrote: On 2010-02-21 10:19:06 -0500, bearophile said: Michel Fortin: array.sort(predicate) // sort in place using predicate array.sorted(predicate) // create sorted copy using predicate array.isSorted(predicate) // tell if the array i

Re: D hates to be dynamic linked

2010-02-21 Thread Igor Lesik
>The first step is to make phobos into a shared .so library. Is anyone willing >to try it and sort out just what the issues are? I may give it a try, if nobody else wants to jump on it.

Re: Design of intuitive interfaces

2010-02-21 Thread Ary Borenszweig
Michel Fortin wrote: On 2010-02-21 10:19:06 -0500, bearophile said: Michel Fortin: array.sort(predicate) // sort in place using predicate array.sorted(predicate) // create sorted copy using predicate array.isSorted(predicate) // tell if the array is sorted using predicate

Re: Design of intuitive interfaces

2010-02-21 Thread Jacob Carlborg
On 2010-02-21 21.06, Nick Sabalausky wrote: "Jacob Carlborg" wrote in message news:hlrk2c$2kq...@digitalmars.com... On 2/21/10 16:19, bearophile wrote: Michel Fortin: array.sort(predicate) // sort in place using predicate array.sorted(predicate) // create sorted copy using predicate arr

Re: Design of intuitive interfaces

2010-02-21 Thread Andrei Alexandrescu
Walter Bright wrote: Michel Fortin wrote: On 2010-02-21 02:15:23 -0500, Norbert Nemec said: similarly, I would suggest "reverse" to sort in-place "reversed" to return a modified copy I that's a not so bad solution, applicable to almost any word. There are cases where it doesn't work ('spli

Re: Design of intuitive interfaces

2010-02-21 Thread Walter Bright
Michel Fortin wrote: On 2010-02-21 02:15:23 -0500, Norbert Nemec said: similarly, I would suggest "reverse" to sort in-place "reversed" to return a modified copy I that's a not so bad solution, applicable to almost any word. There are cases where it doesn't work ('split'), but probably not

Re: Design of intuitive interfaces

2010-02-21 Thread Nick Sabalausky
"Jacob Carlborg" wrote in message news:hlrk2c$2kq...@digitalmars.com... > On 2/21/10 16:19, bearophile wrote: >> Michel Fortin: >>> array.sort(predicate) // sort in place using predicate >>> array.sorted(predicate) // create sorted copy using predicate >>> array.isSorted(predicate) // tell

Re: D hates to be dynamic linked

2010-02-21 Thread Walter Bright
g wrote: (btw linux) The first step is to make phobos into a shared .so library. Is anyone willing to try it and sort out just what the issues are?

Re: Improved doc page - small change to html

2010-02-21 Thread Walter Bright
Andrei Alexandrescu wrote: Adam Ruppe wrote: The Jump To: section on the phobos 2 docs could be made a lot easier by sorting the anchors listed alphabetically. I looked at the html source and noticed that they are generated by some Javascript. Here's a replacement for the function in there now

Re: Improved doc page - small change to html

2010-02-21 Thread Andrei Alexandrescu
Adam Ruppe wrote: The Jump To: section on the phobos 2 docs could be made a lot easier by sorting the anchors listed alphabetically. I looked at the html source and noticed that they are generated by some Javascript. Here's a replacement for the function in there now that does this sorting: [s

Re: Whither Tango?

2010-02-21 Thread Rainer Deyke
On 2/20/2010 20:44, Jonathan M Davis wrote: > Rainer Deyke wrote: >> 'makeRange' is descriptive. That's what the function does. It creates >> and returns a range, in the D sense of the word "range". > > Well, technically speaking, it returns a Sequence, but a Sequence is a > range. In that case

Improved doc page - small change to html

2010-02-21 Thread Adam Ruppe
The Jump To: section on the phobos 2 docs could be made a lot easier by sorting the anchors listed alphabetically. I looked at the html source and noticed that they are generated by some Javascript. Here's a replacement for the function in there now that does this sorting: function listanchors(

Re: D hates to be dynamic linked

2010-02-21 Thread Robert Jacques
On Sun, 21 Feb 2010 08:06:44 -0500, Lutger wrote: Justin Johansson wrote: Eldar Insafutdinov wrote: Steve Teale Wrote: On Fri, 19 Feb 2010 16:41:20 -0500, g wrote: I tried to get some attention for this problem again a couple of weeks ago (see the "special treat" thread), and everyone wh

Re: Design of intuitive interfaces

2010-02-21 Thread Adam D. Ruppe
On Sun, Feb 21, 2010 at 10:36:53AM -0500, bearophile wrote: > I sometimes have used an upper case Q for the ? (it stands for Question mark): > sortedQ() Or the lisp convention of -p? sorted_p() Bah, I'd just say go with isSorted. sorted? is just bizarre anyway. -- Adam D. Ruppe http://arsdnet.n

Re: Design of intuitive interfaces

2010-02-21 Thread Bill Baxter
On Sun, Feb 21, 2010 at 7:36 AM, bearophile wrote: > I sometimes have used an upper case Q for the ? (it stands for Question mark): > sortedQ() I would think that was a shorthand for some kind of "sorted queue" thing if I ran into it in the wild. --bb

Re: Design of intuitive interfaces

2010-02-21 Thread Jacob Carlborg
On 2/21/10 16:19, bearophile wrote: Michel Fortin: array.sort(predicate) // sort in place using predicate array.sorted(predicate) // create sorted copy using predicate array.isSorted(predicate) // tell if the array is sorted using predicate Good. Another possibil

Re: Some questions now D2 is frozen

2010-02-21 Thread Jacob Carlborg
On 2/21/10 14:28, Philippe Sigaud wrote: On Fri, Feb 19, 2010 at 13:51, Jacob Carlborg mailto:d...@me.com>> wrote: [Universal function call syntax] It's not implemented yet. But do you know of it's on the plate for D2? Lars says it's in TDPL, so it must be on the todo list, hopefully.

Re: Design of intuitive interfaces

2010-02-21 Thread bearophile
Michel Fortin: > the ! suffix is totally ambiguous with the > template instantiation syntax, and the ? suffix would be ambiguous in > the ternary operator "?:". OK, sorry for saying silly things again :-) I sometimes have used an upper case Q for the ? (it stands for Question mark): sortedQ() B

Re: Design of intuitive interfaces

2010-02-21 Thread Michel Fortin
On 2010-02-21 10:19:06 -0500, bearophile said: Michel Fortin: array.sort(predicate) // sort in place using predicate array.sorted(predicate) // create sorted copy using predicate array.isSorted(predicate) // tell if the array is sorted using predicate Good. Ano

Re: Design of intuitive interfaces

2010-02-21 Thread bearophile
Michel Fortin: > array.sort(predicate) // sort in place using predicate > array.sorted(predicate) // create sorted copy using predicate > array.isSorted(predicate) // tell if the array is sorted using predicate Good. Another possibility is to let D2 accept ? and ! too insi

Re: Some questions now D2 is frozen

2010-02-21 Thread Michel Fortin
On 2010-02-21 08:56:14 -0500, Philippe Sigaud said: Anyway, I just tried: class C { alias opImplicitCast this; @property int opImplicitCast() { return 1;} } auto c = new C(); int foo(int a) { return a;} foo(c); // error. function main.foo (int a) is not callable using argument types

Re: Design of intuitive interfaces

2010-02-21 Thread Michel Fortin
On 2010-02-21 02:15:23 -0500, Norbert Nemec said: I would suggest the solution in Python/NumPy: "sort" gives the command to sort data in-place "sorted" returns a sorted data, preserving the input similarly, I would suggest "reverse" to sort in-place "reversed" to return a modified copy I t

Re: D hates to be dynamic linked

2010-02-21 Thread Steve Teale
On Sun, 21 Feb 2010 14:06:44 +0100, Lutger wrote: > Justin Johansson wrote: > >> Eldar Insafutdinov wrote: >>> Steve Teale Wrote: >>> On Fri, 19 Feb 2010 16:41:20 -0500, g wrote: I tried to get some attention for this problem again a couple of weeks ago (see the "special

Re: Some questions now D2 is frozen

2010-02-21 Thread Philippe Sigaud
On Sun, Feb 21, 2010 at 14:34, Michel Fortin wrote: > On 2010-02-21 08:28:02 -0500, Philippe Sigaud > said: > > Another thing I'd be very happy to have is opImplicitCast >> > > I think this works already: > >alias opImplicitCast this; > >@property T opImplicitCast() { ... } <

Re: D hates to be dynamic linked

2010-02-21 Thread Justin Johansson
Lutger wrote: Justin Johansson wrote: Eldar Insafutdinov wrote: Steve Teale Wrote: On Fri, 19 Feb 2010 16:41:20 -0500, g wrote: I tried to get some attention for this problem again a couple of weeks ago (see the "special treat" thread), and everyone who replied said "yes, we really need th

Re: Some questions now D2 is frozen

2010-02-21 Thread Michel Fortin
On 2010-02-21 08:28:02 -0500, Philippe Sigaud said: Another thing I'd be very happy to have is opImplicitCast I think this works already: alias opImplicitCast this; @property T opImplicitCast() { ... } -- Michel Fortin michel.for...@michelf.com http://michelf.c

Re: Some questions now D2 is frozen

2010-02-21 Thread Philippe Sigaud
On Fri, Feb 19, 2010 at 13:51, Jacob Carlborg wrote: [Universal function call syntax] > It's not implemented yet. > But do you know of it's on the plate for D2? Lars says it's in TDPL, so it must be on the todo list, hopefully. Well, I guess they all have too much to do right now, and as some r

Re: "Consume", "Skip", "Eat", "Munch", "Bite", or...?

2010-02-21 Thread Philippe Sigaud
On Sat, Feb 20, 2010 at 21:48, Andrei Alexandrescu < seewebsiteforem...@erdani.org> wrote: > To focus the discussion about naming conventions, let's discuss one > particular aspect. Right now we have in std.algorithm: > (snip) > There are a few other functions like that: one version takes a range

Re: D hates to be dynamic linked

2010-02-21 Thread Lutger
Justin Johansson wrote: > Eldar Insafutdinov wrote: >> Steve Teale Wrote: >> >>> On Fri, 19 Feb 2010 16:41:20 -0500, g wrote: >>> >>> >>> I tried to get some attention for this problem again a couple of weeks >>> ago (see the "special treat" thread), and everyone who replied said >>> "yes, we rea

Re: Whither Tango?

2010-02-21 Thread biozic
Le 21/02/10 13:17, biozic a écrit : But what I really miss is a good search engine for the documentation, not a function name that is perfectly relevant to my understanding. A list of well-chosen keywords/tags associated with every function should do the work (more than the present full-text sear

Re: Whither Tango?

2010-02-21 Thread Mike James
Michel Fortin Wrote: > On 2010-02-20 23:21:01 -0500, "Adam D. Ruppe" > said: > > > On Sat, Feb 20, 2010 at 09:11:32PM -0500, Michel Fortin wrote: > >> I'd say go with just "format". That'd make the fully qualified name is > >> "std.string.format", no need to repeat "string" a second time, even

Re: Whither Tango?

2010-02-21 Thread biozic
Le 20/02/10 16:17, Nick Sabalausky a écrit : "Justin Johansson" wrote in message news:hlop1u$o1...@digitalmars.com... Nick Sabalausky wrote: Right, that's what I meant. Use a word starting with "retro-" when talking to a english-speaking person, and even if they're uneducated, they'll most lik

Re: Whither Tango?

2010-02-21 Thread Michel Fortin
On 2010-02-20 23:21:01 -0500, "Adam D. Ruppe" said: On Sat, Feb 20, 2010 at 09:11:32PM -0500, Michel Fortin wrote: I'd say go with just "format". That'd make the fully qualified name is "std.string.format", no need to repeat "string" a second time, even if it's just an "s". There's already a

Re: D hates to be dynamic linked

2010-02-21 Thread Eldar Insafutdinov
Jonathan M Davis Wrote: > Most programs can be written just fine without dynamically linked libraries, > so I can certainly see why Walter would not consider it a high priority with > everything else on his plate, but I do hope that he gets to it eventually. > I disagree here. Yes they can be

Re: D hates to be dynamic linked

2010-02-21 Thread Justin Johansson
Eldar Insafutdinov wrote: Steve Teale Wrote: On Fri, 19 Feb 2010 16:41:20 -0500, g wrote: I tried to get some attention for this problem again a couple of weeks ago (see the "special treat" thread), and everyone who replied said "yes, we really need this", but Walter does not want to go the

Re: D hates to be dynamic linked

2010-02-21 Thread Eldar Insafutdinov
Steve Teale Wrote: > On Fri, 19 Feb 2010 16:41:20 -0500, g wrote: > > > I tried to get some attention for this problem again a couple of weeks > ago (see the "special treat" thread), and everyone who replied said "yes, > we really need this", but Walter does not want to go there. > Is it rea

Re: Whither Tango?

2010-02-21 Thread Justin Johansson
Jérôme M. Berger wrote: Justin Johansson wrote: I don't give an iota about iota. In my dictionary retro is a Latin prefix. However in post-classical Latin it is not uncommon to come across words that have a Greek origin. Me thinks we are both right on this occasion; retro is a Latin prefix; i

Re: Whither Tango?

2010-02-21 Thread Jérôme M. Berger
Andrei Alexandrescu wrote: > KennyTM~ wrote: >> - std.range.iota > > C++, APL, Go: > Actually, APL doesn't use "iota" but "ι" which translates as "i". So since we don't want to introduce impossible-to-type characters in D, we should rename std.range.iota to std.range.i ;)

Re: Whither Tango?

2010-02-21 Thread Jérôme M. Berger
Justin Johansson wrote: > I don't give an iota about iota. In my dictionary retro is a > Latin prefix. However in post-classical Latin it is not uncommon > to come across words that have a Greek origin. Me thinks we are > both right on this occasion; retro is a Latin prefix; it's in a > Latin di

Re: Back in the game: Numerics in D

2010-02-21 Thread Walter Bright
Steve Teale wrote: Walter - echoes of the past! I still have the Zortech C++ -> Lim tee shirt ;=) I've still got mine, too!

Re: Whither Tango?

2010-02-21 Thread Jérôme M. Berger
Andrei Alexandrescu wrote: > Rainer Deyke wrote: >> If you're going to go for a single-letter name, "i" is better than >> "iota". It's just as arbitrary, it's just as ambiguous, I have just as >> little idea what it means, but it's shorter to write, and you don't need >> to know the English names