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

IRC log for #mojo, 2014-08-13

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

All times shown according to UTC.

Time Nick Message
00:15 disputin joined #mojo
00:32 good_news_everyon joined #mojo
00:32 good_news_everyon [mojo] kraih tagged v5.28 at 61d3249: http://git.io/EKSoFg
00:32 good_news_everyon left #mojo
00:33 good_news_everyon joined #mojo
00:33 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/jnpomA
00:33 good_news_everyon mojo/master 550e775 Sebastian Riedel: bump version
00:33 good_news_everyon left #mojo
00:38 thowe joined #mojo
00:38 thowe Hi, folks.
00:39 jberger o/
00:40 thowe Oh, hi there.  I was just about to start converting my home page to Galileo :)
00:40 thowe I'm kind of curious if people still use those buttons like "Powered By Mojolicious" or "Powered by Perl" still...  I want some of those.  Even if they are anachronisms
00:41 thowe We did figure out how to make that work with Pg, right?  Not that I NEED it to...
00:44 jberger I'm sure they still do
00:44 jberger and Pg just needed some config settings
00:44 jberger IIRC
00:45 thowe Oh, yeah, I remember now, I think...  Quotes maybe.
00:45 jberger Galileo is fun, but I'll admit I haven't given it much of my time lately
00:45 jberger there are some patches waiting
00:45 jberger ;(
00:46 thowe I have this, probably over-ambitious idea, of slowly expanding Galileo.  Like...  How do you feel about a db table for config options...  Things like the Theme.  And, you know, themes.
00:47 thowe Or skins, if you like that term better...
00:47 jberger oh, I have acutally merged one and never released it :((
00:47 jberger https://github.com/jberger/Galileo/pull/27
00:48 jberger that all sounds great
00:48 jberger there are all kinds of nice things I have in mind
00:49 jnbek jberger: so... where's the MojoWiki with the git backend?
00:49 jberger que?
00:49 purl como?
00:49 jnbek :D
00:50 jnbek I've been digging around and haven't been able to find a Mojo powered Wiki app
00:50 jnbek but the best kind, is one without an /admin/ backend, using git to manage page revs
00:50 jnbek and I'm too lazy to write one ;-)O
00:50 jnbek s/lazy/lazy and busy/
00:50 jberger I wouldn't say Galileo is a wiki per-se, but it may serve
00:51 jberger thowe/jnbek: the primary design goal for Galileo was easy CPAN deployment
00:51 jnbek ya, I been checking it out :)
00:51 thowe Oddly enough, there is a Catalyst Wiki called "MojoMojo", and it has some nice concepts, but I find it also has some bugs that come from poor design decisions.  Nothing that can't be fixed.
00:51 jberger its real goal was to see if it was possible to make a CPAN deployable CMS (i.e. the anti webgui)
00:52 jnbek thowe: aside from the fact that it required 45% of all cpan modules as dependencies, it's great :)
00:52 jberger thowe: the author of MojoMojo is marcus, another Mojolicious core member
00:52 thowe I wouldn't use webgui.  I don't like the design or mix of software AT ALL.
00:53 jberger jnbek: seen this? https://widgets.stratopan.com/wheel?q=MojoMojo-1.10&fs=1
00:53 thowe Ah, then perhaps we will see a nice Mojo-backed wiki at some point?  I would like to see a Dokuwiki type thing.
00:53 thowe Something that uses the file system for storage and hierarchy.
00:53 jnbek jberger: see, I was running mediawiki for years... finally got hacked, and even though I did everything I could, it kept getting comped... So i got to looking around for other wiki software, that eliminated the ability to 'login' to edit pages...
00:53 jnbek I found gitit, it's written in Haskell
00:54 jnbek it still has a backend though
00:54 jnbek but it's also very huge
00:54 jberger hmmmm, Galileo does require login, but I suppose it wouldn't have to
00:54 jberger it wasn't designed with that in mind though
00:54 jberger no history of edits etc
00:54 thowe I have also run Mediawiki....  It was too complex for my audience, so I started moving it to MojoMojo, which I liked much better for that job.
00:54 jnbek but I was bitten by the git management feature.
00:55 jberger as I said, Galileo was a proof of concept for ease of install
00:55 jnbek aye
00:55 jberger I'm all for using it, or its example, to build something awesome
00:58 jnbek I guess I could start it myself... only two Dependencies: Mojolicious and Git::Repository
00:58 jnbek but I suck at program design
00:58 jnbek :-P
00:59 jnbek I talk smack, where I work, we use CGI::Ex and I was a Developer for ~4 years before I jumped ship to the SysAdmin team
01:00 jnbek I've written plenty of programs/etc... Honestly, I'm just lazy
01:05 sri hmm
01:05 sri currently the first level of helpers still suffers from AUTOLOAD overhead
01:06 davido___ joined #mojo
01:06 sri i guess that's not too bad, but it could be optimized a little with a $c->helper method that returns a proxy object :)
01:06 sri $c->helper->foo->bar
01:08 sri yea, i'm not going there ;p
01:11 preaction joined #mojo
01:14 thowe Oh, no, my bad...  I misremembered.  It wasn't MojoMojo that had the design flaws, it was ShinyCMS.  MojoMojo was just missing some easy to create editing utils.
01:16 thowe I think I want to convert my Catalyst app to Mojolicious.  I think it is mostly reusable things, and the routing was fairly simple.
01:28 mattp_ joined #mojo
01:34 jberger thowe: of course, we encourage Catalyst to Mojolicious migration :-)
01:42 miked joined #mojo
01:45 * sri wonders if we should encourage the use of more arbitrary class names for application specific plugins
01:45 sri $app->plugin('MyApp::Helpers::Foo');
01:45 jberger I would encourage that, for app-specific helpers
01:45 sri that's the idea
01:45 noganex_ joined #mojo
01:45 sri think that's how i'm going to organize my minion jobs from now on
01:46 sri $app->plugin('MyApp::Jobs::BanUsers'); $app->plugin('MyApp::Jobs::CheckSomething');
01:48 klapperl_ joined #mojo
01:50 miked joined #mojo
02:03 woz joined #mojo
02:25 jberger Should we rename plugin to component?
02:28 jberger Would that encourage use for internal "components"?
02:28 * sri doesn't like the name component
02:29 sri also, it might be a bit late for renaming ;p
02:29 jberger Plugin sounds like something someone else provides
02:30 jberger Not rename then, alias?
02:31 jberger Plugins would still keep the plugin namespace
02:31 jberger Mojolicious plugins on cpan
02:31 jberger Even Galileo plugins on cpan
02:32 jberger Components for your app
02:32 jberger Or not
02:32 sri then you would also need an alternative base class
02:32 jberger Hmmmm
02:32 sri which is rather trivial ;p https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Plugin.pm
02:33 sri i'm not opposed to the idea of a separate concept to plugins for app specific stuff
02:54 noganex joined #mojo
03:13 woz joined #mojo
03:16 neyasov______ joined #mojo
03:28 * crab returns after falling down the stairs :-(
03:44 woz joined #mojo
03:50 basic6_ joined #mojo
03:58 sujithm joined #mojo
04:09 cfedde ouch!
04:09 cfedde trixy stairs
04:22 jberger crabs have so many legs, I imagine they get tangled sometimes
04:36 batman jberger: works like a charm here.
04:40 batman crab: :( are you ok?
04:41 batman -1 on components
04:42 batman +1 on arbitrary class names
04:44 batman jberger: I really need more detailed bug reports to do anything. Unless [TheFlash] starts with two [, then it works on demo.convos.by
04:48 [jberger] joined #mojo
04:48 [jberger] hmmmm, ok, seems to work
04:50 [d__d] joined #mojo
04:51 [d__d] ok I have no idea why that one bot (with this name) doesn't work right
04:55 woz joined #mojo
04:58 crab batman: actually not. but i definitely haven't cracked a rib, and i probably haven't cracked my tailbone, so i should be ok later.
05:17 Adura joined #mojo
05:27 jamesaxl joined #mojo
05:50 dexteruk joined #mojo
05:52 stokachu joined #mojo
05:53 batman crab: get well soon
05:54 Eke- joined #mojo
05:56 woz joined #mojo
06:08 denis_boyun joined #mojo
06:31 nic joined #mojo
06:32 dp_ joined #mojo
06:36 sujithm_ joined #mojo
06:37 gatitskiy joined #mojo
06:40 marcus alas poor crab :(
06:41 KCL joined #mojo
06:41 marcus thowe: I'm not likely to start another wiki project anytime soon. The latest project I've been working in that area on commercially is http://theoutput.co/
06:57 woz joined #mojo
07:04 batman could this be interesting? https://github.com/jhthorsen/mojo-useragent-digestauth
07:04 batman i wonder... 1) is the name valid? 2) does the code make sense?
07:04 batman the tests works :)
07:05 trone joined #mojo
07:05 kwa joined #mojo
07:11 batman sri: i would very much appreciate input.
07:17 Vandal joined #mojo
07:20 basiliscos joined #mojo
07:23 noganex mh... i've created a symlink from ~/workspace/app to /opt/app and launched morbo from /opt/app, but $self->app->home seems to resolv to ~/workspace/app automatically
07:23 mishantil Just aquick check; newer Mojolicious is expected to work fine on 5.10.x right?
07:23 noganex is there a way to prevent this?
07:24 batman mishantil: what do you mean?
07:31 gatitskiy joined #mojo
07:36 mishantil batman: Just wondered if mojo use any features from newer perls than 5.10.
07:37 mishantil Come to think of ift, I suppose I could `grep`. :)
07:37 batman ah. kind of... https://metacpan.org/source/SRI/Mojolicious-5.28/Makefile.PL
07:37 batman Pod::Simple 3.09 is not in 5.10 core
07:42 mishantil Thanks
07:45 gatitskiy joined #mojo
07:58 woz joined #mojo
08:20 kwa joined #mojo
08:33 woz joined #mojo
08:33 dotan joined #mojo
08:44 aramisf joined #mojo
08:49 fhelmber_ joined #mojo
08:54 Jonis A lightweight oauth2 client for mojo would be nice
08:54 Jonis plugin that is
08:56 Nei I'm slowly making some progress on the irssi event loop, web serving works but websockets fail somehow, I wonder if  "[debug] Inactivity timeout" would be related to that?
09:06 marcus jonis: Isn't that what Mojolicious::Plugin::OAuth2 does?
09:30 gatitskiy joined #mojo
09:31 levabalkin joined #mojo
09:34 woz joined #mojo
09:35 Jonis marcus: oh, maybe I should look before talking sometimes, thanks :P
09:42 fhelmbe__ joined #mojo
09:44 basiliscos joined #mojo
09:44 fhelmber_ joined #mojo
09:59 gatitskiy joined #mojo
10:03 dod joined #mojo
10:11 ryozi joined #mojo
10:28 kwa batman: https://github.com/jhthorsen/mojo-useragent-digestauth/blob/master/lib/Mojo/UserAgent/DigestAuth.pm#L64 - http://www.urbandictionary.com/define.php?term=nonce :/ :)
10:29 batman kwa: i didn't write the spec :/
10:29 batman hehe
10:35 woz joined #mojo
10:41 gatitski_ joined #mojo
10:53 ryozi joined #mojo
10:58 gatitskiy joined #mojo
11:11 gatitskiy joined #mojo
11:12 kwa :)
11:13 Kripton joined #mojo
11:19 neilhwatson joined #mojo
11:26 gatitski_ joined #mojo
11:36 woz joined #mojo
11:44 Mad_dud joined #mojo
11:46 d4rkie joined #mojo
11:47 Mad_dud hi guys, could someone tell me if this is correct way to define secrets in mojolicious app? I put $self->app->secrets(['foobar']); in sub startup { } in project/lib/project.pm. i'm still getting "Your secret passphrase needs to be changed!!!" :-(
11:54 D4RK-PH0ENiX joined #mojo
11:55 hesco joined #mojo
11:58 jberger Mad_dud: that is generally correct. Guess we would have to see some code to understand
12:01 Mad_dud do you have prefered pastebin website?
12:03 jamesaxl joined #mojo
12:05 Mad_dud jberger: http://scsys.co.uk:8002/415691
12:06 Mad_dud it's Perl        (v5.20.0, linux); Mojolicious (5.23, Tiger Face)
12:07 sri where did you get the idea to call $self->app?
12:08 Mad_dud sri: most probably i've seen it in some other project long time ago
12:11 dotan joined #mojo
12:11 Mad_dud sri: this could have been http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Adding-commands-to-Mojolicious
12:12 sri but that's a Mojolicious::Command subclass
12:14 Mad_dud oh, should it be: sub startup { $self->secrets(['newpassword']); } ?
12:14 sri ding ding ding!
12:15 Mad_dud awesome. Thanks!
12:15 sri \o/
12:16 mr-foobar joined #mojo
12:16 Mad_dud sri: i love mojolicious! thanks everyone for creating it.
12:20 dotan joined #mojo
12:21 mr-fooba_ joined #mojo
12:31 bmi_ joined #mojo
12:35 fhelmber_ joined #mojo
12:37 woz joined #mojo
12:45 Dandre joined #mojo
13:02 marcus lol, be a rockstar, develop mojolicious apps and make 20$ an hour http://jobs.perl.org/job/18860
13:08 sujithm joined #mojo
13:09 Jonis marcus: how not to write a job listing.
13:09 Jonis vague and full of buzzwords
13:10 neilhwatson craigslist has the best, er saddest, ones.
13:14 nic I thought it was honest and informative
13:14 nic Some weeks you'll get 1hr of work, some weeks 96 hrs of work, and no more than 12hrs notice which it is
13:15 nic It reads like one of those "We'll work you 120 hrs a week and pay you for 40" but the hourly rate should protect you I guess
13:17 tomboh I'm fairly sure I know who's behind the "Exciting Disruptive Startup" - I'd politely describe him as "quite a character"
13:18 nic Is it marcus?
13:18 neilhwatson http://jobs.perl.org/job/1886007:20 [ Adura        ] [ cooper     ] [ genio        ] [ Kripton  ] [ omega         ] [ torbjorn      ]
13:18 neilhwatson 07:20 [ agorman      ] [ cosimo     ] [ go|dfish     ] [ kthakore ] [ onur          ] [ trone         ]
13:18 neilhwatson 07:20 [ al           ] [ cotto      ] [ graf         ] [ Kundun   ] [ Phil21        ] [ ua            ]
13:18 marcus It's not my ad.
13:18 neilhwatson 07:20 [ allison      ] [ cstamas    ] [ hahainternet ] [ kwa      ] [ phillipadsmith] [ upasana       ]
13:18 tomboh nic: I would only describe marcus politely because he's a nice guy :)
13:18 hahainternet thanks for that neilhwatson
13:18 tomboh whereas some people I have to try harder
13:18 nic :)
13:19 neilhwatson Sorry, spazzed on the keyboard.
13:20 nic oh, I thought you were giving clues who it was
13:20 nic (my money was on kthakore)
13:21 nic I suppose the most interesting aspect is that there are young experienced entrepreneurs wanting their stuff coded in perl
13:23 phillipadsmith Lovely, $20-50/hour! Well, I guess if you're living in the global south, that would be quite attractive.
13:23 Adura Indiattractive, maybe.
13:31 neilhwatson joined #mojo
13:38 marcus Well, I always heard the music industry pays shit, so I guess it could be a not very successful rock star.
13:41 woz joined #mojo
13:46 gatitskiy joined #mojo
13:53 shadowpaste "nei" at 217.168.150.38 pasted "package Nei::Mojo::Reactor::Ir" (149 lines) at http://paste.scsys.co.uk/415712
13:53 Nei I have a (semi)working irssi event loop now (see link), but it only works the "first time"
13:53 Nei (testing with Mojo::Server::Daemon)
13:53 Nei any idea what needs to be fixed?
13:54 Nei the listening socket just times out the 2nd time I load the script
13:55 Nei I did $daemon->stop and $daemon = undef but I guess there is something of the sockets remaining still :( maybe inside IOLoop (which I hoped neednt touch)
13:56 gatitskiy joined #mojo
14:01 jb360 joined #mojo
14:06 Lee 4.90 Removed deprecated to_rel method from Mojo::URL - what should i replace to_rel with?
14:07 sri there is no replacement
14:07 batman Lee: when do you need to_rel?
14:07 Lee i'm patching Mojolicious::Plugin::RelativeUrlFor to work, since it's a dependency in something i want to install
14:08 Dandre joined #mojo
14:13 Lee it's a somewhat questionable plugin IMO, it's making me think twice about using the code that requires it :D
14:13 Nei I found one workaround is to call $daemon->ioloop->reset but that's a bit too strong
14:27 Averna left #mojo
14:28 Nei if I run this code from the IOLoop $self->_remove(delete $self->{$_}) for qw(accept stop); $self->_remove($_) for keys %{$self->{acceptors}}, keys %{$self->{connections}};
14:28 Nei I can reload it...
14:28 Nei one piece not removed and it won't come back up
14:29 Nei is that expected of Mojo::Server::Daemon?
14:30 batman marcus: you fix? http://www.cpantesters.org/cpan/report/92ddd4c1-6c08-1014-8f30-acc8c4d1d97f ;)
14:32 batman BinGOs: do you have time to help me out with http://www.cpantesters.org/cpan/report/cbaa324e-2224-11e4-b698-db7a2867dcfa ?
14:32 marcus wtf :'((
14:32 batman marcus: i don't care much about win32...
14:32 marcus batman: win32 with disgusting locale setting, apparently.
14:33 batman BinGOs: i was wondering if you could run "MOJO_READWRITE_FORK_DEBUG=1 prove -vl t/telnet.t" and give me the output
14:33 batman ...or if "telnet" simply work differently on the test box
14:34 batman BinGOs: oh! maybe it's "localhost" that mess with me...
14:42 woz joined #mojo
14:49 TitanOfOld joined #mojo
14:50 sujithm joined #mojo
14:55 Eke- joined #mojo
14:55 GabrielVieira joined #mojo
15:17 Nei now I did: monkey_patch 'Mojo::IOLoop', singleton => sub { state %loop; $loop{_find_script()} ||= shift->new }
15:18 Nei must I feel bad? are there better options?
15:24 sri yes, you must
15:24 sri i have no clue what you're fighting with, but that can't be the correct solution
15:25 Nei basically I want to be able to run multiple "apps" inside irssi
15:26 Nei but if I don't do anything, the socket won't go into acceptance on the 2nd creation of daemon
15:26 sri afraid i don't have time to look into it
15:26 Nei if I reset the ioloop, it resets also the parts of the ioloop that belong to the other apps
15:27 Nei now I have a workaround, if I can make it use a separate ioloop hash per script, I can reset these independently
15:27 Nei but I think there must be better solution :(
15:43 woz joined #mojo
15:47 disputin joined #mojo
15:53 mst_ joined #mojo
16:01 Eke- joined #mojo
16:03 ua left #mojo
16:04 Dandre joined #mojo
16:23 denis_boyun joined #mojo
16:24 disputin joined #mojo
16:44 woz joined #mojo
16:52 basiliscos joined #mojo
16:54 rawler joined #mojo
17:20 jamesaxl joined #mojo
17:35 sh4 joined #mojo
17:37 disputin joined #mojo
17:45 woz joined #mojo
17:46 bobajett joined #mojo
17:47 disputin joined #mojo
17:49 bobajett folks Im trying to parse a form: $form = $dom->find('form'); $input_elements = $form->find('input'); but when I iterate over $input_elements I get only 1 element.
17:50 bobajett though when I print $input_elements it has multiple <input ...> tags in it.
17:53 go|dfish bobajett: how are you iterating over $input_elements?
17:54 go|dfish find() returns a Mojo::Collection
17:54 bobajett for my $element ($input_element->each) { print "[$e]\n" };
17:54 bobajett oops typo there. s/$e/$element/
17:57 chansen joined #mojo
18:00 go|dfish bobajett: can you change: $form = $dom->find('form') to $form = $dom->at('form')
18:01 sri think about what happens when you call ->find->find
18:02 bobajett go|dfish: yep that works.
18:02 bobajett sri: the first find returns a collection, the second find on top of it, ... I don't know what that's supposed to mean.
18:03 sri right, you call ->find on a collection... keep going... you'll figure it out :)
18:04 bobajett why isn't ->find->find a run time error? since Mojo::Collection does not define a find method?
18:04 sri you'll level up once you grok it ;)
18:04 basiliscos joined #mojo
18:07 go|dfish bobajett: because of http://mojolicio.us/perldoc/Mojo/Collection#AUTOLOAD
18:09 bobajett go|dfish: thanks go|dfish! Imma try to level up some Mojo magic.
18:13 nishttal2 joined #mojo
18:14 nishttal2 i have the following routes..
18:14 nishttal2 my $logged_in = $r->under->to('authentication#is_logged_in');
18:14 nishttal2 $logged_in->get('/sm/get_data')->to('sm#get_data');
18:14 bobajett sri: because ->find->find ends up returning a new collection object with everything stuffed into one element :-)
18:14 nishttal2 $logged_in->get('/sm/home')->to('sm#home');
18:15 nishttal2 the 1st one is a AJAX call.. and then second one is a regular html page
18:15 nishttal2 whats the best way to indicate weather its a AJAX call or not to the is_logged_in function?
18:18 basiliscos joined #mojo
18:19 nishttal2 i'm asking because I end up building work arounds and later finding out there is an easy way in Mojo
18:20 nishttal2 if I do.. $logged_in->get('/sm/get_data')->to('sm#get_data', ajax => 1); I'm not seeing ajax set in the is_logged_in function
18:25 good_news_everyon joined #mojo
18:25 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/i4WKqw
18:25 good_news_everyon mojo/master 3ae409b Sebastian Riedel: better AUTOLOAD examples
18:25 good_news_everyon left #mojo
18:25 bobajett sri: ahh, because ->find->find returns [ $found_collection, $found_collection .. ]. And I was iterating over [ ], rather than $found_collection.
18:26 bobajett in otherwords if I do: foreach my $input_element ($input_elements->[0]->each) { say $e }; # it works.
18:26 bobajett which was wrong to begin with anyway, since as go|dfish suggested I should have used $dom->at('form') instead of $dom->find('form').
18:26 sri bobajett: *ding* (you've leveled up!)
18:27 bobajett :-) thanks.
18:27 sri bobajett: this might come in handy in the future http://mojolicio.us/perldoc/Mojo/Collection#flatten
18:27 bobajett sri: cool! that will come in handy.
18:32 good_news_everyon joined #mojo
18:32 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/TI5fSw
18:32 good_news_everyon mojo/master dda00f9 Sebastian Riedel: fixed typo in AUTOLOAD example
18:32 good_news_everyon left #mojo
18:36 TitanOfOld So, with the nested helpers...can I call them from within a template?
18:38 sri only as <%= $c->foo->bar %>
18:39 TitanOfOld Is $c a special var in mojo like $a and $b in some Perl functions?
18:39 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Embedded-Perl
18:40 TitanOfOld Oh, it's been updated!
18:40 mst huh. how come it's 'foo.html.ep' rather than 'foo.ep.html' ?
18:41 mst the latter would seem kinder to dumb synhi systems
18:41 KCL_ joined #mojo
18:41 sri current format is ep, target format is html
18:41 TitanOfOld ^ that
18:42 TitanOfOld sri beat me to it. Last suffix is real file type.
18:44 sri it may often look very html-ish... but you could also go all jberger and fill a file with %=t div... lines :)
18:45 sri foo.html.haml and so on
18:46 woz joined #mojo
18:46 sri i think we've even had stuff like foo.pdf.tex :D
18:49 * sri still would like to see jade templates ported to perl
18:52 mst didn't Evan Carroll release a Template::Jade ?
18:53 sri oh my
18:53 sri i totally missed that
18:56 basic6 joined #mojo
18:56 jberger_ You know i never did release my latex templater
18:56 jberger_ You know i never did release my latex templater
18:57 jberger_ And why wouldn't nested helpers work normally in templates?
18:58 sri jberger: because consistency
18:58 purl because consistency is good
18:58 sri purl: that's right!
18:58 purl sri: excuse me?
19:00 sri mst: no tests at all... that's reassuring :S
19:02 mst sri: written by Evan Carroll is bad enough :)
19:14 preaction joined #mojo
19:21 jberger_ I almost argued that a top level function in the template would have been more consistent, but i changed my mind
19:21 jberger_ Dotted is dotted
19:24 marcus_ joined #mojo
19:28 marcus_ joined #mojo
19:34 sri jberger_: there's also the problem with begin/end blocks not working
19:34 sri <%= foo->bar begin %>...<% end %>
19:34 sri try expplaining that
19:37 stephan48 "just accept the magic"
19:39 marcus_ joined #mojo
19:42 marcus_ joined #mojo
19:46 argh joined #mojo
19:47 woz joined #mojo
19:50 Eke- joined #mojo
20:09 rawler joined #mojo
20:13 davido_ joined #mojo
20:36 Nei stephan48: since you were interested, the irssi thing is working sort of but I'm stuck in a few cases
20:36 stephan48 okey
20:37 Nei you can already write simple daemons with it, http://paste.scsys.co.uk/415752 this loads fine as  an irssi script
20:40 woz joined #mojo
20:41 disputin joined #mojo
20:42 sri Nei: that reset call does not make sense to me
20:43 Nei neither to me
20:44 Nei but if I reload that script with my irssi reactor, it cannot connect to http://localhost:8787
20:44 Nei it's different from closed though, the browser is timing out whereas if the script is unloaded it is just a plain conn.refused
20:46 sri if your cleanup code is not working correctly, i'd search for leaks first
20:46 Nei I'm no expert and this is inside irssi
20:47 Nei mojolicious::lite gives me a whole app, I don't know if it's even possible to get rid of that?
20:47 sri too bad, you seem to be pretty close
20:48 sri nope, you can't get rid of the app
20:48 Nei irssi will first call UNLOAD and then Symbol::delete_package
20:48 Nei the sample script looks sufficiently simple, not sure where I should look for leaks
20:49 Nei but there must be some state in the mojo ioloop that should be teared down but isn't
20:49 Nei also remember the next time the script is loaded it will get an app created again, I don't understand mojo to know if this is the same app?
20:51 Nei so the question is, what is inside the IOLoop and what is the proper way to get rid of it, but I don't understand the code
20:53 Nei note that I only wrote a reactor hoping I dont need to mess with the mojo ioloop code;)
20:53 Nei and I checked the code of some modules and many assume Mojo::IOLoop->singleton or whatever as defaults
20:59 disputin joined #mojo
21:05 Viktor joined #mojo
21:08 neilhwatson joined #mojo
21:11 Nei so if you  also just have some ideas how to check for leaks, or what circumstance would cause a socket to be listening but not accepting, might help me;)
21:11 Viktor joined #mojo
21:13 Viktor Greetings and Salutations. The mojocasts don't seem to be loading and I can't connect to media.mojocasts.com. Wondering if this is a known issue or just me. :)
21:15 jzawodn Viktor: down for me too
21:17 disputin joined #mojo
21:18 basiliscos joined #mojo
21:18 Viktor jzawodn: Thanks. I'm not alone. :)
21:20 sri Nei: you shouldn't have to mess with the ioloop at all
21:20 sri nor do any cleanup work, your problems simply hint at leaks somewhere
21:21 sri cycles in a callback, something stored in a global...
21:22 Nei ok so based on your experience you would say the problem should be directly in my reactor code, and not in whatever "use Mojolicious::Lite" or Mojo::Server::Daemon does?
21:23 sri yes
21:23 Nei for example, irssi won't clear @ISA before removing the script package
21:24 sri of course i have no clue how irssi works, it may be some meta issue with how it lods scripts or whatever ;p
21:24 sri @ISA is just a memory leak
21:24 Nei I saw you are using weaken in EV but not in Poll
21:24 sri no descriptors should leak there
21:25 sri i would hope... lol
21:25 Nei I based the code on Poll.pm, switching timers and io to the direct irssi equivalents and removing the one_tick
21:25 sri finding leaks is hard, lets go shopping
21:25 Nei :)
21:28 Nei I will try something else instead
21:33 sri you could start with a dumper Mojo::IOLoop->singleton to see if the listen socket is being held active there
21:34 sri which shouldn't be the case after undef $daemon
21:34 sri if that's not the case, you know 100% it's your reactor
21:37 disputin joined #mojo
21:38 shadowpaste Someone at 217.168.150.38 pasted "23:36 -!- Irssi: Unloaded scri" (67 lines) at http://paste.scsys.co.uk/415758
21:38 Nei doesn't seem to be the case
21:40 Nei sorry I just didn't follow your negation there, ->singleton empty after unload --> the reactor is faulty?
21:51 sri Nei: yes, somewhere you are leaking a file descriptor
21:51 sri now you know it's nothing above Mojo::IOLoop
21:52 Nei ok thanks for your effort
21:54 Nei do you know more about this leaky file descriptor? what kind of object would that be?
21:54 sri IO::Socket::INET/IP
21:54 Nei I only see $handle in the code and the only thing I do with that is calling fileno
21:55 Nei I never intentionally store that anywhere
21:55 sri wait
21:55 sri your paste is very confusing
21:56 sri it has the wrong reactor Mojo::Reactor::Poll
21:56 Nei I find it confusing too, I wanted to ask you about that before
21:56 GabrielV_ joined #mojo
21:56 Nei why does it say Poll instead of Nei::Mojo::Reactor::Irssi
21:57 Nei but it definitely did call some of my functions
21:58 sri if the reactor is wrong nothing can work
21:58 Nei omg
21:59 Nei I wonder how this even worked partly
22:01 Nei aha. looks like I dumped something wrong there
22:03 Nei now it gets more interesting
22:03 shadowpaste Someone at 217.168.150.38 pasted "after unloading: 00:02 bless(" (36 lines) at http://paste.scsys.co.uk/415761
22:03 Nei there are still some timers open
22:06 Nei is that expected?
22:14 good_news_everyon joined #mojo
22:14 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/a6JTHw
22:14 good_news_everyon mojo/master b7c377c Sebastian Riedel: fixed AUTOLOAD example
22:14 good_news_everyon left #mojo
22:18 good_news_everyon joined #mojo
22:18 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/YGHjTg
22:18 good_news_everyon mojo/master 6853de6 Sebastian Riedel: fixed another bug in AUTOLOAD example
22:18 good_news_everyon left #mojo
22:24 sujithm joined #mojo
22:49 starsoft joined #mojo
22:53 starsoft joined #mojo
23:11 Nei mhm, still can't make tails here. rewrote it with a dispatch method that only takes scalars as input, still no change in behaviour
23:21 Nei look here is a diff of the initial state and the 2nd time the script is loaded
23:21 Nei http://www.mergely.com/5CbW1nUQ/
23:21 Nei accepting is gone and replaced by an accept
23:22 Nei so I guess this is somehow related
23:26 Nei maybe mojo is trying to schedule something?
23:26 Nei irssi will destroy all timers and watches that belonged to the script
23:26 Skylos_ joined #mojo
23:27 disputin joined #mojo
23:30 Nei seems like it conflicts somehow with this accept mutex code
23:42 Nei stephan48: http://anti.teamidiot.de/static/nei/mojo-ws.png
23:43 D4RK-PH0ENiX joined #mojo
23:46 Skylos_ the normal routing matcher is :name - it matches all but / and . by the docs.  I want to route to '/:name.:version' when there is a period.  But my /:name rule keeps matching when I access /dog.3 as well as when I access /dog.  am I missin gsomething obvious?

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