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

IRC log for #mojo, 2014-06-10

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

All times shown according to UTC.

Time Nick Message
00:00 sri jberger: i've thought about it, also something for json, but i always end up not liking it
00:01 jberger it seems like an obvious thing
00:06 jberger sri: I wonder if bytestream could have an introspection method to see if perl's utf8 flash is set
00:07 sri very much -1
00:07 jberger s/flash/flag/
00:07 sri i really don't want anyone to touch the flag, it's an implementation detail of perl
00:07 jberger it would help us explain decoding
00:08 jberger read only
00:08 sri i doubt that actually
00:08 jberger "is the utf8 flash true? No? Then you haven't decoded"
00:09 jberger damn you swipe type!
00:09 sri you just shouldn't ever check the flag
00:09 jberger I'm just curious, what is the harm?
00:10 jberger I find devel peek's flag state useful sometimes
00:10 jberger That is my model here
00:10 jberger or data printer
00:11 jberger (I think ddp has it)
00:11 sri http://blogs.perl.org/users/aristotle/2011/08/utf8-flag.html
00:11 sri summary: stay the fuck away from the flag
00:12 shmuel joined #mojo
00:13 jberger http://stackoverflow.com/questions/15170982/what-the-heck-is-a-perl-string-anyway/15171350#15171350
00:13 * jberger reads
00:16 * sri waits for the "oh shit!"
00:16 jberger an interesting read, thanks
00:16 jberger and ... oh shit!
00:19 jberger ok well I drop that one :-)
00:19 jberger I do still like the dom and json methods, in concept at least
00:24 good_news_everyon joined #mojo
00:24 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/tQRDpw
00:24 good_news_everyon mojo/master 9045913 Sebastian Riedel: make renderer example a little more specific
00:24 good_news_everyon left #mojo
00:50 fitnerd joined #mojo
00:54 fitnerd I am having a very strange problem with a Mojo::Lite app and hypnotoad.  The app works fine on a single instance via morbo or hypnotoad.  However, I am launching this app via ssh to many servers and when I do that, I receive some strange behavior in sub DESTROY.  I can manually launch hypnotoad on the servers and there is never a problem, but when they are launched via ssh (with the same exact command line), I will sometimes get this behavior:
00:54 fitnerd http://scsys.co.uk:8002/391992
00:56 sri what is $self?
00:56 purl $self is not the action
00:56 * sri pats purl
00:56 * purl stabs
00:57 jberger_ joined #mojo
00:57 fitnerd sorry, can you clarify that for me?  I thought $self was my app object
00:57 sri jberger: your evil twin is back
00:57 fitnerd which has a $self->{dbh} reference to a DBI::db
00:58 jberger_ fitnerd: any problem with daemon?
00:58 sri wait a minute, you have sub DESTROY {} in the actual lite app?
00:58 jberger_ No it's me, out and about
00:58 fitnerd jberger_: not that I know of.  It seems to work with no problem if I launch hypnotoad on the machine itself
00:58 fitnerd it's only when launched via ssh that it goes wonky
00:59 fitnerd yes sri, I do
00:59 jberger_ Try daemon over ssh
00:59 fitnerd sorry I don't understand what you mean
00:59 sri fitnerd: it's not a class, you can't have a DESTROY there
01:00 jberger_ And I expect sri is going to have ... let's say comments ;-)
01:00 * jberger_ vanishes
01:00 fitnerd sri:hmm ok.. what would be the proper way to clean up any db connections?
01:00 sri i already talked with him about it in #perl... and think i might not be able to help much
01:01 fitnerd sri: well this is kinda legacy left over from FCGI days
01:01 fitnerd so if it's not the right way, I'm fine with dropping the DESTROY sub
01:01 fitnerd i just didn't want to litter dbi connections
01:02 sri you're supposed to use model classes or full apps once you have the need for that
01:02 sri how would you litter dbi connections if the process goes down anyway?
01:02 fitnerd well it used to keep postgres connections open if the process went away
01:03 sri that sounds impossible
01:03 sri like against the laws of nature
01:04 sri zombie connections
01:04 fitnerd hmm
01:04 fitnerd so you think it's not necessary to disconnect() a handle?
01:05 fitnerd that would make my life easier if that's true
01:05 fitnerd this is code that was morphed from old mod_perl stuff years ago
01:06 fitnerd and that was a remnant of such
01:07 Averna joined #mojo
01:07 fitnerd back in the day we would run out of pg connections because mod_perl was not releasing them
01:08 davido_ joined #mojo
01:10 sri forget mod_perl, we have proper servers
01:10 purl sri, I didn't have anything matching mod_perl, we have proper servers
01:10 * sri kicks purl
01:10 * purl bites sri!
01:10 fitnerd hehe yeah well I did happily forget it
01:11 fitnerd and this had been working for a couple years now without issue.. very strange
01:11 fitnerd anyway I dropped teh sub DESTROY completely, now onto another weird problem
01:11 fitnerd thx
01:15 fitnerd is there a way to capture STDERR?
01:15 fitnerd so hard to not be able to use warns
01:17 sri $SIG{__WARN__} = sub { app->log->error(@_) }
01:18 fitnerd and __DIE__ the same?
01:29 * jberger punts sri
01:29 * jberger spikes purl
01:29 * jberger does end-zone dance
01:32 klapperl joined #mojo
01:40 laouji joined #mojo
01:41 crab end-zone dance?
01:46 jberger http://gridirongrit.com/wp-content/uploads/2013/10/Best-NFL-Week-6-GIFs-Detroit-Lions-TE-Joseph-Fauria-TD-Celebration.gif
01:47 crab poor dark-blue pants guys. they just stand disconsolately around.
01:47 * jberger apologizes to all those people on convos
01:48 crab what did you do to them?
01:53 jberger punt: https://independentphilly.files.wordpress.com/2011/09/penn-state-punting-gif.gif?w=474
01:54 jberger spike: http://kevishere.files.wordpress.com/2012/10/gronk-smash.gif
01:55 jberger No real reason
02:55 dj_goku joined #mojo
02:55 laouji joined #mojo
03:12 sri still no alternative backend for minion yet :/
03:19 dj_goku joined #mojo
03:22 jberger oh shoot, I forgot about that
03:23 jberger my mind has been preoccupied with blocking connect for mojo pg
03:43 * tempire is immersed in getting his iphone app apple-approved
03:44 * tempire hasn't forgotten
03:47 basic6 joined #mojo
03:50 jberger tempire: have you tried wearing a turtleneck?
04:13 Eke- joined #mojo
04:26 rem_lex joined #mojo
04:28 kyshtynbai joined #mojo
04:39 kyshtynbai Hi everyone! Let's say I have a helper, which returns a list of directories in some directory. I'd like to use this list to generate drop-down css-based menu. This menu is described in "header.html.ep", which is included into "main.html.ep", which is a layout, a skeleton for all other pages. The quesyion is: how do I send arraref to the header.html.ep ?
04:41 laouji joined #mojo
05:01 dvinciguerra joined #mojo
05:30 jnbek joined #mojo
05:43 denis_boyun joined #mojo
05:51 laouji joined #mojo
05:51 ua_ joined #mojo
05:56 Eke- joined #mojo
05:57 jnbek joined #mojo
06:36 ua_ joined #mojo
06:36 denis_boyun joined #mojo
06:39 shmuel kyshtynbai: you use the helper in header.html.ep, and a for loop, and render your menu.
06:39 Vandal joined #mojo
06:44 kyshtynbai shmuel: I don't totally get it: can I call the helper from template?
06:44 shmuel yes.
06:45 kyshtynbai Thanks! That is cool.
06:45 shmuel as if they were a normal function
06:46 shmuel have fun.
06:46 kyshtynbai I shall).
06:47 dod joined #mojo
06:55 eseyman joined #mojo
07:02 rawler joined #mojo
07:07 nicomen joined #mojo
07:09 denis_boyun_ joined #mojo
07:10 Jonneh joined #mojo
07:23 trone joined #mojo
07:31 dpetrov_ joined #mojo
07:33 basiliscos joined #mojo
08:01 denis_boyun joined #mojo
08:03 fhelmber_ joined #mojo
08:05 laouji joined #mojo
08:10 laouji joined #mojo
08:20 laouji joined #mojo
08:28 laouji joined #mojo
08:31 Feinorgh batman: I never got Mojo::Redis to work outside of a websocket controller, Mojo::Redis->new never gave be a connected redis object, despite calling ->connect() or anything on it, ->connected() was always false. it worked with the CPAN Redis module though, only Redis->new->publish needed (in a Mojolicious helper)
08:32 Feinorgh s/be/me/
08:44 edestler joined #mojo
08:51 edestler joined #mojo
08:51 mire joined #mojo
09:09 batman Feinorgh: right. it's a scoping issue, but you're welcome to use any module you want
09:11 kyshtynb1 joined #mojo
09:13 kyshtynb2 joined #mojo
09:14 Feinorgh batman: yeah, i couldn't grasp why it would be a scoping issue though, but that's likely more due to my ignorance than anything else :-)
09:19 batman yes, i believe it is. it's working for 20 million requests every day for me.
09:19 sugar joined #mojo
09:19 batman did you under stand the example code i pasted?
09:19 * batman need to get some lunch *bbl*
09:33 Feinorgh batman: i must have missed the URL to the example code if you pasted it here
09:41 da5id joined #mojo
09:41 denis_boyun joined #mojo
09:45 hesperaux_ joined #mojo
09:45 Dandre Hello,
09:46 Dandre I am using Test::Mojo. How can I se the username and password to be used for all my get post and put tests?
09:47 Feinorgh batman: http://pastebin.com/vLf21hY6
09:52 hesperaux joined #mojo
09:53 Feinorgh Dandre: "set" or "see"?
09:53 Dandre sorry, set
09:54 Feinorgh Dandre: http://mojolicio.us/perldoc/Test/Mojo#ua ($t->ua->server->url->userinfo('...') )
09:58 Dandre I must put this line before my $t->get_ok ... block?
10:01 batman Dandre: you can also do $t->ua->on(start => sub { my $tx = shift; $tx->req->url->userinfo(...); });
10:02 batman Feinorgh: which version of Mojo::Redis do you have?
10:03 batman Feinorgh: that example should work... i don't see anything wrong with it. could you run it with MOJO_REDIS_DEBUG=1 ?
10:34 alnewkirk joined #mojo
10:36 batman Feinorgh: http://pastebin.com/vLf21hY6 <-- the things that didn't work is because of scoping.
10:36 batman the object goes out of scope before the data gets sent to the redis server.
10:45 laouji joined #mojo
10:50 Akron joined #mojo
11:01 ver joined #mojo
11:01 laouji joined #mojo
11:04 D4RK-PH0ENiX joined #mojo
11:07 meshl joined #mojo
11:10 odc why doesn't mojolicious support password protected SSL keys? i'm reading on stackoverflow that jberger opened a bug for this?
11:12 Feinorgh batman: 0.9928
11:12 Feinorgh batman: checking with MOJO_REDIS_DEBUG now
11:12 Feinorgh batman: ah, ok
11:13 fhelmber_ joined #mojo
11:13 Feinorgh batman: so in principle i could return the redis object, and do stuff with it in the caller instead?
11:15 batman yes. but i would rather do $c->stash->{redis} = $redis;
11:16 Feinorgh right, i'll give that a go, thanks for the suggestions :-)
11:18 neilhwatson joined #mojo
11:19 batman also, make sure the callback is called before responding to the client
11:20 batman $c->stash->{redis} = Mojo::Redis->new; $c->stash->{redis}->publish(foo => 123); $c->render; # will probably not work.
11:20 batman or at least will not work sometimes
11:20 Feinorgh batman: aye, it always is, i made sure render and respond_to is always called last in each sub
11:21 Feinorgh although i tried using $redis->connect and it was a little weird that $redis->connected never returned true
11:24 fhelmber_ joined #mojo
11:30 D4RK-PH0ENiX joined #mojo
11:36 batman that's because you think blocking, while everything with Mojo::Redis is non-blocking
11:36 batman "last in each sub" is not good enough.
11:36 batman mojo-redis-- # bad design :(
11:37 batman Feinorgh: connect() and connected() are useless. they should be used. sorry about exposing them
11:39 Feinorgh batman: it does what it needs to do in the websocket controller, and that's all I needed. i think i'll keep thinking "blocking" in the helper, and leave it with Redis in the mean time :-)
11:41 mire joined #mojo
11:52 kyshtynb2 Guys, when I set the following root 'images/thumbs/*' the page rendered losses css and I can't understand why.
11:53 kyshtynb2 What I want is to render a page on all the requests to the route 'images/thumbs/whatever', where 'whatever' may change.
11:54 kyshtynb2 I see in server logs that it looks for css file GET "/images/main.css" while it should look for it in public/.
11:57 jberger is the images directory inside public?
11:58 kyshtynb2 it is
11:58 kyshtynb2 public/images/thumbs specifically.
11:59 jberger and the css file is at public/images/main.css
12:00 kyshtynb2 No! Css is in public/main.css
12:00 kyshtynb2 But I think I've caught the error
12:00 Feinorgh kyshtynb2: what does the reference to the css file look like in the generated html?
12:00 kyshtynb2 It was in main.html.ep layout -
12:00 kyshtynb2 ../main.css instead of /main.css.
12:01 kyshtynb2 Thanks guys,
12:01 purl rumour has it Thanks guys, is all i wanted to know :-)
12:01 jberger hehe, yeah that will do it
12:02 * jberger pushes purl down the stairs
12:02 purl Hey! *thump* ow! *bang* argh! *bam* son of a *thump* *crunch* whimper...
12:02 stephan48 haha
12:03 jberger the whimper actually made me a little sad
12:03 jberger purl: botsnack
12:03 purl :)
12:04 edestler joined #mojo
12:04 kyshtynb2 is there a built-in var which would contain referrer, or even not a refferer, but a route which lead to generated page?
12:06 dod joined #mojo
12:08 babl joined #mojo
12:10 Feinorgh kyshtynb2: in general i would avoid relative urls or to calculate urls from relative paths if possible. you can use url_for and url_with for most imaginable cases, i think
12:10 babl joined #mojo
12:11 kyshtynb2 I see. Thanks!
12:16 jberger there is a curreny_route helper
12:16 dod joined #mojo
12:16 jberger but yeah, url_for is awesome
12:18 Feinorgh yeah, before i discovered that i had to invent new swearwords each time i deployed a mojo app under a new base url, always something breaking
12:19 jberger it seems so obvious now, but it's worth repeating, it's useful because then you can keep your view separate from your router
12:19 jberger change your routes, the view just works
12:19 purl jberger: that doesn't look right
12:20 Feinorgh :-)
12:20 * jberger sets purl on fire
12:20 * purl basks in the warm glow HEY WAIT A MINUTE
12:24 kyshtynb2 Guys. Is there a "guideline" on how much pure perl code should be ins main executable and how much - in templates? Is it okay to have significant part of code in templates?
12:25 Feinorgh kyshtynb2: depends on how masochistic you are :-)
12:25 Feinorgh kyshtynb2: if you can serve up nice helpers and well structured data to the templates, they become much cleaner
12:26 Feinorgh kyshtynb2: but you might want to avoid having large chunks of logic in the templates, only as much as is needed to generate the output you want
12:27 kyshtynb2 I tend to constantly forget that helpers CAN be called from template. Poor me :).
12:30 rem_lex joined #mojo
12:32 dod joined #mojo
12:33 batman kyshtynb2: put as little code in your template.
12:33 batman future kyshtynb2 will thank you for that.
12:33 batman but of course, "present kyshtynb2" might not care about "future kyshtynb2"
12:34 batman it's like me whan i go out drinking: "screw future batman!"
12:34 batman :P
12:34 kyshtynb2 heh:) thats true!
12:35 batman but seriously... about the templates: move the code to the controller if it's more than one line.
12:35 batman and i don't mean one line of perlgolf code
12:37 rem_lex joined #mojo
12:42 laouji joined #mojo
12:47 ryozi joined #mojo
12:54 Dandre I have several routes defined (eg /foo/...)
12:54 Dandre I want to redirect everything like /bar/foo/... to /foo/...
12:54 Dandre how can I do that?
12:58 mire joined #mojo
13:00 moritz make a route for that?
13:01 moritz any '/:whatever/foo/:rest/ => sub { my $c = shift; $c->redirect_to("/foo/ . $c->param('rest')) }
13:01 moritz or so
13:04 Dandre ok I'll try, thx
13:06 * sri yawns
13:13 dod1 joined #mojo
13:14 marcus http://blog.64p.org/entry/2013/02/28/202136 wat
13:14 batman Dandre: you need "/:whatever/foo/*rest" to capture everything. ":rest" will only capture until the next "/"
13:15 batman marcus: have you fixed render_steps() ?
13:16 marcus batman: About to push and commit.
13:16 batman marcus: <3
13:16 batman are you back in town?
13:17 Dandre Ok thanks all!
13:22 cpan_mojo Mojolicious-Plugin-RenderSteps 0.04 by Marcus Ramberg - http://metacpan.org/release/MRAMBERG/Mojolicious-Plugin-RenderSteps-0.04
13:23 marcus batman: yes, I am in town
13:24 batman ok
13:25 batman marcus: http://p.thorsen.pm/0d44f4b504c1 # add this to the Makefile.PL ?
13:26 marcus ~/Source/Mojolicious-Plugin-RenderSteps   master ●  git commit Makefile.PL -m"Mo meta, mo problems"
13:26 marcus Blir med i neste release
13:27 marcus oh, english maybe
13:27 batman :)
13:30 dod joined #mojo
13:32 hummeleBop joined #mojo
13:45 trone joined #mojo
13:54 sh4 joined #mojo
13:57 asarch joined #mojo
14:09 sri OMG
14:09 sri perl -Mojo -E '&Internals::SvREADONLY(\!!1, 0); ${\!!1} = Mojo::JSON::true; say j({true => !!1})'
14:09 sri {"true":true}
14:10 gryphon joined #mojo
14:10 bluescreen joined #mojo
14:20 nicomen sri: want to elaborate?
14:20 sri what's not obvious?
14:21 sri you can redefine the true/false constants and make them usable in serializers
14:21 sri perl -Mojo -E 'say j({true => !!1})'
14:22 sri {"true":1}
14:26 nicomen ah, for _other_ serializers?
14:32 basic6 joined #mojo
14:34 basiliscos joined #mojo
14:37 cmcgarvey joined #mojo
14:41 abhishekisnot jberger: thank you for pr, unfortunately that did not work, so I changed app to use XML::LibXML instead. But that did not work either.
14:41 abhishekisnot I am looking into how render works with json
14:54 sri marcus: ohoh, i think this is a bug in rendersteps... $delay->on(error => sub { $self->render_exception(shift) });
14:54 sri should be pop instead of shift
14:55 sri you really need to test more!
14:55 marcus Was just thinking that
14:58 marcus Added a test for the exception content now.
14:59 cpan_mojo Mojolicious-Plugin-RenderSteps 0.05 by Marcus Ramberg - http://metacpan.org/release/MRAMBERG/Mojolicious-Plugin-RenderSteps-0.05
15:02 tomboh I'm going to extend Mojo::Log to log to a proprietary logging system (let's call it PROP) - should I name my module Mojo::Log::PROP or MojoX::Log::PROP? (or something else)
15:02 tomboh I see both naming conventions used on CPAN so I thought I'd ask
15:04 al joined #mojo
15:17 cpan_mojo Mojolicious-Plugin-LinkEmbedder 0.05 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-LinkEmbedder-0.05
15:21 bluescreen_ joined #mojo
15:29 disputin joined #mojo
15:39 meshl joined #mojo
15:42 marty joined #mojo
16:00 fhelmber_ joined #mojo
16:09 marcus tomboh: not MojoX
16:09 denis_boyun joined #mojo
16:11 sri not sure it matters much anymore
16:11 sri thinking about it, i would get really pissed if someone took a namespace like Mojo::Transaction::HTTP2
16:12 sri it really depends on the actual name
16:14 sri talking about http/2... it's about to go into the last call state... so they are really pushing hard
16:14 tomboh marcus, sri: thank you both - in this case the PROP in Mojo::Log::PROP is unlikely to conflict with anything outside $corp
16:14 sri jberger, marcus, tempire, crab: better get familiar with the latest http2 draft!
16:15 * marcus safeguards with his new module Mojo::Transaction::HTTP3
16:16 sri marcus: i think this might be a good way to put it... "MojoX for anything that might conflict with future extensions of the core, everything else into Mojo"
16:16 marcus sri: Maybe add a note about it in the FAQ?
16:16 sri maybe
16:16 marcus How should I name my Mojolicious extension
16:17 sri should also mention Mojolicious::Plugin and Mojolicious::Command then i guess
16:24 ua_ joined #mojo
16:31 sri that silicon valley series is actually kinda fun
16:35 sri expected the technobabble to be unbearable, but it's not too bad
16:44 genio Yea, I didn't think I'd like it either, but I find myself laughing a lot\
16:44 cpan_mojo Mojolicious-Plugin-LinkEmbedder 0.06 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-LinkEmbedder-0.06
17:01 ua_ joined #mojo
17:12 disputin joined #mojo
17:18 tempire lulz
17:19 tempire So then the X in MojoX would stand for experimental going forward
17:19 tempire or Xperience may vary
17:19 tempire or tread lightly at your own risk
17:20 sri Xtreme
17:20 tempire http2 draft url?
17:21 tempire Has everyone seen the season finale of silicon valley?
17:21 KindOne joined #mojo
17:21 sri htt2 spec http://tools.ietf.org/html/draft-ietf-httpbis-http2-12
17:21 * tempire bookmarks
17:22 sri http2 header compression spec http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-07
17:25 jberger_ joined #mojo
17:25 jberger_ abhishekisnot: I'm surprised to hear you say that
17:25 jberger_ I did try it and at least the command line get worked for me
17:26 jberger_ There is always the chance that my terminal was fixing it up, but I rather think I had it
17:29 abhishekisnot jberger_: http://shrouded-crag-1555.herokuapp.com/japanese still produces garbled characters
17:31 jberger_ Did I change the right file?
17:33 abhishekisnot jberger_: I guess you did. Its lite app, only 1 file to change anyway.
17:33 jberger_ Well I can't look now, I'm at work
17:34 jberger_ Can you try the terminal get?
17:40 sri what app are you talking about anyway?
17:42 basiliscos joined #mojo
17:45 abhishekisnot sri: https://github.com/abhishekisnot/mojo_test
17:45 abhishekisnot jberger_: I guess terminal outputs corrently, but it does even if I do not use bytestream
17:46 abhishekisnot I dumped the object to log and uploaded it to repo under log/development.log
17:46 abhishekisnot s/object/hash/
17:55 cpan_mojo Convos 0.7 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Convos-0.7 (depends on Mojolicious)
17:56 batman marcus: with gist embedding ^ :)
17:57 beyondcreed joined #mojo
17:57 batman http://home.thorsen.pm/private/raw/notverysecret/convos-gist-embedding.png
18:00 dvinciguerra joined #mojo
18:06 jberger_ abhishekisnot: mine did not work correctly until I decoded
18:07 batman tomboh: when did you start doing mojo? i though you were dancing all day long...
18:10 batman sri: did you look at this: https://gist.github.com/anonymous/bf3a3f276f060fe58942 ?
18:14 batman the code act different without line 7
18:15 batman and it act different with MOJO_REACTOR=Mojo::Reactor::Poll vs ::EV
18:15 abhishekisnot jberger_: I take that back, I was looking at wrong place. yes I have to decode too.
18:15 batman should i open a bug..?
18:21 sri abhishekisnot: are you sure the file is utf-8 encoded?
18:21 sri batman: no, what is the bug?
18:22 batman the bug is that timer() is relative to application startup time and not the time when you call the timer() method
18:22 batman one line 11
18:22 batman oneline 11
18:22 batman crap
18:22 batman ***** on line 11
18:23 sri batman: you mean with EV?
18:23 batman yes
18:23 abhishekisnot sri: file -i gives me error.xml: application/xml; charset=utf-8 - so I guess yes
18:23 sri batman: open an EV ticket... muhahahahahaha
18:24 batman sri: i think that's the most evil thing you have ever, ever, ever, ever, ever, ever, ever, ever, ever said to me
18:24 batman :D
18:24 batman haha
18:24 jberger_ sri/batman: muhahahahahaha
18:24 batman sri: but...shouldn't timer() act the same no-matter which reactor backend i'm using?
18:25 sri batman: dunno, different backends will always behave different in some ways
18:26 sri we just pass a relative time to EV, what it does with it we have no control over
18:26 batman i see. i wonder if i can figure out a way that i won't go into this trap again...
18:26 abhishekisnot also, enca -d -L zh returns me 'error.xml: Universal transformation format 8 bits; UTF-8'
18:26 sri honestly, i'd call it an EV bug
18:27 batman crap. i'm not going down that rabbit hole...
18:27 sri batman: well, i bet you can always wrap your timers in a next_tick to get a new time ;p
18:27 batman yeah. that's what i'm doing now.
18:27 batman i would call that SUPER SMOOTH!
18:27 batman ...if it wasn't a total lie :)
18:27 sri if we did that in core as a workaround it would totally kill performance
18:28 batman good point
18:28 purl nice and sharp
18:28 batman seen libuv?
18:28 purl I haven't seen 'libuv', batman
18:28 batman i know you haven't, you crazy tin can
18:28 batman :P
18:29 sri if that question is for me i'll have to yell at you again -.-
18:29 sri (type it into the channel log search)
18:29 TitanOfOld joined #mojo
18:30 batman no, it's not for anyone.
18:30 batman or actually - it was for purl.
18:30 batman anyhow... got to close the laptop now
18:30 batman die ETOOMUCHHACKING;
18:30 batman take care
18:37 * sri is still hoping for a drop-in EV replacement using libuv
18:44 disputin joined #mojo
18:50 ua_ joined #mojo
19:00 mire joined #mojo
19:02 tomboh batman: the place I'm working uses both Dancer and Mojo - the app I'm working on at the moment uses Mojo
19:03 tomboh it's always good to learn another way to do things :)
19:07 dod joined #mojo
19:16 ua_ joined #mojo
19:17 marty_ joined #mojo
20:05 sugar joined #mojo
20:07 sri batman: perhaps you should consider a vacation ;)
20:22 * sri should consider a vacation too :o
20:26 ua_ joined #mojo
20:29 oetiker joined #mojo
20:29 oetiker_ joined #mojo
20:31 jberger_ tomboh: I haven't used Dancer enough to know it well, are there things it does better?
20:32 tomboh I haven't used Mojo much yet, so I'm not the best person to comment
20:32 tomboh I've maintained existing Dancer code and written applications from scratch
20:33 tomboh whereas I've only enhanced two existing Mojo apps written by a couple of people
20:33 disputin joined #mojo
20:34 ua_ left #mojo
20:55 marty joined #mojo
21:12 TitanOfOld joined #mojo
21:18 hydrauligsepp joined #mojo
21:19 disputin joined #mojo
21:19 shadowpaste "hydrauligsepp" at 217.168.150.38 pasted "cant load my Package" (17 lines) at http://paste.scsys.co.uk/392438
21:20 hydrauligsepp hey guys, i tried to dig a little bit into PerlOO and mojolicious. Therefore i tried to program a "small" kind of cardgame with Mojolicious. So maybe i am wrong here, because i think the problem i have is more a general in understanding OO or how it is done in perl. Here is what i have:
21:21 hydrauligsepp why does it not find Cardgame::Counter package?
21:24 marty joined #mojo
21:25 sri i've actually started on a Storable backend for Minion the other day... but really don't feel like finishing it... maybe someone else wants to take over? https://gist.github.com/anonymous/45eeebaf96b0cec19fff
21:26 sri the persistence stuff mostly works, just needs the worker/job code
21:29 punter joined #mojo
21:30 hydrauligsepp maybe i should add that i created the the app with "mojo generate app Cardgame"
21:32 hydrauligsepp i thought perl finds all modules in lib by folder strukture and Filename
21:32 marty joined #mojo
21:33 sri "why does it not find Cardgame::Counter package?" what?
21:34 hydrauligsepp i have posted the code above: http://paste.scsys.co.uk/392438
21:34 sri i don't see any error for a missing class
21:35 hydrauligsepp hm. actually true, but what is that meta subroutine?
21:35 sri anyway, i suspect you're having Moose trouble, for which this might in fact be the wrong channel
21:35 sri meta is a moose-ism
21:35 hydrauligsepp oh.
21:36 hydrauligsepp is mojo not relying on moose?
21:36 sri no
21:37 hydrauligsepp hm. can i say use moose in conjunction with use mojo::base?
21:37 sri no
21:37 hydrauligsepp hm.
21:38 sri i'm sure there is plenty of documentation about using moose with non-moose classes
21:38 sri we use what is commonly known as plain old perl-oo
21:39 hydrauligsepp how do i use my moose based class hirarchy in mojo. with plugins?
21:39 hydrauligsepp i mean, i already have a application, and just want to add a web interface, kind of
21:39 sri this is where i'm out, maybe someone more qualified will be able to help you
21:40 hydrauligsepp anyways i think i will do some more reading, but its not that easy to get such things right in perl. with and/or without moose
21:40 hydrauligsepp xD
21:41 nicomen hydrauligsepp: do you really need to combine them?
21:41 nicomen hydrauligsepp: are you re-using controller classes?
21:42 hydrauligsepp controller classes are the things mojo puts under lib and includes with route->('#foo') etc.?
21:43 nicomen whatever inherits from Mojolicoius::Controller and is either explicit set or automaticly used by routes definitions
21:43 hydrauligsepp the thing is i have a working "app" build on moose classes with a simple cli interface, i want to put it on the web or so
21:43 nicomen normally you see debug output on what Controller has been chosen for a given route
21:43 nicomen hydrauligsepp: should work just fine
21:43 hydrauligsepp sorry for my not so good english, i am not a native speaker
21:44 nicomen what does line 4 of lib/Cardgame/Card.pm say?
21:44 hydrauligsepp use Cardgame::Counter;
21:46 hydrauligsepp hm. maybe i should just not inherit from Mojolicoius::Controller
21:47 nicomen well if it is supposed to be a controller then you should, you wouldn't have the code available?
21:55 hydrauligsepp i think i am on the wrong route, i suppose i should separate mojo from my classes, i mean there is no need to add Mojo::Base 'Mojolicious::Controller' to all my classes. just use them as before.
21:56 hydrauligsepp i will definitly sleep over this.
21:56 marty joined #mojo
21:56 hydrauligsepp sorry for annoying you here xD
21:57 marty joined #mojo
22:03 nicomen hydrauligsepp: true, good luck
22:14 hydrauligsepp left #mojo
22:35 nicomen been touching too much php lately, I used to not hate it, now I just can't get how I ever was able to use it
22:50 marty joined #mojo
22:51 jberger__ joined #mojo
22:52 jberger_ joined #mojo
23:01 jberger_ hydrauligsepp: I'm almost certain that your class is model logic not controller
23:02 jberger_ In which case the one should not inherit from controller
23:04 rem_lex|pivo joined #mojo
23:20 D4RK-PH0ENiX joined #mojo
23:31 disputin joined #mojo
23:37 punter joined #mojo
23:41 D4RK-PH0ENiX joined #mojo
23:47 dvinciguerra joined #mojo
23:49 jberger__ joined #mojo
23:51 marty joined #mojo
23:54 rem_lex joined #mojo

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