<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: New customs</title>
	<link>http://blog.ngedit.com/2005/05/31/new-customs/</link>
	<description>A blog on the development of the NGEDIT text editor</description>
	<pubDate>Thu, 28 Aug 2008 02:25:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>By: J</title>
		<link>http://blog.ngedit.com/2005/05/31/new-customs/#comment-18</link>
		<dc:creator>J</dc:creator>
		<pubDate>Sat, 04 Jun 2005 00:35:41 +0000</pubDate>
		<guid>http://blog.ngedit.com/2005/05/31/new-customs/#comment-18</guid>
		<description>Sorry about the indentation, doesn't work in comments :(</description>
		<content:encoded><![CDATA[<p>Sorry about the indentation, doesn&#8217;t work in comments <img src='http://blog.ngedit.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J</title>
		<link>http://blog.ngedit.com/2005/05/31/new-customs/#comment-17</link>
		<dc:creator>J</dc:creator>
		<pubDate>Fri, 03 Jun 2005 22:00:50 +0000</pubDate>
		<guid>http://blog.ngedit.com/2005/05/31/new-customs/#comment-17</guid>
		<description>Rob, I understand perfectly that the user couldn't care less about the effort it takes me to develop the underlying scripting engine. It was a reason for me because it fits the bill I am trying to cover. The main goal is to write the vi/vim emulation layer and the inter-operation with MSDev. Users may be writing short snippets of code, but, c'mon, something like this seems so simple to look at, understand and modify:


//----------------------------------------------------------------------------
function IProcessChar ( key, modifkey )
{
  if (s_fnHandler) { // For example, after pressing 'r' or weird stuff within INPUT mode
    s_fnHandler(key, modifkey);

    // Were we waiting for a pending motion?
    if (s_PendingMotion) {
      if (s_PendingMotion(false))
        s_iWaitingWhat = W_COMMAND;
    }
  ...


As a result of this thread, now I think that it might make sense either to derivate NGS towards actual Javascript or implement Lua or Python support in the future (but not before the first release).

This is the only scripting I ever had to do for vim, in order to switch between a '.h' file and its corresponding '.cpp' file with a keystroke:


function! OpenMatchingCPP_H()
  if expand("%:t:e") == "h"
    e %:t:r.cpp
  else
    e %:t:r.h
  endif
endfunction


String manipulation is more awkward to me, although it probably didn't take over 30 minutes to figure out and hack in.

Looking at other editors out there: UltraEdit has a language so simple that I couldn't figure out how to write the above h-cpp macro, and think it is not doable. MS Visual Studio seems to use VBasic or something similar. Emacs... as they say, it is actually a good OS, it just lacks a decent editor. I don't even remember what other editors use.

There are (or have been) other editors with good scripting support, such as The Semware Editor, and there still are around there ("Soft as it gets"' ED, Lugaru's epsilon, ...). I wanted a language powerful enough not to stumble into stupid limitation walls and to develop a few of the features of NGEDIT which seem better served in a scripting language than in native C/C++.

I was almost about to complain about the lack of a decent debugger for NGS until I write one, I'm just afraid you'll all jump at my neck to bite me for making The One Wrong Decision :)</description>
		<content:encoded><![CDATA[<p>Rob, I understand perfectly that the user couldn&#8217;t care less about the effort it takes me to develop the underlying scripting engine. It was a reason for me because it fits the bill I am trying to cover. The main goal is to write the vi/vim emulation layer and the inter-operation with MSDev. Users may be writing short snippets of code, but, c&#8217;mon, something like this seems so simple to look at, understand and modify:</p>
<p>//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
function IProcessChar ( key, modifkey )<br />
{<br />
  if (s_fnHandler) { // For example, after pressing &#8216;r&#8217; or weird stuff within INPUT mode<br />
    s_fnHandler(key, modifkey);</p>
<p>    // Were we waiting for a pending motion?<br />
    if (s_PendingMotion) {<br />
      if (s_PendingMotion(false))<br />
        s_iWaitingWhat = W_COMMAND;<br />
    }<br />
  &#8230;</p>
<p>As a result of this thread, now I think that it might make sense either to derivate NGS towards actual Javascript or implement Lua or Python support in the future (but not before the first release).</p>
<p>This is the only scripting I ever had to do for vim, in order to switch between a &#8216;.h&#8217; file and its corresponding &#8216;.cpp&#8217; file with a keystroke:</p>
<p>function! OpenMatchingCPP_H()<br />
  if expand(&#8221;%:t:e&#8221;) == &#8220;h&#8221;<br />
    e %:t:r.cpp<br />
  else<br />
    e %:t:r.h<br />
  endif<br />
endfunction</p>
<p>String manipulation is more awkward to me, although it probably didn&#8217;t take over 30 minutes to figure out and hack in.</p>
<p>Looking at other editors out there: UltraEdit has a language so simple that I couldn&#8217;t figure out how to write the above h-cpp macro, and think it is not doable. MS Visual Studio seems to use VBasic or something similar. Emacs&#8230; as they say, it is actually a good OS, it just lacks a decent editor. I don&#8217;t even remember what other editors use.</p>
<p>There are (or have been) other editors with good scripting support, such as The Semware Editor, and there still are around there (&#8221;Soft as it gets&#8221;&#8216; ED, Lugaru&#8217;s epsilon, &#8230;). I wanted a language powerful enough not to stumble into stupid limitation walls and to develop a few of the features of NGEDIT which seem better served in a scripting language than in native C/C++.</p>
<p>I was almost about to complain about the lack of a decent debugger for NGS until I write one, I&#8217;m just afraid you&#8217;ll all jump at my neck to bite me for making The One Wrong Decision <img src='http://blog.ngedit.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Walling</title>
		<link>http://blog.ngedit.com/2005/05/31/new-customs/#comment-16</link>
		<dc:creator>Rob Walling</dc:creator>
		<pubDate>Fri, 03 Jun 2005 20:07:01 +0000</pubDate>
		<guid>http://blog.ngedit.com/2005/05/31/new-customs/#comment-16</guid>
		<description>It probably is easier/faster for you to write a new scripting language from scratch, but from a developer's perspective a text editor would be more attractive if it used a language that we already know. Speaking for myself, I'm not going to take the time to learn a scripting langauge that only applies to one small subset of the programming world.

In terms of usability, JavaScript or Python would be a big selling point over a proprietary scripting language.

Keep up the good work! It makes for interesting reading...</description>
		<content:encoded><![CDATA[<p>It probably is easier/faster for you to write a new scripting language from scratch, but from a developer&#8217;s perspective a text editor would be more attractive if it used a language that we already know. Speaking for myself, I&#8217;m not going to take the time to learn a scripting langauge that only applies to one small subset of the programming world.</p>
<p>In terms of usability, JavaScript or Python would be a big selling point over a proprietary scripting language.</p>
<p>Keep up the good work! It makes for interesting reading&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Sink</title>
		<link>http://blog.ngedit.com/2005/05/31/new-customs/#comment-14</link>
		<dc:creator>Eric Sink</dc:creator>
		<pubDate>Fri, 03 Jun 2005 14:37:18 +0000</pubDate>
		<guid>http://blog.ngedit.com/2005/05/31/new-customs/#comment-14</guid>
		<description>I actually like the scripting language idea.</description>
		<content:encoded><![CDATA[<p>I actually like the scripting language idea.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J</title>
		<link>http://blog.ngedit.com/2005/05/31/new-customs/#comment-11</link>
		<dc:creator>J</dc:creator>
		<pubDate>Fri, 03 Jun 2005 11:33:01 +0000</pubDate>
		<guid>http://blog.ngedit.com/2005/05/31/new-customs/#comment-11</guid>
		<description>Marcin,

Thanks for the advice. I think your points are right, and I take note regarding promotion through scripting language user groups. Thanks for your support and I'll keep your comments in mind.</description>
		<content:encoded><![CDATA[<p>Marcin,</p>
<p>Thanks for the advice. I think your points are right, and I take note regarding promotion through scripting language user groups. Thanks for your support and I&#8217;ll keep your comments in mind.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J</title>
		<link>http://blog.ngedit.com/2005/05/31/new-customs/#comment-10</link>
		<dc:creator>J</dc:creator>
		<pubDate>Fri, 03 Jun 2005 11:30:09 +0000</pubDate>
		<guid>http://blog.ngedit.com/2005/05/31/new-customs/#comment-10</guid>
		<description>Chris,

The NGS language is almost a subset of JavaScript. Except for the fact that every object in NGS is both an object and an array at the same time, and the lack of objet protos (so far), I'd have to check the specs to see where it deviates.

Regarding syntax, my post may have not been clear enough. I've made the commas and semicolons optional, they keep the same meaning as always and you can ellide them where they are not necessary for the parser. You could do this to a C/C++ parser, and no legal programs would change their meaning, while many interesting illegal programs would become legal. It's just allowing the user to get rid of innecessary punctuation.

The optional punctuation is more of an interesting experiment than anything else, which I decided to do as I wrote the parser and became conscious of the amount of "red-tape" in C-like syntax.

Turning it into real JavaScript should be quite painless, and I'll consider it later down the road when the to-do list is less bulky.</description>
		<content:encoded><![CDATA[<p>Chris,</p>
<p>The NGS language is almost a subset of JavaScript. Except for the fact that every object in NGS is both an object and an array at the same time, and the lack of objet protos (so far), I&#8217;d have to check the specs to see where it deviates.</p>
<p>Regarding syntax, my post may have not been clear enough. I&#8217;ve made the commas and semicolons optional, they keep the same meaning as always and you can ellide them where they are not necessary for the parser. You could do this to a C/C++ parser, and no legal programs would change their meaning, while many interesting illegal programs would become legal. It&#8217;s just allowing the user to get rid of innecessary punctuation.</p>
<p>The optional punctuation is more of an interesting experiment than anything else, which I decided to do as I wrote the parser and became conscious of the amount of &#8220;red-tape&#8221; in C-like syntax.</p>
<p>Turning it into real JavaScript should be quite painless, and I&#8217;ll consider it later down the road when the to-do list is less bulky.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J</title>
		<link>http://blog.ngedit.com/2005/05/31/new-customs/#comment-9</link>
		<dc:creator>J</dc:creator>
		<pubDate>Fri, 03 Jun 2005 11:23:49 +0000</pubDate>
		<guid>http://blog.ngedit.com/2005/05/31/new-customs/#comment-9</guid>
		<description>Doug,

Thanks for the support. I'm implementing vi emulation because it is what I need in order to become a full-time user of NGEDIT. I plan on implementing other modes later - emacs keychords is a good candidate although its full underlying lisp system is not (even if using lisp as the scripting language for NGEDIT did pass my mind).</description>
		<content:encoded><![CDATA[<p>Doug,</p>
<p>Thanks for the support. I&#8217;m implementing vi emulation because it is what I need in order to become a full-time user of NGEDIT. I plan on implementing other modes later - emacs keychords is a good candidate although its full underlying lisp system is not (even if using lisp as the scripting language for NGEDIT did pass my mind).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcin Kaszynski</title>
		<link>http://blog.ngedit.com/2005/05/31/new-customs/#comment-8</link>
		<dc:creator>Marcin Kaszynski</dc:creator>
		<pubDate>Fri, 03 Jun 2005 09:31:24 +0000</pubDate>
		<guid>http://blog.ngedit.com/2005/05/31/new-customs/#comment-8</guid>
		<description>Hi,

about the scripting language issue again: it is not just a matter of implementation or api.  I created a scripting language for a commercial product once and since then my advice to everyone is "don't do as I did".  The hassle is much, much more than it initially seems.  Next time I'll just use Lua.

Creating a new language means, among others:

1. documenting it: writing a tutorial or two, writing language specification, some examples and so on,

2. supporting it: you will get bugs to fix, you will get "why doesn't this work" questions, you will have to baby-sit new users, you will get feature requests,

3. writing all the base code (libraries) in the language yourself.

If you choose to use an existing language that already gathered a community around itself (like Lua or Python) you can simply tap into its resources -- polished implementation, documentation, libraries and mailing lists you can divert some of the support questions to.  Plus, you get a large group of people that might check out your editor simply because it uses a language they know and like.  You might even find some evangelists for ngedit among them :)  

You really shouldn't undervalue the free publicity and marketing consequences of this.

That said, good luck with the editor.  There is definitely not enough software developed with usability in mind :)</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>about the scripting language issue again: it is not just a matter of implementation or api.  I created a scripting language for a commercial product once and since then my advice to everyone is &#8220;don&#8217;t do as I did&#8221;.  The hassle is much, much more than it initially seems.  Next time I&#8217;ll just use Lua.</p>
<p>Creating a new language means, among others:</p>
<p>1. documenting it: writing a tutorial or two, writing language specification, some examples and so on,</p>
<p>2. supporting it: you will get bugs to fix, you will get &#8220;why doesn&#8217;t this work&#8221; questions, you will have to baby-sit new users, you will get feature requests,</p>
<p>3. writing all the base code (libraries) in the language yourself.</p>
<p>If you choose to use an existing language that already gathered a community around itself (like Lua or Python) you can simply tap into its resources &#8212; polished implementation, documentation, libraries and mailing lists you can divert some of the support questions to.  Plus, you get a large group of people that might check out your editor simply because it uses a language they know and like.  You might even find some evangelists for ngedit among them <img src='http://blog.ngedit.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>You really shouldn&#8217;t undervalue the free publicity and marketing consequences of this.</p>
<p>That said, good luck with the editor.  There is definitely not enough software developed with usability in mind <img src='http://blog.ngedit.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Hutchinson</title>
		<link>http://blog.ngedit.com/2005/05/31/new-customs/#comment-7</link>
		<dc:creator>Chris Hutchinson</dc:creator>
		<pubDate>Fri, 03 Jun 2005 07:09:27 +0000</pubDate>
		<guid>http://blog.ngedit.com/2005/05/31/new-customs/#comment-7</guid>
		<description>I second the comment on Yet Another Scripting Language. Is it too late to consider switching to something standard?  You discuss various similarities with Javascript, why not implement a stripped-back dialect of JS, so the syntax is compatible. Leaving out list separators in function calls looks v. alien to me. 

Good luck with it all. Glad you're implement vim support.</description>
		<content:encoded><![CDATA[<p>I second the comment on Yet Another Scripting Language. Is it too late to consider switching to something standard?  You discuss various similarities with Javascript, why not implement a stripped-back dialect of JS, so the syntax is compatible. Leaving out list separators in function calls looks v. alien to me. </p>
<p>Good luck with it all. Glad you&#8217;re implement vim support.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug Tolton</title>
		<link>http://blog.ngedit.com/2005/05/31/new-customs/#comment-6</link>
		<dc:creator>Doug Tolton</dc:creator>
		<pubDate>Fri, 03 Jun 2005 02:29:31 +0000</pubDate>
		<guid>http://blog.ngedit.com/2005/05/31/new-customs/#comment-6</guid>
		<description>I see that you are putting VI support into the editor, not to start a flame war, but any chance of putting Emacs key chords in?  By putting only VI emulation in, you are leaving out those of use who eschew VI in favor of the one true editor. :)

Good luck with the editor, personally I think there is plenty of room in the windows market for a good developer text editor.</description>
		<content:encoded><![CDATA[<p>I see that you are putting VI support into the editor, not to start a flame war, but any chance of putting Emacs key chords in?  By putting only VI emulation in, you are leaving out those of use who eschew VI in favor of the one true editor. <img src='http://blog.ngedit.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Good luck with the editor, personally I think there is plenty of room in the windows market for a good developer text editor.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
