digitalmars.D.announce - Mono-D v0.4.9.5 - Infinite analysis fix + Mixin analysis improvement
- alex (16/16) Jan 27 2013 Morning D folks,
- Dicebot (5/5) Jan 27 2013 Gets better and better!
- alex (7/12) Jan 27 2013 So like.. you click somewhere in your document, have an extra
- Dicebot (15/28) Jan 27 2013 No, a bit different. I.e.
- Jacob Carlborg (10/14) Jan 27 2013 Nice. I'm not sure if this is what Dicebot suggested but would it be
- alex (7/22) Jan 27 2013 Well, not displaying the entire module but only displaying
- Jacob Carlborg (11/17) Jan 27 2013 If it cannot show the entire module then I think a tooltip would be best...
- alex (5/21) Jan 28 2013 K..Created an extra panel, and the actual mixin evaluation is
- Jacob Carlborg (4/7) Jan 28 2013 Cool, I guess it's time to give Mono-D another try.
- alex (10/17) Jan 28 2013 http://i.imgur.com/3i5R4Mn.png?1
- F i L (3/12) Jan 28 2013 Now that's impressive. Can't wait to see exactly what will come
- alex (8/21) Jan 28 2013 Yeah I just named it "Expression evaluation" - dunno why, just
- F i L (34/41) Jan 28 2013 That sounds very useful. It would be awesome if you could
- alex (18/51) Jan 28 2013 http://mono-d.alexanderbothe.com/?attachment_id=817
- Jacob Carlborg (6/26) Jan 29 2013 Yeah, that was soooo cool. I also liked the code bubbles. Instead of
- alex (4/8) Jan 29 2013 Which can be done in Eclipse by just selecting e.g. a method or
- Jacob Carlborg (7/10) Jan 29 2013 If I select an item in the outline view it will just scroll the editor
- Bruno Medeiros (12/20) Jan 29 2013 By default, yes, but you can do what Jacob wanted with the "Show Source
- Jacob Carlborg (7/10) Jan 29 2013 That's somewhat similar to what I had in mind. But that just removes all...
- alex (5/15) Jan 29 2013 Okay, I've uploaded a new version that features a basically
- Jacob Carlborg (4/8) Jan 30 2013 I'll give it a try.
- alex (5/12) Jan 31 2013 I'm currently too tired to start a new thread for announcing
- Paulo Pinto (7/17) Feb 01 2013 When on Eclipse I tend to use the Java browsing perspective.
- Timon Gehr (2/14) Jan 29 2013 Probably you should do JIT using System.Reflection.Emit.
- alex (4/20) Jan 29 2013 Why not write an entire D# compiler? ;)
- F i L (3/4) Jan 28 2013 Oh, ps. On a completely unrelated note, Just wanted to say that
- Jacob Carlborg (4/9) Jan 28 2013 Sure, why not.
- F i L (3/7) Jan 27 2013 The new update seems very fast and stable. Trying the new
- alex (2/11) Jan 28 2013 And if not, you know the routine :)
Morning D folks, Implemented some new features concerning pre-compile time mixin analysis and expression evaluation: http://mono-d.alexanderbothe.com/?p=814 (Screenshot included) I'd furthermore suggest that the prospective generational GC (not the current one, I mean the fictional that actually can collect nearly everything wisely! ;)) also supports weak references - because they're imho essential for a nice caching flow: In this version of mono-d I used a weak-keyed dictionary to store mixin expression results until the owner module is free'd and probably reparsed. This allows me to be more lazy regarding the deletion of those cache entries after I reparsed e.g. a module + mem leaking is prevented + less muddy code in the module update routines! :) Cheers, Alex
Jan 27 2013
Gets better and better! Makes me wonder though: if this works, may be it is possible to provide a context helper with mixin resulting code if all it parameters are already defined? Similar to C macro expansion helper in Eclipse.
Jan 27 2013
On Sunday, 27 January 2013 at 11:31:58 UTC, Dicebot wrote:Gets better and better! Makes me wonder though: if this works, may be it is possible to provide a context helper with mixin resulting code if all it parameters are already defined? Similar to C macro expansion helper in Eclipse.So like.. you click somewhere in your document, have an extra panel in which you can enter an expression (even a CTFE call later on), and get your expressions evaluated? Sure - even stuff like template mixins or similar..no problem :) Uhm, even pre-defining variable contents shouldn't be a problem - then you would have a D math-script interpreter :D
Jan 27 2013
On Sunday, 27 January 2013 at 12:05:28 UTC, alex wrote:On Sunday, 27 January 2013 at 11:31:58 UTC, Dicebot wrote:No, a bit different. I.e. --------- string gen(int num) { return format("auto a = %s", num); } mixin(gen("42"); --------- And when you hover over "mixin" keyword, temporary modal window appears with content "auto a = 42". Or even separate panel with full compile-time feature expansion like it was in Descent, as Jacob suggests. I suppose it is hard to have full CTFE engine now, but at least simple cases may be useful.Gets better and better! Makes me wonder though: if this works, may be it is possible to provide a context helper with mixin resulting code if all it parameters are already defined? Similar to C macro expansion helper in Eclipse.So like.. you click somewhere in your document, have an extra panel in which you can enter an expression (even a CTFE call later on), and get your expressions evaluated? Sure - even stuff like template mixins or similar..no problem :) Uhm, even pre-defining variable contents shouldn't be a problem - then you would have a D math-script interpreter :D
Jan 27 2013
On 2013-01-27 12:27, alex wrote:Morning D folks, Implemented some new features concerning pre-compile time mixin analysis and expression evaluation: http://mono-d.alexanderbothe.com/?p=814 (Screenshot included)Nice. I'm not sure if this is what Dicebot suggested but would it be possible to implement a compile time view, like Descent had? It how showed template and string mixins are expanded. It also showed how some language features are lowered to other features, like the scope statement being lowered to try/catch/finally. This clip shows the compile time view in action: http://www.youtube.com/watch?v=oAhrFQVnsrY&noredirect=1 -- /Jacob Carlborg
Jan 27 2013
On Sunday, 27 January 2013 at 12:20:51 UTC, Jacob Carlborg wrote:On 2013-01-27 12:27, alex wrote:Well, not displaying the entire module but only displaying resolved expressions. Dunno how to do this in a proper way - only via tooltips or also in an extra panel? Which would be the most useful? Btw, since I'm not that involved in D's magic I definitely haven't planned such extensive pre-compilation :DMorning D folks, Implemented some new features concerning pre-compile time mixin analysis and expression evaluation: http://mono-d.alexanderbothe.com/?p=814 (Screenshot included)Nice. I'm not sure if this is what Dicebot suggested but would it be possible to implement a compile time view, like Descent had? It how showed template and string mixins are expanded. It also showed how some language features are lowered to other features, like the scope statement being lowered to try/catch/finally. This clip shows the compile time view in action: http://www.youtube.com/watch?v=oAhrFQVnsrY&noredirect=1
Jan 27 2013
On 2013-01-27 13:35, alex wrote:Well, not displaying the entire module but only displaying resolved expressions. Dunno how to do this in a proper way - only via tooltips or also in an extra panel? Which would be the most useful?If it cannot show the entire module then I think a tooltip would be best suited.Btw, since I'm not that involved in D's magic I definitely haven't planned such extensive pre-compilation :DIt can be extremely helpful to see how a template/string mixin is expanded when debugging. It can also be fun to see how the compiler behaves internally, i.e. scope-statements are lowered to try/catch/finally. Any D IDE has quite a lot of expectations to live up since it most certainly will be compared with Descent. -- /Jacob Carlborg
Jan 27 2013
On Sunday, 27 January 2013 at 15:24:23 UTC, Jacob Carlborg wrote:On 2013-01-27 13:35, alex wrote:K..Created an extra panel, and the actual mixin evaluation is working, too. But now there are some last adjustments required to have the entire mechanism as few annoying and performance-reducing as possible.Well, not displaying the entire module but only displaying resolved expressions. Dunno how to do this in a proper way - only via tooltips or also in an extra panel? Which would be the most useful?If it cannot show the entire module then I think a tooltip would be best suited.Btw, since I'm not that involved in D's magic I definitely haven't planned such extensive pre-compilation :DIt can be extremely helpful to see how a template/string mixin is expanded when debugging. It can also be fun to see how the compiler behaves internally, i.e. scope-statements are lowered to try/catch/finally. Any D IDE has quite a lot of expectations to live up since it most certainly will be compared with Descent.
Jan 28 2013
On 2013-01-28 13:32, alex wrote:K..Created an extra panel, and the actual mixin evaluation is working, too. But now there are some last adjustments required to have the entire mechanism as few annoying and performance-reducing as possible.Cool, I guess it's time to give Mono-D another try. -- /Jacob Carlborg
Jan 28 2013
On Monday, 28 January 2013 at 20:20:42 UTC, Jacob Carlborg wrote:On 2013-01-28 13:32, alex wrote:http://i.imgur.com/3i5R4Mn.png?1 A first shot - I guess in cases of having template parameters, stuff should get 'expanded' to the final type, right? Well then I still have to work on it. Anyway it also works for template mixins and mixin statements. You just move the caret into a mixin, wait half a sec and then get the evaluated string displayed in a halfway good style. Ah, regarding the style..I also have to optimize it again - never touched any 'pretty printing' of entire ASTs before ;)K..Created an extra panel, and the actual mixin evaluation is working, too. But now there are some last adjustments required to have the entire mechanism as few annoying and performance-reducing as possible.Cool, I guess it's time to give Mono-D another try.
Jan 28 2013
alex wrote:http://i.imgur.com/3i5R4Mn.png?1 A first shot - I guess in cases of having template parameters, stuff should get 'expanded' to the final type, right? Well then I still have to work on it. Anyway it also works for template mixins and mixin statements. You just move the caret into a mixin, wait half a sec and then get the evaluated string displayed in a halfway good style. Ah, regarding the style..I also have to optimize it again - never touched any 'pretty printing' of entire ASTs before ;)Now that's impressive. Can't wait to see exactly what will come of the expression evaluation :D
Jan 28 2013
On Monday, 28 January 2013 at 21:14:07 UTC, F i L wrote:alex wrote:Yeah I just named it "Expression evaluation" - dunno why, just thought that it could be used in a more general way than 'only' for mixin insight. Should I do an extra input box where you could type in expressions and other things that could be evaluated? Just thinking of a prototype of an interactive D script console or so.. :)http://i.imgur.com/3i5R4Mn.png?1 A first shot - I guess in cases of having template parameters, stuff should get 'expanded' to the final type, right? Well then I still have to work on it. Anyway it also works for template mixins and mixin statements. You just move the caret into a mixin, wait half a sec and then get the evaluated string displayed in a halfway good style. Ah, regarding the style..I also have to optimize it again - never touched any 'pretty printing' of entire ASTs before ;)Now that's impressive. Can't wait to see exactly what will come of the expression evaluation :D
Jan 28 2013
alex wrote:Yeah I just named it "Expression evaluation" - dunno why, just thought that it could be used in a more general way than 'only' for mixin insight. Should I do an extra input box where you could type in expressions and other things that could be evaluated? Just thinking of a prototype of an interactive D script console or so.. :)That sounds very useful. It would be awesome if you could evaluate the returned value of functions that already exist in your program, or (like your picture shows) write simple test functions to evaluate. Of course not all functions will work, but It would be great in some areas. So, just to be clear, say you have the following function in your project: int foo(int x, int y) { return x * y + 5; } Then in the expression "command line", you just type: foo(1, 2) Hit Enter, and you get a message: "7". You could also write larger test functions in the Expression Evaluation body (like in your screenshot) which could do more complicated stuff (still limited of course). --- You just gave me an awesome idea though. I know this would be a ton of work (I'm not making a feature request here), but how realistic would it be with your system to do a "side-by-side" expression evaluation with "example data" (where applicable)? :D Meaning, imagine your screen looks like: CODE | EXAMPLE RESULTS ------------------------------------------------------------ | int foo(int x, int y) | params: (2, 3) // editable { | return x * y + 5 | returns: 11 // not-editable } | | That would simply amazing! I don't expect you to make that, lol, only want to know if it's possible (or foreseeable) with your expression evaluation engine. Is it?
Jan 28 2013
On Tuesday, 29 January 2013 at 00:48:24 UTC, F i L wrote:... That sounds very useful. It would be awesome if you could evaluate the returned value of functions that already exist in your program, or (like your picture shows) write simple test functions to evaluate. Of course not all functions will work, but It would be great in some areas. So, just to be clear, say you have the following function in your project: int foo(int x, int y) { return x * y + 5; } Then in the expression "command line", you just type: foo(1, 2) Hit Enter, and you get a message: "7". You could also write larger test functions in the Expression Evaluation body (like in your screenshot) which could do more complicated stuff (still limited of course).http://mono-d.alexanderbothe.com/?attachment_id=817 My progress so far. Lots of internals to manage though. The execute-button isn't implemented yet but you can toggle the "Automatically take the mixin at the caret location" button. Concerning things like foo(1,2) - yes, the evaluation engine directly takes the symbols straight out of its parsed modules. So as you create a method body you'll be able to execute stuff in-line. But yeah, remember that CTFE isn't implemented yet ;) - Perhaps I'll do/finish it during the next GSoC. Haha, as a systematical performance pre-improvement I could directly redirect some phobos methods like sqrt() to the .net one - which would save huge amounts of time then.You just gave me an awesome idea though. I know this would be a ton of work (I'm not making a feature request here), but how realistic would it be with your system to do a "side-by-side" expression evaluation with "example data" (where applicable)? :D Meaning, imagine your screen looks like: CODE | EXAMPLE RESULTS ------------------------------------------------------------ | int foo(int x, int y) | params: (2, 3) // editable { | return x * y + 5 | returns: 11 // not-editable } | | That would simply amazing! I don't expect you to make that, lol, only want to know if it's possible (or foreseeable) with your expression evaluation engine. Is it?Side-by-side? This could be your contribution then :P I actually did watch this one video where that one guy just edited some javascript in his uber-editor and the WebGL animations reacted on his coding in pseudo-realtime in the browser :D
Jan 28 2013
On 2013-01-29 03:14, alex wrote:On Tuesday, 29 January 2013 at 00:48:24 UTC, F i L wrote:Yeah, that was soooo cool. I also liked the code bubbles. Instead of having a file as the minimum abstraction unit in the IDE/editor it was a function/class/method. -- /Jacob CarlborgMeaning, imagine your screen looks like: CODE | EXAMPLE RESULTS ------------------------------------------------------------ | int foo(int x, int y) | params: (2, 3) // editable { | return x * y + 5 | returns: 11 // not-editable } | | That would simply amazing! I don't expect you to make that, lol, only want to know if it's possible (or foreseeable) with your expression evaluation engine. Is it?Side-by-side? This could be your contribution then :P I actually did watch this one video where that one guy just edited some javascript in his uber-editor and the WebGL animations reacted on his coding in pseudo-realtime in the browser :D
Jan 29 2013
On Tuesday, 29 January 2013 at 08:02:27 UTC, Jacob Carlborg wrote:Which can be done in Eclipse by just selecting e.g. a method or class in the outline - iirc it'll just show the definition of the selected node then, nothing else....Yeah, that was soooo cool. I also liked the code bubbles. Instead of having a file as the minimum abstraction unit in the IDE/editor it was a function/class/method.
Jan 29 2013
On 2013-01-29 11:52, alex wrote:Which can be done in Eclipse by just selecting e.g. a method or class in the outline - iirc it'll just show the definition of the selected node then, nothing else.If I select an item in the outline view it will just scroll the editor view to where that item is defined. I want to be able to have three code bubbles open, side by side, showing three different methods from the same file. -- /Jacob Carlborg
Jan 29 2013
On 29/01/2013 10:52, alex wrote:On Tuesday, 29 January 2013 at 08:02:27 UTC, Jacob Carlborg wrote:By default, yes, but you can do what Jacob wanted with the "Show Source of Selected Element Only" functionality: http://help.eclipse.org/juno/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/views/ref-java-editor.htm I personally don't like that feature that much, at least the way it's implemented, because that toggle is global, it will affect all Java editors. Plus it requires the use of the outline view (which I dont typically use), or the package explorer to select the element. I would much rather have the underlying elemented defined *per editor*, (and thus independent of selection). -- Bruno Medeiros - Software EngineerWhich can be done in Eclipse by just selecting e.g. a method or class in the outline - iirc it'll just show the definition of the selected node then, nothing else....Yeah, that was soooo cool. I also liked the code bubbles. Instead of having a file as the minimum abstraction unit in the IDE/editor it was a function/class/method.
Jan 29 2013
On 2013-01-29 13:26, Bruno Medeiros wrote:By default, yes, but you can do what Jacob wanted with the "Show Source of Selected Element Only" functionality: http://help.eclipse.org/juno/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/views/ref-java-editor.htmThat's somewhat similar to what I had in mind. But that just removes all other code that is not selected from the editor. I want to have multiple editors or views of the same file side by side. These views don't need to be any larger than the code they're showing. -- /Jacob Carlborg
Jan 29 2013
On Tuesday, 29 January 2013 at 19:35:45 UTC, Jacob Carlborg wrote:On 2013-01-29 13:26, Bruno Medeiros wrote:Okay, I've uploaded a new version that features a basically working version. There is now a separated mixin insight and expression evaluation available. There are still many things left to do though.By default, yes, but you can do what Jacob wanted with the "Show Source of Selected Element Only" functionality: http://help.eclipse.org/juno/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/views/ref-java-editor.htmThat's somewhat similar to what I had in mind. But that just removes all other code that is not selected from the editor. I want to have multiple editors or views of the same file side by side. These views don't need to be any larger than the code they're showing.
Jan 29 2013
On 2013-01-30 00:28, alex wrote:Okay, I've uploaded a new version that features a basically working version. There is now a separated mixin insight and expression evaluation available. There are still many things left to do though.I'll give it a try. -- /Jacob Carlborg
Jan 30 2013
On Wednesday, 30 January 2013 at 10:45:26 UTC, Jacob Carlborg wrote:On 2013-01-30 00:28, alex wrote:I'm currently too tired to start a new thread for announcing another bug fix release: http://mono-d.alexanderbothe.com/?p=825Okay, I've uploaded a new version that features a basically working version. There is now a separated mixin insight and expression evaluation available. There are still many things left to do though.I'll give it a try.
Jan 31 2013
On Tuesday, 29 January 2013 at 19:35:45 UTC, Jacob Carlborg wrote:On 2013-01-29 13:26, Bruno Medeiros wrote:When on Eclipse I tend to use the Java browsing perspective. http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2FgettingStarted%2Fqs-Browsing.htm It brings back memories when I used Smalltalk at the university. :) -- PauloBy default, yes, but you can do what Jacob wanted with the "Show Source of Selected Element Only" functionality: http://help.eclipse.org/juno/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/views/ref-java-editor.htmThat's somewhat similar to what I had in mind. But that just removes all other code that is not selected from the editor. I want to have multiple editors or views of the same file side by side. These views don't need to be any larger than the code they're showing.
Feb 01 2013
On 01/29/2013 03:14 AM, alex wrote:On Tuesday, 29 January 2013 at 00:48:24 UTC, F i L wrote:Probably you should do JIT using System.Reflection.Emit....http://mono-d.alexanderbothe.com/?attachment_id=817 My progress so far. Lots of internals to manage though. The execute-button isn't implemented yet but you can toggle the "Automatically take the mixin at the caret location" button. Concerning things like foo(1,2) - yes, the evaluation engine directly takes the symbols straight out of its parsed modules. So as you create a method body you'll be able to execute stuff in-line. But yeah, remember that CTFE isn't implemented yet ;) - Perhaps I'll do/finish it during the next GSoC. ...
Jan 29 2013
On Tuesday, 29 January 2013 at 09:42:49 UTC, Timon Gehr wrote:On 01/29/2013 03:14 AM, alex wrote:(jk, I originally planned to do this right after I've finished mono-d :D)On Tuesday, 29 January 2013 at 00:48:24 UTC, F i L wrote:Probably you should do JIT using System.Reflection.Emit....http://mono-d.alexanderbothe.com/?attachment_id=817 My progress so far. Lots of internals to manage though. The execute-button isn't implemented yet but you can toggle the "Automatically take the mixin at the caret location" button. Concerning things like foo(1,2) - yes, the evaluation engine directly takes the symbols straight out of its parsed modules. So as you create a method body you'll be able to execute stuff in-line. But yeah, remember that CTFE isn't implemented yet ;) - Perhaps I'll do/finish it during the next GSoC. ...
Jan 29 2013
alex wrote:...Oh, ps. On a completely unrelated note, Just wanted to say that the new Active Profiler display is completely awesome. Thanks!
Jan 28 2013
On 2013-01-28 23:09, alex wrote:Yeah I just named it "Expression evaluation" - dunno why, just thought that it could be used in a more general way than 'only' for mixin insight. Should I do an extra input box where you could type in expressions and other things that could be evaluated? Just thinking of a prototype of an interactive D script console or so.. :)Sure, why not. -- /Jacob Carlborg
Jan 28 2013
alex wrote:Morning D folks, Implemented some new features concerning pre-compile time mixin analysis and expression evaluation: ...The new update seems very fast and stable. Trying the new features, Thanks!
Jan 27 2013
On Sunday, 27 January 2013 at 23:14:23 UTC, F i L wrote:alex wrote:And if not, you know the routine :)Morning D folks, Implemented some new features concerning pre-compile time mixin analysis and expression evaluation: ...The new update seems very fast and stable. Trying the new features, Thanks!
Jan 28 2013