digitalmars.D.announce - GoingNative 6: The D Episode with Walter Bright and Andrei Alexandrescu
- Walter Bright (1/1) Feb 21 2012 http://channel9.msdn.com/Shows/C9-GoingNative/GoingNative-6-The-D-Episod...
- Caligo (3/4) Feb 21 2012 Thanks Walter. Thanks Andrei. You too, smiley face.
- Piotr Szturmaj (2/3) Feb 21 2012 Great talk!
- Juan Manuel Cabo (4/6) Feb 21 2012 dUsers ~= (juanManuel);
- Caligo (4/5) Feb 21 2012 I thought GDC was going to be part of GCC 4.7, but Andrei in the video
- Jesse Phillips (3/6) Feb 22 2012 Didn`t have it ready for 4.7 so the work is planned for 4.8, but
- Andrei Alexandrescu (4/5) Feb 21 2012 On reddit:
- Nick Sabalausky (5/6) Feb 21 2012 Great video. It's espcially nice to see an entire one of these videos
- Daniel Murphy (3/4) Feb 22 2012 Sounds like I should finish my extern(C++) branch...
- deadalnix (4/8) Feb 22 2012 Pleaso do ! And ask help if you feel it is needed. I'd be happy to help
- bearophile (9/10) Feb 22 2012 Andrei says that some new languages suffer because they have a poor impl...
- Walter Bright (23/37) Feb 22 2012 Using the JVM forces your program into Java semantics. For example, ther...
- =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= (22/68) Feb 23 2012 I still cannot fathom how the Scala guys thought using the JVM was a
- Walter Bright (4/24) Feb 23 2012 What you're saying is they add support here and there for non-C language...
- Jeff Nowakowski (6/8) Feb 23 2012 It gave them a good garbage collector (an area that has held D's
- =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= (7/16) Feb 23 2012 They could have used the CLI. Both MS.NET and Mono have good garbage
- Andrei Alexandrescu (7/22) Feb 24 2012 I think Scala has positioned itself as a Java replacement with a smooth
- Jeff Nowakowski (9/13) Feb 24 2012 Scala initially ran on .NET, but there was more traction with the Java
- Andrei Alexandrescu (3/9) Feb 24 2012 And still is, unfortunately.
- Andrei Alexandrescu (15/20) Feb 23 2012 I assume you're referring to the point starting around 16:50. I don't
- MattCodr (5/6) Feb 23 2012 You want 1 million users? Simple... is just Andrei start saying
- Andrei Alexandrescu (5/11) Feb 23 2012 Incidentally, we have a diff out as of yesterday that upgrades FB's dmd
- bearophile (19/32) Feb 26 2012 Right, a JVM doesn't give all the freedom needed by a system language.
http://channel9.msdn.com/Shows/C9-GoingNative/GoingNative-6-The-D-Episode-with-Walter-Bright-and-Andrei-Alexandrescu
Feb 21 2012
Thanks Walter. Thanks Andrei. You too, smiley face. On Tue, Feb 21, 2012 at 6:39 PM, Walter Bright <newshound2 digitalmars.com> wrote:http://channel9.msdn.com/Shows/C9-GoingNative/GoingNative-6-The-D-Episode-with-Walter-Bright-and-Andrei-Alexandrescu
Feb 21 2012
Walter Bright wrote:http://channel9.msdn.com/Shows/C9-GoingNative/GoingNative-6-The-D-Episode-with-Walter-Bright-and-Andrei-AlexandrescuGreat talk!
Feb 21 2012
We want to have many users.dUsers ~= (juanManuel); :-) :-) :-) --jm On 02/21/2012 09:39 PM, Walter Bright wrote:http://channel9.msdn.com/Shows/C9-GoingNative/GoingNative-6-The-D-Episode-with-Walter-Bright-and-Andrei-Alexandrescu
Feb 21 2012
I thought GDC was going to be part of GCC 4.7, but Andrei in the video said 4.8. That's another year, :-( On Tue, Feb 21, 2012 at 6:39 PM, Walter Bright <newshound2 digitalmars.com> wrote:http://channel9.msdn.com/Shows/C9-GoingNative/GoingNative-6-The-D-Episode-with-Walter-Bright-and-Andrei-Alexandrescu
Feb 21 2012
On Wednesday, 22 February 2012 at 02:16:31 UTC, Caligo wrote:I thought GDC was going to be part of GCC 4.7, but Andrei in the video said 4.8. That's another year, :-(Didn`t have it ready for 4.7 so the work is planned for 4.8, but still not certain.
Feb 22 2012
On 2/21/12 6:39 PM, Walter Bright wrote:http://channel9.msdn.com/Shows/C9-GoingNative/GoingNative-6-The-D-Episode-with-Walter-Bright-and-Andrei-AlexandrescuOn reddit: http://www.reddit.com/r/programming/comments/q09su/c9goingnative_6_the_d_episode_with_walter_bright/ Andrei
Feb 21 2012
"Walter Bright" <newshound2 digitalmars.com> wrote in message news:ji1dfl$17ha$1 digitalmars.com...http://channel9.msdn.com/Shows/C9-GoingNative/GoingNative-6-The-D-Episode-with-Walter-Bright-and-Andrei-AlexandrescuGreat video. It's espcially nice to see an entire one of these videos dedicated to D, not just a little cameo mention here or there. D's really moving forward. :)
Feb 21 2012
"Walter Bright" <newshound2 digitalmars.com> wrote in message news:ji1dfl$17ha$1 digitalmars.com...http://channel9.msdn.com/Shows/C9-GoingNative/GoingNative-6-The-D-Episode-with-Walter-Bright-and-Andrei-AlexandrescuSounds like I should finish my extern(C++) branch...
Feb 22 2012
Le 22/02/2012 13:58, Daniel Murphy a écrit :"Walter Bright"<newshound2 digitalmars.com> wrote in message news:ji1dfl$17ha$1 digitalmars.com...Pleaso do ! And ask help if you feel it is needed. I'd be happy to help with that for instance (but ATM I'm still struggling to understand dmd source code).http://channel9.msdn.com/Shows/C9-GoingNative/GoingNative-6-The-D-Episode-with-Walter-Bright-and-Andrei-AlexandrescuSounds like I should finish my extern(C++) branch...
Feb 22 2012
Walter:http://channel9.msdn.com/Shows/C9-GoingNative/GoingNative-6-The-D-Episode-with-Walter-Bright-and-Andrei-AlexandrescuAndrei says that some new languages suffer because they have a poor implementation, because creating the base for a language is a lot of work. Today this is issue is much less of a problem, new languages are implemented on the JavaVM, DotNetVM. System languages are implemented with LLVM. And maybe PyPy will be a good base to create efficient dynamic languages quickly: http://tratt.net/laurie/tech_articles/articles/fast_enough_vms_in_fast_enough_time Regarding the comparison between dynamic languages like Python or Ruby and D: what Andrei has said is not fully fair. A simple common scripting task: read the lines of a text file and put them in a hash. This is probably faster in Python compared to D. I am willing to write a benchmark too, if asked. Regarding what Walter has said, that most of the code of D applications will be safe: if safe code gets (or has to get) so common as he says, then it will be good for the D compiler to learn some tricks to avoid (optimize away) array bound tests in some cases. Bye, bearophile
Feb 22 2012
On 2/22/2012 7:51 PM, bearophile wrote:Andrei says that some new languages suffer because they have a poor implementation, because creating the base for a language is a lot of work. Today this is issue is much less of a problem, new languages are implemented on the JavaVM,Using the JVM forces your program into Java semantics. For example, there are no structs in the JVM bytecode. No pointers, either. Nor unsigned types. Your new language is fairly boxed in to being a rehash of Java semantics.DotNetVM.Cristi's D compiler on .NET had large problems because array slicing was not expressible in the .NET intermediate code. It's not nearly as bad as the JVM in that regard, but it's still limited.System languages are implemented with LLVM.That works if your language is expressible as C, because LLVM is a C/C++ back end. If your language has different semantics (like how Go does stacks), using LLVM can be a large problem. Note that early C++ compilers suffered badly when they were forced into using C back ends, because C++ wanted new features (like COMDATs) which are not expressible in C and so not supported by C back ends. Ditto for any language feature that needs something in the back end that C/C++ doesn't need.Regarding the comparison between dynamic languages like Python or Ruby and D: what Andrei has said is not fully fair. A simple common scripting task: read the lines of a text file and put them in a hash. This is probably faster in Python compared to D. I am willing to write a benchmark too, if asked.That would be comparing library code, not language code. Much of Python's implementation is in C, not Python.Regarding what Walter has said, that most of the code of D applications will be safe: if safe code gets (or has to get) so common as he says, then it will be good for the D compiler to learn some tricks to avoid (optimize away) array bound tests in some cases.I looked into this years ago. Very little of array bounds checking can be optimized away. I've been working on optimizers for 25 years now, including a native code generating Java compiler, and I do know a few things about how to do arrays. Clang has some pretty good ideas, like the spell checker on undefined identifiers. But others talked about in the spiel at GoingNative have been in compilers for 30 years.
Feb 22 2012
On 23-02-2012 07:51, Walter Bright wrote:On 2/22/2012 7:51 PM, bearophile wrote:I still cannot fathom how the Scala guys thought using the JVM was a good idea.Andrei says that some new languages suffer because they have a poor implementation, because creating the base for a language is a lot of work. Today this is issue is much less of a problem, new languages are implemented on the JavaVM,Using the JVM forces your program into Java semantics. For example, there are no structs in the JVM bytecode. No pointers, either. Nor unsigned types. Your new language is fairly boxed in to being a rehash of Java semantics.I assume the problem here was the .ptr property? I can't think of anything else about array slices that would be problematic in CIL.DotNetVM.Cristi's D compiler on .NET had large problems because array slicing was not expressible in the .NET intermediate code. It's not nearly as bad as the JVM in that regard, but it's still limited.> System languages are implemented with LLVM. That works if your language is expressible as C, because LLVM is a C/C++ back end. If your language has different semantics (like how Go does stacks), using LLVM can be a large problem.ActionScript, Python, Java, Lua, Haskell, and many others have been compiled with LLVM successfully. LLVM is very much engineered for C and C++, but it has many other features that those languages don't make use of at all (see for example the precise GC support; and this is not even something Apple uses, as their Obj-C GC is conservative). There is also the language-specific support for OCaml's precise stack maps. Also, LLVM has segmented stacks on x86 these days. That said, LLVM is definitely not as easy to use for managed languages as it is for systems/native languages. So, while the design of LLVM certainly is driven by Clang primarily, it's not as if they don't welcome non-C family features.Note that early C++ compilers suffered badly when they were forced into using C back ends, because C++ wanted new features (like COMDATs) which are not expressible in C and so not supported by C back ends. Ditto for any language feature that needs something in the back end that C/C++ doesn't need.In Mono, we found that ABC removal was actually beneficial in some code; consider for example allocating small static arrays locally and indexing them with constants (or very simple expressions).Regarding the comparison between dynamic languages like Python or Ruby and D: what Andrei has said is not fully fair. A simple common scripting task: read the lines of a text file and put them in a hash. This is probably faster in Python compared to D. I am willing to write a benchmark too, if asked.That would be comparing library code, not language code. Much of Python's implementation is in C, not Python.Regarding what Walter has said, that most of the code of D applications will be safe: if safe code gets (or has to get) so common as he says, then it will be good for the D compiler to learn some tricks to avoid (optimize away) array bound tests in some cases.I looked into this years ago. Very little of array bounds checking can be optimized away. I've been working on optimizers for 25 years now, including a native code generating Java compiler, and I do know a few things about how to do arrays.Clang has some pretty good ideas, like the spell checker on undefined identifiers. But others talked about in the spiel at GoingNative have been in compilers for 30 years.-- - Alex
Feb 23 2012
On 2/23/2012 8:57 AM, Alex Rønne Petersen wrote:What you're saying is they add support here and there for non-C languages, meaning someone has to do it if it isn't there already.Python, Java, Lua, Haskell, and many others have been compiled with LLVM successfully. LLVM is very much engineered for C and C++, but it has many other features that those languages don't make use of at all (see for example the precise GC support; and this is not even something Apple uses, as their Obj-C GC is conservative). There is also the language-specific support for OCaml's precise stack maps. Also, LLVM has segmented stacks on x86 these days. That said, LLVM is definitely not as easy to use for managed languages as it is for systems/native languages. So, while the design of LLVM certainly is driven by Clang primarily, it's not as if they don't welcome non-C family features.System languages are implemented with LLVM.That works if your language is expressible as C, because LLVM is a C/C++ back end. If your language has different semantics (like how Go does stacks), using LLVM can be a large problem.In Mono, we found that ABC removal was actually beneficial in some code; consider for example allocating small static arrays locally and indexing them with constants (or very simple expressions).This is done already by standard data flow optimization techniques.
Feb 23 2012
On 02/23/2012 11:57 AM, Alex Rønne Petersen wrote:I still cannot fathom how the Scala guys thought using the JVM was a good idea.It gave them a good garbage collector (an area that has held D's performance back for years), a large library via Java compatibility, and a population of users to appeal to. Scala probably wouldn't have succeeded if it was just another object-oriented language without ties to the JVM.
Feb 23 2012
On 24-02-2012 05:06, Jeff Nowakowski wrote:On 02/23/2012 11:57 AM, Alex Rønne Petersen wrote:They could have used the CLI. Both MS.NET and Mono have good garbage collectors, and Mono in particular has SIMD intrinsics, an LLVM back end, etc. I've heard a lot of people complain that Scala doesn't run on .NET. -- - AlexI still cannot fathom how the Scala guys thought using the JVM was a good idea.It gave them a good garbage collector (an area that has held D's performance back for years), a large library via Java compatibility, and a population of users to appeal to. Scala probably wouldn't have succeeded if it was just another object-oriented language without ties to the JVM.
Feb 23 2012
On 2/23/12 11:09 PM, Alex Rønne Petersen wrote:On 24-02-2012 05:06, Jeff Nowakowski wrote:I think Scala has positioned itself as a Java replacement with a smooth transition. The JVM works on more platforms than .NET so there was a simple argument by numbers to be made. Probably most importantly, Odersky already was a Java expert motivated by needs and desires on that particular platform. AndreiOn 02/23/2012 11:57 AM, Alex Rønne Petersen wrote:They could have used the CLI. Both MS.NET and Mono have good garbage collectors, and Mono in particular has SIMD intrinsics, an LLVM back end, etc. I've heard a lot of people complain that Scala doesn't run on .NET.I still cannot fathom how the Scala guys thought using the JVM was a good idea.It gave them a good garbage collector (an area that has held D's performance back for years), a large library via Java compatibility, and a population of users to appeal to. Scala probably wouldn't have succeeded if it was just another object-oriented language without ties to the JVM.
Feb 24 2012
On 02/24/2012 12:09 AM, Alex Rønne Petersen wrote:They could have used the CLI. Both MS.NET and Mono have good garbage collectors, and Mono in particular has SIMD intrinsics, an LLVM back end, etc. I've heard a lot of people complain that Scala doesn't run on .NET.Scala initially ran on .NET, but there was more traction with the Java crowd, so they stopped supporting it. As I understand it, .NET support has recently been funded by Microsoft and is actively being worked on. There was, and still is, a much greater need for Scala on the JVM than getting big improvements. As for Mono, there's a lot of mistrust against following Microsoft's lead from the Linux crowd. So while there's some interest in Scala on .NET, it pales in comparison to the JVM.
Feb 24 2012
On 2/23/12 10:06 PM, Jeff Nowakowski wrote:On 02/23/2012 11:57 AM, Alex Rønne Petersen wrote:And still is, unfortunately. AndreiI still cannot fathom how the Scala guys thought using the JVM was a good idea.It gave them a good garbage collector (an area that has held D's performance back for years)
Feb 24 2012
On 2/22/12 9:51 PM, bearophile wrote:Regarding the comparison between dynamic languages like Python or Ruby and D: what Andrei has said is not fully fair. A simple common scripting task: read the lines of a text file and put them in a hash. This is probably faster in Python compared to D.I assume you're referring to the point starting around 16:50. I don't see how fairness is an issue here. Anyway, the point there is that in my experience performance of short scripts in dynamic languages generally decays quickly when things get interesting. Of course, it comes without saying that choosing one particular script that exercises a very small, well-honed area of a toolchain and that is essentially dominated by library calls may show excellent performance of a scripting language.I am willing to write a benchmark too, if asked.What would be better would be investigating what particular aspects of D we could improve (and better yet, contribute the improvements themselves). If one were to corroborate this post with this other one: http://forum.dlang.org/post/jhn1ub$2tni$1 digitalmars.com the conclusion is there's a conspiracy afoot targeted at sabotaging D scripting :o). Andrei
Feb 23 2012
On Wednesday, 22 February 2012 at 00:39:17 UTC, Walter Bright wrote:http://channel9.msdn.com/Shows/C9-GoingNative/GoingNative-6-The-D-Episode-with-Walter-Bright-and-Andrei-AlexandrescuYou want 1 million users? Simple... is just Andrei start saying that he use D on FB and you will get it 10 millions instantly ! :D Overall it's was a great Episode and you're on the right track.
Feb 23 2012
On 2/23/12 6:22 AM, MattCodr wrote:On Wednesday, 22 February 2012 at 00:39:17 UTC, Walter Bright wrote:Incidentally, we have a diff out as of yesterday that upgrades FB's dmd installation to 2.058. Things are set up and interest does exist, but there's no actual use of D at Facebook yet. Andreihttp://channel9.msdn.com/Shows/C9-GoingNative/GoingNative-6-The-D-Episode-with-Walter-Bright-and-Andrei-AlexandrescuYou want 1 million users? Simple... is just Andrei start saying that he use D on FB and you will get it 10 millions instantly ! :D Overall it's was a great Episode and you're on the right track.
Feb 23 2012
Sorry for the slow reply, I was busy. Walter:Using the JVM forces your program into Java semantics.Right, a JVM doesn't give all the freedom needed by a system language.For example, there are no structs in the JVM bytecode. No pointers, either. Nor unsigned types.The little emscripten compiler compiles LLVM "bytecode" (IR code) to JavaScript, and despite JavaScript has no structs, it's able to compile them efficiently, lowering each one of them to a bunch of single variables. The result seems efficient enough (taking into account the target language is JS): https://github.com/kripken/emscripten This can't be used to return structs from a function, but I think allows to avoid few heap allocations (when the struct is a function argument, or it's used locally. The Oracle JavaVM nowadays performs escape analysis, I presume with similar effects). Despite there are no unsigned integers in the JVM, something is moving: https://blogs.oracle.com/darcy/entry/unsigned_apiYour new language is fairly boxed in to being a rehash of Java semantics.The semantics of languages like Jruby and Scala are different from Java semantics. Scala type system is not comparable to Java one. But I understand what you are saying. I think there is more than one meaning for "language semantics".That works if your language is expressible as C, because LLVM is a C/C++ back end. If your language has different semantics (like how Go does stacks), using LLVM can be a large problem.LLVM is not infinitely flexible, I agree. But LLVM is already quite wide and growing. So even for strange languages LLVM seems able to implement a large percentage of the semantics out of the box. Recently they have implemented a Haskell back-end using LLVM and it was not able to implement everything needed. So the Haskell devs have written a small patch (2000 lines or so), to implement the missing semantics and the LLVM have added it to the main LLVM code. In the discussion Andrei was talking about the amount of code needed to implement the efficient base of a new language. Even if LLVM is sometimes not able to implement 100% of the semantics of your code, I think writing just the few missing parts reduces the work needed a lot.I looked into this years ago. Very little of array bounds checking can be optimized away.This paper (that's about Java) shows nice results in terms of percentage of array bound checks eliminated (but as expected the speedup is visible only on code that uses array heavily, like scientific-style code): http://ssw.jku.at/Research/Papers/Wuerthinger07/ So there are any low-hanging fruits here?I've been working on optimizers for 25 years now, including a native code generating Java compiler, and I do know a few things about how to do arrays.You are one of my few programming heroes :-) But there's always some more to invent and learn.Clang has some pretty good ideas, like the spell checker on undefined identifiers.This is another idea I'd like in D: http://d.puremagic.com/issues/show_bug.cgi?id=5004 Bye, bearophile
Feb 26 2012