Camelia, the Perl 6 bug

IRC log for #mojo, 2011-08-26

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

All times shown according to UTC.

Time Nick Message
00:11 GitHub46 joined #mojo
00:11 GitHub46 [mojo] kraih pushed 1 new commit to master: http://git.io/tWWMUA
00:11 GitHub46 [mojo/master] added Mojocasts link - Sebastian Riedel
00:11 GitHub46 left #mojo
00:11 irs tempire: and it's live :)
00:12 tempire \o/
00:12 tempire darnit.
00:12 tempire now I'm all motivated.
00:12 * tempire puts down the erlang book.
00:22 shonorio joined #mojo
00:30 elb0w joined #mojo
00:44 xaka is it e-book or p-book?
00:45 GitHub39 joined #mojo
00:45 GitHub39 [mojo] kraih pushed 1 new commit to master: http://git.io/QVxE0w
00:45 GitHub39 [mojo/master] release preparation - Sebastian Riedel
00:45 GitHub39 left #mojo
00:48 perlrocks Twitter: "Mojolicious 1.92 by SRI - http://t.co/4mkwZsb" (ms) --cpan_new http://twitter.com/cpan_new​/status/106890712313892864
01:43 d4rkie joined #mojo
01:55 GabrielVieira2 joined #mojo
02:07 xaka joined #mojo
02:42 crab irs? /me hides
02:43 irs !
03:35 crab yesterday i saw the first node.js thing that i was seriously impressed by: someone wrote an ldap server framework for node.js
03:35 crab well, more than passingly impressed, anyway.
03:36 crab i might have been seriously impressed if i had actually needed to write an ldap frontend to something.
03:39 Skylos heh.
03:51 irs crab: quite sure that has been done before ;p
03:55 crab *shrug* i just hadn't seen it then, and this caught my attention now because i've struggled with ldap before.
04:01 kaare joined #mojo
04:05 perlrocks Twitter: "#mojolicious has reached 7000 unit tests today, yay for #tdd! :) #perl" --kraih http://twitter.com/kraih/status/106940422160519169
04:17 GitHub7 joined #mojo
04:17 GitHub7 [mojo] kraih pushed 1 new commit to master: http://git.io/-HWTDA
04:17 GitHub7 [mojo/master] fixed small version detection bug in Mojo::Cookie - Sebastian Riedel
04:17 GitHub7 left #mojo
04:27 irs cosimo: btw. according to my reaearch browsers don't all support that kind of cookies
04:27 irs safari for example doesn't
04:28 irs (not tried, just been reading up on the problem)
04:28 irs of course with the js api you can put pretty much whatever bullshit you want into the cookie
04:28 irs i'm talking parser here
04:31 irs i have to admit it's an interesting challenge
04:32 * Skylos grins.
04:32 Skylos I agree.
04:33 Skylos distracted me WAY too much today.
04:33 irs i have a hunch that it could be solved with a very clever regex trick or so
04:33 Skylos the RFC2965 won'tbe.
04:34 Skylos The comma problem is lookahead assertion stuff.
04:36 Skylos and the quoting issue is complex indeed.
04:36 irs wow, rage for iphone is impressive
04:37 Skylos describe "split this into comma separateds but ignore any within quotes" in regexp.
04:38 Skylos like... /(?<!"[^"+]),/01 - maybe?
04:40 irs the quotes can be escaped
04:40 irs foo="bar \" baz" is valid
04:41 Skylos hm.
04:41 Skylos even more complex.
04:41 irs it gets better
04:41 irs foo="bar baz\\"
04:41 irs :D
04:42 Skylos this is why tokenizing parsers usually stay away from regular expressions
04:42 Skylos that's really token(foo)-special(equal)-string(bar baz\)
04:44 Skylos wow.
04:44 Skylos perl -e 'print join "-", split /(?<!"((?<!\\).)+),/, "a=\"b,\\"c\",d,e,f";' Variable length lookbehind not implemented in regex; marked by <-- HERE in m/(?<!"((?<!\\).)+), <-- HERE / at -e line 1.
04:44 Skylos 'describable but not impelmented' - in perl!
04:45 Skylos That really does look like line noise though.
05:20 marty_ joined #mojo
05:21 GitHub35 joined #mojo
05:21 GitHub35 [mojo] kraih pushed 1 new commit to master: http://git.io/TZmi9w
05:21 GitHub35 [mojo/master] made cookie parser slightly more resilient - Sebastian Riedel
05:21 GitHub35 left #mojo
05:21 irs cosimo: that could help you
05:25 irs it at least increases the chances for the cookie parser to recover
05:28 alnewkirk what ever happened to the markup preprocessor?
05:29 irs nothing
05:32 irs we have a small expriment going though with the t helper
05:32 irs https://github.com/kraih/mojo/blob/master​/t/mojolicious/tag_helper_lite_app.t#L311
05:33 irs not quite the same but fun nonetheless
05:35 alpha6 joined #mojo
05:40 alnewkirk yeah, the spec for the *.mp syntax was very exciting way-back-when
05:41 noganex joined #mojo
05:55 Firkin joined #mojo
06:08 cybergggirl joined #mojo
06:21 preflex_ joined #mojo
06:24 perlrocks Twitter: "Oh boy, that was a long night with Mojo::IOLoop. #mojolicious." --rabenfeder http://twitter.com/rabenfede​r/status/106975168907321344
06:26 koban` joined #mojo
06:39 black joined #mojo
07:11 k-man joined #mojo
07:12 vishwanathms joined #mojo
07:12 alpha6 joined #mojo
07:22 alpha6 joined #mojo
07:23 * tempire wonders if http://www.pearldjango.com/ has any idea
07:24 sugar joined #mojo
07:47 arpadszasz joined #mojo
08:05 black joined #mojo
08:11 spleenjack joined #mojo
08:11 cosmincx joined #mojo
08:32 perlrocks Twitter: "#mojolicious hack of the day: #html5 eventsource. http://t.co/4JAxVDz #perl" --kraih http://twitter.com/kraih/status/107007398580994048
08:33 irs it's so simple
08:35 black joined #mojo
08:36 perlrocks Twitter: "@kraih So what is it with #Mojolicious people and telepathy? I was just playing with mojo+eventsource myself. :) Great blog post!" --arpadszasz http://twitter.com/arpadszas​z/status/107008402856755201
08:38 rhaen hoho
08:38 rhaen irs: thanks for your time yesterday.
08:38 rhaen irs: I just started to refactor some of my things to a more async model.
08:39 rhaen irs: it's easy once you've got in touch with Mojo::IOLoop
08:39 rhaen irs: and return the $tx object and inspect that later.
08:40 marcus in touch with your inner ioloop
08:40 rhaen marcus: haha. Na, I am doing crazy stuff :)
08:41 rhaen marcus: https://gist.github.com/a5fe8a57dbe3dd5309b8
08:41 rhaen marcus: that's what I am trying to do - and it, actually, yep - don't work.
08:42 rhaen you are doing async stuff in your proxy_to module as well, however, you modifiy the whole res obj and pass it back to the view
08:43 irs async is hard, lets go shopping!
08:50 rhaen :wq
08:50 rhaen hm.
08:51 marcus shopping is hard, let's go surfing
08:51 rhaen surfing is hard, let's have a coffee.
08:59 Eugene joined #mojo
09:04 judofyr joined #mojo
09:05 irs oh, almost forgot to clean up the timer in the example :o
09:05 irs gist++ # editable
09:05 marcus that's cheating!
09:05 marcus =)
09:10 * irs doesn't play fair, he plays to win!
09:17 perlrocks Twitter: "Sebastian Riedel (sri): Mojolicious hack of the day: HTML5 EventSource http://t.co/Xz8LWyg" --perlironman http://twitter.com/perlironm​an/status/107018718017634306
09:20 * marcus plays to whine
09:25 marcus irs: seeing stuff like http://paste.scsys.co.uk/137012 on trunk btw
09:25 marcus does that mean I've been a bad boy?
09:25 rhaen marcus: you are.
09:26 irs not seen that before, global destruction sounds harmless though
09:27 marcus yeah, it doesn't seem to harm me
09:42 Sjors joined #mojo
09:42 Sjors Hi
09:42 purl what's up, Sjors.
09:42 Sjors purl: you're just such a pretty bot :)
09:42 purl Sjors: what?
09:42 Sjors :-(
09:43 Sjors anyway: I just noticed a weirdness in expanding a Mojolicious::Lite app to a Mojolicious app
09:43 Sjors something that might be more intuitive
09:43 Sjors so, to start out, you have this Mojolicious::Lite app where you can just say get '/host' => ....
09:44 Sjors I started growing it by creating a TestApp, use Mojo::Base 'Mojolicious' and added a startup subroutine to it
09:44 Sjors added some routes there, and transformed the earlier Mojolicious::Lite app to use TestApp instead of Mojolicious::Lite
09:44 Sjors so per guides, I added TestApp->start(), and transformed the rest of the calls:
09:45 Sjors plugin "PODRenderer"; --> TestApp->plugin("PODRenderer");
09:45 Sjors get "/foo" => ...; --> TestApp->routes->get("/foo" => ...);
09:45 Sjors but this didn't work. Turned out, that even though you call TestApp->start(), an instance of TestApp is made there, which has its own instance->routes, not the same as TestApp->routes
09:46 Sjors the fix: creating your own instance of TestApp, then calling $app->plugin(), $app->routes... and $app->start
09:46 Sjors I think it would be more intuitive if TestApp->start() would check if there was already an instance of TestApp->routes and use it instead of creating a new one, if so
09:47 Sjors or, otherwise, that not TestApp->start() is used as an example, but my $app = new TestApp; $app->start(); it would at least give a hint as to what to do
09:47 Sjors sri: what do you think?
09:47 purl I think Sjors should try flossing more often!
09:49 irs Sjors: i'm certain the guide did not tell you to do TestApp->routes or TestApp->plugin
09:49 irs TestApp->start is a special case that works
09:49 pjb joined #mojo
09:49 Sjors irs: it definitely did not; that came from my own imagination
09:49 irs the growinf guide actually has many many examples for proper routes usage
09:50 irs s/f/g/
09:53 Sjors I saw that, but AFAIK it did not handle the case where I want myapp.pl to stay mostly the same "for now"
09:54 Sjors I have a large Lite app somewhere else, and I was testing how easy it was to "slowly" migrate that to separate controllers
09:56 Sjors i.e. first create an almost-empty controller and then move the routes to the correct place one-by-one
09:57 Sjors the way the growing guide goes from "Simplified Application Class" to "Simplified Application Script", in my opinion, sounds like something like that is possible
09:57 Sjors or, well, the start of "WELL STRUCTURED APPLICATION"
09:58 Sjors and it _is_ very well possible, but only by instantiating the application and feeding it routes
09:58 Sjors not instantiating it doesn't lead to any errors, it just doesn't lead to the desired behaviour
10:08 irs Sjors: so you basically want to skip the appliation class step and start with a controller?
10:09 irs my $r = app->routes; $r->namespace('TestApp'); $r->get('/foo')->to('bar#baz');
10:11 irs TestApp->routes and TestApp->plugin just make no sense at all, they would never be used like that in a real application, it would be an entirely useless step imo
10:22 irs don't even get why you would use TestApp->start already at that point
10:22 irs but maybe i'm missing something
10:23 Sjors irs: I want to slowly transform into a full-blown Mojolicious application, but currently have a Mojolicious::Lite app
10:23 Sjors so I want to first get a normal application class, to move things there, but still want the code in the Lite script to keep working
10:24 Sjors so yeah, TestApp->routes and TestApp->plugin make no sense
10:24 Sjors but TestApp->start being used in the tutorial seems to implicate TestApp->* will work, too
10:24 Sjors of course, unless you think about how TestApp->start is implemented
10:31 GitHub55 joined #mojo
10:31 GitHub55 [mojo] kraih pushed 1 new commit to master: http://git.io/03uvqA
10:31 GitHub55 [mojo/master] improved growing guide a bit - Sebastian Riedel
10:31 GitHub55 left #mojo
10:31 irs Sjors: that should solve it :)
10:34 irs no more references to MyApp->start
10:34 irs makes more sense anyway, since it's closer to the final script
10:35 judofyr irs: dude. you're reversed!
10:35 Sjors irs: that's very good, thanks
10:35 irs !EDUD
10:36 judofyr does this mean you're going to slow pick Mojolicious apart?
10:36 judofyr and we'll end up with nothing?
10:37 Sjors irs: but unless I'm mistaken, now the Growing guide contains less information on how to move from Mojolicious::Lite to Mojolicious itself
10:38 irs less information to confuse you ;p
10:38 Sjors definitely
10:38 Sjors :P
10:38 irs judofyr: i'll start with you!
10:38 judofyr :O
10:39 judofyr btw, I stole Mojo's regexp for splitting inline templates (the @@-markers): https://github.com/camping/camping/commit​/407e2ddd441f438722828dc77d9094e0dea66143
10:40 judofyr caller[0]=~/:/;IO.read($`)=~/^__END__/&&(​b=$'.split(/^@@\s+(.+?)\s*\r?\n/m)).shift rescue nil
10:40 judofyr feels like Perl to me
10:41 judofyr :)
10:41 irs you're prolly not the first, think there are at least two more cpan modules using it
10:42 irs and it does actually look like perl
10:43 judofyr just move the shift and split before the variable
10:45 judofyr irs: have you heard about Squatting?
10:45 judofyr by beppy
10:45 judofyr beppu*
10:45 judofyr https://metacpan.org/module/Squatting
10:46 irs ye
10:46 irs https://metacpan.org/module/Squatting::On::Mojo
10:47 irs it's so simple it might even still work :)
10:47 judofyr :)
10:48 judofyr irs: what do you think about the Mojo documentation? good enough?
10:49 irs definitely
10:49 irs i'm still improving it every other day though
10:53 judofyr irs: certainyl you do: $ git log --grep improv --grep doc --all-match  --oneline  | wc -l
10:53 judofyr 30
10:53 judofyr woah, there's like 248 commits that includes "improv"
10:54 irs 733 cleanup -.-
10:55 judofyr lol
10:56 judofyr irs: is there an easy way to see how long a UserAgent-request took?
10:56 Sjors irs: how often does mojolicio.us update its docs?
10:57 irs think every hour
10:57 irs judofyr: not that i know of
11:05 Sjors ah, they're updated :-)
11:15 irs hmm, if server sent events become popular a ->send_event(whatever => 'lalala') method might make sense
11:23 judofyr irs: how's the browser support?
11:25 irs http://caniuse.com/#feat=eventsource
11:26 irs quite impressive how much mobile safari supports
11:26 irs mobile chrome is rather pathetic
11:27 judofyr irs: simplest way to do reverse lookup on a Hash?
11:28 judofyr reverse maybe
11:28 mspo mobile firefox?
12:14 k-man left #mojo
12:15 shonorio joined #mojo
12:15 black joined #mojo
12:16 cosmincx joined #mojo
12:19 d4rkie joined #mojo
12:24 gizzlon hey
12:24 gizzlon anyone know how the tests work? This guy has problems : http://stackoverflow.com/questions/71​94666/mojolicious-home-test-question/
12:25 gizzlon guess theres something strange about his perl install?
12:25 * irs waves
12:25 irs seems so
12:27 irs cpantesters results are clean, we've also had no reports from other sources
12:27 shonorio joined #mojo
12:27 gizzlon looked at the code, but didnt quite get how it's suppose to work
12:28 gizzlon looks like it expects to be caalled from /usr/.. ?
12:29 sromanov_ joined #mojo
12:29 sromanov joined #mojo
12:30 irs he didn't even mention the platfrom, no point wasting time imo
12:31 gizzlon maybe he should post a bug repport on git?
12:32 irs only if he can do it properly
12:33 irs even with a well done report this stuff is almost impossible to track down
12:33 irs his best bet is to fix it himself
12:35 irs recently we've had a report from someone that did "cd FOO" into a directory called "foo" on an case insensitive file system
12:35 irs shit like that is impossible to debug
12:35 preflex joined #mojo
12:37 gizzlon had tests fail on freebsd with zfs root.. just foreced the install.. haven't noticed any problems
12:40 gizzlon bah.. can I get some debug output from IOLoop::Trigger? tried MOJO_IOLOOP_DEBUG=2
12:48 tabbi joined #mojo
12:48 tabbi left #mojo
12:49 irs gizzlon: would be nice if you could fix the failing tests
12:51 gizzlon irs: I'll take a look next time I boot that machine
13:01 sugar joined #mojo
13:30 kaare joined #mojo
13:30 d4rkie joined #mojo
13:34 eugen_ joined #mojo
13:34 eugen_ Hi guys. How can I include a file in the template 'as is' without processing as mojo template. Is it possible?
13:36 Skylos hm.
13:37 Skylos I don't know, but its an interesting question.  I wonder if anybody everthought of the need to do that before.
13:37 perlrocks Twitter: "Mojolicious Web Framework - Join the Perl revolution! http://t.co/LiI3w1z #programming" --Programming_m8y http://twitter.com/Programming​_m8y/status/107084294631071744
13:39 eugen_ I have an underscore.js template inslide the <script>...</dcript> that I want to include without processing.
13:59 koban` joined #mojo
14:05 marcus eugen_: put it in public
14:05 marcus oh, never mind
14:05 marcus don't do that :)
14:08 judofyr irs: has Mojo::Parameters changed recently?
14:09 eugen_ marcus, it would be nice if there were something like <% include 'foo', noparse => 1 %> or something like that
14:13 black joined #mojo
14:30 koban` left #mojo
14:33 random left #mojo
14:44 amoore joined #mojo
14:50 eugen_ well. I just temporary solved the problem with own renderer plugin: https://gist.github.com/1173569
14:57 perlrocks Twitter: "Mojolicious:: a Web application Lite, www Wakaran how connect to the Web by means other than CGI" (ja) --CLCLCL http://twitter.com/CLCLCL/​status/107104275561320448
15:08 Alias_ joined #mojo
15:13 kaare joined #mojo
15:18 vel joined #mojo
15:20 irs cosimo: in case the latest github version works, i'd appreciate a unit test ;)
15:22 cosimo irs: i already wrote one, but no, it doesn't work
15:22 cosimo unless it's really fresh, like last hour or so
15:22 irs one of the last commits
15:23 irs well, it won't parse the broken cookie
15:23 irs but it can recover and parse the other header values properly
15:24 cosimo didn't work for me. i can try again now.
15:24 elb0w joined #mojo
15:24 irs so even with the broken cookie your session cookie might get through
15:26 irs (it won't work if all cookies are in the same header value)
15:26 Skylos need new codeto handlecookies.
15:26 Skylos I wrote some.
15:27 cosimo no, it doesn't work
15:27 cosimo so anyway, I have been looking at how python's Cookie.py module works and how Django parses cookies, just in case...
15:27 Skylos not yet.
15:27 Skylos but mostly.
15:27 Skylos I extensively modified since fromwhat yousaw.
15:28 cosimo Cookie.py is so spectacularly broken
15:28 cosimo or, rather, incomplete
15:28 cosimo and Django needs to monkey patch it all over the place
15:28 cosimo BUT
15:29 Skylos heh.
15:29 cosimo one thing they do that's good it so protect the values when outputting cookies
15:30 cosimo so they have unit tests which output Set-Cookie: headers that are then fed to Cookie.load() to be parsed
15:31 cosimo I ported their parsing to Mojo::Cookie as _alt_tokenize() but sadly fails on so many tests that it's awful
15:31 Skylos I was only failingon one test when I knocked off pounding on it yesterday.
15:32 cosimo Skylos: did you commit your code somewhere?
15:33 Skylos no, its onlyon my local workspace right now.
15:33 Skylos I had determined that due to some complications in parsing with quoting
15:33 Skylos I neededto change my RFC2965 tokenizer.
15:33 Skylos the netscape tokenizer isworking fine now though.
15:34 irs i still don't get why you need multiple tokenizers
15:34 Skylos so the problematic cookie with the strange comma ceased tobe a problem.
15:34 Skylos you're the one who pointed out that youcan't do both types of cookie with the same parser.
15:34 Skylos There are different business rules based on which version of cookie you're parsing.
15:34 Skylos interlacing business rule sets is hard to manage.
15:35 irs quite sure that's not what i pointed out
15:35 Skylos you have multiple rule sets for parsing tokens.
15:35 irs anyway, i'm not very interested in multiple tokenizers just to support one totally broken case
15:35 Skylos So you need multiple tokenizers to handle the different rule sets.
15:35 Skylos actually, this tokenizer doesn't addressthat case.
15:36 Skylos it addresses the 2965 fullness case.
15:36 Skylos the broken cookie wasn't a 2965 problem.
15:36 irs ok, even less interested in that ;p
15:36 Skylos And there's ANOTHER case that is brokentoo.
15:36 Skylos I found it in the message.t tests.
15:36 Skylos But my goal in writing this codefor donation to you guys is to support all the possible cookies we can know about
15:36 Skylos regardless of irs's personal interest in them.
15:36 irs once again i can't follow… but i have to run now anyway
15:37 irs Skylos: just don't be disappointed when i reject a too complicated patch
15:37 Skylos I can only submit it.
15:38 Skylos not all problems are simple solutions.
15:38 irs from what i gathered so far the chances of it being accepted are very low
15:40 Skylos if its good code, you'll seethat its good code.
15:40 Skylos and you'll want it in mojo.
15:40 Skylos if its bad code, you'll see that too.
15:40 Skylos judge it when its working.
15:46 xaka joined #mojo
16:23 sromanov joined #mojo
16:37 Eugene joined #mojo
16:53 alpha6 joined #mojo
16:53 noganex_ joined #mojo
17:25 rhaen hep.
18:04 tempire woah
18:05 tempire somehow mojocasts qualifies to get special links in google
18:06 Skylos sweet.
18:06 tempire now I just have to make them relevant
18:07 Skylos aren't they?
18:15 tempire The "Previous" link is alright, but it should have the name of the previous cast
18:15 tempire and the chapters link is useless
18:21 marty_ tempire: good job on the google links for mojocasts.   Congrats!   also, I did'nt know you were in Chico, I used to live in Weed and would fly into Chico all the time.  In Medford now.  Hey neighbor!  :)
18:22 marty_ sri++ on all the new features.  Thanks!
18:22 alpha6 joined #mojo
18:23 marty_ Don't know about this irs persona.  Gives me the creeps.  :p
18:26 arpadszasz joined #mojo
18:31 mspo joined #mojo
18:42 crab makes me want to audit mojo some more
18:43 Firkin left #mojo
18:44 marty_ crab: :) Ya, to "fine" tune it.  :)
18:49 auggy left #mojo
18:56 Firkin joined #mojo
19:09 Firkin left #mojo
19:22 SmokeMachine joined #mojo
19:25 stephen joined #mojo
19:30 stephen1 joined #mojo
19:35 Eugene joined #mojo
19:36 preflex joined #mojo
19:38 sugar joined #mojo
19:42 eugen_ joined #mojo
19:58 preflex joined #mojo
20:15 Eugene joined #mojo
20:30 marty_ joined #mojo
20:40 marty_ left #mojo
20:41 marty joined #mojo
20:51 SmokeMachine joined #mojo
21:16 stephen joined #mojo
21:25 stephen1 joined #mojo
21:29 Eugene joined #mojo
21:32 Sjors What's the recommended way to configure the $ENV{MOJO_APP} ?
21:33 Sjors I tried adding "has foo => 0;" in the class, then instantiating it in the script, running ->foo(1) and then ->start(), but it was still set to 0
21:33 Sjors I have also tried adding my $FOO to the class, then setting $TestApp::FOO = 1; and it was also not set (plus, a warning that said "variable used only once, possible typo")
21:34 Sjors is the only way using %ENV?
21:50 rhaen puh.
22:46 ispy_ joined #mojo
23:13 eugen joined #mojo
23:16 black joined #mojo
23:20 mattastrophe joined #mojo
23:26 ispy_ joined #mojo
23:34 Kulag joined #mojo
23:37 elb0w joined #mojo
23:40 Drossel joined #mojo
23:51 stephen joined #mojo

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