Mono-D v0.4.9.5 - Infinite analysis fix + Mixin analysis improvement
alex
info at alexanderbothe.com
Mon Jan 28 18:14:16 PST 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
More information about the Digitalmars-d-announce
mailing list