Thread overview | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
January 27, 2009 Descent 0.5.4 released | ||||
---|---|---|---|---|
| ||||
The Descent plugin for Eclipse provides an IDE for writing, launching and debugging code in D. Explanations on how to get it from within Eclipse are here: http://www.dsource.org/projects/descent New features: - Compile-time view (Window -> Show View -> Other -> D -> Compile-time View): allows you to see things from the compiler point of view, which applies some transformations to the source code. For example you can see what happens when you do a foreach, when you invoke an "extension method", when you do operator overloading; know what type has an auto variable; how struct fields are accessed?; compiler optimizations. It also removes conditionals that evaluate to false, and shows the results of mixins in-place. As always, this is far from perfect and a lot of things can be improved. For the lazies, I'll later upload a video about this. :-) - Now hovering over a mixin (over the "mixin" keyword) shows it's result in a popup. - Now hovering over a function or template instance with ctrl+shift shows it's compile-time result (with shift only: it's source code). - Added code templates for operator overloading, so that you don't have to remember all those names. Try them by typing "op" and pressing ctrl+space. - Fixed ticket #160: new completion proposals: "classinfo" and "outer" (when available) are shown for classes. "ptr" and "funcptr" are shown for delegates. Please note that most of these features are experimental. (the compile-time view is mostly useful to experiment with small cases to see what the compiler is doing, like for example if you write "auto x = [1, 2, 3];", to see what type the compiler gives to x) I also fixed the problem with the last version: I accidentally introduced a dependency with JDT and that was causing the problems most of you had, so in this version this dependency was removed and updating should work as usual. Any suggestion, critic or bug report is welcome. You can use: - the forums: http://www.dsource.org/forums/viewforum.php?f=107 - trac: http://www.dsource.org/projects/descent/report?action=new - irc: at freenode, #d.descent Enjoy! |
January 27, 2009 Re: Descent 0.5.4 released | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ary Borenszweig | Ary Borenszweig pisze: > The Descent plugin for Eclipse provides an IDE for writing, launching and debugging code in D. > > Explanations on how to get it from within Eclipse are here: > > http://www.dsource.org/projects/descent > (...) > Enjoy! You are doing really great job with Descent. Thanks for your work! BR Marcin Kuszczak (aarti_pl) |
January 27, 2009 Re: Descent 0.5.4 released | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ary Borenszweig | Ary Borenszweig wrote: > The Descent plugin for Eclipse provides an IDE for writing, launching and debugging code in D. > > Explanations on how to get it from within Eclipse are here: > > http://www.dsource.org/projects/descent > > New features: > - Compile-time view (Window -> Show View -> Other -> D -> Compile-time View): allows you to see things from the compiler point of view, which applies some transformations to the source code. For example you can see what happens when you do a foreach, when you invoke an "extension method", when you do operator overloading; know what type has an auto variable; how struct fields are accessed?; compiler optimizations. It also removes conditionals that evaluate to false, and shows the results of mixins in-place. As always, this is far from perfect and a lot of things can be improved. For the lazies, I'll later upload a video about this. :-) Here's the video! http://www.youtube.com/watch?v=oAhrFQVnsrY :-) |
January 27, 2009 Re: Descent 0.5.4 released | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ary Borenszweig Attachments: | Ary Borenszweig wrote: > New features: > - Compile-time view (Window -> Show View -> Other -> D -> Compile-time > View): allows you to see things from the compiler point of view, which > applies some transformations to the source code. For example you can see > what happens when you do a foreach, when you invoke an "extension > method", when you do operator overloading; know what type has an auto > variable; how struct fields are accessed?; compiler optimizations. It > also removes conditionals that evaluate to false, and shows the results > of mixins in-place. As always, this is far from perfect and a lot of > things can be improved. For the lazies, I'll later upload a video about > this. :-) I've found one limitation of this, and it's a really weird one. It seems that some combination of a double-quoted string inside a backtick-quoted string in a statement under a static if causes this to fall over and break it's legs. The CT window just shows stuff like this: > !descent.core.dom.CompilationUnit@17c858d I've attached the smallest test case I was able to make; hope it helps, because this is just about the BEST thing ever. As someone who makes heavy use of meta-programming, this is fantastic. Incidentally, the backtick-quoted string seems to make the editor VERY confused; try starting a `` literal, and pressing Enter inside. Now imagine trying to write a big code mixin like that... > - Now hovering over a mixin (over the "mixin" keyword) shows it's > result in a popup. *Glee* > - Now hovering over a function or template instance with ctrl+shift > shows it's compile-time result (with shift only: it's source code). Indeed, it does! This is SO awesome; now I don't have to muck about with pragma(msg,...) and compile-time formatting to check and make sure I'm not feeding the compiler garbage. > [snip] > > Enjoy! I've never been big on IDEs; I never felt that they had enough advantages over a plain text editor to make up for the slowness and restrictions. But this is just so freaking awesome, I'm seriously considering moving over to Descent for my D development. It's just a pity I can't have my Vim editing commands, too :P -- Daniel |
January 27, 2009 Re: Descent 0.5.4 released | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ary Borenszweig | How wonderful, thank you VERY much! OT: I've found eclipse 3.4.x under 64-bit linux less than stable with descent, but the 3.5 stream release works pretty good so far. |
January 27, 2009 Re: Descent 0.5.4 released | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ary Borenszweig | On Tue, Jan 27, 2009 at 10:46 AM, Ary Borenszweig <ary@esperanto.org.ar> wrote:
> Here's the video!
>
> http://www.youtube.com/watch?v=oAhrFQVnsrY
I kind of just exploded a little watching that. Some of my brain is coming out.
|
January 27, 2009 Re: Descent 0.5.4 released | ||||
---|---|---|---|---|
| ||||
On Tue, Jan 27, 2009 at 12:05 PM, Jarrett Billingsley <jarrett.billingsley@gmail.com> wrote: > On Tue, Jan 27, 2009 at 10:46 AM, Ary Borenszweig <ary@esperanto.org.ar> wrote: >> Here's the video! >> >> http://www.youtube.com/watch?v=oAhrFQVnsrY > > I kind of just exploded a little watching that. Some of my brain is coming out. > In a good way, of course. |
January 27, 2009 Re: Descent 0.5.4 released | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daniel Keep | Daniel Keep wrote: > > Ary Borenszweig wrote: >> New features: >> - Compile-time view (Window -> Show View -> Other -> D -> Compile-time >> View): allows you to see things from the compiler point of view, which >> applies some transformations to the source code. For example you can see >> what happens when you do a foreach, when you invoke an "extension >> method", when you do operator overloading; know what type has an auto >> variable; how struct fields are accessed?; compiler optimizations. It >> also removes conditionals that evaluate to false, and shows the results >> of mixins in-place. As always, this is far from perfect and a lot of >> things can be improved. For the lazies, I'll later upload a video about >> this. :-) > > I've found one limitation of this, and it's a really weird one. It > seems that some combination of a double-quoted string inside a > backtick-quoted string in a statement under a static if causes this to > fall over and break it's legs. The CT window just shows stuff like this: > >> !descent.core.dom.CompilationUnit@17c858d > > I've attached the smallest test case I was able to make; hope it helps, > because this is just about the BEST thing ever. As someone who makes > heavy use of meta-programming, this is fantastic. > > Incidentally, the backtick-quoted string seems to make the editor VERY > confused; try starting a `` literal, and pressing Enter inside. Now > imagine trying to write a big code mixin like that... > >> - Now hovering over a mixin (over the "mixin" keyword) shows it's >> result in a popup. > > *Glee* > >> - Now hovering over a function or template instance with ctrl+shift >> shows it's compile-time result (with shift only: it's source code). > > Indeed, it does! This is SO awesome; now I don't have to muck about > with pragma(msg,...) and compile-time formatting to check and make sure > I'm not feeding the compiler garbage. > >> [snip] >> >> Enjoy! > > I've never been big on IDEs; I never felt that they had enough > advantages over a plain text editor to make up for the slowness and > restrictions. > > But this is just so freaking awesome, I'm seriously considering moving > over to Descent for my D development. It's just a pity I can't have my > Vim editing commands, too :P > > -- Daniel > Wow! Thanks for the joyful answer, Daniel. :-) The attachment you sent doesn't compile, it gives a syntax error in the mixed content for the IsExpression (only a type is allowed, not "this."). Anyway, I'll change the "!descent.core.dom.CompilationUnit@17c858d" message to something like "Module foo has syntax or semantic errors due to mixins". |
January 27, 2009 Re: Descent 0.5.4 released | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ary Borenszweig | Getting the results of a mixin doesn't seem to work if a function is used: mixin (mixinLuaRegisterFunction ("L", "simpleFunction", "mylib.func")); public static istring mixinLuaPushFunction (cstring lua_state, cstring name) { return cast(istring) (`mixin (mixinLuaPushFunctionAtLine ("` ~ lua_state ~ `", "` ~ name ~ `", __LINE__));`); } |
January 27, 2009 Re: Descent 0.5.4 released | ||||
---|---|---|---|---|
| ||||
Posted in reply to Trass3r | Trass3r wrote:
> Getting the results of a mixin doesn't seem to work if a function is used:
>
> mixin (mixinLuaRegisterFunction ("L", "simpleFunction", "mylib.func"));
>
> public static istring mixinLuaPushFunction (cstring lua_state, cstring name)
> {
> return cast(istring) (`mixin (mixinLuaPushFunctionAtLine ("` ~ lua_state ~ `", "` ~ name ~ `", __LINE__));`);
> }
I tried this:
---
mixin(defineInt("bar"));
char[] defineInt(char[] name) {
return "int " ~ name ~ ";";
}
---
and it fails, but it also fails under DMD (1 and 2). If I change the order:
---
char[] defineInt(char[] name) {
return "int " ~ name ~ ";";
}
mixin(defineInt("bar"));
---
it works both in DMD and Descent.
Also, I see some istring and cstring. If you are using D2 it is more likely that it won't work, because D2 is still not fully ported to Descent.
|
Copyright © 1999-2021 by the D Language Foundation