Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread q
> Another thing you can do is to only preallocate a fixed size buffer > and add to a list of buffers. Every time you cross block boundary, you alloc > a new buffer and attach it at the end of your list. > > There are many ways to do this, I'd go for the simplest approach in terms of > code > rea

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Dimitris Zervas
On July 11, 2014 1:46:13 AM EEST, Dimitris Papastamos wrote: >On Fri, Jul 11, 2014 at 01:43:16AM +0300, Dimitris Zervas wrote: >> First of all, we haven't even agree in which data structure will we >use. >> Buffer gap, piece table, or pointer array? > >If you want to tackle this, I'd go with whate

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Charlie Kester
On Thu 10 Jul 2014 at 15:46:13 PDT Dimitris Papastamos wrote: On Fri, Jul 11, 2014 at 01:43:16AM +0300, Dimitris Zervas wrote: First of all, we haven't even agree in which data structure will we use. Buffer gap, piece table, or pointer array? If you want to tackle this, I'd go with whatever ap

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Dimitris Papastamos
On Fri, Jul 11, 2014 at 01:43:16AM +0300, Dimitris Zervas wrote: > First of all, we haven't even agree in which data structure will we use. > Buffer gap, piece table, or pointer array? If you want to tackle this, I'd go with whatever approach you feel most comfortable with. Try to keep it simple,

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Dimitris Zervas
On July 11, 2014 1:32:41 AM EEST, Dimitris Papastamos wrote: >On Fri, Jul 11, 2014 at 01:26:38AM +0300, Dimitris Zervas wrote: >> But how are you going to deal with lines longer than the capacity of >a line? or buffers longer than the capacity of buffer? > >You have to resize the buffer. > >There

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Dimitris Papastamos
On Fri, Jul 11, 2014 at 01:26:38AM +0300, Dimitris Zervas wrote: > But how are you going to deal with lines longer than the capacity of a line? > or buffers longer than the capacity of buffer? You have to resize the buffer. There are some clever ways to expand the buffer in O(sqrt(N)) extra spac

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Charlie Kester
On Thu 10 Jul 2014 at 13:29:59 PDT Evan Gates wrote: I will agree that it's super easy to implement and understand and it covers most needs. But how about search? Is it fast? What about structural regular expressions as found in sam that aren't limited to lines? Yes, one of the things I alwa

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Dimitris Zervas
On July 11, 2014 1:26:08 AM EEST, Maxime Coste wrote: >On Thu, Jul 10, 2014 at 11:45:07PM +0300, Dimitris Zervas wrote: >> On July 10, 2014 11:29:59 PM EEST, Evan Gates >wrote: >> >> I will agree that it's super easy to implement and understand and >it >> >covers most needs. >> >> But how about s

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Maxime Coste
On Thu, Jul 10, 2014 at 11:45:07PM +0300, Dimitris Zervas wrote: > On July 10, 2014 11:29:59 PM EEST, Evan Gates wrote: > >> I will agree that it's super easy to implement and understand and it > >covers most needs. > >> But how about search? > >> Is it fast? > > > >What about structural regular e

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Dimitris Zervas
On July 10, 2014 11:29:59 PM EEST, Evan Gates wrote: >> I will agree that it's super easy to implement and understand and it >covers most needs. >> But how about search? >> Is it fast? > >What about structural regular expressions as found in sam that aren't >limited to lines? >-emg Oh, I've got a

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Evan Gates
> I will agree that it's super easy to implement and understand and it covers > most needs. > But how about search? > Is it fast? What about structural regular expressions as found in sam that aren't limited to lines? -emg

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Dimitris Zervas
On July 10, 2014 11:21:43 PM EEST, Maxime Coste wrote: >On Thu, Jul 10, 2014 at 09:33:53AM -0700, Charlie Kester wrote: >> The problem with linked lists of lines and piece tables has always >been >> achieving good locality of reference. Not a problem with buffer gap, >> where locality was the mai

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Maxime Coste
On Thu, Jul 10, 2014 at 09:33:53AM -0700, Charlie Kester wrote: > The problem with linked lists of lines and piece tables has always been > achieving good locality of reference. Not a problem with buffer gap, > where locality was the main motivating factor behind the design. In my experience, an

Re: [dev] Graphics library that sucks the least?...

2014-07-10 Thread Teodoro Santoni
On Thu, Jul 10, 2014 at 07:47:36PM +0200, q...@c9x.me wrote: > Oberon? I wish we had a UI like that. > > http://cognitiones.kantel-chaos-team.de/programmierung/images/oberonv4.pngk Sigh, I now wish it too. -- Teodoro Santoni

Re: [dev] Graphics library that sucks the least?...

2014-07-10 Thread stanio
* Evan Gates 2014-07-10 19:54 > I like this idea with one qualification, when launched from a terminal > the new program takes the place of that terminal. Ah, that reminds me, I once thought that tabbed which I otherwise don't find use for might be forced to act as placeholder for all the windows

Re: [dev] Graphics library that sucks the least?...

2014-07-10 Thread Evan Gates
> The point here is really to revive text-based UIs in a graphical > environment, but without the ESC sequences of terminal emulators > underneath. Nowadays I'd even go that far and question the need of "UI > widgets" at all -- something like a very basic concept of recantgles + > text might suffic

