www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Descent 0.5.4 released

reply Ary Borenszweig <ary esperanto.org.ar> writes:
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!
Jan 27 2009
next sibling parent Aarti_pl <aarti interia.pl> writes:
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)
Jan 27 2009
prev sibling next sibling parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
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 :-)
Jan 27 2009
next sibling parent reply Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
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.
Jan 27 2009
parent Ary Borenszweig <ary esperanto.org.ar> writes:
Jarrett Billingsley 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.

loool!! And here's the winner phrase for my MSN status of the day. :-)
Jan 27 2009
prev sibling next sibling parent Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
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.
Jan 27 2009
prev sibling next sibling parent BCS <ao pathlink.com> writes:
Reply to Ary,

 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

Here's the video! http://www.youtube.com/watch?v=oAhrFQVnsrY

Oh Goody! Oh Goody! Oh Goody! Oh Goody! I can't wait to try it with dparse: http://www.dsource.org/projects/scrapple/browser/trunk/dparser OTOH last I checked I couldn't even edit it without that kind of stuff.
Jan 27 2009
prev sibling next sibling parent Bill Baxter <wbaxter gmail.com> writes:
On Wed, Jan 28, 2009 at 12:46 AM, Ary Borenszweig <ary esperanto.org.ar> wrote:
 Here's the video!

 http://www.youtube.com/watch?v=oAhrFQVnsrY

 :-)

The compile-time view looks quite useful! I also really like the autocomplete code snippet for the opApply. I always dread having to write those. --bb
Jan 27 2009
prev sibling next sibling parent reply Bill Baxter <wbaxter gmail.com> writes:
On Wed, Jan 28, 2009 at 12:46 AM, Ary Borenszweig <ary esperanto.org.ar> wrote:
 Ary Borenszweig wrote:

 Here's the video!

 http://www.youtube.com/watch?v=oAhrFQVnsrY

 :-)

By the way, in the vid you use a plain int param in your opApply delegate, instead of "ref int". I think this will not work. At least I seem to remember finding that opApply doesn't work unless I make all the delegate's arguments ref. I think some of that came from an auto-complete code template, so if the code template doesn't include the 'ref' it should, as a hint to the programmer. Another question -- I was wondering what it does for CTFE functions. I'm guessing it evaluates them and spits out the result. If so that could be very very helpful. Especially for code-building CTFE mixins. I don't think you had an example like that in the vid. This compile time view could be a great debugging and learning aid for D. I think it's quite exciting. I wonder if someone can get it working on something like http://paste.dprogramming.com/ --bb
Jan 27 2009
parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
Bill Baxter escribió:
 On Wed, Jan 28, 2009 at 12:46 AM, Ary Borenszweig <ary esperanto.org.ar> wrote:
 Ary Borenszweig wrote:

 Here's the video!

 http://www.youtube.com/watch?v=oAhrFQVnsrY

 :-)

By the way, in the vid you use a plain int param in your opApply delegate, instead of "ref int". I think this will not work. At least I seem to remember finding that opApply doesn't work unless I make all the delegate's arguments ref. I think some of that came from an auto-complete code template, so if the code template doesn't include the 'ref' it should, as a hint to the programmer.

I'll correct that, then.
 
 Another question -- I was wondering what it does for CTFE functions.
 I'm guessing it evaluates them and spits out the result.  If so that
 could be very very helpful.  Especially for code-building CTFE mixins.
  I don't think you had an example like that in the vid.

It does! See the first part of the video, when I do: int x = 1 + 2 + 3 + 4 + someFunc(5); and it shows: int x = 25; It just evaluated someFunc. :-)
 
 This compile time view could be a great debugging and learning aid for
 D.  I think it's quite exciting.  I wonder if someone can get it
 working on something like http://paste.dprogramming.com/

You mean, web? The java code can be used in the backend for that with little modification, I think that's quite possible.
 
 --bb

Jan 27 2009
parent reply Brad Roberts <braddr puremagic.com> writes:
Brad Roberts wrote:
 Ary Borenszweig wrote:
 Bill Baxter escribió:
 Another question -- I was wondering what it does for CTFE functions.
 I'm guessing it evaluates them and spits out the result.  If so that
 could be very very helpful.  Especially for code-building CTFE mixins.
  I don't think you had an example like that in the vid.

