digitalmars.D.announce - NWCPP january talk
- Walter Bright (4/4) Dec 11 2008 Bartosz has signed me up to give a presentation at the January meeting
- BCS (5/11) Dec 11 2008 Hard core compile time reflection a.k.a D'iss'ection
- Bill Baxter (52/63) Dec 11 2008 Probably the best would be to talk about what you find most
- John Reimer (13/19) Dec 11 2008 Get back at Bartosz and tell him that you delegated him to talk about hi...
- John Reimer (6/31) Dec 11 2008 Oops, I see that Bartosz just gave a talk on "Memory Fences" last month....
- Janderson (3/8) Dec 14 2008 Problems in C++ that D solves.
- Walter Bright (3/13) Dec 14 2008 A lot of people have asked me to stop talking about limitations in C++
- Georg Wrede (10/23) Dec 18 2008 So don't TALK about them. Folks are sick and tired of hype and fud anywa...
- Andrei Alexandrescu (3/30) Dec 18 2008 Amen brother!
Bartosz has signed me up to give a presentation at the January meeting of the NWCPP. http://www.nwcpp.org/ I am not sure what to talk about, though. Any particular D topics you'd find particularly interesting?
Dec 11 2008
Reply to Walter,Bartosz has signed me up to give a presentation at the January meeting of the NWCPP. http://www.nwcpp.org/ I am not sure what to talk about, though. Any particular D topics you'd find particularly interesting?Hard core compile time reflection a.k.a D'iss'ection I'm thinking stuff like ripping about the the template arg types and doing magic on them. I'm planning on building a column-wise struct array type that would be a good example.
Dec 11 2008
On Fri, Dec 12, 2008 at 8:12 AM, BCS <ao pathlink.com> wrote:Reply to Walter,Probably the best would be to talk about what you find most interesting right now. Second to that is to ask us what we think C++ users who *don't know* D would find interesting, since probably D users on this list are not your target audience. What we would find interesting isn't that relevant.Bartosz has signed me up to give a presentation at the January meeting of the NWCPP. http://www.nwcpp.org/ I am not sure what to talk about, though. Any particular D topics you'd find particularly interesting?Hard core compile time reflection a.k.a D'iss'ection I'm thinking stuff like ripping about the the template arg types and doing magic on them. I'm planning on building a column-wise struct array type that would be a good example.I like this suggestion. Many C++'ers can probably recognize how difficult it is to do anything interesting with templates in C++. And so they can appreciate the nice facilities that D brings to the table. I've recently been using this pattern: I have a template class that needs a type T that supports various operations (like a-b subtraction). But I want the user to still be able to use the class on the type T as-is as long as he can supply provide the missing functions externally. I allow this by writing the template so that it will accept *either* a T that supports all the operations, *or* a TypeTraits struct that might look like so: struct TypeTraits { alias SomeT DataType; // first thing - tells what the actual T type should be alias float ScalarType; // the type of one DataType component, e.g. DataType subAssign(ref DataType a, DataType b) { // implement a-=b here somehow (assuming DataType doesn't support it } ... } The trick is that when the user makes a MyClass!(V), I don't use V directly inside the class. I use a TraitsDeducer!(V). And TraitsDeducer!(V) is something that supports all the interface functions needed. The implementation of TraitsDeducer uses a lot of compile-time reflection to figure out what the type V can and can't do by itself. For instance if V supports a-b, but not a-=b it will implement a-=b using a = a - b. [[ Side note: What would make this a lot nicer would be if it were possible to provide out-of-class operator overloads and out-of-class extension methods. Then instead of having to use Traits.subAssign(a, b) inside the class I could use a-=b. In D2 OpDot could also be put to good use here probably. But this is D1 code.]] There's a lot of nice variations on this pattern of using a secondary "Traits" struct to let the user describe something about another type that might lack certain properties itself. But in the end it's hard to get very fancy with it in C++ because checks like I said above (use -= if it exists, otherwise use just minus) are such a pain to implement in C++. So Traits in C++ tend to just require you to supply every bit of info needed. In contrast, with D's static if and is() deductions you can make it so the Traits struct supplied by the user really only has to describe the bits that are lacking in the type. Another neat template thing to talk about : the use of "a<b" string literals for comparisons in std.algorithm is also neat, and provides a good motivation for built-in strings and compile-time functions (to do the parsing). --bb
Dec 11 2008
Hello Walter,Bartosz has signed me up to give a presentation at the January meeting of the NWCPP. http://www.nwcpp.org/ I am not sure what to talk about, though. Any particular D topics you'd find particularly interesting?Get back at Bartosz and tell him that you delegated him to talk about his current work on D and concurrency. ;-) In all seriousness, that's going to be a hot topic for awhile, especially in terms of D's future. You might cover all the features of D 2.0 that are important for making this a reality: 1) constants semantics 2) pure functions 3) templates/macros 4) ...and whatever implementation details Bartosz has been exploring per his blog. -JJR
Dec 11 2008
Hello John,Hello Walter,Oops, I see that Bartosz just gave a talk on "Memory Fences" last month. Not sure if it was D oriented, though. Even so, maybe the the D 2.0 concurrency direction would be a good followup presentation for Walter to give from a D perspective. -JJRBartosz has signed me up to give a presentation at the January meeting of the NWCPP. http://www.nwcpp.org/ I am not sure what to talk about, though. Any particular D topics you'd find particularly interesting?Get back at Bartosz and tell him that you delegated him to talk about his current work on D and concurrency. ;-) In all seriousness, that's going to be a hot topic for awhile, especially in terms of D's future. You might cover all the features of D 2.0 that are important for making this a reality: 1) constants semantics 2) pure functions 3) templates/macros 4) ...and whatever implementation details Bartosz has been exploring per his blog. -JJR
Dec 11 2008
Walter Bright wrote:Bartosz has signed me up to give a presentation at the January meeting of the NWCPP. http://www.nwcpp.org/ I am not sure what to talk about, though. Any particular D topics you'd find particularly interesting?Problems in C++ that D solves. -Joel
Dec 14 2008
Janderson wrote:Walter Bright wrote:A lot of people have asked me to stop talking about limitations in C++ <g> and instead concentrate on what D can do.Bartosz has signed me up to give a presentation at the January meeting of the NWCPP. http://www.nwcpp.org/ I am not sure what to talk about, though. Any particular D topics you'd find particularly interesting?Problems in C++ that D solves. -Joel
Dec 14 2008
Walter Bright wrote:Janderson wrote:So don't TALK about them. Folks are sick and tired of hype and fud anyway. Implicitly you'll address C++'s limitations anyhow, since there's obviously no point in talking about D stuff where C++ works equally well. Combine Martha Stewart and Mythbusters. Pick a programming task or a small example application or algorithm, and show them that it can be written easily and painlessly with D. (Something that obviously would be a pain to do in C++.) BUT DON'T MENTION C++ EVEN ONCE in the presentation. And let the audience themselves have the Aha of 'gee, i would have spent three days on that in my language', which obviously is C++.Walter Bright wrote:A lot of people have asked me to stop talking about limitations in C++ <g> and instead concentrate on what D can do.Bartosz has signed me up to give a presentation at the January meeting of the NWCPP. http://www.nwcpp.org/ I am not sure what to talk about, though. Any particular D topics you'd find particularly interesting?Problems in C++ that D solves.
Dec 18 2008
Georg Wrede wrote:Walter Bright wrote:Amen brother! AndreiJanderson wrote:So don't TALK about them. Folks are sick and tired of hype and fud anyway. Implicitly you'll address C++'s limitations anyhow, since there's obviously no point in talking about D stuff where C++ works equally well. Combine Martha Stewart and Mythbusters. Pick a programming task or a small example application or algorithm, and show them that it can be written easily and painlessly with D. (Something that obviously would be a pain to do in C++.) BUT DON'T MENTION C++ EVEN ONCE in the presentation. And let the audience themselves have the Aha of 'gee, i would have spent three days on that in my language', which obviously is C++.Walter Bright wrote:A lot of people have asked me to stop talking about limitations in C++ <g> and instead concentrate on what D can do.Bartosz has signed me up to give a presentation at the January meeting of the NWCPP. http://www.nwcpp.org/ I am not sure what to talk about, though. Any particular D topics you'd find particularly interesting?Problems in C++ that D solves.
Dec 18 2008