Monday, December 2, 2013

Re: mzscheme-vimext to Serguey Khorev

On Monday, December 2, 2013 5:40:48 AM UTC-2, Sergey Khorev wrote:
> I am not sure whether it is ok to post a question to a specific member. However, I think that Serguey Khoreve is the person in better position to answer me. In the documentation of vim-mzscheme, I found references to a vimext module. Besides this, when I require vimext, vim-mzscheme searches the collects. It seems that many necessary commands are defined in vimext. However, I could not find vimext neither in Vim sources nor in the Internet.
>
>
>
>
>
>
>
> When I have enough time I scan Vim maillists for relevant words in subjects like MzScheme, Racket, Cscope, GDB etc. And when I don't I can keep personal emails unanswered for weeks and months. Maillists have the advantage that someone else can reply if the topic is relevant for them. I've replied to your personal email but am copying it here for everyone's benefit.
>
>
>
>
>
>
> vimext is built into Vim so it is available once you compiled it. Perhaps instructions in :h :mzscheme are not clear enough but I can't make my mind to make them more usable.
>
>
>
>
> Basically all you need is import the module:
>
>
> :mzscheme (require (prefix-in vim- 'vimext)) ; import vimext with prefix "vim-", now all functions described in :h :mzscheme are available with the "vim-" prefix:
>
>
>
> :mzscheme (vim-set-buff-line 1 "This is line #1")
>
> etc
>
>
>
>
>
>
> Please be aware that I haven't updated the interface for quite a while so probably it's more buggy than, for instance, the Python interface.

Thanks Sergey, for promptly answering me, and for the great piece of software. Since you mentioned everyone's benefits, I will make a few comments on mzscheme-vim, for everyone's benefits.

Mzscheme-vim is a great contribution to Vim. In fact, I would not be using Vim if it had not mzscheme-vim. First of all, it is fast. It is at least 30 times faster than Python. Secondly, it is very well designed, and it is Lisp. This means that one can port easily Lisp programs that do things like natural language processing, semantic search, simplification of electronic circuits, etc. My favorite program, that runs flawlessly in mzscheme-vim, makes greek editions of the Iliad and Odyssey in Latex. As you know, Greek is a catch all name for many languages.

The language that Homer used is very different from the language of Plato, or the language spoken in Greece today. Just one example to make things clear: Plato's language, that is called Attic, has definite articles, like German. Homer's language does not have articles, like Russian or Latin. Besides this, Homer language has resources to ease memorization and scanning.

The Iliad and the Odyssey uses an alphabet derived from Greek, but with additional letters for sounds that did not exist in Greek. The same thing happens to Russian. The extra letters, in the case of Homer, are the digamma, the vau, and the koppa. The filter program takes OCR output and generates beautiful Latex renderings of the two great books. Mzscheme-vim runs these filters perfectly well, in a acceptable time (5 minutes for one chapter of the Odyssey).

Homeric Greek is the language that we use at home. This is a quirk introduced by my grandfather. The result is that we need to prepare reading primers for the kids. These primers need to be ported to ebook readers, like the Kindle or the Kobo. Scheme is a great language for this kind of job (although we use python too).

Just another example. My wife is a lawyer and her law firm often needs to prepare outlines of large legal pleadings and other formal written statement. The programs to do this are mostly written in Common Lisp or Scheme. We discover over this weekend, that these programs run flawlessly in mzscheme-vim.

To make a long story short, I strongly recommend mzscheme-vim. To install it:

1 -- Compile Racket from sources withe futures and places disabled. Here are the compilation lines:

racket-5.3.6/src# ./configure --disable-futures\
--disable-places --prefix=/usr/local

make

sudo make install

2 -- Compile Vim with mzscheme enabled. For the lawyers' needs, one can compile Vim with-features=small. This means that the build will be small enough for the lawyer running it from a pen drive in the court's machines. However, you may want to build Vim with-features=huge. Dr. Chip Campbell explains the difference between these buildings in his page:

http://www.drchip.org/astronaut/vim/vimfeat.html

After this long introduction, here is the process of installing mz-vim:

~/vim# ./configure --enable-mzschemeinterp --with-futures=small

~/vim# make

~/vim# make install

Do it. It is worth your time.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: