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

IRC log for #mojo, 2014-02-07

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

All times shown according to UTC.

Time Nick Message
00:00 sri depends a lot on the application
00:00 no_respect I still stink a perf testing, dont know howto work around things like same request being handled through cache vs that doesnt happen on live sites as much n stuff
00:00 sri apachebench sucks, better use wrk
00:00 no_respect does wrk fake liek many different ip?
00:00 sri hello world benchmarks are fun, but don't tell you much
00:01 no_respect dont see wrk on cpan....
00:01 sri node.js is king at hello world because all the load is on C++ code, and then degrades quickly when you hit more javascript, while perl starts out slower, but degrades less
00:02 sri https://github.com/wg/wrk
00:03 sri it's hard not to draw the wrong conclusions from too simple benchmarks
00:04 no_respect oh i great at drawing bad conclusions
00:04 no_respect lol
00:04 no_respect wrk looks nice, wow 56k/s in his example, wtf is that?
00:05 no_respect nginx?
00:05 purl nginx is http://nginx.net/ or http://wiki.codemongers.com/Main or a small optimized web server/reverse proxy or you want >= 5.80014 to run my app anywhere other than / or fastcgi_param SCRIPT_NAME /app_base/; fastcgi_param PATH_INFO $fastcgi_script_name; or if truncating my stuff randomly at 20221 bytes, update for the bugfix
00:06 jberger My book feels a lot better with the new overview introduction
00:07 jberger Seriously a primary goal of my book is to never again get the "how do you make this lite code work in a full app"
00:08 sri :)
00:10 tempire what is the intended market of your book?
00:10 tempire jberger: ^
00:10 s1037989 jberger: dumb question, but how do I read your book?  Just need a tex viewer?  Any recommendation for Linux?
00:10 no_respect link 2 book?
00:11 no_respect :)
00:11 s1037989 https://github.com/jberger/MojoBook
00:12 no_respect philosophically I ask myself: data is in database, can I avoid programming more, by having more data? and is that a good thing?  mojo seems to get the multiprocessing problem and take it to the mat, but how does it handle complexxity of the app? of app evolution?   or should these things be handled with more complex data tables and are they non of mojos conce
00:12 no_respect concern
00:13 sri purl: mojobook is at https://github.com/jberger/MojoBook
00:13 purl OK, sri.
00:13 * tempire considers using Role::Tiny
00:13 russum joined #mojo
00:14 sri oh noes... metacpan is down
00:14 no_respect i thought it wsa me
00:14 marty joined #mojo
00:14 no_respect the mojobook seems to not be in fun n ez htrml?
00:14 no_respect html?
00:14 purl html is one possible representation of the data in REST or "see regexp" or The <center> cannot hold
00:17 jack joined #mojo
00:27 d4rkie joined #mojo
00:28 sri aaah, the 308 redirect spec has not been updated since 2012 because it has to wait for the reworked RFC 2616, but is guaranteed to become an RFC itself afterwards
00:30 radixo joined #mojo
00:43 Akron Latex is not so much fun when it comes to turn the mojobook into a children comic, with the adorable character "Perlbert", reaching 300k in funds on kickstarter.
00:51 d4rkie joined #mojo
00:52 no_respect u got 300k to do that book? holy shaz
00:53 no_respect I get no respect
00:54 laouji joined #mojo
01:04 Akron The Ruby girl has.
01:05 sri hmmmm... wonder if Mojo::Collection::compact and Mojo::Collection::uniq should be smart enough not to serialize objects
01:06 good_news_everyone joined #mojo
01:06 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/BYQtBw
01:06 good_news_everyone mojo/master 7357d14 Sebastian Riedel: test for adding HTML style attribute
01:06 good_news_everyone left #mojo
01:07 sri s/serialize/stringify/
01:12 no_respect anyone got a mojo site I can hit?
01:12 no_respect :)
01:14 s1037989 httpcheckip.keystone-it.com
01:14 dabudabu hit with what?
01:14 s1037989 http://checkip.keystone-it.com
01:14 s1037989 It's IPv4 and 6!  :)
01:23 AndroUser joined #mojo
01:23 AndroUser joined #mojo
01:24 no_respect :)
01:32 jberger Oh hai, I missed the mentions
01:33 ka2u joined #mojo
01:33 asarch joined #mojo
01:33 jberger Tempire intended market is probably moderate familiarity with Perl some familiarity with web concepts
01:34 jberger s1037989:  there is no such thing as a TeX viewer
01:34 jberger You compile it to pdf
01:35 AndroUser Jberger: thanks! What compiler for Linux do you recommend?
01:36 jberger texlive
01:36 jberger And install latexmk
01:37 jberger Then compile with latexmk -pdf main.tex
01:37 jberger Also a -pvc will continuously compile as you edit, which is awesome
01:38 jberger If you are just interested in seeing it, there isn't much yet, I posted a link to a compiled version a few days ago
01:39 jberger I'm on my phone or I would get it for you
01:39 jberger TeX is huge unfortunately
01:40 * jberger <3 LaTeX
01:41 AndroUser Awesome thanks! If like to check it out just to get a feel of what's to come. :)
01:41 AndroUser Thanks for the info!!
01:42 jberger joined #mojo
01:43 jberger Yay finally home!
01:43 jberger This has been the worst winter evar
01:46 AndroUser You too??
01:46 purl ohhh oh oh, the sweetest thing...
01:49 jberger Yeah, I'm in Chicago where are you?
01:50 malikai chicago: too f'n cold for life in the winter.. too f'n dangerous to drive in anytime
01:51 * malikai grew up in chitown
01:51 AndroUser St. Louis!
01:51 purl hmmm... st. louis is the only team to ever beat the Sox *twice* in the World Series
01:52 malikai st. lous: best place in the world to get mugged and stabbed, next to detoilet
01:53 AndroUser Haha! So I've heard! I'm in the burbs tho where it's nice and quiet. :D
01:53 jberger \o/
02:00 davido__ Salt Lake.  Snow to arrive tonight.
02:04 AndroUser I hope that salt lake snow isn't planning on heading east!!
02:20 klapperl joined #mojo
02:49 Akron Nowadays everybody is using texlive ... there is no discipline in the world anymore to limit tex to a reasonable set of packages ...! ;)
02:55 Akron (Nonetheless ... <3 LaTeX and Org-Mode (in the combination),too) Goodnight!
02:58 gnephiak joined #mojo
03:15 d4rkie joined #mojo
03:19 damaya joined #mojo
03:20 damaya I am making a plugin for DataTables, and I am looking for a little input. There are many options to DataTables, for example, columns: http://datatables.net/usage/columns
03:23 damaya I don't exactly care for the Hungarian notation... but, not sure what to do here. As it stands now, it looks like this: $self->datatable( columns => [{mData => 'blah', bVisible => 'false'},{mData => 'blah2', sClass => 'datatable-class'}], sDom => "R<Cfr>t<'row-fluid'<'span12'TiS>>" );
03:24 damaya I was thinking, some column settings are booleans, with a default of true... so I was thinking of making it like this $self->datatable( columns => [ qw(col1 col2 col3) ], dom => 'asdfasdf' );
03:25 damaya I would then translate my options to DataTable options. If someone wants to hide columns they can do $self->datatable->hide_columns(@columns), or something.
03:25 damaya Should I just keep it like DataTables has it, or should I make it my own?
03:27 malikai i <3 women in latex
03:27 damaya me too
03:29 russum joined #mojo
03:29 no_respect lol
03:35 jberger damaya: When in doubt replicate the original api
03:35 jberger If nothing else it's easier to document
03:37 damaya I think for now I will go with the Hungarian Notation.
03:38 damaya Ah, yeah, I was thinking I'd just do that. When I throw it on github/cpan I can get some more input / accept changes.
03:38 no_respect its brave to publish code
03:38 no_respect :)
03:38 damaya thanks as always jberger
03:38 no_respect bravo
03:39 damaya I've never had anyone ever look at anything I've ever done (the code anyway), so it should be interesting to get some feedback
03:39 damaya I am looking forward to it. Should be a good learning experience.
03:39 damaya I may give people some good laughs :D
03:40 damaya I'm a code comedian
03:41 damaya welp, back to working on my act
03:43 no_respect do you follow the laws of modern perl? and the functional perl book by the dude uh whats his name?
03:44 no_respect http://hop.perl.plover.com/book/ here it is higher order perl
03:44 no_respect so many good books so little time
03:44 no_respect :)
03:45 damaya I've skimmed HOP, and read the entirety of Modern Perl.
03:46 damaya I try as much as possible to follow Modern Perl, but it can get confusing at times going back and forth between latest stable Perl and Perl 5.8.4.
03:50 malikai perl 5.8.4: proof that dinosaurs knew how to code
03:50 no_respect perlbrew gave me 5.18.2 pretty easily on ubunutu 12.04.3 amd64
03:50 no_respect im loving it
03:51 no_respect I havent tried it on freebsd10
03:51 no_respect ;)
03:51 no_respect I even got mypnotoad to hello world for me
03:51 no_respect hypnotoad
03:51 purl ALL GLORY TO THE HYPNOTOAD!!!
03:51 no_respect lol
03:51 no_respect LOL
03:52 no_respect hypnotoad
03:52 purl ALL GLORY TO THE HYPNOTOAD!!!
03:53 malikai jberger saved another life yesterday by reminding me that perlbrew is the way to escape RHELL perl
03:53 jberger Yay
03:54 jberger perlbrew is the ... ALL GLORY TO THE HYPNOTOAD
03:54 no_respect lol
03:54 no_respect perlbrew
03:54 purl perlbrew is just so nice.
03:54 no_respect dancer
03:54 no_respect ....
03:55 no_respect jifty
03:55 no_respect ....
03:55 no_respect heh
03:55 s1037989 Crickets.
03:55 purl rumour has it crickets is http://dilbert.com/fast/2008-11-30/
03:56 malikai oh look.. it's DDoS o-clock in IX-land..
03:56 * malikai goes back to work
03:56 no_respect many machines, on IX, new machines
04:00 malikai it would probably be a good idea for people to keep their ntp servers to themselves if they don't plan on actually maintaining them
04:06 russum joined #mojo
04:09 malikai lol.. 12Gbit flow to a DSL host
04:23 laouji joined #mojo
04:24 laouji joined #mojo
04:30 irq joined #mojo
04:33 mattastrophe joined #mojo
04:54 ka2u joined #mojo
05:18 good_news_everyone joined #mojo
05:18 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/rIHDsQ
05:18 good_news_everyone mojo/master 04470cf Sebastian Riedel: more defensive regular expressions
05:18 good_news_everyone left #mojo
05:20 sri guess one thing we could do with signatures is hack up a polyfill in Mojo::Base and require it on older versions of perl in Makefile.PL
05:28 moritz now why did I just read "ponyfill"?
05:47 good_news_everyone joined #mojo
05:47 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/SIE3LA
05:47 good_news_everyone mojo/master b7506ba Sebastian Riedel: fixed typo in server example
05:47 good_news_everyone left #mojo
06:11 laouji joined #mojo
06:17 laouji joined #mojo
06:22 laouji joined #mojo
06:48 tempire_ joined #mojo
06:48 tempire_ If I'm going to have a talk for openwest
06:48 tempire_ wonder if it makes sense to just give that talk at yapc as well
06:57 davido__ Seems like a very good idea.  One can be a warm-up for the other.
07:06 * tempire_ wonders if he cares enough
07:08 no_respect so with hypnotoad you dont set a number of workers, it just manages them itself
07:10 tempire_ it has a default
07:10 davido__ If you were infecting Mojo::JSON with JSON::XS, and an error is thrown, would you be heartbroken if the text of the error differs from what Mojo::JSON would have reported?
07:11 davido__ (Because making error reporting match verbatim is sort of.... hard. ;)
07:11 tempire_ that's what error codes are for
07:11 tempire_ but as long as the error text indicates what the problem is, I don't think it would be a problem
07:13 dod joined #mojo
07:15 davido__ JSON::XS croaks on parse errors.  About the best we can do is eval{}, look at $@, and spew the offending JSON.
07:16 davido__ oO(Or re-parse using Mojo::JSON and spew *that* error)
07:17 tempire_ Mojo::JSON does that do, as I recall
07:17 tempire_ unless you're using j
07:27 davido__ The "Missing low-surrogate" and "Missing high-surrogate" tests in t/mojo/json.t look like the test names are mismatched.
07:29 davido__ Lines 315 through 318, and 319-322.
07:34 Vandal joined #mojo
07:42 abra_ joined #mojo
07:43 trone joined #mojo
07:43 dod joined #mojo
07:56 dod joined #mojo
08:03 denis_boyun joined #mojo
08:03 eseyman joined #mojo
08:07 eugen joined #mojo
08:09 rawler joined #mojo
08:13 basiliscos joined #mojo
08:20 dvinciguerra joined #mojo
08:32 odc joined #mojo
08:33 ka2u joined #mojo
08:40 cfedde joined #mojo
08:50 trone joined #mojo
09:04 nicomen what's the best way of returning different 404 pages based on Accept-Type?
09:04 batman nicomen: i think https://metacpan.org/pod/Mojolicious#before_render
09:08 dpetrov_ joined #mojo
09:08 damaya joined #mojo
09:10 damaya When I use Mojo::UserAgent on a URL that outputs some XML with the prolog missing. HTTP::Tiny is able to grab the content, but with Mojo::UserAgent I am getting nothing.
09:11 batman what's prolog?
09:11 purl prolog is pretty darned weird. or beautiful or declarative or "programming with logic" or unifying Horn clauses
09:12 batman and what does MOJO_USERAGENT_DEBUG=1 output?
09:13 damaya prolog is a programming language, yes... but prolog also refers to the DTD
09:13 batman ok
09:14 batman damaya: you're not telling us the whole story
09:17 damaya so, MOKO_USERAGENT_DEBUG=1, no output at all, nothing
09:18 batman then you're 1) not telling us the whole story 2) the $ua is garbage collected
09:18 batman you should see the request on screen
09:18 batman are you doing non-blocking or blocking?
09:18 damaya MOJO_USERAGENT_DEBUG=1; mojo get -M POST -H 'Content-Type: text/xml' -c '<GetIt><Serial id="85980"/></GetIt>' http://jimmy-hoffa:8080/timing/getit
09:19 batman drop the first ;
09:19 batman MOJO_USERAGENT_DEBUG=1 mojo get ...
09:19 damaya HTTP/1.0 200 OK
09:19 damaya Date: Fri, 07 Feb 2014 09:19:23 GMT
09:19 damaya Server: Tomcat Web Server/3.3.1 Final ( JSP 1.1; Servlet 2.2 )
09:19 damaya and no content
09:19 purl no content is an error
09:21 damaya my $req = HTTP::Tiny->new->request('POST', 'http://jimmy-hoffa:8080/timing/getit', { content => '<GetIt><Serial id="85980"/></GetIt>', headers => { 'content-type' => 'text/xml' } } ); say $req->{content};
09:21 damaya that works
09:22 damaya my $tx = $self->ua->post('http://jimmy-hoffa:8080/timing/getit' => $header => $content); ($header = {'Content-Type' => 'text/xml' }; and $content = '<GetIt><Serial id="85980"/></GetIt>';)
09:22 batman damaya: what about the request? is it the same? AND DO NOT PASTE IT INTO THE CHANNEL
09:23 batman http://p.thorsen.pm # use a pastebin
09:23 damaya batman: one second, what are you asking?
09:23 batman you got both the request and response to screen when running with MOJO_USERAGENT_DEBUG
09:23 batman maybe there's some escaping or other weird stuff going on
09:23 damaya Ah, yes... one second
09:26 batman part of my code seems to run in the future. hate when that happens :)
09:27 damaya http://p.thorsen.pm/0b19faff61d7
09:31 nicomen batman: thanks, another thing: how do I make this work:
09:31 nicomen $ perl -MMojo::DOM -MTest::More -wlE 'my $d = Mojo::DOM->new("<b><!-- comment --><p></p></b>"); my $t = $d->at("p")->previous || $d->at("p")->text_before; is($t, "<!-- comment -->");'
09:32 damaya Here's some Data::Dumper output from HTTP::Tiny
09:32 damaya http://p.thorsen.pm/20d9b1945ed0
09:33 damaya As I said, DTD is missing, so maybe that is the cause?
09:34 batman damaya: maybe tomcat doesn't get HTTP/1.1
09:36 mil tomcat 3.3 is _really_ old, like 2002 :)
09:36 damaya yeah, that's the only difference I see
09:37 damaya I am working mostly in Solaris 9, Perl 5.8.4 now because we recently upgraded, etc.
09:37 damaya I'd love it if I had more control over my environment, but unfortunately I don't :(
09:37 damaya Most of my work is done in C anyway, so typically doesn't matter.
09:39 damaya Hm, not seeing anything to change it to HTTP/1.0
09:39 batman damaya: so you actually saw the difference, but it didn't occur to you that it might be the cause?
09:39 * batman ignoring damaya
09:40 damaya I just noticed the difference after you had said something
09:40 dhg joined #mojo
09:42 damaya And that is fine if you ignore me, nothing I can really do if you're an asshole
09:44 damaya I was more interested in the why, and you helped me out there. I don't mind using HTTP::Tiny since it works.
09:45 batman convos doesn't have ignore :/
09:45 irq joined #mojo
09:45 batman but i wish it had after you calling me an asshole :(
09:46 damaya use an IRC client such as xchat, bitchx, irssi... they do
09:47 batman and just to show you what an asshole i am: $ua->once(start => sub { $_[1]->req->version('1.0'); }); $ua->post(...);
09:47 damaya don't take offense, you're being an asshole and that's fine. I don't mind if assholes ignore me either :D
09:47 batman damaya: consider being nice if you want help.
09:48 nicomen I tried to catch up your conversation, and I can't see exactly what the problem is, the pastebin results shows content doesn't it?
09:48 damaya haha, batman, I'm not upset or anything.
09:49 nicomen is it just the debug part that is missing?
09:49 batman damaya: i am pretty upset with your behavior. hope you're 14, so you still have time to grow out of it.
09:50 nicomen omg
09:50 * nicomen hands out chill pills
09:50 damaya batman, really, don't be so sensitive man.
09:50 nicomen damaya: goes back to you too, batman hasn't been an asshole, but can we go back to what the problem really is?
09:50 damaya or (wo)man, whatever it is. I am just saying, you were being an asshole. I can use whatever I need to get it accomplished. I was merely asking the question out of curiousity.
09:51 damaya anyway
09:51 * batman gives up
09:52 damaya Hm, so if I do have content then I just don't know how the hell to get it.
09:52 damaya sorry batman
09:52 damaya :)
09:52 nicomen damaya: but what you pasted here: http://p.thorsen.pm/20d9b1945ed0 does have content?
09:52 damaya yes, and that is using HTTP::Tiny
09:53 nicomen aha
09:53 damaya And changing to HTTP/1.0 didn't fix it
09:53 nicomen damaya: are you able to reproduce with an URL I can test with?
09:53 damaya So, I still think it may be the missing DTD.
09:54 damaya Yeah, let me fix you up with something real quick. One second
09:54 nicomen great!
09:55 batman nicomen: damaya doens't need help, so don't bother (he told me so in a pm)
09:55 maxhq joined #mojo
09:56 damaya I don't.
09:56 damaya However, this may be a bug in UserAgent, so I figured people in this channel might be interested.
09:56 damaya I am using HTTP::Tiny for the request at this point, and that is fine with me.
09:57 damaya If you're not interested in reproducing it, then I won't waste my time setting up a URL.
09:57 damaya Let me know.
09:57 nicomen I am
09:57 nicomen waiting...
09:57 purl somebody said waiting was the hardest part!
10:08 nicomen damaya: ready?
10:08 damaya one second
10:08 purl one second is second is the duration of 9,192,631,770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the caesium-133 atom.
10:09 damaya not sure I am going to be able to set this up exactly as it is on the server I am connecting to
10:09 damaya Hrm
10:09 nicomen damaya: as long as the same error happens, it should be ok I guess...
10:11 arthas joined #mojo
10:19 damaya I cannot reproduce it. Whatever it is, it's not DTD.
10:19 damaya I have rendered this as txt, xml, etc, and it is getting the content.
10:51 fhelmber_ joined #mojo
10:51 mire__ joined #mojo
11:13 stl how about some erotic images about mojo?
11:13 crab sexy rainbow-puking raptors getting it on?
11:14 stl nope :( only russian girls
11:18 crab ok, i think that's enough about that topic.
11:22 stl http://25.media.tumblr.com/972bc13c507eb580207b23b26ecf520f/tumblr_n09wizFrME1rddbpso1_1280.jpg http://25.media.tumblr.com/64433dee38e39520683b0411ea44dcf4/tumblr_n07j0ylYIj1rddbpso1_1280.jpg http://25.media.tumblr.com/8bb2a9e565adfa91536fff93e1b22bd3/tumblr_n09win7O1g1rddbpso1_1280.jpg http://24.media.tumblr.com/031848700ab7d88d36ea6e1703dfa9a1/tumblr_n07ivuHlDE1rddbpso1_1280.jpg http://24.media.tumblr.com/f205ef55999b12672152c70ac98af3b4/tumblr_n07iviV8bL1rddbps
11:26 mudler mojo nudes? love them
11:26 mudler :P
11:26 crab stl: totally not wanted. stop it.
11:26 crab i won't say this again.
11:27 marcus I'll say it again tho, what crab said.
11:28 mudler there is a way to handle threads inside a mojo hypnotoad app? or when hypnotoad spawns his threads mine would be re-respawned?
11:29 stl crab: okay
11:29 damaya Gotta question. From where does a UserAgent request build the content? I mean, is this done in Mojo::DOM::HTML?
11:29 damaya I'm trying to figure out what I believe is a bug, just need a nudge on where to start looking.
11:30 batman mudler: hypnotoad forks.
11:30 batman no threading
11:30 batman environ?
11:30 purl i heard environ was not defined when linking shared libraries
11:31 batman print-env?
11:31 batman split-env?
11:31 batman arg.
11:31 damaya Ah yes, something in Mojo::DOM::HTML...
11:31 batman crap! wrong window again :(
11:31 batman (sorry)
11:31 bowtie_ joined #mojo
11:31 damaya shifting this line: while ($html =~ m/\G$TOKEN_RE/gcs) {, temporarily to while ($html =~ m/(.*)/gcs) { and now I see my content.
11:32 mudler batman: ok, they are forks and no threads, so i cannot spawn my threads inside the app, right?
11:32 damaya bleh, nothing
11:33 damaya I was hitting the wrong URL, that did nothing.
11:34 batman mudler: i don't think you can have threads inside a hypnotoad worker (mojo daemon). i think you can use Coro though...
11:34 batman mudler: what do you really want?
11:34 damaya I do know that my request is getting the content with Mojo::UserAgent though. http://pastebin.com/0qVXrXXs (output from tcpflow using Mojo::UA)
11:34 batman maybe you *think* you need threads, when you don't
11:34 damaya http://pastebin.com/tMJvASPB (output from HTTP::Tiny)
11:34 mudler i wanted to handle a couple of threads by a hypnotoad app
11:34 mudler not Coro fakes :(
11:34 batman but why?
11:35 damaya So, the request is getting the content, however Mojo::UserAgent is not accepting it for some reason. I.e., there is no content returned in the Mojo::UserAgent object.
11:35 mudler each async thread should do jobs that have to be managed by web interface
11:35 mudler i think i have to write a daemon then
11:36 mudler has to be* sorry my english today is lacking of completeness :P
11:37 mudler threads shares stuff,  i don't want handle them thru pipes
11:38 mudler batman: there is no such way to handle the execution of the first hypnotoad worker, or stuff like that?
11:38 mudler prepending operations before start doing his job
11:41 batman batman: we're spawning a daemon from hypnotoad i Convos
11:41 batman but it's not a child of hypnotoad, nor a worker
11:41 batman mudler: https://metacpan.org/source/JHTHORSEN/Convos-0.4/lib/Convos.pm#L375
11:42 batman you can't keep the child under a worker, since you have no guaranty how long the worker will run (it's restarted every now and then)
11:42 batman every now and then = on given intervals, but still not predictable
11:43 batman you can start a new daemon from startup(), but i don't consider that reliable either, since you don't know when you want to do hot reload.
11:43 damaya batman, did you author convos?
11:43 batman damaya: yes
11:43 damaya wow, it is pretty neat
11:44 mudler uhmmmm
11:44 batman mudler: so you're absolutely spot on: write a daemon and your life will be so much easier :)
11:44 damaya you just need to add ignore ;P
11:44 mudler i see
11:44 mudler i had to ereditate and reuse startup but it's not fault-tolerance :P
11:44 batman damaya: i'm trying to do "soft ignore", but it's not easy
11:44 batman mudler :)
11:44 mudler ok i have my way on the daemon then ehehhehe
11:45 batman damaya: convos is easy compared to my day work :(
11:46 mudler batman: thank you, you confirmed my toughts
11:47 mudler however, i set up a mongodb istance on openvz and the dinosaur (when there are a lot of request keeps showing up) :( i didn't realize how mango is useful :P
11:48 batman mudler: please check out my mandel project if you like mango
11:48 batman https://metacpan.org/pod/Mandel
11:48 mudler let me see
11:48 batman feedback is more than welcome
11:48 batman it's an "orm" (or odm)
11:48 mudler thank you man, i didn't wanted to rewrite my models :P
11:49 mudler batman: i know where to find you when i'll start implementing it ;)
11:50 batman :)
11:50 mudler i used mongoose, my fault
11:50 batman i'm also planning to make a redis backend for Mandel, but it's not yet even alpha :(
11:50 mudler but as i saw that mango wasn't production ready was my unique choise
11:51 mudler batman: you intend to change apis? or things stays put?
11:51 batman yeah... i think sri is waiting for the next version of mongo storage engine to be release before it's marked as stable
11:51 batman my model is also unstable, since i'm relying on mango :)
11:51 mudler yeah, but i guess you update that :D
11:52 batman "update that"?
11:52 batman i don't know yet. nothing should change dramatically without a warning (api)
11:52 mudler keep Mandel updated*
11:52 batman right
11:53 batman i still keep the warning there, until someone tells me they rely on the api :)
11:53 mudler then would be a perfect solution for me, or i'll put a stack on stratopan and that's the end :P
11:53 batman ok
11:54 mudler batman: Mandel seems a nice work btw coudln't look forward implementing it
11:55 batman thanks
11:55 batman one of my favorite feature is that it force a number to a number if you have defined the right type :)
11:56 batman sucks suddenly haveing "1.2" when you really wanted 1.2 :/
11:59 mudler yeah this is nice too
11:59 mudler $person->cats(sub {
11:59 mudler my($person, $err, $cats) = @_;
11:59 mudler $_->remove(sub {}) for @$cats;
11:59 mudler });
11:59 mudler :)
11:59 batman mudler: don't do that
12:00 batman http://p.thorsen.pm or some other pastebin
12:00 mudler oh sorry
12:00 mudler i thought for that small code wasn't a problem :P
12:00 batman but i agree.
12:00 batman small code = one line
12:00 denisboyun joined #mojo
12:00 mudler ahahah sorry i should convert to one liner then :P
12:01 mudler however i like removing cats in that way
12:02 batman :)
12:05 mudler a silly question, why mojo::loader doesn't use Module::Load instead of the eval for the require?
12:09 batman could be because Module::Load was not a core module when mojo still supported 5.8..?
12:09 batman Module::Load was first released with perl v5.9.4 # i might be wrong
12:09 mudler oh ok
12:11 damaya Alright, so now I figured out the issue
12:24 damaya Is there any way to set Mojo::Content to relaxed?
12:24 damaya The issue here is that the response from server does not have content-length
12:25 damaya A test fix on this was in changing line 133 in Mojo::Content to this: my $len = $headers->content_length || 50000;
12:25 damaya Now I am getting my content
12:31 damaya ok, so with that change in place, mojo at the command line works, morbo does not
12:34 damaya Hm, even with relax on it still does not work
12:41 d4rkie_ joined #mojo
12:44 eddy85br joined #mojo
12:46 damaya In Mojo::Content buffer is empty, state is finished.
12:47 jberger mudler see Mojolicious::Command::nopaste :-)
12:55 radixo joined #mojo
12:56 mudler jberger: aahhaha that's a good one :D you won an immediate install :P
12:57 mudler the github page link doesn't work :(
12:57 mudler https://github.com/jberger/Mojolicious::Command::nopaste
12:58 mudler it should link to https://github.com/jberger/Mojolicious-Command-nopaste right? :)
13:05 d4rkie joined #mojo
13:08 jberger Yes, where is it wrong?
13:09 mudler in cpan and in the github readme
13:09 jberger Oh yeah
13:09 jberger Ooops
13:09 mudler :)
13:16 damaya Hm, so not sure if this is a bug that really matters, or even a bug at all really.
13:19 damaya I find it really interesting that mojo at the command line still works after this change, but a $ua->post times out
13:19 d4rkie joined #mojo
13:21 dhg joined #mojo
13:25 Fatalnix I'll give you a bug. die unless $!;
13:26 Fatalnix :)
13:26 Fatalnix I dropped into the wrong channel so I had to say somethin.
13:37 jberger_ joined #mojo
13:48 jack joined #mojo
13:58 cleverfox joined #mojo
14:13 sh4 joined #mojo
14:16 meshl joined #mojo
14:27 ka2u joined #mojo
14:28 eddy85br joined #mojo
14:30 mattastrophe joined #mojo
14:32 dhg joined #mojo
14:41 cleverfox joined #mojo
14:44 s1037989 joined #mojo
14:48 bluescreen joined #mojo
14:56 btyler joined #mojo
15:16 AndroUser joined #mojo
15:18 AndroUser joined #mojo
15:20 LiveLover joined #mojo
15:25 gryphon joined #mojo
15:28 AndroUser joined #mojo
15:28 radixo_ joined #mojo
15:34 ka2u joined #mojo
15:37 eddy85br joined #mojo
15:49 sri damaya: if you have a test case i'll take a look, even though your feud with batman makes me not want to do that
16:00 good_news_everyone joined #mojo
16:00 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/4Fv8aA
16:00 good_news_everyone mojo/master 8ef279d Sebastian Riedel: test parsing a response without Content-Length in multiple steps
16:00 good_news_everyone left #mojo
16:02 mudler i love that bot :P
16:14 mudler it's freely avaible or requires to be hand coded? :)
16:18 denisboyun joined #mojo
16:24 batman mudler: you configure it on github
16:27 mudler really? O_O
16:27 mudler where
16:28 batman yeah. go to settings and service hooks
16:28 mudler batman: sorry if i bother you :P
16:28 mudler uhm let me check
16:28 batman you can select "irc" there.
16:28 batman but be careful: don't make it output your stuff to #mojo or #alien-channels
16:28 mudler i haven't noticed before :)
16:28 mudler nono obviously
16:28 batman :)
16:28 batman mudler: you don't bother me at all.
16:29 mudler :)
16:29 mudler i tought was something POE irc component related
16:30 batman right. me and marcus has written Mojo::IRC if you want non-blocking irc client for mojo :)
16:30 batman *have
16:31 batman i was so happy when i saw Mojo::IOLoop... i've always thought POE was a monster, and finally my thoughts where confirmed.
16:31 batman <3 Mojo::IOLoop
16:31 batman maybe even better than Mojolicious itself...
16:33 mudler uhmmm let me have a look on Mojo::IRC
16:33 batman we created it for Convos.
16:34 mudler it's really less complicated then POE
16:34 mudler POE somethimes makes things a bit difficult to mantain
16:34 batman indeed.
16:34 genio I'm going to take a look at that.  I've been using POE for IRC stuff for so long now..
16:35 batman feedback is more than welcome
16:36 mudler batman: Mojo::IRC as far as i can see it's not pluggable?
16:37 mudler lol sorry, i mean can have plugins?
16:41 fhelmber_ joined #mojo
16:43 tempire joined #mojo
16:47 beyondcreed joined #mojo
16:55 phillipadsmith joined #mojo
17:10 dhg joined #mojo
17:24 gnephiak will there be a more opinionated binding for redis? just like Mango for mongodb?
17:25 sri see Mojo::Redis
17:26 zackiv31 joined #mojo
17:27 sri it's not exactly how i would design it, but close
17:28 gnephiak cool
17:28 gnephiak thanks
17:37 marty joined #mojo
17:44 mire__ joined #mojo
17:53 dh7320 joined #mojo
18:07 AndroUser joined #mojo
18:12 doby joined #mojo
18:27 zivester joined #mojo
18:29 s1037989 joined #mojo
18:40 irq joined #mojo
18:48 rem_lex|pivo joined #mojo
18:55 sri mudler: Mojo::Loader also handles missing modules differently than Module::Load, which is something the mojolicious dispatcher needs
19:00 * sri is looking forward to being able to write "say for keys $loader->data('Foo::Bar')->%*"
19:01 sri i would have preferred autoboxing "say for $loader->data('Foo::Bar')->keys", but at least we can get rid of circumfix deref
19:03 mattastrophe joined #mojo
19:06 chansen sri: care to comment on <https://github.com/chansen/p5-url-encode/pull/1>?
19:07 chansen it would be nice if we could establish a common standard between decoders
19:09 sri the draft you linked to seems sensible, i have more trust in ietf working groups than the w3c
19:12 sri on the other hand, i do trust whatwg http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#application/x-www-form-urlencoded-encoding-algorithm
19:15 jberger_ mudler: I have a fun example of mojo irc in my Mojo::FriendFeed
19:16 jberger_ That is on cpan
19:16 jberger_ I also have my Toastr bot on github
19:16 jberger_ That is my attempt at a pluggable bot
19:22 meshl joined #mojo
19:26 chansen sri: The current implementation mostly agrees on W3's HTML5 standard, except it's dropping values without equal sign; How does Mojo do it?
19:30 sri according to spec
19:32 ka2u joined #mojo
19:33 chansen cool, I'll implement it that way also
19:33 chansen consistency++
19:33 sri i am intrigued that the whatwg spec doesn't use ; though
19:33 chansen it was rejected by IETF many years ago
19:33 s1037989 joined #mojo
19:34 chansen IIRC it was JavaScript that introduced ; as a pair separator together with their unicode escape
19:35 chansen or Java, forgot which, but we are talking before 2000
19:35 sri hmmm... wonder if mojolicious should drop ; support
19:35 sri java i believe
19:36 sri strictly speaking it's a bugfix
19:38 chansen I have URL::Encode processing millions of POST and GET request's every day, not a single issue regarding the parsing of application/x-www-form-urlencoded format (and no it doesn't support ; as a pair separator)
19:50 trone joined #mojo
19:57 batman mudler: it's just a low leve IRC client. your plugins will have to attach into the different events
19:57 batman like $irc->on(irc_join => sub { ... });
20:06 s1037989 joined #mojo
20:14 mire__ joined #mojo
20:27 good_news_everyone joined #mojo
20:27 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/-hqj_A
20:27 good_news_everyone mojo/master 2d1cf0e Sebastian Riedel: fixed ";" handling in Mojo::Parameters to be compliant with the HTML Living Standard
20:27 good_news_everyone left #mojo
20:31 bpmedley I was able to add DLNA support to my app with IOLoop.. Really cool stuff.. :)
20:32 good_news_everyone joined #mojo
20:32 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/jdushA
20:32 good_news_everyone mojo/master 61d55c2 Sebastian Riedel: more diverse empty parameter tests
20:32 good_news_everyone left #mojo
20:34 Adura joined #mojo
20:42 good_news_everyone joined #mojo
20:42 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/L8ZJhA
20:42 good_news_everyone mojo/master 8764950 Sebastian Riedel: small optimizations
20:42 good_news_everyone left #mojo
20:44 good_news_everyone joined #mojo
20:44 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Z8MCYQ
20:44 good_news_everyone mojo/master 54b7670 Sebastian Riedel: fixed typo in Mojo::Parameters
20:44 good_news_everyone left #mojo
20:48 damaya joined #mojo
20:49 damaya If you're interested in seeing it, I spend some time setting up a use case.
20:49 damaya If it's just a one-off case that you're not really interested in, then I don't really want to spend my time doing it.
20:49 damaya Let me know
20:50 damaya It honestly does not matter to me, (I.e., I don't need it), I can just use HTTP::Tiny which works
20:57 barwin joined #mojo
21:00 s1037989 joined #mojo
21:07 s1037989 joined #mojo
21:20 Foxcool joined #mojo
21:23 mudler jberger_: hailo on the bot is a feature that i wanted indeed
21:24 mudler batman: i see :)
21:25 sri damaya: i want something i can replicate
21:26 sri i've discovered an interesting accepts idiom and wonder if it should be tested and documented
21:26 sri perl -Mojo -E 'a(sub { $_->render(json => {wants_json => \$_->accepts("", "json")}) })->start' get /
21:27 sri if you make the first format an arbitraty false value, you can check if the user actually requested JSON
21:27 s1037989 joined #mojo
21:28 damaya sri, I am working on it, just not sure it is worth it really since I'm probably the only person around that it will impact :D
21:29 sri if it's a bug it will get fixed
21:30 batman mudler: Mojo::EventEmitter is pluggable by default imo...
21:31 batman since anything can register for an event
21:31 batman only limitation would be if you register 1M events, since it would take too long to loop through all the listeners :)
21:31 mudler batman: wasn't an objection, i only tought could be handy :)
21:32 batman indeed
21:32 mudler ahhahaha 1M events with my apu and my pc will implode
21:33 mudler for basic operations i can take 1M of coffee in bangladesh in the same time
21:34 edeca Is https://github.com/tempire/MojoExample/blob/master/lib/MojoFull.pm still a good example of how to integrate DBIx into mojo in a sensible way?
21:36 sri tempire makes good examples
21:37 damaya /usr/bin/env perl -MHTTP::Tiny -MModern::Perl -e 'say HTTP::Tiny->new->get("http://konocle.com/")->{content}'
21:37 damaya MOJO_USERAGENT_DEBUG=1 mojo get http://konocle.com
21:37 damaya There ya go
21:38 damaya I like that my first and only contribution to the awesomeness that is Mojolicious is the non-awesomeness of pointing out a bug (?) that nobody but me cares about
21:39 sri damaya: my chrome can't actually open that site
21:39 damaya my firefox can
21:40 damaya And my HTTP::Tiny request goes right through.
21:40 sri neither can my firefox
21:40 damaya Odd, does HTTP::Tiny get the content?
21:41 sri umm... does that shitty server depend on the connection timing out?
21:41 sri anyway, i'll take a look later
21:42 sri chrome gets a response after 2 minutes or so
21:42 good_news_everyone joined #mojo
21:42 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/xBcniA
21:42 good_news_everyone mojo/master c5c4878 Sebastian Riedel: document and test new accepts idiom
21:42 good_news_everyone left #mojo
21:42 sri that idiom should be pretty useful
21:43 damaya sri, not entirely sure what the fuck you're talking about
21:43 damaya let me see if I can get HTTP/1.0 going, could be a result of HTTP/1.1
21:44 damaya Keep in mind that I am replicating something from an older version of Tomcat with Nginx, quite a bitch
21:44 bpmedley damaya: That website doesn't load for me in a browser.
21:45 damaya god dammit, this is almost not worth it... now I need to figure out how to change from HTTP/1.1 to HTTP/1.0
21:45 damaya that really is the only difference
21:45 gryphon joined #mojo
21:48 punter joined #mojo
21:49 damaya yep, times out for me too
21:49 sri ok, i see what it stumbles over
21:50 damaya I'm hacking nginx source to remove stuff from the headers to emulate what Tomcat is giving me
21:50 damaya Not the greatest way to do it, since the Tomcat server responds immediately and nginx does not respond at all.
21:54 tempire have they released 5.20 yet?
21:54 * tempire wants signatures
22:01 sri damaya: that nginx spits out invalid http now
22:01 sri you can't end a message with connection close *and* announce Connection: keep-alive
22:02 damaya sri: :P
22:02 damaya I think I give up man
22:02 barwin left #mojo
22:02 sri i think i have an improvement that will work for that shitty tomcat server
22:03 damaya It's a piece of old shit
22:03 damaya The header contains 2 things
22:03 damaya I have to hack Nginx source to make it as shitty as this old Tomcat server
22:03 damaya Anyway, HTTP::Tiny must not care about headers or something. I have not looked at the source, but that is my though'
22:04 damaya thought.
22:04 purl i think thought is not the criterion for sentience
22:05 damaya last hack on nginx to see what I can do
22:05 sri HTTP::Tiny doesn't do keep-alive
22:05 sri so it doesn't have to care about a lot
22:06 sri ah, and now i know why we do it the way we do
22:06 davido__ tempire: Not yet.  I might discuss signatures, and some of the newish things that seem to be going unnoticed in Perl, such as extended character classes at OW.
22:07 sri proxy servers have this habit of responding with shitty HTTP responses while keeping the connection alive
22:07 sri so we chose Content-Type as an indicator for a response terminated by connection close
22:08 damaya sri, I personally don't think it is worth it to change it to accomodate old crap
22:08 damaya It's like designing a website for IE6
22:08 damaya who cares?
22:08 purl not me
22:09 sri http://pastie.org/8710004 # this patch would make your tomcat work, but break our support of shitty proxy servers
22:10 sri the real problem here is a fundamental one, for a shitty response with little information, when do we expect a proxy keep-alive and when a message body terminated by connection close
22:11 damaya sri, that is almost exactly the change I made this morning. However, I don't really want to much with my Mojolicious set up. I'd like to keep it as it is and just use HTTP::Tiny, simply because my mucking around could lead to other strange issues in the future.
22:12 sri oh it will, if you ever intend to use a https proxy
22:12 damaya I said if !$connection and that worked
22:12 damaya yeah, we use https proxy for a lot of other stuff (not this one, but other stuff).
22:13 damaya yeah, just not worth it, and I don't think it's worth working on to accomodate people who hack nginx source code to send shitty headers
22:13 damaya or people running Tomcat from 1999
22:14 damaya Thanks for all the help. Sorry for wasting your time on this one.
22:14 sri if there wasn't a serious tradeoff (support for shitty proxy servers actually in use these days) i would change it
22:23 s1037989 joined #mojo
22:23 s1037989 joined #mojo
22:25 jnbek joined #mojo
22:26 s1037989 joined #mojo
22:28 s1037989_ joined #mojo
22:28 damaya Thanks for your help sri.
22:28 damaya Have a good day.
22:50 davido joined #mojo
22:54 davido I'm still a little conflicted on what to do with errors generated by a module where JSON::XS infects Mojo::JSON.  I can verify that we get a message every time we should, but to get the same message would essentially mean re-parsing the bad JSON, which I could do easily by handing it back to the purePerl M::J, if people cared enough about verbatim messages.
22:56 Zx3 joined #mojo
23:05 sri davido: i would ignore that, considering the infect module is only being used as an optimization
23:05 davido_ joined #mojo
23:06 sri as in perl -Mojo -MMojo::JSON::XS=infect -E '...'
23:07 davido_ Alright.  My thought was that it's an unusual case where an error condition arises, and in such rare cases it might be more useful to reparse with M::J and get a good message, than to generate a message that is less friendly.
23:07 sri point out the incompatibilities in the documentation and good
23:07 davido_ I'm sure you're right. :)
23:08 davido_ Almost done then... documentation, and dealing with J::XS's less-capable utf16 & 32 deficiencies.
23:08 sri what i care more about it that the monkey patching itself is obvious enough, required -infect flag that is also explained in the docs in detail
23:09 sri pointing out that it shouldn't ever be a hard prereq, but an optimization loaded on demand
23:09 davido_ I was actually naming it Mojo::JSON::XS::Infect, hoping that's fairly obvious to begin with.  But I'll make sure to have the -infect flag as well if that's better.
23:11 sri i don't want any plugins on cpan pulling it in
23:12 sri perhaps also add an env var to disable it ;p
23:12 davido_ Ok, so the documentation should be explicit that it is intended to be invoked from the command line via -MMojo::JSON::XS::Infect=Infect ...., for example.  ENV variable is a great idea.
23:12 * sri nods
23:13 davido_ Ok... it's kind of a "spare time" thing, so a couple more days before I can put up a dev release for people to play with.
23:13 davido_ If that tests well, then a full release.
23:14 sri no rush, but you should post it to the list when you release it, think there's quite a bit of interest
23:14 davido_ I think it's at 108 tests passed (if I allow more generic error messages).  Still have some unicode deficiencies to work through, or document them well.
23:14 ioguix_ joined #mojo
23:15 davido_ I'll post something as soon as the dev release goes out.  ...including the repo.
23:15 sri been wondering recently if utf-16/32 support is actually worth it at all
23:15 davido_ Most of the tests that are still failing are related to utf-16/32
23:15 sri i've never encountered it
23:16 davido_ One advantage of routing errors back through the original Mojo::JSON is that utf-16/32 would be handled automatically, via pure-Perl.
23:16 davido_ ...which is why I was considering it in the first place.
23:17 davido_ So one would get XS speed for the majority of the use cases, and slightly degraded performance, but graceful fallback in cases where utf-16/32 present a problem.
23:18 davido_ But it does add complexity, and probably no real-world gain.
23:18 davido_ Anyway, thanks for the suggestions.
23:21 sri hmm, utf-16/32 support costs merely 7 lines of code...
23:25 tempire huh
23:25 tempire http://dweet.io/
23:29 Zx3 joined #mojo
23:40 Akron joined #mojo
23:54 s1037989__ joined #mojo
23:57 s1037989__ joined #mojo

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