The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2013-11-27

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

All times shown according to UTC.

Time Nick Message
00:04 suy joined #mojo
00:05 beyondcreed joined #mojo
00:05 sjn joined #mojo
00:05 bobkare joined #mojo
00:05 Jonis joined #mojo
00:05 mfontani joined #mojo
00:06 sivoais joined #mojo
00:06 jan joined #mojo
00:07 caeles joined #mojo
00:07 rafl joined #mojo
00:07 DaniBunn1 joined #mojo
00:07 preaction_ joined #mojo
00:07 moritz joined #mojo
00:07 phips joined #mojo
00:07 jberger joined #mojo
00:07 mikegrb joined #mojo
00:07 Kundun joined #mojo
00:07 groundnuty joined #mojo
00:07 keedi joined #mojo
00:07 nicomen joined #mojo
00:07 Tiger joined #mojo
00:07 kwa joined #mojo
00:07 cooper joined #mojo
00:07 stig joined #mojo
00:07 ronsavage joined #mojo
00:07 jberger_ joined #mojo
00:07 lukep joined #mojo
00:07 plu joined #mojo
00:07 augensalat joined #mojo
00:07 Mad_Dud- joined #mojo
00:07 bpmedley joined #mojo
00:07 avenj joined #mojo
00:07 preflex joined #mojo
00:07 cfedde joined #mojo
00:07 dabudabu joined #mojo
00:07 athenot joined #mojo
00:07 omega joined #mojo
00:07 zanity joined #mojo
00:07 ascent joined #mojo
00:07 duncanthrax joined #mojo
00:07 ralesk_ joined #mojo
00:07 Drossel joined #mojo
00:07 gtodd1 joined #mojo
00:07 da5id joined #mojo
00:07 firnsy_ joined #mojo
00:07 LordV joined #mojo
00:07 Lee joined #mojo
00:07 SmokeMac_ joined #mojo
00:07 chansen joined #mojo
00:07 tba joined #mojo
00:07 d4rkie_ joined #mojo
00:07 marty_ joined #mojo
00:07 Adurah_ joined #mojo
00:07 hesperaux_ joined #mojo
00:07 tianon joined #mojo
00:07 mire_ joined #mojo
00:07 Mike-PerlRecruiter_ joined #mojo
00:07 meshl joined #mojo
00:07 D4RK-PH0ENiX joined #mojo
00:07 andrefs joined #mojo
00:07 maxhq joined #mojo
00:07 dotan joined #mojo
00:07 zivester joined #mojo
00:07 abra joined #mojo
00:07 KindOne joined #mojo
00:07 Dandre joined #mojo
00:07 tholen42 joined #mojo
00:07 Kovensky joined #mojo
00:07 batman joined #mojo
00:07 elvis joined #mojo
00:07 ZadYree joined #mojo
00:07 human39 joined #mojo
00:07 nic joined #mojo
00:07 migo joined #mojo
00:07 mgrimes joined #mojo
00:07 alnewkirk joined #mojo
00:07 r0b3rt joined #mojo
00:07 burb joined #mojo
00:07 cullum joined #mojo
00:07 rhaen joined #mojo
00:07 Zx3 joined #mojo
00:07 Zmodem joined #mojo
00:07 bowtie joined #mojo
00:07 salparadise joined #mojo
00:07 drift joined #mojo
00:07 mtj joined #mojo
00:07 mtths joined #mojo
00:07 wfaulk joined #mojo
00:07 charsbar___ joined #mojo
00:07 tokuhirom joined #mojo
00:07 phillipadsmith joined #mojo
00:07 sri joined #mojo
00:07 jzawodn joined #mojo
00:07 wsri joined #mojo
00:07 marcus joined #mojo
00:07 lestrrat joined #mojo
00:07 DaTa joined #mojo
00:07 bzero joined #mojo
00:07 Phil21 joined #mojo
00:07 purl joined #mojo
00:07 bjoernfan joined #mojo
00:07 inokenty joined #mojo
00:07 Mikey joined #mojo
00:07 memowe joined #mojo
00:07 allison joined #mojo
00:07 go|dfish joined #mojo
00:07 kmx joined #mojo
00:07 yko joined #mojo
00:07 cosimo joined #mojo
00:07 diegok joined #mojo
00:07 BinGOs joined #mojo
00:07 priodev joined #mojo
00:07 xtetsuji joined #mojo
00:07 al joined #mojo
00:07 stokachu joined #mojo
00:08 Grrrr joined #mojo
00:09 Bender joined #mojo
00:09 bc547 joined #mojo
00:14 * sri was waiting for an "ok" :(
00:16 sri rperl seems to be serious :O
00:53 laouji joined #mojo
00:54 meshl sri: will rperl be able to run Mojolicious?
01:05 dsteinbrunner joined #mojo
01:06 jberger__ joined #mojo
01:16 asarch joined #mojo
01:29 tianon joined #mojo
01:37 d4rkie joined #mojo
01:50 tianon joined #mojo
02:29 mattp joined #mojo
02:29 duncanthrax2 joined #mojo
02:42 tba_ joined #mojo
02:59 btyler joined #mojo
03:10 tianon joined #mojo
03:26 Dr^ZigMan joined #mojo
04:09 crab joined #mojo
04:10 abra_ joined #mojo
04:32 * sri loves css http://codepen.io/lbebber/pen/uIiJp
04:50 russum joined #mojo
04:59 preflex_ joined #mojo
05:17 laouji joined #mojo
05:41 beyondcreed joined #mojo
05:43 laouji joined #mojo
05:44 ronsavage joined #mojo
05:53 zivester joined #mojo
05:56 crab joined #mojo
07:25 russum joined #mojo
07:34 d4rkie joined #mojo
07:52 denisboyun joined #mojo
07:53 dpetrov_ joined #mojo
07:54 dod joined #mojo
08:03 dod joined #mojo
08:07 ver joined #mojo
08:07 mire_ joined #mojo
08:18 dod joined #mojo
08:30 batman sri: rperl sent a request to oslo.pm yesterday...
08:37 batman i wonder if reini urban is involved in that project...
08:37 trone joined #mojo
08:39 basiliscos joined #mojo
08:50 laouji joined #mojo
09:09 arthas joined #mojo
09:17 zacts joined #mojo
09:18 ask joined #mojo
09:19 ask in a ~3 year old mojo app I had this in my base App.pm class -- __PACKAGE__->attr( config => sub { V6::Config->new });
09:19 ask what's the modern incantation for that?
09:21 crab does that not work?
09:25 ask I call App->config() and I get "Can't use string ("App") as a HASH ref while ... at (eval 1237) line 4".
09:26 ask crab: I guess the modern version is to say "has config => sub { App::Config->new };" -- though that doesn't change the useless error message.
09:27 crab do you mean app->config instead of App->config?
09:28 ask no, it's a global/singleton so it's intentionally setup the other way.
09:28 crab __PACKAGE__->attr(...) should still work just fine, but yes, has config => ... is neater. i don't think that's relevant to the error, though.
09:29 ask crab: right ...
09:29 ask http://git.develooper.com/?p=v6test.git;a=blob;f=lib/V6.pm;h=1cf4f66db0b43590a31c75799581f810dc97c0d6;hb=HEAD
09:29 ask and then line 21 here: http://git.develooper.com/?p=v6test.git;a=blob;f=lib/V6/Controller/Account.pm;h=b4eb17b308e4f53cad8735cf14f93a7aafbded42;hb=HEAD
09:29 ask (this is the pre-upgrade-to-new-mojolicious version though)
09:39 ask gah, updated version: http://git.develooper.com/?p=v6test.git;a=blob;f=lib/V6.pm;h=1fa6fd926bc71ee1c75bb116b5703961e4c4a103;hb=refs/heads/mojolicious-4
09:39 ask http://git.develooper.com/?p=v6test.git;a=blob;f=lib/V6/Controller/Account.pm;h=5ad62d241f97ed50c8a395775bebd36486c3afd6;hb=refs/heads/mojolicious-4
09:39 ask perl -Ilib -MV6 -e 'V6->config()'   fails with that ...
09:40 Vandal joined #mojo
09:43 ask crab: shouldn't this work?
09:43 ask https://gist.github.com/abh/1c3d7fd5bd900da42e77
09:44 themage joined #mojo
09:47 batman ask: maybe you're loading Config plugin as well, so the config() method is overwritten?
09:48 ask batman: No, the application predates that plugin I think.
09:48 ask at least I don't use it..
09:48 * ask &  # ZzzZzz.
09:48 batman ask: oh. sorry. the config() is an attribute, so you need an object instance to call it.
09:49 batman sub config { V6::Config->new } # this will work
09:49 batman has config => sub {}; # or attr() will not work as a class method
09:49 fhelmber_ joined #mojo
09:50 batman ask-- # disappears when help is coming
09:50 ask batman: sorry :-)
09:50 batman do you understand the answer?
09:50 ask batman: yeah, I chnaged it to the sub config {} version -- I couldn't find an "upgrading" document that told that this changed, ugh.
09:50 ask yes, thank you.
09:51 hummeleBop joined #mojo
09:51 batman it sounds weird that it has ever worked.
09:51 batman but three years old mojo is like trying to use your cell phone in 1884 :P
09:52 ask I've mostly been using Go the last ~year and mostly node.js the year before. :-/
09:52 batman ok
09:52 batman guess you're used to changes then :)
09:56 ask haha :-)  Not really actually; they're really serious about the "API compatibility in v1.x" promise and when other libraries change the static typing generally catches it.
09:56 ask (static typing/compiler).
09:56 ask (with node.js -- yes. holy smokes that was about as annoying as the worst offenders on CPAN).
09:57 fhelmbe__ joined #mojo
09:57 batman hehe
09:59 ask thanks again.
09:59 ask I think I have the app working now.
09:59 batman your welcome
09:59 batman no tests?
09:59 purl somebody said no tests was of course a total deal breaker, but the feature itself
10:00 ask It all started because I wanted to put the test from http://ip.bitnames.com/ into my v6test widget -- http://www.v6test.develooper.com/
10:00 ask but to edit the JS on the latter I needed it running on my laptop again, ugh.
10:00 batman :)
10:01 batman ask: why do you have that yellow frame around the document?
10:01 ask since july search.cpan.org users have had >5% IPv6 support.
10:01 ask batman: your guess is as good as mine. I'm guessing it seemed like a good idea at the time...
10:02 batman :D
10:08 russum joined #mojo
10:09 tl joined #mojo
10:10 russum left #mojo
10:15 maxhq joined #mojo
10:22 marcus o/ ask
10:24 marcus Guess he went to bed already =]
10:37 batman https://github.com/jhthorsen/mojolicious-command-batproject/tree/master/lib/Mojolicious/Command/batproject # i'm trying to put together components that enable me to bootstrap my new projects.
10:38 batman i'm pretty tired of repeating myself.
10:38 batman inputs are welcome
10:41 batman anyone used summernote or bootstrap-wysiwyg rich text editors? (js)
10:44 lammel2 joined #mojo
11:17 geira joined #mojo
11:23 laouji joined #mojo
11:26 * batman wants to make a Mandel project that store data like rrdtool...
11:26 batman no idea how to model it :P
11:30 nic heh, I'm thinking about exactly the same thing, but then went on a detour looking at zabbix
11:32 batman it has "Enterprise" in the description.... :S
11:32 * batman starts drafting the api
11:43 asarch joined #mojo
12:11 denisboyun joined #mojo
12:33 d4rkie joined #mojo
12:45 sivoais joined #mojo
12:49 dod joined #mojo
12:51 punter joined #mojo
13:01 ask joined #mojo
13:04 denis_boyun_ joined #mojo
13:24 tba joined #mojo
13:27 iankent joined #mojo
13:27 iankent hi all, quick question
13:28 iankent in mango, does ->next on a cursor return to the start after reaching the end?
13:28 iankent it appears to be, but cant find any docs to confirm
13:29 phillipadsmith joined #mojo
13:31 chansen joined #mojo
13:33 denisboyun joined #mojo
13:44 jberger__ joined #mojo
13:45 bd joined #mojo
13:45 bd hi
13:45 arthas joined #mojo
13:50 batman iankent: it should return undef after the end
13:50 batman bd: hi
13:50 purl hola, batman.
13:52 bd i thought i have a mojo question, but turns out it is more mod_auth_ldap and mod_kerb and mod_proxy related ;)
13:56 crab at least they all start with "m"
13:59 bd :)
13:59 bd I am trying to figuer out how to pass username and group membership information from apache to the mojo app running behind it
14:01 asarch joined #mojo
14:01 batman crab++
14:02 batman bd: sounds awful. can't help you :(
14:02 crab how's the mojo app running?
14:02 crab oh, mod_proxy
14:02 purl mod_proxy is nice
14:03 bd i am guessing setting http headers using information from auth_ldap
14:03 bd http://httpd.apache.org/docs/2.2/mod/mod_authnz_ldap.html talks about this using AUTHENTICATE_ env stuff
14:04 crab well, you can't use env variables if you are using mod_proxy
14:04 crab because there's no new process to set the environment for
14:04 bd but i can set headers using env variables
14:05 bd i could also implement kerberus auth and ldap author in my app ;)
14:05 bd kerberos even
14:08 batman \o/ new mojo plugin :)
14:10 iankent batman: thats what I thought, but it seems to go back to the start - I'll try and golf it down to a small example
14:11 batman pretty sure the small example will work :)
14:11 iankent probably, which means its my code which is wrong *groans*
14:12 priodev joined #mojo
14:13 rem_lex| joined #mojo
14:16 iankent hmm
14:16 iankent looks like its fine in blocking mode, but repeats in non-blocking mode
14:18 iankent (or i'm doing it wrong lol)
14:22 webart joined #mojo
14:25 iankent definitely seems to repeat, this gist shows the test code and my output: https://gist.github.com/ian-kent/7676493
14:32 bluescreen__ joined #mojo
14:33 meshl joined #mojo
14:37 batman uhm... do you get any warnings if you add use warnings; use strict; ?
14:37 iankent only this: "my" variable $c masks earlier declaration in same scope at mango_cursor.pl line 26.
14:38 iankent line 24 before I added use strict/warnings :)
14:38 iankent which tbf I did redefine, oops :)
14:39 iankent just updated the gist to add strict/warnings and remove redefined $c
14:39 batman the for() loop doesn't make any sense to me.
14:39 iankent just had a look at t/cursor.t in kraih/mango, no tests to check that going off the end of a cursor returns undef
14:39 iankent (in non-blocking mode)
14:39 iankent what do you mean? its not the best example of coding style but it does the trick :p
14:40 batman i think you're resetting the cursor, but skipping the undef element somehow
14:40 iankent if I was resetting it, wouldn't I just get the first item every time?
14:40 batman pretty sure you're not playing by the rules.
14:40 iankent what rules lol
14:41 iankent the mango docs are very sparse on anything you could call 'rules' :)
14:41 iankent the code in the gist isn't any different to just calling next 6 times in a row manually and giving each a callback.....
14:41 iankent and if thats not how its meant to be used, then i'm not sure what use ->next in non-blocking mode actually is
14:41 batman $n = sub { $c->next(sub { my ($collection, $error, $doc) = @_; $n->() if $doc; warn $doc->{n} || 'NO DOC'; } # try that without the for()
14:42 batman and $n->() to start the whole thing before Mojo::IOLoop->start;
14:43 iankent yeah, well that works, but its insane
14:43 batman how is that insane?!
14:44 batman it's the only thing that makes sense.
14:44 batman you have no idea how many docs are returned. that's why you use next() to iterate.
14:44 batman while(my $doc = $c->next) { do_stuff() } # like that.
14:44 batman $doc will be undef when the cursor reach the end
14:45 iankent hmm
14:45 nicolaas joined #mojo
14:45 batman if you want to tell me my code looks like shit then...yes i agree :P
14:45 batman but that's just because i'm playing by your rules :)
14:46 iankent it still feels a bit crazy, I would expect $c->next(sub{}) to work regardless of how its called (particularly as the docs don't explain that you can't use it in any way other than the example you've given)
14:46 batman it works. just not as you expect it :P
14:46 batman ...because you're doing it wrong
14:46 iankent of course
14:47 sri batman is correct
14:47 batman you're code looks blocking and non-blocking at the same time
14:47 batman looks and acts. doesn't make any sense
14:47 sri calling ->next concurrently is batshit insane
14:47 batman batwhat?!?!
14:47 batman :D
14:47 * batman like batman insane
14:47 batman ;)
14:47 nic :D
14:48 sri set MANGO_DEBUG=1 to see what madness you've triggered
14:49 sri of course ->next after the cursor is finished is tested... through ->all, iterating through the whole cursor is the only way to get all documents
14:50 iankent hmm, using that example I now get nothing output, just goes straight to 'NO DOC'
14:50 iankent its probably just me
14:50 * iankent goes back to his cave
14:53 batman iankent: wait a sec
14:53 batman iankent: https://gist.github.com/jhthorsen/7676968
14:53 batman oops! wrong buffer :(
14:55 batman https://gist.github.com/jhthorsen/7676968 # i think this is better.
14:55 batman sri: ^ is it..? :)
14:55 jberger__ batman, iankent: looks like a job for the __SUB__ token
14:55 sri $cb certainly leaks
14:55 batman jberger__: i agree
14:55 sri what jberger__ said
14:56 batman iankent: ignore that example
14:57 jberger__ But then you need 5.16 I think
14:57 sri btw. i have no idea how the cursor resets, but i'm assuming mongodb does that when it gets concurrent get_more operations
14:57 batman yes. __SUB__ is probably too new for 99% of the perl users :P
15:01 batman i wonder if rrd was created when we had small hard drives.
15:01 batman maybe the time is over when you need to consolidate primary data points...
15:07 good_news_everyone joined #mojo
15:07 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/r-v80Q
15:07 good_news_everyone mojo/master 819a6c8 Sebastian Riedel: relicensed all artwork to CC-SA version 4.0
15:07 good_news_everyone left #mojo
15:14 tba_ joined #mojo
15:14 bd aw man, authnz_ldap only sets those environment variables on check_password
15:14 bd and since kerberos does that, no price.
15:26 rem_lex joined #mojo
15:28 gryphon joined #mojo
15:41 sh4 joined #mojo
16:20 iankent bit of a late reply, we're on 5.18, tbh though I think our use-case is wrong, and so my code was wrong, and now I'm thinking I didn't even need ->next, just wanted ->all instead :)
16:22 sri that's usually the case
16:23 iankent i've come to the conclusion its easier to assume I'm wrong than mango or mojolicious :p
16:23 sri that's usually the case
16:23 iankent sri: whats the current status on a production-ready mango release?
16:24 sri waiting for mongodb 2.6
16:24 sri i'll most likely wait for the new write commands, which mean a lot of code can be removed from mango
16:25 sri delete/insert/update are becoming commands instead of ops in 2.6
16:25 iankent ah cool, i know i'm probably asking an unanswerable question, but is mongodb 2.6 and mango 1.0 likely to happen by april 2014?
16:26 iankent yeah remember you mentioning that on here before
16:26 sri it's a pretty big breaking change for mango
16:29 sri i have no influence on the mongodb release schedule
16:29 sri https://jira.mongodb.org/browse/SERVER#selectedTab=com.atlassian.jira.plugin.system.project%3Aroadmap-panel
16:29 iankent ah awesome link, thanks :)
16:42 hrupp joined #mojo
17:31 fhelmber_ joined #mojo
17:36 tba joined #mojo
17:40 fhelmber_ joined #mojo
17:41 Kulag joined #mojo
17:49 Adura joined #mojo
17:51 beyondcreed joined #mojo
18:12 Kulag joined #mojo
18:14 AirDisa joined #mojo
18:19 mfontani joined #mojo
18:27 mire_ joined #mojo
18:43 tianon joined #mojo
18:53 denis_boyun joined #mojo
19:05 dvinciguerra joined #mojo
19:12 russum joined #mojo
19:13 Mike-PerlRecruiter_ joined #mojo
19:18 basiliscos joined #mojo
19:20 denisboyun joined #mojo
19:38 mire_ joined #mojo
19:41 bowtie_ joined #mojo
19:47 meshl joined #mojo
20:02 trone joined #mojo
20:15 sricloud joined #mojo
20:18 tempire joined #mojo
20:19 keedi joined #mojo
20:35 sricloud wonder if i could get used irccloud
20:38 lukep joined #mojo
20:43 sri guess not... the android app is rather underwhelming
20:50 sri another feature for the todo list, websocket compression http://www.igvita.com/2013/11/27/configuring-and-optimizing-websocket-compression/
20:51 sri actually not too complicated, anyone could implement it
20:52 Adura Is there already gzip for http? I know I cooked something up myself.
20:53 tba_ joined #mojo
20:53 sri yes, what we can support we do
20:53 sri websocket is a lot easier though
20:58 Adura And by that, I mean Hypnotoad.
21:11 Adura I only grep a guide example, hm.
21:16 * sri opened a github issue for it https://github.com/kraih/mojo/issues/566
21:23 meshl joined #mojo
21:39 tba joined #mojo
21:45 russum joined #mojo
21:46 russum left #mojo
21:48 meshl joined #mojo
21:53 hahainternet joined #mojo
21:54 hahainternet this may be a stupid question, but is there an easy way to have both authenticated and unauthentiated routes to '/' without handling it in the action itself?
21:54 hahainternet at the moment i'm using plugin::authentication and setting a bridge('/') that passes to a check action
21:54 hahainternet then creating routes from that
21:55 hahainternet would ideally like to specify where unauthenticated / routes to instead of just rendering a different template or returning a 302
22:04 bluescreen_ joined #mojo
22:06 bluescreen joined #mojo
22:14 bjoernfan joined #mojo
22:30 bjoernfan joined #mojo
22:37 jberger_ joined #mojo
22:59 tba_ joined #mojo
23:01 denisboyun joined #mojo
23:04 dvinciguerra joined #mojo
23:05 russum1 joined #mojo
23:05 russum1 left #mojo
23:08 jberger__ joined #mojo
23:11 denisboyun joined #mojo
23:13 nicomen joined #mojo
23:25 jberger_ joined #mojo
23:42 denisboyun joined #mojo
23:47 meshl joined #mojo
23:48 denisboyun joined #mojo
23:52 jberger__ joined #mojo

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