Re: Virtual methods on stack objects

2022-05-12 Thread vit via Digitalmars-d-learn
On Wednesday, 11 May 2022 at 20:53:21 UTC, Marvin Hannott wrote: On Wednesday, 11 May 2022 at 20:23:07 UTC, Ali Çehreli wrote: On 5/11/22 13:06, Marvin Hannott wrote: > I appreciate the answer, don't much like the "solutions". Me neither. :) > It's not so much about copying Great! > scoped

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Basile B. via Digitalmars-d-learn
On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote: What are you stuck at? What was the most difficult features to understand? etc. To make it more meaningful, what is your experience with other languages? Ali Overhall I think that D was not hard to learn because well designed (

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Alain De Vos via Digitalmars-d-learn
Some keywords are overloaded and have different meaning when used in a different place. Also some syntactic-sugar is way to much meaning too many different ways to do the same thing. I would prefer one way which is advised.

Creating a custom iota()

2022-05-12 Thread realhet via Digitalmars-d-learn
Hello, I have my own DateTime struct. It has opCmp() and opBinary(), I can do arithmetic with this custom DateTime and the amazing time units of the **quantities** package. Now I'm about mo make iterations in a DateTime range: const st = DateTime(UTC, "22.1.1 8:30").utcDayStart,

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Basile B. via Digitalmars-d-learn
On Thursday, 12 May 2022 at 11:50:59 UTC, Alain De Vos wrote: Some keywords are overloaded and have different meaning when used in a different place. Also some syntactic-sugar is way to much meaning too many different ways to do the same thing. I would prefer one way which is advised. `ptr1 i

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Basile B. via Digitalmars-d-learn
On Thursday, 12 May 2022 at 12:13:32 UTC, Basile B. wrote: On Thursday, 12 May 2022 at 11:50:59 UTC, Alain De Vos wrote: Some keywords are overloaded and have different meaning when used in a different place. Also some syntactic-sugar is way to much meaning too many different ways to do the sam

Exercises

2022-05-12 Thread Alain De Vos via Digitalmars-d-learn
Is there a link to a webpage with some dlang exercises in order to see if i master the language, from simple to diffucult ?

Re: While loop on global variable optimised away?

2022-05-12 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Wednesday, 11 May 2022 at 10:01:18 UTC, Johan wrote: Any function call (inside the loop) for which it cannot be proven that it never modifies your memory variable will work. That's why I'm pretty sure that mutex lock/unlock will work. I think the common semantics ought to be that everythin

Re: Exercises

2022-05-12 Thread zjh via Digitalmars-d-learn
On Thursday, 12 May 2022 at 13:04:51 UTC, Alain De Vos wrote: Is there a link to a webpage with some dlang exercises in order to see if i master the language, from simple to diffucult ? [dtour](https://tour.dlang.org/).

Re: Exercises

2022-05-12 Thread Anonymouse via Digitalmars-d-learn
On Thursday, 12 May 2022 at 13:04:51 UTC, Alain De Vos wrote: Is there a link to a webpage with some dlang exercises in order to see if i master the language, from simple to diffucult ? [Rosetta Code](https://www.rosettacode.org) has a bunch, with [many](https://www.rosettacode.org/wiki/Catego

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Arjan via Digitalmars-d-learn
On Thursday, 12 May 2022 at 11:05:08 UTC, Basile B. wrote: On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote: What are you stuck at? What was the most difficult features to understand? etc. To make it more meaningful, what is your experience with other languages? Ali Overhall I

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Guillaume Piolat via Digitalmars-d-learn
On Thursday, 12 May 2022 at 11:05:08 UTC, Basile B. wrote: - Certain variant forms of the `is` Expression are not obvious (not intuitive), I'm pretty sure I still cant use them without a quick look to the specs. That one was a trouble to hear about => http://p0nce.github.io/d-idioms/#Get-pare

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Anonymouse via Digitalmars-d-learn
On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote: What are you stuck at? What was the most difficult features to understand? etc. I came from shell scripts. They grew too large and overly complex when I wanted to do non-trivial things in a neat way, so I looked to proper programmi

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Basile B. via Digitalmars-d-learn
On Thursday, 12 May 2022 at 14:06:13 UTC, Arjan wrote: On Thursday, 12 May 2022 at 11:05:08 UTC, Basile B. wrote: On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote: - Operator overloading in certain cases was confusing, I remember that for one particular form once I had to use your

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Adam D Ruppe via Digitalmars-d-learn
On Thursday, 12 May 2022 at 14:42:43 UTC, Anonymouse wrote: That said, one thing I cannot seem to firmly wrap my head around is `is` expressions. `is` does so many things. It is simpler than it looks, I wrote about it in my book and in a post here: https://forum.dlang.org/post/xklcgjaqggihvh

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread jmh530 via Digitalmars-d-learn
On Thursday, 12 May 2022 at 12:13:32 UTC, Basile B. wrote: [snip] ``` is ( Type : TypeSpecialization , TemplateParameterList ) is ( Type == TypeSpecialization , TemplateParameterList ) is ( Type Identifier : TypeSpecialization , TemplateParameterList ) is ( Type Identifier == TypeSpecialization

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Tejas via Digitalmars-d-learn
On Thursday, 12 May 2022 at 15:18:34 UTC, jmh530 wrote: On Thursday, 12 May 2022 at 12:13:32 UTC, Basile B. wrote: [snip] ``` is ( Type : TypeSpecialization , TemplateParameterList ) is ( Type == TypeSpecialization , TemplateParameterList ) is ( Type Identifier : TypeSpecialization , TemplatePa

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 5/12/22 11:18 AM, jmh530 wrote: On Thursday, 12 May 2022 at 12:13:32 UTC, Basile B. wrote: [snip] ``` is ( Type : TypeSpecialization , TemplateParameterList ) is ( Type == TypeSpecialization , TemplateParameterList ) is ( Type Identifier : TypeSpecialization , TemplateParameterList ) is ( Typ

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Adam D Ruppe via Digitalmars-d-learn
On Thursday, 12 May 2022 at 15:18:34 UTC, jmh530 wrote: What's the difference between a Type and Type Identifier? The is expression roughly follows variable declaration style. You write int a; to declare a new symbol named `a` of type `int`. Similarly, static if(is(T a)) declares a new sy

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Basile B. via Digitalmars-d-learn
On Thursday, 12 May 2022 at 15:31:03 UTC, Steven Schveighoffer wrote: On 5/12/22 11:18 AM, jmh530 wrote: On Thursday, 12 May 2022 at 12:13:32 UTC, Basile B. wrote: [snip] ``` is ( Type : TypeSpecialization , TemplateParameterList ) is ( Type == TypeSpecialization , TemplateParameterList ) is (

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread jmh530 via Digitalmars-d-learn
On Thursday, 12 May 2022 at 15:32:24 UTC, Adam D Ruppe wrote: On Thursday, 12 May 2022 at 15:18:34 UTC, jmh530 wrote: What's the difference between a Type and Type Identifier? The is expression roughly follows variable declaration style. You write int a; to declare a new symbol named `a` of

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Ali Çehreli via Digitalmars-d-learn
On 5/11/22 18:06, Christopher Katko wrote: > Cool useful library functions like sumElement that magically don't work > on static arrays. Yeah, that sometimes gets me as well. Although it is trivial to deal with, the programmer may be surprised by the strange error messages: int[3] arr = [ 1

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Ali Çehreli via Digitalmars-d-learn
On 5/11/22 19:35, zjh wrote: > On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote: >> What are you stuck at? What was the most difficult features to >> understand? etc. >> > > I don't know the progress of `interface to C++`. > I want to use my C++ functions in `d`. That direction is eas

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Ali Çehreli via Digitalmars-d-learn
On 5/12/22 07:28, Guillaume Piolat wrote: > On Thursday, 12 May 2022 at 11:05:08 UTC, Basile B. wrote: >> - Certain variant forms of the `is` Expression are not obvious (not >> intuitive), I'm pretty sure I still cant use them without a quick look >> to the specs. > > That one was a trouble to hea

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, May 12, 2022 at 12:13:32PM +, Basile B. via Digitalmars-d-learn wrote: [...] > Problem is more (from https://dlang.org/spec/expression.html#is_expression) > > ``` > is ( Type : TypeSpecialization , TemplateParameterList ) > is ( Type == TypeSpecialization , TemplateParameterList ) > i

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, May 12, 2022 at 02:42:43PM +, Anonymouse via Digitalmars-d-learn wrote: [...] > The one thing that has caused me most anguish and woe is hands-down > https://issues.dlang.org/show_bug.cgi?id=18026 though. It hasn't bit > me for a while now, but the feeling of uncertainty, that the comp

Re: Creating a custom iota()

2022-05-12 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, May 12, 2022 at 11:57:54AM +, realhet via Digitalmars-d-learn wrote: [...] > I have my own DateTime struct. > It has opCmp() and opBinary(), I can do arithmetic with this custom > DateTime and the amazing time units of the **quantities** package. > > Now I'm about mo make iterations in

Re: Creating a custom iota()

2022-05-12 Thread Ali Çehreli via Digitalmars-d-learn
On 5/12/22 04:57, realhet wrote: > //this would be nicer, but not works > iota(st, en, day).each!writeln; For others, the problem is, iota does have a version that works with user types but not one that parameterizes 'step'. An oversight? > My question is, is there a way to 'extend' t

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Guillaume Piolat via Digitalmars-d-learn
On Thursday, 12 May 2022 at 16:24:26 UTC, Ali Çehreli wrote: Cool trick but "parent" confused me there. I think you mean "base". :) https://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming mentions "base class" as much as "parent class"

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, May 11, 2022 at 06:43:39PM +, Guillaume Piolat via Digitalmars-d-learn wrote: > On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote: > > What are you stuck at? What was the most difficult features to > > understand? etc. > > - How to do deterministic destruction with prog

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, May 12, 2022 at 01:06:02AM +, Christopher Katko via Digitalmars-d-learn wrote: [...] > Cool useful library functions like sumElement that magically don't > work on static arrays. Just slice it with []: int[5] data = [ 1, 2, 3, 4, 5 ]; auto sum = data[].sumElement; Th

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, May 12, 2022 at 09:04:09AM -0700, Ali Çehreli via Digitalmars-d-learn wrote: > On 5/11/22 18:06, Christopher Katko wrote: > > > Cool useful library functions like sumElement that magically don't > > work on static arrays. > > Yeah, that sometimes gets me as well. Although it is trivial t

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Paul Backus via Digitalmars-d-learn
On Thursday, 12 May 2022 at 18:07:05 UTC, H. S. Teoh wrote: On Thu, May 12, 2022 at 09:04:09AM -0700, Ali Çehreli via Digitalmars-d-learn wrote: Error: template `std.algorithm.iteration.sum` cannot deduce function from argument types `!()(int[3])` /usr/include/dlang/dmd/std/algorithm/iteration.

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Anonymouse via Digitalmars-d-learn
On Thursday, 12 May 2022 at 16:48:05 UTC, H. S. Teoh wrote: static foreach isn't meant to handle large loops. Writing `static foreach (i; 0 .. 6)` is generally a bad idea; my suspicion is that the compiler ran out of stack space). It's more for unfolding groups of statements or declaration

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Anonymouse via Digitalmars-d-learn
On Thursday, 12 May 2022 at 15:17:10 UTC, Adam D Ruppe wrote: It is simpler than it looks, I wrote about it in my book and in a post here: https://forum.dlang.org/post/xklcgjaqggihvhctc...@forum.dlang.org "Then commas separate the definitions of each placeholder variable, just as if they we

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Ali Çehreli via Digitalmars-d-learn
On 5/12/22 12:00, Paul Backus wrote: > Good news: starting from DMD 2.099, this error message has been > reworded. Instead of "cannot deduce function...". it now says: > > Error: none of the overloads of template `std.algorithm.iteration.sum` > are callable using argument types `!()(int[3])` Muc

Re: Creating a custom iota()

2022-05-12 Thread ag0aep6g via Digitalmars-d-learn
On Thursday, 12 May 2022 at 17:06:39 UTC, Ali Çehreli wrote: void main() { const st = DateTime(Duration(0)); [...] // (0) I think D should not insist on 'const' // when copying types that have no indirections. // We shouldn't need the cast() below in this case. [...] iota(cast()st,

Re: Creating a custom iota()

2022-05-12 Thread realhet via Digitalmars-d-learn
On Thursday, 12 May 2022 at 16:57:35 UTC, H. S. Teoh wrote: Does your DateTime type support the `++` operator? It can't because I only want to use the quantities.si.Time type to do arithmetic with my DateTime. In my previous DateTime, it was a lot of problem that I was doing math on it's raw

Re: Creating a custom iota()

2022-05-12 Thread Ali Çehreli via Digitalmars-d-learn
On 5/12/22 12:51, ag0aep6g wrote: >> auto iota(B, E, S)(B begin, E end, S step) > [...] >> { >> static struct Result >> { >> B current; > [...] >> void popFront() >> { > [...] >> current += step; >> } >> } > [...] >> } > > Mark iota's `begin

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Chris Katko via Digitalmars-d-learn
On Thursday, 12 May 2022 at 16:04:09 UTC, Ali Çehreli wrote: My view on private has changed over the years. I need to be convinced that there is usage that needs to be protected. :) I don't see people using types freely especially the ones that are in the same module. The only argument for priv

Re: Creating a custom iota()

2022-05-12 Thread realhet via Digitalmars-d-learn
On Thursday, 12 May 2022 at 17:06:39 UTC, Ali Çehreli wrote: I don't care whether it is good practice or not. :) The following is what you meant anyway and seems to work. I restricted the parameter types to the ones I wanted to use. And for the standard iota behavior I used a public import.

Re: Creating a custom iota()

2022-05-12 Thread realhet via Digitalmars-d-learn
On Thursday, 12 May 2022 at 20:12:19 UTC, Ali Çehreli wrote: And I've been thinking 'iota' may not be as suitable as I thought at first. I like the following even more: auto r0 = st .by(Duration(2)) .take(5); So I wrote this by() for my DateTime and then: import

Back to Basics at DConf?

2022-05-12 Thread Ali Çehreli via Digitalmars-d-learn
I am considering proposing a presentation for DConf 2022. Would a "Back to Basics" style presentation be interesting? If, so what exact topic would you like to see? For ideas, here is what CppCon 2021 had on their track: https://cppcon2021.sched.com/?searchstring=Back+to+Basics Ali

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Guillaume Piolat via Digitalmars-d-learn
On Thursday, 12 May 2022 at 17:34:30 UTC, H. S. Teoh wrote: Why is TLS by default a problem? It's not really for optimization, AIUI, it's more for thread safety: module-global state is TLS by default, so you don't accidentally introduce race conditions. What you accidentally have instead is

Re: Back to Basics at DConf?

2022-05-12 Thread forkit via Digitalmars-d-learn
On Thursday, 12 May 2022 at 21:58:33 UTC, Ali Çehreli wrote: I am considering proposing a presentation for DConf 2022. Would a "Back to Basics" style presentation be interesting? If, so what exact topic would you like to see? For ideas, here is what CppCon 2021 had on their track: https://

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Salih Dincer via Digitalmars-d-learn
On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote: What are you stuck at? What was the most difficult features to understand? etc. The concept of traits (std.traits) confuses me enough. Actually the problem is that the interface is disorderly (disorganizedly). As if it was very dif

Re: Back to Basics at DConf?

2022-05-12 Thread Salih Dincer via Digitalmars-d-learn
On Thursday, 12 May 2022 at 21:58:33 UTC, Ali Çehreli wrote: I am considering proposing a presentation for DConf 2022. Would a "Back to Basics" style presentation be interesting? If, so what exact topic would you like to see? There was a book from my childhood. Its name is "Temel Basic", h

Re: Back to Basics at DConf?

2022-05-12 Thread Ali Çehreli via Digitalmars-d-learn
On 5/12/22 18:56, forkit wrote: > So...you want to do a talk that challenges D's complexity, by getting > back to basics? I wasn't thinking about challenging complexity but it gives me ideas. I am looking for concrete topics like templates, classes, ranges, rvalues, etc. Are those interesting?

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread zjh via Digitalmars-d-learn
On Thursday, 12 May 2022 at 20:49:08 UTC, Chris Katko wrote: In D, I can do the module based method, but nothing short of renaming variables gives me a list of violations and, that also makes all the correct internal accesses wrong. Because private doesn't work. Call it whatever keyword you

Re: Back to Basics at DConf?

2022-05-12 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 13 May 2022 at 03:31:53 UTC, Ali Çehreli wrote: On 5/12/22 18:56, forkit wrote: > So...you want to do a talk that challenges D's complexity, by getting > back to basics? I wasn't thinking about challenging complexity but it gives me ideas. I am looking for concrete topics like tem

Re: Back to Basics at DConf?

2022-05-12 Thread Tejas via Digitalmars-d-learn
On Friday, 13 May 2022 at 04:19:26 UTC, Ola Fosheim Grøstad wrote: On Friday, 13 May 2022 at 03:31:53 UTC, Ali Çehreli wrote: On 5/12/22 18:56, forkit wrote: > So...you want to do a talk that challenges D's complexity, by getting > back to basics? I wasn't thinking about challenging complexity

Re: Back to Basics at DConf?

2022-05-12 Thread Tejas via Digitalmars-d-learn
On Friday, 13 May 2022 at 03:31:53 UTC, Ali Çehreli wrote: On 5/12/22 18:56, forkit wrote: > So...you want to do a talk that challenges D's complexity, by getting > back to basics? I wasn't thinking about challenging complexity but it gives me ideas. I am looking for concrete topics like tem

Re: Back to Basics at DConf?

2022-05-12 Thread Ali Çehreli via Digitalmars-d-learn
On 5/12/22 21:41, Tejas wrote: > Or a presentation on ranges can also be good, considering how the de > facto best online article on it(by HS Teoh) is from 2013 I think the best person to give that presentation would be its awesome author. ;) Ali

Re: Back to Basics at DConf?

2022-05-12 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 13 May 2022 at 04:39:46 UTC, Tejas wrote: On Friday, 13 May 2022 at 04:19:26 UTC, Ola Fosheim Grøstad wrote: On Friday, 13 May 2022 at 03:31:53 UTC, Ali Çehreli wrote: On 5/12/22 18:56, forkit wrote: > So...you want to do a talk that challenges D's complexity, > by getting > back

Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-12 Thread MichaelBi via Digitalmars-d-learn
there are online documents of heroku on how to access config var value from code, and several code samples without D. link here: https://devcenter.heroku.com/articles/config-vars#accessing-config-var-values-from-code. i have code here: auto uri = environment.get("MONGODB_URI");

Re: Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-12 Thread rikki cattermole via Digitalmars-d-learn
On 13/05/2022 5:18 PM, MichaelBi wrote:     i have code here:     auto uri = environment.get("MONGODB_URI");     MongoClient conn = connectMongoDB(uri);     MongoDatabase eqpdb = conn.getDatabase("MbEqpHeroku"); the "MONGODB_URI" showed above already put into heroku's app config

Re: Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-12 Thread MichaelBi via Digitalmars-d-learn
On Friday, 13 May 2022 at 05:41:33 UTC, rikki cattermole wrote: On 13/05/2022 5:18 PM, MichaelBi wrote:     i have code here:     auto uri = environment.get("MONGODB_URI");     MongoClient conn = connectMongoDB(uri);     MongoDatabase eqpdb = conn.getDatabase("MbEqpHeroku"); the

Re: Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-12 Thread rikki cattermole via Digitalmars-d-learn
On 13/05/2022 5:52 PM, MichaelBi wrote: struct Camera{ @name("_id") BsonObjectID id; // represented as "_id" in the database string brand; string model; } the structure is mapping of database field structure. how to resolve? That code isn't the cause of your issue (its fine, n

Re: Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-12 Thread MichaelBi via Digitalmars-d-learn
On Friday, 13 May 2022 at 06:01:29 UTC, rikki cattermole wrote: On 13/05/2022 5:52 PM, MichaelBi wrote: struct Camera{ @name("_id") BsonObjectID id; // represented as "_id" in the database string brand; string model; } the structure is mapping of database field structure. how

Re: Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-12 Thread rikki cattermole via Digitalmars-d-learn
Okay that is fine, now we need to see where showData is being called.

Re: Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-12 Thread MichaelBi via Digitalmars-d-learn
On Friday, 13 May 2022 at 06:12:01 UTC, rikki cattermole wrote: Okay that is fine, now we need to see where showData is being called. thanks, here's the code: import vibe.vibe; import std.process; import std.conv : to; void main() { auto settings = new HTTPServerSettings; se

Re: Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-12 Thread rikki cattermole via Digitalmars-d-learn
On 13/05/2022 6:23 PM, MichaelBi wrote:     render!("index.dt", showData()); There ya go, template arguments are run at compile time.

Template shenannigans with multiple datatypes

2022-05-12 Thread Chris Katko via Digitalmars-d-learn
I have an intrinsicGraph(T) class that is given a pointer to a T dataSource and automatically polls that variable every frame to add it to the graph, whether it's a float, double, integer, and maybe bool. This all works fine if you have a single template type. But what if I want ... multiple