Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.misc > #13414 > unrolled thread

Build Your Own Text Editor

Started byRich <rich@example.invalid>
First post2017-04-06 01:27 +0000
Last post2017-04-07 08:48 -0800
Articles 6 — 6 participants

Back to article view | Back to comp.misc


Contents

  Build Your Own Text Editor Rich <rich@example.invalid> - 2017-04-06 01:27 +0000
    Re: Build Your Own Text Editor The Real Bev <bashley101@gmail.com> - 2017-04-05 19:58 -0700
    Re: Build Your Own Text Editor Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-04-06 11:16 +0100
      Re: Build Your Own Text Editor Bob Eager <news0006@eager.cx> - 2017-04-06 21:01 +0000
    Re: Build Your Own Text Editor root <NoEMail@home.org> - 2017-04-06 16:40 +0000
    Re: Build Your Own Text Editor Tim Sprout <timsprout@gci.net> - 2017-04-07 08:48 -0800

#13414 — Build Your Own Text Editor

FromRich <rich@example.invalid>
Date2017-04-06 01:27 +0000
SubjectBuild Your Own Text Editor
Message-ID<7kUTKOW818iIat6PF3PosJwV@dont-email.me>
http://viewsourcecode.org/snaptoken/kilo/

Quoting from the URL above:

   Welcome! This is an instruction booklet that shows you how to build a
   text editor in C.

   The text editor is antirez's kilo, with some changes. It's about 1000
   lines of C in a single file with no dependencies, and it implements all
   the basic features you expect in a minimal editor, as well as syntax
   highlighting and a search feature.

   This booklet walks you through building the editor in 184 steps. Each
   step, you'll add, change, or remove a few lines of code. Most steps,
   you'll be able to observe the changes you made by compiling and running
   the program immediately afterwards.

   I explain each step along the way, sometimes in a lot of detail. Free
   free to skim or skip the prose, as the main point of this is that you
   are going to build a text editor from scratch! Anything you learn along
   the way is bonus, and there's plenty to learn just from typing in the
   changes to the code and observing the results.

   See the appendices for more information on the tutorial itself
   (including what to do if you get stuck, and where to get help).

   If you're ready to begin, then go to chapter 1!

   ...

[toc] | [next] | [standalone]


#13415

FromThe Real Bev <bashley101@gmail.com>
Date2017-04-05 19:58 -0700
Message-ID<oc4an5$22j$1@dont-email.me>
In reply to#13414
On 04/05/2017 06:27 PM, Rich wrote:
> http://viewsourcecode.org/snaptoken/kilo/
>
> Quoting from the URL above:
>
>     Welcome! This is an instruction booklet that shows you how to build a
>     text editor in C.
>
>     The text editor is antirez's kilo, with some changes. It's about 1000
>     lines of C in a single file with no dependencies, and it implements all
>     the basic features you expect in a minimal editor, as well as syntax
>     highlighting and a search feature.
>
>     This booklet walks you through building the editor in 184 steps. Each
>     step, you'll add, change, or remove a few lines of code. Most steps,
>     you'll be able to observe the changes you made by compiling and running
>     the program immediately afterwards.
>
>     I explain each step along the way, sometimes in a lot of detail. Free
>     free to skim or skip the prose, as the main point of this is that you
>     are going to build a text editor from scratch! Anything you learn along
>     the way is bonus, and there's plenty to learn just from typing in the
>     changes to the code and observing the results.
>
>     See the appendices for more information on the tutorial itself
>     (including what to do if you get stuck, and where to get help).
>
>     If you're ready to begin, then go to chapter 1!


WARNING!!!  Addiction possibilities.  Hubby has been working on his 
since 1977.


-- 
Cheers, Bev
   "It is never fallacious to properly cite Donald Knuth in
    lieu of providing your own argument."         --Sun Tzu

[toc] | [prev] | [next] | [standalone]


#13416

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2017-04-06 11:16 +0100
Message-ID<87fuhlon6t.fsf@bsb.me.uk>
In reply to#13414
Rich <rich@example.invalid> writes:

> http://viewsourcecode.org/snaptoken/kilo/
>
> Quoting from the URL above:
>
>    Welcome! This is an instruction booklet that shows you how to build a
>    text editor in C.
>
>    The text editor is antirez's kilo, with some changes. It's about 1000
>    lines of C in a single file with no dependencies,

For some small value of "no"!  It needs termios.h and unistd.h which may
be very widely available (I'm not well informed on the state of Windows
libraries) but they are not standard C.