int x = 1 + 2 + 3 + 4 + someFunc(5); and it shows: int x = 25; It just evaluated someFunc. :-)

Given that int x isn't a const expression, is someFunc(5) supposed to be evaluated at compile time like that? Later, Brad

Hrm.. unless it's just bog standard inlining and const folding going on, which is quite possible. Nevermind, Brad
Jan 27 2009
parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
Brad Roberts escribió:
 Brad Roberts wrote:
 Ary Borenszweig wrote:
 Bill Baxter escribió:
 Another question -- I was wondering what it does for CTFE functions.
 I'm guessing it evaluates them and spits out the result.  If so that
 could be very very helpful.  Especially for code-building CTFE mixins.
  I don't think you had an example like that in the vid.

int x = 1 + 2 + 3 + 4 + someFunc(5); and it shows: int x = 25; It just evaluated someFunc. :-)

evaluated at compile time like that? Later, Brad

Hrm.. unless it's just bog standard inlining and const folding going on, which is quite possible.

Great observation! I remember functions like that not being evaluated unless the variable was declared const. I just debugged that and checked with DMD's source code, and it seems the expression in the initializer is evaluated if the variable declaration is not inside a function (check VarDeclaration::semantic2 and ExpInitializer::semantic, which invoked optimize at the end). I wonder why is that behaviour defined like that...
 
 Nevermind,
 Brad

Jan 28 2009
parent Don <nospam nospam.com> writes:
Ary Borenszweig wrote:
 Brad Roberts escribió:
 Brad Roberts wrote:
 Ary Borenszweig wrote:
 Bill Baxter escribió:
 Another question -- I was wondering what it does for CTFE functions.
 I'm guessing it evaluates them and spits out the result.  If so that
 could be very very helpful.  Especially for code-building CTFE mixins.
  I don't think you had an example like that in the vid.

int x = 1 + 2 + 3 + 4 + someFunc(5); and it shows: int x = 25; It just evaluated someFunc. :-)

evaluated at compile time like that? Later, Brad

Hrm.. unless it's just bog standard inlining and const folding going on, which is quite possible.

Great observation! I remember functions like that not being evaluated unless the variable was declared const. I just debugged that and checked with DMD's source code, and it seems the expression in the initializer is evaluated if the variable declaration is not inside a function (check VarDeclaration::semantic2 and ExpInitializer::semantic, which invoked optimize at the end). I wonder why is that behaviour defined like that...

Because then it's a static global. And static initializers get run at compile time.
Jan 28 2009
prev sibling parent Bill Baxter <wbaxter gmail.com> writes:
On Wed, Jan 28, 2009 at 10:33 AM, Ary Borenszweig <ary esperanto.org.ar> wr=
ote:
 Bill Baxter escribi=F3:
 On Wed, Jan 28, 2009 at 12:46 AM, Ary Borenszweig <ary esperanto.org.ar>
 wrote:
 Ary Borenszweig wrote:

 Here's the video!

 http://www.youtube.com/watch?v=3DoAhrFQVnsrY

 :-)

By the way, in the vid you use a plain int param in your opApply delegate, instead of "ref int". I think this will not work. At least I seem to remember finding that opApply doesn't work unless I make all the delegate's arguments ref. I think some of that came from an auto-complete code template, so if the code template doesn't include the 'ref' it should, as a hint to the programmer.

I'll correct that, then.
 Another question -- I was wondering what it does for CTFE functions.
 I'm guessing it evaluates them and spits out the result.  If so that
 could be very very helpful.  Especially for code-building CTFE mixins.
  I don't think you had an example like that in the vid.

It does! See the first part of the video, when I do: int x =3D 1 + 2 + 3 + 4 + someFunc(5); and it shows: int x =3D 25; It just evaluated someFunc. :-)

Rockin!
 This compile time view could be a great debugging and learning aid for
 D.  I think it's quite exciting.  I wonder if someone can get it
 working on something like http://paste.dprogramming.com/

You mean, web? The java code can be used in the backend for that with lit=

 modification, I think that's quite possible.

