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

IRC log for #mojo, 2014-02-09

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

All times shown according to UTC.

Time Nick Message
00:01 Akron (I knew Tempora's running on mojo steroids ...)
00:03 Adura Which version codname was that?
00:05 Akron (A hidden codepoint in Unicode 6 - sending this in an ssl handshake will automatically break encryption.)
00:06 Akron (It's everywhere in the snowden slides - but no font designer was allowed to illustrate it, so it's invisible.)
00:11 * sri would really like to make the switch from consulting to a one product web app shop though
00:14 zM joined #mojo
00:16 Akron Yeah, that sounds good.
00:22 dvinciguerra joined #mojo
00:23 zM joined #mojo
00:32 russum1 joined #mojo
00:55 skullbocks joined #mojo
01:03 alnewkirk joined #mojo
01:23 davido_ How is Mojo::JSON::j going to change?
01:30 laouji joined #mojo
01:38 jberger_ davido_, die on failure to parse
01:38 Rudy joined #mojo
01:44 jack joined #mojo
01:45 jack_ joined #mojo
01:54 punter joined #mojo
02:00 punter left #mojo
02:05 good_news_everyone joined #mojo
02:05 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/pGs3Fw
02:05 good_news_everyone mojo/master 5d948a8 Sebastian Riedel: link to Mojo::DOM::children
02:05 good_news_everyone left #mojo
02:08 mire__ joined #mojo
02:17 klapperl joined #mojo
02:31 laouji joined #mojo
02:33 skullbocks joined #mojo
02:38 ka2u joined #mojo
02:44 russum joined #mojo
02:45 bpmedley http://pastie.org/8713517  <-- I'm trying to use HTML5 to stream an ogg file that is currently being transcoded.  Do these headers and short HTML snippet look correct?  My browser is never iniating a 2nd request to get more content.
03:06 jberger_ so for a bit of insanity I have hooked up a Hailo to Mojo::UserAgent and I'm randomingly learning from web pages \m/
03:08 alnewkirk joined #mojo
04:16 d4rkie joined #mojo
04:26 ka2u joined #mojo
04:33 laouji joined #mojo
04:37 damaya joined #mojo
04:38 damaya hey, I'm getting ready to push a plugin out to the CPAN tonight.
04:38 damaya I normally use 4 spaces in my code, but I notice all the plugins use 2 spaces.
04:38 damaya Would you guys prefer I use 2 spaces, or does it not really matter?
04:38 good_news_everyone joined #mojo
04:38 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/fFTNWA
04:38 good_news_everyone mojo/master 7255bf3 Sebastian Riedel: test changing element types
04:38 good_news_everyone left #mojo
04:59 damaya Also, how do you guys deal with exceptions in your Mojolicious plugins?
04:59 damaya For example, a required param is not passed.
05:08 laouji joined #mojo
05:32 russum joined #mojo
05:34 sri it's interesting how play framework embraces sql... think if i wasn't so invested in mongodb i would try making sql more fun in perl too :)
05:34 sri http://www.playframework.com/documentation/2.0/ScalaAnorm
05:34 sri http://www.playframework.com/documentation/2.0.4/Evolutions
05:42 gnephiak joined #mojo
06:10 damaya DBIx::Class already does that, right?
06:12 damaya god, debugging mojo apps is terrible, and having to restart morbo constantly sucks too
06:12 damaya constantly sucks?
06:12 damaya or constantly, sucks?
06:13 damaya hmm
06:15 damaya loading, loading, loading, timeout... no output in terminal from morbo, nothing
06:15 damaya haha, awesome stuff
06:15 damaya "The connection was reset."
06:16 damaya "Server available to 127.0.0.1:3000"
06:40 damaya Yeah, alright, well developing Mojolicious plugins is enough to piss anyone off.
06:40 damaya How are you supposed to debug this shit?
06:40 damaya I get no messages in console, for some reason I need to restart morbo, connection just times out.
06:41 damaya Arch Linux, morbo, Perl 5.18.2
06:53 damaya bleh, sri--
06:55 damaya sri, you have made my life both awesome and absolutely miserable at the same time.
06:56 damaya I both love and hate you
06:57 irq joined #mojo
07:32 bpmedley joined #mojo
07:34 laouji joined #mojo
07:42 trone joined #mojo
07:45 dod joined #mojo
07:45 abra joined #mojo
08:07 Vandal joined #mojo
08:14 dod joined #mojo
09:06 jack joined #mojo
09:09 basiliscos joined #mojo
09:17 tempire__ joined #mojo
09:19 tempire_ sri: I'm with you. Same thing Marcus is in the process of doing. (one app shop)
09:20 tempire_ I do not support j dying on failure to parse.
09:35 laouji joined #mojo
09:38 sh4 joined #mojo
09:41 rem_lex|pivo joined #mojo
10:01 skullbocks joined #mojo
10:08 ryozi joined #mojo
10:21 skullbocks joined #mojo
10:25 punter joined #mojo
10:27 batman punter: it's not possible to help you with convos, if you don't state your problem
10:27 batman "not working very well" could be anything
10:27 punter batman: Yes, I plan to do that.
10:28 batman if you tell us what's not working, _then_ we will try to help you
10:28 punter :-) ok
10:33 jzawodn joined #mojo
10:39 punter batman: I wrote in #convos
10:58 hrupp joined #mojo
11:07 d4rkie joined #mojo
11:18 dotan joined #mojo
11:24 d4rkie joined #mojo
11:37 laouji joined #mojo
12:02 dvinciguerra joined #mojo
12:13 sh4 joined #mojo
12:26 hesperaux joined #mojo
12:44 denis_boyun joined #mojo
12:48 bowtie_ joined #mojo
12:55 jberger_ ok everyone, I'm declaring a re-commitment to civility here.
12:55 jberger_ This board is to be polite and fun
12:55 jberger_ I'm seeing too many conversations going sour too quickly
12:56 jberger_ everyone does better when the tone stays high
12:57 jberger_ now if an when damaya comes back, I will tell him/her that too
12:58 jberger_ and if we can we will help to debug, as long as the frustration remains impersonal
12:59 jberger_ hmmmm, I'm not op
13:00 jberger_ ENOBENDERS
13:01 rem_lex| joined #mojo
13:01 jberger marcus/crab/mst please help me out with some ops
13:02 jberger oh, there's Bender
13:02 jberger Bender needs ops
13:08 jberger diegok, memowe around?
13:11 Adura Board?
13:11 purl Board is probably Larry, Tom, Jon, Randal and Tim.
13:13 jberger Adura, room? I mean #mojo
13:14 jberger crab, thanks
13:14 Topic for #mojo is now The fun place to talk about Mojolicious, Perl and the web | http://mojolicio.us | http://irclog.perlgeek.de/mojo/today
13:32 mire__ joined #mojo
13:34 sjn joined #mojo
13:38 laouji joined #mojo
14:01 irq_ joined #mojo
14:04 mattastrophe joined #mojo
14:10 Akron joined #mojo
14:12 Akron damaya: Write tests using Test::Mojo - debugging with a running Morbo and a browser doesn't make much sense. The Test::Mojo toolkit is powerful enough to emulate nearly everything you neeed.
14:14 Akron damaya: There may be edge cases with Websockets etc. ... but simple REST apps and plugins should be perfectly testable with Test::Mojo.
14:15 Akron damaya: However: If you have any ideas how to improve testing and debugging, feel free to make suggestions. Saying that somehing simply sucks is not sooo constructive.
14:15 Akron jberger++
14:22 jb360 joined #mojo
14:48 zM joined #mojo
14:54 jberger perl -Mfeature=signatures -M-warnings=experimental::signatures -E 'sub doit ($x) { say $x } doit "Hi Sigs!"'
15:00 laouji joined #mojo
15:23 mire__ joined #mojo
15:34 Adura jberger, channel is what you likely mean.
15:34 skullbocks joined #mojo
15:34 jberger Adura, :-)
16:07 abra_ joined #mojo
16:11 mixMonkey joined #mojo
16:14 skullbocks joined #mojo
16:17 skullbocks joined #mojo
16:17 skullbocks joined #mojo
16:44 laouji joined #mojo
16:44 laouji joined #mojo
16:45 jb360 joined #mojo
16:50 denis_boyun joined #mojo
17:11 maxhq joined #mojo
17:12 mudler joined #mojo
17:14 mire joined #mojo
17:20 asarch joined #mojo
17:20 sri jberger++ # community gardening
17:21 sri tempire: https://github.com/kraih/mojo/issues/568
17:21 sri if you have objections post them there
17:44 maxhq1 joined #mojo
17:46 maxhq joined #mojo
17:53 denis_boyun joined #mojo
17:56 maxhq1 joined #mojo
18:03 maxhq joined #mojo
18:07 harvested joined #mojo
18:10 maxhq1 joined #mojo
18:20 maxhq joined #mojo
18:27 maxhq1 joined #mojo
18:29 meshl joined #mojo
18:54 bpmedley What do ya'll use for running background jobs?
19:05 sri something unreleased ;p
19:06 bpmedley Gaw.. :)
19:20 * jberger wants the mojo  job queue project
19:21 mixMonkey joined #mojo
19:23 sri it's a little different from what job queues normally look like, very integrated into mojolicious... app->queue->add_task(foo => sub { my ($queue, @args) = @_; my $app = $queue->app; ... }); ... app->queue->enqueue(foo => ['bar', 'baz']); ... ./myapp.pl queue worker
19:26 tempire_ 5.0!
19:26 sri boilerplate is "plugin 'Queue'; app->queue->mango->from_string('mongodb://127.0.0.1:27017');"
19:27 tempire_ There have been a few disconcerting conversations lately. A nudge away from "No one will be mean to you" that I stated in my presentation.
19:27 * tempire_ waits to see if its a pattern
19:27 sri tempire: sadly gets more common when projects grow
19:28 tempire_ I was thinking about what you've said in the past as I read the logs.
19:28 tempire_ But it hasn't gotten nearly as bad as you thought it was.
19:28 tempire_ Which is good
19:30 sri i think in the end all we can do is community gardening
19:31 * sri hands tempire his gardening scissors
19:31 tempire_ Might have to break out the sheriff hat again.
19:31 sri recently i've been a bit more strict on the mailing list and closed threads very quickly, i think it had a positive effect
19:32 jberger mostly the community is good, we just need to keep it that way
19:32 jberger tempire_, I thought of that line from your talk too
19:33 jberger WE are rarely mean
19:35 jberger I think we have our cross country athlete: https://www.google.com/search?q=men's+skiathalon+results&amp;oq=men's+skiathalon+results&amp;aqs=chrome..69i57.8713j0j1&amp;client=ubuntu-browser&amp;sourceid=chrome&amp;ie=UTF-8#q=The+Sochi+2014+Winter+Olympics+Curdin+Perl&amp;safe=off&amp;stick=H4sIAAAAAAAAAGOovnz8BQMDAx8HsxKXfq6-gWlulYGBWW3vOQ3j22-eMYrabTR-UdE1i009AgAs_WwLKwAAAA
19:36 jberger hmmm, wow, that's quite a url :-/
19:36 * jberger wants a ponycorn
19:37 ponycorn I'm elusive
19:47 marcus I'm not mean, I'm just me.
19:48 tempire I'm never mean
19:48 tempire to anyone
19:48 tempire ever
19:48 tempire anywhere
19:48 purl anywhere is fine :-)
19:48 tempire except for purl
19:48 tempire purl: shut it
19:48 purl Phuque Oph!
19:49 jberger ahhaha
19:49 jberger wow, purl really felt the tone of that one :-)
19:49 * sri takes the gardening scissors from marcus and hands them to jberger
19:50 marcus jberger: don't run with them!
19:50 * marcus learned that the hard way.
19:50 jberger oh, I've had my experiences with scissors
19:52 s1037989_ How would be best to call a command from within an app?  That is, I have a CLI command I like to execute, but it'd be nice to trigger it from within the app by clicking a link.  Make sense?
19:53 jberger s1037989_, make it another module
19:53 tempire s1037989_: abstract the functionality somewhere else
19:53 jberger call it from both the command and the app
19:53 s1037989_ Got it -- so don't call the command directly.  Makes sense!
19:53 * jberger calls jinx on tempire
19:54 * tempire calls nginx on jberger, and locks him in an event loop
19:54 * jberger emits error
19:54 * jberger curses the safe loop
19:54 jberger oh and that reminds me
19:55 jberger calid helped me improve this: https://github.com/jberger/Mojo-Reactor-UV-FFI/pull/1
19:56 jberger so maybe this could be a thing again
19:56 sri calid is right, UV::FFI seems like a good idea
19:57 jberger his ZeroMQ::FFI is pretty awesome
19:58 jberger sorry ZMQ::FFI
19:59 jberger he and I will talk this week sometime
20:00 jberger we work at the same office, I'm 4 floors up from him
20:02 mattastrophe joined #mojo
20:03 btyler joined #mojo
20:09 tempire_ joined #mojo
20:09 denis_boyun_ joined #mojo
20:18 tempire- joined #mojo
20:21 tempire joined #mojo
20:22 tempire whew
20:22 tempire Finally back on a bouncer.
20:22 * tempire can relax
20:22 sjn yay!
20:22 * sjn looks forward to the day convos is an irc bouncer
20:23 tempire me too
20:24 tempire marcus: strider?
20:24 tempire ah, ci. nevermind
20:25 jnbek^dt joined #mojo
20:33 bpmedley http://pastie.org/8716185 <-- Should this work given:  $ua->post('http://127.0.0.1:8081' => form => {cmd => j(["/usr/bin/ls", "/tmp"])})
20:37 bpmedley mojo get -M POST -c 'cmd=joy' 127.0.0.1:8081 <-- Doesn't print anything at line 18.  It's like the <$handle> is just not being processed.
20:39 sri what does the diamond operator do with non-blocking handles?
20:39 lukep joined #mojo
20:39 bpmedley Oh!  I didn't realize it was a non-blocking handle.. haha..  :)
20:40 sri you're getting a handle from an event loop, how could it not be non-blocking ;p
20:40 bpmedley There's probably a better way to build a mini-server; however, I wanted to try and at least get something going first.
20:41 bpmedley Makes perfect sense, sorry.
20:41 sri if it's a learning exercise knock yourself out... otherwise... http is hard
20:42 * jberger lets sri build his servers, so he doesn't have to
20:43 jberger mudler and I are working on my Toastr bot and I think I knocked him out when I showed him Mojo::EventEmitter
20:43 bpmedley I need a way to run ffmpeg in the background with my app.  I don't know of any minimalistic pure-perl job queue servers.  I realize you have one in the works; however, I need something now.
20:43 jberger sri++
20:43 sri aside from the websocket bits... i doubt it gets much more mini than this... at least if you want it correct https://github.com/kraih/mojo/blob/master/lib/Mojo/Server/Daemon.pm
20:44 sri bpmedley: resque
20:44 sri diegok ported it to perl https://metacpan.org/pod/Resque
20:45 bpmedley Doesn't that requuire redis?
20:45 sri it does
20:45 mudler sri: i was impressed that with so less code you have done a so powerful tool :)
20:45 mudler thank to jberger to pointed me out
20:45 mudler jberger++
20:46 bpmedley I'll have to figure out a way to embed it in my app.  I have a single file that has everything, at present and I'd like to keep it that way.
20:46 sri i've considered a super-mini job queue for mojo core, but i don't think it would be very usable with file based storage
20:48 mire joined #mojo
20:50 sri the core design i have now would theoretically work with a Storable storage backend too...
20:50 bpmedley It's like the suitcase in Pulp Fiction - if we could just get it.. :)
20:51 jberger sri: soft dependency on DBM::Deep?
20:51 jberger it gets a bad wrap sometimes, but I <3 DBM::Deep
20:51 sri then you might as well use sqlite ;)
20:52 jberger not at all, its a perl data structure
20:52 jberger then again, I'm not sure it would work as a queue, I don't know if it monitors for updates correctly
20:52 jberger storable+File::Map might be awesome tho
20:56 bpmedley Doh.  I would need Redis on Windows, doesn't seem to be up to snuff on that OS, yet.
20:59 jberger sri: https://metacpan.org/pod/DBM::Deep#LOW-LEVEL-ACCESS
20:59 jberger access to the filehandle, maybe a watcher is possible
20:59 bpmedley sri: Something to think about: https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Static.pm#L89  <-- How to support an asset with an unknown total size?
21:02 marty joined #mojo
21:03 jberger bpmedley, WHAT'S IN THE BOX???!!??
21:04 bpmedley Sorry, what?
21:04 jberger ever seen the movie Se7en?
21:04 meshl joined #mojo
21:05 bpmedley Been a long time.  I remember his finger print solution and few choice murder scenarios.. I need to watch it again.
21:05 jberger your pulp fiction reference made me think of the Seven quote
21:11 dvinciguerra joined #mojo
21:11 hummeleBop joined #mojo
21:16 jberger hmmm, _fh method seems to not work
21:17 jberger $db->engine->storage->{fh} seems less safe
21:34 sri actual storage doesn't really matter, the problem is that the default wouldn't scale past one server
21:43 Lee_ joined #mojo
21:47 dvinciguerra joined #mojo
21:47 Stefan joined #mojo
21:55 skullbocks joined #mojo
22:03 buu Is there a better way to do something like: if( @{$foo->at('bar')->children} == 3 ) { } ?
22:07 damaya joined #mojo
22:13 btyler joined #mojo
22:38 jnbek joined #mojo
22:45 damaya joined #mojo
22:47 damaya I am working on a Mojolicious plugin for datatables: http://pastebin.com/GmMBcdv1
22:48 damaya I have just a few questions. A) Is the style here correct? Am I doing things right? B) Some datatables options are a bit more complex (see fnInitComplete here: http://datatables.net/release-datatables/extras/Scroller/api_scrolling.html). How would you go about dealing with such options?
22:49 sri damaya: you've been rude in this channel on two occasions now, consider this your final warning, please be nice
22:50 nicomen are there any official plugin writing styles?
22:50 nicomen or best practices for that matter
22:51 damaya sri, maybe my social skills are not the best, but in no way have I tried to be rude.
22:51 damaya I take your final warning and will try my best, but most likely I will fail to heed it at some point :)
22:52 punter joined #mojo
22:53 jberger its ok to be frustrated at code, its probably bad form to insult other people's code, really bad form to insult other people. That said, I'm moving on. I'm looking at your plugin now
22:53 damaya sri, if you mean my comment about loving and hating you, I was joking about how much I love Mojolicious and how frustrating it has gotten me.
22:54 damaya Sorry, I only meant it as a joke, not being serious to you.
22:54 jberger nicomen, there seem to be two styles (at least) those that install simple helpers and those that install helpers but close over the plugin object as well
22:54 jberger damaya seems to have taken a pretty close parroting of my Mojolicious::Plugin::Humane, which is fine
22:55 nicomen ah ok
22:55 damaya sri, btw, I am sorry to you and the channel
22:56 damaya jberger, that is because I used your Humane plugin as a base for this.
22:56 damaya I've been looking at different plugins, including Humane (which I use in my app btw), to try to get a better idea of what I am doing.
22:58 nicomen are there any naming conventions for plugins and/or extending existing modules?
22:58 jberger I have thought about trying to formalize some of my thoughts about OO plugins into a base class
22:59 damaya nicomen, a question I was wondering myself when developing this actually.
22:59 nicomen I'm working on an extension of Mojo::UserAgent, and I was wondering what to name it if it was released
23:00 marcus http://ftp.heanet.ie/mirrors/fosdem-video/2014/K3201/Saturday/Convos_a_modern_IRC_client_for_your_browser.webm
23:00 nicomen MojoX::UserAgent::CoffeeMaking ?
23:00 jberger nicomen, what does it do?
23:01 nicomen jberger: it will include a default cache store, some fallback resolutions on errors, and some callback abilities
23:01 memowe I'm here, jberger.
23:01 basiliscos joined #mojo
23:01 jberger memowe, o/
23:01 nicomen oh and reading local files
23:01 memowe \o/
23:01 jberger memowe, I was just trying to get some ops around
23:02 jberger but I'm happy to see you too!
23:02 memowe \\o   o//
23:02 jberger \o-
23:02 jberger -o/
23:02 jberger |o|
23:02 memowe \o       <
23:02 memowe :(
23:03 memowe \o| (fixed) :)
23:03 memowe jberger: thanks for being happy, I'll return to my TNG episode now. :) \o
23:05 jberger o/
23:08 jberger damaya, without getting into the actual logic of the main few methods, I don't see anything wrong with the style
23:12 damaya sweet
23:12 damaya I take it the logic needs some work?
23:12 damaya You don't have to go into detail or anything, just wondering.
23:12 jberger I don't know what the logic is doing, so I didn't try reading it
23:12 damaya Ah, ok... sweet
23:12 damaya hehe
23:13 jberger I have no experience with datatables and not much with sql in general :-)
23:13 damaya well, it will be the first time I've put anything on the cpan, so I want it not to be total garbage
23:13 damaya haha, that's my worry
23:14 jberger damaya, I do like my auto option
23:14 zM joined #mojo
23:14 jberger allowing the user to manually include the library etc
23:15 damaya Ah, is that what it is all about? Ah ha, I will figure out a way to keep that in there then.
23:15 damaya Because I agree with you. Sometimes trying to make the plugin do everything doesn't seem to make sense.
23:15 jberger that's why humane_includes is a helper too
23:16 damaya To me it makes more sense in this to have all the DT stuff in the html.ep file, written by the user, and the plugin just creates the route if using server-side processing.
23:16 zivester joined #mojo
23:16 jberger I figured on the rare time you need the method you might be happy to have it auto-included on demand, but if you need it on every page, why reparse the reponse every time
23:16 damaya heh, that sure would alleviate a lot of what I've been trying to figure out.
23:17 damaya Yeah, that makes sense. I will include the auto option.
23:18 damaya Btw, thanks for the starting point. Humane was a good place to start :D
23:18 jberger you might be interested in this too: https://github.com/jberger/Mojolicious-Plugin-PPI/blob/master/lib/Mojolicious/Plugin/PPI.pm
23:18 jberger similar-ish style, closing over the instance, but with a very different purpose
23:40 mattastrophe joined #mojo
23:42 jberger oh, damaya, one thing
23:42 jberger I wouldn't close over the $app in an helper
23:42 jberger my $c = shift; my $app=$c->app;
23:43 jberger I am personally trying only to close over the plugin instance in one method and not closing over anything else

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