View Single Post
Old 09-23-2009, 07:47 PM   #11
rogue_ronin
Banned
rogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-books
 
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
Quote:
Originally Posted by dmikov View Post
I would vote for JavaScript, not that I like it, but working with c# all day long wont' have problem switching, so I would imagine Java or c++ programmers.
Basic sounds good, but it's just more typing and non case sensitive - dubious advantage.
If I had to learn new scripting or scripting like language I would vote for ruby. Had a very tough time learning lua.
It is "more typing" that makes it easier. I can remember what GetDocumentName means (NoteTab example.) When I drop to, say, bash, I have to use Google whenever I want to script something. What the hell is a '[', and where can I find documentation? It isn't an enclosure, that's for sure. It's actually a word of some sort, related to 'if'.

When I said BASIC, I basically (hah!) meant that it should be relatively easy to learn and simple in syntax. The example I gave with NoteTab falls into that paradigm. It can do amazing stuff, but it is really easy to learn. Over time, it added more than just text manipulation -- it moved into regex, file management, disk-access, web-capability, and more.

The point is to make it accessible to non-programmers. Folks editing and formatting their favorite books are not likely to be conversant with the ins and outs of proper programming. But if you can come at it from a simpler format, you'll get a lot more people contributing useful macros. And you can always add complexity.

I'm not a complete idiot, and I've programmed macros for years -- but when I start seeing massively indented bracket outlines, I just turn right off, lose enthusiasm. When I switched to Linux, I looked for a text editor that was programmable, comparable to NoteTab. I found Nedit, and a few others -- but they all required knowledge of C, or C structuring, familiarity with low-level use of environment variables, sed, etc. They were programmer's editors (which is natural, considering the nature of Linux.) I still keep a Virtual Machine of Win2K in order to run the latest NoteTab because I can't find a replacement (what, 8 or 9 years later...)

A macro in a text (or HTML, or writer's) editor is a list of instructions, manipulating (in this case) text and variables -- do this, then this, add it to the other thing, and put it over here. I feel that it should be as straightforward and simple as possible, while still retaining capacity to do anything at all that the host editor can do. Add hooks to other scripting languages if you want, but keep the native language simple.

BASIC is a good example of this sort of thinking (and Clip, from NoteTab) -- javascript is not, nor C*. Perhaps AppleScript, too, is a good example. What I remember of it was some sort of 'natural' language syntax. I thought it was a little loose, but better too loose than too strict.

Book editing is much closer to artistry (writing) than programming (as it is usually performed.) Make tools that enable the likely sort of people that will be using the editor.

$.02

m a r

Last edited by rogue_ronin; 09-23-2009 at 07:52 PM. Reason: Added an example.
rogue_ronin is offline   Reply With Quote