[ANN] An enhanced REPL for Guilers

2013-04-30 Thread Nala Ginrut
hi folks! I've started a brand new project named nala-repl: https://github.com/NalaGinrut/nala-repl It contains colorized-REPL and other cool things. Anything useful/cool feature could be added to nala-repl, patches and feature requests are welcome. Maybe I should put it on guildhall, but for now

[Feature Request] Some ideas on 'mmap'

2013-04-30 Thread Nala Ginrut
hi guys! A discussion on IRC about adding 'mmap' raised, and I will share some ideas on this topic: 1. Complex one or simple one? The simple one is just a simple wrapper taking advantage of (system foreign). The complex one is more alike Python's mmap module. Contains a special type of , and a bun

Re: [Feature Request] Some ideas on 'mmap'

2013-04-30 Thread Daniel Hartwig
On 30 April 2013 17:27, Nala Ginrut wrote: > hi guys! > A discussion on IRC about adding 'mmap' raised, and I will share some > ideas on this topic: > > 1. Complex one or simple one? > The simple one is just a simple wrapper taking advantage of (system > foreign). > The complex one is more alike P

Re: [Feature Request] Some ideas on 'mmap'

2013-04-30 Thread Nala Ginrut
On Tue, 2013-04-30 at 18:12 +0800, Daniel Hartwig wrote: > On 30 April 2013 17:27, Nala Ginrut wrote: > > hi guys! > > A discussion on IRC about adding 'mmap' raised, and I will share some > > ideas on this topic: > > > > 1. Complex one or simple one? > > The simple one is just a simple wrapper ta

Re: [Feature Request] Some ideas on 'mmap'

2013-04-30 Thread Daniel Hartwig
On 30 April 2013 21:49, Nala Ginrut wrote: > If I use bytevector instead, it means I have to read all the content > from a file first. I don't think it's the same with mmap in POSIX. > mmap is used for very large data I/O, if we decide to read them all, we > lose the game. > mmap does lazy disk I/

Re: [Feature Request] Some ideas on 'mmap'

2013-04-30 Thread Daniel Hartwig
On 30 April 2013 21:49, Nala Ginrut wrote: >> > 6. other helper functions also available: >> >> If you want a port, use a port. Likewise for strings, bytevectors. >> > > For an instance, in a multi-thread program, if we use port and need to > move the cursor, we have to remember/restore the curso

Re: [Feature Request] Some ideas on 'mmap'

2013-04-30 Thread Nala Ginrut
On Tue, 2013-04-30 at 21:57 +0800, Daniel Hartwig wrote: > On 30 April 2013 21:49, Nala Ginrut wrote: > > If I use bytevector instead, it means I have to read all the content > > from a file first. I don't think it's the same with mmap in POSIX. > > mmap is used for very large data I/O, if we deci

Re: [Feature Request] Some ideas on 'mmap'

2013-04-30 Thread Noah Lavine
Hello, Apologies if this is well-known and I just forgot it, but can bytevectors be read-only? I think we'd need that to handle read-only mmap'ed memory. (If not, I hope we could allow read-only bytevectors.) Bytevectors include size, so there's no need to put that in a struct, but I'm not sure w

Re: [ANN] An enhanced REPL for Guilers

2013-04-30 Thread Aleix Conchillo FlaquƩ
On Tue, Apr 30, 2013 at 1:27 AM, Nala Ginrut wrote: > hi folks! > I've started a brand new project named nala-repl: > https://github.com/NalaGinrut/nala-repl > > It contains colorized-REPL and other cool things. Anything useful/cool > feature could be added to nala-repl, patches and feature reques

Re: [Feature Request] Some ideas on 'mmap'

2013-04-30 Thread Daniel Hartwig
On 30 April 2013 22:23, Nala Ginrut wrote: > But I still recommend that store 'size' & 'flags', which need a new > record-type and to write some helper functions, but very less code. And have you considered that you can munmap only some sections, how is that going to work with your proposed struc

attempt at array cleanup

2013-04-30 Thread Daniel Llorens
Hello, a few weeks ago, a few bugs and some peculiar performance behavior prompted me to start looking at the array code in Guile. I have put what I've done on branch ra0 here: https://gitorious.org/guile-stable-2-0-array-cleanup/guile-stable-2-0-array-cleanup/commits/ra0 This is ~50 commits

Re: [Feature Request] Some ideas on 'mmap'

2013-04-30 Thread Ian Price
There has been a lot of talk about the interface, but here's a simple idea: Post some examples of how you want to use it. We can all sit around and argue forever and a day about the API, but if you want it, you probably have some real-word examples in mind and if you don't, then that's a good rea

Re: [ANN] An enhanced REPL for Guilers

2013-04-30 Thread Nala Ginrut
On Tue, 2013-04-30 at 14:58 -0700, Aleix Conchillo FlaquƩ wrote: > On Tue, Apr 30, 2013 at 1:27 AM, Nala Ginrut wrote: > > hi folks! > > I've started a brand new project named nala-repl: > > https://github.com/NalaGinrut/nala-repl > > > > It contains colorized-REPL and other cool things. Anything