Re: [dev] Graphics library that sucks the least?...

2014-07-10 Thread q
> The point here is really to revive text-based UIs in a graphical > environment, but without the ESC sequences of terminal emulators > underneath. Nowadays I'd even go that far and question the need of "UI > widgets" at all -- something like a very basic concept of recantgles + > text might suffic

Re: [dev] Plain text editor that sucks less - an alternative to VIM?

2014-07-10 Thread Charlie Kester
On Sun 29 Jun 2014 at 04:24:58 PDT patrick295767 patrick295767 wrote: Hello, For many years I have been looking for a lightweight alternative to VIM. (sthg else than Emacs, elvis, nano,... and all the billion of text editor). I was reading the emailed topic "Text-only browser that sucks less"

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Charlie Kester
On Thu 10 Jul 2014 at 01:55:24 PDT Marc André Tanner wrote: I've recently been reading about Project Oberon whose text subsystem is built on piece tables. That is how I became interested and did some further investigations. The technique has been used before in a number of text editors such as Br

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Raphaël Proust
On Thu, Jul 10, 2014 at 1:12 PM, Silvan Jegen wrote: > On Thu, Jul 10, 2014 at 11:52 AM, Raphaël Proust wrote: >> On Thu, Jul 10, 2014 at 1:56 AM, Dimitris Zervas wrote: >> The trick that Yi uses is quite clever and not very complicated: >> keyboard input is passed to a lexer/parser which can be

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Teodoro Santoni
And that's why visual and mouse button 1 button 2 are awesome! -- Teodoro Santoni

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Dimitris Zervas
On July 10, 2014 3:22:07 PM EEST, Teodoro Santoni wrote: >On Thu, Jul 10, 2014 at 02:34:02PM +0300, Dimitris Zervas wrote: >> >Spacebar). What about the introduction of v(isual), then movement, >then >> >verb >> >for doing something? >> Well, there already verbs for doing things with selections (

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Markus Teich
Heyho, Silvan Jegen wrote: > Actually, I do not think you will need a "real" recursive parser. It should be > enough to use a finite state machine since you won't have any recursively > nested key bindings. Yes, that should suffice. > I am not completely sure how to implement this but it sounds

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Teodoro Santoni
On Thu, Jul 10, 2014 at 02:34:02PM +0300, Dimitris Zervas wrote: > >Spacebar). What about the introduction of v(isual), then movement, then > >verb > >for doing something? > Well, there already verbs for doing things with selections (copy, delete, > etc). > But, you suggest adding shift/ctrl/regu

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Silvan Jegen
On Thu, Jul 10, 2014 at 11:52 AM, Raphaël Proust wrote: > On Thu, Jul 10, 2014 at 1:56 AM, Dimitris Zervas wrote: >>>Also it would be nice if the actual text editing >>>component >>>would be clearly separated out, such that different editor frontends >>>can be implemented easily. >> >> Well, this

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Dimitris Zervas
On July 10, 2014 12:11:59 PM EEST, Teodoro Santoni wrote: >On Thu, Jul 10, 2014 at 11:08:49AM +0300, Dimitris Zervas wrote: >> I also fail to understand the way that sandy does select things. >> Can anyone give me some light? >> I was thinking ctrl+movement and ctrl+adjective to select things, >>

Re: [dev] [st] Problem linking in OpenBSD

2014-07-10 Thread Szabolcs Nagy
* Dimitris Papastamos [2014-07-09 07:10:57 +0100]: > On Wed, Jul 09, 2014 at 01:16:05AM +0200, FRIGN wrote: > > On Tue, 8 Jul 2014 22:45:15 +0200 > > "Roberto E. Vargas Caballero" wrote: > > > > > cannot find -lrt > > > > The fix is rather trivial: Just remove the damn -lrt. > > Seriously: On O

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Raphaël Proust
On Thu, Jul 10, 2014 at 1:56 AM, Dimitris Zervas wrote: >>Also it would be nice if the actual text editing >>component >>would be clearly separated out, such that different editor frontends >>can be implemented easily. > > Well, this is much easier implemented in OOP languages (which I don't love

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Teodoro Santoni
On Thu, Jul 10, 2014 at 11:08:49AM +0300, Dimitris Zervas wrote: > I also fail to understand the way that sandy does select things. > Can anyone give me some light? > I was thinking ctrl+movement and ctrl+adjective to select things, > but it will not be that efficient, will it? Maybe I did not un

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Marc André Tanner
On Wed, Jul 09, 2014 at 05:00:45PM -0400, Carlos Torres wrote: > Hey Marc, > > On Wed, Jul 9, 2014 at 4:42 PM, Marc André Tanner wrote: > > On Wed, Jul 09, 2014 at 09:14:16PM +0200, Rafa Garcia Gallego wrote: > > ...this includes > > a design based on piece tables rather than the double linked li

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-10 Thread Dimitris Zervas
I think I'm almost finished. I'll add the last keybindings and I may add multiple mark support (ma goes to mark a) However I don't know what to do with selection. I also fail to understand the way that sandy does select things. Can anyone give me some light? I was thinking ctrl+movement and ctrl+