Camelia, the Perl 6 bug

IRC log for #mojo, 2013-06-20

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

All times shown according to UTC.

Time Nick Message
00:04 hesperaux_ joined #mojo
00:08 tempire joined #mojo
00:12 btyler joined #mojo
00:31 shmuel joined #mojo
00:45 whitebook joined #mojo
00:59 whitebook joined #mojo
01:01 egopro joined #mojo
01:02 egopro joined #mojo
01:07 amirite_ joined #mojo
01:25 mattastrophe joined #mojo
01:57 Meiermann joined #mojo
01:57 d4rkie joined #mojo
02:00 good_news_everyone joined #mojo
02:00 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/bBiwaw
02:00 good_news_everyone mojo/master 7a7723f Sebastian Riedel: more consistent POD formatting
02:00 good_news_everyone left #mojo
02:03 bluescreen joined #mojo
02:06 marty joined #mojo
02:07 asarch joined #mojo
02:09 asarch joined #mojo
02:26 inokenty joined #mojo
02:27 zackiv31 joined #mojo
02:41 btyler joined #mojo
02:43 cooper joined #mojo
03:03 egopro joined #mojo
03:18 irctc395 joined #mojo
03:49 basiliscos joined #mojo
04:00 egopro joined #mojo
04:11 egopro_ joined #mojo
04:27 Psyche^ joined #mojo
04:28 egopro joined #mojo
05:04 Britzel_ joined #mojo
05:05 jnbek joined #mojo
05:37 keedi joined #mojo
05:53 SmokeMachine joined #mojo
05:57 Meiermann joined #mojo
06:01 suy joined #mojo
06:02 preflex joined #mojo
06:08 Vandal joined #mojo
06:09 dpetrov_ joined #mojo
06:32 nic xxtjaxx: That's a fun project. Joel Berger gives an example on stackoverflow
06:32 Mike-PerlRecruiter_ joined #mojo
06:34 nic http://stackoverflow.com/questions/17113399/mojo​licious-and-delayed-websocket/17113876#17113876
06:34 nic is a decent place to start (in addition to the examples in the Cookbook) but don't feel bound to using EV and AnyEvent
06:37 hesperaux__ joined #mojo
06:39 nic I'll soon have a similar project now that $work are happy with async calls to MySQL (thanks to DBD::mysql and Mojo::IOLoop::Delay \o/ )
06:45 Jonis http://pastebin.com/wD9KsDkw does that look right? I can't for the life of me figure out how to load the plugin though. tried both use and plugin. it's located in the lib/WebApp/Plugin/ folder.
06:46 Jonis the $url is simply an url with some search parameters.
06:50 nicolaas joined #mojo
06:53 dod joined #mojo
06:59 SmokeMachine joined #mojo
07:01 yakudza joined #mojo
07:01 davido joined #mojo
07:01 egopro joined #mojo
07:02 egopro_ joined #mojo
07:06 egopro joined #mojo
07:09 kwa Jonis: You've not implemented the method 'register' in your plugin subclass.
07:09 dod joined #mojo
07:10 kwa Rename sps to register, and go from there.
07:10 Jonis kwa: thanks, I'll give that a go :D
07:11 kwa :)
07:11 Jonis then load it in main app using plugin WebApp::Plugin::SPSearch; ?
07:12 kwa Yeah, just load the plugin. $self->plugin('SPSearch');
07:13 Jonis :D brilliant
07:14 kwa I place my plugins in the normal path, Mojolicious::Plugin:: but if you've added your namespace it shouldn't be a problem.
07:18 rem_lex joined #mojo
07:18 xxtjaxx nic: Yeah I got it working later on.
07:18 xxtjaxx nic: https://github.com/andreas-marsc​hke/mojo-rickshaw/tree/websocket
07:19 Jonis kwa: Can't locate object method "plugin" via package, we're running the debian stable version of mojo, later would be nicer but this will eventually go into production(I'm a summer intern).
07:19 Jonis hang on, I'll post the revised
07:19 kwa Are you using Mojo or Mojolicious::Lite?
07:20 Jonis mojo
07:21 trone joined #mojo
07:21 kwa Are you calling the plugin from the startup method?
07:23 Jonis no, is that where I should be doing it?
07:24 Jonis I'm calling it in WebApp::Segment, not WebApps startup method
07:25 Jonis ooh,
07:25 Jonis dingding
07:25 Jonis :D
07:25 Jonis kwa: thanks :D
07:26 kwa nps :)
07:28 kwa Jonis: Check out the documentation and some functional examples - https://github.com/tempire/MojoExample and https://github.com/jberger/Galileo - when you get a bit of time. They'll definitely help you in the long run.
07:32 Jonis kwa: thanks, will definitely do.
07:47 egopro joined #mojo
07:56 keedi joined #mojo
08:13 jzawodn joined #mojo
08:17 egopro joined #mojo
08:35 dod joined #mojo
08:42 jamesaxl joined #mojo
08:45 fhelmber_ joined #mojo
08:58 marcus_ joined #mojo
08:58 batman joined #mojo
09:00 egopro joined #mojo
09:06 DaTa ugh, nobody is taking care of MojoX::Renderer::TT
09:09 nic xxtjaxx: Thanks for the link; I look forward to playing with that tomorrow
09:15 fhelmbe__ joined #mojo
09:18 nikita \n
09:21 xxtjaxx nic: I'll be using this and a load of other experiments on another repo on the same acc. github.com/andreas-marschke/nagplot will be fun.
09:24 nic nice
09:31 yakudza joined #mojo
09:39 xxtjaxx nic: NICS << that you?
09:40 mire_ joined #mojo
09:43 arthas joined #mojo
09:44 nic xxtjaxx: I don't think so
09:44 nic on cpan and github I'm niczero
09:45 nic (has been neglected a few months because the next release is a big one)
09:46 abra joined #mojo
09:47 xxtjaxx a w[iy]lder...
09:52 fhelmber_ joined #mojo
10:03 denisboyun joined #mojo
10:06 jamesaxl hi
10:07 jamesaxl i use this code for uploading file http://perl.nopaste.dk/p49052 but the size of the file equal 0 byte, i do not why :(
10:10 abstract_ joined #mojo
10:13 egopro joined #mojo
10:18 maxhq joined #mojo
10:21 yakudza jamesaxl, form enctype ?
10:22 jamesaxl yakudza: yeah and this is my form <form action="<%= url_for '/createuser'%>" method="post" enctype="multipart/form-data">
10:36 yakudza omg my $upload = Mojo::Upload->new; U just create new object
10:36 yakudza not using existing one
10:37 yakudza jamesaxl, my $upload = $self->req->upload('param_name');
10:40 jamesaxl yakudza: thank you very much it did the job :)
10:49 * sri melts
10:52 mire_ joined #mojo
11:14 egopro joined #mojo
11:15 moltar joined #mojo
11:21 human39 joined #mojo
11:31 libsysguy joined #mojo
11:34 dod joined #mojo
11:37 mattastrophe joined #mojo
11:44 whitebook joined #mojo
12:12 batman joined #mojo
12:12 marcus_ joined #mojo
12:14 moltar left #mojo
12:15 egopro joined #mojo
12:51 whitebook joined #mojo
13:03 Jonis is it not possible to use an if inside a render(json => { ?
13:03 Jonis I have one field that might or might not be there
13:04 batman $res->{foo} = 42 if $something; $self->render(json => $res); ?
13:05 yakudza joined #mojo
13:06 Jonis http://pastebin.com/ujCWZ4Ng is kind of what I wanted to achieve
13:07 Jonis I've got several fields I want to pass on, just want to avoid passing the entire resultset
13:10 jast IIRC if is a statement/special construct, not an expression
13:10 jast you can definitely use a ternary operator for this, or put it outside the render call as batman suggested
13:11 batman Jonis: you should probably pass it anyway to make the API consistent
13:12 batman not that many languages handle non-existing/undef values like perl...
13:15 egopro joined #mojo
13:18 denisboyun joined #mojo
13:25 Jonis batman: yeah, ended up passing it anyway, thanks for your help
13:25 batman np
13:29 tempire so
13:30 tempire any requests made inside a bridge must be blocking
13:34 btyler joined #mojo
13:37 whitebook joined #mojo
13:40 ryozi joined #mojo
13:41 * marcus_ recycles sri into beer bottles.
13:41 jamesaxl for example if i want to do authentication by using Json, should i use websocket ?
13:42 mire_ joined #mojo
13:47 bluescreen joined #mojo
13:52 kwa jamesaxl: No.
13:53 jamesaxl kwa: could you advise me ?
13:53 kwa I might have missed the crux of what you're after, I just read authentication via a websocket. :)
13:54 kwa What are you trying to achieve?
13:58 batman joined #mojo
13:58 marcus_ joined #mojo
13:58 sh4 joined #mojo
13:58 d4rkie joined #mojo
14:02 jamesaxl kwa: very easy, i have social website like facebook developed with mojolicious and i want develop an application wich connect with my site and doing authentication of users
14:02 kwa As in you're writing an API?
14:02 marcus_ jamesaxl: ouath
14:02 marcus_ oauth2 even
14:04 jamesaxl kwa: yeah exactly
14:05 kwa jamesaxl: As marcus_ says, you can use oauth2, or implement your own.
14:05 jamesaxl marcus: thank you very much and kwa also
14:08 asarch joined #mojo
14:13 whitebook joined #mojo
14:16 egopro joined #mojo
14:28 egopro joined #mojo
14:38 nicolaas joined #mojo
14:38 jamesaxl kwa: i will implement mine because it will be a lite APIj i want to know something should i encode the password in client side ?
14:39 kwa jamesaxl: Just enforce SSL.
14:39 jamesaxl kwa: thank you very much
14:54 hesperaux joined #mojo
15:01 btyler_ joined #mojo
15:10 npeters joined #mojo
15:14 npeters left #mojo
15:23 allison joined #mojo
15:33 inokenty joined #mojo
15:44 egopro joined #mojo
15:53 bd joined #mojo
15:53 bd hi
15:54 bd i am having trouble with my first real mojo app and routes, http://paste.debian.net/hidden/ac2b4e97/. when i access /login/auth i get a 404.
15:57 libsysguy sometimes if there is a logic error in auth you will get a 404
15:58 libsysguy at least that has been my experience
16:00 bd it's not getting to auth, i added a log message on top :)
16:00 bd and now it es no longer finding /login too
16:08 bd "A route with children can't match on its own though, only the actual endpoints of these nested routes can."
16:13 amirite joined #mojo
16:23 Britzel_ joined #mojo
16:32 mattastrophe joined #mojo
16:35 sri logic error... GET + POST
16:36 bd i don't understand /login/auth is defined as post
16:39 rihegher joined #mojo
16:39 rihegher left #mojo
16:45 egopro joined #mojo
16:52 alester joined #mojo
16:52 tianon ->any ftw \o/
16:54 basiliscos joined #mojo
17:08 bd it may be to hot but i still don't understand. also how any kan help
17:09 jamesaxl could you help me, i do not understand why hypnotoad run https://127.0.0.1:8443 maybe i did not create crt and key
17:19 denisboyun_ joined #mojo
17:45 egopro joined #mojo
17:56 libsysguy joined #mojo
18:02 whitebook joined #mojo
18:15 marty bd:  Your problem is here...    $login = $r->get...   and then...  $login->post
18:16 marty If you are doing authentication you may want to look at under (lite)....  http://mojolicio.us/perldoc/Mojolicious/Lite#Under or bridges... http://mojolicio.us/perldoc/Moj​olicious/Guides/Routing#Bridges
18:17 marty and a good example of authentication...   http://search.cpan.org/~madcat/Mojoli​cious-Plugin-Authentication-1.24/lib/​Mojolicious/Plugin/Authentication.pm
18:32 Mike-PerlRecruiter_ joined #mojo
18:33 abra_ joined #mojo
18:38 whitebook joined #mojo
18:42 mire_ joined #mojo
18:46 egopro joined #mojo
18:57 maxhq joined #mojo
18:57 abstract joined #mojo
19:15 npeters joined #mojo
19:18 Jonis wish I had wider tabs so that I could see which mojo pages I already have up :/
19:19 buu joined #mojo
19:20 npeters hi, i have a method in a Moose object that uses Mojo::UserAgent to read some xml from a DHCP service here at work. (see: http://pastebin.com/gfHDDkip for the code), you wills ee in teh code that i print the varible "$ip" which prints what i suspect it to, however when i print the return value of the method in the code i am calling the moose object from i get Mojo::Transaction::HTTP=HASH(0x9782f60) instead of the ip address that prints from inside the method? c
19:22 sri pretty sure finally {} is not a block
19:22 npeters ok
19:22 npeters so my miss use of Try::Tiny is the issue?
19:23 npeters i will remove it then and give it a try
19:24 npeters yeah that was the issue i guess lol
19:24 npeters thanks
19:24 npeters clearly i need to read up on try tiny more
19:24 whitebook joined #mojo
19:27 npeters sri: i know it's likely none of your concern, but the docs for Try::Tiny say finally is a block...
19:27 npeters ie: When invoked, the finally block is passed the error that was caught
19:27 npeters no worries though, works now with out the try tiny code
19:28 sri the block is a lie
19:28 npeters hehe
19:28 sri it's a bit annoying that perl doesn't have real blocks as alternatives to closures
19:29 npeters so would you have any suggestions on how to check for errors regarding success of the get call etc then and how to capture them?
19:30 npeters or is that sort of thing some what built into Mojo::UserAgent and i am just trying to re-invent the wheel?
19:30 sri no
19:30 crab read some xml from a DHCP service <- !
19:31 npeters alright then, thanks for the help
19:31 npeters left #mojo
19:48 egopro joined #mojo
19:48 asarch joined #mojo
19:53 basiliscos joined #mojo
19:54 whitebook joined #mojo
19:58 mire joined #mojo
20:02 jamesaxl joined #mojo
20:19 tianon joined #mojo
20:50 libsysguy joined #mojo
20:54 egopro joined #mojo
21:09 bpmedley sri: Would you accept a Mojo::Server::MODPERL? It would add support for Lite apps with ModPerl::Registry and Full apps as a handler.
21:12 sri bpmedley: hell no! :)
21:13 bpmedley Why?  Is it mod_perl or is it Apache?
21:13 sri i don't ever want to deal with mod_perl directly again
21:13 sri if it's supported through PSGI that's enough
21:14 bpmedley Understood.  Is there an easy way for me to add via CPAN or should I just drop it?
21:40 whitebook joined #mojo
21:55 egopro joined #mojo
21:58 libsysguy joined #mojo
22:13 Adura joined #mojo
22:18 cfedde CPAN is full of all kinds of stuff.  why not a way to get around psgi?
22:45 jamesaxl joined #mojo
22:55 egopro joined #mojo
22:56 denisboyun_ joined #mojo
23:30 mire joined #mojo
23:56 egopro joined #mojo

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