Camelia, the Perl 6 bug

IRC log for #mojo, 2012-05-28

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

All times shown according to UTC.

Time Nick Message
00:35 edenc joined #mojo
01:09 AndChat|524400 joined #mojo
01:35 bird joined #mojo
01:58 d4rkie joined #mojo
02:49 SmokeMachine joined #mojo
05:10 ovnimancer joined #mojo
05:12 tomi-ru joined #mojo
05:14 jizzlotion joined #mojo
05:22 fibo joined #mojo
05:23 GabrielVieira joined #mojo
05:32 __________ joined #mojo
05:35 __________ joined #mojo
05:46 scott joined #mojo
05:55 Vandal joined #mojo
05:57 Foxcool joined #mojo
06:05 spleenjack joined #mojo
06:12 Leandr joined #mojo
06:23 pau4o joined #mojo
06:25 dbr joined #mojo
06:27 pau4o joined #mojo
06:33 GitHub26 joined #mojo
06:33 GitHub26 [mojo] kraih pushed 1 new commit to master: http://git.io/bij2bA
06:33 GitHub26 [mojo/master] documentation tweaks - Sebastian Riedel
06:33 GitHub26 left #mojo
06:51 rem_lex|pivo joined #mojo
06:54 pau4o joined #mojo
07:12 pinupgeek joined #mojo
07:39 cosmincx joined #mojo
08:10 baton8 joined #mojo
08:18 batman left #mojo
08:35 trone joined #mojo
08:48 janus tempire: for the convincing part of your talk: patches ftw! ;)
08:59 hugh joined #mojo
09:52 lukep joined #mojo
10:18 GitHub143 joined #mojo
10:18 GitHub143 [mojo] kraih pushed 1 new commit to master: http://git.io/uhC4PQ
10:18 GitHub143 [mojo/master] better debug message - Sebastian Riedel
10:18 GitHub143 left #mojo
10:23 GitHub22 joined #mojo
10:23 GitHub22 [mojo] kraih pushed 1 new commit to master: http://git.io/81dRmg
10:23 GitHub22 [mojo/master] fixed small bug in Mojo::IOLoop - Sebastian Riedel
10:23 GitHub22 left #mojo
10:27 Foxcool joined #mojo
10:37 GitHub80 joined #mojo
10:37 GitHub80 [mojo] kraih pushed 1 new commit to master: http://git.io/YEtBdw
10:37 GitHub80 [mojo/master] better descriptions for accept mutex callbacks - Sebastian Riedel
10:37 GitHub80 left #mojo
10:39 batman joined #mojo
11:02 jona joined #mojo
11:04 jona sri: i am now a happy I18N user and open for suggestions.
11:05 jona from my point of view, keeping it in core if of course easier, but i understand your position and I am not sure I would be responsive enough to help it mantain in core.
11:06 kvorg eer, as 'kvorg,' this might make sense as a continuation of a friday topic.
11:07 kvorg I don't know how you look at making more stash variables reserved, I thought 'language' would be nice to set langauges in all templates when another method (preferences, cookies etc.) is used to set the language.
11:13 kvorg I have a different topic. I need to interact with external commands, sometimes just wait for the full output, at other times keep the socket open.
11:18 sri i'm against pretty much all non essential extensions of the I18N plugin
11:19 kvorg Are there any good examples under the modern state of Mojolicious IO::Loop? I found some, but they look very complicated to me: https://gist.github.com/668320 https://gist.github.com/668326 . Then there are MojoX::AIO and MojoX::Run.
11:19 sri optional plugins could theoretically reserve whatever stash values they want
11:20 kvorg Back to I18N plugin: sounds sensible, and that is hardly essential in any way :-)
11:21 sri i've updated all plugin descriptions to encourage forking btw
11:21 kvorg It is still much nicer to use in Mojolicious than in any context where you have to go directly to Local::Maketext, ghough
11:21 sri so if you want something more advanced please fork :)
11:21 kvorg hey, i understand your position. i now have one, soon several, fully I18N packages, so I will have an opportunity to think about that.
11:22 sri perhaps your plugin can grow into a more popular choice and make the core plugin obsolete over time
11:22 kvorg If I find the calling, I will fork and make it easier to ditch it from core.
11:22 kvorg ah, same thinking, i see.
11:22 sri kvorg++
11:22 kvorg but perhaps you have made the core version too nice already :-)
11:23 kvorg it might benefit from an example in the Cookbook or Rendering guides, perhaps, can i send pull request?
11:23 kvorg (Or is there one and I am just to old to scan text?)
11:25 kvorg Ah, of course there is, right in the Rendering guide. See? U were too good :-)
11:25 sri :D
11:28 kvorg sorry to be a bother, is my feeling that MojoX::Run is outdated and a bit complicated correct? Where can I go peek to learn how to interact with external commands asynchroniously?
11:28 kvorg (I just went shopping, it did not help.)
11:31 sri everything MojoX is prolly dead
11:32 sri don't expect interacting with external commands asynchronously to be easy, it is a portability nightmare
11:32 sri just use a real event loop like IO::Async, POE or AnyEvent
11:33 sri https://gist.github.com/2324993 # here's a non streaming example i wrote a few months ago
11:54 kvorg sri: excellent, thank you very much
11:55 kvorg luckily I don't have to be portable, I don't care about anything non-Unixy
11:57 hugh joined #mojo
12:09 hide joined #mojo
13:07 Psyche^ joined #mojo
13:25 kvorg sri: i am obviously going to train myself to understand eventloops sufficiently to be able to fulfill my task. Probably it will be Mojolicious + AnyEvent. I could only find 2 examples on the Wiki: https://github.com/kraih/mojo/​wiki/Mojolicious-and-anyevent and https://github.com/kraih/mo​jo/wiki/Non-blocking-mysql ... should I try to put together something there?
13:26 kvorg Would you mind if I start by putting your example up?
13:27 sri the cookbook has a few basic examples too
13:27 sri but please do add more to the wiki
13:27 sri and sort out the ones that don't work anymore ;)
13:28 sri my blog also has a few examples
13:41 inokenty joined #mojo
14:59 kvorg btw, I did understand correctly the implication of the minimalization of Mojo::IOLoop that is should be left alone and used only internally with Mojo TCP stuff?
14:59 sri ye
15:00 kvorg Which frees you up from people like me, demanding to fix details and use it for most anything, but allows us to use AnyEvent and similar to do our stuff. Ok. Just so I am not proselysing and blasphemy ...
15:00 sri the goal is to just work with all real event loops instead of creating our own eco system
15:00 kvorg but have our own if no others are present, and for that case only?
15:01 * sri nods
15:01 * kvorg understands
15:02 sri should someone finally fix POE::Loop::EV we could run Mojo::IOLoop, AnyEvent, IO::Async and POE in the same process :)
15:02 kvorg and since AnyEvent is the most general tool, I think it is the one we should provide examples for. POE and such are for those that already have something in that system and should understand it, ye?
15:03 sri http://mojolicio.us/perldoc/Mojoli​cious/Guides/Cookbook#Event_loops
15:03 sri i favor IO::Async in examples these days, due to political problems with AnyEvent
15:04 kvorg hmm, integration goes both ways, it would seem: IO::Async::Loop::Mojo
15:04 kvorg hmm, I must have missed that, what is their bone?
15:04 sri it's just for fun
15:04 sri LeoNerd likes to play event loop jenga
15:05 kvorg ok, i was worried. i don't understand why people don't just make things work and work well but need to have their stakes and little flamewars
15:05 kvorg oh? i kinda bought his line 'we work with anything, we want to be the middleware for event programming'
15:05 sri i've been working together with LeoNerd on that
15:06 kvorg i wish mainteiners could keep their ego inside thier own development process where it can push things and developers forward ...
15:06 sri except for mlehmann all event loop authors work together
15:06 kvorg that is very nice to hear.
15:08 kvorg while in general i would now lie back and read all the event loops docs available, i am on a bit of a tight schedule with that one ... so, please, i need some advice
15:08 sri it's a little ironic that EV is more the middleware layer of event loops
15:08 kvorg EV is quite nice in efficient, no?
15:09 sri yes, but it has its fair share of problems too
15:09 sri it often doesn't compile on platforms for political reasons
15:10 kvorg grrr, how i hate that. even RMS figured out that you should compile everyhere and fnord your political reasons in other ways, and his are fnorded most everywhere
15:10 sri it currently doesn't compile on os x for example
15:10 sri you can work around that though with "CC=gcc"
15:10 kvorg so, i now have a backend thing talking to an interactive application using IPC::Open3, and need to use other programs that will just produce files or standard output ...
15:11 kvorg which event loop will be the easer for this kind of tasks? i will also need timers to time out, of course, and perhaps i will need to cache files
15:11 kvorg as i said, i only support unixy platforms, OS X included, of course
15:11 kvorg about EV on OS X: that is just silly...
15:13 kvorg if people remembered the scary days of portability issues with compilers on different unix platforms, they would never try to do antyhing like that.
15:15 sri i originally wanted to support AnyEvent natively too, but that's not allowed
15:15 mire joined #mojo
15:15 * kvorg does not understand what 'natively' means in this context.
15:15 sri Mojo::Reactor::AnyEvent
15:16 sri without the EV step
15:16 kvorg you are not allowed to admit it exists inside your own app if you don't program for it?
15:16 sri you're not allowed to use AnyEvent as a backend for another event loop
15:16 kvorg because that would break their 'middleware' metaphor?
15:17 sri mlehmann added exceptions that make AnyEvent die when it was loaded with IO::Async::Loop::AnyEvent
15:17 kvorg oh, i am sure that makes users exceptionally happy.
15:17 kvorg (pun intended, of course)
15:18 sri i expect AnyEvent to be forked in the not so distant future
15:20 sri no matter what event loop you choose, there is a catch, glad we are neutral and can support them all
15:21 sri but really, someone please fix POE::Loop::EV -.-
15:21 kvorg more pun: i thought AnyEvent was scared of forks and did not want you to fork after you start using it?
15:22 sri fork is always a problem
15:22 sri it depends on the backend
15:22 sri especially kqueue and epoll don't like fork
15:22 sri poll can work, but still tricky
15:24 sri in hypnotoad i avoid dealing with fork by starting the event loop as late as possible
15:24 kvorg ye, i pretty much gave up the idea of doing all the work in the child, the app will just have to wait a millisecond of a sort or two so i don't have to fork the app worker itself
15:24 Leandr joined #mojo
15:24 sri the example in my gist earlier does a fork
15:25 batman joined #mojo
15:25 sri but yea, it's always messy
15:25 kvorg yes, i think i understand that ... but i also find that the whole hypnotoad interface is extreamly nice to use, especially since u made a new call do the hot deployment and -s for stopping, now it is just polished
15:25 * kvorg sri++
15:26 * kvorg looks back at some old CGI.pm stuff he dares not touch and shudders in disgust
15:27 kvorg perldoc Event: LERT: Marc Lehmann may have taken over the future of event loops in Perl. Check out his libev library and EV Perl module. 25 Aug 2009
15:27 kvorg that was *ALERT: obviously this really is some touchy ground I am touching here ...
15:28 sri it's a lot worse than choosing a web framework :)
15:30 sri then there's also a new generation
15:30 sri https://github.com/typester/p5-UV
15:31 sri https://metacpan.org/module/Nginx
15:32 kvorg oh my
15:33 kvorg oh, i forgot, there is also IO::AIO ...
15:34 kvorg strange that AnyEvent actually recommends it ..
15:36 kvorg many of these event loops are also providing some strange smalltime real thread IPC based replacement thingies ... wierd
15:37 kvorg and also Resolvers ... makes you dropping the Resolver suddenly very clear to me
15:39 batman kvorg: IO::AIO and AE is written by the same guy. maybe that's why it is recommended :)
15:39 kvorg so more or less my options are to go with IO::Async::ChildManager or AnyEvent::Util::fork_call()
15:40 alexeiras joined #mojo
15:40 kvorg batman: ah, now all the flamefest information is fitting together in my head ... perhaps i should not try to parse this on a publickly logged channel or all my events will stop coming
15:40 batman ;)
15:41 * kvorg decides to try both ways an see what is easier on his brain code-wise
15:41 kvorg thanks for your advice and help
15:42 batman not sure what you where discussing, but when i hear "forking" inside a web framework i instantly think that you need a work scheduler...
15:42 batman *were
15:45 kvorg hehe, I hope I will survive, I just have to run external commands from a Mojolicious app and process the data ... the jobs take 0.1 to 30 seconds, tipically, with some deranged conrner cases that go on for minutes
15:45 batman then i really think you need to queue the jobs and handle them using a scheduler
15:49 kvorg batman: you have me scared there a bit. i was planning to run them from one of the above event interfaces, redirected to a file, then serve the results from a callback
15:49 batman then please ignore me :)
15:50 kvorg nono, i would rather be warned before i dig myself into a hole :-)
15:50 batman do what you think is a good idea. it's probably the best in this iteration.
15:51 kvorg thing is, one part of the backend has an option to cache results and i want ot be able to reuse the same instance when/if the user gets back to the same worker and request the next page of the results, and similar
15:51 batman i'm doing this at work: 1) GET /some/resource returns a token 2) put the job into a queue 3) send the response back later on
15:51 kvorg and you implement your own queue?
15:51 batman yes. unfortunately :P
15:52 batman but there's probably a gazillion queue frameworks @cpan
15:53 kvorg i must be missing something huge, but i thought i would get pretty much the same functionality if i spawn the process and check for its completion (or just issue the new lookup command) using the event loop
15:53 batman but my queue works like this: 1) poll the database for new elements 2) execute whatever the element tells the queue to do
15:53 kvorg i don't have a very big number of jobs, and only rarely will a request take more than 0.2 sec
15:53 batman pretty basic...
15:54 batman then i wouldn't bother to queue. i wouldn't bother to fork either.
15:54 batman just do it. and then if it doesn't work: rewrite
15:54 kvorg well, i didn't, but if one interesting users manages a corner case, the worker hangs for 5 minutes :-(
15:54 batman make sure you have factored out the code that does the "heavy lifting" so it can easily be move to a queue or some other place...
15:55 kvorg he gets to enjoy a spinner, the other users have enough time to write a bug report before it completes
15:55 batman there's a lot of issues with forking... but it all depends on how important it is to get a response
15:55 kvorg oh, it is factored out, i have written a whole bloody backend for this one (is used from perl programs too)
15:56 kvorg well, i will try my teeth at the async approach, go shopping and come crying back if it will be too much for me
15:56 batman like 1) what happens if the fork() fail? 2) what happens if you need to talk to resources not available to the www user (or whatever) because of security issues? 3) what happens if someone kill the fork or the web server?
15:57 batman 4) do you need a retry mechanism? 5) do you need to guaranty a response?
15:58 batman i don't like IPC, so forking is out of the question for me. i just think it's too complicated :P
15:58 batman but as i said: do what you think is the shortest way to accomplish your goal.
15:59 batman you can never fail. you just learn what not to do :)
15:59 batman also, i'm a huge fan of mvp, so don't overcomplicate stuff
16:06 kvorg batman: good points, but since I have to use an actual command to get to my data, forking is implied ...
16:06 kvorg bye, i have to change location now
16:06 batman good luck :)
16:06 kvorg #help
16:06 kvorg ups, sorry
16:06 kvorg bye
16:08 sri oh, interesting new scifi series from canada... continuum
16:09 Patterner they used the money for CGI, not actors...
16:10 batman sri: thanks for the tip
16:10 sri i'm not disappointed so far, the "you don't know who the good guys are" twist is neat
16:11 batman sounds good :)
16:12 sri too early to tell how it will develop, but at least i get my scifi fix for now :)
16:16 sri falling skies will be back next month too
16:45 xaka joined #mojo
17:19 sh4 joined #mojo
17:29 d4rkie joined #mojo
17:40 mire joined #mojo
17:45 d4rkie joined #mojo
17:58 sh4 joined #mojo
18:34 * tempire checks out continuum
18:35 tempire just discovered green lantern: the animated series
18:35 tempire it's great.
18:35 tempire but it's only for people who realize cartoons are the pinnacle of human advancement
18:43 batman is it really stupid to mix blocking and non-blocking requests in my app?
18:43 sri depends
18:43 batman it seems like it will make my life easier if i made everything non-blocking...
18:44 batman i'm sick of "Non-blocking requests in progress" when running my unittest :/
18:44 sri use different user agents
18:45 batman is it that simple? :S
18:45 sri of course
18:45 batman sounds pretty obvious when you say it...
18:46 batman after all it _is_ the ua that complains :(
18:47 batman that's a bit funny... i've been trying to make -everything- use the $app->ua, when i guess i should have gone the opposite way :)
18:47 batman everything == my plugins
18:58 sri it's a bad idea for plugins to use app->ua
18:58 sri you never know in which state it is
18:59 batman marcus: would you like to fix oauth2?
19:00 batman marcus: i also think you shoudl require "error_handler" if async is set...
19:00 batman but that's a minor
19:07 batman i'm rewriting everything to be async...
19:07 batman i think it's easier for my mind
19:08 sri it shouldn't be that difficult
19:08 batman no, i don't think it is
19:08 sri blocking simply means that nothing else happens
19:09 batman it's just that consistency makes my life easier :)
19:13 sri btw. iron sky is hilarious
19:25 batman is it called "oponent" or "opponent" ?
19:26 Leandr joined #mojo
19:26 batman i'm going for opponent... sorry for the off topic question :/
19:27 sri how dare you go off topic!
19:27 batman i'm a dare devil. what can i say? ;)
19:27 batman no. i'm batman ffs!!
19:58 tempire hilarious on purpose?
19:58 tempire space nazis!
19:58 purl rumour has it space nazis is at http://the-isb.blogspot.com/2006/0​8/marvel-asks-hard-questions.html
20:21 mire joined #mojo
20:22 alexeiras joined #mojo
20:35 batman hilarious on purpose?
20:35 sri tempire: on purpose!
21:07 GitHub154 joined #mojo
21:07 GitHub154 [mojo] kraih pushed 1 new commit to master: http://git.io/PfOHqg
21:07 GitHub154 [mojo/master] more IPv6 tests - Sebastian Riedel
21:07 GitHub154 left #mojo
21:12 andrefs joined #mojo
21:25 tempire hmm
21:25 tempire I want an estonian domain
21:30 GitHub20 joined #mojo
21:30 GitHub20 [mojo] kraih pushed 1 new commit to master: http://git.io/nIJsbA
21:30 GitHub20 [mojo/master] improved IPv6 exception handling in Mojo::IOLoop::Client - Sebastian Riedel
21:30 GitHub20 left #mojo
21:33 sri i wonder why IO::Socket::IP didn't make it into core
21:34 sri ipv6 support in perl core is still pretty pathetic
21:50 xantus[] who here is an mst3k fan?
21:51 lukep joined #mojo
22:13 tempire xantus[]: pretty sure everyone
22:14 tempire not explicitly, but I would be there's a statistical correlation.
22:17 xantus[] I found a show, the history of mst3k
22:50 xantus[] oh, and the four 'the film crew' movies are on youtube for free
23:08 SmokeMachine joined #mojo
23:51 SmokeMachine joined #mojo

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