Partial executions in the %mathpiper fold?

16 views
Skip to first unread message

Peter

unread,
Jul 25, 2011, 8:29:51 PM7/25/11
to mathpiper-user
Hello,

It would have been much better if I could "run" a set of partial
instructions in the %mathpiper fold. Can this be possible? Currently,
I move the ending %/mathpiper so that I can only hold the progressive
and constructive parts to be run.

Peter Chung

Ted Kosan

unread,
Jul 26, 2011, 8:15:03 AM7/26/11
to mathpip...@googlegroups.com
Peter wrote:

What do you think about the idea of using \\ as the marker which
indicates where evaluation should stop in a fold? Here is an example:

%mathpiper

Echo(1);

Echo(2);

\\

Echo(3);

%/mathpiper

%output,preserve="false"
Result: True

Side Effects:
1
2

. %/output


Ted

Sherm Ostrowsky

unread,
Jul 26, 2011, 2:19:32 PM7/26/11
to mathpip...@googlegroups.com
Something like that seems useful, but ... 2 questions:

1.  As stated above, a line which contains only  //  terminates processing in the fold.  Then what happens with comments like
//
//    blah blah blah
//
?

2.  After processing of the fold stops, where does it "go"?  That is, what state will I find myself in?

Sherm

Sherm Ostrowsky

unread,
Jul 26, 2011, 2:21:05 PM7/26/11
to mathpip...@googlegroups.com
FORGET THIS:  I MISREAD THE STATEMENT!    Not //   but \\.   OK!

 

Peter

unread,
Jul 26, 2011, 9:01:04 PM7/26/11
to mathpiper-user
Hello,

That will be a good idea. Again, it would be better for me to use a
"selection block of lines" for execution because that way I can always
pick necessary portion of the codes in the fold. It is still a good
idea to have such a "delimiter" to linearly segregate the code blocks,
though.

Peter Chung

Ted Kosan

unread,
Jul 26, 2011, 11:25:34 PM7/26/11
to mathpip...@googlegroups.com
Sherm wrote:

> 2.  After processing of the fold stops, where does it "go"?  That is, what
> state will I find myself in?

The way I am implementing the \\ behavior is after I grab the contents
of a fold as a string, I take a sub-string from it which starts at
offset 0 and goes up to, but not including, the \\. This sub-string is
then submitted to MathPiper for evaluation.

Ted

Ted Kosan

unread,
Jul 27, 2011, 12:08:03 AM7/27/11
to mathpip...@googlegroups.com
Peter wrote:

> Again, it would be better for me to use a
> "selection block of lines" for execution because that way I can always
> pick necessary portion of the codes in the fold.

I will look into what it would take to do this.

Ted

Ted Kosan

unread,
Jul 28, 2011, 1:12:24 AM7/28/11
to mathpip...@googlegroups.com
Peter wrote:

> That will be a good idea. Again, it would be better for me to use a
> "selection block of lines" for execution because that way I can always
> pick necessary portion of the codes in the fold. It is still a good
> idea to have such a "delimiter" to linearly segregate the code blocks,
> though.

I added the \\ "stop evaluation here" marker and "evaluation only of
selected code in a fold" to development version .79S:

http://www.mathpiper.org/development-releases


Let me know how these work for you.

Ted

Peter

unread,
Aug 1, 2011, 9:19:05 PM8/1/11
to mathpiper-user
Hello,

Both new implementation for "partial execution" seem work so well.
If I extend my wish further I would say:
a "real" partial implementation would have been much better provided
that the jEdit editor allows "non-consecutive" selection (or, discrete
partial selection).
Is it possible?

Thank you for the version upgrading.
Peter

Ted Kosan

unread,
Aug 2, 2011, 10:56:33 PM8/2/11
to mathpip...@googlegroups.com
Peter wrote:

> Both new implementation for "partial execution" seem work so well.
> If I extend my wish further I would say:
> a "real" partial implementation would have been much better provided
> that the jEdit editor allows "non-consecutive" selection (or, discrete
> partial selection).
> Is it possible?

I have added multiple selection capabilities to version .79T:

http://www.mathpiper.org/development-releases


Let me know what you think of it :-)

Ted

Reply all
Reply to author
Forward
0 new messages