BTW, I think it's an excellent example of how to present a programming
project.

<snip>
-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#13424

FromBob Eager <news0006@eager.cx>
Date2017-04-06 21:01 +0000
Message-ID<eknoluFdokpU14@mid.individual.net>
In reply to#13416
On Thu, 06 Apr 2017 11:16:58 +0100, Ben Bacarisse wrote:

> Rich <rich@example.invalid> writes:
> 
>> http://viewsourcecode.org/snaptoken/kilo/
>>
>> Quoting from the URL above:
>>
>>    Welcome! This is an instruction booklet that shows you how to build
>>    a text editor in C.
>>
>>    The text editor is antirez's kilo, with some changes. It's about
>>    1000 lines of C in a single file with no dependencies,
> 
> For some small value of "no"!  It needs termios.h and unistd.h which may
> be very widely available (I'm not well informed on the state of Windows
> libraries) but they are not standard C.

He does say that you need a UNIX-y environment on Windows.
-- 
Using UNIX since v6 (1975)...

Use the BIG mirror service in the UK:
 http://www.mirrorservice.org

[toc] | [prev] | [next] | [standalone]


#13418

Fromroot <NoEMail@home.org>
Date2017-04-06 16:40 +0000
Message-ID<oc5r22$eak$1@news.albasani.net>
In reply to#13414
Rich <rich@example.invalid> wrote:
> http://viewsourcecode.org/snaptoken/kilo/
>
> Quoting from the URL above:
>
>    Welcome! This is an instruction booklet that shows you how to build a
>    text editor in C.
>
>    The text editor is antirez's kilo, with some changes. It's about 1000
>    lines of C in a single file with no dependencies, and it implements all
>    the basic features you expect in a minimal editor, as well as syntax
>    highlighting and a search feature.
>
>    This booklet walks you through building the editor in 184 steps. Each
>    step, you'll add, change, or remove a few lines of code. Most steps,
>    you'll be able to observe the changes you made by compiling and running
>    the program immediately afterwards.
>
>    I explain each step along the way, sometimes in a lot of detail. Free
>    free to skim or skip the prose, as the main point of this is that you
>    are going to build a text editor from scratch! Anything you learn along
>    the way is bonus, and there's plenty to learn just from typing in the
>    changes to the code and observing the results.
>
>    See the appendices for more information on the tutorial itself
>    (including what to do if you get stuck, and where to get help).
>
>    If you're ready to begin, then go to chapter 1!
>
>    ...


This project will not get the interest it deserves. Most programming time
is spent using one's editor. It makes sense that the editor should do
everything to make life easier. Writing an editor should be the first
project taught in computer programming classes.


Once you get the idea that the function of the editor is to make life
easier for the programmer you can then abstract the idea of an editor
to a tool. Although I don't use emacs, from what I understand Stallman
abstracted his editor to the more general tool emacs.

[toc] | [prev] | [next] | [standalone]


#13428

FromTim Sprout <timsprout@gci.net>
Date2017-04-07 08:48 -0800
Message-ID<oc8fmr$og$1@dont-email.me>
In reply to#13414
On 4/5/2017 5:27 PM, Rich wrote:
> http://viewsourcecode.org/snaptoken/kilo/
>
> Quoting from the URL above:
>
>    Welcome! This is an instruction booklet that shows you how to build a
>    text editor in C.
>
>    The text editor is antirez's kilo, with some changes. It's about 1000
>    lines of C in a single file with no dependencies, and it implements all
>    the basic features you expect in a minimal editor, as well as syntax
>    highlighting and a search feature.
>
>    This booklet walks you through building the editor in 184 steps. Each
>    step, you'll add, change, or remove a few lines of code. Most steps,
>    you'll be able to observe the changes you made by compiling and running
>    the program immediately afterwards.
>
>    I explain each step along the way, sometimes in a lot of detail. Free
>    free to skim or skip the prose, as the main point of this is that you
>    are going to build a text editor from scratch! Anything you learn along
>    the way is bonus, and there's plenty to learn just from typing in the
>    changes to the code and observing the results.
>
>    See the appendices for more information on the tutorial itself
>    (including what to do if you get stuck, and where to get help).
>
>    If you're ready to begin, then go to chapter 1!

Very cool.

Tim Sprout

[toc] | [prev] | [standalone]


Back to top | Article view | comp.misc


csiph-web