Yeh, web. There's already a site where you can paste in D code and the server will compile and run the code for you. A compile-time view button on that page would be great. Not that you should be the one to do it or anything. Just thinking it would be nifty, that's all. --bb
Jan 27 2009
prev sibling next sibling parent reply Daniel Keep <daniel.keep.lists gmail.com> writes:
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit



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
Jan 27 2009
next sibling parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
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".
Jan 27 2009
parent reply Daniel Keep <daniel.keep.lists gmail.com> writes:
Ary Borenszweig wrote:
 [snip]
 
 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".

Cool. Can I make one other inquiry? Is it possible to get the CT window to not scroll back to the top every time the source file changes? I've just been using it to debug a mixin (oh God I love this SO MUCH) and I had to keep scrolling down every time I changed something. Even if I had to manually pin the window, or specify which part of the code to view the CT for, it'd really improve the feature. -- Daniel
Jan 28 2009
parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
Daniel Keep wrote:
 
 Ary Borenszweig wrote:
 [snip]

 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".

Cool. Can I make one other inquiry? Is it possible to get the CT window to not scroll back to the top every time the source file changes? I've just been using it to debug a mixin (oh God I love this SO MUCH) and I had to keep scrolling down every time I changed something. Even if I had to manually pin the window, or specify which part of the code to view the CT for, it'd really improve the feature.

Done! Just update to the newer version (0.5.4.20090128). (Yeah, it bothered me too. Now it always maintains the scroll, unless you switch to editing another module)
 
   -- Daniel

Jan 28 2009
parent Daniel Keep <daniel.keep.lists gmail.com> writes:
Ary Borenszweig wrote:
 [snip]
 
 Done!
 
 Just update to the newer version (0.5.4.20090128).
 
 (Yeah, it bothered me too. Now it always maintains the scroll, unless
 you switch to editing another module)

Magically delicious updates while-you-sleep! -- Daniel
Jan 28 2009
prev sibling next sibling parent Yigal Chripun <yigal100 gmail.com> writes:
Daniel Keep wrote:
[snip]
 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

who said you can't? here's how you can have both: eclipse (descnet is a plugin of it) has three default key mappings that can be used: - the default eclipse key bindings - emacs key-bindings - vim key bindings besides that there's also a plugin that implements vim for eclipse, which I forgot it's name. you can google for it, I guess. the plugin integrates vim's text editing capabilities into an eclipse editor. I didn't try the plugin with D code, but for C/C++ it works great.
Jan 27 2009
prev sibling parent Olli Aalto <oaalto gmail.com> writes:
Daniel Keep wrote:
 
 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.
 

I code in java for a living, and wouldn't change eclipse as my editor for anything. But that's just me. :)
 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
 

