Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Ralph Eastwood
Apologies, I need a better mail client. On 17 September 2014 07:39, Ralph Eastwood wrote: > Maxime Coste wrote: >> That last one is by far the most interesting, Bartos being very familliar >> with >> C++. Note that its not C that is advocated, but haskell... > > I would advocate functional langu

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Ralph Eastwood
Maxime Coste wrote: > That last one is by far the most interesting, Bartos being very familliar with > C++. Note that its not C that is advocated, but haskell... I would advocate functional languages (not necessarily Haskell) over C++ any day - although implementations of functional languages hav

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Markus Teich
Maxime Coste wrote: > That is the complaint I mostly hear about Go, the lack of Generic. That and > garbage collection. Why would I want to apply the same algorithm to semantically different arguments? Appart from different kinds of number representations no useful example comes to mind. --Markus

Re: [dev] Re: [RFC] Design of a vim like text editor

2014-09-16 Thread Markus Teich
Jimmie Houchin wrote: > I have been for the last several weeks (months) researching what language I > want to use to implement a couple of apps I want to do. What kind of apps are you planning to write? > So I have this internal debate in me as to whether or not to learn C and/or > C++. One one h

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Christoph Lohmann
Greetings. On Wed, 17 Sep 2014 06:29:01 +0200 Maxime Coste wrote: > On Tue, Sep 16, 2014 at 11:02:40PM +0200, Christoph Lohmann wrote: > > This is programming and not your playground. Avoid fancy code. > > I guess that is a matter of taste, I just know m1 + m2 calls > operator+(Matrix, Matrix).

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Maxime Coste
On Tue, Sep 16, 2014 at 12:37:44AM -0700, Markus Teich wrote: > M Farkas-Dyck wrote: > > [1] http://harmful.cat-v.org/software/c++/linus > > [2] http://gigamonkeys.wordpress.com/2009/10/16/coders-c-plus-plus/ > > Heyho, > > also relevant for the (non-)topic: > http://bartoszmilewski.com/2013/09/1

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Maxime Coste
On Tue, Sep 16, 2014 at 11:02:40PM +0200, Christoph Lohmann wrote: > > Ok, so what exactly is the sum of 3 lines and 2 bytes ? The whole point > > is to catch at compilation code that is logically invalid, if you have > > f(ByteCount, LineCount), you cannot call it with a (LineCount, ByteCount) > >

[dev] [sbase] [PATCH] Fix tail -n +

