Camelia, the Perl 6 bug

IRC log for #mojo, 2012-03-09

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

All times shown according to UTC.

Time Nick Message
00:02 kitt_vl joined #mojo
00:08 jnap joined #mojo
01:04 d4rkie joined #mojo
01:17 scott joined #mojo
01:42 kitt_vl joined #mojo
02:32 d4rkie joined #mojo
02:58 * tempire glitters
03:43 hshong joined #mojo
04:46 hshong joined #mojo
04:58 baton8 joined #mojo
05:20 jnap_ joined #mojo
05:25 jnap joined #mojo
05:47 inokenty joined #mojo
05:58 xaka joined #mojo
06:01 Foxcool joined #mojo
06:39 jnap joined #mojo
07:08 dpetrov_ joined #mojo
08:00 inokenty joined #mojo
08:19 heytrav_ joined #mojo
08:25 heytrav joined #mojo
08:31 random joined #mojo
08:33 random joined #mojo
08:49 preflex_ joined #mojo
08:55 batman joined #mojo
09:02 random joined #mojo
09:41 batman is there a way to see how many async get() i'm currently running?
09:42 batman like investigating Mojo::IOLoop or something...
09:51 batman int keys %{ Mojo::IOLoop->singleton->{'connections'} }; # guess i can use this while debugging...
09:52 random or roll you own connection manager
09:52 batman sound complicated :/
09:53 tempire batman: why do you need to know how many are running?
09:53 batman tempire: because i'm want to concurrently run five requests at the same time, but at some point my code stops fireing new get() requests
09:53 batman so i'm wondering when that happens
09:55 batman just for debug purpose
09:56 tempire if it's just for debug purposes, you can probably just use a counter in each callback.
09:57 batman hm... good plan. maybe i'll even add Mojo::IOLoop->recurring(2, \&log_counters);
10:01 GabrielVieira joined #mojo
10:13 tempire you could also be hip and use events
10:13 tempire http://search.cpan.org/~sri/Mojolic​ious-2.57/lib/Mojo/Content.pm#drain
10:14 tempire but the counter is better for your purpose
10:14 batman yep
10:14 batman going at it now..
10:14 andrefs joined #mojo
10:25 GitHub173 joined #mojo
10:25 GitHub173 [mojo] kraih pushed 1 new commit to master: http://git.io/mpofhw
10:25 GitHub173 [mojo/master] fixed EV test - Sebastian Riedel
10:25 GitHub173 left #mojo
10:35 sven^ joined #mojo
10:48 daxim joined #mojo
11:04 batman i figure out the fault: adding $ua->on(error => sub { warn $_[1] }) told me i had an error in my code
11:04 judofyr joined #mojo
11:04 batman is there a way to actually die() inside an event?
11:08 judofyr batman: what do you mean? you can call die(), but it won't kill the application.
11:08 batman that's what i mean: i want to kill the application...
11:08 judofyr ah
11:09 * judofyr don't quite see why…
11:09 judofyr (… it would be useful)
11:09 batman because i want to propagate the exception
11:09 batman not silence it
11:10 judofyr propagate how?
11:10 judofyr app->logger->on(error => sub { … })
11:10 batman i consider dyeing to be a programming issue. nothing i want to hide
11:10 batman judofyr: i just want to kill my script, when the $ua->get() callback fail
11:10 judofyr exit?
11:10 purl i guess exit is terminate this program or by the door or "/kick #perl judofyr through the window."
11:11 batman i could do that...
11:14 sri batman: if you want exceptions to take down your whole server then mojolicious is the wrong choice
11:15 batman i see. i just consider Mojo::UserAgent and Mojolicious to have different purposes
11:15 batman but i manage with the warn $_[1].. at least now i can see when something fail :)
11:15 sri you're not seeing the big picture
11:16 batman guess not
11:16 sri server and client share the same ioloop, if one goes down both go down
11:16 batman but in my case i don't have a server. that's why i'm not seeing the big picture i guess
11:16 sri doesn't matter
11:17 sri it's still using the same code
11:17 batman yep
11:52 * tempire hands out cookies
11:54 berov1 joined #mojo
11:54 judofyr coooooookies!
12:20 vervain nom nom nom
12:20 purl I eat your head!
12:35 cosmincx1 joined #mojo
12:40 GabrielVieira joined #mojo
13:03 sri think i'll trash the psgi.streaming ticket again
13:03 sri just looked into it and as far as i can see not even reference implementations liek Starman are spec compliant
13:05 judofyr you have a spec for streaming? lucky bastards…
13:05 sri lucky, how so?
13:05 sri it doesn't work!!!
13:05 purl It's a Y2K error!  Panic!  Sue!
13:05 judofyr actually, Rack kinda have a spec; it's just not written anywhere. but there's more than two servers that implement the same functionality…
13:05 judofyr oh
13:05 judofyr err, "async Rack"*
13:25 sri https://github.com/kraih/mojo/issues/299 # closing this as not implementable
13:26 sri i've even looked at how Catalyst implements streaming
13:27 sri they don't even check for psgi.streaming, whole thing is a mess
13:27 cosmincx joined #mojo
13:37 andrefs joined #mojo
14:01 mattp sri: have you tried looking at https://metacpan.org/module/Tatsumaki ?
14:02 sri mattp: what for? it's AnyEvent based and won't work with Starman anyway
14:03 sri i'm interested in a psgi.streaming reference implementation that works with *all* server that support streaming
14:04 mattp sri: ah. ya scratch that then. i thought maybe it could shed some light but perhaps not :)
14:04 jnap joined #mojo
14:16 black joined #mojo
14:36 vel joined #mojo
14:43 jnap joined #mojo
14:43 sri what a horrible horrible mess
14:44 sri it's actually a good thing they don't have a deprecation policy for the PSGI spec
14:44 sri no way they get around rewriting those parts entirely
14:45 sri middlewares + streaming is another can of worms
14:45 sri in fact, it's that bad i believe if we supported streaming we would have a lot more complaints
14:46 sri (psgi.streaming)
14:48 judofyr sri: how does PSGI deal with input body and middlewares?
14:48 judofyr if multiple middlewares want to read the body
14:48 sri messy ;p
14:48 sri look at the spec
14:49 judofyr ah, in Rack (as you might know) the input body must be rewindable…
14:50 sri i think most (all?) implementations buffer request bodies into a temp file
14:50 sri independent of the framework, which often does it too
14:51 random temp file = memory for some
14:55 Netfeed is there away to translate route parts directly in to an object? for example /day/:year/:month/:day into a Date::Simple or DateTime? or /post/(\d{4}-\d{2}-\d{2})/:id
14:55 judofyr Netfeed: bridge + set it as a stash?
14:57 judofyr my $d = $r->bridge('/day/:year/:month/:day')->to(sub { my $self = shift; $self->stash(date => DateTime->new(…)); return 1 })
14:57 judofyr Netfeed: ^
14:57 Netfeed maybe, or parse it in each controller
14:58 judofyr at least make a helper or something…
14:58 GabrielVieira joined #mojo
14:58 Netfeed oh, yeah, i could make a helper
15:01 Netfeed heh, i think i can reduce most of my code in the current controllers to 3-4 plugins
15:07 Foxcool joined #mojo
15:14 GabrielVieira joined #mojo
15:20 random left #mojo
15:21 GabrielVieira joined #mojo
15:45 Psyche^ joined #mojo
16:01 alnewkirk ... also, where can I get a mojo t-shirt?
16:09 alnewkirk if not, http://www.spreadshirt.com/ is pretty great
16:11 GitHub47 joined #mojo
16:11 GitHub47 [mojo] kraih pushed 1 new commit to master: http://git.io/CI8kcQ
16:11 GitHub47 [mojo/master] Fixed Mojo::URL object handling bug in url_for - Sebastian Riedel
16:11 GitHub47 left #mojo
16:19 xaka joined #mojo
16:30 Foxcool joined #mojo
16:38 kaare joined #mojo
17:16 xaka joined #mojo
17:26 abra joined #mojo
17:26 zpmorgan joined #mojo
17:28 GitHub166 joined #mojo
17:28 GitHub166 [mojo] kraih pushed 1 new commit to master: http://git.io/-XtrOg
17:28 GitHub166 [mojo/master] improved event loop compatibility of Mojo::Server::PSGI - Sebastian Riedel
17:28 GitHub166 left #mojo
17:28 sri i think that's the best we can do
17:28 sri psgi.streaming in PSGI 1.1 is not usable
17:29 sri since there's nothing like a drain event anymore
17:29 sri which imo is dangerous
17:30 sri you can only push writes and never know how much has actually been written
17:30 sri potentially writing huge amounts of data into a buffer, overloading your server
17:31 sri with the pull model fake io handles provide we at least know that the server wants more data
17:32 sri there will be useless pulls that produce unnecessary load, but no exploding buffers
17:34 sri btw. i believe a release would be in order :)
17:54 * sri is not gonna upload it this time...
17:55 stephan48 why not?
17:55 sri BECAUSE!
17:55 stephan48 WHAT?
17:59 sri hmm, better wait with the release
17:59 stephan48 because?
17:59 * sri has to investigate one more thing
18:06 marcus One more thing!
18:06 marcus oh, steve is dead.
18:06 sri ONE MORE THING!
18:16 sri it appears my new psgi strategy is not very good
18:16 sri once again inconsistencies between servers
18:20 stephan48 maybe just support basic psgi features and offer an advanced psgi server as seperate distri?
18:23 sri and by that i mean... it is better than the old one but doesn't actually solve the event loop problem
18:24 sri yea, this is not something we can solve
18:25 sri feel free to release, it won't get better
18:25 stephan48 :(
18:25 sri it could be solve in the servers
18:26 sri Twiggy needs to pass control back to the event loop between ->getline() calls
18:26 sri feersum might just be broken
18:26 sri it seems to consider ->getline() returning '' as EOF
18:27 * sri pokes marcus
18:28 marcus sri: wass?
18:28 marcus release ?
18:28 purl NO! it will ESCAPE and leave behind a bloddy trail of QA
18:29 sri RELEASE THE KRAKEN!
18:30 * marcus escapes, and leaves a bloody trail
18:30 * stephan48 shoots the QA
18:31 marcus running disttest
18:38 sri eeeep
18:38 marcus it is done
18:38 sri https://github.com/stash/Feersu​m/blob/master/Feersum.xs#L2068 # it actually uses XS for pretty much everyhting
18:38 marcus tagged bagged and tweeted
18:38 sri marcus++
18:38 marcus that is Feersum
18:39 marcus sri: guess it's fast then?
18:42 sri marcus: yes quite fast, but a little unreliable
18:43 sri outperforms hypnotoad and starman quite a bit while using the same resources as hypnotoad and less than starman
18:43 sri but hangs from time to time
18:44 marcus ouch
18:44 sri and when i say quite a bit i mean wow
18:44 sri 1800 for hypno and starman, 2350 for feersum
18:47 rafl marcus: hey. do you remember when exactly you uploaded Mojolicious-2.58?
18:47 marcus rafl: 19:37 something?
18:48 rafl awesome. thanks very much :)
18:48 rafl (metacpan indexing was broken. i just fixed it, but wanted to confirm the newly indexed dists it showed me as being recent are indeed correct)
18:49 sri https://metacpan.org/releas​e/MRAMBERG/Mojolicious-2.58 # metacpan, now twice the amount of fun?
18:49 sri or am i just drunk?
18:50 marcus it's my fault
18:50 sri :o
18:50 marcus I ran disttest, then noticed I'd deleted manifest.skip, then recreated the manifest with a 2.58 directory in it. :(
18:51 sri eeep
18:51 rafl well, "fault". metacpan does make some odd assumptions about what a dist looks like and therefore sometimes comes up with results like that
18:51 rafl it should be more obvious that the second of every module came from a sub directory and such
18:51 rafl we're working on fixing that, but aren't quite there yet
18:52 marcus sri: I'll just ship 2.59 at once?
18:52 * sri nods
18:54 GitHub151 joined #mojo
18:54 GitHub151 [mojo] marcusramberg pushed 1 new commit to master: http://git.io/6pHsBg
18:54 GitHub151 [mojo/master] Update changes and Mojolicious.pm to fix broken release - Marcus Ramberg
18:54 GitHub151 left #mojo
18:54 sri don't forget to tag again
18:55 marcus sure
18:55 sri eeep, ugly Changes
18:56 sri says 8 not 9, dot missing, wrong indentation
18:58 GitHub103 joined #mojo
18:58 GitHub103 [mojo] marcusramberg pushed 1 new commit to master: http://git.io/c9SCyg
18:58 GitHub103 [mojo/master] Fix version number in changes - Marcus Ramberg
18:58 GitHub103 left #mojo
18:58 marcus missing dot?
18:58 sri at the end of the sentence
18:59 sri and indentation
18:59 purl it has been said that indentation is something useful to define on a project.
18:59 GitHub55 joined #mojo
18:59 GitHub55 [mojo] marcusramberg pushed 1 new commit to v2.59: http://git.io/zOH7nQ
18:59 GitHub55 [mojo/v2.59] Fix indentation, dot - Marcus Ramberg
18:59 GitHub55 left #mojo
18:59 sri \o/
19:01 GitHub31 joined #mojo
19:01 GitHub31 [mojo] marcusramberg pushed 1 new commit to master: http://git.io/zOH7nQ
19:01 GitHub31 [mojo/master] Fix indentation, dot - Marcus Ramberg
19:01 GitHub31 left #mojo
19:01 sri ooooh
19:01 sri that will cost a watcher or two on github :S
19:02 marcus doubledipping?
19:02 * sri nods
19:02 marcus remind me not to release anything after 11 hour work days again :(
19:02 marcus I've pushed 2.59 now. Should we tweet it or hide my misteak?
19:02 sri hide in shame
19:03 marcus k. Going to play poker now.
19:03 sri :o
19:03 * sri plays angry birds
19:04 tempire that game is stressful
19:04 * tempire prefers OMG Pirates
19:05 zpmorgan joined #mojo
19:05 marcus PSGI 1.10 was just released.
19:06 sri yea, i was poking around in #plack
19:06 sri but it sadly got worse
19:06 sri poll_cb is just gone
19:07 sri no deprecation, no replacement
19:07 sri that's what i was rambling about earlier
19:08 sri i don't think you can do streaming safely with PSGI 1.1, at all
19:09 sri if anyone knows a streaming psgi app in the wild please tell me, i'd like to try and break it :)
19:09 tempire What a strange post for perlbuzz to choose for tweeting.
19:37 batman joined #mojo
20:03 willcode4food joined #mojo
20:09 batman marcus: i can't build the oauth2 plugin. it says Can't locate object method "test_server" via package "Mojo::UserAgent" at t/basic.t line 6
20:15 stephan48 joined #mojo
20:38 berov joined #mojo
20:39 berov They put an (R) beside Realtime. Any comments? -> http://www.xrtml.org/
20:45 berov left #mojo
20:47 berov joined #mojo
20:50 athenot joined #mojo
20:54 willcode4food left #mojo
20:55 vervain berov: http://1.usa.gov/y9B0lK
20:56 berov vervain: 10x
20:56 vervain NO CLAIM IS MADE TO THE EXCLUSIVE RIGHT TO USE "RT" AND "REALTIME" APART FROM THE MARK AS SHOWN
21:01 berov this does not speaks much to me...
21:02 berov in other words?...
21:03 tempire sounds like it only applies to when the logo is used with it.
21:03 berov so I/You/Anyone can use real-?time
21:03 tempire maybe.  I wouldn't pay much attention to it.  Everyone in the world is using the word realtime.
21:04 berov soon there will be no words left and we will just stay silent ;)
21:04 tempire it also has different meanings within context.  cpu performance realtime is different from web real time
21:04 berov this is not a normal situation
21:05 berov anyway
21:11 perlite joined #mojo
21:12 jnap joined #mojo
21:15 marcus batman: pushed 0.6 to fix it
21:27 athenot joined #mojo
21:27 batman thanks
21:27 batman marcus++
21:41 athenot joined #mojo
21:51 athenot joined #mojo
22:09 GabrielVieira joined #mojo
22:23 dog_chocolate joined #mojo
22:46 sshaw joined #mojo
22:55 sshaw i forgot that text_area helper differs from the others by using a block form
22:55 sshaw text_area 'name' => begin DATA end
22:55 sshaw vs. text_field name => 'value'
22:55 * sshaw nitpicking
22:55 purl nitpicking is a tool of oppression by The Man
22:55 sshaw hehe
22:57 sshaw while mimicking textarea's content model is fine, doesn't it also make sense to be able to use it like the others?
23:00 sshaw purl: then subtle differences in implementation must be oppression by the..?
23:00 purl i haven't a clue, sshaw
23:00 sshaw (nitpickers :^)
23:03 sshaw check_box 'name' => value, text_field 'name' => value,  text_area 'name' => begin DATA end
23:11 sshaw purl: how about when one POSTs to a GET only action? should mojo return 404 or 405?
23:11 purl sshaw: i don't know
23:12 sshaw hey wait a minute...
23:12 purl wait a minute... is probably it SCO?
23:19 hide left #mojo
23:19 Foxcool joined #mojo
23:33 sri sshaw: i would be ok with making it work like the others i guess
23:46 sshaw sri: something like this should do it (untested) while still supporting the block form: https://gist.github.com/2009351
23:47 sshaw purl, status?
23:47 purl Since Thu Aug  5 20:55:17 2010, there have been 61743 modifications and 31006 questions.  I have been awake for 582 days, 2 hours, 52 minutes, 10 seconds this session, and currently reference 901537 factoids. Addressing is in optional mode.
23:50 sshaw while we're talking TagHelpers, what about form_for including the action based on the route?
23:52 sshaw $r->post('/path')->name('some_name'); ... form_for 'some_name' # includes action => 'post'

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