Camelia, the Perl 6 bug

IRC log for #mojo, 2013-08-06

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

All times shown according to UTC.

Time Nick Message
00:06 jnbek joined #mojo
00:57 hesperaux_ joined #mojo
01:03 shmuel joined #mojo
01:08 sh4 joined #mojo
01:20 bpmedley Using Mojo::Server how do I call a route in a script that was loaded via load_app?
01:37 cooper joined #mojo
01:57 d4rkie joined #mojo
02:09 amirite joined #mojo
02:22 amirite_ joined #mojo
02:27 amirite joined #mojo
02:52 amirite_ joined #mojo
02:57 amirite joined #mojo
02:59 asarch joined #mojo
03:15 Mike-PerlRecruiter_ joined #mojo
03:16 amirite_ joined #mojo
03:20 preflex_ joined #mojo
03:27 amirite joined #mojo
03:34 basic6_ joined #mojo
03:44 amirite_ joined #mojo
03:47 rem_lex|pivo joined #mojo
03:49 amirite joined #mojo
03:59 dvinciguerra joined #mojo
04:01 Vandal joined #mojo
04:03 ladnaV joined #mojo
04:30 amirite_ joined #mojo
05:01 dotandimet joined #mojo
05:05 dvinciguerra joined #mojo
05:06 dqw joined #mojo
05:40 SmokeMachine joined #mojo
06:03 punter joined #mojo
06:15 dpetrov_ joined #mojo
06:21 doby joined #mojo
06:21 SmokeMachine joined #mojo
06:22 amirite joined #mojo
06:26 Mike-PerlRecruiter_ joined #mojo
06:50 basiliscos joined #mojo
07:19 arthas joined #mojo
07:22 maxhq joined #mojo
07:26 Mike-PerlRecruiter_ joined #mojo
07:31 trone joined #mojo
07:35 amirite_ joined #mojo
07:39 maxhq joined #mojo
07:52 denisboyun joined #mojo
07:57 nicolaas joined #mojo
08:04 fhelmber_ joined #mojo
08:07 mire_ joined #mojo
08:15 Moataz-E bpmedley: good news, i managed to make it work. I installed new perlbrew on user root along with all the modules.
08:16 Moataz-E bpmedley: then, i found out that redhat's firewall is blocking port 80. After, fixing that, my website is now up and running. Thanks for the help!
08:16 basiliscos joined #mojo
08:16 Moataz-E also, thank you marcus and sri for the help yesterday. This chat channel is awesome!
08:34 olav joined #mojo
08:39 olav Hey guys. How do you handle error messages that print to STDERR ?
08:44 Dandre joined #mojo
08:46 KindTwo joined #mojo
08:51 Dandre1 joined #mojo
09:00 jzawodn joined #mojo
09:03 phips|mac joined #mojo
09:04 jamesw joined #mojo
09:09 amirite joined #mojo
09:24 nic joined #mojo
09:32 jast I added Carp::Always to my weird issue with subs getting redefined, and I get this rather nonsensical trace: http://vpaste.net/DrNXQ
09:34 jast line 23 of Git.pm is exactly this: sub is_ext {
09:37 mire_ joined #mojo
09:38 jast in fact here's the first bunch of lines from Git.pm: http://vpaste.net/vGRuh
09:39 jast I'd be grateful for any ideas or pointers... I can't, of course, be sure that this is related to Mojolicious, but my code doesn't contain any evals and it has to be coming from _somewhere_ :)
09:39 olav You can try to ack or grep for is_ext to see if there are more than one
09:40 jast well, as you can see from the trace, the problem happens because somehow, Git.pm requires the module that required it in the first place
09:40 jast (even though there is no actual require like that in the code)
09:40 jast so, the sub is essentially defined twice by the exact same code
09:41 jast I get the same trace for every other sub in the same file
09:42 vanessa_ joined #mojo
09:43 olav my perlfoo is not hard enough, but Im curious because require should only load modules, that has not already been loaded
09:43 jast (except for the other subs it claims that the eval{} that requires the controller is in the place where each other sub is defined... for instance, that line 27, defining a sub called 'fullpath', is yet another eval)
09:44 jast that is generally true, I believe, but the module is only marked as loaded once it has been fully loaded
09:44 jast if, as part of loading the module, it gets required again by a dependency, you run into trouble
09:45 jast which isn't an issue in itself, but it becomes one when the second require happens on its own by magic
09:46 jast OTOH the documentation for require suggests that the file is marked as loaded *before* it is loaded
09:46 olav So some require must be superflous
09:46 jast well, Git.pm clearly only requires Moose, namespace::autoclean and Cwd
09:49 olav Just asking: you don't also have the "normal" Git module installed?
09:50 jast I do, but it's not loaded by my app, not to mention that it has no 'is_ext' sub
09:51 olav Nice. Under apache i get redefined warnings when I change the code but dont restart the server. Maybe morbo is "hanging" ?
09:51 jast everything else works, it's just that one damn file... and it happens the very first time I use a controller that requires Git.pm
09:52 jast (I thought differently yesterday but figured out that I was wrong)
09:52 olav dang, Im out of pixiedust :-/
09:54 jast welcome to the club :}
09:54 jast thanks for trying, though. pixie dust does wonders usually...
09:56 olav It does :-)
10:01 fhelmber_ joined #mojo
10:07 bpmedley Moataz-E: Awesome.  What's the site name?
10:28 fhelmbe__ joined #mojo
10:35 mire_ joined #mojo
10:51 * sri is still looking for Mango feedback, speak up now or it will go stable when i release the job queue!
11:05 jast FWIW I solved my problem by getting rid of the dependency on Moose. no idea why that makes a difference, though.
11:13 jamadam joined #mojo
11:13 sri tempire: MANGOCAST!
11:15 jnbek joined #mojo
11:41 nicolaas this is not a troll : what should help me to choose between Mojolicious & Play Framework ?
11:41 nicolaas for a web app
11:42 sri research
11:46 nicolaas research on what ?
11:48 nic nicolaas: IMO there isn't much that can beat implementing a miniature version in both frameworks
11:48 nicolaas okay
11:49 nic It's rare that you find someone who has recent experience of both, doing the same thing you're going to do, with similar work culture, env, etc
11:50 nicolaas yes, it was more about scalability, processing (is Play much "heavier"?), ease of deployement, etc.
11:50 nicolaas but you're right, I should try the same thing on both
11:51 good_news_everyone joined #mojo
11:51 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/q7fFDQ
11:51 good_news_everyone mojo/master 0d3540e Sebastian Riedel: small optimizations
11:51 good_news_everyone left #mojo
12:12 good_news_everyone joined #mojo
12:12 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/R6cEdQ
12:12 good_news_everyone mojo/master 0160565 Sebastian Riedel: a few more small optimizations
12:12 good_news_everyone left #mojo
12:34 maxhq joined #mojo
12:49 denis_boyun joined #mojo
12:51 asarch joined #mojo
13:08 mire_ joined #mojo
13:11 marcus sri: I was planning to play with Mango this weekend. Want to do an exploratory wirc branch.
13:11 amirite_ joined #mojo
13:11 marcus even tho batman is VERY sceptical ;)
13:12 batman i just don't want to spend my time testing out mongodb, when we got so many other things that need fixing.
13:13 batman and i also had some bad experiences with mongodb (not even running under heavy load) some while back
13:13 marcus batman: if it works, it'd save us a couple of features that we need to implement tho.
13:13 marcus (archiving and search)
13:14 batman right. i just don't want to loose my db while trying :P
13:14 batman anyway. if you have time, then go crazy :)
13:14 batman at least mango is shiny
13:15 sri i imagine you might want to go two tiered anyway
13:15 sri redis for hot data and mongodb for archives
13:16 marcus sri: doesn't pubsub work well with mongodb?
13:16 batman we would like to be able to install wirc on a free cloud instance (one db and one web instance)
13:16 sri i've not used it heavily yet, but everything i've done worked fine
13:17 sri pub/sub only works on capped collections though, those aren't meant for long time storage, so you need a separate collection for that
13:19 marcus sri: we don't need pubsub for long time storage anyways, we already store stuff double in redis.
13:19 marcus (pubsub and sorted set)
13:20 batman pubsub in redis isn't really a storage by my definition. (since data is lost instantly)
13:20 sri ok, if one db is a constraint then mongodb might be the best choice
13:20 dqw joined #mojo
13:20 sri mongodb pub/sub evolved out of the replication implementation
13:21 sri where they tail a virtual collection listing all ops
13:22 batman so you can actually playback messages... that's super duper
13:22 sri if you lose the connection things shouldn't get lost, so history was a natural addition there
13:22 sri you just give the collection a max documents and max memory value, then you have a history
13:23 sri once it's full the last document gets overwritten and so on
13:24 batman what sucks big time is that i spent some time convincing my dba to install redis @work so i could use wirc...
13:24 batman pretty sure he won't install mongodb :/
13:32 marcus batman: just tell him it's the new wine!
13:32 marcus or smth
13:33 marcus Guess that doesn't work so well with telenor dbas :D
13:33 batman it doesn't work when i told him redis was the new wine
13:37 marcus Time for the mind wipe, I guess.
13:39 marcus batman: we haven't actually decided to do anything tho, so a bit early to worry ;)
13:39 batman :D
13:39 * batman starts on Mojolicious::Command::mind_wipe
13:42 bluescreen joined #mojo
13:45 Jonis joined #mojo
13:45 dqw2 joined #mojo
13:57 dvinciguerra joined #mojo
14:01 bjoernfan batman: Hey, didn't you finish ::mind_wipe last week? You asked for testers but complained nobody got back to you.
14:01 batman :)
14:08 bluescreen_ joined #mojo
14:26 amirite joined #mojo
14:30 maxhq joined #mojo
14:30 d4rkie joined #mojo
14:32 btyler joined #mojo
14:32 amirite joined #mojo
14:37 denis_boyun joined #mojo
14:39 dwierenga joined #mojo
14:39 espent joined #mojo
14:43 ver joined #mojo
14:45 dwierenga joined #mojo
15:03 amirite joined #mojo
15:06 Ulti joined #mojo
15:07 Ulti if I am deploying a Mojolicious full app using Apache2 and ScriptAlias inside a vhost config, what's the best way to have the 'public' folder content served at the same time
15:11 jast Ulti: just put an "Alias /public ..." directive before the ScriptAlias one
15:11 jast uh, no wait :) that was nonsense
15:12 Ulti yeah its the doc root is the issue
15:12 Ulti and / is already aliased to the script :S
15:12 jast you're probably going to need mod_rewrite, then
15:12 Ulti yeah I noticed some mod_rewerite in the cookbook but was too stupid to munge it into my current config
15:14 jast I can't see any mod_rewrite stuff in the cookbook
15:14 Ulti sorry not the cookbook it was at the github https://github.com/kraih/m​ojo/wiki/Apache-deployment
15:15 amirite joined #mojo
15:15 Ulti but I'm not doing a proxy pass through so its not a copy paste job
15:15 jast oh, I believe I've got it now
15:16 jast set an alias for /public, then do something like this: "RewriteCond %{DOCUMENT_ROOT}/public/%{REQUEST_URI} -f" followed by "RewriteRule ^(.*) public/$1 [L]"
15:17 Ulti yeah I just noticed I use rewrite rather than the script alias durrrr
15:21 amirite_ joined #mojo
15:26 btyler joined #mojo
15:27 gryphon joined #mojo
15:29 amirite joined #mojo
15:31 Ulti actually why doesn't this just work with only ScriptAlias surely it runs and then Mojolicious sees that the URL doesn't match a route and tries to see if its static content to pass through
15:33 jast it should, yeah
15:35 amirite joined #mojo
15:37 Ulti apache is getting in the way :/
15:42 amirite_ joined #mojo
15:46 Moataz-E bpmedley: still not finished and waiting for dns server to update. It's IP is: 54.213.53.115
15:48 bpmedley Largest ffeet of german cars in the UAE?
15:48 Moataz-E bpmedley: the company my father is currently managing
15:48 bpmedley Nice!  How is hypnotoad working for you?
15:48 Moataz-E bpmedley: they are part of Ali & Sons which is the dealer that sells VW, Porsche and Audi in UAE
15:49 Moataz-E bpmedley: so far so good, using port 80 and running it through root.
15:49 bpmedley The only thing you may want to change eventually is using the user and group flags to drop root privs.
15:50 Moataz-E bpmedley: yeh, i heard it is risky using root in such a way
15:58 bowtie_ joined #mojo
16:04 amirite joined #mojo
16:12 * Ulti gave up and just did a proxy with some static serving from apache
16:16 jberger joined #mojo
16:17 jberger sri: any specific feedback you are looking for?
16:17 nic Moataz-E: It's customary to send a sample of your produce to the Mojolicious chief dev :)
16:17 jberger Mango is working great for the simple project that I'm using it in
16:18 sri jberger: things you like, things you don't like, things you think might be design mistakes...
16:18 sri especially method arguments and return values
16:19 sri also the gridfs api
16:22 Britzel joined #mojo
16:23 jberger A while back I remember mentioning that I wasnt sure about injecting the _id field into the hashref provided to save. Now I like that a lot
16:23 jberger Mskes repeated calls to save easier
16:23 sri that's something i have no influence on :)
16:24 sri methods and their basic behavior are mostly dictated by other mongodb drivers
16:24 sri just gridfs and bson serialization are a little more creative
16:25 jberger I haven't had a chance to play with gridfs yet
16:25 sri db/collection/cursor
16:26 sri i think methods like map_reduce have not gotten much use yet
16:26 jberger My ultra simple odm is on my github now
16:27 jberger No example yet because the only user is proprietary
16:27 jberger I need to make an example app before I make a blog post
16:28 jberger For now though it's just a fancy wrapper around find_one and save
16:29 amirite joined #mojo
16:30 sri :)
16:33 amirite_ joined #mojo
16:38 amirite joined #mojo
16:39 jberger What it does is let me do is add instance methods like set/check password
16:40 jberger s/is//
16:42 jast any idea what might be going on if morbo decides to rapidly fill up 3.6 GB worth of RAM for a minute or so?
16:43 amirite joined #mojo
16:43 jberger And auto save on falling out of scope (after a change)
16:48 dod joined #mojo
17:03 amirite joined #mojo
17:07 basiliscos joined #mojo
17:08 amirite_ joined #mojo
17:08 sri hipster hacker favoriting my tweets is getting awkward...
17:13 cfedde "I write world-changing applications in languages you have probably not yet heard of. My code is poetry, meanwhile yours is oh-noetry."
17:13 cfedde shudder.
17:14 amirite joined #mojo
17:24 tadamo_ joined #mojo
17:31 bluescreen__ joined #mojo
17:31 amirite joined #mojo
17:48 trone joined #mojo
17:53 amirite joined #mojo
17:56 btyler joined #mojo
18:01 asarch joined #mojo
18:07 sh4 joined #mojo
18:10 amirite_ joined #mojo
18:14 dvinciguerra joined #mojo
18:16 tempire um.
18:17 tempire Would namespaced events really be that much of a performance hit if each namespace was in its own hash?
18:17 amirite joined #mojo
18:24 sri tempire: only one way to find out
18:24 tempire it's easy enough to change. not sure how to test performance, though.
18:25 jast joined #mojo
18:27 jzawodn joined #mojo
18:30 preflex joined #mojo
18:33 amirite_ joined #mojo
18:39 jzawodn joined #mojo
18:57 jzawodn joined #mojo
19:00 tadamo_ joined #mojo
19:14 mire_ joined #mojo
19:27 Mike-PerlRecruiter_ joined #mojo
19:42 gryphon joined #mojo
20:02 rem_lex| joined #mojo
20:06 marcus joined #mojo
20:09 marcus joined #mojo
20:09 wsri joined #mojo
20:09 batman joined #mojo
20:19 sri tempire: what's the problem?
20:20 amirite joined #mojo
20:20 tempire haven't addressed performance yet.
20:20 tempire but the syntax...
20:21 sri should be pretty easy to benchmark
20:21 tempire since $e->emit(namespace => name => @args) won't work.
20:21 sri i'm almost certain the cost is too high though
20:22 sri since i've micro optimized eventemitter like crazy
20:22 tempire is that the reason for things like (shift, shift) and such?
20:23 sri nope, that's just a common idiom i use
20:23 sri to pass @_ along verbatim
20:24 sri MOJO_EVENTEMITTER_DEBUG=1 mojo get /
20:25 sri there's tons of events, so they matter quite a bit
20:26 sri of course there's also the open use case question, if it's not useful for core... you know...
20:27 tempire I need it, regardless of whether it's core or a monkeypatch.
20:27 amirite joined #mojo
20:28 sri doesn't have to be a monkey patch, you can subclass and overload emit
20:28 tempire I like saying monkeypatch more.
20:28 tempire MONKEYPATCH!
20:28 sri HULKSMAH!
20:28 sri umm
20:28 sri HULKSMASH!!!
20:29 * sri was just reading about the next avengers movie :)
20:37 jnbek joined #mojo
20:39 amirite joined #mojo
20:48 amirite_ joined #mojo
20:51 tm joined #mojo
20:51 sjn joined #mojo
21:04 marcus sri: "Invalud connection string" (t/connection.t)
21:04 amirite joined #mojo
21:06 bowtie_ joined #mojo
21:19 sri marcus: fixed!
21:28 marcus sri: do I need to do anything special on a tailable cursor to avoid ->next timing out if nothing happens for a while?
21:29 sri marcus: it's meant to time out after a while, the server decides when
21:30 marcus sri: but if I have a subscribe running, I don't want it to stop subscribing?
21:31 sri i've implemented it the way it's supposed to be, argue with the mongodb folks ;p
21:31 marcus sri: I'm trying to ask you how it's supposed to work.
21:31 marcus If you set up a subscribe for instance in a chat client, and it goes away after being idle for a while, it's not very useful.
21:31 marcus you'd stop receiving messages.
21:32 sri you call ->next again and it blocks again for a while
21:32 marcus sri: so I shouldn't use it non-blocking?
21:32 sri i mean blocks server side
21:33 sri you have to use it non-blocking
21:33 marcus sri: so how will I know that it has timed out and I should set it up again with ->next ?
21:33 marcus is there like an event I should subscribe to?
21:33 sri because you didn't get a result
21:35 sri just like ->next will return undef if a normal cursor has no more results
21:36 lukep joined #mojo
21:43 marcus sri: the perl driver documentation says " they never die and keep returning new results as more is added to a collection." about tailable cursors.
21:44 marcus sri: but you're saying that if ->next returns a undef document I should set up the cursor again?
21:44 batman marcus: just reset the cursor.
21:44 batman i think it's fine. you need to handle timeout somehow anyway
21:45 marcus kinda looks like I could set timeout to -1 in the cursor. but yeah
21:45 batman you still need to handle timeout....
21:46 marcus or at least broken connections
21:46 batman or disconnect. or some other thingy.
21:46 marcus yy
21:49 batman marcus: http://www.postgresql.org/doc​s/9.1/static/sql-listen.html
21:49 batman :P
21:49 tm left #mojo
21:49 marcus batman: wat. Let's rewrite against postgresql <3
21:49 batman :D
21:50 * batman is going to make batdb
21:50 batman it's going to fly!
21:50 amirite_ joined #mojo
21:52 sri marcus: umm... you just call ->next again
21:52 sri and do absolutely nothing else
21:52 marcus sri: inside the callback?
21:52 batman yes?
21:53 batman marcus: we're already doing that when redis is timing out..
21:53 marcus batman: in redis we're doing it in on(error => sub {});
21:53 dvinciguerra joined #mojo
21:54 batman that's because of that commit sucks.
21:54 batman but basically it's the same
21:54 batman http://www.wadsworth.org/spider_d​oc/spider/pubsub/pubsub_inst.html :)
21:55 marcus batman: wtf is that?
21:55 marcus :)
21:55 marcus SPIDER?
21:55 batman i think it's pub/sub built on files and directories...
21:55 batman not sure if that's true though :/
21:57 batman i wonder what alternatives there exists to pub/sub
21:57 marcus sri/batman: https://gist.github.com/marcusramberg/6169114 # guess I just created a memory leak? :)
21:57 batman maybe we should just run wirc in one process and say that that's how it works
21:58 batman capped=>\1 # don't get the syntax
21:58 marcus batman: single-threaded for life!
21:58 marcus batman: that's from cursor.t - how to make a capped collection
21:58 batman marcus: redis is single threaded...
21:59 batman still don't get ref to 1
21:59 marcus batman: I know. By design.
21:59 marcus batman: I think it's a shortcut to bson true or smth
21:59 batman easy to make pub/sub if you're single threaded
21:59 batman oh
21:59 hesperaux joined #mojo
22:00 batman i think the gist makes sense... sort of
22:00 batman anyway. i need my beauty sleep. going to fix m-p-cgi tomorrow :P
22:01 marcus I think I'll stay up late and read the new sandman slim book
22:01 marcus and be horribly grumpy tomorrow
22:03 batman :)
22:03 batman http://codepen.io/meanyack/pen/KIJdD # is this funny?
22:03 batman "This CSS effect made me laugh out loud" ... maybe it's not showing up in my chrome https://twitter.com/jaffathec​ake/status/364677822930882562
22:04 asarch joined #mojo
22:05 basiliscos joined #mojo
22:06 marcus batman: it's folding it up as a paper plane
22:06 marcus when you click the button
22:06 marcus it's pretty cute
22:14 jast joined #mojo
22:26 sri marcus: i doubt you can just call ->next if there's an error
22:27 marcus sri: It's always worked for the ostrich
22:29 marcus sri: any idea what 'ns not found at /Users/marcus/perl5/perlbrew/perls/perl-5.1​6.2/lib/site_perl/5.16.2/Mango/Database.pm line 53.' could mean?
22:30 sri it's an error from the server
22:32 marcus seems I get it when dropping a collection that doesn't exist
22:46 amirite joined #mojo
23:13 rem_lex| joined #mojo
23:26 jberger joined #mojo

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