Erik de Castro Lopo mega-nerd.com> writes:
>
> Matthew Farkas-Dyck wrote:
>
> > http://hackage.haskell.org/package/bytestring-mmap
>
> Since he's editing text, its a pity there isn't a text-mmap
> package .
Well, this one:
http://hackage.haskell.org/package/mmap
works not only for Text but
Martin DeMello wrote:
> Just plain String, mostly because it's what Gtk.Entry works with. I'll
> take a look at Text.
Ah, maybe not. If your output representation *has* to be String its
probably not worth using Text as an internal representation.
I suspect that Gtk should really be updated to al
On Tue, Jan 17, 2012 at 6:24 PM, Erik de Castro Lopo
wrote:
> Martin DeMello wrote:
>
>> Further question - my internal data representation is a vector of
>> strings (it's a line-based editor).
>
> String or ByteString or Text?
>
> If its either of the first two, I think you should definitely look
Martin DeMello wrote:
> Further question - my internal data representation is a vector of
> strings (it's a line-based editor).
String or ByteString or Text?
If its either of the first two, I think you should definitely look at
Text.
> Is there a more efficient strategy
> to keep an mmap buffer
On Tue, Jan 17, 2012 at 5:49 PM, Erik de Castro Lopo
wrote:
> Matthew Farkas-Dyck wrote:
>
>> http://hackage.haskell.org/package/bytestring-mmap
>
> Since he's editing text, its a pity there isn't a text-mmap
> package :-).
Further question - my internal data representation is a vector of
strings
On 17/01/2012, Erik de Castro Lopo wrote:
> Matthew Farkas-Dyck wrote:
>
>> http://hackage.haskell.org/package/bytestring-mmap
>
> Since he's editing text, its a pity there isn't a text-mmap
> package :-).
Yeah, I had the same thought.
> Erik
> --
> --
Says posix only. But googling for it brought up System.IO.MMap, which
does seem to be cross-platform.
martin
On Tue, Jan 17, 2012 at 5:46 PM, Matthew Farkas-Dyck
wrote:
> http://hackage.haskell.org/package/bytestring-mmap
>
>
> On 17/01/2012, Martin DeMello wrote:
>> I'm writing a gtk2hs-based
Matthew Farkas-Dyck wrote:
> http://hackage.haskell.org/package/bytestring-mmap
Since he's editing text, its a pity there isn't a text-mmap
package :-).
Erik
--
--
Erik de Castro Lopo
http://www.mega-nerd.com/
http://hackage.haskell.org/package/bytestring-mmap
On 17/01/2012, Martin DeMello wrote:
> I'm writing a gtk2hs-based text editor, and would like to implement
> continuous (swap-file based) autosave the way vim and emacs do it. Any
> suggestions for how to implement this in a cross-platform manne