Camelia, the Perl 6 bug

IRC log for #mojo, 2011-09-22

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

All times shown according to UTC.

Time Nick Message
01:44 elb0w_ joined #mojo
01:45 elb0w_ pancakesftw: you there? Got a Q
02:43 crab just ask the question
02:44 elb0w_ Well when hypo starts and I create a connection to the db in a helper is it just creating that connection once? Or does it recreate it every hit?
02:44 elb0w_ I am looking for the best way to have a persistent db connection
02:45 crab what is hypo?
02:45 elb0w_ sorry hypno
02:45 crab there's a mojolicious::plugin::db. and see also http://toroid.org/ams/etc/mojolicious-db-handles
02:45 elb0w_ using that
02:45 purl well, using that is somewhat hard since there is no open() or close() to do init/destruction.
02:46 elb0w_ but it looks like the conn is dying
02:47 elb0w_ Ok I guess ill have to do dbix connector then
02:47 crab nothing you do will let you have a single handle across multiple server processes
02:48 elb0w_ no I didn't want thart
02:48 crab well, nearly nothing.
02:48 elb0w_ I wanted multiple
02:48 elb0w_ the connection goes stale
02:48 crab ok
03:51 mohan_ joined #mojo
03:53 elb0w_ joined #mojo
03:56 driller_work joined #mojo
04:10 Alias_ joined #mojo
04:24 marcus joined #mojo
04:27 * pancakesftw yawns
04:30 mohan joined #mojo
04:52 pancakesftw tempire: the point of naming it "routes" was to highlight the fact that it's just nested routes
05:02 perlrocks joined #mojo
05:03 perlrocks Twitter: "And route blocks have made it into #mojolicious lite as an experimental feature, feedback would be appreciated. http://t.co/vb76LP1z #perl" --kraih http://twitter.com/kraih/status/116739447315374080
05:09 pancakesftw tempire: i was afraid a "group" keyword could confuse users too much when growing into a full app
05:10 tempire it's fine.
05:10 tempire "routes" feels very mojoliciousy
05:10 tempire I'm just a little sad the new under/routes functionality didn't make it into the last mojocast
05:11 tempire guess I'll have to make more
05:11 pancakesftw well, it's experimental, who knows what we'll learn during the next few weeks
05:15 pancakesftw yay, cold pizza for breakfast :)
05:21 perlrocks Twitter: "The under stuff in mojo is also pretty cool but seems to be only for lite, I wonder how hard it is to use in regular mojo? #perl" --MisterHatt http://twitter.com/MisterHat​t/status/116743954397011968
05:22 GitHub25 joined #mojo
05:22 GitHub25 [mojo] kraih pushed 1 new commit to master: http://git.io/im07Lw
05:22 GitHub25 [mojo/master] improved bridge example - Sebastian Riedel
05:22 GitHub25 left #mojo
05:26 perlrocks Twitter: "@MisterHatt That functionality has always been available in normal Mojolicious apps using bridges." --tempiretech http://twitter.com/tempirete​ch/status/116745127732588544
05:26 AmeliePoulain joined #mojo
05:26 pancakesftw tempire++
05:32 wafflesftw perhaps under should ne renamed bridge?
05:33 wafflesftw well, it's not exactly the same thing… guess not
05:35 preflex_ joined #mojo
05:39 lammel2 joined #mojo
05:45 Vandal joined #mojo
05:48 arthas joined #mojo
05:53 sromanov joined #mojo
05:59 driller_work nice update
06:03 tempire $_[0]->($root = $routes);
06:03 tempire what in google's name does that do?
06:05 crab $sub = $_[0]; $root = $routes; push @args, $root; $sub->(@args)
06:07 koban joined #mojo
06:08 AmeliePoulain joined #mojo
06:09 tempire oh right.  the first arg to routes is a sub ref.
06:09 tempire so to speak
06:09 purl as it were
06:26 arthas joined #mojo
06:32 wafflesftw marcus: lite apps actually can call controller ;p
06:33 marcus wafflesftw: how?
06:33 marcus get '/foo' => 'bar#baz', ?
06:33 wafflesftw get '/foo' => {controller => 'bar', action => 'baz'};
06:33 marcus cool.
06:33 wafflesftw or get('/foo')->to('bar#baz');
06:34 wafflesftw and you might have to set app->routes->namespace()
06:34 wafflesftw but that's it
06:36 wafflesftw you can build all kinds of franken-frameworks around mojolicious :)
06:37 marcus :)
06:41 tempire um
06:41 tempire http://pastie.org/2572399
06:41 tempire am I misunderstanding, or should /two & /three be unaffected by the under?
06:42 wafflesftw they should
06:42 tempire 'cause with that setup, both /two & /three require ?ok=1
06:49 mohan_ joined #mojo
06:50 * wafflesftw debugs
06:52 wafflesftw oh of course
06:58 GitHub162 joined #mojo
06:58 GitHub162 [mojo] kraih pushed 1 new commit to master: http://git.io/ofcWBw
06:58 GitHub162 [mojo/master] fixed small route block bug - Sebastian Riedel
06:58 GitHub162 left #mojo
06:59 wafflesftw tempire: should be fixed
07:02 tempire ah the infamous *should*
07:02 tempire drum roll....
07:02 purl it's like a band in your mouth!
07:02 tempire it works!
07:02 wafflesftw \o/
07:03 marcus rum droll!
07:03 * tempire reads up on perl prototypes
07:06 wafflesftw hmm, maybe group is a better name :S
07:06 * wafflesftw is not sure again
07:06 tempire I keep flipping
07:07 tempire route_group would be the most clear.  but that's super ugly.
07:07 wafflesftw maybe even something else like section {}
07:07 tempire maybe not super.
07:08 tempire batch?
07:08 purl hmmm... batch is awesome.
07:09 tempire grouping
07:09 purl i heard grouping was *much* more useful than backreferences
07:09 tempire oh oh
07:09 tempire congregation!
07:09 wafflesftw more {}
07:09 tempire subroutes
07:11 tempire gaggle
07:11 marcus section8 {}
07:12 wafflesftw scope {}
07:12 tempire district9 {}
07:12 perlrocks Twitter: "@ I takayuki_shmz, I'll never mojolicious" (ja) --mandy_44 http://twitter.com/mandy_44​/status/116771854437449728
07:12 tempire scope sounds good
07:12 tempire oh mandy
07:12 marcus NEVER
07:12 tempire why!?
07:13 wafflesftw realm {}
07:13 driller_work groute \o/
07:13 marcus rote {}
07:13 crab grope {}
07:13 tempire scope or gaggle.  those are my votes.
07:14 * wafflesftw gropes crab
07:14 * marcus gags tempire
07:14 marcus BRING OUT THE GIMP!
07:14 purl gimp's sleeping
07:14 tempire marcus: mmpphhhft!
07:15 tempire I wonder if scope is too n00b unfriendly.
07:15 wafflesftw maybe even route {} instead of routes {}
07:16 tempire that makes even less sense to me.
07:16 wafflesftw region {}
07:17 crab tempire: rationale: it's a route block, so route BLOCK
07:17 wafflesftw zone {}
07:17 wafflesftw posse {}
07:17 tempire http://images.memegenerator.ne​t/instances/400x/10167923.jpg
07:18 tempire I like zone
07:18 tempire it even sounds cool
07:19 crab how about carrot {}? it sounds great, and is a clever tongue-in-cheek reference to discworld!
07:20 wafflesftw block {}
07:21 wafflesftw avenue {}
07:22 * wafflesftw is running out of ideas
07:27 perlrocks Twitter: "Continuous Deployment With Jenkins And Rex  HowtoForge - Linux ...: sudo sh -c "curl -L cpanmin.us  perl - Mojolicious". Install Mojo..." --Cindiogasv http://twitter.com/Cindiogas​v/status/116775533156634624
07:28 crab i think group {} and route {} are the best options so far mentioned
07:29 wafflesftw group was my first thought too
07:30 wafflesftw route groups or group blocks?
07:34 tempire route groups
07:35 foomator that tweet is incomplete...
07:36 sugar joined #mojo
07:36 foomator i hate osx for not doing automagic window switching on mouse pointer position
07:40 wafflesftw so, is group {} better than routes {}?
07:44 wafflesftw http://pastie.org/2572569 # obligatory example
07:46 wafflesftw "You can also C<group> related routes, which allows nesting of multiple C<under> statements."
07:50 * wafflesftw interprets the silence as a collective yay
07:51 crab waffles: i like it (the examplanation)
07:52 cosmincx joined #mojo
07:52 tempire it works
07:53 GitHub171 joined #mojo
07:53 GitHub171 [mojo] kraih pushed 1 new commit to master: http://git.io/ET1bqw
07:53 GitHub171 [mojo/master] renamed routes function to group - Sebastian Riedel
07:53 GitHub171 left #mojo
08:02 noganex joined #mojo
08:04 judofyr joined #mojo
08:24 cosmincx joined #mojo
08:46 GitHub26 joined #mojo
08:46 GitHub26 [mojo] kraih pushed 1 new commit to master: http://git.io/vouHHg
08:46 GitHub26 [mojo/master] fixed small unicode bug in Mojolicious::Plugin::EPRenderer - Sebastian Riedel
08:46 GitHub26 left #mojo
08:54 rhaen hep
09:16 perlrocks Twitter: "Continuous Deployment With Jenkins And Rex  HowtoForge - Linux ...: sudo sh -c "curl -L cpanmin.us  perl - Mojolicious". Install Mojo..." --Vernieefuqv http://twitter.com/Vernieefu​qv/status/116802954647977984
09:36 spleenjack joined #mojo
09:38 marcus wafflesftw: any way to get a callback for a request timeout?
09:39 wafflesftw marcus: doesn't on_finish fire?
09:40 marcus wafflesftw: didn't look like it from IOLoop->_drop
09:40 marcus but maybe I misread the code
09:42 wafflesftw guess that would be a bug
10:01 wafflesftw found it
10:06 soulchild joined #mojo
10:08 wafflesftw OMG
10:08 wafflesftw marcus: this might not be fixable
10:09 wafflesftw perl explodes
10:09 wafflesftw erl(53942) malloc: *** error for object 0x7fc72b6413c8: pointer being freed was not allocated
10:18 wafflesftw marcus: http://pastie.org/2573073
10:18 wafflesftw here's the patch, i'm about to give up
10:23 judofyr wafflesftw: wow. isn't it pretty bad when Perl blows up?
10:23 wafflesftw it just shouldn't happen
10:24 wafflesftw in fact i've never seen a fail like that
10:26 wafflesftw and if i comment out line 203 it suddenly works again
10:29 perlrocks Twitter: "Continuous Deployment With Jenkins And Rex  HowtoForge - Linux ...: sudo sh -c "curl -L cpanmin.us  perl - Mojolicious". Install Mojo..." --Brianneqdxif http://twitter.com/Brianneqdx​if/status/116821291000016896
10:41 wafflesftw judofyr: punch marcus on the nose from me please :)
10:42 marcus wafflesftw: he's a pretty small guy, he might not want to try that.
10:42 wafflesftw :S
10:43 marcus wafflesftw: that bug looks pretty nasty
10:43 wafflesftw it's ridiculous, i can only guess solutions
10:44 marcus yeah, getting malloc free errors in pure perl is pretty impressive
10:44 marcus which perl version? All?
10:44 wafflesftw ye all
10:44 wafflesftw i don't test on 5.8 anymore though, so 5.10+
10:45 wafflesftw bet it's a DESTROY+weaken thing
10:45 marcus wow, pasty sucks
10:45 marcus just realized it's raw output is actually html,not text
10:46 wafflesftw eww
10:46 marcus (http://pastie.org/pastes/2573073/text)
10:46 marcus tried piping that into curl and patch :)
10:47 marcus wafflesftw: seeing the same result on my machine
10:47 marcus so it's not your ram ;)
10:49 marcus might be osx related
10:50 marcus seems the test just hangs on freebsd
10:50 marcus ( t/mojo/user_agent.)
10:50 marcus .t
10:51 marcus runs 38 and then stops
10:53 marcus wafflesftw: so it seems the patch is wrong and the ioloop just hangs
10:53 marcus not sure why that causes a malloc crash on osx
10:53 GitHub179 joined #mojo
10:53 GitHub179 [mojo] kraih pushed 1 new commit to master: http://git.io/2chr4A
10:53 GitHub179 [mojo/master] fixed close event bug in Mojo::IOLoop - Sebastian Riedel
10:53 GitHub179 left #mojo
10:53 wafflesftw marcus: try that
10:54 wafflesftw the cleanup code is much more relaxed now, but there's a potential for leakingnow
10:55 wafflesftw load tested a bit, no obvious leaks after 100k connections
10:55 wafflesftw but there's a possibility
10:58 wafflesftw perl -Mojo -E'a("/" => sub { shift->on_finish(sub { warn "fires!\n" }) })->start' get /
10:58 wafflesftw here's also a oneliner to test on_finish
10:58 wafflesftw (takes 15 seconds)
10:59 judofyr Problem loading URL "/". (Premature connection close.)
10:59 wafflesftw that's the intended result
10:59 judofyr no "fires!" though
10:59 wafflesftw with a "fires!" before
10:59 judofyr :)
11:00 wafflesftw you're using latest github version?
11:00 wafflesftw otherwise i don't care ;p
11:00 judofyr then just don't care :)
11:00 * wafflesftw doesn't care
11:01 marcus jump around like you just don't care!
11:01 marcus judofyr: it works on master.
11:01 judofyr yay
11:05 wafflesftw too bad i have no idea how to replicate the malloc bug small scale
11:34 wafflesftw damn, already 7700 unit tests
11:49 tholen joined #mojo
12:04 wafflesftw yay, big bang theory starts again today
12:10 marcus \o/
12:11 robinsmidsrod joined #mojo
12:15 giwi joined #mojo
12:24 Coke \o/
12:24 judofyr |o|
12:25 Coke /o/
12:25 judofyr \o\
12:26 marcus ~~~~~~~/)~~~~~ \o/~~~~~~
12:26 judofyr ~~~~~~~~~~~~/) /o\~~~~~~
12:27 judofyr related: http://www.youtube.com/watch?v=olhczmTbB4I
12:30 koban joined #mojo
13:21 crab if i just didn't care, jumping around isn't what i'd be doing.
13:30 perlrocks Twitter: "Continuous Deployment With Jenkins And Rex  HowtoForge - Linux ...: sudo sh -c "curl -L cpanmin.us  perl - Mojolicious". Install Mojo..." --Tamaswnwg http://twitter.com/Tamaswnw​g/status/116867023086170112
13:31 sicp-metaperl joined #mojo
13:42 wafflesftw hmm, number of new watchers on github has gone down drastically, wonder if the shorter readme has anything to do with it
13:49 esskar joined #mojo
14:03 koban left #mojo
14:06 KayT3 joined #mojo
14:18 crab you need an a/b test! i'll fork mojolicious and call it gonzolicious and then we can put more stuff in its readme and see if it becomes as popular.
14:18 wafflesftw ;p
14:20 GitHub131 joined #mojo
14:20 GitHub131 [mojo] kraih pushed 1 new commit to master: http://git.io/fOs3Uw
14:20 GitHub131 [mojo/master] better readme examples - Sebastian Riedel
14:20 GitHub131 left #mojo
14:21 wafflesftw i've updated the examples a bit too
14:21 wafflesftw the RESTful one really had to use respond_to :)
14:22 wafflesftw they give a rather good overview now i think
14:22 wafflesftw website has been updated too
14:23 wafflesftw just hinting at "growing" now, no more wall of text examples… those just don't work
14:25 wafflesftw gonna compare analytics data in a week or so ;)
14:28 perlrocks Twitter: "Mojocast # 3: Authentication, Helpers, and Plugins # perl # mojolicious http://t.co/HMYxMPAK - understandable even without subtitles" (ru) --shoorick77 http://twitter.com/shoorick7​7/status/116881449449295873
14:28 wafflesftw also think we had more success with the "Perl Duct Tape For The HTML5 Web" than with "Duct Tape For The Web"
14:28 wafflesftw *+slogan
14:38 GitHub58 joined #mojo
14:38 GitHub58 [mojo] kraih pushed 1 new commit to master: http://git.io/sjp03Q
14:38 GitHub58 [mojo/master] improved slogan - Sebastian Riedel
14:38 GitHub58 left #mojo
14:43 elb0w Lol
14:46 sicp-metaperl joined #mojo
14:58 abra joined #mojo
14:59 wafflesftw buzzwords are important
15:02 elb0w should add "low latency"
15:03 judofyr and "async"
15:03 wafflesftw s/non-blocking/async/g
15:04 wafflesftw s/async/low latency async/g
15:04 judofyr "highly scalable" — or is that out again?
15:05 wafflesftw web scale
15:05 purl web scale is mongodb and at http://www.xtranormal.com/watch/6995033/
15:06 judofyr web scale of course!
15:24 yko joined #mojo
15:28 kaare joined #mojo
15:52 GitHub16 joined #mojo
15:52 GitHub16 [mojo] kraih pushed 1 new commit to master: http://git.io/5SfT_w
15:52 GitHub16 [mojo/master] fixed many typos - Sebastian Riedel
15:52 GitHub16 left #mojo
15:58 sromanov joined #mojo
15:58 GitHub199 joined #mojo
15:58 GitHub199 [mojo] kraih pushed 1 new commit to master: http://git.io/RNse8w
15:58 GitHub199 [mojo/master] fixed a few more typos - Sebastian Riedel
15:58 GitHub199 left #mojo
16:03 wafflesftw marcus: do you know anything about the textmate 2 tweet judofyr just retweeted?
16:07 wafflesftw http://lists.macromates.com/text​mate/2011-September/033038.html
16:07 wafflesftw wow
16:14 crab oh wow, you downcased title words
16:14 crab i love that.
16:17 wafflesftw yea, played with it a bit, and proper case tends to be more pleasant
16:18 wafflesftw not even sure where i picked up the ucfirst() habit
16:32 marcus wafflesftw: heard that trick before, he didn't say which year!
16:37 wafflesftw does seem serious
16:37 wafflesftw after all they've started porting bundles
16:47 marcus yeah, was just being coy
16:47 grim_fandango joined #mojo
16:48 marcus there must be private betas out there then
16:48 marcus maybe you should ask for one to port the mojolicious bundle ;-)
16:48 wafflesftw :)
16:57 marcus 18:20:00 allan ~ [15:40:04] but it will be released before xmas this year
16:57 marcus looks like december tho
17:00 tempire marcus: that's an excellent idea.
17:02 marcus upvote - http://news.ycombinator.com/item?id=3026654
17:02 marcus :)
17:02 marcus cosimo++ # perl news
17:03 tempire quick quick quick!
17:03 tempire I know this game :)
17:03 tempire upvoted.
17:04 tempire not very sexy keywords, though.  perl, mysql, and flickr.
17:07 marcus yeah, it's not gonna work out :)
17:09 d4rkie joined #mojo
17:10 shonorio joined #mojo
17:26 amoore joined #mojo
17:28 lammel2 joined #mojo
18:21 DaniBunny joined #mojo
18:32 perlrocks Twitter: "sudo sh -c "curl -L cpanmin.us  perl - Mojolicious". Install Mojolicious on your CI Server and Webserver, too. After installing creat..." --Hortensialvmmx http://twitter.com/Hortensialv​mmx/status/116942915963588608
18:32 perlrocks Twitter: "Continuous Deployment With Jenkins And Rex  HowtoForge - Linux ...: sudo sh -c "curl -L cpanmin.us  perl - Mojolicious". Install Mojo..." --Letitiarjfjt http://twitter.com/Letitiarjf​jt/status/116942917943300097
18:35 tabbi joined #mojo
18:41 sicp-metaperl joined #mojo
18:50 rhaen KRAIH!
18:52 wafflesftw sup?
18:52 purl Yo dawg
18:53 rhaen holy shit it works!
18:53 rhaen really, great work, irs!
18:53 wafflesftw Oo
18:54 rhaen I am just checking 2500 redirects on my companies site for status - all async.
18:54 rhaen it's so cool!
18:54 wafflesftw :)
18:54 rhaen HOLY SHIT IT WORKS!
18:54 * rhaen dances around.
18:55 rhaen and all I need for this crazy stuff is a single installation: Mojo.
18:55 rhaen huh, oh, I am storing the data for later usage in JSON, sure - Mojo::JSON
19:12 rhaen omg!
19:12 rhaen OMG!
19:12 rhaen OOMMGG!
19:13 wafflesftw hope you're not getting a heart attack there ;p
19:13 rhaen I can't believe it. Who is serving a 301/302 instead of a 404?
19:14 rhaen Mojo needs a detection for my company - is this a 302 or a 404 (aka parse the content)
19:14 tempire http://www.youtube.com/watch?v=7mZZd4gQrrg
19:14 wafflesftw !
19:15 rhaen true!
19:22 stephan48 elb0w: you already created a database plugin for dbix::connector?
19:24 elb0w I plan to this weekend
19:24 elb0w but im going to wrap fixup in the handler Ithink
19:24 elb0w and give it its own call
19:24 elb0w I always hated wraping my code in a fixup sub
19:24 stephan48 ye
19:24 elb0w why you need it?
19:25 elb0w shouldnt take more than an hour to write
19:26 * elb0w is very happy with the zsh theme he made :o
19:26 stephan48 i used dbix::connector before in deaemon apps, to ensure the connection is always up
19:26 elb0w yeah I have a weird bug in one of my daemons with DBIx that it fails
19:26 stephan48 and ye should be simple, but why doing the work twice? ;)
19:26 elb0w havent been able to reproduce it
19:27 elb0w yeah if you dont write it by saturday night I will
19:27 elb0w :P
19:27 elb0w maybe ill write it tonight after the gym
19:27 stephan48 this way i can cross out the possibility that its just the db con which is out
19:27 stephan48 :)
19:28 stephan48 i think i will write something up
19:28 elb0w Yeah had a server stop working
19:28 elb0w put it into dev mode
19:29 elb0w started working
19:29 elb0w go to debug couldnt figure it out
19:29 elb0w put it back to hypno
19:29 elb0w working fine with no changes
19:29 elb0w so I assume its the db
19:30 stephan48 especially in long running apps this can be a problem
19:31 kom i ♥  mojo
19:32 elb0w How fancy am i https://gist.github.com/1235778
19:32 elb0w makefile for mojo project
19:32 elb0w :o
19:34 kom im interested in the next mojocast
19:34 kom really nice work there
19:34 elb0w https://gist.github.com/1235786
19:35 stephan48 :)
19:35 elb0w really handy
19:35 elb0w make prod / make dev ftw
19:35 stephan48 ye
19:37 sugar joined #mojo
20:01 elb0w lol
20:35 * marcus just finished an ikea project
20:36 marcus they might not cost much, but if I calculate the labor compared to doing consulting, they are really expesnive
20:36 marcus expensive
20:48 sicp-metaperl joined #mojo
20:51 tabbi left #mojo
21:29 estrai joined #mojo
21:52 marty joined #mojo
22:38 tempire kom: glad you like it
23:16 elb0w_ joined #mojo
23:22 perlrocks Twitter: "orgy {under sub {}; ground {};} # mojolicious" (pl) --jmmills http://twitter.com/jmmills​/status/117016023948992513
23:23 jmmills ^ buggy
23:23 jmmills my twitter update doesn't say ground, it says grunt {};

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