I haven't used this, but it might be something you'd like. http://vimplugin.org/ O.
Jan 28 2009
prev sibling next sibling parent Lutger <lutger.blijdestijn gmail.com> writes:
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. 
Jan 27 2009
prev sibling next sibling parent reply Trass3r <mrmocool gmx.de> writes:
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__));`);
}
Jan 27 2009
parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
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.
Jan 27 2009
parent Trass3r <mrmocool gmx.de> writes:
The code is compatible to both. Currently trying with D1. The function 
becomes this:

public static char[] mixinLuaRegisterFunction(char[] lua_state, char[] name,
		char[] lua_library_dot_name)
{
	return ("mixin (mixinLuaRegisterFunctionAtLine (\"" ~ lua_state ~ "\", 
\"" ~ name ~ "\", \"" ~ lua_library_dot_name ~ "\", __LINE__));");
}

Furthermore the function is defined in another module and imported. 
mixin is used in the main module.
Jan 27 2009
prev sibling next sibling parent reply "Saaa" <empty needmail.com> writes:
Wow nice!

How do you generate the compile-time view? 
Jan 27 2009
next sibling parent reply Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
Saaa wrote:
 How do you generate the compile-time view? 

Since Descent has a Java port of the DMD frontend inside, it probably just runs the semantics passes on the AST and prints it back out...
Jan 27 2009
parent reply "Saaa" <empty needmail.com> writes:
Which kind of optimizations are located in the front-end?
Not the -O ones, right?

 Saaa wrote:
 How do you generate the compile-time view?

Since Descent has a Java port of the DMD frontend inside, it probably just runs the semantics passes on the AST and prints it back out...

Jan 27 2009
parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
Saaa wrote:
 Which kind of optimizations are located in the front-end?
 Not the -O ones, right?

Which ones are the -O ones? You can see which optimizations are applied in the front end in optimize.c For example this: --- int foo(int x) { return x * 2 * 2; } int bar(int x) { return 2 * 2 * x; } --- is transformed to this: --- int foo(int x) { return x * 2 * 2; } int bar(int x) { return 4 * x; } --- So it seems the optimize.c code just optimizes left subexpressions. I wonder if -O does more that. Because if not, there's still a lof of room for optimization in the compiler. Where can I find a version of obj2asm for Windows to see what's going on in those cases?
 
 Saaa wrote:
 How do you generate the compile-time view?

runs the semantics passes on the AST and prints it back out...


Jan 27 2009
next sibling parent "Saaa" <empty needmail.com> writes:
 Which ones are the -O ones?

I thought they were seperate from the semantic pass van Bommel mentioned
 You can see which optimizations are applied in the front end in optimize.c

 For example this:

 ---
 int foo(int x) {
   return x * 2 * 2;
 }

 int bar(int x) {
   return 2 * 2 * x;
 }
 ---

 is transformed to this:

 ---
 int foo(int x) {
   return x * 2 * 2;
 }

 int bar(int x) {
   return 4 * x;
 }
 ---

 So it seems the optimize.c code just optimizes left subexpressions. I 
 wonder if -O does more that. Because if not, there's still a lof of room 
 for optimization in the compiler.

 Where can I find a version of obj2asm for Windows to see what's going on 
 in those cases?

http://www.digitalmars.com/eup.html When is your birthday? :D
Jan 27 2009
prev sibling parent Robert Fraser <fraserofthenight gmail.com> writes:
Ary Borenszweig wrote:

 ---
 int foo(int x) {
   return x * 2 * 2;
 }
 
 int bar(int x) {
   return 2 * 2 * x;
 }
 ---
 
 is transformed to this:
 
 ---
 int foo(int x) {
   return x * 2 * 2;
 }
 
 int bar(int x) {
   return 4 * x;
 }
 ---

Those should be shifts.
Jan 27 2009
prev sibling parent "Vladimir Panteleev" <thecybershadow gmail.com> writes:
On Tue, 27 Jan 2009 21:19:36 +0200, Ary Borenszweig <ary esperanto.org.ar>  
wrote:

 Where can I find a version of obj2asm for Windows to see what's going on  
 in those cases?

Try the free version of IDA (Interactive DisAssembler) instead: http://www.hex-rays.com/idapro/idadownfreeware.htm -- Best regards, Vladimir mailto:thecybershadow gmail.com
Jan 27 2009
prev sibling next sibling parent Brad Roberts <braddr puremagic.com> writes:
Ary Borenszweig wrote:
 Bill Baxter escribió:
 Another question -- I was wondering what it does for CTFE functions.
 I'm guessing it evaluates them and spits out the result.  If so that
 could be very very helpful.  Especially for code-building CTFE mixins.
  I don't think you had an example like that in the vid.

It does! See the first part of the video, when I do: int x = 1 + 2 + 3 + 4 + someFunc(5); and it shows: int x = 25; It just evaluated someFunc. :-)

Given that int x isn't a const expression, is someFunc(5) supposed to be evaluated at compile time like that? Later, Brad
Jan 27 2009
prev sibling next sibling parent Ary Borenszweig <ary esperanto.org.ar> writes:
Ary Borenszweig escribió:
 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).

Just a small remark: the probability that these things stop working is bigger if the code is spread in many modules. That's because I did some optimizations and lazy loading of some symbols, and sometimes it doesn't work (I'll fix that, eveeeeeeentualy). So this should work better in a single module. That's why this should be a good aid for prototyping new functionality that heavily uses mixins, templates and compile-time evaluation. :-)
Jan 28 2009
prev sibling next sibling parent Qian Xu <quian.xu stud.tu-ilmenau.de> writes:
Ary Borenszweig wrote:

 The Descent plugin for Eclipse provides an IDE for writing, launching
 and debugging code in D.

This build is not compatible with Eclipse3.3 und SuseEnt10(SP2) as well. When I press CTRL+Space, I will see an error message: ---------------------------------------------------------------------------- The 'descent.ui.JavaNoTypeCompletionProposalComputer' proposal computer from the 'descent.ui' plug-in did not complete normally. The extension has thrown a runtime exception. To avoid this message, disable the 'descent.ui' plug-in or disable the 'Other D Proposals' category on the content assist preference page. ---------------------------------------------------------------------------- There is no problem with Windows, but with SuseEnt10. Is it possible to make it work again?? For more information, please another thread of mine in this group. --Qian
Jan 28 2009
prev sibling next sibling parent John Reimer <terminal.node gmail.com> writes:
Thanks for the updates and fixes, Ary.


This is seriously good stuff!


I'll use dwt source to stress-test it again. :) 


-JJR
Jan 28 2009
prev sibling next sibling parent reply Jason House <jason.james.house gmail.com> writes:
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") 2. Actual template instances are not shown. 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;
Jan 28 2009
next sibling parent Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
On Wed, Jan 28, 2009 at 11:37 PM, Jason House
<jason.james.house gmail.com> wrote:
 1. derr.writefln("foo") is translated as 1("foo")

Haw haw, that's because the DMDFE replaces symbols it doesn't know with 1. That's why the compiler spits out tons of bizarre "expected function before parens, not '1' of type 'int'" after undefined symbol errors. Either you're not importing std.cstream, or Descent isn't looking it up right.
Jan 28 2009
prev sibling parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
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.
 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?
 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!
Jan 28 2009
parent reply Jason House <jason.james.house gmail.com> writes:
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.
Jan 29 2009
parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
Jason House escribió:
 Ary Borenszweig Wrote:
 
 Jason House escribió:

 2. Actual template instances are not shown.

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?
Jan 29 2009
next sibling parent reply Jacob Carlborg <doob me.com> writes:
I just updated descent and got this error: 
java.lang.UnsupportedClassVersionError: Bad version number in .class file
Jan 29 2009
parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
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?
Jan 29 2009
parent Jacob Carlborg <doob me.com> writes:
Ary Borenszweig wrote:
 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?

It works now, and Ctrl+click for go to definition also works :) thanks. You're doing a great job.
Jan 30 2009
prev sibling parent reply Jason House <jason.james.house gmail.com> writes:
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.
Jan 29 2009
parent reply Robert Fraser <fraserofthenight gmail.com> writes:
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.
Jan 29 2009
parent Ary Borenszweig <ary esperanto.org.ar> writes:
Robert Fraser escribió:
 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.

Yes, that's it. The port of DMD2 is not finished and that's why it might not work (like: it's a miracle if it works :-P)
Jan 30 2009
prev sibling next sibling parent reply Extrawurst <spam extrawurst.org> writes:
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
Jan 29 2009
parent reply Extrawurst <spam extrawurst.org> writes:
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.u _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.u _0.5.4.20090127.jar

i think the feature.xml inside the updated plugin package needs to be updated to the new jar files.
Jan 29 2009
parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
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.u _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.u _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.
Jan 29 2009
parent Extrawurst <spam extrawurst.org> writes:
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.u _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.u _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.
Jan 29 2009
prev sibling next sibling parent Don <nospam nospam.com> writes:
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.
Jan 29 2009
prev sibling next sibling parent reply BCS <none anon.com> writes:
For me an the other 0.25 shlups out there that are trying to run descent 
without an internet connection, is there a zipfile download for 0.5.4?
Jan 31 2009
parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
BCS escribió:
 For me an the other 0.25 shlups out there that are trying to run descent 
 without an internet connection, is there a zipfile download for 0.5.4?

Here's a temporary one: http://downloads.dsource.org/projects/descent/descent_0.5.4.20090131.zip But... you'll need an internet connection to download it, right? I don't understand your problem. :-(
Feb 01 2009
next sibling parent reply Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
Ary Borenszweig wrote:
 BCS escribió:
 For me an the other 0.25 shlups out there that are trying to run 
 descent without an internet connection, is there a zipfile download 
 for 0.5.4?

Here's a temporary one: http://downloads.dsource.org/projects/descent/descent_0.5.4.20090131.zip But... you'll need an internet connection to download it, right? I don't understand your problem. :-(

Perhaps the computer he's running Eclipse on doesn't have an internet connection? This way he can download it onto (e.g.) an USB stick and install from there.
Feb 01 2009
parent BCS <none anon.com> writes:
Hello Frits,

 Perhaps the computer he's running Eclipse on doesn't have an internet
 connection?
 This way he can download it onto (e.g.) an USB stick and install from
 there.

you got it
Feb 01 2009
prev sibling parent BCS <none anon.com> writes:
Hello Ary,

 BCS escribió:
 
 For me an the other 0.25 shlups out there that are trying to run
 descent without an internet connection, is there a zipfile download
 for 0.5.4?
 

http://downloads.dsource.org/projects/descent/descent_0.5.4.20090131.z ip But... you'll need an internet connection to download it, right? I don't understand your problem. :-(

thanks!
Feb 01 2009
prev sibling next sibling parent Ary Borenszweig <ary esperanto.org.ar> writes:
Ary Borenszweig escribió:
 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

Hi, I just uploaded a new version with some semantic fixes (0.5.4.20090209).
Feb 09 2009
prev sibling next sibling parent Trass3r <mrmocool gmx.de> writes:
The compile-time view doesn't seem to use UTF, does it?

const LOC_MAIN_MENU_FILE_OPEN = "&Öffnen"; // (input file encoding is UTF-8)

becomes

const char[8] LOC_MAIN_MENU_FILE_OPEN = "&֖ffnen";

in the view.
Mar 10 2009
prev sibling parent reply "Saaa" <empty needmail.com> writes:
Started my descent quest..
Mostly because I wanted the : Highlighting of all occurrences of the current 
token under the cursor.
Also just to look what else might be interesting.

Had a few problems with descent and PATH. Maybe it was something else but 
could it maybe be that you need to logout for eclipse to see changes in the 
PATH?

Well things seem to be working now but I miss poseidons syntax colourscheme.
Is it possible to have different colours per keyword(group)?
Mar 21 2009
next sibling parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
Saaa escribió:
 Started my descent quest..
 Mostly because I wanted the : Highlighting of all occurrences of the current 
 token under the cursor.
 Also just to look what else might be interesting.
 
 Had a few problems with descent and PATH. Maybe it was something else but 
 could it maybe be that you need to logout for eclipse to see changes in the 
 PATH?

Yes, probably. I'm not sure.
 
 Well things seem to be working now but I miss poseidons syntax colourscheme.
 Is it possible to have different colours per keyword(group)?

What's a keyword group? You can change the colors, but you'd change all of the keywords to another color (except "return": you can color returns with a different color, useful to see all exit paths of a function).
Mar 21 2009
parent reply "Saaa" <empty needmail.com> writes:
 Had a few problems with descent and PATH. Maybe it was something else but 
 could it maybe be that you need to logout for eclipse to see changes in 
 the PATH?

Yes, probably. I'm not sure.

A well, it works now. I'm happy again :D
 Well things seem to be working now but I miss poseidons syntax 
 colourscheme.
 Is it possible to have different colours per keyword(group)?

What's a keyword group? You can change the colors, but you'd change all of the keywords to another color (except "return": you can color returns with a different color, useful to see all exit paths of a function).

Poseidon has 7 (custom) groups of keywords which have different colours. eg. import=orange, static=green, void=blue, this=purple To me it makes source much easier to navigate.
Mar 21 2009
next sibling parent reply "Saaa" <empty needmail.com> writes:
 Poseidon has 7 (custom) groups of keywords which have different colours.
 eg. import=orange, static=green, void=blue, this=purple
 To me it makes source much easier to navigate.

But.. but.. my code looks soo boring now :( :)
Mar 23 2009
parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
Saaa escribió:
 Poseidon has 7 (custom) groups of keywords which have different colours.
 eg. import=orange, static=green, void=blue, this=purple
 To me it makes source much easier to navigate.

But.. but.. my code looks soo boring now :( :)

It's possible, yes. But I think the code will look like a mess. :-P I'll need a complete list of the keywords inside each group to do that. And... I'm back to university, and work, and in a few days I'm on vacations, so... I won't be able to do much.
Mar 23 2009
parent reply "Saaa" <empty needmail.com> writes:
"Ary Borenszweig" <ary esperanto.org.ar> wrote in message 
news:gq9b51$btc$1 digitalmars.com...
 Saaa escribió:
 Poseidon has 7 (custom) groups of keywords which have different colours.
 eg. import=orange, static=green, void=blue, this=purple
 To me it makes source much easier to navigate.

But.. but.. my code looks soo boring now :( :)

It's possible, yes. But I think the code will look like a mess. :-P I'll need a complete list of the keywords inside each group to do that. And... I'm back to university, and work, and in a few days I'm on vacations, so... I won't be able to do much.

I could list everything here, but I think it would be easiest to just download Poseidon. That way you can marvel at its highlighting in private. http://www.dsource.org/projects/poseidon/changeset/head/trunk?old_path=%2F&format=zip
Mar 23 2009
parent "Saaa" <empty needmail.com> writes:
 I could list everything here, but I think it would be easiest to just 
 download Poseidon.

The keywords are listed and selectable in Tools>Options>Editor>D styles>Key Words
Mar 24 2009
prev sibling next sibling parent Christopher Wright <dhasenan gmail.com> writes:
Jarrett Billingsley wrote:
 On Sat, Mar 21, 2009 at 7:23 PM, Saaa <empty needmail.com> wrote:
 Poseidon has 7 (custom) groups of keywords which have different colours.
 eg. import=orange, static=green, void=blue, this=purple
 To me it makes source much easier to navigate.

Honestly I don't know how people can cope with that.. if you use 30 colors, don't they stop having meaning? :|

Yes, but they make me feel better, especially with a blue / mint green color scheme.
Mar 23 2009
prev sibling parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
Jarrett Billingsley escribió:
 On Sat, Mar 21, 2009 at 7:23 PM, Saaa <empty needmail.com> wrote:
 Poseidon has 7 (custom) groups of keywords which have different colours.
 eg. import=orange, static=green, void=blue, this=purple
 To me it makes source much easier to navigate.

Honestly I don't know how people can cope with that.. if you use 30 colors, don't they stop having meaning? :|

Yes, I think the code will look like a mess. But maybe he's talking about primitive types with one color, attributes with other, etc. But something like: public static void ... { } with three different colors would just call my attention too much and I won't be able to focus on the real code. :-P
Mar 23 2009
parent Trass3r <mrmocool gmx.de> writes:
Jarrett Billingsley schrieb:
 The worst offender, by far, is the D highlighter for Kate.  It has 24
 separate styles for various syntactico-semantic elements, all of which
 have different colors by default.  It looks like a rainbow vomited.
 It's just so distracting :P

Yeah, but poseidon's style isn't that overloaded. I also prefer its syntax highlighting.
Mar 24 2009
prev sibling next sibling parent Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
On Sat, Mar 21, 2009 at 7:23 PM, Saaa <empty needmail.com> wrote:
 Poseidon has 7 (custom) groups of keywords which have different colours.
 eg. import=orange, static=green, void=blue, this=purple
 To me it makes source much easier to navigate.

Honestly I don't know how people can cope with that.. if you use 30 colors, don't they stop having meaning? :|
Mar 23 2009
prev sibling parent Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
On Mon, Mar 23, 2009 at 9:00 PM, Ary Borenszweig <ary esperanto.org.ar> wro=
te:
 Jarrett Billingsley escribi=F3:
 On Sat, Mar 21, 2009 at 7:23 PM, Saaa <empty needmail.com> wrote:
 Poseidon has 7 (custom) groups of keywords which have different colours=



 eg. import=3Dorange, static=3Dgreen, void=3Dblue, this=3Dpurple
 To me it makes source much easier to navigate.

Honestly I don't know how people can cope with that.. if you use 30 colors, don't they stop having meaning? =A0:|

Yes, I think the code will look like a mess. But maybe he's talking about primitive types with one color, attributes with other, etc. But something like: public static void ... { } with three different colors would just call my attention too much and I won't be able to focus on the real code. :-P

The worst offender, by far, is the D highlighter for Kate. It has 24 separate styles for various syntactico-semantic elements, all of which have different colors by default. It looks like a rainbow vomited. It's just so distracting :P
Mar 23 2009