Re: My first email to Walter, ever

2013-07-07 Thread Andrej Mitrovic
On 7/7/13, Andrei Alexandrescu wrote: > While doing some unrelated research I stumbled upon my very first email > to Walter, dated April 26, 2004. That's a cool teaser, but how did the discussion continue? :)

Re: My first email to Walter, ever

2013-07-07 Thread Marco Leise
Am Sat, 06 Jul 2013 20:02:16 -0700 schrieb Andrei Alexandrescu : > > * The venerable typeof check > > * For a class, enumerate all of its members, and figure out their > > attributes (protection level, static or not, type...) check > > * For a module/namespace, enumerate all of its symbols and

Re: My first email to Walter, ever

2013-07-07 Thread Peter Alexander
On Sunday, 7 July 2013 at 03:03:03 UTC, Andrei Alexandrescu wrote: Terrible. If you have conditionals, iteration, functions, and objects in D's straight programming support, you should have conditionals, iteration, functions, and objects in D's metalanguage. :-( template allSatisfy(alias F,

Re: My first email to Walter, ever

2013-07-07 Thread Xinok
On Sunday, 7 July 2013 at 03:03:03 UTC, Andrei Alexandrescu wrote: On 4/26/04 6:54 PM, Andrei Alexandrescu wrote: I was bitching to myself and then together with a friend (e-meet [...]) about how hard it is to do metaprogramming in C++. He mentioned D is much better at it, and we browsed the on

Re: My first email to Walter, ever

2013-07-07 Thread John Colvin
On Sunday, 7 July 2013 at 12:27:02 UTC, Peter Alexander wrote: On Sunday, 7 July 2013 at 03:03:03 UTC, Andrei Alexandrescu wrote: Terrible. If you have conditionals, iteration, functions, and objects in D's straight programming support, you should have conditionals, iteration, functions, and o

Re: My first email to Walter, ever

2013-07-07 Thread Timon Gehr
On 07/07/2013 02:27 PM, Peter Alexander wrote: ... We're almost there with CTFE, but CTFE can only run functions that could run at runtime. In a crazy world where types were first class objects, stuff like this would be feasible. Or perhaps we just need a compile-time metalanguage that allows th

Re: My first email to Walter, ever

2013-07-07 Thread Artur Skawina
On 07/07/13 14:27, Peter Alexander wrote: > template allSatisfy(alias F, T...) > { > static if (T.length == 0) > { > enum allSatisfy = true; > } > else static if (T.length == 1) > { > enum allSatisfy = F!(T[0]); > } > else > { > enum allSatisf

Re: My first email to Walter, ever

2013-07-07 Thread Andrej Mitrovic
On 7/7/13, Peter Alexander wrote: > Still looks like half-assed functional programming to me. Yep I agree. > Where's the iteration? Why can't I write this? > > template allSatisfy(alias F, T...) { > foreach(t; T) > if (!F!(t)) > return false; > return true; > } A

Re: My first email to Walter, ever

2013-07-07 Thread Peter Alexander
On Sunday, 7 July 2013 at 13:20:14 UTC, Timon Gehr wrote: On 07/07/2013 02:27 PM, Peter Alexander wrote: ... We're almost there with CTFE, but CTFE can only run functions that could run at runtime. In a crazy world where types were first class objects, stuff like this would be feasible. Or p

A very basic blog about D

2013-07-07 Thread John Colvin
I had some free time so I decided I should start a simple blog about D, implementing some unix utilities. I've (unsurprisingly) started with echo. http://foreach-hour-life.blogspot.co.uk/ It's nothing ground-breaking, but every little helps :)

Re: A very basic blog about D

2013-07-07 Thread Andrei Alexandrescu
On 7/7/13 8:00 AM, John Colvin wrote: I had some free time so I decided I should start a simple blog about D, implementing some unix utilities. I've (unsurprisingly) started with echo. http://foreach-hour-life.blogspot.co.uk/ It's nothing ground-breaking, but every little helps :) Nice idea!

Re: A very basic blog about D

2013-07-07 Thread Andrei Alexandrescu
On 7/7/13 8:55 AM, Andrei Alexandrescu wrote: Here's a conformant implementation for reference: http://www.scs.stanford.edu/histar/src/pkg/echo/echo.c Hmm, that's actually not so good, it doesn't ensure that I/O was successful. Anyhow, here's a possibility: import std.stdout; void main(strin

Re: A very basic blog about D

2013-07-07 Thread John Colvin
On Sunday, 7 July 2013 at 15:55:31 UTC, Andrei Alexandrescu wrote: On 7/7/13 8:00 AM, John Colvin wrote: I had some free time so I decided I should start a simple blog about D, implementing some unix utilities. I've (unsurprisingly) started with echo. http://foreach-hour-life.blogspot.co.uk/

Re: A very basic blog about D

2013-07-07 Thread John Colvin
On Sunday, 7 July 2013 at 16:06:43 UTC, Andrei Alexandrescu wrote: On 7/7/13 8:55 AM, Andrei Alexandrescu wrote: Here's a conformant implementation for reference: http://www.scs.stanford.edu/histar/src/pkg/echo/echo.c Hmm, that's actually not so good, it doesn't ensure that I/O was successful

Re: A very basic blog about D

2013-07-07 Thread Andrei Alexandrescu
On 7/7/13 10:08 AM, John Colvin wrote: On Sunday, 7 July 2013 at 16:06:43 UTC, Andrei Alexandrescu wrote: On 7/7/13 8:55 AM, Andrei Alexandrescu wrote: Here's a conformant implementation for reference: http://www.scs.stanford.edu/histar/src/pkg/echo/echo.c Hmm, that's actually not so good, it

Re: My first email to Walter, ever

2013-07-07 Thread Nick Sabalausky
On Sun, 07 Jul 2013 15:23:03 +0200 Artur Skawina wrote: > > template allSatisfy(alias F, T...) { >enum allSatisfy = { > foreach (E; T) > if (!F!E) > return false; > return true; >}(); > } > > // And no, it isn't perfect. But not /that/ much is missing. >

Re: A very basic blog about D

2013-07-07 Thread Leandro Lucarella
Andrei Alexandrescu, el 7 de July a las 09:06 me escribiste: > On 7/7/13 8:55 AM, Andrei Alexandrescu wrote: > >Here's a conformant implementation for reference: > >http://www.scs.stanford.edu/histar/src/pkg/echo/echo.c > > Hmm, that's actually not so good, it doesn't ensure that I/O was > succes

Re: My first email to Walter, ever

2013-07-07 Thread QAston
On Sunday, 7 July 2013 at 12:27:02 UTC, Peter Alexander wrote: On Sunday, 7 July 2013 at 03:03:03 UTC, Andrei Alexandrescu wrote: Terrible. If you have conditionals, iteration, functions, and objects in D's straight programming support, you should have conditionals, iteration, functions, and o

Re: A very basic blog about D

2013-07-07 Thread John Colvin
On Sunday, 7 July 2013 at 20:08:19 UTC, Leandro Lucarella wrote: Andrei Alexandrescu, el 7 de July a las 09:06 me escribiste: On 7/7/13 8:55 AM, Andrei Alexandrescu wrote: >Here's a conformant implementation for reference: >http://www.scs.stanford.edu/histar/src/pkg/echo/echo.c Hmm, that's act

Re: My first email to Walter, ever

2013-07-07 Thread Walter Bright
On 7/7/2013 5:09 AM, Andrej Mitrovic wrote: On 7/7/13, Andrei Alexandrescu wrote: While doing some unrelated research I stumbled upon my very first email to Walter, dated April 26, 2004. That's a cool teaser, but how did the discussion continue? :) Generally along these lines: "And you, S

GDC D2 port status

2013-07-07 Thread Iain Buclaw
Not sure this is common knowledge, as am still getting questions / propositions off people for this. Through collaboration of the gcc maintainers at Debian/Ubuntu, gdc has been merged in with the gcc source package, and is available for all architectures supported by Debian (albeit, with the m

Re: GDC D2 port status

2013-07-07 Thread F i L
Awesome! Would be great to see on the official Arch repos! :)

Re: My first email to Walter, ever

2013-07-07 Thread deadalnix
On Sunday, 7 July 2013 at 03:03:03 UTC, Andrei Alexandrescu wrote: * And if you really want to go meta, define metacode that can take an AST node as a parameter and can visit the AST and figure out what each node is. That would allow things such as loop fusion and other advanced stuff. But for