Jef raskin mentioned in the Humance Interface: New Directions for Designing Interactive Systems, a good user interface should bring the user's current attention object (document) and the user to be unified to the object (command). From this, Jef Raskin talked about several very avant-garde interface design concepts. One of them is that the user can calculate or process the selected content in real time in the editing process, and even execute the selected content as a command or script.
I am very interested in this design concept. This idea is a bit like the procedures and data in Lisp or similar FP program. It seems that there is such a real-time computing software, but I can't think of it, I just do one I have, I got the tool below. Although the tool is rough (written in C, there is no test and optimization), but it is still very interesting to have a certain extent, to a certain extent.
Friends interested in this can download Xeval and its source code to the following website. If you realize a better tool on the basis of Xeval, don't forget to tell me.
http://www.contextFree.Net/wangyg/c/xeval/xeval.html
The following is the documentation of Xeval
Xeval Extensible Real-Time Calculation Tools V1.0
Instructions
This is a simple, interesting gadget, its design idea from Jef Raskin, the Humance Interface: New Directions for Designing Interactive Systems.
Xeval is not available to run the XeVal.exe program directly under the bin directory. After running Xeval, in addition to a small icon on the right corner of the screen, you can't see any exception (right-click on the icon, you can see the Xeval menu).
Now, you can try a mathematical expression when you enter a text content in application software such as Word, PowerPoint, NotePad, UltraEdit, and even Visual Studio. For example, in the Word document below, you suddenly want to calculate the growth of the company's per capita cost this year, it doesn't matter, don't open the calculator, just enter the expression you want to calculate in the Word document, then select this expression with the mouse or keyboard:
Then press CTRL Alt F5 (this is the hotkey default for Xeval by default), you will find that the mathematical expression is replaced.
This is the calculation of the mathematical expression. Is it very convenient? - This is also the origin of "real-time".
Of course, Xeval's role is far more than this. Xeval is a "extension", "generalized" computing tool, you can add various functions to Xeval by adding a plug-in, such as encrypted by editing, changing the case of the letter, editing the text At the same time, you will directly obtain the running results of a scripting language, replace the typed thumbnail to pre-defined text, and make simple transformations that are editing the text, complete real-time metric unit conversion, and so on.
For example, when I write a PowerPoint document, I will write the next Scheme code when writing, select it, like this:
Then press the shortcut, let XeVal help me generate a string of standard Fibonacci (on my computer, I embedding the Mzscheme interpreter in Plt Scheme) as a plugin, so calculate As a result, there is a copyright information of Mzscheme. I didn't filter it out): So as long as you want to get it, as long as you simply develop a plugin for Xeval, or find a procedure for someone else as a plugin, you can let XeVal play A larger performance.
Principle and extension method
In fact, the principle of Xeval is very simple. Xeval registers a system-level shortcut for each plug-in. When we choose some text in other software, and press the shortcut key, Xeval automatically sends analog "Ctrl-C" button combination to the current software. Most of the standard Windows programs will copy the text in us to the scrap version at this time. Xeval immediately writes the contents of the scrapbook into the temporary file ext.IN and calls the plugboard with the following instructions (where it is larger, less than the symbol, the I / O redirection):
Some-plug-in.exe
Next, Xeval reads the contents of ext.out, writing it back to the clipboard, and then sends analog "Ctrl-V" button combination to the current software. It's as simple, there is no mystery (pursuit of perfection) to use the screen to get a stronger real-time computing function like Jinshan 's word.
Therefore, any executable output as stdin is input, and the executable output as STDOUT can become XEVAL's plugin. You can write a plugin yourself (what language can be used, but the execution speed is best not too slow, or Xeval will wait for anxious), you can also write the procedures written by others. In fact, Xeval's default mathematical computing plugin is changed from the MFCalc sample program I am from the Bison manual. The source code of Xeval itself and the mathematical computing plugin is in the src directory, you can freely check, use and modify.
The method of installing the plug-in is also very simple, you only need to copy the executable to the ext directory, or copy it to the directory referred to by the environment variable Path, then configure the ext directory under the EXT.conf file below the format. :
######################################################################################################################################################################################################################################################################################################## #################################################
#
# xeval plugin configuration file
#
# 开 # # 注 行 行 行 行 配置 配置 配置 配置 配置 配置 配置 配置 配置 配置 配置 配置Configuring a line can have one or more, each configuration line format is
# (The configuration line that does not meet the following format will be ignored):
#
#
#
#, "Where," executable program name> corresponding to the EXE or COM file or put it in an ext directory or placed in environment variables
# PATH indicated by the directory. This executable should be a read standard input and write the results to standard output.
# 台 程序.
#
# Ctrl Alt P
#
# 按 表示 按 按 按 c and alt, press P to
#
# Alt Ctrl Shift F3
#
# 按 按 t t, shift, and alt, press F3 key, etc.
#
######################################################################################################################################################################################################################################################################################################## ####################################################################################################################################################################################################################################################################################
Calc.exe, Ctrl Alt F5
# Scheme Language Interpreter Plugin (if the PLT Scheme is installed, you can use this plugin)
# Mzscheme, Ctrl Alt F9
Supplementary description
Finally, explain that, I developed Xeval just to practice Jef Raskin's user interface design idea, and did not try to write very strong and stable software (there should also have similar but more mature software tools). So, I am using the simplest technologies when I encode, and I didn't do more tests after encoding. If you find that Xeval exists or such questions, you can change and debug XEVAL from the source code to get the best use effect.