Re 本是:
很久没有就兄的作品发表看法,因为我发现已经有许多人开始关注这个程序,并提出了一些中肯的意见和建议,便萌生了功成身退的打算。只是最近不知是何原因,VTMagic的更新进度明显变缓,有鉴于此,再次研习了你的作品,就以下方面陈述自己的意见和建议,希望对你的新一步研发起到些微的助力。
算法设计
从3.0至5.0的版本跨度上猜测,兄非常重视这次算法上的改进;很显然,这次算法改进确实提高某些方式下的字模载入速度,但如果考虑到 VTMagic 本身64汉字的限制,相信这些效率上的提高很难为用户所察觉,也就是说,有可能程序的外在表现并无多大变化,但它的内在复杂度确有显著提高,这未必是我们所希望的。
现在有一种新的编码方式,把待分析文本串中未出现的标准ASCII码字符也纳入新的字模修改码表中。若如此,当分析一篇全为汉字的文本时,它可以最多支持128个汉字。这种编码方式的缺点是,对后续进程中常用字符的显示造成不便,但可以通过 /R 恢复字模来解决。
可显示的汉字数过少仍然是较为突出的限制,虽然我们很少用它显示一个长篇汉字文本,但是如果它能支持显示一屏汉字数40*25的话,仍然是非常有用的。你曾经说过,“以VGA硬件是不可能通过修改字符集来实现同屏显示25x80/2个汉字的,只能搞修改硬件设置让图形与字符同屏显示”。那如果我们换个思路,在真实机下实现出类似VPC的延迟刷新,是否有这个可能呢?
或者,采用人为的分布式处理的办法,首先处理一行80个字符(或者达到显示汉字数上限为止),待生成相应的 .EXE 和 .NEW 文件后,再处理下一行80个字符(或者下一段最大可显示区域),生成新的 .EXE 和 .NEW 文件,以此循环往复,直到所有的文本处理完毕。
帮助信息
1、英文版中 /^ 说明、 /P 示例和 TS?.EXE 提示中出现了一些汉字
2、中文版中出现了 Send me donation
3、英/中文版中 /H 和 else 说明文字缩进格式有误;
命令选项
1、命令和选项的区别不是很大,建议合并,即同时兼容/命令和-选项,并且等同处理;
建议以冒号分隔命令和其后的参数,在批处理中很有用,可以有效减少参数的个数;
-m 和/m 建议改为 /G(ap),指定它时有缝,未指定时无缝;
其命令方面的作用不是很大,因为通常不需要反复改变其状态;
2、/R 4|8 建议改为 /N ,指定时为 40 列的窄屏模式,缺省时为80列的正常模式,并使用新命令 /C 控制清屏;
3、/t 建议改为 /i:file ,它仅控制从文件获取文本串输入,而不控制输出的目标;
当命令行中存在非命令选项的文本串时自动从中获取,当输入流中存在文本串时自动从中获取;
当以上三处均未发现文本串时,提示用户输入;
4、/o:file 控制向文件或者输出流输出,指定时输出至文件,缺省时输出至流;
因为输出流可重定向至文件,所以这个开关是可取消的;
5、/^ 建议改为 /X,/+ 建议改为 /M,原设定可以不用考虑大小写,但可能在特殊的命令行中遇到麻烦;
另外,扩展字体的用法至今没有掌握,不知是否可以略作说明?
原命令和选项 建议命令和选项
-M 9|8 /G (Gap) 汉字缝隙:设定时为有缝汉字,缺省时无缝汉字
-I 0|1|2 /L:C|E (Languge) 语言环境:C=中文,E=英文,缺省时自动判断
-C 0|1|2 /C<img src="images/smilies/face-surprise.png" align="absmiddle" border="0">|s|p 编码方式: o(riginal)=原汉字内码
s(erial)=串序码(80,81,82,83...),
p(arallel)=并序码(C0,80,C1,81,...)
nnH 指定16进制起始码,nnn 指定10进制起始码
默认为 80H/128 ,建议取消 >= 80H 的限制
-Y J|F|... /S:J|F|...(Style) 字体风格: J=简, F=繁, C=粗, X=XZL, V=仿宋,...
/M 9|8 /G
/R 4|8 /R:N (Restore) 恢复原字模,指定N时,使用
/C 清屏
/P|p 含汉字和English的串 当命令行中存在非命令选项的文本串时自动从中获取
/I|i 当输入流中存在文本串时自动从中获取
均不存在时提示用户输入
/T|t d:\dir\filename.ext /I:File 从文件中获取文本串输入
/O:File 指定时输出至文件,可指定文件名,缺省时输出至流
/Y /W
/+ 1.exe 2.exe 3.exe /M
/^ h横z纵k纵k横k扩 /X
Re Ben Shi:
Haven't expressed my views on your work for a long time because I found that many people have started to pay attention to this program and put forward some objective opinions and suggestions, so I had the idea of retiring successfully. But recently, I don't know what the reason is, the update progress of VTMagic has obviously slowed down. In view of this, I studied your work again and stated my opinions and suggestions on the following aspects, hoping to be of some help to your new development.
Algorithm Design
Guessing from the version span from 3.0 to 5.0, you attach great importance to this algorithm improvement; obviously, this algorithm improvement does increase the font loading speed in some ways, but considering the 64-character limit of VTMagic itself, I believe these efficiency improvements are difficult to be noticed by users, that is to say, it is possible that the external performance of the program has not changed much, but its internal complexity has increased significantly, which may not be what we hope for.
There is now a new encoding method that includes the standard ASCII characters not appearing in the text string to be analyzed into the new font modification code table. If so, when analyzing a text composed entirely of Chinese characters, it can support up to 128 Chinese characters. The disadvantage of this encoding method is that it causes inconvenience to the display of commonly used characters in subsequent processes, but it can be solved by restoring the font with /R.
The too few displayable Chinese characters is still a relatively prominent limitation. Although we rarely use it to display a long Chinese text, it is still very useful if it can support displaying 40*25 Chinese characters per screen. You once said, "It is impossible to display 25x80/2 Chinese characters on the same screen by modifying the character set with VGA hardware; only modifying the hardware settings to display graphics and characters on the same screen can be done." Then if we change our thinking, is it possible to realize the delay refresh similar to VPC under the real machine?
Or, adopt the method of artificial distributed processing. First, process 80 characters per line (or until the upper limit of the number of displayable Chinese characters is reached), generate the corresponding .EXE and .NEW files, then process the next 80 characters per line (or the next maximum displayable area), generate new .EXE and .NEW files, and so on until all the text processing is completed.
Help Information
1. Some Chinese characters appear in the description of /^, the example of /P, and the prompt of TS?.EXE in the English version.
2. "Send me donation" appears in the Chinese version.
3. The indentation format of the description text of /H and else in the English/Chinese version is incorrect.
Command Options
1. The difference between commands and options is not very big. It is suggested to merge them, that is, to be compatible with /command and -option at the same time, and to process them equally; it is suggested to separate the command and its subsequent parameters with a colon, which is very useful in batch processing and can effectively reduce the number of parameters; -m and /m are suggested to be changed to /G(ap), with a gap when specified, and no gap when not specified; its role in commands is not very big because it is usually not necessary to change its state repeatedly.
2. /R 4|8 is suggested to be changed to /N, with 40-column narrow screen mode when specified, and 80-column normal mode by default, and a new command /C is used to control clearing the screen.
3. /t is suggested to be changed to /i:file, which only controls obtaining text string input from the file, not controlling the output target; automatically obtain from it when there is a text string in the command line that is not a command option, and automatically obtain from it when there is a text string in the input stream; prompt the user to input when none of the above three places finds a text string.
4. /o:file controls outputting to a file or output stream, outputting to the file when specified, and outputting to the stream by default; because the output stream can be redirected to the file, this switch is cancelable.
5. /^ is suggested to be changed to /X, /+ is suggested to be changed to /M, the original settings can not consider case sensitivity, but may encounter troubles in special command lines; in addition, the usage of extended fonts has not been mastered so far, I wonder if it can be briefly explained?
Original command and option Suggested command and option
-M 9|8 /G (Gap) Chinese character gap: with gap when set, no gap when not set
-I 0|1|2 /L:C|E (Languge) Language environment: C=Chinese, E=English, automatically judged by default
-C 0|1|2 /C:o|s|p Encoding method: o(riginal)=original Chinese character internal code
s(erial)=string sequence code (80,81,82,83...),
p(arallel)=parallel sequence code (C0,80,C1,81,...)
nnH specifies the 16进制 starting code, nnn specifies the decimal starting code
The default is 80H/128, it is suggested to cancel the limit of >= 80H
-Y J|F|... /S:J|F|...(Style) Font style: J=simple, F=complex, C=bold, X=XZL, V=simulated Song, etc.
/M 9|8 /G
/R 4|8 /R:N (Restore) Restore original font, use when N is specified
/C Clear screen
/P|p 含汉字和English的串 Automatically obtain from it when there is a text string in the command line that is not a command option
/I|i Automatically obtain from it when there is a text string in the input stream
Prompt the user to input when none exists
/T|t d:\dir\filename.ext /I:File Obtain text string input from the file
/O:File Output to the file when specified, output to the stream by default
/Y /W
/+ 1.exe 2.exe 3.exe /M
/^ h横z纵k纵k横k扩 /X