Camelia, the Perl 6 bug

IRC log for #mojo, 2011-09-08

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

All times shown according to UTC.

Time Nick Message
00:11 j3nnn1 joined #mojo
00:35 shonorio joined #mojo
00:40 GitHub27 joined #mojo
00:40 GitHub27 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/e8​ecedd5d39a73173b44e789e48cab5b6032762b
00:40 GitHub27 [mojo/master] fixed small bug that caused exceptions to be logged twice - Sebastian Riedel
00:40 GitHub27 left #mojo
01:07 preflex_ joined #mojo
01:50 gabiruh joined #mojo
01:51 mspo joined #mojo
01:52 echosystm joined #mojo
01:52 echosystm is there any way to change the log level of a mojo app at runtime, without restarting it?
02:03 perlrocks Twitter: "Using CSS4 selectors Mojolicious http://t.co/gxTrL4R" (ru) --GenaevMisha http://twitter.com/GenaevMis​ha/status/111620572177383426
02:13 marty_ sri++ on the new css - it looks very good
02:37 xaka joined #mojo
03:37 perlrocks Twitter: "www/p5-Mojolicious - 1.97: - Update to 1.97  Changes:        http://t.co/ToyQrlu PR:... http://t.co/eyM6Thw" --freshports_org http://twitter.com/freshports_​org/status/111644200692486145
04:15 jwang joined #mojo
04:46 GabrielVieira joined #mojo
04:53 eugen joined #mojo
05:09 Foxcool joined #mojo
05:42 Firkin joined #mojo
06:06 Alias_ joined #mojo
06:13 Eugene joined #mojo
06:14 koban joined #mojo
06:14 tabbi joined #mojo
06:14 tabbi left #mojo
06:35 lammel2 joined #mojo
07:22 sromanov joined #mojo
07:30 eugen joined #mojo
07:35 sugar joined #mojo
07:39 cosmincx joined #mojo
07:42 Properler joined #mojo
08:07 Properler|2 joined #mojo
08:20 spleenjack joined #mojo
08:38 * sri yawns
08:39 * marcus yawns too
08:40 * marcus is almost leaving for vacation.
08:42 judofyr joined #mojo
08:44 * sri could use some vacation too
08:44 sri marty: glad you like it
08:57 GitHub2 joined #mojo
08:57 GitHub2 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/49​2526cfbaaf187e6cd5ba84d6f9f6c3266cc00d
08:57 GitHub2 [mojo/master] a few more CSS tweaks - Sebastian Riedel
08:57 GitHub2 left #mojo
08:57 sri all serifs should be gone now
08:58 judofyr consistency++
09:28 GitHub86 joined #mojo
09:28 GitHub86 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/d5​2961f43102bfbeacd7341dee944081dd2c3665
09:28 GitHub86 [mojo/master] added mod_proxy recipe - Sebastian Riedel
09:28 GitHub86 left #mojo
09:54 GitHub89 joined #mojo
09:54 GitHub89 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/77​716efce26045c56ae1044111ca99e377aaf081
09:54 GitHub89 [mojo/master] improved mod_proxy recipe - Sebastian Riedel
09:54 GitHub89 left #mojo
10:04 sh9 joined #mojo
10:08 sh7 joined #mojo
10:42 judofyr sri: would it be too much magic if there was a Mojo::Base::Weakened which overrides ::new with support for weakened-stuff, and "has foo, weaken => 1" unshifts it to ISA?
10:43 judofyr probably…
10:43 Properler joined #mojo
10:44 judofyr I know it breaks the "single-inheritence everywhere"-principle…
10:56 chansen joined #mojo
11:09 sri judofyr: that's basically what yko suggested yesterday
11:10 judofyr sri: ah. with the "unshift the package on weaken => 1" too?
11:11 sri i don't know what that means
11:11 shonorio joined #mojo
11:11 sri wait, are you proposing a core change again?
11:12 sri that's not an option
11:13 sri just make it a separate module
11:13 sri like Mojo::Base::XS
11:13 judofyr heh :)
11:13 judofyr I just want "use Mojo::Base -base; has 'foo', weaken => 1" to work
11:14 judofyr but I guess it's not really needed
11:16 marcus judofyr: use Moose;
11:16 marcus has foo => (isa=>Foo, weak_ref=>1);
11:17 judofyr another (rather big) dependency :/
11:17 marcus judofyr: it's already a indirect dimu3 dependency.
11:17 marcus judofyr: schema uses it
11:20 stephan48 dimu3?
11:20 judofyr stephan48: internal project :)
11:21 * judofyr works together with marcus
11:21 stephan48 k
11:32 cosimo joined #mojo
11:38 noganex_ joined #mojo
11:47 yko looks like everyone happy now?  :D
11:47 yko except sri :)
11:49 judofyr yko: why isn't sri happy? :S
11:49 sri why can't i be happy? :(
11:49 judofyr too much Perl
11:50 yko because you are developer of a web framework
11:50 judofyr an async web framework
11:50 yko framework being developed till you are unhappy
11:51 yko once you found your happiness framework will freeze (which is good too) :D
11:51 sri maybe i should just become a race car driver too :S
11:51 judofyr sri: it's the logical next step, yes
11:51 * sri nods
11:51 yko thats quick way to reach happiness. as well as border or column :)
11:52 yko s/border/barrier/
11:52 judofyr yko: where are you from btw?
11:53 yko Kiev, Ukraine
11:53 yko homeland of many famous people, like Larry Wall or Linus Torvalds
11:53 judofyr "yko" sounds way more Japanese :P
11:53 yko oops. looks like I said something wrong :)
11:54 judofyr :)
11:54 yko judofyr, it is, and it's just great I think
11:54 judofyr yko: you're totally Japanese in my head (I think that's a compliment…)
11:55 judofyr complement*
11:55 judofyr or however it's spelled
11:55 yko well, my english should look badly and strange, my nickname looks like japanese and i'm a bit noisy. yes, i'm like form Japan :)
11:56 yko for sure it's compliment, actually I really like this fact
11:56 sri now that you mention it, russian english can look a lot like japanese english
11:57 sri google translations for japanese are usually quite a bit more crazy though
11:57 judofyr wtf? http://kraih.com/ == Mojolicious
11:58 j3nnn1 joined #mojo
11:58 sri why wtf?
11:58 judofyr not sure really
11:58 judofyr just ignore me
11:59 judofyr (that's usually a good idea)
11:59 sri i actually redirect *a lot* of domains to the mojolicious server atm :)
11:59 judofyr sri: please leave ruby-lang.org will you?
11:59 sri no promises
12:38 Properler|2 joined #mojo
13:19 marcus :D
13:20 marcus Free wifi at the AirPort FTW.
13:20 marcus Wtf autocorrect.
13:43 rwstauner joined #mojo
13:44 cwg joined #mojo
13:47 perlrocks Twitter: "An attempt to view Perl related tweets in one place.  http://t.co/HjM3bQM #perl #mojolicious #UIsucks" --bobfaist http://twitter.com/bobfaist​/status/111797750798094336
13:53 cwg Hi. Building Mojolicious::Plugin::Mail I get "Wide character in [snip] 5.12.1/Mojo/Util.pm line 304" (in b64_encode()). Mojo 1.97 on osx. Am I missing something known/obvious -or should I just go debug?
13:54 * sri waves
13:55 sri cwg: b64_encode expect bytes, not characters
13:55 sri *expects
13:55 * cwg checks *.t
13:59 sri prolly a bug in Mojolicious::Plugin::Mail or its tests
14:00 sri parts of mojolicious were more forgiving about unicode errors in the past
14:07 Properler joined #mojo
14:12 sri cwg: you should definitely poke the author
14:14 cwg Always with the poking. :) b($utf8_str_w_cyrillic)->b64_encode('') croaks here. Trying a fresh perlbrew.
14:19 sri that should croak
14:19 sri b($utf8_str_w_cyrillic)->enc​ode('UTF-8')->b64_encode('')
14:19 sri cwg: that should be there
14:21 * sri pokes cwg (just because)
14:33 cwg So the relaxed unicode err handling allowed for this previously? https://github.com/sharifulin/mojoliciou​s-plugin-mail/blob/master/t/mail.t#L243
14:36 cwg ..because then I know who/how to poke. And will shut up.
14:37 sri cwg: correct
14:39 cwg sri: neat. (snaps irclog)
14:40 sri cwg: http://blogs.perl.org/users/ar​istotle/2011/08/utf8-flag.html # here's a link in case the person asks why the more forgiving unicode handling was bad
14:41 cwg sri: thanks
14:49 metaperl joined #mojo
14:51 eugen joined #mojo
14:52 abra joined #mojo
14:59 Kulag joined #mojo
15:04 elb0w What does a * denote when its used like *m = \some::package?
15:05 sri glob
15:06 judofyr magic
15:06 elb0w I've never done that
15:06 elb0w saw it used at a perl meetup last night
15:06 elb0w was like o. whats that :P
15:06 sri it's one of the last things you should learn
15:07 judofyr ooooooo. I want to learn this!
15:07 sri you usually learn it together with symbol tables
15:07 elb0w symbol tables?
15:07 purl symbol tables are basically hashes.  There'd be some lookup overhead.
15:07 elb0w ahh the downside of not going to school
15:09 sri read mastering perl
15:09 elb0w so could you do $m = glob some::package instead?
15:09 sri it should have a chapter on it
15:10 sri i refuse to give you more dangerous half knowledge :)
15:10 elb0w ok np
15:10 elb0w :d
15:10 elb0w I need to read a book on perl finally
15:10 sri read the trilogy
15:10 elb0w Ive literally read about haskell,c,python,ruby and never use them
15:11 elb0w I have modern perl on my bookshelf
15:11 sri learning perl, intermediate perl, mastering perl
15:11 sri can't go wrong with those
15:12 elb0w After 3 years which would you read?
15:12 sri all three
15:12 elb0w ok
15:12 elb0w pdf's of all 3
15:12 elb0w nice
15:12 elb0w :d
15:13 sri buy them to make sure there will be new editions
15:13 elb0w yeah, I will
15:14 elb0w hasnt been updated since 2007
15:15 sri in fact, i would get those three as dead tree editions
15:15 sri they are quite useful to have on the desk
15:16 elb0w ive been forbidden to buy any more physical programming books by the girlfriend
15:16 elb0w 2 book shelfs is apparently my limit
15:19 sri the c programming language has not been updated since 1988, so what? ;p
15:20 elb0w true
15:20 elb0w So a lot of the older community really hasnt embraced mojo
15:20 elb0w sort of sad
15:20 elb0w All I heard last night was catalyst and dancer
15:20 sri so what?
15:20 purl or stack overflow (dot com, it's .NET!)
15:21 elb0w so you guys are doing a good thing for perl
15:21 elb0w it should be out front imo
15:22 sri you can't force oldtimers to embrace the new
15:22 sri the perl community is not full of hipsters, they take years to discover new technologies
15:23 elb0w they werent really old persay
15:23 elb0w pretty much all 20-40
15:24 sri seriously, i've been fighting just as hard back in the catalyst days
15:24 sri same old for me
15:25 sri i couldn't care less what those old fashioned people say, all we can do is keep pushing forward
15:26 crab i'm not a hipster, i'm an early adopter.
15:26 sri what's the difference? :)
15:26 crab less hips
15:26 elb0w the hipster adopted it before everyone else
15:36 njlg joined #mojo
15:37 Cside joined #mojo
15:41 xaka joined #mojo
15:55 grim_fandango joined #mojo
15:59 ZadYree joined #mojo
16:00 ZadYree Hello here
16:00 * sri waves
16:00 ZadYree I have a question: Where can I find a mojo::guide for adding the same kind of helpers as title and content?
16:01 ZadYree can't find the accurate one for what I need
16:01 ZadYree and classic helpers work slightly differently
16:03 sri there is no guide that specific to my knowledge
16:03 sri but the plugins are all good exampes themselves
16:04 sri https://github.com/kraih/mojo/blob/master/l​ib/Mojolicious/Plugin/DefaultHelpers.pm#L16
16:04 ZadYree I see, thanks
16:04 sri it's really trivial
16:05 sri they are just accessors for a stash value
16:05 ZadYree yup
16:06 sri the plugins actually only exist to serve as examples ;)
16:06 ZadYree ah i see!
16:14 ZadYree ah and btw I lost this page, where the template role or <% %>, <%= %> etc were explain :S
16:15 sri http://mojolicio.us/perldoc/Mojolic​ious/Guides/Rendering#Embedded_Perl
16:15 ZadYree thanks!
16:16 * sri wonders if the growing guide should be first in the list of guides
16:17 sri i think it only uses stuff that's covered by the tutorial
16:19 GitHub4 joined #mojo
16:19 GitHub4 [mojo] kraih pushed 1 new commit to master: http://git.io/MBsmlg
16:19 GitHub4 [mojo/master] promote growing guide - Sebastian Riedel
16:19 GitHub4 left #mojo
16:22 sri i guess the tutorial could mention <%= and <%
16:23 ZadYree hm well, it seems unicode chars are still not handled
16:23 ZadYree î is replaced with Î
16:24 sri in templates you're supposed to use characters
16:24 sri i suppose you're giving it bytes
16:25 sri oh and don't forget % use utf8;
16:25 ZadYree well, added a text with special chars, eg hello wörld
16:25 ZadYree aaah
16:25 ZadYree yaa
16:25 sri it's just perl code in the end ;)
16:27 sri another good recipe idea for the guides
16:27 ZadYree Yeah, I didn't think of it. Atm it just deleted those chars, but I'm sure it will work soon :)
16:28 sri oh wait
16:28 sri it's already mentioned in the rendering guide
16:29 sri slightly different context though
16:30 ZadYree yeah
16:31 ZadYree it does nothing when before __DATA__
16:31 ZadYree hum
16:31 perlrocks Twitter: "Mojolicious-Plugin-UrlWith 0.03 by JHTHORSEN - http://t.co/sqgrIAo" --cpan_new http://twitter.com/cpan_new​/status/111839052520632320
16:31 ZadYree and embedding it in layout is the same
16:32 ZadYree maybe some under => sub { $self->renderer->encoding('utf-8'); }
16:32 ZadYree s/\$self/shift/
16:33 kaare_ joined #mojo
16:36 ZadYree hum nope ^^
16:37 d4rkie joined #mojo
16:39 ZadYree pm/hl me if you have a clue, I gotta go for a while
17:28 grim_fandango How many people are using a plugin for route authorization (e.g., force users to be authenticated for a given set of routes) vs. just writing that in plain Mojo?
17:29 grim_fandango I ask, because I'm a having a difficult time getting my head around the latter, even though I think it should be easy.
17:30 grim_fandango (I'm not using ::Lite)
17:36 GitHub51 joined #mojo
17:36 GitHub51 [mojo] kraih pushed 1 new commit to master: http://git.io/2ad8mw
17:36 GitHub51 [mojo/master] improved many recipes - Sebastian Riedel
17:36 GitHub51 left #mojo
17:39 GitHub85 joined #mojo
17:39 GitHub85 [mojo] kraih pushed 1 new commit to master: http://git.io/kb9xZg
17:39 GitHub85 [mojo/master] renamed recipe - Sebastian Riedel
17:39 GitHub85 left #mojo
17:39 sri ZadYree: that should help
17:47 GitHub74 joined #mojo
17:47 GitHub74 [mojo] kraih pushed 1 new commit to master: http://git.io/Gl4Lrg
17:47 GitHub74 [mojo/master] cleaned up documentation a bit - Sebastian Riedel
17:47 GitHub74 left #mojo
17:59 bpaluch_ quick question: is there an easy way to get the address and port of the mojolicious server from inside a base class?
18:02 grim_fandango $self->req->url->base ?
18:03 bpaluch_ yeah but its not from a request
18:03 bpaluch_ I need it in my data component to see if I need to send a command to the local instance or remote
18:04 bpaluch_ not in a controller class, just a base class
18:05 bpaluch_ hmm maybe I"ll just have my local instance figure it out in the controller class for itself.
18:10 mspo bpaluch_: just throw it in a config
18:10 mspo bpaluch_: that's layer 3 stuff :)
18:12 bpaluch_ yeah I guess, I've been trying to reduce the amount of configs in this app as much as possible, I'm trying to build something that I can autoscale into my openstack cluster, and adding config files makes it more complicated.
18:16 mspo bpaluch_: you can always assume localhost
18:18 sri nope, you shouldn't be able to get that information without a request
18:20 bpaluch_ got it guess its config file afterall. Thanks sri and mspo
18:21 sri what server are you using anyway?
18:22 sri http://mojolicio.us/perldoc/Mojol​icious/Guides/Cookbook#Embedding # the second example could be interesting
18:22 sri or if you're using hypnotoad you could just set a ENV var inside hypnotoad.conf
18:23 sri you can always build something around mojolicious
18:23 bpaluch_ i'm using morbo right now for testing, but I'll probably go with hypno
18:23 sri then you'll have a hypnotoad.conf anyway
18:24 sri testing will be a bit tricky, but that's always the case with these non-portable hacks
18:48 Firkin left #mojo
18:59 GitHub27 joined #mojo
18:59 GitHub27 [mojo] kraih pushed 1 new commit to master: http://git.io/_3_YDA
18:59 GitHub27 [mojo/master] more documentation tweaks - Sebastian Riedel
18:59 GitHub27 left #mojo
19:01 preflex_ joined #mojo
19:14 eugen joined #mojo
19:17 newbie joined #mojo
19:26 sugar joined #mojo
19:27 Skylos joined #mojo
19:42 mattastrophe joined #mojo
20:02 ZadYree sri, as I splitted the script file and the __DATA__ one, I in fact had to add the pragma before __DATA__ itself, having:  use utf8; 1; __DATA__ tpl
20:03 sri that's what the documentation says
20:08 rwstauner joined #mojo
20:08 tempire elb0w: don't let the dancer+catalyst talk at the pm group get you down.  mojolicious stands on its merits, and why it continues to grow strength
20:09 tempire even the "old-timers" that have a personal problem with sri don't say much against it, 'cause they know sri knows what he's doing.
20:09 tempire hell, just look at the number of people in #mojo vs #dancer
20:10 tempire besides the fact that mojolicious is much more that what dancer is
20:10 tempire *than
20:10 tempire that's not knocking dancer at all, it is what it is, and that's fine
20:11 Skylos dancing the knight away...
20:11 Skylos everybody knows dancing is how you get your mojo on.  ;)
20:11 sri elb0w: the fact that people rave about catalyst should actually be encouraging, mojolicious is the next incarnation of it
20:12 tempire even vti's vocal departure from mojo didn't do much in terms of momentum, again, 'cause mojolicious has a solid foundation
20:12 sri and the fact that we have such a huge community even though we are as bleeding edge as it gets is a miracle
20:12 tempire ALMOST LIKE A DOUBLE RAINBOW
20:12 sri the perl community is so conservative in general, WHERE HAVE YOU GUYS BEEN HIDING ALL THESE YEARS? :D
20:13 * Skylos peeks out from under his rock.
20:13 * tempire likes mojolicious, even if he thinks that sri's subroutines are too big
20:13 sri and i comment too much
20:14 sri tempire: got any specific ones in mind?
20:15 tempire I haven't looked at the source in a while.  I have nothing to back up my statement at the moment.
20:15 sri i recently split up quite a few
20:15 tempire But also keep in mind I've just recently been lispified.
20:15 tabbi joined #mojo
20:16 sri well, my general rule of thumb is keeping subroutines below 100 lines (which contain a lot of empty lines and comments)
20:16 * Skylos all hail lisp
20:16 Skylos My subroutines have a tendency to be in the 5-10 line range when I'm pleased with myself.
20:17 * Skylos has trouble doing more than two things at a time.
20:17 tempire I used to be 20-30.  everything has changed since lisp, though.
20:17 tempire now I'm all about single function subs
20:17 sri https://github.com/kraih/mojo/blob​/master/lib/Mojo/Template.pm#L198
20:18 sri try splitting up that one ;p
20:18 tempire ah yes, the regexes.
20:18 tempire I wondered about that myself
20:18 Skylos what are you parsing?
20:18 sri ep templates
20:18 purl ep templates are made to use $x instead of stash 'x'! :)
20:18 sri it's the whole engine
20:19 tempire all in all, even the large ones are really easy to read
20:19 tempire Skylos is a real stickler for small subs, even if he hasn't gotten off his lazy missourian butt to learn lisp
20:19 Skylos I think you could use function calls instead of mutating things with splice.  would take more stack though.
20:20 sri it's usually regex tokenizers and the like i have trouble splitting up (without losing a lot of performance)
20:20 Skylos there are some things that are best done for high performance.
20:20 tempire truth
20:20 Skylos requires alot of testing though.
20:21 Skylos this kind of code make me squint and sigh.  I hope its right because it'd take a heck of a time for me to figure out whats wrong with it.
20:21 sri TDD++
20:21 tempire ++
20:21 Skylos finite state machine looping over tokens with states text code expr escp cmnt I think.
20:21 sri https://github.com/kraih/mojo/​blob/master/t/mojo/template.t
20:21 sri massive amount of unit tests
20:22 Skylos bravo.  100% code coverage?
20:22 sri for templates i'm quite sure, overall it was 96% or so
20:22 Skylos sweet.
20:22 sri 12k SLOC libraries and 15k SLOC tests ;p
20:24 tempire and yet another side-effect of no deps is that the measurement covers nearly the whole stack
20:24 Skylos I've been asked to find out of a perl programmer knows diddlysquat about OOP
20:25 Skylos a 'technical screening'
20:25 Skylos the P in OOP being Perl, of course.
20:27 newbie1 joined #mojo
20:32 sri sounds easy
20:43 * sri wonders if there is better music for programming than massive attack
20:52 stephan48 sri: ye, mozart, schumann and so on *starts to run*
20:52 Skylos Joan Sutherland.
21:17 * sri is not convinced -.-
21:31 Akron joined #mojo
21:53 cwg left #mojo
22:07 Skylos holy crap its an old perl hacker.
22:07 Skylos never had a use for a dispatch framework or templtes
22:13 Skylos he don't got his mojo on
22:17 Skylos he thinks object oriented perl is using an object or two like DBI now and then.
22:17 sri :)
22:18 Skylos *sigh*
22:18 Skylos we have a long way to go to educate the world.
22:19 sri it can be quite frustrating how slowly perl folks move forward
22:21 Skylos it sure can
22:29 rhaen hello world
22:29 rhaen what's up in Mojo land?
22:29 Skylos interviewing dumbheads.
22:30 rhaen who do you interview?
22:30 Skylos some yoyo old-school perl guy.  I was supposed to determine if he knew OO perl.
22:31 rhaen ah. sure - just use a few objects here and there and you dbi. easy stuff.
22:32 Skylos yeah.  Thats all there is to oo perl.  sure.
22:49 preflex_ joined #mojo
22:51 metaperl joined #mojo
23:07 black joined #mojo
23:08 gshank joined #mojo

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