Camelia, the Perl 6 bug

IRC log for #mojo, 2013-06-21

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

All times shown according to UTC.

Time Nick Message
00:05 egopro joined #mojo
00:05 mattastrophe joined #mojo
00:21 whitebook joined #mojo
00:24 jamesaxl joined #mojo
00:35 egopro joined #mojo
00:38 rem_lex joined #mojo
00:38 shmuel joined #mojo
01:08 rem_lex joined #mojo
01:16 egopro joined #mojo
01:18 cooper joined #mojo
01:51 d4rkie joined #mojo
01:57 Meiermann joined #mojo
02:18 whitebook joined #mojo
03:11 whitebook joined #mojo
03:21 rem_lex joined #mojo
03:35 preflex_ joined #mojo
03:38 d4rkie joined #mojo
04:26 Psyche^ joined #mojo
04:31 sh4 joined #mojo
05:33 Britzel_ joined #mojo
05:36 keedi joined #mojo
05:50 Britzel joined #mojo
05:53 basiliscos joined #mojo
06:14 winslow4 joined #mojo
06:32 Mike-PerlRecruiter_ joined #mojo
06:38 suy joined #mojo
06:38 dpetrov_ joined #mojo
06:43 abstract joined #mojo
06:55 dod joined #mojo
07:02 denisboyun joined #mojo
07:04 yakudza joined #mojo
07:06 MeierM joined #mojo
07:07 Molaf__ joined #mojo
07:15 mire joined #mojo
07:15 fhelmber_ joined #mojo
07:16 Vandal joined #mojo
07:17 dod joined #mojo
07:18 rem_lex|pivo joined #mojo
07:25 nicolaas joined #mojo
07:42 abra joined #mojo
07:45 nicolaas joined #mojo
07:50 egopro joined #mojo
08:06 abstract_ joined #mojo
08:14 jzawodn joined #mojo
08:14 ghandi|work joined #mojo
08:16 ghandi|work Hi There. Is there a easy way to make Mojo::DOM::CSS case-INsensitive when using the Attribute-Selector ('E[attr="value"]')? Got some troubles with Stylesheet-Links which sometime occur as rel="stylesheet" and rel="Stylesheet" when parsing a third-party site.
08:23 egopro joined #mojo
08:48 Jonis what's a good way to verify that a bunch of session parameters are set?
08:49 Jonis I was going to try render json ok if defined $self->session('parameter_name') but it doesn't seem to work
08:56 amirite_ joined #mojo
08:56 maxhq joined #mojo
09:05 nic Jonis: Do you mean s/session/stash/ ?
09:09 Meiermann joined #mojo
09:50 Jonis nic: no, session
09:51 Jonis post to /foofoo and sub foofoo does $self->session('name' => $self->param('name')
09:57 egopro joined #mojo
10:12 MeierM joined #mojo
10:18 cosmincx joined #mojo
10:20 crab that should work fine
10:22 jamesaxl joined #mojo
10:34 rem_lex joined #mojo
10:58 egopro joined #mojo
11:17 whitebook joined #mojo
11:41 libsysguy joined #mojo
11:54 abra joined #mojo
11:55 maxhq joined #mojo
11:58 egopro joined #mojo
12:00 amirite joined #mojo
12:14 amirite joined #mojo
12:25 nicolaas Hello, how can I use an AnyEvent convar in a controller called by a simple route ($r->get(/:controller/:action)->to( .. ))
12:25 nicolaas ?
12:31 denisboyun_ joined #mojo
12:35 btyler joined #mojo
12:37 nicolaas no thanks it's fine
12:40 chinaXing joined #mojo
12:52 bpmedley Jonis: You could write a plugin.
12:54 Jonis my @params = $self->param; foreach my $paramfield (@params) { $self->session($paramfield => $self->param($paramfield) };
12:55 Jonis would that drop all params into session with $paramfield as their name?
12:57 yakudza joined #mojo
12:58 marty jonis:  Have you looked at ->to_hash     http://mojolicio.us/perldo​c/Mojo/Parameters#to_hash
12:59 egopro joined #mojo
13:00 Jonis marty: oh nice, thanks :D
13:00 marty \o/
13:00 Jonis only started a few days ago, so still bucketloads I have no idea even exists :P
13:01 basiliscos joined #mojo
13:01 marty I understand.  There are lots of goodies in Mojo and it takes a while to find them all.
13:01 Jonis I've come to realize that :)
13:03 libsysguy nicolaas: have you looked at http://mojolicio.us/perldoc/Mojo/IOLoop instead of importing anyevent
13:03 marty I use $self->req->params->to_hash to lot.  I think you'll find it usefull
13:03 nicolaas yes but we're doing something quite special on windows
13:03 nicolaas it's working fine now, only forgot the $cv->recv
13:03 * libsysguy bows out then :p
13:04 nicolaas thank you
13:11 gryphon joined #mojo
13:16 mire joined #mojo
13:16 iankent joined #mojo
13:21 iankent qq, im trying to get the original route path from an actual url, whats the best way?
13:21 jamesaxl joined #mojo
13:21 iankent i.e., url is /some/resource/123, route is /some/resource/:id - given the URL, how do I lookup the route?
13:23 amirite joined #mojo
13:26 Jonis marty: second question, can you iterate over session?
13:27 marty iankent.  http://mojolicio.us/perldoc/Mojoli​cious/Guides/Routing#Named_routes    ie:  $self->url_for('current');
13:29 marty jonis.   Sure, but it depends on what you put into it I guess.
13:30 abstract joined #mojo
13:30 marty I think these days session usually just contains an identifier that points to storage on the server
13:32 nikita joined #mojo
13:33 iankent marty: thanks, but url_for actually returns the URL (I believe), not the original pattern. In the end I used $app->routes->find($self->curre​nt_route)->pattern->pattern... a bit odd, but it works!
13:35 btyler joined #mojo
13:48 asarch joined #mojo
13:59 egopro joined #mojo
13:59 memowe joined #mojo
14:01 bluescreen joined #mojo
14:03 sh4 joined #mojo
14:04 xxtjaxx How do you handle Websockets with plack/proxys?
14:12 whitebook joined #mojo
14:14 denisboyun joined #mojo
14:16 ChinaXing joined #mojo
14:16 mrphilov joined #mojo
14:18 davido joined #mojo
14:19 davido In Mojo::JSON::_decode_string, #Extract string with escaped characters, m#\G(((?:....., the second set of parens is never used for capturing, and can be set to m#\G((?:(?:...
14:21 davido All tests will still pass, and if you look over the source, there's no reference to $2 until after another capturing regex.
14:26 rem_lex joined #mojo
14:52 d4rkie joined #mojo
15:00 egopro joined #mojo
15:22 salparadise joined #mojo
15:24 Britzel joined #mojo
15:28 kwa Anyone here with decent experience of test driven design?
15:29 kwa I'm writing my rest interface using TDD, but I'm finding I'm repeating a lot of the tests. For example, I've broken the tests up into testing the schema/model, testing the rest controllers using Test::Mojo and testing any plugins I've written.
15:30 kwa I find with the rest controller tests I'm doing the same things for each controller. "Does user have permission", "can they create", "can they delete", "data integrity check" etc.
15:31 kwa Same with testing the model/schema. "Is primary key set." I'm copying any pasting tests from other tests.
15:32 kwa So my question is, do you factor out tests like this into schema_test_primary_keys.t and rest_data_integrity_check.t, or do you keep the tests contained to the controllers, e.g. rest_greetings.t and rest_users.t, where everything related to the controller is tested? :/
15:36 whitebook joined #mojo
15:42 xaka joined #mojo
15:58 xaka joined #mojo
16:01 egopro joined #mojo
16:10 libsysguy joined #mojo
16:15 libsysguy joined #mojo
16:33 denisboyun_ joined #mojo
16:42 dod joined #mojo
16:42 Dandre hello
16:42 Dandre How can I get the json data from a put in my router?
16:49 marty Dandre:  this might help.    https://metacpan.org/module/Mojo::Message#json
16:53 Dandre ok thanks
16:56 abra joined #mojo
17:02 egopro joined #mojo
17:04 Vandal hi, can any one tell me is it can lead to some problems? https://gist.github.com/darutoko/5832680
17:13 jberger joined #mojo
17:13 jberger o/
17:14 jberger hello all!
17:14 Vandal jberger, hi!
17:14 jberger niagara doesn't disappoint
17:14 jberger what did I miss here?
17:14 Vandal jberger, can you help?
17:14 Vandal 00:04 <Vandal> hi, can any one tell me is it can lead to some problems? https://gist.github.com/darutoko/5832680
17:16 basiliscos joined #mojo
17:16 jberger is the problem only in forking environments?
17:17 jberger Vandal, I can see what you mean to do code-wise, but for how long are those variables supposed to last?
17:18 Vandal jberger, I want them to last one request cycle
17:19 jberger then you should just use them from the stash
17:19 Vandal it just I'm using the same stash vars in many actions across controller
17:20 Vandal and it's bugging me tu type whole stash names
17:20 Vandal and its harder to read
17:21 Vandal I love how it in Rails - instace variables instaed of stash
17:21 Vandal so I though at least try to do this
17:22 Vandal but I'm afriad it can lead to pitfalls, like memory leaks
17:24 sri o/
17:30 jberger well you get a new controller for each request cycle, so in theory you could have attributes on the controller, but imo thats no better than the stash really
17:31 Vandal jberger, why it's not better? It will make code clearer for sure
17:32 jberger because you are going to have to unpack the stash into attributes anyway
17:32 jberger its your call
17:32 jberger I don't think I would do it personally, but its not a problem I suppose
17:32 Vandal I'm doing it anyway in each action
17:32 Vandal thank you
17:33 * jberger sends sri over the falls in a barrel
17:33 sri :O
17:33 jberger dont worry, the barrel will probably save you :-P
17:42 denisboyun_ joined #mojo
17:50 * tempire is one of the many monkeys in the barrel
18:05 jberger http://goo.gl/folhA
18:06 Vandal nice
18:07 jberger our little splurge before I start the new job
18:09 sri nice view
18:19 dvinciguerra joined #mojo
18:23 libsysguy joined #mojo
18:32 sri davido: is there a measurable gain?
18:32 Mike-PerlRecruiter_ joined #mojo
18:45 mire joined #mojo
19:03 egopro joined #mojo
19:07 bluescreen joined #mojo
19:09 good_news_everyone joined #mojo
19:09 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/w-LAAw
19:09 good_news_everyone mojo/master 11f3521 Sebastian Riedel: small optimizations
19:09 good_news_everyone left #mojo
19:31 davido There's a semantic gain, and while I didn't benchmark, (?:...) will eliminate the potential of making an extra copy of a string of 32766 bytes.
19:31 davido I see you made the change.
19:36 sri i couldn't measure a gain though
19:40 mire joined #mojo
19:41 jamesaxl joined #mojo
19:45 btyler joined #mojo
19:56 amirite joined #mojo
20:04 egopro joined #mojo
20:16 rem_lex|pivo joined #mojo
20:20 mire joined #mojo
20:21 davido I'm also looking at that code from a different perspective; trying to push back compatibility with earlier versions of Perl.  :) That one line has the potential of segfaulting on Perl 5.8.9 or older.
20:21 davido (even after the change).  This isn't a Mojolicious concern, obviously.  :)
20:22 sri davido: i know, one of the reasons i pushed so hard to move mojolicious to 5.10.1
20:22 jamesaxl joined #mojo
20:22 sri 5.8 regex engine is garbage, i know a dozen ways to segfault it
20:22 dod joined #mojo
20:23 davido I'm probably going to refactor that line into something that uses substr more.
20:24 davido (I don't need 5.8 support; just trying to provide it, which is different. ;)
20:24 davido Anyway, got to run, have a nice day.
20:24 sri good luck (you'll need it ;p)
20:24 davido Yeah, i know. haha
20:27 gryphon joined #mojo
21:01 KindOne joined #mojo
21:04 bluescreen joined #mojo
21:04 egopro joined #mojo
21:23 jberger aren't we close to not having to worry about 5.8 support yet?
21:23 jberger (perl in general that is, not just mojo)
21:23 jberger (obviously as mojo doesn't officially support 5.8)
21:23 Mikey CentOS makes this hard
21:38 tempire there's a mojolicious for 5.8
21:38 tempire it's kept up-to-date pretty well
21:39 tempire jberger: where's the new job?
21:39 jberger tempire, yeah, its an impressive effort, but its sad that its needed
21:39 jberger writing software for a large bank, not quite as sciencey as I had hoped
21:39 tempire erg
21:39 jberger but it seems like science isn't hiring right now
21:39 tempire that shoulds horrible.
21:39 tempire *sounds
21:40 jberger we'll see
21:40 jberger at least it pays well
21:40 jberger (which is something that cannot be said of being a grad student)
21:41 btyler joined #mojo
21:41 jberger the bank has been kind enough to host chicago.pm meeting though, so I hope that the culture is good enough
21:41 jberger *meetings
21:54 btyler joined #mojo
21:59 Liam`` joined #mojo
22:04 Liam`` joined #mojo
22:05 egopro joined #mojo
22:08 burbon joined #mojo
22:19 jberger ok after using ubuntu exclusively since 7.04 I'm willing to look again, does anyone have a favorite distro
22:19 jberger preferably something that can use the ubuntu repos
22:19 sri ubuntu
22:19 daemonic everyone seems to love mint 15
22:20 daemonic i installed it on my work laptop, don't do much besides open a terminal
22:20 daemonic but it seems nice
22:20 sri ubuntu
22:20 jberger sri: you think I should save my time
22:20 sri HODOR!
22:20 jberger QUIET HODOR
22:21 jberger the thing that has kept me from straying has been the hardware support
22:24 tempire in that case, osx
22:25 * sri thinks jberger wants a linux
22:25 * jberger doesn't pay extra to be told how to program :-P
22:26 * sri hugs his macbook air
22:26 sri btw. the linux kernel is currently being developed by linus on a macbook air ;p
22:26 asarch joined #mojo
22:27 jberger I know, I actually don't hate mac, but I still wont pay for one
22:28 sri i've looked at quality laptops recently, quality alternatives are not much cheaper
22:28 buu I have a series 9 samsung, it's amazing
22:28 buu And possibly better, but not any cheaper
22:28 buu And I'm not sure how well it supports ubuntu
22:29 sri by which i mean mostly thinkpads
22:29 sri yea, top pf the line samsung are not cheap either
22:29 jberger I've seen that too
22:30 jberger oddly though, the netbook I'm using right now has been the most reliable non-desktop I've ever owned
22:31 sri most reliable i've ever owned was a TiBook... terribly slow, but works to this day with all original parts
22:32 jberger yeah, this netbook takes quite a while to compile anything, but outside that its speed doesn't affect me too much
22:32 jberger I burned up two standard laptops in the same time I've been using this one
22:32 sri you *think*... but then your 10k unit tests finish in 10 seconds instead of a minute...
22:33 jberger true enough
22:33 jberger well, a new lappy is probably a part of the new job
23:06 egopro joined #mojo
23:20 jberger ok going down for a bit, 13.04 fresh install here I come
23:22 human39 joined #mojo

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