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

IRC log for #mojo, 2015-10-13

| 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:51 jontaylor joined #mojo
00:53 disputin joined #mojo
01:07 asarch joined #mojo
01:14 aborazmeh joined #mojo
01:19 aborazmeh joined #mojo
01:46 thowe joined #mojo
01:56 panshin joined #mojo
02:20 noganex joined #mojo
02:29 disputin joined #mojo
02:30 inokenty-w joined #mojo
03:02 PryMar56 joined #mojo
03:48 davido_ joined #mojo
04:28 panshin joined #mojo
04:40 marty_ joined #mojo
04:40 dustinm joined #mojo
04:43 Repaster joined #mojo
04:53 jberger joined #mojo
05:15 davido_ joined #mojo
05:33 panshin joined #mojo
05:38 Shaeto joined #mojo
06:00 dod joined #mojo
06:02 Shaeto joined #mojo
06:07 dod joined #mojo
06:14 marty joined #mojo
06:14 panshin joined #mojo
06:15 Lee joined #mojo
06:27 panshin joined #mojo
06:32 Vandal joined #mojo
06:47 AndrewIsh joined #mojo
07:00 panshin joined #mojo
07:02 panshin joined #mojo
07:11 jontaylor joined #mojo
07:22 trone joined #mojo
07:38 eseyman joined #mojo
07:50 sugar joined #mojo
08:06 panshin joined #mojo
08:09 vanHoesel joined #mojo
08:36 jberger joined #mojo
09:08 Shaeto joined #mojo
09:10 panshin joined #mojo
09:13 jontaylor I’m getting a strange problem with mojo::pg
09:13 jontaylor after a while my DB is running out of connections
09:13 jontaylor and I can only then connect as a superuser
09:14 jontaylor it sounds like something is preventing old connections from being closed or timed out
09:14 bd jontaylor: have you checked sockets in TIME_WAIT on the db?
09:15 jontaylor i’ll check that now
09:19 jontaylor balls I can’t remember the superuser password on this server, ugh
09:29 punter joined #mojo
09:32 gaunt joined #mojo
09:43 meshl joined #mojo
09:49 CandyAngel I may or may not be copying Mojo's style of documentation for my own module >.>
09:50 nic not the first :)
09:51 CandyAngel Might tweak it a little like having the results after the example code.. dunno
09:52 CandyAngel Have plenty of time to decide :)
09:54 nic yeah, it's a convention, but I still haven't come round to liking it
09:58 CandyAngel I'm still not sure what to call my modules though
09:58 CandyAngel The base one is easy enough.. but the 2 other ones.. I'm thinking ::OO (for a simple OO wrapper) and ::Simple for a super-simple interface that does a lot of stuff for you behind the scenes
09:58 bd CandyAngel::Awesome::1
09:59 CandyAngel bd: Are you saying I'm the #1 awesome person? :P
09:59 bd CandyAngel: i'll let you be the judge of that ;)
09:59 CandyAngel Oh, that's a no then :P
10:03 asarch joined #mojo
10:04 nic For my module names I take a character from a Beatrix Potter book and b64_encode them
10:04 nic otherwise I'd be sacked, obviously
10:04 CandyAngel Sounds legit
10:10 stephan48 G38
10:21 CandyAngel I'm also tempted to use Function::Parameters as this is wrapping a C library
10:21 CandyAngel So missing arguments is bad..
10:44 mattastrophe joined #mojo
10:57 ashimema joined #mojo
11:04 neilhwatson joined #mojo
11:20 panshin joined #mojo
11:22 sugar joined #mojo
11:54 john joined #mojo
11:54 john lo all.
11:55 john I am having difficulty getting at the fragment part of a url
11:55 john http://localhost:3000/ecomm/maps/map#map/3417
11:55 john $self->req->url->fragment is returning undef
11:56 john it seems that anything after the # is not being seen
11:56 john it's a firefox browser, fwiw
11:57 john any clue gratefully received.
11:58 nic after the # is browser-only
11:59 john ah ok, thank you
11:59 nic client-side js can handle it
12:01 john aye, I was trying to avoid that, I have a single page app that is doing its own routing and I was looking for an easy way of getting at it in perl as js isn't my strong suit.
12:01 john oh well. Thank you for your time.
12:02 nic good luck
12:06 john left #mojo
12:07 elik_ joined #mojo
12:08 gatitskiy joined #mojo
12:09 human39 joined #mojo
12:43 johan joined #mojo
12:46 johan if I want to precompute some things in a web app worker before it starts serving requests, is that doable? if so, is it a mojo / plack / hypnotoad / morbo thing?
12:47 johan each worker needs to do the computing on their own, so different workers don't reuse the same result
12:49 Dada_is_crazy joined #mojo
12:49 cpan_mojo JSON-Validator-0.58 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/JSON-Validator-0.58
12:50 Shaeto left #mojo
12:50 fvox`away joined #mojo
12:51 mattastrophe joined #mojo
12:51 d4rkie joined #mojo
12:53 sri CandyAngel: if you can come up with a better documentation convention, proposals would be welcome
12:53 sri nic: you too
12:56 sri and i remember Grinnz wanted to come up with something too
12:59 CandyAngel sri: I know, we've discussed that particular thing before :)
12:59 CandyAngel As far as I can recall, it was a case of "meh, it doesn't offer a lot"
13:01 d4rkie joined #mojo
13:17 hernan605 joined #mojo
13:21 gryphon joined #mojo
13:21 dolmen joined #mojo
13:22 dolmen https://github.com/kraih/mojo/pull/851
13:23 d4rkie joined #mojo
13:23 marty joined #mojo
13:26 bpmedley http://bmedley.org/live_book.mov <-- Anyone able to view this?   Code is here: https://github.com/brianmed/livetutorial
13:30 elik joined #mojo
13:35 vanHoesel joined #mojo
13:36 doby looks like you just tried to embed it in a <pre>, i just get a screen full of symbols
13:38 batman bpmedley: resulted in a download for me. chrome/osx.
13:38 batman looks good. needs some tweaking, but it looks good :)
13:38 bpmedley doby: I don't understand.  Are you unable to get the .mov file?
13:40 bpmedley batman: Thanks.  What may not be obvious is the real content is in github.  I'm wondering if a real-time tutorial is a good approach in lieu of a PDF or somesuch.
13:40 doby opened it in url in firefox/linux, let me get you a screenshot
13:41 batman i think it's an interesting approach worth pursuing. people learn in different ways.
13:45 sri bpmedley: i wouldn't call it a book though, maybe interactive tutorial
13:45 bpmedley That would be a better name.
13:47 good_news_everyon joined #mojo
13:47 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vCz3T
13:47 good_news_everyon mojo/master 9d05a4c Sebastian Riedel: fix bug in Mojo::JSON::Pointer that prevented JSON Pointers with trailing slash from working correctly (closes #851)
13:47 good_news_everyon left #mojo
13:55 doby uggh sorry about that, new system and i didnt have dropbox installed yet
13:56 doby bpmedley, heres a link https://www.dropbox.com/s/qv6ql47qm756djq/Screenshot%20from%202015-10-13%2009%3A40%3A03.png?dl=0
13:56 doby maybe a link with a mime type?
13:56 bpmedley Could be.  You might try using curl.  Do you have VLC (or similar) installed to view?
13:57 doby yes, let me try just pulling it down
13:58 doby it works fine if i just pull it down
14:00 bd bpmedley: Content-Type: text/plain;charset=UTF-8
14:00 bpmedley bd: Woops.. hrrm
14:00 bd that explains funny characters in firefox ;)
14:01 bpmedley I'll have to look into the content-type later.  The .mov file is sitting in my /public folder.
14:02 sri dolmen: there is no need for hostility
14:03 dolmen sri: this not hostility, just frustration
14:05 dolmen sri: and my comments on the signature branch (is it there that you see hostility?) are unrelated to that frustration as I made them before seeing your merge of my PR
14:05 sri you're alleging malicious intent here https://github.com/kraih/mojo/pull/851#issuecomment-147723038
14:06 jberger before this spirals, yes some projects make dilligent attempts to preserve commit authorship, but that hasn't ever been a value here
14:07 jberger it shouldn't be taken as a slight
14:07 PryMar56 joined #mojo
14:09 dolmen no "malicious allegation" intended. I just value the git authorship as this is the only durable reward for contributing to a project
14:12 good_news_everyon joined #mojo
14:12 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vCzlj
14:12 good_news_everyon mojo/master 9e6fe1c Sebastian Riedel: test double slash too
14:12 good_news_everyon left #mojo
14:14 sri Grinnz: i can't believe i've never used "use if" yet
14:15 CandyAngel Mwahahaha
14:15 * CandyAngel may have just got something to work!
14:15 sri Grinnz: and i agree about the use in the docs
14:16 bpmedley CandyAngel: Your crawler is working?
14:16 Grinnz sri, it is handy for use
14:16 Grinnz but conditional "use" is a rare practice..
14:16 dolmen sri, but that would require 2 "use if":
14:16 CandyAngel bpmedley: No, this is something else. Using Inline::C and such
14:17 bpmedley Cool
14:17 CandyAngel I just removed a whole bunch of futzing around in C :D
14:17 Grinnz dolmen, experimental.pm combines those two statements
14:18 CandyAngel So I just need to get a TYPEDEF file sorted and I can remove nearly all the near-pointless wrapper functions
14:18 sri yea, i can't really think of any use cases besides documenting this behavior :)
14:18 dolmen Grinnz, oh, yes
14:18 sri but for this, it's pretty spot on
14:18 CandyAngel Also means I can implement a function that I didn't know how to do before *nodnod* Good times
14:20 jberger CandyAngel++
14:21 Dada_is_crazy joined #mojo
14:23 sri dolmen: re the commit, i'm not sure what you expect me to do... leave a comment and don't fix the bug until the original author comes back to fix it? or make my changes and commit it under the name of the original author (who may or may not agree with them)?
14:23 CandyAngel http://codepad.org/KnO0VPq0
14:23 CandyAngel That code reduction though
14:24 dolmen sri: I only expected that you would have "git cherry-pick" my commit (to preserve authorship) and then added your changes on a further commit
14:25 sri dolmen: what if your commit was actually broken in some way?
14:25 dolmen sri: is it the case?
14:25 sri (this is about general procedure, not your specific case)
14:26 sri it happens a lot actually
14:27 sri pull request makes sense, but is a little broken, original author is unresponsive
14:28 johan to answer my own question above, this seems to be the right (only?) way to run some code post-fork, pre-serve-requests: http://mojolicio.us/perldoc/Mojo/Server/Prefork#spawn
14:28 sri johan: http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Built-in-web-server
14:29 dolmen I understand your point of view where most contributions do not match your quality standards. But my frustration just come from the great care I took.
14:29 johan sri: thanks!
14:30 johan I wish you had been here two hours ago :)
14:30 arthas joined #mojo
14:34 batman dolmen: we appreciate the work you put into it. makes it a lot easier to get the fix in, compared to just an issue.
14:35 dolmen batman, thanks for this kindness
14:35 batman thank you :)
14:38 dolmen batman, my point is that git authorship stays longer (and can be processed by machines, see openhub.net) than IRC kindness... This is why I think this is the best reward for PR contributions of good quality.
14:39 jberger openhub.net is an interesting reason to attempt to preserve some commit authorship, and one that I hadn't thought of before
14:41 dolmen jberger, https://www.openhub.net/people?query=Olivier%20Mengu%C3%A9
14:42 dolmen jberger, I have 12 personnal projects but contributed to 92 others (at least what OpenHub discovered from commits)
14:45 Lee openhub.net-- # broken Oauth
14:48 sri dolmen: if you're interested, about your pull request, i couldn't apply it because the comments were inconsistent and you didn't perltidy
14:50 sri i might have merged it and committed a cleanup afterwards had there only been one test case i guess
14:51 sri but the unrelated test cases made me go through all of them and then it was easier to just commit everything
14:51 marty joined #mojo
14:52 lluad joined #mojo
14:53 espent joined #mojo
14:55 gatitskiy joined #mojo
14:56 sri anyway, it looks like there is no perfect process, and i'm afraid my first priority will always be a quick fix
15:00 espent joined #mojo
15:11 gatitskiy joined #mojo
15:22 mattastrophe joined #mojo
15:39 dvinciguerra joined #mojo
15:52 Dandre joined #mojo
15:52 Dandre left #mojo
15:52 Dandre joined #mojo
15:53 Dandre left #mojo
16:03 Dada_is_crazy Hi. Is there a way to delete only one value from the session?
16:09 Grinnz_ delete $c->session->{foo}; # from https://metacpan.org/pod/Mojolicious::Controller#session
16:16 Dada_is_crazy oh ok I thought that didn't work. thx :)
16:30 sri why would something specifically mentioned in the docs not work?
16:31 * pink_mist doubts Dada_is_crazy read the docs..
16:31 meshl joined #mojo
16:31 pink_mist (but that's not something we can really fix)
16:42 Kogurr joined #mojo
16:50 mattastrophe joined #mojo
16:57 disputin joined #mojo
17:24 mattastrophe joined #mojo
17:50 mattastrophe joined #mojo
17:52 sh4 joined #mojo
18:14 jberger joined #mojo
18:33 panshin joined #mojo
18:36 panshin joined #mojo
18:36 calc joined #mojo
18:37 calc left #mojo
18:37 panshin joined #mojo
18:39 al237 joined #mojo
18:39 mattastrophe joined #mojo
18:43 mattastrophe joined #mojo
18:47 mattastrophe joined #mojo
18:49 MartinR joined #mojo
18:50 al237 is it ok to define a catch-all route like this: $r->route('/foo/*') ?
18:50 al237 it looks nicer than: $r->route('/foo/*dummy'), but it creates an empty string key {"" => "something"} in the stash
18:50 preaction you could use under instead?
18:51 gatitskiy joined #mojo
18:52 al237 how do you mean?
18:53 Grinnz under still requires specific endpoints under it, maybe he wants just one route for any path in that match
18:54 al237 yes, /foo/ sits in front of an spa which has it's own routing
18:54 Grinnz i dont see any problem with using the empty string stash value, just make sure you don't use any listed in https://metacpan.org/pod/Mojolicious::Controller#stash
18:55 Grinnz i sometimes use *p or similar for path (but not *path itself, thats reserved)
18:56 * Grinnz wishes routes werent allowed to set reserved stash values, that would "fix" all the dynamic controller/action problems too :P
18:57 Grinnz route placeholders*
18:57 al237 I'm worried about future breakage, since the docs state that a value must exist. I will use *p, that is succint and self explanatory. Thanks.
19:00 mattastrophe1 joined #mojo
19:08 dvinciguerra joined #mojo
19:18 jberger al237: why not just use it?
19:18 jberger or *catch_all or *dummy or something
19:19 Grinnz he did mention *dummy :P
19:19 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Catch-all-route
19:20 sri just use *whatever
19:21 al237 i think $r->route('/foo/*') looks nice :)
19:21 jberger ah, must have slipped into my subconcious
19:22 trone joined #mojo
19:22 jberger al237: it does, but it has the obvious side effect of the '' stash key
19:22 jberger what else could it do
19:22 jberger ?
19:22 al237 it's probably harmless, and i have thorough tests
19:27 mattastrophe joined #mojo
19:28 Martin90 joined #mojo
19:29 Martin90 joined #mojo
19:41 good_news_everyon joined #mojo
19:41 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vC241
19:41 good_news_everyon mojo/master be9c197 Sebastian Riedel: fix support for domains with trailing dot in Mojo::URL
19:41 good_news_everyon left #mojo
19:42 mattastrophe joined #mojo
19:44 jberger tailing dot is a valid url?
19:44 jberger trailing
19:44 sri absolutely
19:44 jberger hunh
19:44 sri in fact, mojolicio.us. is the fully qualified version of mojolicio.us
19:45 jberger ok, so every time I think I grok urls and domains, I get thrown for another loop
19:45 sri :)
19:45 jberger is the tld then ''?
19:46 sri well, nobody noticed that bug in many years... so
19:46 sri i don't know the full explanation
19:46 jberger oh, well I guess I can understand it in a url, maybe what I mean is "domain name"
19:46 jberger which is a restricted subset of a url
19:47 jberger (and subpart)
19:47 ZoffixW joined #mojo
19:47 sri when you set up a zone file for your favorite dns server you always see the trailing dot
19:48 sri ah, it's called the root label
19:49 sri my google fu revealed http://www.dns-sd.org/trailingdotsindomainnames.html
19:51 Martin90 interesting, sri when you mentioned upload thru websocket few days ago, did you mean upload with useragent and websocket ? The case of 'multi-server' upload..
19:51 jberger yikes
19:51 jberger Martin90: yes
19:52 Martin90 jberger, thanks
19:52 jberger still passes the data through the middle server, but doesn't need to build a buffer there
19:52 jberger *large buffer that is
19:52 espent_ joined #mojo
19:53 Martin90 I see the server gets data from user and pass it further using 'User::Agent'
19:54 jberger that's how I'd envision it
19:54 jberger not that I would do it that way remember
19:54 jberger I had other options for you
19:54 jberger specifically a pre-flight request to ask which server to upload to
19:55 Martin90 yes that one is interesting, and I was also thinking about it
19:56 Grinnz_ jberger: as i understand it, the trailing dot is just assumed if it's not present. TLD just means the last section before the trailing dot
19:56 Martin90 but then also what should happend after submit upload...redirect ?
19:56 jberger no
19:56 jberger its two requests
19:56 Martin90 one is get
19:56 Martin90 the second one is POST
19:56 jberger yes
19:57 Martin90 post to the 'destination' server
19:57 jberger Client -> Server A "where should I upload -> Client "Server B"
19:57 jberger Client -> Server B [File]
19:58 jberger *upload" # ocd attacks
19:58 Martin90 heh yes, but I have some difficulty to figure out how the link to server b should looks like ?
19:59 jberger what do you mean?
19:59 Martin90 assuming the user 'client' should remain on the first get page - no redirects
19:59 jberger in the first request just reply to the client with with an absolute url that the client should upload to
20:00 jberger javascript
20:00 jberger change the form target
20:00 Martin90 hmm
20:01 Martin90 I have to test it, but sounds reasonable ;)
20:01 Martin90 thank you jberger
20:03 Martin90 It also looks like I can't do much with that prerequest
20:03 Martin90 i.e no way to check upload size
20:04 Martin90 in this solution
20:04 jberger I'm pretty sure you can investigate the file via some html5 api
20:06 Martin90 correct
20:07 jberger so include that in the preflight request
20:08 Martin90 yes, there is one more problem in this soultion
20:09 Martin90 control upload status
20:09 jberger meantime upload progress?
20:09 Martin90 yes like progress bar
20:09 Martin90 I have a solution in mind
20:10 jberger there are js libraries for that, I'm rather certain that people recommended one to you last time
20:10 mattastrophe joined #mojo
20:10 jberger raw form uploads don't do that very well
20:10 bpmedley I there there was even a fully functional demo.
20:10 bpmedley *think
20:11 Martin90 bpmedley, hello ;) have you updated the example code you posted few days ago ?
20:11 Martin90 https://bitbucket.org/snippets/bpmedley/rL9L9
20:12 bpmedley No, I think the only requirement was to add the pre-flight request to determine which server to use.
20:12 Martin90 ok, no need for that ;)
20:14 bpmedley https://www.internic.net/domain/named.root <-- Might be helpful
20:24 sri oh, i didn't notice that os x now uses libressl
20:34 Trelane I thought it used Apple SSL - it's own libabry
20:35 Trelane Wow, I'm typing like an idiot.  Must be time to go home.
20:36 sri apparently it uses apple ssl, libressl and an old version of openssl
20:36 sri more ssl libraries = more security
20:37 panshin joined #mojo
20:38 neilhwatson joined #mojo
20:39 mattastrophe joined #mojo
20:40 CandyAngel Err
20:41 mishanti1 SSL ALL THE THINGS!
20:41 mishanti1 *cough* I'm done.
20:43 bobkare_ joined #mojo
20:52 Martin90 joined #mojo
20:56 CandyAngel If anyone is bored, feedback on this would be welcome! http://filebin.ca/2IwS97HUtrav/OpenHMD.html
21:08 bpmedley CandyAngel: The downloaded rather than opening in my browser
21:08 bpmedley The *file
21:09 CandyAngel I know, i don't know where I can upload it and just have it displayed
21:10 bpmedley Casual visual inspection looks real good.
21:11 sri just use something like https://jsfiddle.net/
21:14 CandyAngel jsfiddle doesn't display it correctly >.<
21:14 CandyAngel Oh, i have to mess about with it
21:15 CandyAngel bpmedley: Thankies :)
21:26 batman CandyAngel: make a gist and name it .pod
21:26 CandyAngel And just upload the pod file?
21:27 batman github will render a .pod file as readable pod
21:27 batman like this https://github.com/jhthorsen/swagger2/blob/master/lib/Swagger2/Guides/Tutorial.pod
21:29 CandyAngel Ah okies, I got it. Thankies! https://gist.github.com/anonymous/4758dcf51b250c1b734a
21:40 Dada joined #mojo
21:51 Dada_is_crazy joined #mojo
22:11 ajr_ joined #mojo
22:13 ashimema joined #mojo
22:27 jberger CandyAngel: see also http://search.cpan.org/pod2html
22:28 jberger I wish metacpan provided something similar but the last time I looked it still didn't
22:29 jberger (https://github.com/CPAN-API/metacpan-web/issues/760)
22:29 CandyAngel I can't link that to people though
22:29 jberger oh true
22:29 jberger I still use it before uploading sometimes
22:29 CandyAngel Yeah
22:29 CandyAngel I'm using pod2cpanhtml :P
22:33 good_news_everyon joined #mojo
22:33 good_news_everyon [mojo] kraih deleted signatures at ad20805: http://git.io/vCaG0
22:33 good_news_everyon left #mojo
22:34 good_news_everyon joined #mojo
22:34 good_news_everyon [mojo] kraih created signatures (+1 new commit): http://git.io/vCaG9
22:34 good_news_everyon mojo/signatures c6d8a19 Sebastian Riedel: add basic support for signatures
22:34 good_news_everyon left #mojo
22:35 sri it looks good in the docs
22:53 good_news_everyon joined #mojo
22:53 good_news_everyon [mojo] kraih tagged v6.24 at 9424258: http://git.io/vCaCr
22:53 good_news_everyon left #mojo
22:55 good_news_everyon joined #mojo
22:55 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vCaC1
22:55 good_news_everyon mojo/master c662f0e Sebastian Riedel: bump version
22:55 good_news_everyon left #mojo
22:57 Zoffix Mojolicious-6.24
22:57 Zoffix \o/
23:07 scoopio joined #mojo
23:10 Grinnz_ I want to make some simple modules that use Mojo::UserAgent to query various APIs (basically CPANization of what I'm doing in my bot plugins), and I want it to be in a mojoish namespace, but Mojo::API and Mojo::Client both seem too much like something that Mojo core might want to use someday...
23:13 Grinnz_ (attach ::Google or ::Twitter for a good indication of what i'm looking for...)
23:15 scoopio joined #mojo
23:21 Adura joined #mojo
23:27 meshl joined #mojo
23:34 henq joined #mojo
23:40 scoopio joined #mojo

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