Perl 6 - the future is here, just unevenly distributed

IRC log for #darcs, 2015-11-27

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

All times shown according to UTC.

Time Nick Message
01:47 Big_G joined #darcs
02:29 f-a joined #darcs
02:29 f-a why is hub.darcs.net choking on me?
03:04 dino- f-a: try google dns (8.8.8.8) or add "173.255.219.222 hub.darcs.net" to your /etc/hosts
03:04 dino- There's been a nameserver problem
03:04 dino- Somebody should make that the channel title or whatever it's called
03:08 f-a dino-: thanks
03:09 f-a http://173.255.219.222/ is this "works as expected", dino- ?
04:20 sm ack.. linode responded, the problem seems to be that hub.darcs.net domain is linked with joyful.com with is near to expiry which caused dns propagation problems
04:20 sm I've renewed, hopefully things will be back to normal shortly
04:20 sm sorry about the disruption f-a, koz_, pointfree, maerwald & all
06:19 Heffalump you had DNS problems before the domain actually expired? That seems a bit odd.
06:29 dino-_ joined #darcs
07:11 notdan sm, pointfree: yes; pointfree's patch is strictly better
07:11 notdan i could never figure out the CSS/layout :)
07:41 lelit joined #darcs
08:18 lelit joined #darcs
08:34 haasn joined #darcs
09:00 lelit joined #darcs
09:12 haasn joined #darcs
09:36 Reyu joined #darcs
09:37 haasn joined #darcs
09:38 IbnFirnas joined #darcs
10:13 bishboria joined #darcs
10:20 aristid joined #darcs
10:21 aristid joined #darcs
10:21 aristid joined #darcs
10:21 carter_cloud_ joined #darcs
10:24 lelit joined #darcs
10:42 carter_cloud joined #darcs
10:42 bishboria joined #darcs
10:42 haasn joined #darcs
10:46 carter_cloud joined #darcs
10:46 bishboria joined #darcs
10:46 haasn joined #darcs
10:59 carter_ joined #darcs
11:36 carter_cloud joined #darcs
11:36 bishboria joined #darcs
11:36 haasn joined #darcs
11:48 sm joined #darcs
12:00 ggherdov` joined #darcs
12:02 sea-gull joined #darcs
12:11 mal`` joined #darcs
12:30 lambdabot joined #darcs
12:54 mal`` joined #darcs
13:18 Igloo joined #darcs
13:56 pointfree joined #darcs
13:57 maerwald where is simon?
14:07 pointfree sm, notdan: really I would like the pdf iframe to resize to the full height of the pdf to avoid having 2 scrollbars, but I wouldn't know how to do it without javascript.
14:37 maerwald I have deployed the mail notification patch. It can be tested here https://darcs.hasufell.de
14:48 carter_cloud joined #darcs
14:48 bishboria joined #darcs
14:48 haasn joined #darcs
15:16 Big_G joined #darcs
15:29 xauth joined #darcs
15:47 Big_G joined #darcs
15:59 Big_G joined #darcs
16:10 xauth joined #darcs
16:29 Riastradh joined #darcs
16:51 Big_G joined #darcs
16:56 sm joined #darcs
16:56 Riastradh joined #darcs
16:56 carter_cloud joined #darcs
16:58 haasn` joined #darcs
18:19 mizu_no_oto joined #darcs
20:00 mizu_no_oto joined #darcs
20:05 maerwald sm: did you test the mail notification yet?
20:26 PEB` joined #darcs
20:33 sm maerwald: no, I was wondering if it's browsable on your instance (it's not on hub)
20:33 maerwald yes
20:33 maerwald https://darcs.hasufell.de
20:34 maerwald create account, login, then subcribe here for example https://darcs.hasufell.de/hasufell/darcsden/issue/2
20:34 sm https://darcs.hasufell.de/hasufell/darcsden/patch/89c00d8674cb027b6cf136d2419fd03c4c17fde0, I see
20:34 maerwald the subscribe thing is via REST API, so it's: issueURL ++ "/subscribe" or issueURL ++ "/unsubscribe"
20:35 maerwald and I also made a boring button for it
20:35 maerwald but I'm not good with buttons
20:35 sm maerwald: what's the process for upgrading the couchdb schema ? I forget
20:35 maerwald well, I don't really know what either
20:35 maerwald it's definitely important
20:36 maerwald I guess if you click subscribe on an old issue, it will just die?
20:36 sm eg, how did you add the subscribe field to the db, is it automatic ?
20:37 maerwald for new issues yes
20:37 maerwald maybe even if you update an old issue
20:37 sm ah
20:38 maerwald but it shouldn't be too hard to add an empty "subscribers:[]" field to the issues
20:40 sm huh, now I can view the patch on darcs hub too. ok then
20:41 sm maerwald: what new security & scalability considerations does it bring for darcs hub.. if any ?
20:41 maerwald the mail stuff happens in the background via forkIO
20:42 sm is it easy to DDOS somehow ?
20:42 maerwald but not multiple sendmail calls
20:42 maerwald only one at a time
20:42 maerwald well, I don't think so... you can only subscribed as a registered user
20:42 maerwald and only for your registered mail address
20:42 maerwald not some random one
20:42 sm great
20:42 maerwald unless you make your own mail address a random one^^
20:43 maerwald maybe we should implement a "confirmation" system
20:43 maerwald for registration
20:43 sm well could a spammer sign up an account and somehow use it to send mass emails ?
20:44 maerwald you cannot subscribe other people, so I'd say no
20:44 sm great
20:44 maerwald but he could set his own mail to a random one
20:45 maerwald and then that guy would get spam...
20:45 maerwald but that can be solved by confirmation mails...
20:45 sm that's not so bad
20:45 sm how do you restrict it to sending one mail at a time ? I'm not seeing that
20:46 maerwald it's just mapM_ ...I assume that doesn't happen in parallel
20:46 maerwald and that is behind a forkIO
20:46 maerwald the whole thing
20:46 sm ok, it's running at hub-dev.darcs.net now
20:47 maerwald I had trouble with getting the sendmail thing to work correctly, what setup are you using there?
20:47 maerwald I ended up with ssmtp and authenticating to my mailhub
20:48 sm maerwald: um.. I think a regular postfix setup
20:48 sm the forkIO returns immediately, so it can spawn multiple threads, right ?
20:48 maerwald hehe, it chokes: http://hub-dev.darcs.net/simon/darcsden/issues
20:48 maerwald object missing `subscribers': JSONObject
20:48 maerwald so the couchdb needs an update
20:48 maerwald obviously
20:49 sm can you make it handle that automatically ?
20:49 maerwald probably
20:49 maerwald like an in-code DB update?
20:50 sm is that even needed ? I don't quite remember how this was handled last time
20:50 maerwald I think the best thing would be to do a manual couchdb update with a script
20:50 maerwald but that works only via HTTP PUT methods, right?
20:51 maerwald some curl magic probably
20:52 maerwald I'll try to come up with something
20:53 sm I see patches like 'Schema for private repos' update DarcsDen.State.Schema
20:53 sm oh, but that has moved elsewhere
20:54 sm to DarcsDen.Backend.Permanent.CouchDB.Schema
20:55 sm uh.. or not
21:00 maerwald works with curl, just need a reliable method to parse/update the stuff
21:02 sm I haven't done a schema update since the back end was generalised, my knowledge is out of date
21:02 maerwald maybe it would even be easier with javascript, but I'm not much into that language
21:04 maerwald this on the instance host should give all issues: curl -X GET http://127.0.0.1:5984/issues/_all_docs
21:04 sm I think designs should be updated in DarcsDen/Backend/Permanent/CouchDB.hs
21:05 maerwald so it should automatically update on darcsden start?
21:05 sm that would be nice, but I suspect not. It will at least set up new dbs correctly
21:05 maerwald as in: verify that the db is the newest schema... I guess that might take a while though
21:05 sm wish we were using persistent
21:06 sm for manual couch admin tasks, I use the futon UI
21:07 maerwald I only find japanese bedding with that search term
21:08 sm couchdb futon works better
21:08 sm it's easy enough to add the field manually.. I don't know how many other darcsden users out there will need to do the same
21:08 maerwald the best would really be a script, but I'm a bit lost on how to properly parse the couchdb data I get with curl
21:08 maerwald bash sux
21:10 maerwald I mean it's just json, right? so it should work with jsawk etc
21:10 maerwald but I get parse errors
21:11 sm wreq is very nice and handles json well
21:11 sm http://www.serpentine.com/wreq/tutorial.html
21:12 sm but I sort of thought couchdb was schemaless and it would be fine to just save the new field, and make sure we don't break if it's missing
21:16 sm afk
21:25 sm ps perhaps the readJSON implementation can be made more forgiving
21:31 maerwald sm: I have a scary script
21:32 maerwald but you should backup the db beforehand
21:32 maerwald https://gist.github.com/hasufell/f5472a2f72d2de5cae1b
21:33 maerwald it requires jsawk from https://github.com/micha/jsawk
21:36 maerwald works locally, but...
22:14 maerwald I wonder... if I wanted to implement notifications for the repository (new patches) would that be possible in darcsden or do I need to handle that on darcs/ssh level?
22:36 pointfree maerwald: notify of new patches on downstream and upstream branches too? http://hub.darcs.net/simon/darcsden/patches
22:38 maerwald first downstream
22:38 maerwald just per-repository
22:38 maerwald should be easy to realize on DB level, but then I need to hook in somewhere
22:39 koz_ left #darcs
22:39 maerwald almost looks like "channelRequest" in darcsden-ssh.hs is the place
22:44 pointfree Maybe this notification thing should eventually be factored to dovetail with the darcsden feed and that the darcsden feed + notifications should be refactored as pattern matching on: repo, user, darcsden instance, upstream branches, downstream branches, and issues.
22:54 sm maerwald: how about making http://hub.darcs.net/maerwald/darcsden-mail-notify/browse/src/DarcsDen/State/Issue.hs#208 not fail
22:56 pointfree ...making an "eye" icon in the style of the other darcsden icons (with GIMP) for the subscribe button (unless someone else is already on it?)
22:56 sm yay :)
22:56 maerwald pointfree: I cannot follow and it sounds complex
22:57 maerwald sm: ah, like: getAttrOr o "subscribers" []
23:00 maerwald yep, that works well
23:01 maerwald and subscribing afterwards still works
23:02 maerwald sm: http://hub.darcs.net/maerwald/darcsden-mail-notify/patch/1503ae914c39c3457360ebe7c37e0faa778d6883
23:02 maerwald who would have thought a one-liner is the solution :D
23:17 sm maerwald: probably need to do similar in the show function eh
23:18 maerwald which one?
23:18 sm right below..
23:18 maerwald I don't see that it needs a fix
23:19 sm I'm guessing http://hub.darcs.net/maerwald/darcsden-mail-notify/browse/src/DarcsDen/State/Issue.hs#237 will fail when the field is missing ?
23:20 maerwald why would it?
23:20 sm that would seem normal.. is there something special about lens that makes it work ?
23:21 sm what does "view idSubs isd" do for an issue without the field ?
23:21 maerwald all issues have that field
23:21 maerwald because that's what the code says
23:22 maerwald the other thing is just the json query
23:22 maerwald which is the only thing that can fail
23:22 maerwald so the issue in the db isn't strictly the same as the issue in the code
23:22 sm oh, ok. And if it's empty, it'll be "" in the json ?
23:22 maerwald the json query closes that gap with getAttrOr
23:23 maerwald for this case it'll be [], yes
23:23 sm building..
23:24 maerwald pretty cool trick for DB migration
23:24 maerwald so instead of fixing the DB or doing exceptions, just give the json query function a default
23:25 sm overused it can lead to confusion, but should be find for us
23:25 maerwald it's only problematic if the field is some sort of mandatory field
23:25 sm fine
23:25 maerwald I can imagine that there are fields where there is no sane default and it that case, you cannot use that trick
23:26 maerwald e.g. "owner"
23:26 sm or changes which could break things when you need to roll back
23:26 maerwald yeah, but the subcriber thing is really not mandatory in any way
23:26 sm yeah. hub-dev is looking better now
23:26 maerwald even if it's dead data in the DB at some point, it probably doesn't hurt
23:27 maerwald time to test your sendmail setup :P
23:27 sm let me subscribe too.. which issue ?
23:28 maerwald wow, it worked
23:28 maerwald the FROM address just looks a bit weird
23:28 maerwald you probably need to fix that in darcsden.conf
23:28 maerwald http://hub-dev.darcs.net/maerwald/games-overlay/issue/1
23:28 sm ok
23:28 maerwald it says "darcsden@localhost"
23:28 maerwald might get blocked/banned on some mail servers
23:29 sm where do you get it from ?
23:29 maerwald sendEmail = darcs@foo
23:30 sm oh I see it
23:30 pointfree Eyelid closed for UNsubscribe button. Eyelid open for subscribe button.
23:31 maerwald pointfree: I am really bad at web UI design...
23:31 maerwald guess what took me the most time... creating that button, actually xD
23:31 maerwald the rest was a walk in the park
23:31 pointfree maerwald, I'm on it, with GIMP.
23:32 pointfree maerwald, did you already design a button?
23:33 pointfree I just need to add some pixel eyelashes to make things clear...
23:33 maerwald there's also another slight usability problem: if you add stuff in the comment field and then hit "subscribe", then your stuff is gone... I see three solutions: 1. move the button somewhere else so you cannot even subscribe when you are commenting or 2. cache the text through cookies or js or 3. move the whole logic to JS and make it non-REST (don't like it)
23:34 maerwald or just give a js-based warning that your comment might be gone
23:34 maerwald a popup window
23:34 sm the simpler the better
23:34 sm I've changed the from address to no-reply@hub.darcs.net
23:34 sm the notifications land in my junk folder.. how about you ?
23:34 pointfree Well, with javascript you would not have to reload the page to toggle the button state?
23:35 maerwald pointfree: right, but that's so non-REST, I don't like it
23:35 maerwald currently you can subscribe via url even
23:35 maerwald that's nice imo
23:35 maerwald and I don't want to do js coding :P
23:35 sm nobody does :)
23:36 maerwald I think going with a popup warning is the simples solution
23:36 maerwald another way would be to subscribe at the issue list
23:36 maerwald not at the comment
23:37 maerwald so many possibilites... makes my brain hurt
23:38 sm I get X-Spam-score: 1.2 for these, which I guess is not too bad
23:38 sm most of that is due to MIME_HTML_MOSTLY 0.428
23:38 pointfree Is it not possible to have both the handy /subscribe /unsubscribe urls and button toggling without reloading the entire page? (I'm not really a webdev)
23:39 maerwald sm: mh, the github ones get 0.8, why are they better?
23:39 sm also we have no DKIM/DMARC/SPF configured
23:39 sm also possibly it doesn't like .net vs .com from reverse dns (X-Spam-source: IP='173.255.219.222', Host='li229-222.members.linode.com', Country='US',
23:39 sm FromHeader='net', MailFrom='com')
23:39 maerwald pointfree: yes... but then you still need to do the "without reloading" part in javascript afais
23:40 maerwald so go ahead if you like :P
23:40 maerwald maybe it's time for ghcjs
23:41 sm just keep in mind that darcsden UI is already a scary complicated place for new hackers...
23:41 sm anything to simplify would be appreciated
23:41 maerwald sm: yeah, the worst thing is all the inline html IMO
23:42 maerwald RepoPages.hs is just awful
23:42 sm I wanted to replace that, but it's actually rather practical
23:42 sm unlike most other systems, the template and code are adjacent and there's little boilerplate
23:42 maerwald the alternative would probably be client-site rendering, right?
23:42 maerwald and then you end up with js again
23:43 sm I'd be glad to see someone test and compare other approaches
23:43 maerwald and I start to unlike the snap framework
23:43 maerwald it exposes too much IO imo
23:43 sm what would you prefer ?
23:44 maerwald do you know the diagrams library?
23:44 maerwald they delay IO for as long as possible
23:44 sm yes
23:44 maerwald the diagrams you build are all pure
23:44 maerwald and in the end you feed them to a "builder"
23:44 maerwald like the cairo API
23:44 maerwald via a single function
23:44 maerwald that does the IO...
23:45 maerwald that's a lot more abstraction/indirection, but it removes side effects
23:47 sm any existing web frameworks like that ?
23:47 maerwald I don't even know :D
23:47 maerwald this is my first take on haskell web development...
23:47 sm awesome :-)
23:47 maerwald maybe yesod?
23:48 sm maerwald: well so far so good on mail notifications, this is great progress - thanks a lot for tackling it! I guess I'll deploy now
23:49 sm done
23:49 maerwald sm: http://hub.darcs.net/maerwald/darcsden-mail-notify/browse/src/DarcsDen/Mail.hs#29 here is the mail body and summary if you want to rewrite the mail content
23:49 maerwald I tried to stick to what github does, more or less, but my html skills are low
23:49 sm thank you.. I probably won't have time, improvements welcome from anyone
23:50 sm oh, ready for the feature requests.. ? :)
23:51 sm subscribe to a whole tracker, including new issues
23:51 maerwald I think the next most important one would be to subscribe to repository pushes
23:51 maerwald but I'm not sure yet where to hook in for that
23:52 sm I'm not sure about that, but all patches welcome
23:53 sm what about the existing darcsden-posthook that handles issue closing
23:53 maerwald where is that
23:54 sm http://hub.darcs.net/simon/darcsden/browse/post-hook

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