Perl 6 - the future is here, just unevenly distributed

IRC log for #darcs, 2015-07-14

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

All times shown according to UTC.

Time Nick Message
01:00 Heffalump pointfree: please do
02:06 mizu_no_oto joined #darcs
02:39 mizu_no_oto joined #darcs
04:16 Riastradh joined #darcs
04:33 amgarchIn9 joined #darcs
07:11 Pastaf joined #darcs
07:25 amgarchIn9 joined #darcs
07:28 bishboria joined #darcs
09:43 amgarching joined #darcs
10:49 biglama joined #darcs
14:49 notdan Heffalump: I think I might have to snuck in some changes to darcs :[
14:49 notdan Heffalump: it's just for exposing some functions: http://hub.darcs.net/co-dan/darcs-2.10/patch/20150713142118-21ae5
14:49 notdan Heffalump: I can also just copy some code from that module. what do you think?
16:55 amgarching joined #darcs
17:08 amgarching joined #darcs
17:43 amgarching joined #darcs
18:26 seumirem1rque joined #darcs
18:30 dleverton_ joined #darcs
18:33 Heffalump notdan: pity that missed 2.10.1 :-( I guess submit a patch for it and for now copy the code.
18:34 sm there's always 2.10.2 ! :)
18:34 sm oof, but it's a very small patch :)
18:35 Heffalump right, the issue is release timing/overhead, not the patch
18:35 Heffalump notdan: send it in to the bug tracker though
18:35 sm notdan: send more patches :)
18:46 Pastaf joined #darcs
18:55 Riastradh joined #darcs
19:05 sprang joined #darcs
19:06 byorgey joined #darcs
19:06 byorgey joined #darcs
19:19 notdan Heffalump: are you up for a quick meeting tomorrow?
19:20 notdan sm: sure :)
19:20 notdan sm: i have a small problem tho: it is very hard to pick out a consistent set of patches that can go into darcsden without doing a lot of rebasing
19:21 notdan sm: what is your opinion on merging the whole -local branch at the end of the week?
19:22 Heffalump notdan: probably, yes. Hard to be certain what time I'll be back until the evening, but I can try to let you know.
19:23 sm notdan: I don't have an opinion, how can I help ?
19:23 sm can you rebase your patches ?
19:23 sm (with "darcs rebase")
19:26 sm I see that http://hub.darcs.net/simon/darcsden/compare/co-dan/darcsden-local times out indicating "gnarly rebase"
19:59 notdan sm: hm that's weird
19:59 notdan Heffalump: sure :]
20:00 notdan sm: I don't understand this -- I've pulled all of the patches from your repository. My repo should contain a superset of your patches :(
20:03 notdan Maybe there was something wrong in my workflow? I was pulling from your repo and a bunch of times I had conflicting changes. I would just resolve them by recording a separate patch on top
20:03 sm that leaves the conflicts in the repo, which makes darcs sweath
20:03 sm you have to really re-record them (or use the rebase command) to keep the conflicts out
20:04 sm right Heffalump  ?
20:04 notdan oh crap
20:04 notdan i had no idea i had to do that
20:05 sm it's unfortunate, but it's just a limitation of darcs.. I guess a lot of us were trained by darcs 1 (which was worse at this) to avoid that
20:05 notdan I read somewhere on the wiki that you just had to do another patch that would depend on the conflict
20:05 amgarching joined #darcs
20:06 notdan but how would that even work? if I re-record the patches or rebase, then, eventually when you would be pulling from my repo, you would get conflicts
20:06 notdan because of the re-recordings
20:07 sm you re-record/rebase such that there's the patch(es) apply cleanly the first time to HEAD, so no conflict when I pull
20:07 sm (and by HEAD I mean the trunk/my repo)
20:07 sm s/there's//
20:08 maerwald are the issues already in the database somehow?
20:08 sm the issues are stored in couchdb yes
20:10 notdan sm: so i somehow modify my old patches in a way that when I pull from your repo I dont get any conflicts?
20:10 sm yes, and more importantly vice versa
20:11 sm this advice is too late, but when upstream is active, I tend to pull before recording
20:11 sm now, I guess the rebase command will help you out
20:11 notdan oh jeez
20:11 notdan i pull frequently, but you cannot endup without conflicts
20:11 sm this is why I would love to have a git-like pull --rebase option, that automates the semi-manual stuff you're about to do with rebase
20:12 sm you can resolve conflicts before each commit, at least
20:12 sm which is the easiest time to do it
20:12 notdan That was my plan. I guess I just didn't understand well enough what counts as resolving
20:13 maerwald sm: it seems postNewIssueR (where addIssue is called) and getRepoCommentR (where updateIssue is called) are a good places to hook something like email notifcation in. Both are in RepoHandlers.hs
20:13 maerwald I don't understand how or where updateIssue and addIssue is defined. That is some obscure lens stuff.
20:14 sm maerwald: I'm not sure either, I haven't seen the lens stuff
20:15 maerwald updateIssue is just a function of the class BackendPermanentIssue
20:15 maerwald I don't see the implementation anywhere
20:15 sm oh.. is it under Settings
20:15 notdan maerwald: DarcsDen.Backend.Permanent.CouchDB
20:16 maerwald oh, I am blind
20:16 maerwald mh, it looks like I can do arbitrary IO there
20:16 sm DarcsDen.Backend.Permanent.CouchDB, right
20:18 maerwald but I still think it's better to do it in RepoHandlers
20:19 notdan yes, then it would be backend-agnostic
20:19 maerwald still a bit confusing to have a function called "getRepoCommentR" send emails, but...
20:19 sm yeah that's not ideal
20:19 sm well get wouldn't, right ? a successful post would
20:20 maerwald maybe the function just needs refactoring, it's pretty big anyway
20:21 sm I think you're right.. the name is confusing
20:21 maerwald it does numerous of stuff
20:22 sm I think the ideal would be a system of hooks you can connect to backend state changes (independent of the particular backend)
20:22 sm but in the post handler should work too
20:23 notdan there seem to be no post handler
20:23 notdan There is no way to list conflicting patches in darcs, is there?
20:24 maerwald sm: would that involve some FRP programming? I'm not really familiar with that
20:25 sm oh shoot this is snap.. I was looking for the routes file
20:25 sm maerwald: I don't think so
20:28 sm bah no post handler. Port to yesod, anyone ? :)
20:36 maerwald the only things I see is addStateRecord, updateStateRecord and dropStateRecord to know about backend state changes and neither of them are backend agnostic
20:39 notdan there is no general "state change" action, but there are individual actions
20:39 notdan like 'addRepository' or 'dropRepository' in DarcsDen.State.Repo
20:39 notdan similar stuff in comments
20:39 notdan erm, in State.Comment
20:41 notdan ugh how can rebase end up with a conflict and no suspended patches
20:43 maerwald notdan: dropRepository just ends up calling dropStateRecord
20:43 maerwald so it ends up in Couchdb again
20:47 maerwald well, they all do "runBackendPermanentM"
20:47 maerwald which is of type IO
20:47 maerwald so we could hook in there somehow
20:50 notdan maerwald: dropRepository is a function from a typeclass in DarcsDen.State.Repo
20:50 notdan and it runs in MonadIO iirc
20:51 maerwald notdan: yes, but that means we'd need to hook in for every backend provider
20:51 maerwald well, actually we need to do that anyway
20:55 maerwald I don't really know how a system of db state change hooks should look like
20:58 maerwald processHooks :: (?hooks :: Hooks, MonadIO m) => DBStateChangeType -> m ()
20:58 maerwald then dropRepository would call processHooks with an appropriate DBStateChangeType so we know what to look for?
20:59 sm sounds good.. why another implicit parameter though
21:00 maerwald we could stuff it into settings, but that would expose more information to random functions than is needed
21:00 maerwald maybe we need to use proper reflection at some point anyway, instead of implicit parameters
21:03 sm implicit parameters irk me, I still don't quite get (or I forgot) why they're better than an explicit parameter (you have to declare them in the type either way)
21:04 notdan ughhh OK, I give up. I cannot get rebasing to work
21:04 maerwald sm: because they are not part of the argument list and so less intrusive if you want to add/remove/change them
21:04 maerwald if you look at e.g. the leksah source code, I think it would be impossible with explicit parameters
21:05 maerwald they would regularly break the whole codebase
21:05 notdan sm: I think they are used for cases like this: http://hub.darcs.net/co-dan/darcsden/browse/src/DarcsDen/State/Repo.hs#92
21:05 sm I'll check that out
21:05 notdan sm: ie. where you wouldn't have a type variable in a function in a type class otherwise
21:06 maerwald sm: also, reflection was initially described by Oleg ftp://madison.deas.harvard.edu/techreports/tr-15-04.pdf
21:06 sm notdan: afraid I don't follow you.. there's no implicit param there
21:06 maerwald where he gives some arguments why that is better than implicit parameters, but I don't quite get all the techy stuff
21:07 notdan sm: BPVars is a type synonym for BPVars bp = (?backendPermanent :: bp)
21:07 sm aha
21:07 * sm needs a jetbrains-calibre IDE/code browser for haskell code, already
21:08 maerwald sm: you don't need to change function _calls_ just the type signature, I think that is a big difference
21:08 sm maerwald: hmm ok
21:08 sm as a thought experiment, should we replace all explicit parameters with implicits then ?
21:08 maerwald but it's sort of nasty too, because you stuff implicit state all over your codebase
21:09 maerwald LOL
21:09 sm honest question :) easier refactoring ?
21:09 maerwald you can't really "return" a new thing if it's an implicit parameter, can you?
21:10 maerwald err, that was weirdly worded
21:11 maerwald I mean, it's not a mutable state, you can't manipulate it like when living in a state Monad
21:12 sm hmm yes
21:13 maerwald and the complexity if you move ALL parameters to the class constraint level would probably make you look for the next train station
21:13 maerwald (not for travelling though)
21:14 maerwald I think the main use case is really global program configuration
21:18 sm thanks for the chat, later all
23:39 mizu_no_oto joined #darcs

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