Re: Why is the "in" storage class missing from the ParameterStorageClass enum?

2011-01-20 Thread Lutger Blijdestijn
Andrej Mitrovic wrote: > On 1/21/11, Jonathan M Davis wrote: >> Umm. in is never the default. in is essentially an alias for const scope. >> The >> default is non-shared and mutable. >> >> - Jonathan M Davis >> > > That's what I thought. But I did saw it mentioned in this NG a couple > of times,

Re: Constructors (starstruck noob from C++)

2011-01-20 Thread Robert Jacques
On Thu, 20 Jan 2011 22:02:42 -0500, Andrei Alexandrescu wrote: On 1/20/11 7:18 PM, Luke J. West wrote: Hi to all from a total noob. first of all, I'd like to say how impressed I am with D. In fact, I keep pinching myself. Have I *really* found a language worth leaving C++ for after two deca

Re: Why is the "in" storage class missing from the ParameterStorageClass enum?

2011-01-20 Thread Andrej Mitrovic
On 1/21/11, Jonathan M Davis wrote: > Umm. in is never the default. in is essentially an alias for const scope. > The > default is non-shared and mutable. > > - Jonathan M Davis > That's what I thought. But I did saw it mentioned in this NG a couple of times, I can't remember by who though. In a

Re: Why is the "in" storage class missing from the ParameterStorageClass enum?

