Camelia, the Perl 6 bug

IRC log for #mojo, 2012-01-11

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

All times shown according to UTC.

Time Nick Message
00:41 arpadszasz joined #mojo
00:42 fmerges joined #mojo
00:45 tempire GabrielVieira: That's a volatile question.  There's no official recommendation.
00:45 tempire Some folks like DBIx::Class.
00:45 tempire some folks like DBI by itself
00:45 tempire others like Rose::DB
00:47 GabrielVieira tempire: thanks, but the connection should be in the startup sub? any problem with hypnotoad?
00:47 tempire put it in an attribute
00:49 tempire https://github.com/kraih/mojo/wiki/Hyp​notoad-prefork-web-server#wiki-___top
00:49 tempire search for "Database connection problem in preforking"
00:52 GabrielVieira thanks again!
00:52 GabrielVieira tempire++
00:59 grim_fandango joined #mojo
01:16 herrclark joined #mojo
01:23 hshong joined #mojo
01:31 d4rkie joined #mojo
01:55 alnewkirk joined #mojo
02:01 D4RK-PH0ENiX joined #mojo
02:01 jnap joined #mojo
02:14 alnewkirk joined #mojo
02:15 d4rkie joined #mojo
02:21 three18ti joined #mojo
02:58 j3nnn1 joined #mojo
03:09 gabo2 joined #mojo
03:11 alnewkirk joined #mojo
03:29 herrclark_ joined #mojo
03:35 * tempire glitters
03:38 Psyche^ joined #mojo
03:44 grim_fandango joined #mojo
03:59 gshank joined #mojo
04:10 xaka joined #mojo
05:30 D4RK-PH0ENiX joined #mojo
05:35 sri moin
05:49 osprey joined #mojo
05:50 osprey left #mojo
06:12 koban joined #mojo
06:14 marcus åmoin
06:20 sri marcus: http://www.artefactgroup.com/wvil/
06:20 marcus sri: sweet concept
06:22 marcus sri: iphone 5 - now with a micro four thirds mount.
06:27 sri i think the iphone5 will be thinner :)
06:28 marcus yes.
06:29 marcus wasn't being serious about the slr mount. 99% wouldn't want that.
06:48 sri yea, but a wireless lense with sensor would be pretty damn cool
06:54 batman joined #mojo
06:55 batman joined #mojo
07:31 marcus sri: yupp.
07:37 marcus sri: the Plugins->add_hook method says it's deprecated for Plugins->on , but Mojolicious::Plugins doesn't document a ->on method? How come?
07:38 sri it's inherited
07:38 sri you're not supposed to use it directly anyway
07:39 marcus $self->plugins->on( before_dispatch reads very badly.
07:40 sri you're not supposed to do that
07:40 marcus good
07:40 sri it's just an implementation detail
07:41 marcus sri: so $self->hook(before_dispatch , right?
07:41 sri yes
07:41 marcus interesting, wonder how they fucked up this app so bad morbo doesn't connect to the listen port.
07:43 sri if something is so old it uses add_hook, chances are there are many many features used that have been deprecated and removed
07:43 marcus WTF - perl script/myapp daemon  returns
07:43 sri most likely even pre 1.0
07:44 marcus sri: this app is in production with a recent mojolicious, afaik
07:44 marcus it's meetv.no
07:44 marcus probably the plugins->add_hook was just done by someone ignorant
07:44 spleenjack joined #mojo
07:44 marcus and was likely wrong even when it was written
07:49 sugar joined #mojo
07:52 Vandal joined #mojo
07:56 marcus hmm, really can't see what they are doing to make it blow up.
08:00 rsimoes1 left #mojo
08:01 marcus oh fuck
08:02 marcus it's the hacks from the ws client that fuck up the ioloop
08:02 marcus it's pre sane parallol...
08:02 marcus so it probably just stops the ioloop
08:03 marcus local $Mojo::IOLoop::LOOP = $self->ioloop; # phear
08:04 sri that variable is long gone
08:04 sri but yea, it has always been insane
08:05 marcus sri: yeah, will rewrite the ws-client to use ::Trigger
08:06 sri interesting that doesn't die
08:06 marcus yeah, it seems to just stop the ioloop so that it returns
08:06 sri eww
08:07 sri but then again, the api was quite messy when that variable still existed
08:08 sri triggers don't exist anymore btw ;p
08:08 sri we finally found a good name a few months back
08:08 sri ->delay
08:09 marcus ah yes
08:09 sri also still experimental though
08:10 sri hmm
08:11 sri actually doesn't have to be though, since i'm rather sure about the api
08:12 sri then again, there was very little feedback so far
08:14 sri when it comes to the ioloop api, i'd rather keep everything experimental until i get some serious positive feedback
08:17 marcus yupp
08:17 * marcus tries to figure out wtf the rules are for this thing.
08:26 berov joined #mojo
08:33 alnewkirk joined #mojo
09:17 GitHub110 joined #mojo
09:17 GitHub110 [mojo] kraih pushed 1 new commit to master: http://git.io/MVIKdw
09:17 GitHub110 [mojo/master] better add_hook deprecation warning - Sebastian Riedel
09:17 GitHub110 left #mojo
09:17 sri marcus: that should help in the future (or rather for the short time it will still be around)
09:20 sri marcus/tempire/crab: i would very much appreciate a review of the Mojo::IOLoop API
09:21 sri maybe that even deserves a github issue
09:23 sri especially Mojo::IOLoop::Delay should become stable, since it is used in the documentation of multiple modules
09:24 sri (and in turn Mojo::IOLoop->delay)
09:24 sri Mojo::IOLoop->defer is also rather harmless and could become stable
09:25 sri client/server/stream are the ones i'm very unsure about
09:26 * marcus tries to get his new Delay based implementation to work, for starters.
09:26 sri iowatcher is in the middle… Mojo::IOWatcher::EV has no chance of ever becoming stable, but we might profit from stabilizing the fallback Mojo::IOLoop
09:26 sri umm
09:26 sri Mojo::IOWatcher
09:29 sri marcus: i bet you'll stumble over the marcus-proofing mechanism :D
09:30 sri "Mojo::IOLoop already running..."
09:31 marcus sri: right now - Default has to be a code reference or constant value at /Users/marcus/perl5/perlbrew/perls/perl-5.14.​1/lib/site_perl/5.14.1/Mojolicious/Plugins.pm line 21 :)
09:31 sri boring… that's just Mojo::Base
09:32 marcus I know
09:32 marcus sri: yupp, just his Mojo::IOLoop already running… :D
09:33 marcus hit
09:33 sri \o/
09:33 sri you can't block and wait, you'll have to use the callback
09:40 GabrielVieira joined #mojo
09:47 marcus sri: the synopsis makes it look like $delay->wait blocks ?
09:51 * marcus phears
09:51 * marcus tries to read some unit tests.
09:54 marcus sri: I don't understand how it's supposed to be used inside a mojo app, and delay.t doesn't seem to do that at all.
09:54 sri marcus: correct, you can't use wait
09:55 marcus sri: so I can't make it block?
09:55 marcus that breaks this entire design
09:55 sri yes, you can't make it block
09:55 sri http://mojolicio.us/perldoc​/Mojolicious/Controller#ua # here's a correct example
09:57 sri but the bottom line is that you just can't block
09:57 marcus sri: makes it impossible to implement the current design.
09:58 marcus sri: I do $self->stash(foo => $self->ws->whatever);  $self->stash(bar => $self->ws->whatever2); then block on $self->stash('bar')->next()
09:58 marcus not seeing how I can do that with this :-/
09:59 sri what is ws?
09:59 purl ws is short for "wrong server" or short for williams-sonoma, refuge for the culinarily challenged. or "work safe" or western samoa or more important in P& than P5 or web::simple
09:59 marcus sri: MeeTV::WS::Client
09:59 marcus the thing that was using the horrible local hacks before
09:59 sri i prolly shouldn't tell you… but you might be able to make the horrible hack work again
09:59 sri wouldn't be any more stable though
10:00 marcus sri: tell me :)
10:00 sri local *{Mojo::IOLoop::singleton} sub { $ioloop }; or whatever you used
10:00 sri *+=
10:00 sri monkey patch
10:00 purl monkey patch is probably a way to extend or modify the runtime code of dynamic languages or see: monkey patching
10:01 sri but it's really really evil
10:02 marcus Well, I have to support this api. My only other alternative afaict would be to disable parallel requests and do everything blocking
10:02 marcus ws-client has to work outside of a Mojo app as well.
10:03 marcus Ambiguous use of *{Mojo::IOLoop::singleton} resolved to *Mojo::IOLoop::singleton
10:03 sri well, we're not gonna support that as a core feature, doing both, blocking and non-blocking is bad enough
10:05 sri i'd only go there if perl core started supporting coroutines
10:05 sri then it could be done properly
10:07 marcus local *Mojo::IOLoop::singleton = sub { $self->ioloop; }; seems to be the thing.
10:07 * sri phears
10:09 sri making a non-blocking api look blocking without coroutines is just madness
10:10 sri MADNESS!
10:10 purl Our house, in the middle of our street.
10:10 marcus NO, THIS IS STARTSIDEN!
10:10 * sri falls off chair
10:13 marcus weird, this hack works with daemon, but returns no data with morbo
10:13 preflex_ joined #mojo
10:15 marcus DOOM
10:19 cosmincx joined #mojo
10:20 sri you're in unsupported territory, infinite number of things to go wrong
10:21 sri i'm open to ideas for making ioloop handling easier though
10:26 sri our biggest problem however is that pretty much nobody really understands what non-blocking actually means
10:26 sri (imo)
10:27 sri which pretty much means that making any kind of hybrid design easier would be a bad idea
10:28 sri what we need users to understand is that "blocking = single request, non-blocking = parallel requests with callbacks"
10:32 sri maybe supporting blocking requests was a mistake
10:53 berov sri: may be you need to explain somewhere in the documentation how one would write an app if he/she knows the difference between blocking and nonblocking
11:01 stephan48 show advantages of both...
11:10 sri if i knew how, i would have done it by now
11:12 sri also, if you know what blicking and non-blocking means the current documentation should be perfectly fine
11:12 sri s/i/o/
12:50 sri i actually have some ideas for explaining evented web apps, but fleshing them out would require a lot more time than i can afford
12:52 sri this time it's really someone's else
12:53 sri umm
12:53 sri someone else's turn
12:58 marcus memowe: you have to steal this - http://www.youtube.com/watch?v=cu5uXXulnNk
13:14 trone joined #mojo
13:19 berov imho most develoeprs know about the difference between for example Vanila CGI and mod_perl(any persistent) env but blocking and nonblocking is mysetry - at least for me :)
13:19 berov I read about node.js
13:20 berov but still do not get the man idea - is it actually the same that you achieve in Mojolicious?
13:20 berov *main*
13:24 jnap joined #mojo
13:34 lammel2 joined #mojo
14:08 hshong joined #mojo
14:09 amoore joined #mojo
14:25 elb0w sri: you should make a youtube video about what non-blocking really means
14:25 elb0w complete with pictures
14:26 sri is anyone actually listening?
14:26 sri elb0w: HOW?!
14:26 sri what does non-blocking really mean?
14:27 berov yes?
14:27 purl it has been said that yes is the answer to the latest question
14:27 sri that's the whole problem, it's an extremely difficult topic
14:27 berov many people that start programming in perl aro NOT computer scientists
14:28 berov and even less are those writing in PHP for example
14:28 sri let me rephrase that… i don't know how to explain it
14:28 berov I for example do apps running aunder mod_perl and mod_fastCGI
14:29 berov ye ok
14:29 berov just thinking loudly hehe ;)
14:30 berov will it help if one try to understand node.js for example?
14:31 berov is it the same thing?
14:31 berov if yes it will make things easier for many people
14:31 berov since almost every one has written event driven scripts in JavaScript on the browser side
14:32 sri i guess you could say that they are the same in that sense
14:32 berov yep there is spark in the dark :)
14:33 berov so mojo implement his thing ?!?!
14:33 berov implemets*
14:33 berov hhh anyway :)
14:34 berov I was wandering what so much do you do and did not bother to look enough deeply
14:37 berov sri: is mojolicious doing the same what node.js is doing (if i know what I am asking)?
14:38 sri not the same, similar
14:38 berov is this the big differenese between Mojo and the other Perl frameworks apart from using just CORE Perl modules
14:38 sri yes
14:39 berov actually I use Mojo because of the No dependencies thing
14:39 berov ah great then
14:39 berov and I suppose many are like me
14:40 sri easy and fast installation is really just the gateway drug
14:41 berov ye this is a good approach to get people addicted
14:41 sri but i'm having a hard time really getting that point across, nobody understands what real-time web means yet
14:41 berov yes meee too :)
14:41 sri we are a few years early
14:41 berov understand
14:42 berov wandering waht to say - better nothing ;)
14:43 berov you wrote somewere that Mojo should be written with no much Perl Magic - to make it ready for Perl 6
14:44 berov now how much far are we from perl 6 rediness?
14:44 sri the limiting factor is perl 6
14:44 r0bert Is there an example of how to let Apache server static files and let Mojolicious just server dynamic content?
14:45 berov robert: this should be not different in any way than a regular mod_perl app
14:47 berov sri: make it a trademark "real time web framework" :)
14:48 berov then somebody may get interested :)
14:49 berov sri: BTW why similar mojo <-> node - what is the differense
14:49 cosmincx joined #mojo
14:49 berov ?
14:50 berov except the programming language
14:50 netfeed r0bert: just put your static stuff somewhere else other the in the public/ folder?
14:50 netfeed and let apache serve it?
14:52 berov robert: what netfeed says is completely enough
14:53 r0bert thanks
14:53 berov r0bert: ecample https://github.com/kberov/MYDLjE
15:10 metaperl|2 joined #mojo
15:12 metaperl joined #mojo
15:13 marcus @imdefined is such a  clever guy.. http://t.co/U213V2is
15:18 GitHub197 joined #mojo
15:18 GitHub197 [mojo] kraih pushed 1 new commit to master: http://git.io/-V9s5g
15:18 GitHub197 [mojo/master] added a few more real-time web recipes - Sebastian Riedel
15:18 GitHub197 left #mojo
15:20 sri those are a little more introductory by nature
15:20 inokenty joined #mojo
15:20 noganex joined #mojo
15:21 sri it's not strictly real-time web, but i'm not sure how else to organize it
15:23 sri marcus: and a thief
15:23 sri i did not give permission to use the illustration
15:25 alnewkirk joined #mojo
15:28 metaperl|3 joined #mojo
15:31 marcus Sri: you mean your avatar?
15:31 sri yes
15:32 marcus Motivates me to write the blog post I talked about last week.
15:34 berov what happened, so vti seem sto hate mojo so much lately ?
15:35 berov I hate such wars
15:36 sri marcus: dunno, that caricature doesn't give me anything
15:36 berov BTW it is a free advertisement :)
15:37 sri improving a wheel is hard work, glad he noticed
15:37 * sri shrugs
15:46 marcus Sri: good.
15:50 sri i'm much more concerned with event documentation
15:56 sri http://mojolicio.us/perldoc/Mojolic​ious/Guides/Cookbook#REAL2DTIME_WEB
15:56 sri that needs some serious contributions
15:57 sri ideally i would like that and the user agent section grow into a guide
15:57 sri *+to
15:59 sri hmm
15:59 alnewkirk joined #mojo
15:59 sri hope real-time and timers don't cause conusion :S
16:00 netfeed "Recurring timers are slightly more powerful, but need to be dropped manually again, or they would just keep running as long as the server process stays up." <-- does that mean that there's just one client per process?
16:00 sri how would you come to that conclusion?
16:01 netfeed i'm not entierlly sure, maybe the "but need to be dropped manually again", was something with the text that made me think so at least
16:02 sri well, it's not the case, the recurring timer would get emitted again, over and over
16:02 sri even after the client connection is long closed
16:02 netfeed alright
16:03 sri feel free to rephrase
16:03 netfeed if i would connect with a new client, would that mean that i wouldn't be able to get a response again until the current timer was done with it's current pass?
16:04 sri right
16:04 sri another important point i have no clue how to explain
16:07 netfeed the websocket stuff is pretty cool
16:14 batman joined #mojo
16:16 batman joined #mojo
16:21 xaka joined #mojo
16:21 memowe marcus: not bad, maybe it's a good idea to make screencasts for Bootylite and Contenticious. :)
16:22 GitHub35 joined #mojo
16:22 GitHub35 [mojo] kraih pushed 1 new commit to master: http://git.io/v0BKVw
16:22 GitHub35 [mojo/master] improved real-time web recipes some more - Sebastian Riedel
16:22 GitHub35 left #mojo
16:22 sri netfeed: that should be better
16:23 sri and user agent is now the first recipe
16:30 berov what I did is to paste the code for the timer into a file and try it. whta is seen is just a 12345 - a little bit slower response
16:30 berov how to explain to a usr that this is something revolutionary
16:31 sri it's not about the example, it just shows how timers work
16:31 sri the recurring timer could just as well check a log file for new entries
16:34 berov # Count to 5 in 1 second steps
16:34 berov get '/' => sub {....}
16:34 berov #in a nearby peace of code
16:34 berov #this response will not be affected by the other
16:34 berov get '/foo' =>sub{...}
16:35 sri no pasting into the channel please
16:35 berov may be something like this will explain it better
16:35 berov ah sorry
16:35 berov just  wanted to give an example how I would understand the main point
16:36 berov peace/piece
16:36 berov did I undertand it right?
16:39 berov but isn't this achieved by many (pre)forking servers or (I do not know what I am talking about)
16:40 berov ?
16:43 sri i'll address that point in the next commit
16:44 berov great
16:45 ki0 joined #mojo
16:52 GitHub162 joined #mojo
16:52 GitHub162 [mojo] kraih pushed 1 new commit to master: http://git.io/svQZxw
16:52 GitHub162 [mojo/master] refined real-time web recipes - Sebastian Riedel
16:52 GitHub162 left #mojo
16:55 sri that should bring the point across
17:14 mercutioviz joined #mojo
17:18 mattastrophe joined #mojo
17:23 grim_fandango joined #mojo
17:33 GitHub16 joined #mojo
17:33 GitHub16 [mojo] kraih pushed 1 new commit to master: http://git.io/yYbJdA
17:33 GitHub16 [mojo/master] added another real-time web recipe - Sebastian Riedel
17:33 GitHub16 left #mojo
17:56 mateu joined #mojo
17:57 mateu left #mojo
18:01 Foxcool joined #mojo
18:01 abra joined #mojo
18:06 mattastrophe joined #mojo
18:06 jnap joined #mojo
18:15 abra joined #mojo
18:32 mattastrophe joined #mojo
18:34 jnap joined #mojo
18:36 netfeed sri: nice
18:38 abra joined #mojo
18:39 tempire memowe: yes.  more screencasts are needed.
18:40 tempire Was the graphic intended as an insult?
18:40 tempire It looks like a complement to me
18:40 vel joined #mojo
18:40 tempire Everyone else is reinventing over and over again, and stuck at the bottom of the hill
18:41 tempire mojolicious is pushing forward, in spite of everyone else's lack of motion
18:41 sri tempire: i like that explanation
18:41 tempire or reinventing.  I guess that's an attempt to make everyone else more endearing.
18:41 tempire *reinwenting
18:41 sri they are reinventing, we are improving :D
18:42 sri heh, that makes sense!
18:45 tempire memowe: if you're on a mac, I have directions for creating a screencast.  doesn't have to be as polished as the mojocasts.  can be quick like khan academy stuff.
18:45 tempire that goes for everyone else as well
18:46 tempire go go go!
18:46 tempire also, the best way to learn something well is to force yourself to explain it
18:47 tempire http://blogs.perl.org/users/tempire/​2011/08/the-making-of-mojocasts.html
18:48 abra_ joined #mojo
18:58 ki0 joined #mojo
19:06 GabrielVieira joined #mojo
19:10 GabrielVieira Hi there, I need some help running mojolicious::lite with fcgi, its returning an error cause fcgi runs the dispatch.fcgi but its output is the 'usage' message. I've also used in the apache httpd.conf -> FCGIWrapper "/srv/www/test/dispatch.fcgi fastcgi" .fcgi but it now tells there is no fastcgi option
19:26 abra joined #mojo
19:34 batman joined #mojo
19:40 abra_ joined #mojo
20:22 mattastrophe joined #mojo
20:27 kaare_ joined #mojo
20:28 abra__ joined #mojo
20:32 abra joined #mojo
20:38 metaperl|3 joined #mojo
20:38 abra_ joined #mojo
20:46 marcus tempire/sri: It's obviously casting sri as http://en.wikipedia.org/wiki/Sisyphus
20:46 jnap joined #mojo
20:48 tempire yes,  but I choose to reform the negativity as a positive.  haters gonna hate :)
20:49 sri well, it's a boring caricature no matter how you look at it
20:50 sri i liked the one where i was fighting with mst much better
20:50 tempire I never saw that one
20:50 marcus was there chainsaws?
20:50 sri there was chainsaws
20:51 sugar url?
20:51 sri don't remember
20:51 purl Remember what?
20:51 * sri hugs purl
20:51 purl sri: get off me, you botvert!
20:51 sri was years ago
20:51 marcus don't remember the titans.
20:52 * marcus has just hooked couchpotato up to imdb watchlist and is a very mighty pirate indeed.
20:52 sri ARRRR
20:53 sugar it's abotut catalist? =)
20:56 marcus no, cattlelust
20:56 * tempire disavows all previous accusations of cattlelust
20:56 tempire I really like the startup row concept for yapc
20:57 tempire actually, I'm really happy about all the yapc PR this year
20:59 GitHub177 joined #mojo
20:59 GitHub177 [mojo] kraih pushed 1 new commit to master: http://git.io/Vc7bsA
20:59 GitHub177 [mojo/master] added another timer example - Sebastian Riedel
20:59 GitHub177 left #mojo
21:13 abra__ joined #mojo
21:15 sri i think events might be best explained with a simple TCP client/server example
21:16 sri comparing it to the traditional architecture, and then explain why non-blocking scales better
21:17 sri actually interesting that everything i don't like about perl has been solved in perl 6
21:19 sri if only it was usable
21:29 perlite joined #mojo
21:35 mattastrophe joined #mojo
21:36 marty How far away is perl 6?
21:37 sri --------------------------------------​------------------------------------>
21:37 abra_ joined #mojo
21:37 sri that far
21:37 elb0w Its on my next irssi chat room?
21:37 elb0w brb
21:37 * marty squints real hard to try see that far
21:38 elb0w if you squint hard enough it looks like parrot
21:38 sri to the left, far behind the stable textmate 2 release and diablo 3
21:39 elb0w annnnnnnnnd im free
21:39 elb0w goodnight gents
21:39 mattastrophe but tastes like chicken
21:39 marty Well, as my Grandma always said, "good things are worth waiting for".  So lets hope perl 6 is that good.  :)
21:40 sri it does have enough cool features
21:42 marty I saw Tim Bunce (sp) demoing it on a video once.  Looked promising, albeit slow.
21:43 sri perl6doc does not exist at all yet
21:43 marty ouch
21:43 marty that's kinda a big project
22:04 abra__ joined #mojo
22:14 abra_ joined #mojo
22:31 kaare_ joined #mojo
22:31 * tempire <3 exceptionhub
22:42 abra__ joined #mojo
22:50 vel joined #mojo
23:02 jnap joined #mojo
23:07 abra_ joined #mojo
23:13 abra__ joined #mojo
23:28 jnap joined #mojo
23:30 Mikey hola... if someone wanted to call / dispatch from one controller to another controller as a part of the same request (not a redirect), what would be the best way to do that?
23:32 abra_ joined #mojo
23:35 Mikey actually nvm, i'm going to refactor all of this as part of my port
23:46 marcus Mike: good idea.
23:48 tempire Mikey: generally, whenever you want to do that, it's time to refactor
23:51 abra__ joined #mojo

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