Perl 6 - the future is here, just unevenly distributed

IRC log for #darcs, 2014-02-04

| Channels | #darcs index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:29 mizu_no_oto joined #darcs
00:48 briarrose joined #darcs
02:05 36DACDFX6 joined #darcs
02:07 jhinkle joined #darcs
02:26 intripoon_ joined #darcs
02:52 mizu_no_oto joined #darcs
03:19 mizu_no_oto joined #darcs
05:09 rdesfo left #darcs
06:44 * Heffalump is trying GHC 7.8.1RC1 with darcs
06:44 Heffalump the dependencies all seem to be installable
06:45 lambdabot joined #darcs
07:12 notdan Heffalump: the import list cleanup patch: http://hub.darcs.net/co-dan/darcs-screened/patch/20140203213836-e7f45 and the whatsnew interactive patch: http://hub.darcs.net/co-dan/darcs-screened/patch/20140204070539-e7f45
07:12 notdan tell me if i need to fix anything :)
07:14 Heffalump we prefer constrainted imports (re Control.Monad.Reader and State)
07:15 Heffalump also I hadn't realised the import reformatting meant changing the existing style (as opposed to just cleaning up things that didn't already meet that style) - that ought to be discussed on the darcs-devel list before we commit to it
07:16 notdan oops sorry I forgot to put explicit imports for reader and state
07:16 Heffalump the code for interactive looks reasonable - I'll build it and give it a try later
07:16 notdan Well I am just followng Tibbe's style
07:16 notdan http://darcs.net/Development/CodingStyle
07:17 Heffalump does darcs send work for you? If so if you could send the patches to the existing patch tracker that'd be less hassle.
07:17 notdan "In an effort to increase new-coder approachability, existing-coder sanity and general maintainability of the codebase, Darcs has adopted Johan Tibell’s style guidelines, found here." https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
07:17 notdan Sure, I can try doing 'darcs send'. But the second patch actually depends on the first one
07:17 Heffalump hmm. I wonder why we have the current style then.
07:17 Heffalump biab
07:27 notdan OK I'll wore a little bit more on the patch
07:27 notdan some comments ,summary option
07:30 Heffalump ok, cool
07:30 Heffalump the style guide doesn't seem to mention import style in much detail
07:31 Heffalump its fine to send both patches in one bundle to the tracker (and perhaps link to the darcsden URL for them)
07:32 notdan It just says: import should not be longer than 80 chars
07:33 notdan to you want me to get rid of the spaces in place of the 'qualified'?
07:33 notdan because that's configurable
07:34 Heffalump I'm not really sure what I want -)
07:34 Heffalump s/-)/:-)/
07:35 Heffalump I want to avoid churn in our import declarations, so we really need to settle what the correct style is. I also don't want to make your life difficult by making you figure that out.
07:35 notdan OK, let me obliterate the old patches, upload the new ones and you can correct the header style patch aftterwards
07:36 Heffalump I'd been udner the impression that the current style you are replacing was correct, but it doesn't seem to be documented clearly anywhere.
07:36 Heffalump I vaguely recall that owst introduced it a couple of years ago, but I'm not certain.
07:36 Heffalump I guess that if a style can be applied programmatically that is an advantage.
07:40 notdan yeah I just install https://github.com/jaspervdj/stylish-haskell and run a command inside my emacs buffer
07:40 notdan and then manually tackle everythin that looks wrong
07:52 raichoo joined #darcs
07:52 notdan Successfully sent patch bundle to: patches@darcs.net
08:09 whaletechno joined #darcs
09:09 mornfall joined #darcs
14:14 mizu_no_oto joined #darcs
14:39 mizu_no_oto joined #darcs
14:42 raichoo joined #darcs
15:45 mizu_no_oto joined #darcs
16:26 raichoo joined #darcs
17:08 stepkut joined #darcs
17:21 colDrMcBeardman joined #darcs
17:21 mizu_no_oto joined #darcs
17:47 amgarching joined #darcs
17:59 mizu_no_oto joined #darcs
18:01 sm g'day all
18:02 notdan heya :)
18:02 sm how goes it notdan
18:04 sm your new import style looks a little unfamiliar to me so I'm brushing up on tibbe's style guide
18:04 notdan I am just using stylish haskell to be honest
18:04 sm does it implement tibbe's style ?
18:04 notdan http://darcs.net/Development/CodingStyle#daniils-feedback
18:04 notdan it does
18:04 notdan I think?
18:05 notdan but it also does the alignment of import modules
18:05 notdan I can get rid of the alignment, but I think it's reasonable to sort the import list
18:06 sm the style in your patch seems high maintenance for anyone who's not all tooled up with emacs + magic import cleanup tool, right ?
18:06 sm nice to read though
18:07 notdan I honestly thought that everyone uses that tool. You don't even need emacs, you can just run it in the shell.
18:08 notdan Most of the code I read uses that formatting, but if it is a burden I am OK with getting rid of it
18:08 sm I would bet money almost no-one (statistical approximation) uses it
18:08 sm stylish-haskell, I mean
18:09 sm some kind of automation seems like a great idea if it's not too burdensome
18:09 * sm reads
18:09 notdan Well I am happy with whatever coding style you guys prefer, but I would like it to be specific and consistent
18:10 notdan See export list in Add.hs vs in Record.hs
18:10 sm +1
18:12 sm so tibbe's guide says very little about imports.. just how to group them
18:12 sm I'm going to clean up some of my own code and learn about this stuff
18:13 notdan True
18:13 notdan but this is an example of inconsistency I am talking about: http://paste.lisp.org/display/141143
18:14 amgarching joined #darcs
18:15 sm I wonder what proportion of darcs contributors use emacs
18:15 sm and how the various emacs haskell modes indent exports & imports
18:20 sm I don't think any style guide for detailed imports layout exists yet.. who knows a project that does it well ?
18:22 sm ah, stylish-haskell is configurable: https://github.com/jaspervdj/stylish-haskell/blob/master/data/stylish-haskell.yaml
18:28 notdan yep :)
18:52 lelit joined #darcs
18:59 Heffalump I agree with sorting imports within groups
19:01 Heffalump is hub under load? It's having trouble reading notdan's patch at http://hub.darcs.net/co-dan/darcs-screened/patch/20140203213836-e7f45
19:03 notdan Heffalump: no, sorry that patch is gone
19:04 Heffalump oh, of course
19:04 notdan I've replaced it with http://hub.darcs.net/co-dan/darcs-screened/patch/20140204074802-e7f45 and http://hub.darcs.net/co-dan/darcs-screened/patch/20140204074707-e7f45
19:04 notdan sorry for the inconvenience
19:05 Heffalump np
19:05 Heffalump ok, so the imports previously were mostly but not completely sorted
19:05 sm Heffalump: I had the same confusion.. I'm tweaking that error msg
19:27 sm stylish-haskell's style plus the 80 char limit seems to make the qualified imports list quite fiddly, eg https://gist.github.com/simonmichael/8810513
19:28 sm sometimes starting the qualifieds after a single indent on the next line seems nice
19:28 sm if we relaxed the 80 char limit, imports would probably be easier to maintain
19:30 notdan well 80 char limit is also imposed by http://darcs.net/Development/CodingStyle#exceptions
19:30 notdan we can drop the qualified alignment thingie
19:30 sm the 80 char limit is imposed by us, I think
19:30 Heffalump personally I think that's a bit too restrictive
19:31 sm I do too
19:31 sm here's how to run stylish-haskell from haskell-mode btw: http://www.haskell.org/haskellwiki/Emacs/Formatting
19:32 Heffalump if we could drop the indentation for lining things up and were allowed to start import lists on a fresh line I'd be fairly happy with any other changes
19:36 sm it seems some options are: 1. encourage use of stylish haskell, living with its style. Manual edits will no longer really be possible (they'll be lost at next cleanup). 2. Same, but enhance s-h to fit our needs better. 3. stay with an all-manual process, but document it better and encourage folks to apply it everywhere
19:37 sm for comparison: existing imports http://hub.darcs.net/simon/darcs-screened/browse/src/Darcs/UI/Commands/WhatsNew.hs#27 , stylish-haskell imports http://hub.darcs.net/co-dan/darcs-screened/browse/src/Darcs/UI/Commands/WhatsNew.hs#26
19:39 notdan what do you mean by 'manual edits'?
19:40 sm like, just now I didn't like the result of stylish-haskell (it doesn't know about "as ...") and edited that line manually, but realised that wouldn't scale
19:41 sm next time someone runs s-h my manual tweak is lost
19:41 notdan My only problem with existing imports is that they are 1) inconsistant 2) undocumented. Your solution #3 sounds like the best one, imho
19:42 sm maybe the best next step anyway ? I lean that way too
19:48 sm if Heffalump feels the same, then what's the recommended style ? I suspect it boils down to "minimise indentation"
19:53 sm import [qualified] The.Module[\n    ][(the, qualified, imports)] , ie avoid unnecessary work - I imagine much of darcs is in this style already
19:54 sm http://hub.darcs.net/simon/darcs-screened/browse/src/Darcs/UI/Commands/WhatsNew.hs#27 is, in fact - except for line 48
19:56 notdan What about import ModuleName( stuff ) vs import ModuleName (stuff) vs import ModuleName ( stuff )?
19:56 notdan should each qualified import part be on it's own line like #33-41? Or maybe several imports can go on the same line
19:57 sm that's easy, import ModuleName (stuff) is clearly the one true way there :)
19:57 notdan A lot of code in darcs uses the ( stuff ) style
19:57 sm oh alright then.. I see that as a smaller problem
19:58 notdan Another thing that stylish-haskell does is sort the qualified imports inside the import itself
19:58 notdan So datatypes imports go first, then functions, alphabetically
19:59 sm tibbe suggests three groups - basic platform imports, third-party libs, local project imports
20:00 notdan No, I mean import MyModule (TypeA(..), TypeB(..), function1, function2)
20:00 sm oh
20:01 sm who knew laying out imports was so complex
20:01 sm re "should each qualified import part be on it's own line" - I think that's too wasteful
20:02 notdan Should we limit the line width by 80 or so then?
20:02 sm I think I favour keeping qualified imports on the same line as the import, or starting them indented once on the next line if they don't fit
20:02 sm and I'd relax the 80 char limit
20:02 notdan OK. Btw, how do call the actually stuff that you import from a module?
20:03 notdan 'qualified imports'? I wonder because this clashes with well, qualified imports
20:03 notdan the other ones
20:03 sm uh.. true
20:05 notdan "The various items being imported into and exported out of a module are called entities." http://www.haskell.org/tutorial/modules.html
20:08 sm so rephrasing myself: I tend to keep a single-line imported entity list on the import line, but start multi-line imported entity lists on the next line, with a single indent
20:10 * sm thinks "qualified" should have come later in the import syntax
20:12 notdan Ok, so I got this: http://darcs.net/Development/CodingStyle#import-lists
20:16 notdan I will be heading to the bed now, but I'll check the irc log tomorrow :) thanks for a nice discussion simon and ganesh
20:18 sm notdan: thanks for working on it
20:19 sm let's see what Heffalump and other coders think
20:19 sm night
20:36 mizu_no_oto joined #darcs
21:38 mizu_no_oto joined #darcs
21:44 Heffalump that sounds like it codifies existing practice - is that right? If so I'm quite happy with that.
21:59 amgarching joined #darcs
23:01 whaletechno joined #darcs

| Channels | #darcs index | Today | | Search | Google Search | Plain-Text | summary