Hey, it's not that esoteric ;-). (Really looking forward to writing that blog post, just have had a horrible lack of spare time recently)
On Mon, Apr 29, 2013 at 2:03 AM, Terry Brown <[email protected]>wrote: > On Sun, 28 Apr 2013 15:24:40 -0700 (PDT) > wgw <[email protected]> wrote: > > > Thanks for the tip -- it will take me a while to get my head around > vspace > > (will keep an eye on Ville's blog post). > > Just to clarify, vs-eval, vs-last, vs-last-pretty are quite straight > forward, as I described them below, and do not require comprehension of > the esoterica of value-space :-) I just put them in that plugin (a) to > avoid creating yet another plugin, and (b) because it seemed sensible > to have them use the value-space namespace c.vs, but all that means for > vs-eval, vs-last, vs-last-pretty is that > > a = 7 > > executed by vs-eval assigns a value to a which can be used by > subsequent vs-eval calls (persistent for the lifetime of the session). > > For example, make a body with this text > > a = 7 > b = 3 > a + b > > and place the cursor in front of the first 'a' > > execute (Alt-x or key binding) vs-eval 4 times > > - first time executes the empty selection and selects the next line > - second time assigns 7 to a and report 7 in the log > - third time assigns 3 to b and report 3 in the log > - forth time calculates a + b and report 10 in the log > > executing vs-last(-pretty) would insert the last result (None, 7, 3, > 10) in the body. > > Cheers -Terry > > > > > I'm just beginning to appreciate (or imagine) what Ipython, sublime text > > editor, leo, xiki, etc could mean for some kind of intelligent document > > workbench. Of course the big hurdle is not so much the string processing > > (sublime is a good example of how that can be done), but rather the > syntax > > processing -- i.e. the docbench (to coin a phrase) should understand the > > syntax of whatever is being input and then offer syntax-aware > functions.... > > Sorry, getting a little obscure: all I mean by syntax-aware is the > ability > > to propose text completions (Leo's autocompletion is a good example -- > > everything should work like autocomplete!) and allow for intelligent text > > changes depending on a database of information (for example, a search and > > replace that would know how to search on "caterpillar" and turn it into > > "butterfly" but would not touch "caterpillar truck"). > > > > Seems like Leo is not far from doing that synthesis, but it would require > > more database integration. So for example, even the python help system > does > > not have autocomplete. (No criticism there! The great thing about Leo is > > that if you want something, you just have to dive in and build it. My day > > job might just let me do that!) > > > > Thanks! > > > > Bill > > Le dimanche 28 avril 2013 08:37:20 UTC-7, Terry a écrit : > > > > > > On Sat, 27 Apr 2013 17:44:13 -0700 (PDT) > > > wgw <[email protected] <javascript:>> wrote: > > > > > > > Xiki.org gives a demo of a "wiki" shell for command execution. Leo > > > should > > > > be able to do the same thing (and more!), in the sense that > leoscreen, > > > for > > > > example, has two way communication with the command line. I suppose a > > > > "Lxiki" is really just a question of setting up the right shortcuts > > > (like a > > > > shift-ctrl-b that would run highlighted python code from the command > > > > line... with a tmp file?). > > > > > > > > Just an idea for the Leo melting pot. > > > > > > In addition to the outline as a active data document functions of > > > Ville's value-space plugin, I recently added some simple ;-) commands: > > > > > > Alt+A vs-eval > > > Alt+S vs-last > > > Alt+D vs-last-pretty > > > (my key bindings) > > > > > > vs-eval evaluates the selected python in the c.vs namespace. It makes > > > an effort to workout what the output should be, and puts it in the > > > log. It captures print output to the log too. It selects the next > > > line, ready for execution. > > > > > > vs-last inserts the last result into the body, and vs-last-pretty > > > does the same, but using pprint formatting. > > > > > > Ctrl-B also runs the script in the body, but not in a persistent > > > namespace, running only the selected text doesn't seem to be working, > > > and it doesn't work so hard to work out the output. > > > > > > I guess leoscreen would do the same things as the vs-* commands if you > > > used it against a python shell. The inspiration for the vs-* commands > > > was wanting Leo to tell you what 3.57 * 365 / 12 was without a lot of > > > effort, but of course you can define functions etc. etc. > > > > > > Cheers -Terry > > > > > > > -- > You received this message because you are subscribed to the Google Groups > "leo-editor" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/leo-editor?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
