January 29, 2009
Extrawurst wrote:
> 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. :-)
>>  - 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!
> 
> Since the version 0.5.4.20090129 is available through the update manager  updating fails with:
> 
> An error occurred while collecting items to be installed
>   Problems downloading artifact: osgi.bundle,descent.ui,0.5.4.20090127.
>     Exception connecting to http://downloads.dsource.org/projects/descent/update-site/plugins/descent.ui_0.5.4.20090127.jar. 
> 
> 
> http://downloads.dsource.org/projects/descent/update-site/plugins/descent.ui_0.5.4.20090127.jar 
> 
>     Exception connecting to http://downloads.dsource.org/projects/descent/update-site/plugins/descent.ui_0.5.4.20090127.jar. 
> 
> 
> http://downloads.dsource.org/projects/descent/update-site/plugins/descent.ui_0.5.4.20090127.jar 
> 

i think the feature.xml inside the updated plugin package needs to be updated to the new jar files.
January 29, 2009
Extrawurst wrote:
> Extrawurst wrote:
>> 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. :-)
>>>  - 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!
>>
>> Since the version 0.5.4.20090129 is available through the update manager  updating fails with:
>>
>> An error occurred while collecting items to be installed
>>   Problems downloading artifact: osgi.bundle,descent.ui,0.5.4.20090127.
>>     Exception connecting to http://downloads.dsource.org/projects/descent/update-site/plugins/descent.ui_0.5.4.20090127.jar. 
>>
>>
>> http://downloads.dsource.org/projects/descent/update-site/plugins/descent.ui_0.5.4.20090127.jar 
>>
>>     Exception connecting to http://downloads.dsource.org/projects/descent/update-site/plugins/descent.ui_0.5.4.20090127.jar. 
>>
>>
>> http://downloads.dsource.org/projects/descent/update-site/plugins/descent.ui_0.5.4.20090127.jar 
>>
> 
> i think the feature.xml inside the updated plugin package needs to be updated to the new jar files.

Yes, I don't know what happened.

Can you try to update now? I think I fixed it.
January 29, 2009
Ary Borenszweig wrote:
> Extrawurst wrote:
>> Extrawurst wrote:
>>> 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. :-)
>>>>  - 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!
>>>
>>> Since the version 0.5.4.20090129 is available through the update manager  updating fails with:
>>>
>>> An error occurred while collecting items to be installed
>>>   Problems downloading artifact: osgi.bundle,descent.ui,0.5.4.20090127.
>>>     Exception connecting to http://downloads.dsource.org/projects/descent/update-site/plugins/descent.ui_0.5.4.20090127.jar. 
>>>
>>>
>>> http://downloads.dsource.org/projects/descent/update-site/plugins/descent.ui_0.5.4.20090127.jar 
>>>
>>>     Exception connecting to http://downloads.dsource.org/projects/descent/update-site/plugins/descent.ui_0.5.4.20090127.jar. 
>>>
>>>
>>> http://downloads.dsource.org/projects/descent/update-site/plugins/descent.ui_0.5.4.20090127.jar 
>>>
>>
>> i think the feature.xml inside the updated plugin package needs to be updated to the new jar files.
> 
> Yes, I don't know what happened.
> 
> Can you try to update now? I think I fixed it.

works now, thanks.
January 29, 2009
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. 

> It also removes conditionals that evaluate to false, and shows the results of mixins in-place. 

You've sold me. Finally, a reason to use an IDE!
Totally awesome.
January 29, 2009
Ary Borenszweig Wrote:

> Jason House escribió:
> > Ary Borenszweig wrote:
> > 
> >> New features:
> >>   - Compile-time view
> > 
> > This is a great feature that I've been looking forward to.
> > When playing around with this, I noticed a few things that seemed odd to me.  They may be normal/expected if I understood the better how the front end/descent works.
> > 1. derr.writefln("foo") is translated as 1("foo")
> 
> Hehehe, Jarret is right here!
> 
> I've fixed this so that in this case I'll use the original source code in the output view.

Jarrett's reply makes me realize the issue. I have version(unittest) import std.cstream;
I thought I told descent to use unittest in its list of versions. I'll double check my setup.


> > 2. Actual template instances are not shown.
> 
> What do you mean?
> 
> I just tried:
> 
> ---
> class Foo(T) {
> 
> }
> 
> void lala() {
> 	Foo!(int) foo;
> }
> ---
> 
> and it was shown like:
> 
> ---
> class Foo(T) {
> 
> }
> 
> void lala() {
> 	Foo foo;
> }
> ---
> 
> (should be Foo!(int))
> 
> Is that what you mean?


