Re: Why Ruby?

2010-12-14 Thread Nick Sabalausky
"lurker" wrote in message news:ie8rc3$27l...@digitalmars.com... > Nick Sabalausky Wrote: > >> "piotrek" wrote in message >> news:ie8fu9$ej...@digitalmars.com... >> > On Mon, 13 Dec 2010 09:49:50 -0600, Andrei Alexandrescu wrote: >> >> By the way, I couldn't stop cringing at the distasteful, male

Re: Why Ruby?

2010-12-14 Thread Nick Sabalausky
"lurker" wrote in message news:ie8rji$283...@digitalmars.com... > Nick Sabalausky Wrote: > >> "Jacob Carlborg" wrote in message >> news:ie8f5f$o6...@digitalmars.com... >> > >> > Probably not, but, for example, Scala allows very compact delegate >> > literals: >> > >> > Array(1, 2, 3, 4, 5).selec

Re: Slides from my ACCU Silicon Valley talk

2010-12-14 Thread Nick Sabalausky
"lurker" wrote in message news:ie8r60$276...@digitalmars.com... > Nick Sabalausky Wrote: > >> "snk_kid" wrote in message >> news:ie8gst$tt...@digitalmars.com... >> > None of those usernames are mine except this one (snk_kid). You need to >> > stop making assumptions and nobody really cares about

Re: emscripten

