The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2015-09-09

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

All times shown according to UTC.

Time Nick Message
00:00 jontaylor joined #mojo
00:17 PryMar56 joined #mojo
00:21 bpmedley joined #mojo
00:23 mattastrophe joined #mojo
00:41 mattastrophe joined #mojo
00:55 disputin joined #mojo
01:03 disputin joined #mojo
01:13 mattastrophe joined #mojo
01:37 mattastrophe_ joined #mojo
01:42 mattastrophe joined #mojo
01:45 mattastrophe_ joined #mojo
01:56 gryphon joined #mojo
02:02 noganex joined #mojo
02:15 PopeF joined #mojo
02:46 sri genio: because they merged with io.js, which had regular x.0 releases
02:46 sri or rather, io.js became node.js
02:59 noganex_ joined #mojo
03:00 kaare joined #mojo
03:02 genio sri: off topic, but do you get a warning using perlbrew with 5.22 when using cpanm?
03:03 genio $ cpanm Mojolicious     # "Constants from lexical variables potentially modified elsewhere are deprecated at /loader/0x7fa892036be0/aliased.pm line 1." and then it goes through normally
03:04 mattastrophe joined #mojo
03:05 mattastrophe_ joined #mojo
03:15 jberger genio: that sounds like a cpanm problem
03:16 genio yea, I'm not meaning to suggest it's a mojo problem.
03:16 jberger Also I would be surprised if miyagawa was unaware of it, have you updated it?
03:16 genio just wanted to see if it's only happening to me (my perlbrew/homebrew setup broken in some unknown way) before logging an issue
03:17 genio yep, fresh perlbrew install of 5.22 and App::cpanminus
04:35 inokenty-w joined #mojo
04:41 Adura joined #mojo
05:37 pink_mist joined #mojo
05:57 Myk267 joined #mojo
06:27 berov1 joined #mojo
06:35 janus joined #mojo
06:39 dod joined #mojo
06:40 dod joined #mojo
06:53 dod joined #mojo
07:05 kivilahtio joined #mojo
07:06 AndrewIsh joined #mojo
07:07 brrt joined #mojo
07:10 eseyman joined #mojo
07:14 Vandal joined #mojo
07:26 trone joined #mojo
08:03 berov joined #mojo
08:16 jontaylor joined #mojo
08:36 akhasanov joined #mojo
09:13 meshl joined #mojo
09:36 berov joined #mojo
09:49 akhasanov joined #mojo
09:50 Vandal joined #mojo
09:53 bwf joined #mojo
09:54 akhasanov joined #mojo
09:57 akhasanov joined #mojo
10:01 bwf joined #mojo
10:03 Flying_Squirrel joined #mojo
10:18 kivilahtio joined #mojo
10:44 dod joined #mojo
10:46 mattastrophe joined #mojo
10:46 mattastrophe_ joined #mojo
10:48 dod joined #mojo
10:50 dod joined #mojo
11:14 eseyman joined #mojo
11:16 neilhwatson joined #mojo
11:17 meshl joined #mojo
11:25 CandyAngel joined #mojo
11:25 * CandyAngel waves
11:26 CandyAngel I'm back!
11:26 Flying_Squirrel Hi CandyAngel
11:27 CandyAngel Heyas Flying_Squirrel
11:29 Flying_Squirrel CandyAngel, you're not a bot, are you? (I don't come often here)
11:30 CandyAngel No, I'm not a bot :P
11:30 CandyAngel I have pretended to be before.. to a bot, which confused its author :P
11:31 Flying_Squirrel that sounds like something I could do out of boredom or just to mess with the author.
11:31 CandyAngel His personal bot joined a random channel I'm in and started PMing me
11:31 CandyAngel So I was messing about, then the author was talking through the bot
11:31 CandyAngel Then joined the channel and apologised that it had gotten loose!
11:31 CandyAngel Was really funny :P
11:32 Flying_Squirrel Oo his bot got loose?! What was the bot's task?
11:33 CandyAngel If I recall correctly, it was "Girlfriend Bot"
11:33 CandyAngel But it didn't say anything specific to that for ageeeeees
11:34 Flying_Squirrel weird
11:34 CandyAngel When it did, I blocked it from the channel and it was PMing me
11:34 CandyAngel "Nooo, why did you block me? Do you not like me anymore?"
11:34 Flying_Squirrel so it was just roaming random chans?
11:34 CandyAngel I think so
11:35 CandyAngel It was amusing, and the author was pleasant enough when he came and apologised
11:35 Flying_Squirrel :)
11:36 Flying_Squirrel so, CandyAngel, have you been using Mojolicious for a while?
11:37 CandyAngel A little while, yeah
11:37 CandyAngel I'm still learning a lot about it
11:37 CandyAngel But in classic form, I dove right into the deep end and wanted to do unusual things with it
11:37 CandyAngel But lots of people here helped so I achieved the goals :)
11:38 Flying_Squirrel I have a hard time learning anything but I did get Mojolicious to do stuff. Was ugly because I wrote ugly code but I was happy.
11:39 CandyAngel As long as you were happy!
11:40 Flying_Squirrel It's not as satisfying as good code but well, you do with what you have.
11:40 CandyAngel Mhm
11:40 CandyAngel I tend not to be happy with my code anyway
11:41 CandyAngel Don't know what I am doing half the time
11:41 CandyAngel .. as anyone who was here the last time I was here will testify
11:41 CandyAngel :D
11:41 Flying_Squirrel :D
11:42 Flying_Squirrel I often feel like I'm doing things the wrong way and re-inventing the wheel or not respecting the MVC "mindset"
11:42 CandyAngel Yeah
11:42 CandyAngel \o/
11:42 CandyAngel I just found a supppppppppppper long Hula Hoop
11:43 Flying_Squirrel and I've yet to learn how to deploy anything... wait what?
11:43 CandyAngel :D
11:43 CandyAngel Just opened a pack of Hula Hoops
11:43 CandyAngel And there is one that is like
11:43 Flying_Squirrel a pack of Hula Hoops?
11:43 Flying_Squirrel for me Hula Hoops is a kind of game
11:44 CandyAngel http://www.virginmedia.com/images/hula_hoops_crisps430x300.jpg
11:44 Flying_Squirrel ok
11:45 Flying_Squirrel By the way, do you use Perl for other purposes? Or you just fell in love with Mojolicious because reasons?
11:46 CandyAngel Perl is my primary coding language
11:46 Flying_Squirrel nice
11:46 CandyAngel I use it for.. well.. everything
11:46 Flying_Squirrel how did you start?
11:47 CandyAngel Like.. a couple of my other projects are VR environments, a game.. automation at work
11:47 Flying_Squirrel ooh
11:47 CandyAngel A friend taught me a while ago
11:47 Flying_Squirrel VR is cool
11:47 jontaylor joined #mojo
11:47 CandyAngel Yeah
11:47 CandyAngel With a little help from the OpenHMD people, I wrote a perl wrapper for the OpenHMD library
11:47 CandyAngel So I can use my Rift DK1
11:48 Flying_Squirrel I definitely need a job so that I can buy nice toys
11:49 CandyAngel Aw
11:49 Flying_Squirrel was it an awkward thing to say?
11:50 CandyAngel Was what an awkward thing to say?
11:50 Flying_Squirrel what I said, because I don't know how to interpret your "Aw" :)
11:51 CandyAngel Oh, no, it was um.. a sympathetic aw
11:51 Flying_Squirrel oh ok :)
11:51 CandyAngel Like "Aw, that sucks that you can't get nice toys"
11:52 CandyAngel Took me a while to get the DK1.. the DK2 had already been out for quite a while
11:52 Flying_Squirrel but I get to sleep on mornings if I need to ^^
11:52 CandyAngel So it was *relatively* cheap
11:52 CandyAngel :P
11:52 CandyAngel Silver lining to everything!
11:52 Flying_Squirrel I have tried the Occulus Rift on several occasions, it was nice
11:53 Flying_Squirrel I got all carried away by the possibilities
11:53 CandyAngel :P
11:53 CandyAngel I understand completely!
11:53 CandyAngel I'm the same.. moreso with git-annex than VR though
11:54 Flying_Squirrel I'd like to play World of Warcraft with a VR helmet and some keyboard-like thingies and some stuff to walk and sit, I thought the whole thing through, was fun
11:55 Flying_Squirrel I also had the occasion to try a real military flight simulator and that was cool, flight simulation in that can only be awesome
11:55 CandyAngel Sounds like fun :)
11:56 Flying_Squirrel yup
11:56 Flying_Squirrel and what are your projects now?
11:57 CandyAngel The one I am working on right now is an assistant sort of thing for my work
11:57 CandyAngel I'll log into various systems and run transactions and get data
11:57 CandyAngel It'll*
11:57 Flying_Squirrel sounds interesting
11:57 CandyAngel I got a little stuck/confused though
11:57 Flying_Squirrel ah?
11:57 CandyAngel It tries to log into one, I get the cookies and everything in the cookie_jar, but when I POST to do the search, it doesn't send the cookies
11:58 CandyAngel So it just returns the login page again
11:58 Flying_Squirrel been there, more or less
11:58 CandyAngel I'm not sure if I am missing something, or if I need to build the TX and do ummm
11:58 CandyAngel $ua->cookie_jar->prepare($tx);
11:58 CandyAngel And then $ua->start($tx)
11:58 Flying_Squirrel no idea
11:59 CandyAngel Seems.. unlike Mojo for it to be so long-winded
11:59 Flying_Squirrel I was sending data directly in command line to fill-in a form using the POST protocol
12:00 Flying_Squirrel there were hidden fields or something like that, it didn't make much sense, still doesn't
12:05 CandyAngel I see
12:06 CandyAngel Hm
12:07 CandyAngel The $jar->prepare didn't work either
12:08 Flying_Squirrel Doh
12:09 CandyAngel Indeedy
12:09 CandyAngel It's going to be something obvious, I'm sure :P
12:10 Flying_Squirrel yup
12:12 CandyAngel The good thing is I can look at Mojo's source code, so I can see what 'prepare' actually does, for example
12:12 CandyAngel And.. interestingly, it does do what I thought it did.. but it isn't working for some reason
12:13 Flying_Squirrel :/
12:17 CandyAngel COnsidering how badly this thing I am interfacing to is coded, it might be because that violates something about the cookie spec
12:17 CandyAngel While Mojo is adhering to it and not regarding those cookies as valid
12:17 Flying_Squirrel oh
12:17 CandyAngel For example.. umm
12:17 Flying_Squirrel very likely
12:18 CandyAngel If I use to_string on the cookies that get set, I get "NAME=VALUE; path=PATH"
12:18 CandyAngel There is no domain or anything
12:18 Flying_Squirrel ok
12:19 CandyAngel So $jar->prepare is probably ignoring it
12:19 Flying_Squirrel can't you bypass that?
12:19 CandyAngel Ugh, and these people have the audacity to complain that the code I write "isn't corporate quality"
12:19 Flying_Squirrel :D
12:19 CandyAngel Well, of course it isn't.. apparently, it's better!
12:19 Flying_Squirrel ^^
12:19 CandyAngel :|
12:20 CandyAngel Seeing as the site is coded in Perl (once, the server served me the raw CGI..), they should let me code a new front end!
12:20 CandyAngel It would be done in Mojo and it would be amazing
12:20 Flying_Squirrel well for now you may have to use a metaphorical sledgehammer to get your job done
12:20 CandyAngel Yup
12:21 CandyAngel Basically.. add ALL the cookies \o/
12:21 CandyAngel \o_
12:21 Flying_Squirrel and hope you don't get diabetes
12:21 CandyAngel WIth a comment
12:21 CandyAngel # Backend site violates cookie spec by not defining a domain
12:21 Flying_Squirrel ^^
12:24 Flying_Squirrel I need to be afk two hours, hope we can talk again then or another time!
12:29 CandyAngel Sure, I'll still be here
12:35 tencendur joined #mojo
12:36 brrt joined #mojo
12:39 CandyAngel Hmmm
12:40 dod joined #mojo
12:41 CandyAngel I see
12:41 CandyAngel Mojo is ignoring the cookies because the domain doesn't have a '.' in it
12:41 CandyAngel :|
12:43 nicomen isn't that to prevent being able to set TLD cookies
12:44 nicomen .com etc
12:44 ajr_ joined #mojo
12:45 CandyAngel Mhm
12:45 CandyAngel I get why, it's just annoying :P
12:45 CandyAngel I added the "local" domain to it and it works now :)
12:48 CandyAngel I understand if like.. something sets a cookie for 'com' and then you request example.com.. it shouldn't do it (supercookie protection)
12:49 CandyAngel But when the ihost is 'com', the origin&domain of the cookie is 'com'.. it should be included
12:53 good_news_everyon joined #mojo
12:53 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vZZ6m
12:53 good_news_everyon mojo/master 3336f6e Sebastian Riedel: be more specific about certificate use (closes #841)
12:53 good_news_everyon left #mojo
12:56 mattastrophe joined #mojo
12:57 mattastrophe_ joined #mojo
12:59 sri cookie security is hard
13:00 sri like seriously, browsers these days even use a tld database https://publicsuffix.org/list/effective_tld_names.dat
13:01 sri pretty awesome with the new tlds
13:02 Quai well, it was a mess even before the new gtlds, just look at the .no exceptions
13:03 sri but at least icann is printing money... to do... stuff... maybe
13:04 hernanGOA joined #mojo
13:06 nicomen that TLD lists has been for a while due to the sub tld... co.uk for the win
13:06 irqq joined #mojo
13:06 nicomen wonder if DNS doesn't have a way to tell you if something is a TLD for realz?
13:07 pink_mist another problem with requiring . in the cookie domain is internal sites with no tld on their domain name :/
13:07 dvinciguerra joined #mojo
13:07 Quai nicomen: you where even a part of introducing yet another entry to that list; operaunite.com ;P
13:07 nicomen Quai: I am, not intentionally though
13:08 nicomen what a lot of crazy spaghetti stuff that was
13:08 nicomen even having plenty of good security people around
13:08 Quai alien technology, sort of.
13:08 nicomen Quai: you still hanging in there?
13:09 Quai yeah, Im not right-sized yet.
13:09 sri i'm open to making adjustments to Mojo::UserAgent::CookieJar, but please make sure they are compliant with http://tools.ietf.org/html/rfc6265
13:09 * sri pokes CandyAngel and pink_mist
13:11 * Grinnz makes a PR for sugar cookies
13:11 sri chocolate chip for me
13:12 juikuen joined #mojo
13:13 irqq could Minion be used for any general job queueing, not related to Mojolicious?
13:14 Grinnz i actually was just thinking it's probably usable in my irc bot
13:14 Grinnz i dont see why not
13:14 sri irqq: sure, the Minion instance references an app instance, but that can just be a dummy, Minion doesn't care
13:15 sri actually, it's a dummy by default :) https://github.com/kraih/minion/blob/master/lib/Minion.pm#L12
13:18 sri the app is actually used just once https://github.com/kraih/minion/blob/master/lib/Minion/Job.pm#L56
13:18 sri and that's just logging
13:23 CandyAngel sri: I'll have a look and see if I can come up with some sane logic. Don't hold your breath
13:23 CandyAngel pink_mist: That's the issue I had. The "usual" way of accessing this site is 'http://servicename/login'
13:24 CandyAngel But I got it to work using 'http://servicename.local' (not specifically, but you get the idea)
13:24 * sri holds his breath
13:25 CandyAngel :|
13:25 CandyAngel RIP sri
13:25 CandyAngel You should know I am not the sanest person!
13:25 Grinnz thats ok, he's a robot
13:25 Grinnz he doesn't need to breathe
13:26 sri beep boop bop
13:26 CandyAngel Is he one of those robots from the Black Mirror episode "Be Right Back"
13:26 CandyAngel ?
13:27 DaniBunny joined #mojo
13:29 sri no, those are weird
13:34 CandyAngel Ahhh
13:35 CandyAngel I submitted the HTML this website provides that I am working with
13:35 CandyAngel 1000 errors ;D
13:35 CandyAngel :D*
13:36 bwf joined #mojo
13:37 jontaylor joined #mojo
13:39 CandyAngel Um
13:39 CandyAngel If Mojo::DOM parses this correctly, whoever wrote it should get a medal
13:41 mattastrophe joined #mojo
13:41 sri CandyAngel: actually... https://github.com/kraih/mojo/blob/master/t/mojo/cookiejar.t#L66
13:41 mattastrophe_ joined #mojo
13:41 sri dot is not required at all
13:42 CandyAngel Oh, if the host is localhost it doesn't
13:42 CandyAngel But everything other than localhost does
13:42 Grinnz https://ipfs.io/ipfs/QmNhFJjGcMPqpuYfxL62VVB9528NXqDNMFXiqN5bgFYiZ1/its-time-for-the-permanent-web.html i cant figure out if this is serious
13:43 jontaylor joined #mojo
13:44 CandyAngel I can see how that would work with static pages
13:44 CandyAngel I don't see how it would work with um... how people actually use the web :P
13:46 sri ah
13:49 gryphon joined #mojo
13:50 jb360 joined #mojo
13:53 PopeFoxtrot joined #mojo
13:56 pink_mist <CandyAngel> But I got it to work using 'http://servicename.local' (not specifically, but you get the idea) <-- did you try http://servicename./ first? that might in some cases be enough
13:58 CandyAngel pink_mist: Unless I am reading the regex wrong, the smallest domain it will consider legit is a.a
13:58 CandyAngel /[^.]+\.[^.]+|localhost$/
13:59 CandyAngel Also
13:59 CandyAngel It will consider notactuallylocalhost as a non-TLD :P
13:59 pink_mist CandyAngel: oh .. right :/
14:00 CandyAngel SO more accurately, it will consider subdomain.domain as find
14:00 CandyAngel fine*
14:00 irqq sri: if Minion can be used as a general purpose job queue, out of Mojolicious, can it also manage set of workers?
14:00 CandyAngel And any TLD *ending* in 'localhost'
14:04 melo joined #mojo
14:07 melo1 joined #mojo
14:07 brrt joined #mojo
14:11 sri hmm, the current domain matching behavior might actually be broken
14:11 sri the spec is a nightmare though http://tools.ietf.org/html/rfc6265#section-5.1.3
14:15 Flying_Squirrel joined #mojo
14:15 sri like, what is a "string domain" and what is a "domain string"?
14:16 sri i think our cookiejar might have that the wrong way around
14:16 CandyAngel What is life?
14:16 Flying_Squirrel I'm back
14:16 CandyAngel Welcome back Flying_Squirrel!
14:16 Flying_Squirrel ^^
14:17 CandyAngel So.. am I actually missing something or do I always have to build_tx, $jar->prepare($tx) whenever I want to make a request with cookies?
14:17 Guest54 joined #mojo
14:18 CandyAngel Because if so.. I feel a helper method might spring into existence :P
14:18 sri no wait, actually we got it right and it's messed up in the spec
14:18 CandyAngel Mojolicious: More correct than the spec
14:18 CandyAngel That's a new tagline for you
14:19 sri messed up as in horrible by design
14:19 CandyAngel s/correct/sane/
14:20 sri this one always trips me up.... the origin www.example.com can set cookies for example.com
14:21 CandyAngel As in.. www is a special case?
14:22 sri no
14:22 CandyAngel Well
14:22 sri any subdomain can
14:22 CandyAngel ... hm, seems the whole "TLD cookies are bad" would be easily solveable by not letting subdomains make cookies for domains
14:23 Grinnz_ and break half the internet, probably
14:27 sri ok, this section is more clear http://tools.ietf.org/html/rfc6265#section-5.3
14:27 sri user agents are supposed to use a public suffix database
14:29 sri i guess we could make a configurable database, but i don't see us shipping one
14:30 CandyAngel No, shipping one puts the onus on your to maintain it, which would be silly
14:30 sri anyone know what curl does?
14:30 CandyAngel on your to*
14:30 CandyAngel :|
14:30 * CandyAngel makes the same typo twice
14:31 sri ah, curl does not use the puvlic suffix list
14:37 PryMar56 joined #mojo
14:39 jontaylor joined #mojo
14:54 good_news_everyon joined #mojo
14:54 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vZn0U
14:54 good_news_everyon mojo/master 8aab5b3 Sebastian Riedel: add public_suffixes attribute to Mojo::UserAgent::CookieJar
14:54 good_news_everyon left #mojo
14:54 sri please review!
14:57 jberger is ['com'] a sufficient default?
14:59 meshl joined #mojo
14:59 sri quick reminder https://publicsuffix.org/list/public_suffix_list.dat
15:00 pink_mist damnit, now I gotta rebase ... will probably mess my stuff up =/
15:00 pink_mist I was working on that as you requested
15:01 pink_mist not in the public suffice way though
15:01 sri you didn't say anything :S
15:01 * sri doesn't see another way
15:04 pink_mist instead of next if $ignore->{$domain} I did: next if $host ne $domain && $domain !~ /[^.]+\.[^.]+|localhost/;
15:04 pink_mist and I didn't make use of the public suffixes at all
15:04 sri that wouldn't cover .co.uk and the like
15:05 pink_mist why should it? if I'm on my internal network I might very well have a host with that name
15:06 sri which is exactly why it should be configurable
15:07 sri you need a public suffix list
15:07 pink_mist in the collect sub, where the check has now moved, you can check if the url you're connecting to matches what the domain is set to, and that should be sufficient imo
15:07 pink_mist without a public suffice list
15:08 pink_mist that's what my patch does
15:08 sri that's not RFC compliant
15:08 pink_mist it seems to be to me
15:08 pink_mist how isn't it?
15:08 chansen sri: is correct
15:09 CandyAngel Hmm
15:09 CandyAngel Can Mojo::UserAgent stream the response content to a file, when it only gets the filename in the headers of the response?
15:09 sri in an ideal internet, you would only accept cookies for the current origin, but that's just not how it works, you have to accept them for parent domains too
15:10 CandyAngel (Content-Disposition: filename="example.doc")?
15:10 pink_mist sri: that's already checked though
15:10 pink_mist and isn't rejected
15:11 pink_mist except for co.uk where it might should be rejected I guess
15:11 pink_mist but that's something your patch can fix I suppose; mine might be orthogonal to yours then
15:12 pink_mist I'll see if I can get them working together
15:12 * sri does not agree
15:12 * chansen neither does I
15:13 sri this one looks fun https://github.com/kraih/mojo/issues/842
15:13 pink_mist what is the sticking point?
15:14 chansen sri: hmm, JSON:XS or JSON:PP?
15:15 chansen sri: definitely an incomplete report
15:15 pink_mist sri? chansen? what was it you didn't agree with?
15:16 sri pink_mist: the whole idea
15:17 sri if i have a local "foo.dev" it should be able to set cookies for "dev"
15:18 sri by default, and i should be able to add "dev" to the public suffix list
15:19 sri haha... of course .dev is on the list of new gTLDs -.-
15:19 chansen It's in the RFC, thats why domains serving user controlled data is using a deciated TLD for that
15:24 chansen pink_mist: ^^
15:25 akhasanov joined #mojo
15:27 CandyAngel Hm
15:28 CandyAngel Okay, maybe Mojo can't stream download to a file anyway.. or I lost the docs I had open which showed you how :P
15:28 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Large-file-downloads
15:29 CandyAngel Right
15:29 CandyAngel How do I donate to Mojo? :|
15:29 pink_mist sri, chansen: alright, I'm convinced, you guys are right
15:30 sri https://gratipay.com/mojolicious/
15:30 chansen pink_mist: We know! We have been around since almost the birth of Gopher! ;o)
15:30 sri well, i was actually wrong until 30 minutes ago
15:31 chansen sri: What?
15:31 sri https://github.com/kraih/mojo/commit/8aab5b3d523b18901e65696a30c1048aaecc53ec#diff-6cbf1cc6b36747dc4c49423d3387e266L70
15:31 sri i had to unbork that
15:33 CandyAngel !
15:33 CandyAngel Basically "Mojo will just do the right thing"
15:33 CandyAngel Okay
15:33 CandyAngel So from now on
15:33 CandyAngel Any time I ask a stupid question, I will allocate some money to donate
15:34 sri to be fair, the RFC is very very hard to decypher
15:34 CandyAngel That was #1
15:34 sri CandyAngel: heh
15:34 CandyAngel So at least sri will get paid for pointing me to the docs which answer my questions :P
15:35 sri http://treasure.diylol.com/uploads/post/image/450146/resized_all-the-things-meme-generator-donate-all-the-monies-62692b.jpg
15:36 CandyAngel "Take what you want" is.. interesting..
15:36 chansen sri: since I know you better, that had to been a PEBKAC error!
15:36 sri you can of course also just get t-shirts https://shop.spreadshirt.com/kraih/
15:37 sri </sellout>
15:37 chansen LOL :)
15:37 CandyAngel I can see you are expecting a lot of stupid questions :P
15:37 chansen sri: Give me T-shirt with your sad face on it. and I'll buy it ;oP
15:39 sri https://s-media-cache-ak0.pinimg.com/736x/3c/12/4d/3c124d3311a4cf1e276f68f019c30eaf.jpg
15:39 CandyAngel This gratipay thing looks interesting
15:39 * CandyAngel makes a note for a friend
15:39 CandyAngel It might really suit the community he is building up
15:41 chansen sri: It's your fault I'm part of this community, you ow me a sad face!
15:41 * chansen s/ow/owe/
15:44 lluad joined #mojo
15:48 marty joined #mojo
16:01 asm35 joined #mojo
16:37 mattp_ joined #mojo
16:41 vanHoesel joined #mojo
16:45 brrt joined #mojo
17:08 Janos hi, question, when running a custom mojo command, the app starts, but i'm not sure how much does it starts. Does it reach the point of listening for web requests ?
17:21 asm35 joined #mojo
17:22 disputin joined #mojo
17:24 dod joined #mojo
17:29 batman Janos: no. but startup() is called
17:32 Janos batman, awesome, thanks
17:36 * sri can't stop laughing... iSurface Pro, finally!
17:38 alint joined #mojo
17:55 jb360 joined #mojo
17:59 irqq joined #mojo
18:05 sri 3 yars old comic! http://hijinksensue.com/wp-content/uploads/2013/08/2012-06-19-surface-tension.jpg
18:05 sri +e
18:07 genio hahaha
18:08 Grinnz amazing
18:09 trone joined #mojo
18:12 sh4 joined #mojo
18:14 mattastrophe joined #mojo
18:17 disputin joined #mojo
18:21 berov1 joined #mojo
18:31 ajr_ joined #mojo
18:36 dvinciguerra joined #mojo
18:43 Janos this question has little to do with mojo and much to do with my lack of knowledge of the perl world. Once the mojo app is ready and since I'm using carton as the package manager, I would like my deploy scenario to be something like, generate archive -> distribute archive -> user unpacks archive -> user runs carton install -> user starts the app with carton exec hypnotoad script/myapp
18:44 Janos so first question, does that flow makes sense ? is there a better way ?. I would like to keep deployment as simple as possible and avoid using global perl modules at all cost aside from the core modules
18:46 Janos can you recommend some reading about this, hopefully focused on a mojo app ?
18:53 Janos another question, is there anything that allows me to load a mojo config file from outside of a mojo app ?
18:54 Janos assuming this is a simple file that does not reference the mojo app itself
18:55 Grinnz_ https://metacpan.org/pod/Mojolicious::Plugin::Config or https://metacpan.org/pod/Mojolicious::Plugin::JSONConfig support arbitrary file paths
18:55 Grinnz_ oh, you mean load it outside the app context
18:55 Grinnz_ you can use those standalone with a bit of finagling
18:56 jberger you could just "do" the file to load it if it doesn't have "app" in it
18:57 Janos great will check the do
18:58 jberger (of course there are security implications to that too, you have to trust the file or not care about the interpreter instance its running in, as with any eval)
18:59 asm35 joined #mojo
18:59 Grinnz_ json config is a bit more secure in that regard
19:00 Grinnz_ though that plugin also allows embedded perl
19:01 Janos mm I could use the JSON config plugin in my app and use something else to load the JSON outside my app
19:01 Grinnz_ if you don't use any embedded perl in it, that would be pretty easy yeah
19:01 Grinnz_ use Mojo::Util 'slurp'; use Mojo::JSON 'decode_json'; my $config = decode_json slurp $filename;
19:03 Grinnz_ (that would also mean no comments, though)
19:04 Janos but even if embedded perl is used, I would just get the text when not using the plugin, so it should work as long as I don't expect anything to be eval'd
19:04 Janos that's great, will work towards that
19:06 Grinnz_ there's another option, which is to load up the app to use its config, that seems to be what i ended up doing here: https://github.com/Grinnz/PYX-Mojo/blob/master/script/pyx_load#L24
19:06 Grinnz_ (->redis is a helper that uses config)
19:10 Janos yeah that's pretty close to using a command, I'll be migrating this script to a mojo command, but that will take some time
19:11 Grinnz_ yeah, in retrospect that script should be a command :)
19:11 Grinnz_ but i'll get back to working on that someday...
19:22 * tempire prepares to make all the tv apps
19:30 Janos by the way I know there is slurp, but how would I go about reading line by line from stdin from a mojo command ?
19:31 jberger tempire: ?
19:31 Grinnz_ same as you normally would i suppose?
19:31 Grinnz_ with readline
19:31 Janos while ($line = <>) does not seem to work
19:32 jberger Janos: you probably can't pass in the filename
19:32 jberger <$handle> should would
19:32 jberger s/would/work/
19:32 Grinnz_ <> on a filename isn't stdin, it's readline magic
19:32 Grinnz_ or ARGV magic i guess
19:33 jberger you can cheat by doing "local @ARGV = 'filename'; <>'
19:33 jberger but better just to open a handle and read from it
19:33 Grinnz_ or ./myapp command <filename
19:33 Janos yeah indeed it's, i'll try <STDIN>
19:35 Grinnz_ just remember it's going to be encoded into UTF-8 (most likely) when you read it...
19:37 tempire jberger: new apple tv os allows for apps
19:37 jberger aaaah
19:40 preaction about damn time...
19:40 preaction sorry
19:41 * sri doesn't like any of the new apple stuff :/
19:42 preaction i've had an appletv since v1. since v3 with ios, they could've done apps. now they're finally doing it...
19:42 sri pressure sensitive touchpads are a logical next step... otherwise it's all just fashion products now
19:43 preaction apple's always been on the path to ubiquitous computing. fashion is the current step.
19:43 preaction i'm wondering when someone's going to start taking electronic implants seriouslys
19:43 sri double wrapped wristbands!
19:44 preaction implanted OLEDs for fun and profit!
19:51 * jberger remembers "Black Mirror - The Entire History of You" and shivers
19:52 sri netflix has picked up black mirror
19:52 genio That's a messed up show
19:54 sri jberger: did you get an answer for your question about default_suffixes?
19:54 sri umm
19:54 sri default public_suffixes
19:55 * sri has no clue if .com should be the only default https://github.com/kraih/mojo/commit/8aab5b3d523b18901e65696a30c1048aaecc53ec#diff-6cbf1cc6b36747dc4c49423d3387e266R9
20:00 jberger sri: re: Black Mirror, yeah I saw that, I need to get up the constitution to watch the second season
20:00 jberger I really liked the first, but its so emotionally draining
20:01 lluad The full publicsuffix.org list is probably the right thing to use. At least they provide a test suite for it.
20:01 jberger re suffixes: I would almost prefer to use [] as the default rather than just ['com']
20:02 lluad Yeah. Just .com feels like a bug waiting to happen.
20:02 akhasanov joined #mojo
20:03 sri hahahaha
20:04 sri no, we'll not ship the whole list
20:04 jberger might be a nice example to show how to load it from the site though
20:04 sri i'm ok with no public_suffixes by default too
20:06 Quai but allowing all site to set cookies on gtld-level is also a bad thing, right?
20:07 Quai I could trick a m:ua crawler into sending a larger number of cookies to a target.
20:08 sri yes, you could
20:08 lluad It's less of a big deal for clients that aren't browsers used by real people.
20:08 sri and that's ok
20:11 good_news_everyon joined #mojo
20:11 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vZC8f
20:11 good_news_everyon mojo/master 060bb72 Sebastian Riedel: no need for default public suffixes
20:11 good_news_everyon left #mojo
20:15 mishanti1 Wow. The way https://developer.apple.com/tvos/ is worded it is very easy to think "yeah, thats a thing of the past".
20:21 jberger http://pastie.org/10408510
20:22 sri :)
20:27 sri in one-liner form
20:27 sri perl -Mojo -E 'b(g("https://publicsuffix.org/list/public_suffix_list.dat")->text)->split("\n")->map("trim")->map("to_string")->grep(sub { $_ !~ m!^\s*//! })->compact->join("\n")->encode->say'
20:28 mattastrophe joined #mojo
20:28 mattastrophe_ joined #mojo
20:28 Quai both of you are ignoring the * and ! notation :P
20:35 jberger Quai: what are those supposed to mean?!
20:36 jberger does that mean that *.bd means that .anything.bd is a public suffix?
20:36 Quai https://publicsuffix.org/list/
20:36 Quai wildcard and exceptions for the previous wildcard
20:36 jberger argh
20:36 Quai yeah
20:39 sri think i'm ok with not supporting those special rules
20:40 sri makes using the list a little harder though
20:40 sri (seems annoying to make elegant, and i don't want to hack on it now ;p)
20:40 jberger even if it was just the wildcards it wouldn't be SO bad
20:41 sri it's pretty bad, *.*.*.foo.bar is valid
20:42 sri so much code to make it work
20:43 CandyAngel What if you make it so setting the TLD list thing to a sub just calls it to see if it is okay?
20:43 CandyAngel Then people can implement negation/wildcards if they want
20:43 jberger $pattern =~ s/\*/[^.]*/; $pattern = qr/$pattern/;
20:44 jberger but with the ! its no fun
20:45 sri you need to match against *every* single one of those patterns
20:46 sri and compile custom patterns ith variable numbers of wildcards :S
20:47 CandyAngel Aren't bloom filters designed for that sort of thing?
20:48 akhasanov joined #mojo
21:04 sri *crickets*
21:05 brrt joined #mojo
21:06 jberger you said that curl doesn't even use this right?
21:06 jberger then again, curl doesn't probably get too many cookie collisions
21:07 PryMar56 joined #mojo
21:08 lluad It's more about privacy, preventing TLD level cookies for identity tracking by hostile websites. Unless there's a real user sat in front of your client there's no reason to care.
21:08 lluad Nice feature to have as a hook, no need to ship an implementation.
21:10 disputin joined #mojo
21:11 sri hmm, a hook
21:12 sri $ua->cookie_jar->ignore(sub { $_[0] eq 'com' });
21:15 lluad Yeah - pass in the hostname, get back a boolean. That way someone who cares can plug in Mozilla::PublicSuffix or Domain::PublicSuffix easily. Or someone who wants to block doubleclick or facebook or google cookies can too.
21:17 sri awesome, both of those are already way outdated
21:18 lluad You need to download the list yourself (daily?) if you're using it seriously.
21:19 lluad . o O ( why is there yet another one living under IO::Socket::SSL ? )
21:22 sri oh
21:22 sri IO::Socket::SSL actually ships with the whole list
21:28 sri $jar->ignore(sub { IO::Socket::SSL::PublicSuffix->default->public_suffix($_[0]->domain) eq $_[0]->domain });
21:30 lluad Looks good enough
21:32 sri was about to say we could use that as the default if IO::Socket::SSL is installed... but a security feature that may or may not work is just bad
21:33 lluad Yeah. Better that the user chooses to use the stale distributed default themselves, if that's what they really want.
21:33 lluad Usefull snippet to add to the docs, though.
21:43 good_news_everyon joined #mojo
21:43 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vZCd7
21:43 good_news_everyon mojo/master fd5137b Sebastian Riedel: use a callback instead of a list
21:43 good_news_everyon left #mojo
21:44 good_news_everyon joined #mojo
21:44 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vZCFZ
21:44 good_news_everyon mojo/master 730b00b Sebastian Riedel: fix typo in public suffix example
21:44 good_news_everyon left #mojo
21:46 neilhwatson joined #mojo
21:49 sri maybe the example shouldn't actually be in the docs
21:50 sri it doesn't handle all the cases, and is not good for copypasta
21:50 sri like missing domain, domain with leading dot, and prolly other stuff i forgot
22:09 bpmedley I wonder if the dynamic menu for 3D Touch can be populated with data from a websocket or json api.
22:14 marty_ joined #mojo
22:20 thowe joined #mojo
22:26 berov joined #mojo
23:20 mattastrophe joined #mojo
23:21 mattastrophe_ joined #mojo

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