No :(
Templates are designed to do compile-time magic based on their input arguments. Currently, I can't see that magic in the compile-time view. The templates I looked at were still template foo(T) instead of somehow showing the bodies for foo!(int) and foo!(char)

> > 3. I have a template (called factory) that takes a string argument.  The compile time view translates
> >    alias factory!("libego") gameDef;
> > into
> >    alias void gameDef;
> 
> Bug. :-)
> 
> I've fixed these in a new version, 0.5.4.20090129.
> 
> Thanks for the feedback!

Thanks for Descent and the rapid fixed!

Unrelated to the new features, I have a few other observations
1. The auto-complete of parenthesis makes me lazy and I end up leaving off semicolons. Is there any feature to add those too?
2. Auto-complete of curly braces works differently than parenthesis. I usually type the matching symbol anyway. For parenthesis, everything just works, but I keep ending up with too many closing curly braces.

I'm very new to descent, so I still have time to correct my own behavior when editing code.

January 29, 2009
Jason House escribió:
> Ary Borenszweig Wrote:
> 
>> Jason House escribió:
>  
>>> 2. Actual template instances are not shown.
>> What do you mean?
>>
>> I just tried:
>>
>> ---
>> class Foo(T) {
>> 	
>> }
>>
>> void lala() {
>> 	Foo!(int) foo;
>> }
>> ---
>>
>> and it was shown like:
>>
>> ---
>> class Foo(T) {
>> 	
>> }
>>
>> void lala() {
>> 	Foo foo;
>> }
>> ---
>>
>> (should be Foo!(int))
>>
>> Is that what you mean?
> 
> 
> No :(
> Templates are designed to do compile-time magic based on their input arguments. Currently, I can't see that magic in the compile-time view. The templates I looked at were still template foo(T) instead of somehow showing the bodies for foo!(int) and foo!(char)

I can't expand every template instantiation because then it will be a mess, and the code formatter also won't work.

You can try pressing ctrl+shift and hovering the template instance. It should show you it's content (removing false static ifs and stuff).

Is this what you mean? Can you provide an example?
January 29, 2009
I just updated descent and got this error: java.lang.UnsupportedClassVersionError: Bad version number in .class file
January 29, 2009
Jacob Carlborg escribió:
> I just updated descent and got this error: java.lang.UnsupportedClassVersionError: Bad version number in .class file

Can you try updating now?
January 30, 2009
Ary Borenszweig wrote:

>>> Is that what you mean?
>> 
>> 
>> No :(
>> Templates are designed to do compile-time magic based on their input
>> arguments. Currently, I can't see that magic in the compile-time view.
>> The templates I looked at were still template foo(T) instead of somehow
>> showing the bodies for foo!(int) and foo!(char)
> 
> I can't expand every template instantiation because then it will be a mess, and the code formatter also won't work.
> 
> You can try pressing ctrl+shift and hovering the template instance. It should show you it's content (removing false static ifs and stuff).
> 
> Is this what you mean? Can you provide an example?

I have no great example handy, but I tried doing the equivalent of this example (dmd 2.022):

import std.algorithm;
void main(){
  auto x = sort!("a<b")([2,3,5,4]);
}

Sadly, nothing happens with the ctrl+shift+hover trick.  The compile time view reports it as missing.  I checked the user libraries to make sure it was ok.  I have two: druntime and phobos.  The phobos path displays as usr/local/src/phobos (I navigated to /usr/local/src/phobos through the gui to select it).  I see the std subdirectory and algorithm.d inside of it.  I don't know what is going wrong with finding the import.

sort is really a wrapper around sortImpl, which has two bodies inside a static if.  It's trivial to figure out which one is used, but it'd be nice to have a way to see what was really done without all the static if's.
January 30, 2009
Jason House wrote:
> I have no great example handy, but I tried doing the equivalent of this example (dmd 2.022):
> 
> import std.algorithm;
> void main(){
>   auto x = sort!("a<b")([2,3,5,4]);
> }
> 
> Sadly, nothing happens with the ctrl+shift+hover trick.  The compile time view reports it as missing.  I checked the user libraries to make sure it was ok.  I have two: druntime and phobos.  The phobos path displays as usr/local/src/phobos (I navigated to /usr/local/src/phobos through the gui to select it).  I see the std subdirectory and algorithm.d inside of it.  I don't know what is going wrong with finding the import.
> 
> sort is really a wrapper around sortImpl, which has two bodies inside a static if.  It's trivial to figure out which one is used, but it'd be nice to have a way to see what was really done without all the static if's.

I think D2 support is weak in Descent; so that's likely the problem.