Re: Compile time metaprogramming
On Sat, 03 Dec 2011 10:26:09 +0100, David Nadlinger s...@klickverbot.at wrote: On 12/3/11 1:43 AM, simendsjo wrote: On 02.12.2011 23:28, Jonathan M Davis wrote: There's also been at least a couple of cases where people have worked on unit libraries and discussed them in the main newsgroup, but so far, nothing has gotten to the point where it's been reviewed for introduction to Phobos, and I don't know if any of those projects is still alive. It would definitely be an asset though. I seem to remember someone wanting to work on a library for GSoC and that he would work on it even if it wasn't accepted. I might remember wrong, and the person might have left the project. That was Cristi Cobzarenco, but he then proposed a different project, linear algebra stuff [1], which he ended up working on because I already had a more or less working implementation of an units library lying around: [2]. I posted my project to the NG, and there seemed to actually be two or three people interested in it, but I didn't submit it to formal review yet, because it sometimes breaks in interesting ways due to compiler bugs (issue 3467 [3] and the likes), and I had enough work to do for my own GSoC project anyway. I, for one, wholeheartedly support the inclusion of this in Phobos. Oh, and Walter's reply to #3467 is scary. I hope he comes around to seeing he's not making sense.
Re: Compile time metaprogramming
On 12/3/11 1:43 AM, simendsjo wrote: On 02.12.2011 23:28, Jonathan M Davis wrote: There's also been at least a couple of cases where people have worked on unit libraries and discussed them in the main newsgroup, but so far, nothing has gotten to the point where it's been reviewed for introduction to Phobos, and I don't know if any of those projects is still alive. It would definitely be an asset though. I seem to remember someone wanting to work on a library for GSoC and that he would work on it even if it wasn't accepted. I might remember wrong, and the person might have left the project. That was Cristi Cobzarenco, but he then proposed a different project, linear algebra stuff [1], which he ended up working on because I already had a more or less working implementation of an units library lying around: [2]. I posted my project to the NG, and there seemed to actually be two or three people interested in it, but I didn't submit it to formal review yet, because it sometimes breaks in interesting ways due to compiler bugs (issue 3467 [3] and the likes), and I had enough work to do for my own GSoC project anyway. David [1] http://www.google-melange.com/gsoc/project/google/gsoc2011/cristicbz/36001 [2] http://klickverbot.at/code/units/ [3] http://d.puremagic.com/issues/show_bug.cgi?id=3467
Re: Compile time metaprogramming
David, to be frank, your code is already useful! Something is better than *nothing*! I hope you or someone else will continue with these two modules, and include them in Phobos.
Re: Compile time metaprogramming
On 03.12.2011 10:26, David Nadlinger wrote: I posted my project to the NG, and there seemed to actually be two or three people interested in it, but I didn't submit it to formal review yet, because it sometimes breaks in interesting ways due to compiler bugs (issue 3467 [3] and the likes), and I had enough work to do for my own GSoC project anyway. Seems one of your bugs recently got a pull request: https://github.com/D-Programming-Language/dmd/pull/449 Gotta love the move to github!
Re: Compile time metaprogramming
On 12/3/11 1:49 PM, simendsjo wrote: Seems one of your bugs recently got a pull request: https://github.com/D-Programming-Language/dmd/pull/449 I'm aware of that, though Walter apparently still thinks it's okay for foo!3u and foo!3 to be different things given »template foo(uint u)«… David
Re: Compile time metaprogramming
On Friday, December 02, 2011 22:00:44 simendsjo wrote: I had a little talk with one of my teachers regarding the culprits of wrong unit assumptions in code (http://mars.jpl.nasa.gov/msp98/news/mco990930.html). We had a little different views on how much pain it would be for developers to code using an SI library, so I hacked together a small proof-of-concept in D to show how D's metaprogramming could make things a lot less painful than, say, Java. I thought I could share it here too even though it's just a small hack with Norwegian comments. A unit library is definitely a great place for taking advantage of templates - that's what core.time and std.datetime do with time units (e.g. dur!seconds(5)). There's also been at least a couple of cases where people have worked on unit libraries and discussed them in the main newsgroup, but so far, nothing has gotten to the point where it's been reviewed for introduction to Phobos, and I don't know if any of those projects is still alive. It would definitely be an asset though. - Jonathan M Davis
Re: Compile time metaprogramming
On 02.12.2011 23:28, Jonathan M Davis wrote: There's also been at least a couple of cases where people have worked on unit libraries and discussed them in the main newsgroup, but so far, nothing has gotten to the point where it's been reviewed for introduction to Phobos, and I don't know if any of those projects is still alive. It would definitely be an asset though. I seem to remember someone wanting to work on a library for GSoC and that he would work on it even if it wasn't accepted. I might remember wrong, and the person might have left the project.