Issue 352 in yi-editor: When opening file in nonexisting directory, offer to create directory

2011-05-14 Thread yi-editor
Status: New Owner: Labels: Type-Defect Priority-Medium New issue 352 by reiner.p...@gmail.com: When opening file in nonexisting directory, offer to create directory http://code.google.com/p/yi-editor/issues/detail?id=352 What steps will reproduce the problem? 1. yi --as=emacs 2. C-x C-f

Issue 351 in yi-editor: Crash when closing buffer

2011-05-14 Thread yi-editor
Status: New Owner: Labels: Type-Defect Priority-Medium New issue 351 by arenie...@gmail.com: Crash when closing buffer http://code.google.com/p/yi-editor/issues/detail?id=351 What steps will reproduce the problem? 1. start Yi 2. open any file 3. close it What is the expected output? What d

Re: Strictness policy

2011-05-14 Thread Nicolas Pouillard
On Sat, 14 May 2011 19:06:49 +1000, Reiner Pope wrote: > On 14/05/11 18:24, Reiner Pope wrote: [...] > Perhaps we should use an approach like this? Using seq here will make the container strict in head of the elements. Using NFData here sounds like a good solution. In particular deepSeq can be ch

Re: Issue 348 in yi-editor: Better window layout control / split-window-horizontally

2011-05-14 Thread yi-editor
Comment #1 on issue 348 by reiner.p...@gmail.com: Better window layout control / split-window-horizontally http://code.google.com/p/yi-editor/issues/detail?id=348 I've implemented prototype support for fancy layouts here: https://github.com/reinerp/yi/tree/layout This demonstrates the Yi.

Re: Strictness policy

2011-05-14 Thread Reiner Pope
On 14/05/11 18:24, Reiner Pope wrote: On 14/05/11 17:40, Nicolas Pouillard wrote: On Sat, 14 May 2011 15:06:51 +1000, Reiner Pope wrote: Hi all, Is there a policy for strictness of datatypes in Yi, and what is it? Specifically: 1. When I write a datatype, which fields should I make stric

Re: Strictness policy

2011-05-14 Thread Jean-Philippe Bernardy
On Sat, May 14, 2011 at 10:20 AM, Reiner Pope wrote: > So, what I mean is that strictness of the 'Window' type should (IMO) be > guaranteed by the 'Yi.Window' module, but at present anyone at all can > circumvent this. Right, I did not give too much thought about this one. It would be best to ma

Re: Strictness policy

2011-05-14 Thread Reiner Pope
On 14/05/11 17:40, Nicolas Pouillard wrote: On Sat, 14 May 2011 15:06:51 +1000, Reiner Pope wrote: Hi all, Is there a policy for strictness of datatypes in Yi, and what is it? Specifically: 1. When I write a datatype, which fields should I make strict? For instance, all fields in E

Re: Strictness policy

2011-05-14 Thread Reiner Pope
On 14/05/11 17:42, Jean-Philippe Bernardy wrote: On Sat, May 14, 2011 at 7:06 AM, Reiner Pope wrote: What should I do to ensure strictness of lazy datatypes like [a]? For instance, the 'bufAccessList :: ![BufferRef]' field of 'Window' is marked strict, but is a list. Is it the client's duty to

Re: Strictness policy

2011-05-14 Thread Reiner Pope
Whoops, I missed your other reply. Never mind this! Reiner On 14/05/11 17:46, Reiner Pope wrote: Ok, understood. My question is, how do we enforce this? So: * some fields of Window are nonstrict. Is this just a mistake? * strictness annotations on (lazy) lists aren't sufficient,

Re: Strictness policy

2011-05-14 Thread Reiner Pope
Ok, understood. My question is, how do we enforce this? So: * some fields of Window are nonstrict. Is this just a mistake? * strictness annotations on (lazy) lists aren't sufficient, because they only force the head of the list (one example is the 'bufAccessList' field of Window)

Re: Strictness policy

2011-05-14 Thread Jean-Philippe Bernardy
On Sat, May 14, 2011 at 9:40 AM, Nicolas Pouillard wrote: > I would recommend to use a strict-by-default datastructure instead of lazy > lists plus NFData. This is not against NFData which is very useful but it > traverses the whole list each time even when the list is already forced. > What abou

Re: Strictness policy

2011-05-14 Thread Jean-Philippe Bernardy
On Sat, May 14, 2011 at 7:06 AM, Reiner Pope wrote: I was distracted while answering your message... Let me try again to reply in more specific terms :) > Is there a policy for strictness of datatypes in Yi, and what is it? > Specifically: > > When I write a datatype, which fields should I make

Re: Strictness policy

2011-05-14 Thread Nicolas Pouillard
On Sat, 14 May 2011 15:06:51 +1000, Reiner Pope wrote: > Hi all, > > Is there a policy for strictness of datatypes in Yi, and what is it? > Specifically: > >1. When I write a datatype, which fields should I make strict? For > instance, all fields in Editor are strict, and all fields e

Re: Strictness policy

2011-05-14 Thread Jean-Philippe Bernardy
All the fields in the editor state (and sub-records, eg. buffer state) should be strict. Every time the user presses a key, the editor state is updated. If a field is lazy in a record, setting it creates a thunk that contains the whole old record. So, there is a risk of accumulating a whole histor