2014-09-16 Thread Wolfgang Corcoran-Mathe
Fixed typo breaking + functionality in tail: diff --git a/tail.c b/tail.c index 59e68ca..87a08b9 100644 --- a/tail.c +++ b/tail.c @@ -60,7 +60,7 @@ dropinit(FILE *fp, const char *str, long n) ssize_t len; unsigned long i = 0; - while(i < n && ((len = agetline(&buf, &size, fp)

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Maxime Coste
On Tue, Sep 16, 2014 at 11:20:45PM +0200, Roberto E. Vargas Caballero wrote: > > Ok, so what exactly is the sum of 3 lines and 2 bytes ? The whole point > > is to catch at compilation code that is logically invalid, if you have > > f(ByteCount, LineCount), you cannot call it with a (LineCount, Byte

Re: [dev] Re: [RFC] Design of a vim like text editor

2014-09-16 Thread FRIGN
On Tue, 16 Sep 2014 17:25:02 -0500 Jimmie Houchin wrote: Hey Jimmie, > Seeing how much C++ people complain about the C like stuff or the actual > C stuff in C++. Why don't they just grow a pair and clean out all the > stuff they complain about. Simplify the language and get on with it. As > i

[dev] Re: [RFC] Design of a vim like text editor

2014-09-16 Thread Jimmie Houchin
On 09/16/2014 02:37 AM, Markus Teich wrote: M Farkas-Dyck wrote: [1] http://harmful.cat-v.org/software/c++/linus [2] http://gigamonkeys.wordpress.com/2009/10/16/coders-c-plus-plus/ Heyho, also relevant for the (non-)topic: http://bartoszmilewski.com/2013/09/19/edward-chands/ --Markus Thank

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Roberto E. Vargas Caballero
> No. Because the realloc that you have to do maybe has to move in the > worst case n-1 elements in a new memory arena. So you have n (moving > to the position) * n-1 (memcpy to new position in memory) = n^2. You > can decrease the possibility of reallocation allocating > more memory of needed, but

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Roberto E. Vargas Caballero
> Ok, so what exactly is the sum of 3 lines and 2 bytes ? The whole point > is to catch at compilation code that is logically invalid, if you have > f(ByteCount, LineCount), you cannot call it with a (LineCount, ByteCount) > signature. In C you would be forced to use f(int, int), and long debugging

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread FRIGN
On Tue, 16 Sep 2014 23:02:40 +0200 Christoph Lohmann <2...@r-36.net> wrote: > No, civilisation ended when »C++« was mentioned. Code abstraction and > bad design choices made from idiots relying on OOP are the reason why > your local Windows machine is so slow in loading drivers, opening Wi

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread FRIGN
On Tue, 16 Sep 2014 21:30:47 +0100 Maxime Coste wrote: > Ok, so what exactly is the sum of 3 lines and 2 bytes ? The whole point > is to catch at compilation code that is logically invalid, if you have > f(ByteCount, LineCount), you cannot call it with a (LineCount, ByteCount) > signature. In C y

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Christoph Lohmann
Greetings. On Tue, 16 Sep 2014 23:02:40 +0200 Maxime Coste wrote: > On Tue, Sep 16, 2014 at 10:02:54PM +0200, Roberto E. Vargas Caballero wrote: > > > Well, I still rely a lot on having a proper type system to do checks at > > > compile time. For example I have separate types for line counts, byt

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Maxime Coste
On Tue, Sep 16, 2014 at 10:02:54PM +0200, Roberto E. Vargas Caballero wrote: > > Well, I still rely a lot on having a proper type system to do checks at > > compile time. For example I have separate types for line counts, byte > > Proper..., good word for saying a pain in the ass. One of the best

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Roberto E. Vargas Caballero
> Well, I still rely a lot on having a proper type system to do checks at > compile time. For example I have separate types for line counts, byte Proper..., good word for saying a pain in the ass. One of the best thing of C (and C++ because they share this part) is automatic conversions that remov

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Maxime Coste
On Tue, Sep 16, 2014 at 09:13:00AM +0100, Ralph Eastwood wrote: > Maxime, I really like what you'e done with kakoune, although your code > base doesn't > seem to use C++'s features heavily, meaning that your could write > equally clean code in C. > Why does it have to be C89? C99 is nicer. > > >

Re: [dev] [dvtm][PATCH] Makefile and terminfo

2014-09-16 Thread Marc André Tanner
On Tue, Sep 16, 2014 at 11:31:05AM -0400, Wolfgang Corcoran-Mathe wrote: > I do think it would be nice if this line were in config.mk, as > it seems to be system-specific. I agree, will do. -- Marc André Tanner >< http://www.brain-dump.org/ >< GPG key: CF7D56C0

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Marc André Tanner
On Tue, Sep 16, 2014 at 01:56:14PM +0200, Gregor Best wrote: > Hi guys, > > I've got two patches and three questions: > > First, the patches. The first fixes editing of length 0 files, Thanks applied with some cosmetic changes. I'm not sure the perror call makes that much sense and since the oth

Re: [dev] [vis][PATCH] Window line up/down

2014-09-16 Thread Amadeus Folego
On Tue, Sep 16, 2014 at 07:55:40PM +0200, Marc André Tanner wrote: > I have cleaned up the cursor handling code in window.[ch] and implemented > the CTRL-{U,D,E,Y} functionality in normal mode. However I'm not sure it > behaves the way you expect it. Please test, and report back. CTRL-{U,D} is wor

Re: [dev] [vis][PATCH] Window line up/down

2014-09-16 Thread Marc André Tanner
> This was the first thing I missed when I tried, thanks for pulling it! I have cleaned up the cursor handling code in window.[ch] and implemented the CTRL-{U,D,E,Y} functionality in normal mode. However I'm not sure it behaves the way you expect it. Please test, and report back. Thanks -- Mar

Re: [dev] [dvtm][PATCH] Makefile and terminfo

2014-09-16 Thread Wolfgang Corcoran-Mathe
Quoth Claudio on Tue, Sep 16 2014 10:03 +0200: I've just installed dvtm on Ubuntu Server and it looks like the terminfo entry gets installed into the wrong place (/usr/share/terminfo/, while the system looks for it in /etc/terminfo/). So I just removed the -o flag from @tic which allow the system

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Raphaël Proust
On Tue, Sep 16, 2014 at 12:19 PM, M Farkas-Dyck wrote: > On 16/09/2014, Raphaël Proust wrote: >> I am planning on making a filter for the sam language. I.e. something >> like sed but that would accept sam expressions. > > http://swtch.com/plan9port/man/man1/ssam.html Thanks, I didn't know about

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Gregor Best
Hi guys, I've got two patches and three questions: First, the patches. The first fixes editing of length 0 files, the second fixes compilation on OpenBSD. Since _BSD_SOURCE was already present in other files belonging to vis, I figured adding it to vis.c as well poses no harm. The first question

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread M Farkas-Dyck
On 16/09/2014, Raphaël Proust wrote: > I am planning on making a filter for the sam language. I.e. something > like sed but that would accept sam expressions. http://swtch.com/plan9port/man/man1/ssam.html

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Raphaël Proust
On Mon, Sep 15, 2014 at 10:52 PM, Dimitris Papastamos wrote: > A nice experimental and in-development editor is edit[0] Really nice! I am planning on making a filter for the sam language. I.e. something like sed but that would accept sam expressions. That would make a search and replace trivial

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Ralph Eastwood
On 16 September 2014 00:23, FRIGN wrote: > > Some vocal individuals? I struggle to find anybody who isn't against C++. > C++ does provide some abstraction features, yes, but every time I read > C++ or even boost-code, my brain just shuts off and begs for C's > simplicity and clarity. In my opinio

[dev] [dvtm][PATCH] Makefile and terminfo

2014-09-16 Thread Claudio
Hi, I've just installed dvtm on Ubuntu Server and it looks like the terminfo entry gets installed into the wrong place (/usr/share/terminfo/, while the system looks for it in /etc/terminfo/). So I just removed the -o flag from @tic which allow the system to place the files to the right directory.

Re: [dev] [RFC] Design of a vim like text editor

2014-09-16 Thread Markus Teich
M Farkas-Dyck wrote: > [1] http://harmful.cat-v.org/software/c++/linus > [2] http://gigamonkeys.wordpress.com/2009/10/16/coders-c-plus-plus/ Heyho, also relevant for the (non-)topic: http://bartoszmilewski.com/2013/09/19/edward-chands/ --Markus