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

IRC log for #mojo, 2014-12-02

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

All times shown according to UTC.

Time Nick Message
00:10 marty_ joined #mojo
00:18 wk_ joined #mojo
01:43 jb360 joined #mojo
01:45 rem_lex| joined #mojo
01:58 sri i HATE that one fail there... http://www.cpantesters.org/distro/M/Mojolicious.html?oncpan=1&distmat=1&version=5.67
01:59 Grinnz dammit windows!
02:00 Grinnz "utf8NAME" wtf?
02:01 sri Pod::Simple::XHTML somehow manages to misinterpret "=encoding utf8"
02:01 Grinnz heh
02:01 sri (followed by "=head NAME")
02:02 sri s/head/head1/
02:02 sri i've already changed the tests in master though... to work around that glitch
02:13 sri $var->OtherClass::SUPER::method(); ... oh my... http://code.activestate.com/lists/perl5-porters/214980/
02:13 sri wish he would optimize more stuff we actually benefit from ;p
02:13 Grinnz lol
02:14 Grinnz i would be delighted to find a module that actually uses that
02:14 Grinnz and by delighted i mean a little queasy
02:18 genio joined #mojo
02:18 genio The reason I couldn't see the emoji in the topic was the fault of screen.
02:18 genio tmux++
02:19 Grinnz screen does tend to show its age.
02:45 jberger_ joined #mojo
02:45 jberger_ o/ from textual
02:45 jberger_ looks nice enough
02:45 jberger_ so I finally got around to reading the backlog for today
02:46 jberger_ franzkafka: thanks for the nice words about the MojoConf talk
02:46 jberger_ I actually hadn't rewatched it yet
02:46 jberger_ I was so disappointed about the slide formatting that I remember giving that talk with a certain amount of dred
02:47 jberger_ I just rewatched it and I was actually rather pleased
02:48 preaction i really ought to pay the $5 so textual doesn't disconnect me
02:48 jberger_ I might well do that, I'm only on the trial as ... well ... a trial
02:49 jberger_ though I really can't remember the last time I paid for software
02:49 preaction it's been a few months, i think i like it, even with the 12-hour limit (which doesn't hurt that much, honest)
02:49 jberger_ keeps you from chatting for days on end :-)
02:50 jberger_ preaction: so did Tom steal all my monitors yet?
02:50 preaction i don't think so, i didn't check
02:50 preaction was putting out fires all day
02:50 jberger_ oh hey, I'm a paid Perl dev now!
02:50 sri jberger_: you on a mac now? :o
02:50 jberger_ \o/
02:50 preaction though Amine called David "Joel" :p
02:50 klapperl joined #mojo
02:50 jberger_ HAHAHAHAHAHAHA
02:50 purl LOLCON 7 reached.
02:50 preaction \o/
02:50 jberger_ David was most worried about that
02:51 jberger_ sri: if someone is going to buy me a free mac, I'll take it I suppose
02:51 jberger_ though, I must say, I already am aching for apt
02:51 preaction oh, duh, if you're on textual that means you're on a mac!
02:51 jberger_ homebrew helps, but incomplete
02:51 preaction get homebrew
02:51 preaction macports then?
02:51 preaction what do you need?
02:52 preaction i've been Mac for 6 years now
02:52 * sri likes the os x command line dev tools and homebrew
02:52 genio me too
02:52 jberger_ well I tried to build the tilda terminal from source and beyond just barely getting the deps via homebrew, the thing segfaults before even starting
02:52 preaction with homebrew i get tmux, zsh, git, and vim, and then from there i use perlbrew to get perl going
02:53 sri only a few commercial tools i actually use (of course i'm a total minimalist)
02:53 preaction iTerm2 is probably what you want
02:53 preaction it has a feature that will copy the ~ functionality you want, i tried it but didn't like it for myself
02:54 jberger_ preaction: that one seems to be the one everyone recommends
02:54 * jberger_ will try
02:54 sri right now... lets see... Pixelmator, Sketch, Tweetbot, TrashMe and Keynote
02:54 * sri never liked iTerm2
02:55 genio I like iTerm2 much better than standard Terminal.app.  end, home work properly for one
02:55 sri define properly
02:55 preaction sketch looks amazing. but $99 :(
02:55 sri not a single problem with Terminal.app yet in yosemite
02:55 genio goes to the beginning of the line, end of the line as expected.  also, page up/down works as expected
02:56 preaction crap. i don't remember why i moved from Terminal.app to iTerm2...
02:56 genio Terminal.app doesn't translate home and end properly in vim vs general terminal use, etc.
02:56 sri preaction: i got it for like $50 when it was on sale the first wek
02:56 sri s/wek/week/
02:57 sri genio: pretty sure it does now
02:57 sri genio: you can even remap if you don't like it
02:57 genio I've messed with remapping too often and it's never quite right
02:57 preaction if $work would buy it for me, i'd do it. that's the reason i need a damn ui mockup tool... but $work don't use macs
02:57 sri as a matter of fact, i'm using home/end to scroll in irssi over tmux right now!
02:58 preaction there's no app development lifecycle at $work at all anyway. i made a functional mock in a few hours, nobody gave suggestions, nobody cared :p
02:58 preaction lucky for me, a functional mock to a functional app is barely a few more hours work because mojolicious :p
02:59 sri i've worked in that kinda environment too a long time ago
03:00 sri good old CGI.pm days
03:00 preaction i mean, i get it, apps aren't our thing. we're a data warehouse. but i keep getting asked to make apps for users who don't know how to use our data :p
03:05 nicomen preaction: what do you need to mock, that you need a mac for?
03:06 nicomen sri: what are "the os x command line dev tools" ?
03:06 preaction i am looking for a mockup tool, the best ones i've seen are for mac. i build web apps and web sites
03:06 preaction the Xcode command line tools. apple's compiler
03:06 bpmedley preaction: What UI should the mockup tool support?
03:07 preaction what do you mean ui?
03:07 preaction web.. stuff
03:07 sri nicomen: "xcode-select --install"
03:07 bpmedley Any particular web framework?  Such as Bootstrap?
03:07 nicomen preaction: I almost always end up with paper, fastest ;) but there are some flash based ones aren't there? balsamiq?
03:07 sri nicomen: you run that to install only the command line tools from xcode
03:07 preaction it doesn't largely matter, but i suspect bootstrap widget set would improve my efficiency
03:08 sri compilers and stuff
03:08 nicomen sri: yes, but what are those command line tools? like gcc?
03:08 preaction nicomen: i can't give paper to other people. and even the functional mock i built (an actual webapp, with fake data, but you could click around and visit the different states) confused the hell out of people...
03:09 preaction the point is moot because we don't have any dev process at all, so mockups for the sake of scope lockdown and approval aren't going to happen
03:09 nicomen preaction: me neither, so I take pictures of it, but did you check out balsamiq?
03:09 bpmedley preaction: http://www.bootply.com/ <— Tried something like this?
03:09 preaction i work in a bank, i'm extremely limited in what i can do. taking pichars and uploading them via usb stick, not gonna work
03:09 sri preaction: heard good things about balsamiq
03:10 preaction bpmedley: with that, i may as well just write the html myself.
03:10 sri although, as a hobby design person, i like Sketch
03:10 preaction i like the ones that don't look real, so that people don't get ideas about how the real thing will look
03:10 nicomen as a hobby design person, i like Inkscape
03:10 bpmedley I assume some online editors are better than others; just curious if you’ve tried any online editor.
03:10 sri preaction: http://balsamiq.com/products/mockups/
03:11 nicomen preaction: that's a good point actually
03:12 nicomen maybe hat you need is a polyfill/stylesheet to make your functional mock data webapp look like a mock :-)
03:12 preaction bpmedley: nope. just went at it with vim and made a mock data service with angular, which was almost api-compatible with the real data service i ended up making. which was nice. no time wasted ;)
03:12 preaction ooh, i like that idea ;)
03:12 sri long long time ago i also used omnigraffle
03:12 preaction yeah, at my last job that's what i used, omnigraffle
03:12 preaction and their YUI widget stencil
03:12 nicomen preaction: with a "implement by magic" button :-)
03:12 * preaction shudders at the remembrance of YUI
03:15 sri nicomen: actually not gcc, only clang now
03:18 jberger_ hmmm, there is a Dancer Advent Calendar and a Catalyst one too
03:19 akhasanov joined #mojo
03:19 sri don't even think about it
03:19 sri you still owe me a guide!
03:19 jberger_ blast, I do at that
03:20 jberger_ after the recent discussions about why tutorials about scrapers and spiders are a bad idea, now I'm not sure what to use for the examples
03:21 godenji joined #mojo
03:22 sri "real" spiders are a bad idea, but i don't think that means we can't have spidering hacks
03:22 sri in fact, the docs contain quite a few "scrape the headlines from that news site" examples
03:22 preaction i wasn't privy to those discussions, but could you demonstrate a UA that checks that all my href="" and src="" go to valid URLs?
03:22 * jberger_ was oddly pleased to hear that my my spider was an effective load test for mobygames :-P
03:23 preaction there's lots of reasons i would want to use UA to "spider" my own site
03:23 jberger_ preaction, not a bad idea
03:23 noganex joined #mojo
03:23 sri just keep it small and simple, call it for intranet use only or whatever ;p
03:23 preaction and probably explain _why_ it's for intranet use, to drive home (or belabor) the point
03:24 sri and remember the 20 line rule :)
03:25 preaction yeah, implementing some of the Google PageSpeed or Y!Slow stuff might be a good demonstration
03:25 sri well... shit... actually the biggest example in the growing guide is 88 lines long :o
03:25 sri but don't have more than one of those :)
03:26 preaction so, 25 lines ;)
03:27 jberger_ sri: I wasn't going to mention that, but I was rather sure that there were a few longish ones
03:27 sri i wouldn't vote +1 on this one again ;p http://mojolicio.us/perldoc/Mojolicious/Guides/Growing#Final-prototype
03:28 sri i don't think there's more really big ones
03:28 godenji hello, may I ask a question that's more perl-related than Mojo-related?
03:28 jberger_ sri: that is a good example
03:28 sri godenji: you can try
03:29 jberger_ sri: I think people generally want something that is at least somewhat real-world
03:29 * jberger_ throws sigils as godenji
03:29 sri jberger_: i guess it works if you slowly build up to it, and don't have too many huge examples
03:29 godenji is there a way to selectively inherit from another module, i.e. use parent 'OtherModule' but only get subs 'foo' and 'bar' from it, not 'baz'
03:30 godenji I am aware of Exporter of course, I'm just curious
03:30 sri that's not inheritance, you might like roles
03:31 godenji with roles I'd have to modify both classes
03:31 sri Role::Tiny/Moose::Role
03:31 jberger_ sri: the important bits of URLQueue are only about 50 lines
03:31 preaction Package::Stash, and douse yourself in bleach afterwards
03:31 jberger_ the process callback itself could then do anything (and be discussed separately)
03:31 godenji is there a role interface built into Mojo?
03:32 * jberger_ lights preaction on fire (easily)
03:32 sri nope, we've had no need for roles yet
03:32 jberger_ godenji: I suspect Role::Tiny would work with Mojo::Base
03:32 godenji thanks for the tip about Role::Tiny sri, I'll try it next time I build something up
03:32 jberger_ though admittedly I haven't tried
03:32 godenji but this time I think I'll make do with Exporter and pass $self around
03:33 preaction if you only want certain subs, manipulate the package stash yourself
03:33 godenji people don't want me to change the code TOO much here cause some coders don't understand modern perl
03:33 preaction Package::Stash is a module that does it, but you don't _need_ it
03:33 preaction go nuts! live a little!
03:33 preaction explain to them it's the price they pay for not letting you use modern perl practices
03:33 godenji oh I do use them, in MY modules.
03:33 sri Mojo::Util::monkey_patch 'SomeTargetClass', 'foo', SomeSourceClass->can('foo');
03:34 sri ;p
03:34 sri NO, i do not really recommend that
03:34 jberger_ sri: that is essentially all stash manipulation is though
03:34 godenji OMG there IS a monkey patch util?
03:34 preaction and i don't recommend what i've advocating. but don't contort your classes with Exporter
03:35 jberger_ godenji: preaction is right, just because you can doesn't mean you SHOULD
03:35 godenji jberger_: I got called out for slicing a hash reference
03:35 godenji the guy claimed he didn't understand what that syntax did
03:36 * jberger_ jaw drops
03:36 sri there's also SomeTargetClass->new->SomeSourceClass::foo()
03:36 jberger_ godenji: hand him a copy of any reasonable Perl book and carry on
03:36 godenji but.... but.... I had commented it!
03:37 jberger_ godenji: no I'm agreeing with you
03:37 godenji sri: I WILL use that Util::monkey_patch next time I need to override the ORM to migrate to a different table schema.
03:37 jberger_ godenji: don't tell sri that!
03:37 jberger_ what are you crazy!?!
03:37 sri DON'T TELL ME THAT
03:38 godenji LOL
03:38 * jberger_ strikes the irc log
03:38 * preaction strikes himself with amnesia
03:38 * jberger_ strikes marcus with a comedic mallet
03:38 godenji last time I whipped up a scoped local and rewrote the ORM package method, and commented with "THIS IS DANGEROUS, BUT IT WORK."
03:39 godenji *s
03:39 godenji I was called out for that too, but they believed me and didn't dare question what it did and why.
03:39 godenji rolled into production smo~oth as butter.
03:40 mst sri: hopewfully my description was ok
03:49 Eke- joined #mojo
03:51 jberger_ joined #mojo
03:53 sri mst: what did you do this time? :o
03:54 nicomen godenji: sure it doesn't suffice with a helper or three?
03:54 sri thoughts? https://github.com/kraih/mojo/issues/712
03:57 godenji actually what has changed, besides the name?
03:58 godenji nicomen: it was a temporary solution, eventually we rolled it out when data became obsolete enough
04:10 sri mst: the blog post? it's all happy and positive, are you allright? :)
04:19 jberger_ joined #mojo
04:41 akhasanov joined #mojo
04:43 jberger_ mst++
04:44 jberger_ I noticed the other day that purl counts mst over rjbs in karma
04:44 jberger_ the world done gone crazy
04:45 nicomen where is this happy blogpost anywya?
04:46 jberger_ nicomen: http://shadow.cat/blog/matt-s-trout/mstpan-1/
04:51 nicomen ahaha, nice ;)
04:53 rem_lex| joined #mojo
05:22 franzkafka holy shit mst, that post about your mother is some heartfelt stuff.
05:22 franzkafka She sounds like she was an incredible person.
05:27 Grinnz sri, my thought on that issue is, for consistency it should be there, and i don't see a reason why not to put it there
05:28 Grinnz not much reason why to put it there either, but you have the param one ;)
05:34 Grinnz mst, you forgot FCGI!!!11!!
05:37 sri Grinnz: NOTHING IS FREE!
05:38 cfedde joined #mojo
05:38 Grinnz yes, well if i was worried about the performance impact of one more alias existing, i'd be writing C :P
05:40 Grinnz (and i am very glad i'm not anymore)
05:41 Grinnz when i started at my current job, it was using primarily C code... as a CGI web app...
05:45 Grinnz aside from the consistency thing, i think having param or every_param available in the template at all is silly... but that's me ;)
05:48 Grinnz or perhaps more precisely, i think USING them in a template is silly
05:48 Grinnz which now that i reread nicomen's comment is i think what he was saying
06:08 Zx3 joined #mojo
06:44 Adurah joined #mojo
06:49 zivester joined #mojo
06:52 punter joined #mojo
06:59 dp_ joined #mojo
07:10 dod joined #mojo
07:17 doby joined #mojo
07:31 oetiker joined #mojo
07:41 Eke- joined #mojo
07:44 neyasov joined #mojo
07:48 basiliscos joined #mojo
07:50 zivester joined #mojo
07:56 marty joined #mojo
08:04 dod joined #mojo
08:07 eseyman joined #mojo
08:07 sivoais_ joined #mojo
08:08 cfedde joined #mojo
08:09 ssm joined #mojo
08:20 sugar joined #mojo
08:22 trone joined #mojo
08:24 Vandal joined #mojo
08:25 sugar_ joined #mojo
08:31 ver joined #mojo
08:49 sugar__ joined #mojo
09:09 dod joined #mojo
09:26 neyasov joined #mojo
09:33 sugar joined #mojo
09:36 aleksey joined #mojo
09:59 klapperl_ joined #mojo
10:05 amon joined #mojo
10:06 fhelmberger joined #mojo
10:11 klapperl joined #mojo
10:22 apl joined #mojo
10:33 doby joined #mojo
10:45 denis_boyun joined #mojo
11:06 klapperl_ joined #mojo
11:23 McA joined #mojo
11:41 sugar_ joined #mojo
12:18 absolut_todd joined #mojo
12:56 absolut_todd joined #mojo
13:18 ignacio_ joined #mojo
13:27 sugar__ joined #mojo
13:35 McA Is there a way in Mojolicious to make an internal redirect. I mean handing process over to a controller as if this was the controller originally addressed from outside?
13:37 lb my $bool = $c->render(controller => 'foo', action => 'bar');
13:38 lb (btw, the "my $bool" from the Mojolicious::Controller doc is a lie)
13:43 apl is it currently possible to run minion workers as "daemons" without resorting to screen/tmux?
13:49 bpmedley apl: I’ve used Upstart for this.
13:51 McA lb: Was this the answer to my question? If yes, thank you.
13:52 lb yes
13:53 apl bpmedley: haven't thought about that. thanks.
13:54 apl a real daemon would be nicht, tho
13:55 mattastrophe joined #mojo
14:05 sugar joined #mojo
14:19 Adura joined #mojo
14:27 sri lb: it's not
14:28 Adura joined #mojo
14:29 Adurah joined #mojo
14:30 lb it's 1, '', undef or an object
14:30 asarch joined #mojo
14:30 tbushell joined #mojo
14:31 batman lb: what do you mean?
14:31 lb the return value of render is either a boolean, undef or a Mojo::ByteStream
14:32 lb the boolean is always true too as far as i can see, since rendered returns $self
14:32 sri undef or bytestream only with private arguments a user doesn't know about
14:32 * lb thought the whole thing was pretty confusing, when trying to find out what the boolean signified
14:32 sri and the boolean is not always true
14:33 lb M::C::rendered always returns $self
14:35 lb even then, it'd be nice if docs said what the bool is supposed to mean :)
14:40 good_news_everyon joined #mojo
14:40 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/m734lQ
14:40 good_news_everyon mojo/master 336b4e5 Sebastian Riedel: mention that render can also call the reply->not_found helper
14:40 good_news_everyon left #mojo
14:40 zivester joined #mojo
14:42 good_news_everyon joined #mojo
14:42 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Jwj7Aw
14:42 good_news_everyon mojo/master 6e9228a Sebastian Riedel: fixed typo in description
14:42 good_news_everyon left #mojo
14:49 punter joined #mojo
14:52 neilhwatson joined #mojo
14:55 d4rkie joined #mojo
15:01 D4RK-PH0ENiX joined #mojo
15:07 stephan48 joined #mojo
15:24 meshl joined #mojo
15:26 mgrimes joined #mojo
15:28 sh4 joined #mojo
15:32 ua joined #mojo
15:43 marty joined #mojo
15:46 tbushell left #mojo
15:49 arthas joined #mojo
15:51 marty joined #mojo
16:13 jkramer I just tried to update Mojolicious and plenty of tests fail with this error: Undefined subroutine &Sub::Util::set_subname called at /root/.cpan/build/Mojolicious-5.67-kWxlcf/blib/lib/Mojo/Util.pm line 127
16:14 sri can you nopaste the entire make test results?
16:15 jkramer Sure, one minute please
16:18 jkramer http://dpaste.com/0X8BYE5
16:20 sri what happens if you run perl -MSub::Util -E1
16:21 jkramer Nothing.
16:21 purl i heard nothing was locked down
16:21 jkramer perl -MSub::Util -E1; echo $?
16:21 jkramer 0
16:21 Grinnz_ sri: maybe old version of Sub::Util?
16:21 jkramer Nope, already checked
16:22 sri there is no version of Sub::Util without that function i believe
16:22 jkramer Sub::Util is up to date. (1.41)
16:22 sri https://metacpan.org/pod/Sub::Util#set_subname
16:22 sri it should be there
16:23 sri did you force install a broken build or so?
16:24 jkramer Could have happened some time in the past, but I don't remember anything specific
16:24 Grinnz_ check the actual Sub/Util.pm you have?
16:24 sri cpanm --reinstall Sub::Util
16:24 jberger_ joined #mojo
16:26 jkramer Worked fine, no errors/failed tests. I'll retry updating mojo
16:27 Grinnz_ jkramer: what version of perl?
16:28 Grinnz_ wait i see it, 5.16.3
16:29 jberger_ sri: I had that once too
16:29 sri next one-liner to run would be perl -MCarp=croak -MSub::Util -E 'my $foo = sub { croak }; Sub::Util::set_subname "bar", $foo; $foo->()'
16:29 jberger_ I did a force reinstall of Mojolicious and everything worked
16:29 Grinnz_ but the tests still failed?
16:30 jberger_ no then everything worked
16:30 Grinnz_ gremlins
16:30 purl somebody said gremlins was a good choice, though I don't have it
16:30 jberger_ its possible that I also built a new perl using perlbrew now that I think of it
16:30 jberger_ <3 perlbrew
16:30 sri ah, so the xs part got messed up
16:31 Grinnz_ oh yeah if its XS that could be
16:32 Grinnz_ could maybe include a check for if that sub is defined
16:32 Grinnz_ then again... its more sub::util's problem
16:33 jkramer Ok, now it worked :)
16:33 neyasov joined #mojo
16:33 sri yea, so it was the xs part getting messed up
16:33 jkramer Guess something was wrong with Sub::UTil after all, although I looked into it and set_subname was there
16:33 sri you prolly updated perl without cleaning up old xs modules
16:33 jkramer Probably. Thanks anyway
16:34 jkramer That entirely possible, I don't usually check what my system update updates :)
16:35 sri doesn't help if we detect it or not, you really messed up your system and things would fail in very surprising ways no matter what
16:35 sri it's actually not a bad error
16:35 sri could have been so much worse
16:35 Grinnz_ the perils of XS...
16:36 * sri sets jkramer on fire
16:37 sri you should open a ticket though
16:37 sri http://api.metacpan.org/source/PEVANS/Scalar-List-Utils-1.41/lib/Scalar/Util.pm
16:37 nicomen 6how can XS mess this up?
16:37 sri weaken and isweak have special exceptions if the xs part can't be compiled
16:37 nicomen isn't XS code put in separate dirs per perl version?
16:37 sri there is some inconsistency
16:39 Grinnz_ yeah a lot of XS modules will check if the XS subs loaded properly, and if not, they load PP versions
16:49 irq joined #mojo
16:55 hernan604 joined #mojo
17:21 franzkafka Hey all, are there any good arguments to use Mojolicious over Node.js?
17:22 franzkafka I'm on this project that is just starting, and it's a democracy, and they want to use Node.js, but I'd rather use Mojolicious. I just don't know enough about Node.js to argue against it. I said, "Mojolicious is non-blocking and supports Websockets." and the reply was "Same with Node.js."
17:22 bc547 franzkafka: do you want perl (mojo) or javascript (node.js)?
17:23 franzkafka I really, really want to get them to use Mojolicious though, because that'd be 5 more developers learning it, realizing Perl is awesome, and so on.
17:23 franzkafka ok, so other than language preference, there's nothing? Dang.
17:23 franzkafka I was thinking maybe Node.js is slower, or has some other deficiency :D
17:24 franzkafka Or it's fake BS server-side, whereas Mojolicious is truly server-side. I dunno, something.
17:24 crab cpanm will make you see happy unicorns and rainbows, and npm will make you cry and have bad dreams.
17:24 franzkafka ok, that's actually a really good point.
17:24 franzkafka I'm writing the email now. I will throw that in there. I think the CPAN is a very good reason  actually.
17:25 Grinnz_ that is true
17:25 Grinnz_ but the difference in language is probably the biggest reason, if everyone is already very comfortable in javascript it's going to be hard to convince them otherwise
17:27 crab if it's a democracy you don't have to convince them, just speak louder than they do. ;-)
17:27 franzkafka They all basically look down their noses at Perl is the biggest thing, and that's the biggest reason I really care. I don't mind writing in JS, but I want to open their eyes so to speak.
17:27 franzkafka crab, my email will be in all CAPS :D
17:27 Grinnz_ lol
17:28 franzkafka I did write a crawler in Mojolicious that they were pretty impressed with, because it's a lot faster and works better than the Scrapy crawler they had.
17:28 Grinnz_ franzkafka: well it sounds like it will be an uphill battle :/ all i can suggest is to show the power with mockups and show how CPAN can be useful
17:28 franzkafka But this project has funding from Sony, Microsoft, Nintendo, Amazon, etc... so it'd be really cool to say, "This is powered by Mojolicious."
17:29 franzkafka I think what I am going to do is just do a mockup in Mojolicious and present that. I don't think there is really an argument against Node.js other than the language. But I find Mojolicious to be easier (imo) to quickly get something done.
17:30 franzkafka I kind of hate everything about this project. Node.js, Nosql, and every other buzzword I can think of, we are using.
17:30 Grinnz_ lol
17:31 franzkafka I want PostgreSQL too, but that one was shot down already.
17:31 sugar_ joined #mojo
17:31 Grinnz_ thats a harder sell
17:31 Grinnz_ when someone is set on nosql...
17:31 franzkafka I will say though that the database is pretty cool. You guys ever hear of Orchestrate?
17:32 Grinnz_ i havent used any nosql
17:32 franzkafka That's what we're using. Everything is done through Curl (or in my case Mojo::UserAgent).
17:32 franzkafka nosql is kinda weird to me, because relationships are different, there's really no such thing as normalization, etc... It's pretty neat actually, but I still prefer SQL databases like PostgreSQL.
17:33 franzkafka I will say that they were really impressed with DBIx::Class too. Look, no SQL! They liked that.
17:35 franzkafka I'm just going to say it, I love Perl.
17:36 franzkafka It's funny, I hear people say, "If you only use one language, you're not a real programmer." But since I started using Perl, I haven't found the need for any other language.
17:36 crab someone recently wrote a program that exposes a postgresql table through a REST interface. if you set it up right, maybe your colleagues won't know you're using postgresql.
17:36 Grinnz_ heh
17:36 franzkafka crab, do you know the name of it by chance?
17:37 Grinnz_ yeah when I was applying for jobs I thought I could work in any language, but when it comes down to it, I just can't see myself as a C programmer or a java programmer
17:37 Grinnz_ definitely not PHP.
17:37 Grinnz_ python, maybe, i haven't done enough with it to know.
17:38 franzkafka Yeah, I used to work in Java. But everything I can do in Java, I can do in Perl, and get it done a lot faster. Also, Perl has better cross-platform support than Java. Perl accomplished what Java set out to do, "write once, run anywhere."
17:40 franzkafka I got to figure out what the bottleneck is on this script I am running. It loops over a bunch of HTML files on my filesystem, loads them as a Mojo::DOM object and grabs some elements out, then inserts into a SQLite database. It's been running for 3 days now.
17:41 franzkafka Granted, there are 217,000 HTML files in this directory, but something has to be wrong here.
17:42 Grinnz_ sounds like an O(*) problem
17:42 franzkafka The database is 119M at this point, it just doesn't seem like it should take 3 days to build that. I feel like I have my old Compaq pentium 90 again.
17:42 franzkafka Yeah .
17:42 franzkafka I gotta debug this. It's almost not worth it though :D
17:43 jamesaxl joined #mojo
17:49 Ptolemarch joined #mojo
17:59 jberger_ joined #mojo
18:01 sri jberger: your mac goes to sleep a lot
18:03 Grinnz_ maybe it is not getting proper nutrition
18:06 franzkafka Can I get some code review? This is what's been taking 3 days now: http://paste.scsys.co.uk/450170?ln=on&amp;tidy=on&amp;hl=on&amp;submit=Format+it!
18:06 franzkafka Maybe I am doing something wrong.
18:07 jberger_ joined #mojo
18:16 meshl joined #mojo
18:33 batman franzkafka: this is super basic, but maybe you can use this as a REST proxy to your database: https://metacpan.org/release/Cookieville
18:35 denis_boyun joined #mojo
18:35 dod joined #mojo
18:37 Akron joined #mojo
18:40 mattastrophe joined #mojo
18:49 irq joined #mojo
18:51 hernan604 franzkafka: test a minor example...
18:52 hernan604 instead of ~ 200k get 1k
18:52 hernan604 and make the script run
18:52 bobkare joined #mojo
18:52 hernan604 1k shouldnt take much more than couple mins
18:52 sri franzkafka: you might like http://mojolicio.us/perldoc/Mojo/Util#slurp
18:55 sri no idea why you'd be using a delay though, seems rather pointless
18:59 jberger_ sri: it really does!
18:59 jberger_ and I lose the log in that time too then :(
18:59 * jberger_ misses my convos installation
18:59 * jberger_ will open the NAT once he gets home
19:01 jberger_ sri: since we added the helper proxy, is it harder to replace the config helper with something else?
19:01 bobkare joined #mojo
19:01 sri jberger_: if you want to stick with a gui client maybe try znc
19:01 sri jberger_: harder/
19:02 jberger_ sri: that still doesn't prevent loss of connection when the mac goes to sleep
19:02 sri s!/!\?/
19:02 jberger_ convos is a daemon on my home server
19:02 Grinnz_ sri: i didn't like znc, thats why Grinnz is here :D
19:02 sri i like znc+textual for the desktop... it just sucks for mobile
19:03 Grinnz_ i hate CLI clients, but i rather use ssh and weechat than install one locally here
19:03 jberger_ sri: I try $app->helper( config => sub { ... } ), it gives me an error, says "replacing" and then continues to use the old one!
19:03 sri what error?
19:03 purl error is KABOOM!
19:03 Grinnz_ that error
19:03 purl that error is only in interactive mode :(
19:03 Grinnz_ oh
19:04 Grinnz_ is "helper" supposed to work when replacing an existing method?
19:04 Grinnz_ i used it for json once, but thats not technically a method
19:05 sri anyway, this is all too confusing for me
19:05 sri i'm out!
19:08 jberger_ s/error/warning/
19:08 jberger_ mojo eval 'use Scalar::Util qw/refaddr/; say refaddr app->config; app->helper( config => sub {} ); say refaddr app->config'
19:08 jberger_ that one (^^) doesn't even warn
19:08 bobkare joined #mojo
19:09 Eke- joined #mojo
19:10 elik joined #mojo
19:11 Grinnz_ so... what does warn :P
19:12 Grinnz_ jberger_: and regarding znc, your mac would lose connection but ZNC keeps the history and can restore it on reconnect
19:13 Grinnz_ supposedly
19:13 Grinnz_ i havent played with it much
19:13 jberger_ oh, that's what my convos instance does already
19:13 Grinnz_ the znc would be running on a server
19:13 jberger_ I just don't have access to it because its behind my home nat
19:13 Grinnz_ weechat, and a laptop that never sleeps, is good enoguh for me :P
19:14 Grinnz_ jberger_: well forward a port!
19:14 jberger_ will do, but I have to get home first
19:14 Grinnz_ heh
19:18 meshl joined #mojo
19:36 tbushell joined #mojo
19:39 * sri sets jberger_ on fire
19:39 * jberger_ burns
19:39 sri you should know this!
19:39 sri http://mojolicio.us/perldoc/Mojo#config
19:40 * jberger_ commits ritual suicide in shame
19:40 * jberger_ now regrets making an insensitive joke
19:40 sri that'll teach him!
19:42 Grinnz_ lol
19:43 Grinnz_ quick question: under https://metacpan.org/pod/Mojolicious#AUTOLOAD it says "Note that application helpers are always called with a new default controller object...", in this case "application helpers" means "helpers called on the application object" right?
19:43 Grinnz_ and this doesn't apply at all when calling a helper on a controller?
19:44 sri yes
19:44 Grinnz_ (I don't see that note in the Controller AUTOLOAD section but just wanted to make sure)
19:44 Grinnz_ thanks
19:47 marmez joined #mojo
19:47 jberger_ Grinnz_: helpers are always called with a controller instance for consistency
19:47 Grinnz_ i see
19:47 Grinnz_ makes sense
19:47 jberger_ if you do app->my_helper, then one is built for it
19:48 Grinnz_ haven't had an instance where i needed to do that yet :)
19:48 jberger_ happens all the time using the eval command
19:48 jberger_ myapp.pl eval -V 'app->my_helper'
20:07 Grinnz_ looking at https://metacpan.org/pod/Mojolicious::Lite#File-uploads ... is there a way i could set $ENV{MOJO_MAX_MESSAGE_SIZE} for certain actions in a full app? or should i just set it globally
20:07 Grinnz_ (I like the ->is_limit_exceeded method there btw)
20:09 Grinnz_ i see that there's a max_message_size attribute of Mojo::Message, but I don't know how to effectively use that
20:09 Grinnz_ when i have the Mojo::Message it's already been uploaded
20:19 sri Grinnz_: http://mojolicio.us/perldoc/Mojolicious#after_build_tx
20:19 sri you have to hook into the transaction and use events to increase the limit after receiving the headers
20:19 Grinnz_ ahh
20:20 sri since, we don't know which action will handle a request before receiving the request ;p
20:20 Grinnz_ right
20:20 sri there's a rather advanced example in the cookbook http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Streaming-multipart-uploads
20:21 sri you want this one though http://mojolicio.us/perldoc/Mojo/Content#body
20:22 zackiv31 joined #mojo
20:22 sri this is where things get advanced though
20:23 Grinnz_ hmm, never looked at this page before :)
20:24 Grinnz_ i think maybe i'll just set it globally, we're not doing anything drastic, haha
20:33 sri this is fun, 10 minutes of profiling Mojo::DOM::CSS and i've more than doubled the performance :o
20:34 sri i kept saying there were still quite a few low hanging fruits
20:36 sri 100 ->find("h1, h2 a, h3 div") calls on http://mojolicio.us went from 0.53s to 0.19s
20:38 Grinnz_ nice
20:38 Grinnz_ profiling can be fun with the right tools
20:38 sri <3 Devel::NYTProf
20:46 good_news_everyon joined #mojo
20:46 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/kWxltw
20:46 good_news_everyon mojo/master 818bae8 Sebastian Riedel: improved Mojo::DOM::CSS performance significantly
20:46 good_news_everyon left #mojo
20:47 franzkafka YEEE! Higher Order Perl, Modern Perl 2014, and the first season of Full Metal Alchemist just came today, and maybe my Mojolicious shirt will show up too
20:48 franzkafka Kid on Christmas. I even took a nap so it felt like Santa dropped the box at my door when I woke up.
20:48 sri it's a combination of 3 optimizations, 1) precompile the tag regex, 2) optimize out the * selector, and 3) do not copy and modify the list of combinators over and over
20:48 sri franzkafka: \o/
20:50 franzkafka sri, I took the delay out, and I'm using slurp. Already seems a lot faster. Thanks!
20:50 franzkafka Have a good day all. I am heading out for some ramen.
20:50 franzkafka (the icing on the cake of this day.)
20:50 sri you'll like the next release, when Mojo::DOM gets a lot faster too
20:59 sugar__ joined #mojo
21:00 franzkafka sri, it will be twice as fast it seems ;)
21:00 Grinnz_ hmm. hypnotoad hot deployment doesn't seem to be able to change the mode via MOJO_MODE (but that works for setting the initial mode)
21:00 franzkafka sri, I'm already looking forward to it. Release it Dec. 25th.
21:00 franzkafka Even if you get it done sooner. Be Santa.
21:00 Grinnz_ lol
21:01 sri 23 days without a release?! :O
21:01 franzkafka batman, thanks for the link! I'm going to check it out when I get home tonight.
21:01 sri btw. in germany we give presents on dec 24
21:03 sri re javascript vs perl, once jit kicks in javascript has the potential to be a lot faster, but performance can be quite inconsistent due to warmup phases and garbage collection pauses
21:03 sri perl on the other hand is very consistent
21:04 sri something i don't see highlighted very often
21:04 Grinnz_ they are both easy languages to screw up in :)
21:05 sri ref counting can be a bit annoying with non-blocking perl, but the resulting performance and memeory usage is super predictable
21:05 sri no surprises
21:05 Grinnz_ hmm, setting MOJO_LOG_LEVEL on a hot deployment doesn't seem to affect hypnotoad either
21:06 Grinnz_ guess its just no environment vars will affect the running server?
21:06 sri hypnotoad only sends a signal to the real server on hot deploy
21:06 Grinnz_ ahh
21:06 sri which then starts the fork+exec dance
21:07 Grinnz_ so i guess no changing via command line for me :)
21:09 sri odd to see mjd talk about morgan kaufmann so positively... i can't help but think of them as this evil entity they call elsevier http://blog.plover.com/2014/12/01/
21:17 Grinnz_ i'm already setting up my own logger in startup, so ill just set log_level there from config if its set... all i really need is a way to turn on debug logging in production
21:17 crab why do you set your own logger in startup?
21:18 Grinnz_ to set the path for the log file
21:18 Grinnz_ its still a Mojo::Log
21:19 Akron Oh - Mojo::DOM improvements! \o/
21:19 Grinnz_ hmm, if i just set $self->log->path($log_file) would that suffice? rather than create a new one
21:21 Grinnz_ looks ok so far..
21:25 crab yes, it would
21:25 crab there is now nearly no good reason to set a different logger
21:27 Grinnz_ gotcha. maybe an example (in Mojolicious::Lite? i don't know where startup examples should go) of setting the log path?
21:28 Grinnz_ Mojolicious::Lite has a lot of the "startup" examples but it seems weird to look there for a non-lite app
21:31 Grinnz_ if i'm not using any non-blocking operations so far, there's no reason to use "clients" higher than 1 for hypnotoad, right?
21:32 * Grinnz_ is actually getting this app set up for real, hence all the questions :)
21:33 neyasov joined #mojo
21:33 good_news_everyon joined #mojo
21:33 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/8rJCxA
21:33 good_news_everyon mojo/master bbe375e Sebastian Riedel: compile equations in advance
21:33 good_news_everyon left #mojo
21:39 marty joined #mojo
21:40 jberger_ joined #mojo
21:54 Ptolemarch joined #mojo
21:54 sri interesting, apparently it costs $30,000 to be able to participate in the development of javascript
21:54 Grinnz_ lol
21:55 Grinnz_ well, it is a language that gets deployed to all major browsers...
21:55 Grinnz_ and i guess this node.js thing is nice too
22:24 Averna joined #mojo
22:36 jberger_ sri++ # DOM improvements
22:52 sri so node.js is dead now i guess https://github.com/iojs/io.js
22:53 sri franzkafka: that might be a good argument :)
22:53 sri the node community is now fragmented
23:05 Grinnz_ Œheh
23:05 Grinnz_ ... how did that get there
23:05 sri http://nodeforward.org/
23:06 sri lots of node core devs switched
23:08 Adurah The return of gendered pronouns.
23:24 denis_boyun joined #mojo
23:26 meshl joined #mojo
23:28 tbushell joined #mojo
23:40 Ptolemar_ joined #mojo

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