Camelia, the Perl 6 bug

IRC log for #mojo, 2012-09-29

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

All times shown according to UTC.

Time Nick Message
00:22 xaka joined #mojo
01:38 mire_ joined #mojo
02:22 l3l1p joined #mojo
02:30 noganex_ joined #mojo
02:42 xaka joined #mojo
02:44 l3l1p joined #mojo
02:54 asarch joined #mojo
03:22 alnewkirk so mojo would be the library and mojolicious would be the framework?
03:54 memowe_ joined #mojo
04:08 dwierenga joined #mojo
05:18 sunson joined #mojo
05:25 sunson in my logout code I do $self->session(expires => 1). But if I do 'back' (and even reload), I get the page that I should not be able to access. When I clear the cookies, it's working as expected. Is it my browser who is at fault?
05:29 sunson I use FF 11
05:43 venomo joined #mojo
06:30 l3l1p joined #mojo
06:48 Adura FF 11 sucked, MMO FF, puhleez.
07:03 davido joined #mojo
07:08 rem_lex| joined #mojo
07:19 Vandal joined #mojo
07:31 Foxcool_ joined #mojo
08:23 d4rkie joined #mojo
08:33 inokenty joined #mojo
08:41 davido joined #mojo
08:50 sri anyone here who uses morbo on windows and can install EV?
08:51 sri rhaen: you maybe?
08:52 * sri has been wondering if this patch makes EV work with ithreads http://hastebin.com/raw/qifewejiwo
09:03 good_news_everyone joined #mojo
09:03 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/8qICgg
09:03 good_news_everyone [mojo/master] die if EV is used together with ithreads - Sebastian Riedel
09:03 good_news_everyone left #mojo
09:03 sri well, it's silly trying to fix something on a platform you don't even have access to... we are just gonna die instead
09:05 pau4o joined #mojo
09:05 memowe joined #mojo
09:11 rhaen sri?
09:11 purl somebody said sri was A PONIE!!1! and a  or no more a javascript noob or evil or a spelling guerilla or the temporary channelclown or a snob now or the perl guerilla or a small mouse with a big head aiming for world domination or the evil sith or has no clue about fuzzy logic or no longer a real hacker :/ or a copycat or pimp to many children or a holy man or looks a lot like pitr or puny or making Mojolicious delicious
09:11 sri rhaen: see patch
09:11 rhaen sri: yep - I am using morbo on Win with Activestate Perl
09:11 rhaen k
09:12 rhaen hu, that's all?
09:12 sri i don't know
09:13 * sri has no access to a windows box
09:13 rhaen ok, I'll try the patch from //hastebin.com/raw/qifewejiwo and check.
09:16 rhaen k applied.
09:16 rhaen now let's see
09:18 rhaen morbo won't start: Can't call method "loop_fork" without a package or object reference at C:/Toolchain/Perl64/site/bi​n/../lib/Mojo/Reactor/EV.pm line 10.
09:19 sri ops
09:19 sri of course now, my bad
09:19 sri *not
09:19 sri rhaen: remove the $ from $EV
09:19 rhaen oh, testing against Mojolicious 3.43
09:19 rhaen true.
09:19 sri 3.43 should be fine
09:20 rhaen nope - still won't work.
09:20 rhaen EV.pm looks like this now:
09:21 sri EV::Loop->new->loop_fork? ;p
09:21 sri or maybe EV::loop_fork
09:22 rhaen ah, the last one :)
09:23 sri the last one is actually undocumented in EV :S
09:24 rhaen yep.
09:24 rhaen works
09:24 sri it makes morbo work?
09:24 rhaen hang on.
09:24 purl i think hang on. is this actually "session is still there but user has been deleted" ?
09:24 rhaen morbo was working anyways - however when you save the file morbo crashed.
09:24 rhaen Well actually the Perl interpreter crashed on windows.
09:25 rhaen Now everything works fine - you can have morbo running and can work on your lite app.
09:25 sri \o/
09:25 rhaen Morbo reloads it correctly, seems to have it fixed.
09:25 sri rhaen++ # thanks for testing
09:26 rhaen I will do some more Mojo work tomorrow for a workshop preparation, I will be able to say more after long tests.
09:26 rhaen but the quick one works :)
09:26 rhaen sri: oh, that's why I am here.
09:26 rhaen ;)
09:27 good_news_everyone joined #mojo
09:27 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/XTyroA
09:27 good_news_everyone [mojo/master] fixed Mojo::Reactor::EV to work with Morbo on Windows - Sebastian Riedel
09:27 good_news_everyone left #mojo
09:30 sri rhaen: just to be sure, you are using EV 4.11?
09:30 rhaen I am using the one which is provided by Activestate Perl 5.16.1
09:30 rhaen so let me check what they are bundling
09:30 sri mojo version will tell you
09:31 rhaen hm.
09:31 rhaen no
09:31 rhaen it tells me "not installed"
09:31 rhaen interesting.
09:31 d4rkie joined #mojo
09:32 rhaen ok, well - this is strange. mojo version doesn't report EV as installed
09:32 good_news_everyone joined #mojo
09:32 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/3zPYJw
09:32 good_news_everyone [mojo/master] made ithreads support in Mojo::Reactor::EV a little more portable - Sebastian Riedel
09:32 good_news_everyone left #mojo
09:32 rhaen ppm search EV shows an installed EV version 4.11 in site
09:33 sri rhaen: could it be that EV::loop_fork just died and you really used the Poll reactor? :S
09:33 rhaen *pfft* :)
09:33 sri please try my latest commit
09:34 rhaen probably the latest mojo version doesn't detect EV correctly :)
09:34 sri that's unlikely i'm afraid
09:34 sri more likely is that the fix actually doesn't work
09:35 sri sub CLONE { EV::loop_fork() }
09:35 sri that should show once and for all if it works or not
09:35 rhaen k, let me change that
09:36 rhaen but let me make sure that EV is being really used correctly on this machine.
09:36 rhaen it is installed.
09:36 sri mojo version should show it again now
09:36 sri (which is a bad sign)
09:37 rhaen OPTIONAL
09:37 purl rumour has it OPTIONAL is implied otherwise, no
09:37 rhaen EV              (4.11)
09:37 rhaen jepp.
09:37 sri :(
09:38 rhaen k, so it won't work and just fell back to Reactor::Poll, right?
09:38 sri did you try morbo?
09:39 rhaen I've tried morbo with EV::loop_fork - will try it now with EV::loop_fork()
09:39 rhaen Undefined subroutine &EV::loop_fork called
09:39 rhaen won't start anymore
09:39 sri ok, so it was never fixed
09:40 rhaen nope :(
09:40 good_news_everyone joined #mojo
09:40 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/7i9UxQ
09:40 good_news_everyone [mojo/master] die again if EV is used with ithreads - Sebastian Riedel
09:40 good_news_everyone left #mojo
09:40 sri back to die
09:40 rhaen is there a way to display the Reactor used by morbo?
09:41 rhaen something like MORBO_DEBUG?
09:41 sri MOJO_IOLOOP_DEBUG=1
09:41 rhaen k, we should have checked this earlier :(
09:41 rhaen C:\Users\rhaen\Desktop>morbo letsev.pl
09:41 rhaen -- Reactor initialized (Mojo::Reactor::Poll)
09:42 rhaen that's the result when using CLONE {EV::loop_fork}
09:42 sri as expected
09:42 sri it's unfixable, best we can do is die with a better message
09:42 rhaen yep. Sorry.
09:51 rhaen updated my blog entry.
09:51 rhaen http://www.pkgbox.de/wordpress/2012/09/mojol​icious-morbo-constantly-crashing-on-windows/
09:51 rhaen so, yep - that's probably something we have to live with until someone fixes it at the right place.
09:52 sri it will never get fixed i'm afraid
09:52 sri mlehmann is extremely anti-ithreads
09:53 rhaen hm. yep.
09:53 rhaen anyway - time for a shower :)
09:54 rhaen see you guy later!
09:54 sri at some point we will retire the EV reactor and switch to something better
09:54 * sri waves
10:06 nic left #mojo
10:30 niczero joined #mojo
10:33 niczero joined #mojo
10:56 ryozi joined #mojo
11:04 d4rkie joined #mojo
11:06 ghandi joined #mojo
11:39 SOM3ThinG joined #mojo
12:32 mire_ joined #mojo
12:35 sri hmm, maybe we need to redesign the way we use event loops
12:36 sri like disallowing event watchers (like timers) on startup
12:37 sri depending on the event loop surviving fork (which morbo and hypnotoad do) is not good, and will prevent us from using more backends in the future
12:38 * sri pokes tempire, crab and marcus
12:39 sri https://github.com/kraih/mojo/bl​ob/master/lib/Mojo/IOLoop.pm#L31
12:39 sri basically that line is responsible
12:41 sunson joined #mojo
12:41 sri best we could do is a new hook that fires when the server (or worker process) actually starts the event loop, ao we know it's safe to add event watchers
12:41 sri i suppose nobody really understands what i'm talking about
12:41 purl hmmm... talking about is "Yeah, you're alway talking and talking and talking. Shut up and code."
12:41 sunson I've got an error msg that doesn't show line number. Just says "Syntax error at (eval 322) line 9, near "} else "
12:42 sri unless someone speaks up with a better idea, i'm afraid i might have to make breaking changes
12:43 sunson how do I debug this? I've looked all over the place for lines just before "} else "
12:43 sunson and couldn't find any
12:50 sri we could theoretically make Morbo work on windows with EV, by delaying initialization of the reactor
12:50 sri but that would break preloading in Hypnotoad :S
12:50 sunson never mind, figured. moral of the story: when a .ep template has a syntax error, the error message is very cryptic :(
12:50 sunson sri: if you could fix that ^
12:50 sunson :D
12:51 sri sunson: patches welcome ;)
12:51 sri we basically just give you the error perl reports to us and add some context of we can
12:51 sri s/of/if/
12:54 sri http://mojolicio.us/perldoc/Moj​olicious/Guides/Cookbook#Timers
12:54 sri the third recipe there is the one we basically would have to break
12:55 sri it would have to happen in a hook or so
12:55 sri hook before_start => sub {...}; or so
12:58 sri or actually anything involving an ioloop during startup would break
12:58 sri like a blocking Mojo::UserAgent call
12:59 sri tempire, crab, marcus: this problem will prolly block PTokamak for us
13:09 vishwanathms joined #mojo
13:13 Britzel joined #mojo
13:20 vishwanathms joined #mojo
13:32 rhaen what's PTokamak?
13:33 vishwanathms joined #mojo
13:44 vervain http://irclog.perlgeek.de/search.pl?c​hannel=mojo&nick=&q=ptokamak
14:32 ZadYree_ joined #mojo
14:58 sri hmm, i might actually be wrong and it is even more complicated
14:58 ghandi joined #mojo
14:59 sri EV seems to initialize itself on use EV
15:02 sri rhaen: feel like trying another patch? http://hastebin.com/raw/gosuyepemi
15:03 sri this one is for 3.44
15:04 sri as if fork+event loops is not complicated enough... thanks to perl we also have to think about windows fake fork :S
15:11 sri we really need more folks who understand this stuff
15:12 * sri wouldn't be surprised if there was only a handful in the entire perl community
16:04 rhaen sri: Yup, let me check
16:05 rhaen there is no patch. The url is wrong
16:08 sri they seem to have deleted everything
16:09 sri http://hastebin.com/raw/jegaxudise
16:09 sri rhaen: there it is again
16:13 rhaen k
16:13 rhaen let me update my mojo stuff
16:15 rhaen ok, building.
16:16 rhaen Hm, I really think of hooking into the github newsfeed to get the latest releases of mojo and build them automatically
16:17 rhaen and provide the packages for rpm for RHEL and ppms for windows
16:17 rhaen however, ActiveState is really fast - it seems everything from their stackato stuff uses mojo
16:22 rhaen probably an update problem?
16:23 rhaen C:\Users\rhaen\Desktop>morbo check.pl
16:23 rhaen -- Reactor initialized (Mojo::Reactor::EV)
16:23 rhaen EV does not work with ithreads.
16:24 rhaen ah, sure. Hang on. I'll remove the die :)
16:25 sri the die shouldn't have been reached if it worked
16:25 rhaen true, just looked into it.
16:25 rhaen I've cleaned my Mojo installation - let's check again
16:26 sri apparently require EV is global with ithreads... not fixable then
16:27 sri looks like ithreads has all the disadvantages of fork without the advantages...yay
16:29 rhaen hang on
16:30 rhaen it was an update problem.
16:30 rhaen now the correct source is in place
16:30 rhaen morbo starts with EV
16:30 rhaen let me work on the file
16:31 rhaen interesting.
16:31 rhaen let me send you the gist
16:31 rhaen https://gist.github.com/3804530
16:32 rhaen it starts with EV and falls back to Poll
16:32 rhaen let me describe what I was doing here.
16:32 rhaen I opened a lite app in vim, started morbo and made a request
16:33 sri looks like EV jus bugs out and dies when loaded in the second thread
16:33 rhaen Then I edited the file, saved it (without quitting vim) and reloaded the webpage
16:33 sri i get it
16:33 rhaen morbo is still running but using Poll now.
16:33 rhaen k.
16:33 sri nothing really changed i'm afraid
16:33 jzawodn joined #mojo
16:33 rhaen nah.
16:34 rhaen how - friends are coming, drop me a line if you need more tests :)
16:34 sri thanks, but i'm giving up now ;)
17:03 rhaen haha :)
17:38 batman joined #mojo
17:39 vishwanathms joined #mojo
17:39 vishwanathms_ joined #mojo
17:56 xaka joined #mojo
18:24 d4rkie joined #mojo
18:35 asarch joined #mojo
18:36 abra joined #mojo
18:37 tempire I'm confused.
18:37 tempire does the problem only exist with ithreads?
18:37 tempire Who cares about ithreads.
18:42 sri tempire: ithreads *is* windows fork
18:42 tempire ooOOOOooooh.
18:45 andrefs joined #mojo
18:58 Adura Windows process emulation...!
19:04 vishwanathms_ joined #mojo
19:04 vishwanathms joined #mojo
19:08 sri tempire: the problem goes further though, not all event loops support fork
19:08 sri EV is actually an exception there
19:09 sri say we want to support PTokamak with libuv backend, it couldn't work in mojolicious with our current design
19:11 sri when you do Mojo::IOLoop->recurring(0 => sub {...}) at the beginning of your lite app the event loop gets initialized in the manager process (because of preloading of the application)
19:12 sri and that's assuming the event loop does not get initialized automatically on use, that's the case affecting both, morbo and hypnotoad
19:15 sri and it gets much more complicated :)
19:15 tempire wellst
19:15 tempire oh super villain of the perl universe
19:15 tempire WHAT DO WE DO
19:15 tempire !?
19:15 tempire perl is tough.
19:19 sri BREAK ALL THE THINGS!
19:20 sri but seriously... no clue
19:21 sri another problem is blocking stuff that uses a custom Mojo::IOLoop instance
19:21 sri if you run one of those at startup it can interfere with the global singleton
19:22 sri for event loops like EV, the global singleton needs to be the first reactor that gets initialized
19:22 sri since EV is a singleton itself, and all other instances can only be a ::Poll
19:23 sri that's the whole reason we force initialization of the singleton reactor when Mojo::IOLoop is loaded
19:26 pau4o left #mojo
19:40 Adura Perl 6'll fix things.
19:56 rhaen Adura: that's unlikely.
19:57 rhaen sri: I would break everything.
19:57 rhaen Announce a breaking release, change stuff - leave 3.44 as last version with the old schema.
19:57 rhaen sounds awesome.
19:57 rhaen We always need room for approvement.
19:58 rhaen err improvement :)
19:58 rhaen I'll vote for break everything.
19:58 rhaen sounds fun.
19:58 rhaen it will bring some efforts to marketing.
19:58 buu How much everything will it break for people not explicitly dealing with the event loops in their code?
19:59 sri rhaen: and now tell me what should be improved :)
19:59 buu Like just regular morbo users and fastcgi?
19:59 rhaen sri: oh, this is the more complicated part.
19:59 rhaen Let's go shopping.
19:59 sri i don't see a simple way to prevent an event loop from beging initialized in the hypnotoad manager process as long as we preload
20:00 rhaen sri: if we stick with EV, it won't work for windows, however it will limit the future also, right?
20:00 sri *being
20:00 rhaen hm.
20:00 sri we won't stick with EV
20:01 sri PTokamak is will almost certainly replace it
20:01 sri just nit yet
20:01 sri *not
20:01 Adura Room for imptovement, even.
20:01 rhaen hm, probably wait for it?
20:02 sri buu: nothing
20:02 buu Well ok then.
20:02 sri and this is all hypothetical
20:03 buu Hypothetically speaking it might be useful to know how many users are using the app in which way
20:03 sri it is stuff like this that's a huge problem http://hastebin.com/raw/kuvaqojeco
20:03 sri the timer watcher gets initialized in the manager process
20:04 sri and we depend on it getting inherited by children when they are forked
20:06 sri that timer could also be a Mojo::UserAgent->new->get('mojolicio.us');, almost the same problem, since it forces the global singleton to get initialized as well
20:07 sri and the biggest problem of all, nobody understood what i mean :)
20:08 sri we are still at the stage where most folks just cut'n paste evented code and hope for the best ;p
20:12 marcus sri: what if you wrap the recurring in a wait?
20:12 sri marcus: yes, that's one solution
20:13 sri Mojo::IOLoop->later(sub {...}); or so
20:13 marcus could even be a nice ::lite keyword
20:13 marcus later(sub { … });
20:14 sri that would mean lite knows about the singleton ioloop and it's deployment environment
20:14 marcus it just knows it has an ioloop?
20:14 sri currently it hasn't
20:14 marcus what about websocket?
20:15 sri with CGI/PSGI it never gets one
20:15 sri websocket is only connected the ioloop via ::Daemon
20:15 marcus well, with later it would be much the same?
20:15 sri and ::UserAgent
20:15 marcus just do delegation?
20:15 sri ->later wouldn't work with CGI/PSGI
20:15 marcus to whatever ioloop… :)
20:15 marcus right
20:15 marcus I wouldn't expect it too.
20:15 marcus or recurring...
20:15 purl i think recurring is more like a cron task
20:16 sri another problem is blocking Mojo::UserAgent
20:16 sri it would need to be wrapped as well
20:16 marcus blocking is no fun.
20:16 sri even blocking
20:19 sri we could of course also insist that all backends need to be fork-safe
20:20 marcus what does that require?
20:20 sri nothing
20:20 sri morbo would still be limited to ::Poll and other fork-safe pure-perl backends on windows though
20:21 marcus How far away is PTokamak?
20:21 marcus and how good is it?
20:21 sri then again... no matter what we do, EV will never work in Morbo
20:22 marcus I like uv
20:22 sri it's not bad, no idea how far away it is, everybody is on vacation
20:23 bpmedley joined #mojo
20:23 marcus :-/
20:23 marcus I'm leaving on vacation on saturday btw.
20:23 sri it is saturday :o
20:23 marcus in a week.
20:23 marcus 17 days in cyprus.
20:24 marcus planning on getting 3g tho.
20:25 sri from tomorrow till the end of the week i'll be on a cruise ship, wonder if they have wifi :)
20:29 marcus unlikely.
20:29 marcus sounds nice
20:29 marcus where to?
20:29 purl to is probably Tonga Islands
20:29 marcus purl: silence while the adults are talking.
20:29 purl OK, marcus.
20:31 * marcus plays with Mojo::IRC
20:31 marcus think we should move it to a separate repo, batman.
20:32 sri not a clue, all i know so far is that it's sunny :o
20:33 marcus careful so you don't melt.
20:35 ObseLeTe joined #mojo
20:37 sri /o\
20:40 sri guess we stick with the design we have for now and wait until it actually becomes a problem
20:41 marcus +1
20:41 purl 1
20:50 bpmedley_ joined #mojo
20:54 MidnighToker joined #mojo
21:40 pau4o joined #mojo
22:24 preflex_ joined #mojo
22:27 asarch joined #mojo
22:58 pau4o left #mojo
23:05 preflex joined #mojo
23:26 rhaen +1 :)
23:35 Britzel +2
23:35 purl 2

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