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

IRC log for #mojo, 2014-11-11

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

All times shown according to UTC.

Time Nick Message
00:37 Averna joined #mojo
00:53 sri they sure know how to produce buzz http://www.rubyraptor.org/how-we-made-raptor-up-to-4x-faster-than-unicorn-and-up-to-2x-faster-than-puma-torquebox/
00:56 * sri doubts very much that optimizations like vectored i/o make a real difference for rails apps
00:56 sri but it does look nice in a feature list
00:57 bowtie_ joined #mojo
00:59 laouji joined #mojo
01:05 bowtie joined #mojo
01:17 sri bpmedley: merging will take a little longer
01:26 doublelel joined #mojo
01:34 bpmedley sri: Just got back home.  Thanks for making the pull request Mojoificant.
01:34 hesperaux joined #mojo
02:20 sri hahaha... mojo builds are quite reliable according to this ;p http://danluu.com/broken-builds/
02:28 KCL_ joined #mojo
02:28 jb360 joined #mojo
02:29 tempire I really like that raptor logo
03:07 sri tempire: you don't mind if i send requests for mojolicious training your way, right?
03:07 tempire not at all
03:07 sri ok
03:07 * tempire encourages
03:27 doublelel joined #mojo
03:37 sri is there a better way to count deletes/updates than returning 1?
03:38 sri (and then use the row count)
03:40 bpmedley joined #mojo
03:41 sri looks like the postgresql backend will use less lines of code than the mongodb backend :o
03:41 bpmedley Craziness
03:41 purl i think Craziness is often a positive attribute. or crazy and creative both start with c
03:42 sri bpmedley: when counting updates/deletes, you can use "returning 1" to count, there is no need to perform a select+delete/update
03:43 bpmedley Cool.  I knew there would be a lot of SQL optimzation possibilities.
03:43 sri https://gist.github.com/anonymous/8b885ff840034a2db82b
03:44 sri almost done now... just list_jobs left... but that one is a mess :o
03:45 bpmedley Another possibility: https://metacpan.org/pod/DBI#do  <— Returns the number of rows affected or undef on error.
03:45 sri the whole time conversion dance is missing completely there
03:46 bpmedley Interesting.  I may have been confused when righting the code.  I know I was quite ignorant.. ;)
03:46 sri how reliable is the do() return value for updates/deletes?
03:47 sri handling placeholders would be a little annoying though
03:47 bpmedley I’m not 100% sure, actually.  Possibly best to know what would work all the time.
03:48 bpmedley s/know/use/
04:12 sri can't think of a good list_jobs implementation :/
04:20 sri doh!
04:21 sri i was so eager to finally commit that i forgot to close the pull request...
04:21 sri anyway, this is what i ended up with (for now) https://github.com/kraih/minion/commit/a6a322ff71b788c4009df56c288bc810cb450a2f
04:27 sri i'm sure there is still a lot to optimize, but at least the number of queries should be as low as it can be
04:28 sri well.. almost... the list_* stuff is still...well...
04:29 sri they work, and are not terribly ugly, but long term i'd like something cleaner
04:29 sri perhaps even beautiful
04:32 sri bpmedley++
04:34 doublelel joined #mojo
04:34 sri i guess for now what's most important is that everything works correctly and that we are happy with the schema https://github.com/kraih/minion/commit/a6a322ff71b788c4009df56c288bc810cb450a2f#diff-6c2d02af894f2ce916d89f7b04f4b54aR232
04:46 bpmedley Huzzah!  :0
04:46 bpmedley :), even
04:46 sri :0
04:49 doublelel joined #mojo
04:51 bpmedley ok $minion->job($id)->info->{delayed} > time, 'delayed timestamp';  <— Would this fail if DB time and and server time are different timezones?
04:53 sri epoch
04:53 bpmedley I get a failed test for that one.  Not 100% sure why.
05:04 laouji joined #mojo
05:18 doublelel joined #mojo
05:30 Eke- joined #mojo
05:41 sri bpmedley: could be conversion problems
05:45 sri aha!
05:46 sri i use timestamps with time zone, and suddenly it's all reliable
05:46 bpmedley Cool. Time is a pita.  :)
05:46 sri i'd really like some advice from someone with more postgresql experience
05:48 sri after reading some more about it, it looks like with time zone is what we want
05:48 sri since it's the only way to truly store absolute times in postgres
05:48 * sri is starting to get it
05:51 sri allright, and in master https://github.com/kraih/minion/commit/5d0dbfc105f96498071c87585513256860f76bb1
05:52 rem_lex| joined #mojo
05:54 sujithm joined #mojo
06:04 bpmedley What version of Postgres are you running?
06:05 sri 9.3
06:05 bpmedley Hrmm.  Same; I’m still geting that odd error.
06:06 sri i'm releasing 0.40 anyway
06:07 sri did you actually upgrade your schema?
06:07 bpmedley Yes, that works well.
06:07 sri you have to manually $minion->backend->pg->migrations->migrate(0)->migrate
06:08 sri it's only automatic with new migration steps
06:08 bpmedley I dropped the three tables and reran.
06:08 sri ah
06:08 sri i guess that works too ;p
06:10 bpmedley https://gist.github.com/brianmed/c4e0887ec67a3cb589b2 <— I hope to turn this into a blog post soon.
06:11 batman interesting plugin: https://metacpan.org/pod/Mojolicious::Plugin::AutoParams
06:11 tempire moar blog posts!
06:13 batman i also wonder who made this: https://metacpan.org/pod/Object::Simple ... it's not quite Mojo::Base. not sure if send an email or not...
06:15 sri http://thebookwurrm.files.wordpress.com/2013/08/blogging-meme.jpg
06:16 damaya Yeah, I know.
06:18 damaya Man, I can't believe D-Bus is part of the kernel layer, such garbage/
06:18 damaya The daemon is running on all the servers even though X isn't even installed. Why?
06:19 damaya Sorry, stupid laptop trackpad. I palm-clicked #mojo.
06:23 damaya https://plus.google.com/+LennartPoetteringTheOneAndOnly/posts/J2TZrTvu7vd
06:23 damaya Man Lennart is an idiot.
06:25 preaction he's not an idiot. he's a hypocrite
06:27 damaya He writes terrible non-POSIX-compliant software and then cries that people don't like him.
06:27 damaya I dunno, the Linux community was a far better place before he crapped on it.
06:28 damaya Anyway, the convo was not meant for this window. My stuff is whacked out.
06:28 tudorconstantin joined #mojo
06:28 damaya I wonder what Arch has changed now?
06:28 preaction no, i take that back, he's an idiot and a hypocrite. http://comments.gmane.org/gmane.comp.sysutils.systemd.devel/24290
06:28 damaya s/stuff/irc client/
06:31 damaya Hey, what is the link to the Mojo book that is/was in progress?
06:33 damaya brb, my system is acting strange
06:37 sujithm joined #mojo
06:38 sujithm joined #mojo
06:58 sugar joined #mojo
07:01 Eke- joined #mojo
07:10 alnewkirk joined #mojo
07:11 sugar_ joined #mojo
07:29 sugar__ joined #mojo
07:29 marcus joined #mojo
07:33 Vandal joined #mojo
07:40 dp_ joined #mojo
07:44 doublelel joined #mojo
07:48 amon joined #mojo
07:49 Lee joined #mojo
08:01 ashimema joined #mojo
08:23 sugar joined #mojo
08:36 dod joined #mojo
08:37 dod joined #mojo
08:37 vytas joined #mojo
08:40 Snelius joined #mojo
08:45 doublelel joined #mojo
08:50 trone joined #mojo
08:58 hernan604 joined #mojo
08:59 nemux joined #mojo
09:09 basiliscos joined #mojo
09:10 Lee_ joined #mojo
09:11 marcus joined #mojo
09:57 marcus joined #mojo
09:59 sugar_ joined #mojo
10:10 dvinciguerra joined #mojo
10:12 neyasov__ joined #mojo
10:15 neyasov___ joined #mojo
10:20 neyasov____ joined #mojo
10:29 marcus joined #mojo
10:41 denis_boyun joined #mojo
10:50 arthas joined #mojo
11:00 doublelel joined #mojo
11:52 jamesaxl joined #mojo
12:08 marcus joined #mojo
12:09 fhelmber_ joined #mojo
12:33 neilhwatson joined #mojo
13:12 sugar__ joined #mojo
13:24 denis_boyun_ joined #mojo
13:28 ignacio_ joined #mojo
13:36 marcus joined #mojo
13:38 sri bpmedley: found the problem yet?
13:38 bpmedley I had to goto bed and need to get ready for work.  I will look more after work.
13:43 * sri thinks Mojo::Collection could use a to_array method... since he uses [$collection->each] all the time
13:46 doublelel joined #mojo
13:46 mst sri: [ @$coll ] works doesn't it?
13:48 sri sure, but that's even worse i many cases
13:48 sri [@{$collection->reverse}]
13:48 sri vs
13:48 sri $collection->reverse->to_array
13:49 sri [$collection->reverse->@*]
13:54 sri [$collection->reverse->each]
14:00 sugar__ joined #mojo
14:06 good_news_everyon joined #mojo
14:06 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/pkJ5OA
14:06 good_news_everyon mojo/master a3a14db Sebastian Riedel: added to_array method to Mojo::Collection
14:06 good_news_everyon left #mojo
14:08 zivester joined #mojo
14:09 dvinciguerra joined #mojo
14:11 risugg joined #mojo
14:28 KCL joined #mojo
14:31 bpmedley sri: All tests successful
14:31 purl bpmedley: that's because you wrote only one test, slacker!
14:32 bpmedley I think I missed a migration step.  My bad.  My tables had no timezone in the timestamp.
14:33 sri :)
14:38 * genio pets purl
14:38 * purl pets genio back, harder
14:59 * sri wonders if minion can be linked to from the mojo docs as a spinoff project again
15:00 sri bringing back the 3M stack... this time with Mojolicious+Mojo::Pg+Minion
15:01 sri or is it the MPM stack now?
15:02 Ptolemarch joined #mojo
15:09 good_news_everyon joined #mojo
15:09 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/0PBG6g
15:09 good_news_everyon mojo/master aa3c6bb Sebastian Riedel: link to spin-off projects again
15:09 good_news_everyon left #mojo
15:16 genio 3M makes me think of the makers of all things glue-related.  So, I like that better.
15:17 sri http://2.bp.blogspot.com/-sir2xwDduJ8/TgKjNUr7wUI/AAAAAAAAAhk/1w6tGfh6zXE/s1600/RalphWiggum01.jpg
15:17 genio hahahaha
15:17 purl LOLCON 4 reached.
15:18 genio shut it, purl
15:18 * purl gives genio a frosty glare
15:32 basiliscos joined #mojo
15:33 marty joined #mojo
15:40 marty joined #mojo
15:40 marty_ joined #mojo
15:50 good_news_everyon joined #mojo
15:50 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/OaHSrg
15:50 good_news_everyon mojo/master 1abeb21 Sebastian Riedel: better log directory test (closes #705)
15:50 good_news_everyon left #mojo
16:09 Eke- joined #mojo
16:11 risugg joined #mojo
16:12 sh4 joined #mojo
16:13 Adurah joined #mojo
16:13 KCL_ joined #mojo
16:15 Lee joined #mojo
16:19 marty joined #mojo
16:27 sujithm joined #mojo
16:31 Ptolemarch joined #mojo
16:42 jzawodn joined #mojo
16:47 jzawodn joined #mojo
16:57 dotan batman: Object::Simple is by Yuki Kimoto, long time Mojolicious enthusiast. He wrote https://github.com/yuki-kimoto/gitprep , which is a git repo viewer that uses Mojolicious (although he really wants it to work with CGI and Perl 5.8, so god knows what version)
17:04 Eke- joined #mojo
17:08 jamesaxl joined #mojo
17:11 disputin1 joined #mojo
17:16 risugg joined #mojo
17:19 dod joined #mojo
17:29 * sri wonders if this should just be a function in Mojo::Util... like Mojo::Util::xss_escape or so https://github.com/kraih/mojo/blob/master/lib/Mojo/Template.pm#L268-L271
17:30 sri combining Mojo::ByteStream handling with Mojo::Util::xml_escape
17:30 sri which could then be used for taghelpers
17:36 * sri guesses that nobody really cares about cases like tag(foo => tag(bar => 'baz'))
17:46 basiliscos joined #mojo
17:49 risugg_ joined #mojo
17:57 sri i was thinking something like this https://gist.github.com/anonymous/6090186fe3c79c7cc7d4
18:11 ignacio_ joined #mojo
18:20 sri anyway, this would be the complete patch, if anyone feels like voting for it https://gist.github.com/anonymous/4b50c57e75785fb2d91f
18:20 sri one less line of code, little more dwim, maybe a tiny bit slower tag helpers (but i was unable to measure it)
18:21 denis_boyun joined #mojo
18:23 sri actually, i'll just dictate
18:23 good_news_everyon joined #mojo
18:23 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/VF1Xcg
18:23 good_news_everyon mojo/master f2891eb Sebastian Riedel: added xss_escape function to Mojo::Util
18:23 good_news_everyon left #mojo
18:31 nicomen sri: would it make sense to explain why one would want to use xss_escape (what does not escaping Mojo::ByteStream mean in practice), and if it's not apparent, why it is called xss_escape?
18:42 bowtie joined #mojo
18:44 marmez joined #mojo
18:50 bowtie joined #mojo
19:01 Eke- joined #mojo
19:31 neyasov____ joined #mojo
19:34 Ptolemarch joined #mojo
19:47 sri i sense a little hostility... maybe someone else would like to chime in? https://github.com/kraih/mojo/pull/706
19:49 * sri has a feeling that if he keeps pushing for a good use case things will derail
19:51 nicomen sri: I think you are being reasonable, and he is just initially disappointed. Hopefully he will get back with a more elaborate answer?
19:55 mst sri: chimed
19:56 sri mst++
19:57 sri nicomen: re xss_escape, i don't think normal users will ever touch it
19:59 nemux_ joined #mojo
20:04 bowtie_ joined #mojo
20:11 bowtie joined #mojo
20:28 Adura joined #mojo
20:30 basic6 joined #mojo
20:48 damaya joined #mojo
20:49 damaya I got my Perl5 Raptor shirt today, though a bit disappointed because Spreadshirt was out of premium shirts and so they sent me a non-premium one.
20:49 damaya Whatever, the quality still seems pretty good.
20:50 damaya I definitely like the design.
20:51 sri aww
20:51 sri hope the print quality is nice at least?
20:51 damaya They gave me $5 off my next order, so that's nice.
20:52 damaya Oh the quality is really good. I probably wouldn't have even realized had they not included a thing letting me know :)
20:52 damaya It's a nice shirt. I'm looking forward to wearing it to work tomorrow.
20:52 sri \o/
20:53 damaya I've been looking for a Perl shirt for a long time, but everything looked like it was from '92. It's awesome to finally find some that are modern.
20:53 damaya I have $5 off for my Mojolicious cloud shirt now.
20:54 damaya sri, what was the link again?
20:55 damaya sri, you should add it to the topic.
20:55 sri there's a ribbon on http://mojolicio.us now
20:55 damaya Oh, awesome!
20:56 damaya Whaat?! I want the glow in the dark Raptor now!
20:56 damaya haha
20:56 sri haha
20:57 sri i'm so jelly... we have no tie dye shirts in the european store
21:00 sri think i'll get a pirate mug for myself
21:03 sri hmm... looking into #706... i'm wondering if close_gracefully instead of close would be better in general here https://github.com/kraih/mojo/blob/master/lib/Mojo/IOLoop/Stream.pm#L115
21:23 sri i'm really not sure, so i guess full close is more defensive
21:29 denis_boyun joined #mojo
21:50 sri hahaha... that translation is perfect http://www.reddit.com/r/technology/comments/2lylai/groupon_is_trying_to_acquire_the_gnome_trademark/clzhqz3
21:53 genio http://www.engadget.com/2014/11/11/groupon-gnome-foundation-trademark-war/
21:53 genio they've backtracked
21:55 neilhwatson I thought you couldn't trademark pre-existing words.
22:15 bowtie_ joined #mojo
22:20 bowtie_ joined #mojo
22:37 bowtie joined #mojo
22:50 amon joined #mojo
23:05 hasan joined #mojo
23:05 hasan can I tell hypnotoad about my lib includes?
23:05 preaction like... the PERL5LIB envvar?
23:06 hasan when I say "perl -I lib/lib/perl5/ lib/bin/hypnotoad -f script/foo" is does not work
23:06 hasan but my "perl -I lib/lib/perl5/ lib/bin/morbo -f script/foo" works well.
23:06 hasan with hypnotoad it says: Can't locate Mojolicious/Plugin/REST.pm in @INC (you may need to install the Mojolicious::Plugin::REST module)
23:07 hasan and @INC here contains ../lib (relative to script/foo I guess.
23:07 hasan but it should actually be ../lib/lib/perl5 in my case. there are all my modules installed.
23:07 preaction yeah, set PERL5LIB, it will probably help better
23:07 hasan ok
23:08 * sri is a little tempted to try world of warcraft again :o
23:08 preaction we've lost him. he's gone. it's all over.
23:08 preaction shut it down!
23:09 sri :)
23:09 hasan it works :)
23:09 hasan sri: don't. I lost my friend back then.
23:09 hasan but go on, I didn't say anything :/
23:11 * sri actually was a hardcore WoW addict 3 years ago
23:12 sri oh my, it's alreay 4 years :O
23:17 hasan btw: what does "remaining connection slots are reserved for non-replication superuser connections at.." mean?
23:17 hasan is this mojolicious denying a request because there are no more slots free?
23:18 hasan and if so which slots, tcp sockets?
23:19 hasan or is this DBD::Pg (or better postgresql) telling me there are no more connections left to handle them
23:21 hasan ok just realized it is a error message of postgresql. nvm.
23:23 bowtie joined #mojo
23:40 basiliscos joined #mojo
23:41 doublelel joined #mojo
23:42 bpmedley hasan: Did you get your hypnotoad issue fixed?
23:49 bowtie joined #mojo
23:55 hasan bpmedley: yes.
23:55 hasan the PERL5LIB env fixed it.
23:56 bpmedley Cool
23:56 hasan now I just try to figure out why I get these error messages after a while.
23:56 bpmedley How many workers?
23:57 hasan maybe it's interesting to you guys. I'm stress testing my mojolicious app. not much done. only Mojolicious::Plugin::REST with some rest routes and a SELECT query to postgresql.
23:57 bpmedley Sounds fun.  How many hypnotoad workers are there?
23:57 hasan except the max connection problem. I see several error messages of Mojo::Reactor::Poll after several times of testing the API with "ab" (apache utils)
23:57 hasan hypnotoad's default. I don't know how much but afaik 5.
23:58 hasan workers.
23:58 purl workers are socket connections
23:58 bpmedley Hrmm.  How many Mojo::Pg objects are you using?  Are you using Mojo::Pg?
23:58 hasan like I said. after some time I get "Mojo::Reactor::Poll: Read failed: Can't call method "req" on an undefined value at.."
23:59 hasan bpmedley: no Mojolicious::Plugin::PgAsync. simple plugin that uses DBD::Pg with '
23:59 hasan async feature.

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