2011-01-20 Thread Jonathan M Davis
On Thursday, January 20, 2011 19:03:09 Andrej Mitrovic wrote: > import std.stdio; > import std.traits; > > alias ParameterStorageClassTuple STCTuple; > alias ParameterStorageClass STC; > > void foo(in int[] x) { /*x[0] = 5; // This would be a compile-time error*/ > } void bar(int[] x) { x[0] = 5;

Re: Constructors (starstruck noob from C++)

2011-01-20 Thread Andrej Mitrovic
On 1/21/11, Andrei Alexandrescu wrote: > I think copyMembers belongs to the standard library. I wanted to define > a family of functions like it but never got around to it. > It's a shame we can't use .dup. It would look really nice in code.

Re: Constructors (starstruck noob from C++)

2011-01-20 Thread Andrej Mitrovic
Ah, damnit, Andrei beat me to the punch! Well, at least his methods make much more sense than my little hacks.

Re: Constructors (starstruck noob from C++)

2011-01-20 Thread Andrej Mitrovic
Be afraid.. be very afraid! import std.algorithm; import std.stdio; import std.conv; enum fields = [__traits(allMembers, Foo)]; string populateFields(string[] haystack) { string result; while (haystack.length > 0) { switch (haystack[0]) { case "__ctor":

Re: Constructors (starstruck noob from C++)

2011-01-20 Thread Andrei Alexandrescu
On 1/20/11 7:18 PM, Luke J. West wrote: Hi to all from a total noob. first of all, I'd like to say how impressed I am with D. In fact, I keep pinching myself. Have I *really* found a language worth leaving C++ for after two decades? It's beginning to look that way. Obviously I'm devouring the 2.

Why is the "in" storage class missing from the ParameterStorageClass enum?

2011-01-20 Thread Andrej Mitrovic
import std.stdio; import std.traits; alias ParameterStorageClassTuple STCTuple; alias ParameterStorageClass STC; void foo(in int[] x) { /*x[0] = 5; // This would be a compile-time error*/ } void bar(int[] x) { x[0] = 5; } void main() { assert(STCTuple!foo[0] == STC.NONE); assert(STCTuple

Re: Constructors (starstruck noob from C++)

2011-01-20 Thread Jonathan M Davis
On Thursday, January 20, 2011 17:18:48 Luke J. West wrote: > Hi to all from a total noob. > > first of all, I'd like to say how impressed I am with D. In fact, I keep > pinching myself. Have I *really* found a language worth leaving C++ for > after two decades? It's beginning to look that way. Obv

Re: Ad hoc ranges

2011-01-20 Thread Jonathan M Davis
On Thursday, January 20, 2011 16:12:58 Tomek Sowiński wrote: > Doing my own deeds, I often found myself in need of writing up a range just > to e.g. feed it into an algorithm. Problem is, defining even the simplest > range -- one-pass forward -- is verbose enough to render this (correct) > approach

Re: Ad hoc ranges

2011-01-20 Thread Jonathan M Davis
On Thursday, January 20, 2011 16:19:54 bearophile wrote: > Tomek Sowiñski: > > auto range(T, Whatever)(lazy bool _empty, lazy Whatever _popFront, lazy T > > _front) { > > I am not sure, but I think Andrei has deprecated the "lazy" attribute. In general or on a specific function? I'm pretty sure t

Re: Potential patent issues

2011-01-20 Thread Don
BlazingWhitester wrote: I spotted some patents that can theaten current DMD implementation. Wanted to clarify things. http://www.freepatentsonline.com/6185728.pdf - this patent describes method pointers implementation (delegates) This was obviously a patent aimed at protecting Delphi from VB.

Re: Constructors (starstruck noob from C++)

2011-01-20 Thread Ellery Newcomer
Welcome! On 01/20/2011 07:18 PM, Luke J. West wrote: how do I, in c++ speak, do the D for... A b(a); // or if you prefer... A* b = new A(a); try A b = new A(a); I'm sure this must be trivial. Many many thanks, Luke

Constructors (starstruck noob from C++)

2011-01-20 Thread Luke J. West
Hi to all from a total noob. first of all, I'd like to say how impressed I am with D. In fact, I keep pinching myself. Have I *really* found a language worth leaving C++ for after two decades? It's beginning to look that way. Obviously I'm devouring the 2.0 documentation right now, but have not ye

Re: Ad hoc ranges

2011-01-20 Thread Tomek Sowiński
bearophile napisał: > I am not sure, but I think Andrei has deprecated the "lazy" attribute. Yes, but AFAIR in favor of implicit conversions of expressions to parameterless delegates, which strengthens my little idiom. -- Tomek

Re: Ad hoc ranges

2011-01-20 Thread bearophile
Tomek Sowiñski: > auto range(T, Whatever)(lazy bool _empty, lazy Whatever _popFront, lazy T > _front) { I am not sure, but I think Andrei has deprecated the "lazy" attribute. Bye, bearophile

Ad hoc ranges

2011-01-20 Thread Tomek Sowiński
Doing my own deeds, I often found myself in need of writing up a range just to e.g. feed it into an algorithm. Problem is, defining even the simplest range -- one-pass forward -- is verbose enough to render this (correct) approach unprofitable. This is how I went about the problem: auto range(

Stack-allocared linear closures in ATS

2011-01-20 Thread bearophile
The ATS language contains a metric ton of nice ideas. ATS programs are sometimes faster than C ones (because its type system allows to avoid some runtime tests done in C programs, allows some higher order optimizations, etc) despite the programmer has ways to write them in much safer way than C

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread foobar
Andrei Alexandrescu Wrote: > I'm consolidating some routines from std.string into std.array. They are > specialized for operating on arrays, and include the likes of insert, > remove, replace. > > One question is whether operations should be performed in place or on a > copy. For example: > >

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread Akakima
Is it ok to use: In place: trim( string ) replace( string, from, to ) or Copy: trim( string, outstring ) replace( string, from, to, outstring )

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread spir
On 01/20/2011 12:33 AM, Andrei Alexandrescu wrote: I'm consolidating some routines from std.string into std.array. They are specialized for operating on arrays, and include the likes of insert, remove, replace. One question is whether operations should be performed in place or on a copy. For exa

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread spir
On 01/20/2011 11:31 AM, bearophile wrote: > Andrej Mitrovic: > >> I think what might help out in D is if we had a way to mark some >> functions so the compiler guarantees that their return values *are >> not* to be discarded. For example, this code will compile: >> >> import std.stdio; >> import s

Re: Redux on either [was: either]

2011-01-20 Thread Peter Alexander
On 17/01/11 6:18 PM, Ary Manzana wrote: Thanks. I searched it in wordrefence and "define:redux" and "what is redux" in Google with no luck. The definition is the first answer on Google for both those searches :-)

Re: DVCS

2011-01-20 Thread arch 4 ever
Jeff Nowakowski Wrote: > On 01/20/2011 07:33 AM, Gour wrote: > > On Thu, 20 Jan 2011 06:39:08 -0500 > > Jeff Nowakowski wrote: > > > > > >> No, I haven't tried it. I'm not going to try every OS that comes down > >> the pike. > > > > Then please, without any offense, do not give advises about some

Re: filter!(not!(predicate))(someInputRange) does not compile

2011-01-20 Thread Jens K. Mueller
Andrei Alexandrescu wrote: > On 1/20/11 12:47 PM, Jens Mueller wrote: > >Andrei Alexandrescu wrote: > >>On 1/19/11 7:19 PM, Jens Mueller wrote: > >>>Andrei Alexandrescu wrote: > Place the call to not!alwaysTrue in a local function inside main: > > bool alwaysFalse(uint a) { return

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread Andrej Mitrovic
On 1/20/11, Jonathan M Davis wrote: > On Thursday 20 January 2011 03:51:48 Trass3r wrote: >> If such an annotation was introduced, it should be the other way around. >> But imo discarding a return value should always result in a warning, >> the function returns something for a reason. > > Actually

Re: Struct constructors

2011-01-20 Thread Sean Eskapp
That looks like a similar issue. Thanks!

Re: Learning D

2011-01-20 Thread Jonathan M Davis
On Thursday, January 20, 2011 11:33:38 Adrian Mercieca wrote: > Hi guys, > > Ok - thanks for your answers. > > So, I will get TDPL book - all reviewers on amazon are raving about it. > > As for the Phobos class library (coz that is the D2 standard lib no?), how > can I get to grips with that? Do

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread Jonathan M Davis
On Thursday, January 20, 2011 05:48:12 so wrote: > > auto newStr = replace(str, "hello", "world"); > > replaceInPlace(newStr, "world", "hello"); > > > > it's quite clear that the first one returns a value and the the second > > one does > > it in place. Whereas if you have > > > > auto newStr = r

Re: filter!(not!(predicate))(someInputRange) does not compile

2011-01-20 Thread Andrei Alexandrescu
On 1/20/11 12:47 PM, Jens Mueller wrote: Andrei Alexandrescu wrote: On 1/19/11 7:19 PM, Jens Mueller wrote: Andrei Alexandrescu wrote: Place the call to not!alwaysTrue in a local function inside main: bool alwaysFalse(uint a) { return not!alwaysTrue(a); } Thanks. Can you elaborate a bi

Re: Learning D

2011-01-20 Thread bearophile
Adrian Mercieca: > As for the Phobos class library (coz that is the D2 standard lib no?), how > can I get to grips with that? Does the book cover that? Or does the book > just cover the core language? > Is there some online material for Phobos? Phobos is a work in progress, TDPL doesn't cover i

Re: Learning D

2011-01-20 Thread Adrian Mercieca
Hi guys, Ok - thanks for your answers. So, I will get TDPL book - all reviewers on amazon are raving about it. As for the Phobos class library (coz that is the D2 standard lib no?), how can I get to grips with that? Does the book cover that? Or does the book just cover the core language? Is th

Re: What Makes A Programming Language Good

2011-01-20 Thread Jacob Carlborg
On 2011-01-20 15:58, Adam Ruppe wrote: When you compile, you have to provide a path anyhow, less hostile to user and you don't have to change the code. One of the things implicit in the thread now is removing the need to provide a path - the compiler can (usually) figure it out on its own. Try

Re: What Makes A Programming Language Good

2011-01-20 Thread Jacob Carlborg
On 2011-01-20 13:12, Daniel Gibson wrote: Am 20.01.2011 00:54, schrieb Adam D. Ruppe: Jesse Phillips wrote: You can have the author release packaged libraries for developers to use and the author should do this. So this begs the question of what is the repository for? It's so you have a varie

Re: What Makes A Programming Language Good

2011-01-20 Thread Jacob Carlborg
On 2011-01-20 10:19, Gour wrote: On Wed, 19 Jan 2011 19:40:49 +0100 Jacob Carlborg wrote: 1. it uses python, yet another dependency True, but it brings more features over e.g. cmake 'cause you have full language on disposal. I would go with a tool that uses a dynamic language as a DSL. I'm

Re: Struct constructors

2011-01-20 Thread Trass3r
Probably related to http://d.puremagic.com/issues/show_bug.cgi?id=5460

Re: Another task

2011-01-20 Thread Simen kjaeraas
bearophile wrote: I think for a newcomer the most difficult part is related to tuples: * find them (in std.typecons!!!) * catch after much time, pains, research, they should not even try to construct a tuple using Tuple!, but using the convenience tuple() func instead. I agree that like dynam

Re: Struct constructors

2011-01-20 Thread Sönke Ludwig
Am 20.01.2011 19:42, schrieb Sean Eskapp: In code like this: import std.stdio; struct foo { int val; static immutable bar = foo(1); this(int val) { this.val = 50; } } void main() { writeln(foo.bar.val); } The user-defined struc

Re: filter!(not!(predicate))(someInputRange) does not compile

2011-01-20 Thread Jens Mueller
Andrei Alexandrescu wrote: > On 1/19/11 7:19 PM, Jens Mueller wrote: > >Andrei Alexandrescu wrote: > >>Place the call to not!alwaysTrue in a local function inside main: > >> > >> bool alwaysFalse(uint a) { return not!alwaysTrue(a); } > > > >Thanks. Can you elaborate a bit please? I wonder why t

Struct constructors

2011-01-20 Thread Sean Eskapp
In code like this: import std.stdio; struct foo { int val; static immutable bar = foo(1); this(int val) { this.val = 50; } } void main() { writeln(foo.bar.val); } The user-defined struct constructor is not called, because it's ov

Re: DVCS

2011-01-20 Thread retard
Thu, 20 Jan 2011 13:33:58 +0100, Gour wrote: > On Thu, 20 Jan 2011 06:39:08 -0500 > Jeff Nowakowski wrote: > > >> No, I haven't tried it. I'm not going to try every OS that comes down >> the pike. > > Then please, without any offense, do not give advises about something > which you did not try

Build tools (was: What Makes A Programming Language Good)

2011-01-20 Thread Lutger Blijdestijn
Russel Winder wrote: > On Thu, 2011-01-20 at 12:32 +0100, Gour wrote: >> On Thu, 20 Jan 2011 10:13:00 + >> Russel Winder wrote: >> >> > SCons, Waf, and Gradle are currently the tools of choice. >> >> Gradle is (mostly) for Java-based projects, afaict? > > It is the case that there are two

Re: Another task

2011-01-20 Thread bearophile
spir: > Yes, this is the only nice looking, high-level, and D-style solution. I have added: http://d.puremagic.com/issues/show_bug.cgi?id=5466 > While I by far prefer avoiding stringcode: > auto r = map!((p) (tuple(p[0]*10, p[1]~p[1])) (aa.byPair()); > where p means pair; should be corre

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread bearophile
so: > I don't understand how the first two are clear and the last two are not so. > Where both have the name "replace" for different things, and replace to me > means "replace in place". > With this in hand, how is the first "replace" is quite clear? In Python I am used to immutable strings, so

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread bearophile
so: > I didn't know that, this solution is what i meant. > So, they didn't blindly enforce functional language rules to a > non-functional language. Python was designed lot of time ago by Guido that I think didn't know much about functional programming. So they have first added an in-place sor

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread bearophile
Don: > If you don't use the return value of a strongly pure, nothrow function, > you could be given a 'expression has no effect' error. > Currently the function call is silently dropped. I have added this at the end of the enhancement request 5464 (but the error message is different). Bye, bea

Casting between delegates with qualified value type parameters

2011-01-20 Thread Sean Eskapp
Delegates cannot be cast from one type to another, even if the only difference in type is the qualifiers on value type parameters. However, the same code works fine with functions instead of delegates, as such: import std.stdio; void foo(void function(int) bar) { bar(5); } void foobar(vo

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread Don
Steven Schveighoffer wrote: On Thu, 20 Jan 2011 10:36:00 -0500, foobar wrote: Jonathan M Davis Wrote: On Thursday 20 January 2011 03:51:48 Trass3r wrote: > If such an annotation was introduced, it should be the other way around. > But imo discarding a return value should always result in a

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread Steven Schveighoffer
On Thu, 20 Jan 2011 10:36:00 -0500, foobar wrote: Jonathan M Davis Wrote: On Thursday 20 January 2011 03:51:48 Trass3r wrote: > If such an annotation was introduced, it should be the other way around. > But imo discarding a return value should always result in a warning, > the function ret

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread foobar
Jonathan M Davis Wrote: > On Thursday 20 January 2011 03:51:48 Trass3r wrote: > > If such an annotation was introduced, it should be the other way around. > > But imo discarding a return value should always result in a warning, > > the function returns something for a reason. > > Actually, there

Re: What Makes A Programming Language Good

2011-01-20 Thread Steven Schveighoffer
On Thu, 20 Jan 2011 09:58:17 -0500, Adam Ruppe wrote: When you compile, you have to provide a path anyhow, less hostile to user and you don't have to change the code. One of the things implicit in the thread now is removing the need to provide a path - the compiler can (usually) figure it o

Re: What Makes A Programming Language Good

2011-01-20 Thread Adam Ruppe
> When you compile, you have to provide a path anyhow, less hostile to > user and you don't have to change the code. One of the things implicit in the thread now is removing the need to provide a path - the compiler can (usually) figure it out on its own. Try dmd -v and search for import lines. B

Re: DVCS

2011-01-20 Thread Gour
On Thu, 20 Jan 2011 09:19:54 -0500 Jeff Nowakowski wrote: > Please yourself. I quoted from the FAQ from the distribution's main > site. If that's wrong, then Arch has a big public relations problem. Arch simply does not offer false promises that system will "Just work". Still, I see the number

Re: What Makes A Programming Language Good

2011-01-20 Thread so
On Thu, 20 Jan 2011 16:30:40 +0200, Adam Ruppe wrote: IMO the best way to do that would be to get everyone in the habit of including the version in their modules. module random.garbage.0.6; import random.garbage.0.6; Even better, we could enforce this to only module writers. module rando

Re: filter!(not!(predicate))(someInputRange) does not compile

2011-01-20 Thread spir
On 01/20/2011 02:19 AM, Jens Mueller wrote: Thanks. Can you elaborate a bit please? I wonder why the alias won't work. Because in your original version the alias line does not define a func, but a kind of constant symbol. A higher order func like filter expects a func as first arg, not a cons

Re: Another task

2011-01-20 Thread spir
On 01/20/2011 11:12 AM, bearophile wrote: > And I suggest to add a third associative array member function that returns a range of key,value tuples, as in Python3. This allows to solve the task like this: > auto r = map!q{ tuple(a[0]*10, a[1]~a[1]) }(aa.byPair()); Yes, this is the only nice lo

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread so
In the meantime the world is going more functional... :-) I love how they solve this problem, but if you go on that path while ignoring the reality there wouldn't be much of a reason using D, no? :)

Re: What Makes A Programming Language Good

2011-01-20 Thread Adam Ruppe
> However, when there are breaking changes, random.garbage needs a new version (e.g. 0.6.etc instead of 0.5.etc). IMO the best way to do that would be to get everyone in the habit of including the version in their modules. module random.garbage.0.6; import random.garbage.0.6; That way, it is e

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread Justin Johansson
On 20/01/11 10:33, Andrei Alexandrescu wrote: I'm consolidating some routines from std.string into std.array. They are specialized for operating on arrays, and include the likes of insert, remove, replace. One question is whether operations should be performed in place or on a copy. For example:

Re: DVCS

2011-01-20 Thread Jeff Nowakowski
On 01/20/2011 07:33 AM, Gour wrote: On Thu, 20 Jan 2011 06:39:08 -0500 Jeff Nowakowski wrote: No, I haven't tried it. I'm not going to try every OS that comes down the pike. Then please, without any offense, do not give advises about something which you did not try. I did use Ubuntu... Pl

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread so
You have to think of the normal sort as a performance hack, something that is good because copying data wastes a lot of time, if the array is large or if you have to sort an many small arrays. Normally in Python you prefer sorted(), that returns a sorted copy, unless performance is importan

Re: What Makes A Programming Language Good

2011-01-20 Thread Daniel Gibson
Am 20.01.2011 14:48, schrieb Adam Ruppe: Pre-built libs aren't all that useful anyway, for several reasons: By "pre-built" I mean all the source is in one place, so the compile Just Works, not necessarily being pre-compiled. So if you downloaded mylib.zip, every file it needs is in there. No n

Re: What Makes A Programming Language Good

2011-01-20 Thread Adam Ruppe
> Pre-built libs aren't all that useful anyway, for several reasons: By "pre-built" I mean all the source is in one place, so the compile Just Works, not necessarily being pre-compiled. So if you downloaded mylib.zip, every file it needs is in there. No need to separately hunt down random.garbage

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread so
auto newStr = replace(str, "hello", "world"); replaceInPlace(newStr, "world", "hello"); it's quite clear that the first one returns a value and the the second one does it in place. Whereas if you have auto newStr = replaceCopy(str, "hello", "world"); replace(newStr, "world", "hello"); the fi

Re: DVCS

2011-01-20 Thread Andrew Wiley
On Thu, Jan 20, 2011 at 5:39 AM, Jeff Nowakowski wrote: > On 01/20/2011 12:24 AM, Gour wrote: > >> Otoh, with Ubuntu, upgrade from 8.10 to 10.10 is always a major >> undertaking (I'm familiar with it since '99 when I used SuSE and had >> experience with deps hell.) >> > > Highlighting the proble

Re: DVCS

2011-01-20 Thread Gour
On Thu, 20 Jan 2011 06:39:08 -0500 Jeff Nowakowski wrote: > No, I haven't tried it. I'm not going to try every OS that comes down > the pike. Then please, without any offense, do not give advises about something which you did not try. I did use Ubuntu... > So instead of giving you a bunch of

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread bearophile
Andrej Mitrovic: > If the replace function is marked with some kind of @nodiscard > annotation, then his would be a compile error since it doesn't make > sense to construct a new string, return it, and discard it. http://d.puremagic.com/issues/show_bug.cgi?id=5464 Bye, bearophile

Re: What Makes A Programming Language Good

2011-01-20 Thread Daniel Gibson
Am 20.01.2011 00:54, schrieb Adam D. Ruppe: Jesse Phillips wrote: You can have the author release packaged libraries for developers to use and the author should do this. So this begs the question of what is the repository for? It's so you have a variety of libraries available at once with mini

Re: DVCS

2011-01-20 Thread Jonathan M Davis
On Thursday 20 January 2011 03:39:08 Jeff Nowakowski wrote: > On 01/20/2011 12:24 AM, Gour wrote: > > I've feeling that you just copied the above from FAQ and never > > actually tried Archlinux. > > No, I haven't tried it. I'm not going to try every OS that comes down > the pike. If the FAQ says t

Re: What Makes A Programming Language Good

2011-01-20 Thread Russel Winder
On Thu, 2011-01-20 at 12:32 +0100, Gour wrote: > On Thu, 20 Jan 2011 10:13:00 + > Russel Winder wrote: > > > SCons, Waf, and Gradle are currently the tools of choice. > > Gradle is (mostly) for Java-based projects, afaict? It is the case that there are two more or less distinct domains of b

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread Jonathan M Davis
On Thursday 20 January 2011 03:51:48 Trass3r wrote: > If such an annotation was introduced, it should be the other way around. > But imo discarding a return value should always result in a warning, > the function returns something for a reason. Actually, there are plenty of cases where you throw a

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread Trass3r
If such an annotation was introduced, it should be the other way around. But imo discarding a return value should always result in a warning, the function returns something for a reason.

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread Trass3r
> If you have replace(str, "hello", "world"); > you don't know whether it's changed the value in place or if you're throwing away a return value. However, if you have > auto newStr = replace(str, "hello", "world"); > replaceInPlace(newStr, "world", "hello"); > it's quite clear that the first one re

Re: DVCS

2011-01-20 Thread Jeff Nowakowski
On 01/20/2011 12:24 AM, Gour wrote: I've feeling that you just copied the above from FAQ and never actually tried Archlinux. No, I haven't tried it. I'm not going to try every OS that comes down the pike. If the FAQ says that you're going to have to be more of an expert with your system, the

Re: What Makes A Programming Language Good

2011-01-20 Thread Gour
On Thu, 20 Jan 2011 10:13:00 + Russel Winder wrote: > SCons, Waf, and Gradle are currently the tools of choice. Gradle is (mostly) for Java-based projects, afaict? Sincerely, Gour -- Gour | Hlapicina, Croatia | GPG key: CDBF17CA

Re: Potential patent issues

2011-01-20 Thread Daniel Gibson
Am 20.01.2011 11:19, schrieb spir: On 01/19/2011 10:09 PM, retard wrote: Wed, 19 Jan 2011 15:44:38 -0500, Nick Sabalausky wrote: "Andrej Mitrovic" wrote in message news:mailman.724.1295465996.4748.digitalmar...@puremagic.com... Or pack your bags and move to Europe. :p I thought Europe was g

Re: xxxInPlace or xxxCopy?

2011-01-20 Thread bearophile
Andrej Mitrovic: > I think what might help out in D is if we had a way to mark some > functions so the compiler guarantees that their return values *are > not* to be discarded. For example, this code will compile: > > import std.stdio; > import std.string; > void main() > { > string s = "Mary

Re: Potential patent issues

2011-01-20 Thread spir
On 01/19/2011 10:09 PM, retard wrote: Wed, 19 Jan 2011 15:44:38 -0500, Nick Sabalausky wrote: "Andrej Mitrovic" wrote in message news:mailman.724.1295465996.4748.digitalmar...@puremagic.com... Or pack your bags and move to Europe. :p I thought Europe was getting software patents? It's the

Re: Another task

2011-01-20 Thread bearophile
Simen kjaeraas: > byKey is essentially an opApply. You have to wrap it in a fiber to make it > work with the range interface: Thank you for all your code and work. I have found a bug (it's not a bug of yours): if I compile your code with -release, DMD prints: test.d(45): Error: function D main i

Re: What Makes A Programming Language Good

2011-01-20 Thread Russel Winder
I missed a lot of this thread and coming in part way through may miss lots of past nuances, or even major facts. On Thu, 2011-01-20 at 10:19 +0100, Gour wrote: > On Wed, 19 Jan 2011 19:40:49 +0100 > Jacob Carlborg wrote: > > > 1. it uses python, yet another dependency > > True, but it brings mo

Re: What Makes A Programming Language Good

2011-01-20 Thread Gour
On Wed, 19 Jan 2011 19:40:49 +0100 Jacob Carlborg wrote: > 1. it uses python, yet another dependency True, but it brings more features over e.g. cmake 'cause you have full language on disposal. > 2. it seems complicated Well, build systems are complex... ;) Sincerely, Gour -- Gour | Hlap

Re: What Makes A Programming Language Good

2011-01-20 Thread Brad
In digitalmars.D, you wrote: > The two most frustrating aspects were documentation and deployment. > The documents were sparse and useless and deployment was the > hugest headache I've ever experienced, in great part due to Rubygems > not working properly! > > They've probably improved it a lot sin

Re: What Makes A Programming Language Good

2011-01-20 Thread Jacob Carlborg
On 2011-01-19 21:13, Adam Ruppe wrote: Vladimir Panteleev wrote: Your tool will just download the latest version of Y and the whole thing crashes and burns. My problem is I don't see how that'd happen in the first place. Who would distribute something they've never compiled? If they compiled

Re: Potential patent issues

2011-01-20 Thread Russel Winder
On Wed, 2011-01-19 at 22:37 +0100, Simen kjaeraas wrote: > Nick Sabalausky wrote: > > > "retard" wrote in message > > news:ih7jv4$q49$7...@digitalmars.com... > >> Wed, 19 Jan 2011 15:44:38 -0500, Nick Sabalausky wrote: > >> > >>> "Andrej Mitrovic" wrote in message > >>> news:mailman.724.1295465