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

IRC log for #mojo, 2015-03-17

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

All times shown according to UTC.

Time Nick Message
00:20 marty joined #mojo
00:40 denny joined #mojo
00:47 Zoffix Do you guys got official "Powered by Mojolicious" logo?
00:51 sri this is the closest we have http://mojolicio.us/mojo/logo-black.png
00:51 * sri is not a big fan of powered by logos
00:51 Zoffix Why not?
00:51 Zoffix Advertise the framework
00:52 sri show me a good looking one?
00:52 sri they always seem tacky
00:54 sri i did actually try making a classy one, but this was as far as i got http://i.imgur.com/mutgx21.png
00:55 berov sri: the last one is good :)
00:55 Adurah Made with heart and gas!
00:55 sri haha, there are more in the backlog
00:55 sri http://i.imgur.com/VacZfwU.png
00:55 berov exactly for the bottom of the page
00:55 sri http://i.imgur.com/CEFbAIo.png
00:56 Zoffix http://i.imgur.com/OuWyIjD.png :)
00:56 sri and then i went a bit too far http://i.imgur.com/EiCdosZ.png
00:56 Zoffix I like yours, but the "made with" text is a tad too big
00:56 berov +1 for the heart
00:57 sri Zoffix: the official typeface is myriad pro
00:57 Zoffix Really? I always thought it looked like shit. Default in InDesign
00:58 Zoffix Looks good in the logo though
00:58 sri oh
00:58 sri i actually committed it for a few minutes :) https://github.com/kraih/mojo/commit/7174bc3ff06a0c3d0b333048dbfc19dc2d3ca338
00:58 Zoffix :D
01:00 berov why not keep bot - with text+heart and without?
01:00 sri purl: mojolicious powered by logo is at https://raw.githubusercontent.com/kraih/mojo/83744b29b5f61224ee9c4bac2376cc5eea88a6d8/lib/Mojolicious/public/mojo/logo-black.png
01:00 purl OK, sri.
01:01 Zoffix I like that one
01:01 * Zoffix uses it
01:04 janus joined #mojo
01:04 punter joined #mojo
01:06 sri i like the variant at the bottom of the atom page https://atom.io/
01:07 Adurah Nothing on the left side of the <> operator, though.
01:07 berov so heart++ ;)
01:08 berov both Unicorn and the heart remind me of unicode, but the heart brings a very important nuance
01:08 berov which is LOVE
01:09 berov saint Paul talks about it, saying we are nothing without it
01:09 Zoffix ~_~
01:10 berov and there is nothing else to keep us around for the last several years
01:10 berov not going to cry :D
01:11 asarch joined #mojo
01:13 alexbyk joined #mojo
01:24 sri if anyone can come up with an idea for a non-tacky one i'll totally draw it
01:32 Zoffix I like the version you stored in purl, except I feel the "Made with.." text is too close to the logo and it reads like "Made with <3 and *cloud*"... I made it slightly smaller, with the heart aligned on the "i".. looks decent to me: http://i.imgur.com/Ws6aEyN.png   http://i.imgur.com/Cq42T2I.png
01:37 punter joined #mojo
01:43 zivester joined #mojo
01:44 sri that doesn't look right to me
01:45 sri the "heart and cloud" was intentional
01:45 Zoffix I think I like this one the best: http://i.imgur.com/EiCdosZ.png
01:46 Zoffix (yeah, having a second look at my smaller version.. looks weird, ain't good)
01:56 crab hi
01:57 sri Zoffix: well, here's the red heart variant http://i.imgur.com/f3bL4Cl.png
01:57 sri o/
01:57 Zoffix Thanks. Gonna use that version on my site.
02:00 sri purl: mojolicious powered by logo is also at http://i.imgur.com/f3bL4Cl.png
02:00 purl okay, sri.
02:02 stokachu joined #mojo
02:11 crab i want a "powered by logo" logo.
02:11 crab hmm, logolicious.
02:16 klapperl joined #mojo
02:51 jberger I want a "powered by power" logo
02:51 jberger hmmmm, Wattlicious
02:53 sri powered by ⚡️
03:14 * jberger is starting to suspect that sri and batman were right about testing in Webservice::Shipment
03:14 crab P = IV
03:15 jberger KILOWAT!
03:15 sri can one of our windows user confirm that this makes the Minion tests pass? https://github.com/kraih/minion/commit/c880032efe4b451ef45dc847540d5f0540baded7
03:17 sri or rather... pass without horrible warnings
03:18 noganex joined #mojo
03:23 sri http://i.qkme.me/35hozo.jpg
03:23 cpan_mojo Minion 1.12 by Sebastian Riedel - http://metacpan.org/release/SRI/Minion-1.12 (depends on Mojolicious)
03:26 jberger cpan_mojo has great comedic timing
03:26 sri botsnack
03:26 purl :)
03:26 sri not you!
03:28 deserted sri, after your suggestion of using every_upload yesterday, had an interesting experience - couldn't get it to return a value! Not sure if there's a bug of I was implementing incorrectly but it lead me to find uploads, which worked perfectly for what I needed anyway :)
03:29 deserted s/of/if I/
03:29 sri please make a test case
03:29 deserted yup will be putting one together this arvo and submitting on github :)
03:30 sri i suspect it would go here https://github.com/kraih/mojo/blob/master/t/mojo/request.t
03:30 sri lots of examples
03:30 deserted yup :) did also note it had no existing tests
03:30 sri how odd
03:31 crab heh, "arvo"
03:33 deserted crab, I'm coding at home, I'm allowed to be casual :P
03:43 sri i can confirm the problem though
03:43 * sri is working on a fix
03:46 Eke- joined #mojo
03:47 sri or can i
03:53 good_news_everyon joined #mojo
03:53 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/hqG0
03:53 good_news_everyon mojo/master 3ab74fd Sebastian Riedel: every_upload needs tests too
03:53 good_news_everyon left #mojo
03:53 sri nope, seems to work flawless
03:59 inokenty-w joined #mojo
04:03 basic6 joined #mojo
04:05 good_news_everyon joined #mojo
04:05 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/hqnw
04:05 good_news_everyon mojo/master e858821 Sebastian Riedel: better message tests
04:05 good_news_everyon left #mojo
04:11 Adurah "Successfully installed Minion-1.12 (upgraded from 1.08)" suffice?
04:13 sri any warnings?
04:14 sri in the test results
04:14 Adurah Nothing cpanm spouts.
04:14 sri you have to look at the log
04:14 Adurah Alrighty.
04:14 purl it has been said that Alrighty. is there a way to do that without having to start a new process?
04:16 Adurah No warnings.
04:16 sri \o/
04:16 sri Adurah++
04:26 Adurah Maybe I was wrong about Cygwin perl being 5.18... It reported 5.14 and "rolling back" to 5.14 I cannot seem to get 5.18 to show up in setup.exe, hm...
04:38 irq joined #mojo
04:40 Adurah That "No warnings." install was from 5.20.2 64-bit.
04:46 jberger sri / batman: https://github.com/jberger/Webservice-Shipment/blob/master/lib/Webservice/Shipment/MockUserAgent.pm
05:57 melo joined #mojo
06:02 jb360 joined #mojo
06:34 Eke- joined #mojo
06:41 batman jberger: there's still too much I need to do myself in the unit tests.
06:42 batman All that XML require domain knowledge, which I would hope your module would hide.
06:43 batman What I'm saying is that if I build an app with your shipment module, I have to duplicate all your test data to write my own tests.
06:44 batman I like that I *can*, but in most cases it's just boring and not something I want to do.
06:46 batman I like that mock UserAgent. That on() trick is very cool :)
06:51 marmez joined #mojo
06:57 dod joined #mojo
07:02 dod joined #mojo
07:20 bramirez joined #mojo
07:29 Vandal joined #mojo
07:31 McA joined #mojo
08:01 AndrewIsh joined #mojo
08:02 eseyman joined #mojo
08:36 vytas joined #mojo
08:39 mattastrophe joined #mojo
08:42 trone joined #mojo
08:43 bramirez joined #mojo
08:48 marmez joined #mojo
08:55 kwa joined #mojo
09:15 Anon021 joined #mojo
09:25 csson joined #mojo
09:26 melo joined #mojo
09:36 Eke|| joined #mojo
09:52 irq joined #mojo
10:20 mattastrophe joined #mojo
10:23 cpan_mojo Mojolicious-Plugin-OAuth2-Server 0.10 by Lee Johnson - http://metacpan.org/release/LEEJO/Mojolicious-Plugin-OAuth2-Server-0.10
10:33 reneeb joined #mojo
10:51 Kripton joined #mojo
10:57 amon joined #mojo
11:10 cpan_mojo Mojolicious-Command-generate-lexicont 0.03 by DOKECHIN - http://metacpan.org/release/DOKECHIN/Mojolicious-Command-generate-lexicont-0.03
11:12 ZadYree joined #mojo
11:23 mattastrophe joined #mojo
11:47 fhelmber_ joined #mojo
12:07 mattastrophe joined #mojo
12:15 neilhwatson joined #mojo
12:18 jberger batman: I'm not sure I would call those domain specific knowledge
12:18 jberger they are xmls pulled from the carrier's api
12:18 batman imo it is. the xml documents are tied to the api.
12:19 jberger but I don't have to know what it is
12:20 batman you don't? so the unit test (and consumer of your module) can just get _any_ structure?
12:23 jberger hmmmm one again maybe I see your point
12:23 jberger once
12:24 jberger but how is the mock system supposed to generate the kind of data that the user needs to treat against
12:24 batman jberger: just make a minimum.
12:26 jberger seems so much easier to use debug mode and request info for an id you know
12:27 batman i have a suggestion that works for me: 1) make the module 2) try to use the module in a real program, that require a mocked interface for unit testing
12:27 batman if #2 fail, then #1 need to be easier to mock
12:27 jberger well that's the phase I'm at now
12:28 batman did #2 fail or are you contempt?
12:28 jberger but I do have xml that I can just pull from the api and the mock just is used to freeze it
12:28 batman so... how many lines of repeating code does that take you?
12:29 batman if it's only a few, i would just document that in MockUserAgent.pm
12:29 batman if it's five or more repetitive lines of code i would move it into MockUserAgent.pm or some other location.
12:29 jberger with the mock it should be less
12:30 batman it should be <2 :)
12:31 batman @work i do this for a server side SOAP api: $t->$_soap_req('document-on-disk'); $t->$_soap_req('<foo>this gets wrapped in a container</bar>');
12:32 batman that way i can reuse "document-on-disk" in any other library i'm writing... the result is that most of the other programs i'm writing turns into a system test for the soap-server... but i'm fine with that :)
12:33 jberger but that's only one document
12:34 batman what do you mean? "document-on-disk" can be "some-standard-success-document", "some-exotic-failure-document", "other-weird-document"
12:35 jberger I suppose
12:36 batman i do the same here: https://metacpan.org/source/JHTHORSEN/Mojolicious-Plugin-NetsPayment-0.04/lib/Mojolicious/Plugin/NetsPayment.pm#L710
12:36 batman i know you don't like it inside the main module, but you probably get the idea anyway...
12:38 * batman goes to a coffee house *bbl*
12:44 jberger I'll read, thanks
12:45 risugg joined #mojo
12:45 risugg I need to install mojolicious 5.82, but I can't find that version on CPAN. I tried doing "cpanm SRI/Mojolicious-5.82.tar.gz", but it wasn't found. How can I install the last 5.x version?
12:46 tomboh risugg: http://backpan.perl.org/ contains all versions of all CPAN modules
12:47 jberger risugg: cpamn Mojolicious@5.82
12:47 risugg ah - thanks very much
12:48 jberger take a look at Carton too though
12:48 risugg thanks - it's been on my list, but now that I really need it, i'll have to bump the priority up
12:58 batman jberger: btw: i'm really interested in your end result. my way of doing it doesn't feel quite right, but at least it makes it super easy to test.
12:58 batman and that's my main objective :)
13:04 bramirez joined #mojo
13:07 irq_ joined #mojo
13:09 juikuen joined #mojo
13:10 marty joined #mojo
13:19 gryphon joined #mojo
13:24 zivester joined #mojo
13:33 marmez joined #mojo
13:48 marmez left #mojo
13:59 mojobot10302 joined #mojo
14:07 mojobot10321 joined #mojo
14:09 mojobot10355 joined #mojo
14:10 mojobot10359 joined #mojo
14:11 mojobot10373 joined #mojo
14:28 acks joined #mojo
14:38 jberger batman: true
14:38 * batman is true.
14:39 jberger well, as I think about it, I'm releasing as I have it now, since I need to continue at $work
14:39 batman it's the nature of the bat ;)
14:39 jberger hahaha
14:39 alexbyk joined #mojo
14:39 cpan_mojo Webservice-Shipment 0.02 by Joel Berger - http://metacpan.org/release/JBERGER/Webservice-Shipment-0.02 (depends on Mojolicious)
14:39 jberger http://www.funnyjunk.com/The+hero+we+so+desperately+need/funny-pictures/5076661
14:40 batman {"batman":true}
14:40 jberger better: http://static.fjcdn.com/pictures/The+hero+we+so+desperately+need_29ea7c_5076217.jpg
14:40 batman haha!
14:41 batman jberger: maybe we need a funnyjunk.com parser for linkembedder... (i don't think _i_ will make that)
14:41 jberger its the first time I have seen that site
14:42 batman +1
14:42 purl 1
14:42 jberger did we ever include the opengraph/twitter meta tag handling?
14:42 jberger also, for those of you about to enter night time, enjoy! http://www.swpc.noaa.gov/communities/space-weather-enthusiasts
14:42 batman it's not the same thing. but the answer is yes :)
14:42 jberger G4 geomagnetic storm
14:44 batman jberger: https://metacpan.org/release/Mojolicious-Plugin-LinkEmbedder # look for ::twitter and ::html
14:45 sh4 joined #mojo
14:45 batman url = you-are-el = superman?
14:45 * batman is high on low bloodsugar
15:17 serderperder joined #mojo
15:18 jberger ok so opengraph, but twitter just looks like extracting twitter links not embed information for twitter
15:18 * jberger looks more closely
15:37 * tempire loves this idea: https://gist.github.com/klange/4042963
15:37 tempire Next time I'm asked for a resume in word, I'll give them a perl source file
15:39 disputin joined #mojo
15:42 sh4|2 joined #mojo
15:56 buu joined #mojo
16:08 odc joined #mojo
16:13 cfedde it works as a reeasonable filter.
16:13 jberger awsome
16:14 jberger we once had a linux admin job posted on the university LUG mailing list
16:14 acks left #mojo
16:15 jberger about a day later, there was a response from the original poster saying "anyone planning to submit a resume to this job in Word format clearly doesn't understand the job description and need not apply"
16:16 cfedde I did get a response from an opportunity where I sent them my YAML formatted resume.
16:17 cfedde They asked for it in word format.
16:22 jberger I would take a screenshot of your editor, displaying the YAML and include it in the word document :-P
16:22 jberger then again, I don't know how much you needed the job :D
16:22 cfedde there is that.
16:24 cfedde the available energy to look for job N+1 is inversely related to the satisfaction at job N.
16:29 trone joined #mojo
16:50 Oleg joined #mojo
16:52 trone joined #mojo
16:54 sh4 joined #mojo
16:57 dod joined #mojo
17:01 OmarOthman joined #mojo
17:06 sri looks like minion is super green on cpantesters too now \o/
17:08 serderperder privet. na heroku realno zalit mojo app? u menya rugaetsa. ne znayu kuda kopat uje. rugaetsya vot na chto: Push rejected, no Cedar-supported app detected. hotya sozdaval app na heroku vot tak: $ heroku create -s cedar --buildpack git@github.com:myuser/myrepo.git i vot tak proboval: heroku create -s cedar --buildpack https://github.com/myuser/myrepo.git i ukazival buildpack_url... resultat posle git push heroku master odinakoviy (
17:09 sri this is an english language channel
17:10 alexbyk serderperder: luchshe zadat etot vopros suda: mojolicious@googlegroups.com
17:11 sri seriously, stop it please
17:11 alexbyk serderperder: razrabotchiki mojolicious ne onlichautsya osoboy drujelubnost'ju)
17:11 alexbyk was kicked by sri: not here
17:18 marcusr pretty darn rude, you guys
17:19 marcusr I told serderperder about this before as well.
17:20 sri i actually just unblocked alexbyk on github :S
17:20 sri have a feeling sooner or later it will go wrong
17:21 marty sri is... Danger Seeker!
17:21 sri oh well, what can you do
17:21 alexbyk joined #mojo
17:22 disputin joined #mojo
17:24 marty Mojo::Pg migrations are sweet fun
17:29 serderperder joined #mojo
17:35 genio joined #mojo
17:36 * marcusr is building a jabber bot for work with mojo and AnyEvent::XMPP
17:37 crab AnyEvent::XMPP is a weird combination of good and bad
17:39 marcusr I'm thinking I might make something like lita and open source it, we'll see how far I get.
17:43 crab what is lita?
17:44 crab ah, lita.io
17:44 marcusr mm
17:48 serderperder joined #mojo
17:51 mattastrophe joined #mojo
17:51 serderperder ok. mojo app stay work on heroku now? i get error: Push rejected, no Cedar-supported app detected. anybody have step by step manual for get work app on heroku? i see what perl not listed in heroku list with supported framework. thx.
17:53 jberger serderperder: https://github.com/judofyr/perloku
17:54 serderperder jberger: thx bro.
17:55 mst serderperder: it's spelled 'thanks' btw
17:55 mst THX is part of the perl5 VM
17:55 mst there are aTHX, dTHX and pTHX macros :)
17:55 crab but no broTHX?
17:56 * jberger accepts surfer an l33t
17:56 diegok o/
17:56 mst IME 'bro' is a word that means either "I learned english from american teenagers" (common and perfectly forgiveable) or "I have a very small penis and an irrational hatred of women" (less helpful)
17:56 mst I always assume the former until proven otherwise though
17:57 diegok Is there something I'm missing here: https://gist.github.com/diegok/7f3bb043cd7298f3c7a5
17:57 diegok (I can't start a new app unless running hypnotoad from the app folder)
17:58 diegok ^ but it works when I just copy an old style app runner script.
17:58 crab hm. i wish Mojo::Pg::Transaction had some prescribed way to catch errors.
17:59 jberger diegok: lib isn't what you mean
17:59 jberger lib is relative to your current directory
18:00 jberger that's why the weirder one takes the pains to discover where the script itself is
18:00 diegok jberger: this is a new app created (I guess) using 'mojo generate app' by a coworker...
18:00 jberger for the record, I always use the relocatable script
18:01 diegok jberger: sure, what I was wondering is if this is an error on the generate app command (I should try crating a new one myself!)
18:01 jberger most people deploy from their current working directory
18:01 * diegok is going to test this himself...
18:01 jberger so I guess not
18:02 jberger but like I said, I use the paranoid version all the time
18:02 Eke- joined #mojo
18:02 crab what paranoid version?
18:03 diegok ^ jberger I was about to ask the same :)
18:03 jberger the second one in the paste
18:03 crab oh, that
18:03 jberger all you need is this: http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Making-your-application-installable
18:04 diegok jberger: that one is the one created by generate app command some years ago...
18:04 jberger diegok: yeah, I don't use exactly the one in your paste, the one I just linked
18:06 diegok jberger: ok, that FindBin trick is what I should use. But... shouldn't it be the default script generated by command?
18:06 jberger I believe I have advocated for that in the past
18:06 jberger you might have to search the backlog
18:07 jberger FindBin was broken for a while, I think that's where the longer version you posted came from
18:08 marcusr any of you linux nerds know how to make ` appear next to z on a thinkpad instead of next to 1? It's driving me crazy.
18:08 marcusr I really don't want to type §
18:08 marcusr (in Xorg)
18:13 buu joined #mojo
18:14 diegok jberger: thank you!
18:20 * tempire resists the desire to call mst bro
18:20 tempire or broseph
18:21 marcusr mattbro
18:22 tempire http://maxcdn.fooyoh.com/files/attach/images/3004/015/975/004/popped_collar.jpg
18:23 genio "bro" makes me think Miami and that makes me hate. hate hate hate
18:23 tempire I used to hate it.
18:23 tempire But then I realized it's just a word.
18:23 tempire bro
18:24 * genio gets ready to club tempire if he starts saying YOLO
18:24 marcusr I meatchat, everybody is a bro. beardbro, redhairedbro, glassesbro.
18:25 * tempire has unlimited lives, up to 5G
18:25 genio damn
18:25 marcusr I fixed my tilde/grave problem with xmodmap
18:26 marcusr Sanity has been restored
18:26 genio The tilde should be to the left of the 1.  QWERTY!
18:27 marcusr genio: crazy
18:28 marcusr I'm going to strain my pinky that way
18:28 marcusr (I use ` as my tmux key)
18:28 Grinnz "GRAVE ACCENT" - mumble text to speech
18:28 marcusr Grinnz: yes, tilde is shift-grave ~~~
18:29 genio change your tmux key?
18:29 purl genio: that doesn't look right
18:29 * genio pushes purl down the stairs
18:29 * purl dodges and laughs as genio loses balance and crashes down the stairs.
18:29 genio damn
18:29 marcusr genio: why? grave is in the right place on all my other keyboards.
18:29 marcusr and now it's right on this thinkpad too.
18:30 marcusr ttps://gist.github.com/9da4abe5f7a6b559fdcf
18:30 marcusr my current .Xmodmap
18:30 marcusr (in combination with xcape -e 'Control_L=Escape')
18:31 genio http://apple.stackexchange.com/questions/106058/difference-between-us-qwerty-and-international-qwerty-apple-keyboards  ahh.  I didn't realize they made qwerty keyboards that were laid out differently
18:31 Eke- joined #mojo
18:32 genio I usually map the caps lock to something since it's just a useless key
18:33 marcusr genio: I've got it mapped to escape and control
18:33 marcusr :)
18:34 marcusr My osx and linux setups are in almost perfect parity now.
18:38 sri jberger: almost certain you've advocated for what we do now with scripts
18:39 sri but i prolly wouldn't have changed it unless the whole core team agreed
18:41 sri think we were even fighting about it, and i made you rewrite the cookbook recipe or so
18:41 sri diegok: anyway, lets just blame it on jberger :)
18:42 marcusr I wanted to blame jesus.
18:42 marcusr :'(
18:43 diegok sri: o/
18:47 sri http://irclog.perlgeek.de/mojo/2014-11-24#i_9709136
18:52 marcusr sri, always with the hard evidence.
18:53 jberger marcusr: almost: look two lines higher up: http://irclog.perlgeek.de/mojo/2014-11-24#i_9709133
18:53 jberger we weren't talking about lib, that was the #!
18:57 jberger I guess lib came up, but that wasn't the focus of the conversation
19:00 sri crab: what do you mean? like http://mojolicio.us/perldoc/Mojo/Pg/Database#begin
19:00 jberger if everyone is building their apps via generate, then I don't see any reason not to use findbun
19:01 jberger haha, there's an app for you! FindMeAStickyBun!
19:01 jberger FindBin even
19:01 sri jberger: thanks, now i'm hungry again!
19:01 * sri needs to find buns
19:01 jberger #TheresProbablyAnAppForThatAlready
19:02 jberger I thought the major reason for `use lib 'lib';` is not wanting to explain the FindBin dance
19:02 sri well, if you want to change it again, you better have a very very very good explanation and doc patch ;p
19:03 jberger I don't especially
19:03 berov joined #mojo
19:03 jberger but diegok's complaint is reasonable
19:03 nicomen FindBum
19:03 jberger is it clear in the Guide that the app must be run from the project directory?
19:04 * sri will prolly not participate again this time
19:04 * jberger will prolly not either
19:04 sri but i'll vote if you come up with a proposal
19:04 * jberger uses the FindBin recipe
19:06 jberger the closest I will come to a proposal is to say that perhaps there should be a mention here: http://mojolicio.us/perldoc/Mojolicious/Guides/Growing#Simplified-application-script
19:06 crab sri: yeah, pretty much like that.
19:06 sri :)
19:06 marcusr sri: do I have to do any special tricks to subclass Mojolicious::Lite?
19:07 sri somehow i still avoid eval {}... if $@... examples because of the old perl bugs
19:08 sri but i guess at this point we really don't have to care anymore
19:08 sri marcusr: i don't know
19:09 jberger sri: I still have to put this warning because of $@ derping all over itself: https://metacpan.org/pod/Mojo::IOLoop::ForkCall#fork_call
19:10 nicomen sri: isn't eval { ... 1; } or do { ... } # safe and clear?
19:10 sri nicomen: ugly though
19:10 jberger nicomen: and not if you are trying to capture the return value
19:11 nicomen jberger: yeah it's slightly uglier if you are doing my $f = eval { }; but I like the similarity to a try { } catch { }
19:11 sri i'm also kinda glad mojolicious tests produce so many warnings when you run them on anything before 5.14 now :)
19:11 jberger sidenote, I expect that AnyEvent::Util::fork_call suffers from the limitation that I noted in my drop-in-replacement, but IIRC it doesn't mention it, and I suspect it doesn't test the callback throwing in the parent
19:12 sri the fact that there have been no complaints hints at very little use
19:13 jberger sri: that thought makes me 🍻
19:13 sri 🍻
19:13 jberger :o the font worked in Mac Chrome!!
19:13 sri OMG
19:13 sri must be new in version 41
19:13 serderperder maybe someone has an code implementation for next features function? Registration and Login to mojo app as app uniq user(s) via db entries (it would be nice if there is a model to support different types of DB engines), app user can add service API like facebook by dint of token (and thx for optionaly support to other common service API like it) App user can centralized use API function on our app. thx.
19:14 jberger http://cdn2.teen.com/wp-content/uploads/2014/06/toy-story-aliens.gif
19:14 jberger serderperder: look at marcusr's OAuth2 plugin I would guess
19:15 jberger I'm not sure what you mean by model though
19:17 mst serderperder: it's spelled 'thanks', not 'thx'
19:18 sawtooth joined #mojo
19:19 serderperder jberger: hmm. forget about model. just just looking for a work examples like this in one project.
19:19 purl serderperder, I didn't have anything matching about model. just just looking for a work examples like this in one project.
19:20 serderperder mst: what different?
19:20 purl i guess different is always better
19:23 mst serderperder: 'thanks' is english
19:26 marcusr actually, THX is a sound system.
19:26 marcusr put both of those comments (lib and #!perl) in the cookbook
19:26 marcusr oops
19:26 marcusr https://www.youtube.com/watch?v=FWkJ86JqlPA
19:27 serderperder mst: ))) got it. thank you.
19:38 Ptolemarch joined #mojo
19:44 tgt joined #mojo
20:01 irq joined #mojo
20:11 Kripton joined #mojo
20:18 asarch joined #mojo
20:24 melo joined #mojo
20:26 mattastrophe joined #mojo
20:32 disputin joined #mojo
20:37 jberger marcusr / batman: getting aurora tonight?
20:38 jberger space weather + atmospheric weather suggests you might be
20:38 jberger GO AWAY SUN! NOBODY WANTS YOU HERE!!
20:46 marcusr isn't it cloudy?
20:47 marcusr jberger: local wearther service is saying cloudy
20:47 jberger wow, then google's weather thingy sucls
20:47 jberger sucks
20:48 jberger google "current weather in oslo"
20:48 jberger wunderground agrees, clear
20:48 Grinnz <Spock> Grinnz: Current weather at Oslo, Norway: Clear; 31°F / -0.6°C; Feels like 31°F / -1°C
20:48 jberger I think your sky is broken, the internet says so
20:48 Grinnz hah
20:49 sri couldn't purl look up the weather too?
20:49 marcusr jberger: http://www.yr.no/place/Norway/Oslo/Oslo/Oslo/hour_by_hour.html
20:50 sri purl: weather in oslo?
20:50 purl Try a 4-letter station code (see http://weather.noaa.gov/weather/curcond.html for locations and codes)
20:50 sri purl: why do you make it so complicated?
20:50 purl sri: i haven't a clue
20:50 marcusr cloudy with a chance of meat balls
20:50 cfedde was that set in oslo?
20:51 marcusr why does my internet suck so much now? :'(
20:51 Grinnz i could have my bot connect to magnet too but it wasnt such a hit on freenode :P
20:51 marcusr oh, I'm not on 5ghz
20:51 marcusr all better
20:52 Grinnz 5G!
20:53 Onigiri joined #mojo
21:02 melo joined #mojo
21:05 melo1 joined #mojo
21:10 kaare joined #mojo
21:11 marcusr no warnings 'experimental' isn't killing the sub signatures warning for me :'(
21:12 * sri sets marcusr on fire
21:12 sri change the order
21:12 purl sri: that doesn't look right
21:12 sri purl: shut up!
21:12 purl ;-(
21:14 marcusr sri: changing the order didn't help. Also tried using no warnings 'experimental::signatures'; the damn thing still bleats like a goat on the slaughter
21:14 sri then use the one on http://mojolicio.us
21:16 sri it is almost certainly the order though
21:18 marcusr sri: yeah, I had to move use Mojolicious::Lite above the experimental line
21:19 marcusr I thought you meant the order or no warnings/use feature
21:20 marcusr sri: thanks
21:20 marcusr it's nice to actually code some perl again, it's been a little while
21:21 sri purl: see!
21:21 purl O_O
21:21 crab marcus: i'm interesting in your bot, btw. i've been thinking about reviving my old one too.
21:22 nicomen ~
21:22 nicomen purl?
21:22 purl nicomen?
21:23 marcusr crab: I was thinking of using routing like syntax to match messages, like lita does.
21:23 * mst flashbacks to writing Catalyst::Engine::IRC
21:24 marcusr crab: http://docs.lita.io/plugin-authoring/handlers/#chat-routes
21:24 Nemix joined #mojo
21:24 marcusr which is why I wanted to subclass Mojolicious::Lite
21:25 marcusr I'm going to need a http interface anyways for things like web hooks.
21:26 melo joined #mojo
21:27 jb360 joined #mojo
21:30 sri marcusr: reminds me of https://gist.github.com/kraih/4351674
21:31 crab i wondered about that
21:31 crab (whyt you wanted to subclass ::lite)
21:35 sri anyone can recommend https://metacpan.org/pod/Test::PostgreSQL ?
21:36 jberger the fact that it admits to begin a fork of a module with the same (case insentitively named) module, I'm already worried
21:36 sri good point
21:36 purl nice and sharp
21:38 batman marcusr: Have you looked at the OAuth2 branch?
21:38 nicomen mst: how did that work out?
21:39 nicomen someone says something and you end up hours looking your code tree to see what actually got the command?
21:40 mst nicomen: it converted 'bot: foo bar baz' to a request for /foo/bar/baz
21:40 mst it made for an amusing afternoon, and then I never used it again
21:44 jberger wasn't preaction working on something similar?
21:51 sri crab: anything else you'd like to see in Mojo::Pg?
21:54 crab sri: i've just started experimentally rewriting a largish bunch of code to use Mojo::Pg and Minion, i'll find out soon enough.
21:55 crab so far i've only been going through the documentation and source, there are many things i don't understand (e.g. connection management). it'll take me a while to wrap my head around it.
21:59 genio joined #mojo
22:01 sri ah, looking forward to your feedback
22:01 Ptolemarch joined #mojo
22:01 sri guess one of the first things you can comment on will be defaults :) https://github.com/kraih/mojo-pg/blob/master/lib/Mojo/Pg.pm#L19-L27
22:02 crab i'm quite looking forward to using Mojo::Pg and NEVER HAVING TO WRITE ("", {}, ...) EVER AGAIN
22:02 mst hah, yes, that does annoy me slightly in raw DBI
22:02 sri seriously
22:02 purl is that for real?
22:06 sri perhaps i should point out the two ugliest parts in the code... so you know to ignore those ;p
22:07 sri both are about pg_notifies https://github.com/kraih/mojo-pg/blob/master/lib/Mojo/Pg/Database.pm#L152 https://github.com/kraih/mojo-pg/blob/master/lib/Mojo/Pg/PubSub.pm#L42
22:07 crab i'm ok with AutoCommit => 1, might be ok with AutoInactiveDestroy => 1 after i understand connection management, PrintError => 0 is fine. RaiseError => 1 is not my preference, but it's probably better if you switch to $blah->hashes->... style code, not sure why pg_server_prepare => 0. is that meant to avoid bad plans due to missing values? the server itself is clever enough to work around that these days, but i don't know if DBD::Pg has kept up.
22:08 crab i'd definitely want to set pg_enable_utf8, and that may be worth considering as a default given that everything else in mojo is utf-8y by default.
22:09 sri Mojo::Pg actually has good utf-8 tests, it appears DBD::Pg defaults are pretty good now
22:10 crab that's good to hear, i haven't tested without pg_enable_utf8 and a recent DBD::Pg (because i just set it and left it that way).
22:10 sri about pg_server_prepare... everything i've seen so far suggests that postgresql is still terrible with prepared statements
22:11 crab in what way?
22:11 sri mst: of have you seen any evidence the situation has changed?
22:11 sri s/of/or/
22:12 crab the only problem i know of is that it can generate bad plans in some situations when there are no values available. the change that was applied to remedy that was to delay planning the unnamed portal until values were bound to it (which was quite some time ago). it's a... limited remedy, but it works fine.
22:12 sri interesting
22:13 crab certainly i/we use them heavily in our work, and they can result in a significant performance increase when you're running some statements again and again.
22:14 crab it may be sensible to only server-prepare specific statements that you want server-prepared, so i'm not making a blanket assertion.
22:15 sri i guess that might be worth looking into in more detail
22:16 alnewkirk joined #mojo
22:16 marty joined #mojo
22:18 sri Mojo::Pg actually used to have an sth cache
22:19 crab but?
22:19 purl but is there a belongs_to relation?
22:20 sri i was under the impression that prepared statements were a waste of time
22:20 sri because of bad plans
22:21 crab ah. no, i would definitely disagree with that. there should be a way to use them.
22:25 sri i'm totally open to bringing it back if there's good reasons
22:26 sri this is the comment where they got removed it seems https://github.com/kraih/mojo-pg/commit/0a2b57196a8dbd73fb0df1e8d20c931d848606c5
22:26 crab i assume #L152 is because ->pg_notifies can throw errors? do you remember in what circumstances it does that?
22:26 chansen sri: It depends on usage, if you intend to use the same statement for several statements, it's not a waste of time
22:26 sri they were per Mojo::Database object, and a string comparison was done to check if we already had one prepared
22:27 sri crab: afraid not, and it's totally undocumented what it does on error
22:27 sri the entire DBD::Pg notification api is very sketchy
22:28 crab unfortunately, i had investigated this in some detail, but forgotten what it actually did. but as a result of that investigation, i see that i call it with RaiseError turned off.
22:28 crab but yeah, definitely agree about the sketchiness.
22:29 crab ah, it fails if PQconsumeInput fails.
22:31 sri looks like this was where i looked into pg_server_prepare http://irclog.perlgeek.de/mojo/2014-12-28#i_9861221
22:32 sri and apparently i did some benchmarks
22:33 sri ok... let me rephrase... i'm totally open to bringing the cache back if a benchmark can back it up ;p
22:34 sri it's not hard actually, maybe 15 lines of code
22:34 Grinnz crab, i usually end up using RaiseError off just because i don't want to eval {} every database call, but in apps where database error-> exception page is fine, then it doesnt matter
22:35 crab were you running that with AutoCommit => 1?
22:35 Grinnz me?
22:35 purl i guess Grinnz is POLLERR response on a socket without POLLIN or POLLOUT
22:35 crab no
22:35 Grinnz purl, wat
22:35 purl Watt?  Watt?  I can't hear you, there's this buzzing noise where my brain should be. or https://www.destroyallsoftware.com/talks/wat
22:35 sri most likely
22:35 purl I doubt it
22:35 crab then i wouldn't expect it to make any difference
22:35 sri oh
22:36 crab grinnz: yeah, that's also why i avoid using RaiseError. but if i think about it a little, i can set things up so that the error is caught somewhere sensible. at least so i expect.
22:36 * sri likes his errors thrown
22:37 Grinnz right; it's really something that depends on what you do from the start of a project, or if you're willing to refactor the whole thing
22:37 crab i just want to be able to translate database errors into something meaningful. if there's a good way to do that, i'm happy.
22:37 Grinnz the ->delay helper also helps with catching those exceptions nicely
22:39 sri why does AutoCommit kill prepared statements?
22:39 sri (performance wise)
22:39 crab the overhead of 10k commits drowns out the parsing difference in noise, that's all
22:40 sri ah
22:40 chansen <http://www.postgresql.org/docs/devel/static/sql-prepare.html> ... <hese rules make use of a prepared statement semantically almost equivalent to re-submitting the same query text over and over, but with a performance benefit if no object definitions are changed, especially if the best plan remains the same across uses.> ..
22:41 chansen sri: would answer your simple benchmark
22:42 crab what module was it that had a time_these() thing?
22:42 crab Benchmark
22:42 purl It seems faster
22:48 crab client_prepare: 59 wallclock secs (10.34 usr +  5.92 sys = 16.26 CPU) @ 61500.62/s (n=1000000)
22:48 crab server_prepare: 37 wallclock secs ( 9.27 usr +  5.28 sys = 14.55 CPU) @ 68728.52/s (n=1000000)
22:57 chansen If you are to execute simple INSERT statements like INSERT INTO tbl VALUES (1, 2) there won't be a performance gain, neither will there be if you execute simple statements like SELECT foo, bar FROM tbl;
22:58 crab chansen: the above timings are for a simple insert statement
23:00 crab if you execute a query more than a handful of times, there _will_ be some performance gain. if it's a very simple query, the gain will be small
23:00 sri difference seems kind of meh
23:01 sri i imagine insert is even the one where you notice it most
23:01 crab no, long select statements usually
23:01 chansen crab: the difference is negligible IMHO, You need to prepare a more complex statement to see a real difference
23:02 crab because who is going to run a million inserts anyway, you'd just use COPY
23:02 sri right
23:02 sri was about to say
23:02 crab the longer the text of your query, the more the benefit
23:02 crab selects with lots of conditions work great
23:03 chansen crab: complexity, not length of statement
23:03 crab both
23:04 sri i imagine you'd need a different sth caching strategy than what i used before
23:04 crab you'll see a noticeable speedup even with a long query that reduces to a bitmap index scan with a bunch of rechecks
23:04 sri (the cache got destroyed with the Mojo::Pg::Database object when the dbh got put back into the Mojo::Pg cache)
23:05 sri guess you'd have to persist the sth cache with the dbh cache
23:07 sri actually not too hard, since we already have to keep the IO::Handle around
23:09 crab is it cachelicious?
23:12 * sri sets crab on fire
23:13 crab :-(
23:21 sri not pretty, but i think this should do the trick https://gist.github.com/anonymous/dced79d80a7f1fe5070d
23:22 sri oops, typo ;p
23:28 zivester joined #mojo
23:33 sri ok, got it, now even with tests https://gist.github.com/anonymous/2df2059cb23644670251
23:35 sri if there's real interest i can put it in a branch
23:45 marty joined #mojo
23:46 sri anyway
23:46 sri https://github.com/kraih/mojo-pg/compare/caching
23:47 sri not merging into master until the value has been proven
23:48 carsten joined #mojo

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