2010-12-14 Thread Nick Sabalausky
"Adam D. Ruppe" wrote in message news:ie9hjv$r1...@digitalmars.com... >> What about Hotmail, Yahoo, MobileMe, etc? > > I haven't used most of them for a long time. Gmail gets most > my ranting because its the one I've used most recently. (And > I remember my password to it so I could sign in and

Re: emscripten

2010-12-14 Thread Nick Sabalausky
"Michael Stover" wrote in message news:mailman.1004.1292372981.21107.digitalmar...@puremagic.com... > > Complaining the editor isn't like vi just makes me roll my eyes. Few > would > really want it to be. However, again, there are vi clones in javascript, > if > one were really wanted it. >

Re: improvement request - enabling by-value-containers

2010-12-14 Thread bearophile
Michel Fortin: > I have to echo a similar concern with by-reference containers from my > experience of Cocoa. It's really too easy to have two references to the > same container without realizing it. A partial (but maybe better) solution to this problem is to introduce "linear types" in D, ad

Re: improvement request - enabling by-value-containers

2010-12-14 Thread Kagamin
Jonathan Schmidt-Dominé Wrote: > Just about my experiences: When trying to hack some algorithms quickly in > Ruby I made a lot of mistakes because I had to care about a .clone > everywhere and because Array.new(5, []) does not work as expected (sorry, > but Array.new(5) { return [] } is not ni

Re: improvement request - enabling by-value-containers

2010-12-14 Thread Kagamin
Jonathan Schmidt-Dominé Wrote: > For me something like ref const scope (or ref scope for primitives) should > be used as often as possible, it should even be the default in many cases > (function parameters, foreach-variables etc.) So you want your containers by reference everywhere?

Re: emscripten

2010-12-14 Thread Adam D. Ruppe
> What about Hotmail, Yahoo, MobileMe, etc? I haven't used most of them for a long time. Gmail gets most my ranting because its the one I've used most recently. (And I remember my password to it so I could sign in and re-check my statements before posting too.) If I were writing a webmail program

An opportunity to benchmark the DM back-end.

2010-12-14 Thread BCS
http://blog.regehr.org/archives/320 I ran across that post and started wondering: how hard would it be to get a version of DMC running on linux?

Re: emscripten

2010-12-14 Thread Sean Kelly
Adam D. Ruppe Wrote: > Michael Stover: > > Did you use the gmail webapp to write that? > > No. My public email address is gmail so I get a free spam > filter and online archive, but I don't actually use their > awful, awful interface. (All incoming mail to that address is > forwarded to my real e

Re: improvement request - enabling by-value-containers

2010-12-14 Thread Michel Fortin
On 2010-12-14 17:05:47 -0500, Andrei Alexandrescu said: On 12/14/10 3:29 PM, Jonathan Schmidt-Dominé wrote: However, some reasons for by-value-containers: *First of all you often have to deal with mutli-dimensional data- structures, you map something to a map of lists of whatever and you want

Re: Paralysis of analysis

2010-12-14 Thread Craig Black
"Jonathan M Davis" wrote in message news:mailman.1005.1292374292.21107.digitalmar...@puremagic.com... On Tuesday, December 14, 2010 16:35:34 Craig Black wrote: > What say you? I feel like the odd man out here since my perspective is so different. I use custom container classes even in C++,

Re: improvement request - enabling by-value-containers

2010-12-14 Thread Michel Fortin
On 2010-12-14 16:29:18 -0500, Jonathan Schmidt-Dominé said: Just about my experiences: When trying to hack some algorithms quickly in Ruby I made a lot of mistakes because I had to care about a .clone everywhere and because Array.new(5, []) does not work as expected (sorry, but Array.new(5) {

Re: improvement request - enabling by-value-containers

2010-12-14 Thread Jonathan Schmidt-Dominé
> copy_if on a multidimensional container should not naively copy entire > hyperplanes. More generally, I think that whenever an arbitrarily large > object is to be copied, that should be explicit instead of implicit. A > lot of focus in C++ is dedicated to making sure you don't copy the wrong > th

Re: improvement request - enabling by-value-containers

2010-12-14 Thread Jonathan Schmidt-Dominé
Hi! >> *Another argument: It should be very simple (at least in C++ it is, I >> have >> never had problems with it, I just added the& here and there) to handle >> references to by-value-types, but wrapping by-reference-types into >> by-value- types is really ugly, although it may be the right thi

Re: Version statement

2010-12-14 Thread Walter Bright
Extrawurst wrote: On 14.12.2010 20:23, Simen kjaeraas wrote: Walter Bright wrote: 2) I would really like the idea to be able to get a compiletime string of version identifiers in some kind of way. Perhaps even an array of version-strings. I don't know what that means. Likely something li

Re: Paralysis of analysis

2010-12-14 Thread Jonathan M Davis
On Tuesday, December 14, 2010 16:35:34 Craig Black wrote: > > What say you? > > I feel like the odd man out here since my perspective is so different. I > use custom container classes even in C++, partly because I can usually get > better performance that way, and because I can customize the the

Re: Paralysis of analysis

2010-12-14 Thread Craig Black
What say you? I feel like the odd man out here since my perspective is so different. I use custom container classes even in C++, partly because I can usually get better performance that way, and because I can customize the the container however I like. So I will probably be doing my own con

Re: emscripten

2010-12-14 Thread Michael Stover
I've used Pegasus, thunderbird, Exchange, Evolution, and whatever is on my Mac by default (briefly). I've used other web emails too, including one for Exchange, which is terrible. Some of your complaints are not generic to javascript/web apps - like the right click complaint. It can be done easi

Re: Version statement

2010-12-14 Thread Extrawurst
On 14.12.2010 20:23, Simen kjaeraas wrote: Walter Bright wrote: 2) I would really like the idea to be able to get a compiletime string of version identifiers in some kind of way. Perhaps even an array of version-strings. I don't know what that means. Likely something like __traits( versio

Re: emscripten

2010-12-14 Thread Adam D. Ruppe
> I don't have any problems you seem to have with gmail. Two questions: a) Have you ever tried a better alternative? If you've only used crap, a polished turd looks really really good. b) How much email do you handle? I used the web interface for quite a while before I went into business. It wor

Re: emscripten

2010-12-14 Thread Michael Stover
I don't have any problems you seem to have with gmail. I suspect attitude is a big difference. On Tue, Dec 14, 2010 at 6:43 PM, Adam D. Ruppe wrote: > Michael Stover: > > Did you use the gmail webapp to write that? > > No. My public email address is gmail so I get a free spam > filter and online

Re: How do I do placement delete in D?

2010-12-14 Thread Craig Black
"Andrei Alexandrescu" wrote in message news:ie8vpc$2gb...@digitalmars.com... On 12/14/10 5:09 PM, Craig Black wrote: Arg! Someone removed my bug report and assumed I was wrong about it without even checking into it. Why do I even try to help the D community? The bug report stands, thanks fo

Re: How do I do placement delete in D?

2010-12-14 Thread Andrei Alexandrescu
On 12/14/10 5:09 PM, Craig Black wrote: Arg! Someone removed my bug report and assumed I was wrong about it without even checking into it. Why do I even try to help the D community? The bug report stands, thanks for clarifying it. Andrei

Re: Paralysis of analysis

2010-12-14 Thread Michel Fortin
On 2010-12-14 14:02:34 -0500, Andrei Alexandrescu said: What say you? I'd prefer them to be value types. And I agree that if you want to give them reference semantics it's much cleaner if they're implemented as a class. I fear the null pointers however... I understand your paralysis.

Re: emscripten

2010-12-14 Thread Adam D. Ruppe
Michael Stover: > Did you use the gmail webapp to write that? No. My public email address is gmail so I get a free spam filter and online archive, but I don't actually use their awful, awful interface. (All incoming mail to that address is forwarded to my real email address, and my outgoing mail i

Re: improvement request - enabling by-value-containers

2010-12-14 Thread bearophile
Andrei: > One issue that I noticed about myself and other people coming to D from > C++ is that we expect to bring with us, along with the many things that > make C++ great, the baggage of common worries, misgivings, and just rote > work that we got used to. Yes, this is a common thing (it hap

Re: New syntax for string mixins

2010-12-14 Thread Graham St Jack
I don't know, do you have an example ? For example taking a classname and a bunch of field types and names, and turning it into a class definition complete with constructor from field values, constructor from an input stream, a method to write to an output stream, and const getters. Or maybe s

Re: Slides from my ACCU Silicon Valley talk

2010-12-14 Thread Simen kjaeraas
Alex_Dovhal wrote: "Don" wrote: Agreed. I've just looked through some code that I thought used them extensively, but found only two complex literals: 1i (dozens of instances) and 2i (one instance). So if D removes complex literals what the proposed name for Imaginary One would be? _

Re: How do I do placement delete in D?

2010-12-14 Thread Craig Black
Arg! Someone removed my bug report and assumed I was wrong about it without even checking into it. Why do I even try to help the D community?

Re: Why Ruby?

2010-12-14 Thread lurker
Nick Sabalausky Wrote: > "Jacob Carlborg" wrote in message > news:ie8f5f$o6...@digitalmars.com... > > > > Probably not, but, for example, Scala allows very compact delegate > > literals: > > > > Array(1, 2, 3, 4, 5).select(_ > 3).collect(_ * _) > > > > Or more verbose: > > > > Array(1, 2, 3, 4,

Re: Why Ruby?

2010-12-14 Thread lurker
Nick Sabalausky Wrote: > "piotrek" wrote in message > news:ie8fu9$ej...@digitalmars.com... > > On Mon, 13 Dec 2010 09:49:50 -0600, Andrei Alexandrescu wrote: > >> By the way, I couldn't stop cringing at the distasteful, male-centric > >> sexual jokes that the talk is peppered with. Wonder if the

Re: Paralysis of analysis

2010-12-14 Thread Jonathan M Davis
On Tuesday, December 14, 2010 11:02:34 Andrei Alexandrescu wrote: > I kept on literally losing sleep about a number of issues involving > containers, sealing, arbitrary-cost copying vs. reference counting and > copy-on-write, and related issues. This stops me from making rapid > progress on definin

Re: Slides from my ACCU Silicon Valley talk

2010-12-14 Thread Alex_Dovhal
Oh sorry those @i and @j also would be build in. Ignore this.

Re: Slides from my ACCU Silicon Valley talk

2010-12-14 Thread lurker
Nick Sabalausky Wrote: > "snk_kid" wrote in message > news:ie8gst$tt...@digitalmars.com... > > None of those usernames are mine except this one (snk_kid). You need to > > stop making assumptions and nobody really cares about a comment voting > > system. You come off as a child making such an u

Re: emscripten

2010-12-14 Thread Michael Stover
On Tue, Dec 14, 2010 at 2:03 PM, Adam Ruppe wrote: > > Have you tried, for example, CoffeeScript: > > I have not - my main problem with Javascript isn't so much the > language as the browsers in which it runs, which is why I feel things > like emscripten (and google native client) are pretty usele

Re: Slides from my ACCU Silicon Valley talk

2010-12-14 Thread Alex_Dovhal
"Don" wrote: > Agreed. I've just looked through some code that I thought used them > extensively, but found only two complex literals: 1i (dozens of instances) > and 2i (one instance). So if D removes complex literals what the proposed name for Imaginary One would be? _i , i_ , _i_, _

Re: Paralysis of analysis

2010-12-14 Thread Jonathan Schmidt-Dominé
Jonathan Schmidt-Dominé wrote: >> I continue to belief, that containers should be value-types. In order >> to prevent useless copying you can use something like "Impl * impl" >> and reference-counting. Then you only do a copy on actual change. This >> is the way I'm currently implementing in my ow

Re: improvement request - enabling by-value-containers

2010-12-14 Thread Andrei Alexandrescu
On 12/14/10 3:29 PM, Jonathan Schmidt-Dominé wrote: Hi! Just about my experiences: When trying to hack some algorithms quickly in Ruby I made a lot of mistakes because I had to care about a .clone everywhere and because Array.new(5, []) does not work as expected (sorry, but Array.new(5) { return

Re: Paralysis of analysis

2010-12-14 Thread Jonathan Schmidt-Dominé
> I continue to belief, that containers should be value-types. In order > to prevent useless copying you can use something like "Impl * impl" > and reference-counting. Then you only do a copy on actual change. This > is the way I'm currently implementing in my own container-classes. >From my point

Re: Reducing template constraint verbosity? [was Re: Slides from my ACCU Silicon Valley talk]

2010-12-14 Thread Steven Schveighoffer
On Tue, 14 Dec 2010 16:35:49 -0500, Andrei Alexandrescu wrote: On 12/14/10 2:44 PM, Steven Schveighoffer wrote: On Tue, 14 Dec 2010 15:35:30 -0500, Patrick Down wrote: == Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article Would it help to allow 'else' and 'else if' on the t

Re: Reducing template constraint verbosity? [was Re: Slides from my ACCU Silicon Valley talk]

2010-12-14 Thread Andrei Alexandrescu
On 12/14/10 2:44 PM, Steven Schveighoffer wrote: On Tue, 14 Dec 2010 15:35:30 -0500, Patrick Down wrote: == Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article Would it help to allow 'else' and 'else if' on the template constraints? void foo(R)(R r) if(isRandomAccessRange!R) {...}

Re: Reducing template constraint verbosity? [was Re: Slides from my ACCU Silicon Valley talk]

2010-12-14 Thread Walter Bright
Steven Schveighoffer wrote: Any idea how this can be 'solved' or do we need to continue doing things like this? My naive instinct is to use the declaration order to determine a match (first one to match wins), but that kind of goes against other overloads in D. Yeah, I'd be extremely relucta

Re: improvement request - enabling by-value-containers

2010-12-14 Thread Jonathan Schmidt-Dominé
Hi! Just about my experiences: When trying to hack some algorithms quickly in Ruby I made a lot of mistakes because I had to care about a .clone everywhere and because Array.new(5, []) does not work as expected (sorry, but Array.new(5) { return [] } is not nice). So in fact C++ made my life ea

Re: How do I do placement delete in D?

2010-12-14 Thread Craig Black
No. Can you file a bug? -Steve done

Re: Version statement

2010-12-14 Thread Andrei Alexandrescu
On 12/14/10 2:09 PM, Walter Bright wrote: Nick Sabalausky wrote: But now, when you or someone else comes along and compiles it for OS_D, it's going to silently use the code for OS_B and OS_C *regardless* of whether or not that's correct for OS_D. That particular problem has bitten me probably

Re: How do I do placement delete in D?

2010-12-14 Thread Steven Schveighoffer
On Tue, 14 Dec 2010 16:05:14 -0500, Craig Black wrote: Thanks Steve. clear seems to be calling the destructor twice. Is this intentional? No. Can you file a bug? -Steve

Re: Reducing template constraint verbosity? [was Re: Slides from my ACCU Silicon Valley talk]

2010-12-14 Thread Steven Schveighoffer
On Tue, 14 Dec 2010 16:03:18 -0500, so wrote: It is exactly your proposal (first one to match wins), with uglier syntax :D Not exactly. It fits within the syntax of D (if-else), and order of evaluation is explicit, whereas one might expect with my original proposal that order does not m

Re: Reducing template constraint verbosity? [was Re: Slides from my ACCU Silicon Valley talk]

2010-12-14 Thread so
s/exactly/essentially/

Re: Paralysis of analysis

2010-12-14 Thread Simon Buerger
On 14.12.2010 20:53, Andrei Alexandrescu wrote: Coming from an STL background I was also very comfortable with the notion of value. Walter pointed to me that in the STL what you worry about most of the time is to _undo_ the propensity of objects getting copied at the drop of a hat. For example, t

Re: Version statement

2010-12-14 Thread Denis Koroskin
On Tue, 14 Dec 2010 21:46:47 +0300, Extrawurst wrote: Hi i just want to discuss two points about D version statements. 1) Why is it not possible to negate the condition of a version statement. I think it is unintuitive and keeps me writing weird statements like: version(Win32){}else{versi

Re: How do I do placement delete in D?

2010-12-14 Thread Craig Black
Thanks Steve. clear seems to be calling the destructor twice. Is this intentional? -Craig

Re: Why Ruby?

2010-12-14 Thread Nick Sabalausky
"piotrek" wrote in message news:ie8fu9$ej...@digitalmars.com... > On Mon, 13 Dec 2010 09:49:50 -0600, Andrei Alexandrescu wrote: >> By the way, I couldn't stop cringing at the distasteful, male-centric >> sexual jokes that the talk is peppered with. Wonder if there was any >> woman in the audienc

Re: How do I do placement delete in D?

2010-12-14 Thread Craig Black
About the destructor being called twice, perhaps clear is passing by value rather than by reference? If so, is this desirable? -Craig

Re: Why Ruby?

2010-12-14 Thread Nick Sabalausky
"Jacob Carlborg" wrote in message news:ie8f5f$o6...@digitalmars.com... > > Probably not, but, for example, Scala allows very compact delegate > literals: > > Array(1, 2, 3, 4, 5).select(_ > 3).collect(_ * _) > > Or more verbose: > > Array(1, 2, 3, 4, 5).select((x) => x > 3).collect((x, y) => x *

Re: Reducing template constraint verbosity? [was Re: Slides from my ACCU Silicon Valley talk]

2010-12-14 Thread so
It is exactly your proposal (first one to match wins), with uglier syntax :D Would it even fulfill your requirements? For example "What if I don't have control over that module?" This one would make it impossible.

Re: Slides from my ACCU Silicon Valley talk

2010-12-14 Thread Nick Sabalausky
"snk_kid" wrote in message news:ie8gst$tt...@digitalmars.com... > None of those usernames are mine except this one (snk_kid). You need to > stop making assumptions and nobody really cares about a comment voting > system. You come off as a child making such an unprofessional post in a > public

Re: New syntax for string mixins

2010-12-14 Thread Nick Sabalausky
"Jacob Carlborg" wrote in message news:ie8i8c$15f...@digitalmars.com... > On 2010-12-14 19:13, Nick Sabalausky wrote: >> "Graham St Jack" wrote in message >> news:ie76ig$b2...@digitalmars.com... >>> >>> What you are suggesting here seems to be a way to dramatically reduce >>> the >>> complexity

Re: Reducing template constraint verbosity? [was Re: Slides from my ACCU Silicon Valley talk]

2010-12-14 Thread Steven Schveighoffer
On Tue, 14 Dec 2010 15:35:30 -0500, Patrick Down wrote: == Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article Would it help to allow 'else' and 'else if' on the template constraints? void foo(R)(R r) if(isRandomAccessRange!R) {...} else if(isInputRange!R) {...} This could basical

Re: How do I do placement delete in D?

2010-12-14 Thread Steven Schveighoffer
On Tue, 14 Dec 2010 15:33:26 -0500, Craig Black wrote: "Steven Schveighoffer" wrote in message news:op.vnpz6ob6eav...@steve-laptop... On Tue, 14 Dec 2010 15:18:32 -0500, Craig Black wrote: I know emplace is used to do placement new. What is the equivalent placement delete? x = emp

Re: Reducing template constraint verbosity? [was Re: Slides from my ACCU Silicon Valley talk]

2010-12-14 Thread Patrick Down
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article Would it help to allow 'else' and 'else if' on the template constraints? void foo(R)(R r) if(isRandomAccessRange!R) {...} else if(isInputRange!R) {...} This could basically be translated into two specializations like this: void f

Re: How do I do placement delete in D?

2010-12-14 Thread Craig Black
"Steven Schveighoffer" wrote in message news:op.vnpz6ob6eav...@steve-laptop... On Tue, 14 Dec 2010 15:18:32 -0500, Craig Black wrote: I know emplace is used to do placement new. What is the equivalent placement delete? x = emplace(yourAllocationFunction!T()); ... clear(x); yourDeallocat

Re: How do I do placement delete in D?

2010-12-14 Thread Steven Schveighoffer
On Tue, 14 Dec 2010 15:18:32 -0500, Craig Black wrote: I know emplace is used to do placement new. What is the equivalent placement delete? x = emplace(yourAllocationFunction!T()); ... clear(x); yourDeallocationFunction(x); // if necessary. For instance, stack data doesn't need to be

Re: Version statement

2010-12-14 Thread Nick Sabalausky
"Walter Bright" wrote in message news:ie8j0d$1a9...@digitalmars.com... > Nick Sabalausky wrote: >> But now, when you or someone else comes along and compiles it for OS_D, >> it's going to silently use the code for OS_B and OS_C *regardless* of >> whether or not that's correct for OS_D. > > That

Re: Paralysis of analysis

2010-12-14 Thread Steven Schveighoffer
On Tue, 14 Dec 2010 15:13:36 -0500, Walter Bright wrote: Andrei Alexandrescu wrote: The two words overhead comes from the vtable and the mutex. I don't think that overhead is a problem. For small numbers of values, one should use an array. The more complex containers are for larger num

How do I do placement delete in D?

2010-12-14 Thread Craig Black
I know emplace is used to do placement new. What is the equivalent placement delete? -Craig

Re: Paralysis of analysis

2010-12-14 Thread Walter Bright
Andrei Alexandrescu wrote: The two words overhead comes from the vtable and the mutex. I don't think that overhead is a problem. For small numbers of values, one should use an array. The more complex containers are for larger numbers of values, where 2 words is insignificant.

Re: Paralysis of analysis

2010-12-14 Thread Nick Sabalausky
"Steven Schveighoffer" wrote in message news:op.vnpx3oioeav...@steve-laptop... > On Tue, 14 Dec 2010 14:02:34 -0500, Andrei Alexandrescu > wrote: > >> Advantages of the change: >> >> - Clear, self-documented reference semantics >> >> - Uses the right tool (classes) for the job (define a type wi

Re: Version statement

2010-12-14 Thread Walter Bright
Nick Sabalausky wrote: But now, when you or someone else comes along and compiles it for OS_D, it's going to silently use the code for OS_B and OS_C *regardless* of whether or not that's correct for OS_D. That particular problem has bitten me probably hundreds of times, and every other progra

Re: Paralysis of analysis

2010-12-14 Thread Steven Schveighoffer
On Tue, 14 Dec 2010 14:56:55 -0500, Kagamin wrote: Andrei Alexandrescu Wrote: That all being said, I'd like to make a motion that should simplify everyone's life - if only for a bit. I'm thinking of making all containers classes (either final classes or at a minimum classes with only final me

Re: Paralysis of analysis

2010-12-14 Thread Andrei Alexandrescu
On 12/14/10 1:56 PM, Kagamin wrote: Andrei Alexandrescu Wrote: That all being said, I'd like to make a motion that should simplify everyone's life - if only for a bit. I'm thinking of making all containers classes (either final classes or at a minimum classes with only final methods). Currently

Re: Paralysis of analysis

2010-12-14 Thread Andrei Alexandrescu
On 12/14/10 1:42 PM, Dmitry Olshansky wrote: On 14.12.2010 22:02, Andrei Alexandrescu wrote: I also continue to believe that controlled lifetime (i.e. reference-counted implementation) is important for a container. Containers tend to be large compared to other objects, so exercising strict contr

Re: New syntax for string mixins

2010-12-14 Thread Jacob Carlborg
On 2010-12-14 19:13, Nick Sabalausky wrote: "Graham St Jack" wrote in message news:ie76ig$b2...@digitalmars.com... What you are suggesting here seems to be a way to dramatically reduce the complexity of code that generates source-code and mixes it in. I think something like that is needed befo

Re: Reducing template constraint verbosity? [was Re: Slides from my ACCU Silicon Valley talk]

2010-12-14 Thread Andrei Alexandrescu
On 12/14/10 1:43 PM, Steven Schveighoffer wrote: On Tue, 14 Dec 2010 13:51:50 -0500, so wrote: Any idea how this can be 'solved' or do we need to continue doing things like this? My naive instinct is to use the declaration order to determine a match (first one to match wins), but that kind of

Re: Paralysis of analysis

2010-12-14 Thread Kagamin
Andrei Alexandrescu Wrote: > That all being said, I'd like to make a motion that should simplify > everyone's life - if only for a bit. I'm thinking of making all > containers classes (either final classes or at a minimum classes with > only final methods). Currently containers are implemented

Re: Paralysis of analysis

2010-12-14 Thread Andrei Alexandrescu
On 12/14/10 1:38 PM, Simon Buerger wrote: I continue to belief, that containers should be value-types. In order to prevent useless copying you can use something like "Impl * impl" and reference-counting. Then you only do a copy on actual change. This is the way I'm currently implementing in my ow

Re: Paralysis of analysis

2010-12-14 Thread Dmitry Olshansky
On 14.12.2010 22:02, Andrei Alexandrescu wrote: I kept on literally losing sleep about a number of issues involving containers, sealing, arbitrary-cost copying vs. reference counting and copy-on-write, and related issues. This stops me from making rapid progress on defining D containers and oth

Re: Reducing template constraint verbosity? [was Re: Slides from my ACCU Silicon Valley talk]

2010-12-14 Thread Steven Schveighoffer
On Tue, 14 Dec 2010 13:51:50 -0500, so wrote: Any idea how this can be 'solved' or do we need to continue doing things like this? My naive instinct is to use the declaration order to determine a match (first one to match wins), but that kind of goes against other overloads in D. One big

Re: Version statement

2010-12-14 Thread Nick Sabalausky
"Jacob Carlborg" wrote in message news:ie8fdf$ol...@digitalmars.com... > On 2010-12-14 19:46, Extrawurst wrote: >> Hi i just want to discuss two points about D version statements. >> >> 1) Why is it not possible to negate the condition of a version >> statement. I think it is unintuitive and keep

Re: Paralysis of analysis

2010-12-14 Thread Simon Buerger
On 14.12.2010 20:02, Andrei Alexandrescu wrote: I kept on literally losing sleep about a number of issues involving containers, sealing, arbitrary-cost copying vs. reference counting and copy-on-write, and related issues. This stops me from making rapid progress on defining D containers and other

Re: Paralysis of analysis

2010-12-14 Thread Steven Schveighoffer
On Tue, 14 Dec 2010 14:02:34 -0500, Andrei Alexandrescu wrote: I continue to believe that containers should have reference semantics, just like classes. Copying a container wholesale is not something you want to be automatic. I agree. I also continue to believe that controlled lifetime

Re: Slides from my ACCU Silicon Valley talk

2010-12-14 Thread snk_kid
None of those usernames are mine except this one (snk_kid). You need to stop making assumptions and nobody really cares about a comment voting system. You come off as a child making such an unprofessional post in a public mailing list of a programming language. Is this what the D community is ab

Re: Paralysis of analysis

2010-12-14 Thread Andrei Alexandrescu
On 12/14/10 1:19 PM, so wrote: Could you please elaborate the disadvantages part? Thanks! Consider the empty() property. A struct using a pointer internally can return true from empty if the pointer is null. A class cannot do that. struct Array { Impl * p; @property bool empty() { r

Re: Version statement

2010-12-14 Thread Simen kjaeraas
Walter Bright wrote: 2) I would really like the idea to be able to get a compiletime string of version identifiers in some kind of way. Perhaps even an array of version-strings. I don't know what that means. Likely something like __traits( versions ), that returns ["DigitalMars", "Windo

Re: Paralysis of analysis

2010-12-14 Thread so
Could you please elaborate the disadvantages part? Thanks! -- Using Opera's revolutionary email client: http://www.opera.com/mail/

Re: Version statement

2010-12-14 Thread Walter Bright
Extrawurst wrote: Hi i just want to discuss two points about D version statements. 1) Why is it not possible to negate the condition of a version statement. I think it is unintuitive and keeps me writing weird statements like: version(Win32){}else{version = NotWin32;} The idea is that versi

Re: Why Ruby?

2010-12-14 Thread piotrek
On Mon, 13 Dec 2010 09:49:50 -0600, Andrei Alexandrescu wrote: > By the way, I couldn't stop cringing at the distasteful, male-centric > sexual jokes that the talk is peppered with. Wonder if there was any > woman in the audience, and how she might have felt. And this is not a > ghetto rant - it's

Re: emscripten

2010-12-14 Thread Jacob Carlborg
On 2010-12-14 20:03, Adam Ruppe wrote: Have you tried, for example, CoffeeScript: I have not - my main problem with Javascript isn't so much the language as the browsers in which it runs, which is why I feel things like emscripten (and google native client) are pretty useless. Browsers are goo

Re: Inlining Code Test

2010-12-14 Thread Craig Black
"Iain Buclaw" wrote in message news:ie6ahr$1co...@digitalmars.com... == Quote from Craig Black (craigbla...@cox.net)'s article > Testing your C++ program (altered getCycle() for GCC) > > Times I get: > --- > Sorting with Array: 46869.159840 > Sorting with pointers: 38688.937320 > 17.45331

Re: Version statement

2010-12-14 Thread Jacob Carlborg
On 2010-12-14 19:46, Extrawurst wrote: Hi i just want to discuss two points about D version statements. 1) Why is it not possible to negate the condition of a version statement. I think it is unintuitive and keeps me writing weird statements like: version(Win32){}else{version = NotWin32;} That

Re: Why Ruby?

2010-12-14 Thread Jacob Carlborg
On 2010-12-14 19:33, Stephan Soller wrote: I think it's a matter of consistency. In Ruby blocks are used all the time for pretty much everything. In D this isn't the case because usually templates are used for stuff where blocks are used in Ruby (e.g. map, group and find in std.algorithm). I t

Paralysis of analysis

2010-12-14 Thread Andrei Alexandrescu
I kept on literally losing sleep about a number of issues involving containers, sealing, arbitrary-cost copying vs. reference counting and copy-on-write, and related issues. This stops me from making rapid progress on defining D containers and other artifacts in the standard library. Clearly

Re: emscripten

2010-12-14 Thread Adam Ruppe
> Have you tried, for example, CoffeeScript: I have not - my main problem with Javascript isn't so much the language as the browsers in which it runs, which is why I feel things like emscripten (and google native client) are pretty useless. Browsers are good for displaying html pages. Javascript

Re: Reducing template constraint verbosity? [was Re: Slides from my ACCU Silicon Valley talk]

2010-12-14 Thread so
Any idea how this can be 'solved' or do we need to continue doing things like this? My naive instinct is to use the declaration order to determine a match (first one to match wins), but that kind of goes against other overloads in D. One big plus of current solution is that everything you

Re: Why Ruby?

2010-12-14 Thread Simen kjaeraas
Stephan Soller wrote: [1, 2, 3, 4, 5].select((int e){ return e > 3; }) .collect((int e){ return e*e; }); It's already fairly compact. The main overhead is the parameter type and the return statement. I don't believe this can be reduced any more without breaking cons

Re: New syntax for string mixins

2010-12-14 Thread Nick Sabalausky
"Jacob Carlborg" wrote in message news:ie8dpq$kf...@digitalmars.com... > On 2010-12-14 13:05, Don wrote: >> Graham St Jack wrote: >>> On 14/12/10 20:33, Vladimir Panteleev wrote: On Tue, 14 Dec 2010 09:30:46 +0200, Graham St Jack wrote: > There is of course the worry that it c

Version statement

2010-12-14 Thread Extrawurst
Hi i just want to discuss two points about D version statements. 1) Why is it not possible to negate the condition of a version statement. I think it is unintuitive and keeps me writing weird statements like: version(Win32){}else{version = NotWin32;} 2) I would really like the idea to be able

Re: emscripten

2010-12-14 Thread Jacob Carlborg
On 2010-12-14 13:56, Adam Ruppe wrote: Today being online matters for languages. I have found another way to (in theory) run D code on the web. I've been running D code on the web, professionally, for almost a year now. To toy around, I've also done C, C++, and even assembly. How? It runs on

Re: New syntax for string mixins

2010-12-14 Thread Jacob Carlborg
On 2010-12-14 13:05, Don wrote: Graham St Jack wrote: On 14/12/10 20:33, Vladimir Panteleev wrote: On Tue, 14 Dec 2010 09:30:46 +0200, Graham St Jack wrote: There is of course the worry that it could get so easy that everyone starts doing it, and we have (relatively) impenetrable code everyw

  1   2   >