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

IRC log for #mojo, 2013-12-30

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

All times shown according to UTC.

Time Nick Message
00:03 KindTwo joined #mojo
00:11 damaya__ joined #mojo
00:12 damaya__ Kinda a silly question, but wondering where you all put your mojolicious apps? I don't want to put it in /var/www, I was thinking /var/lib/myapp.
00:12 damaya__ I am not in a perlbrew environment, nor do I want to run my app as a user from a home directory (unless that method is suggested).
00:16 good_news_everyone joined #mojo
00:16 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/nwjjzw
00:16 good_news_everyone mojo/master ac79e79 Sebastian Riedel: more consistent names
00:16 good_news_everyone left #mojo
00:18 priodev joined #mojo
00:19 klapperl joined #mojo
00:19 jnbek^dt joined #mojo
00:19 sivoais_ joined #mojo
00:47 mst damaya__: well, you should be running it as a user
00:47 mst damaya__: but for a web app the user's home directory should be something like /var/www/hostname.site.com/
00:47 mst damaya__: then you have the app code and a local::lib under there
00:48 mst damaya__: /var/lib is generally for data, not code
01:10 rem_lex joined #mojo
01:22 bpmedley damaya__: I use /opt/sitename.com; my perl is /opt/perl.
01:24 damaya__ I was thinking about going with /opt/sitename.com as well. Actually, I may just create a user for the webapp and run it from their home directory.
01:25 mst I -have- done deployments that use /opt/company.com/MyAppName/ and then /var/www/www.company.com/ for the files
01:25 mst but it always seemed a bit complicated
01:27 batman damaya__: i'm using /home/www/myapp
01:28 batman or /home/web/myapp
01:31 bpmedley damaya__: I use /opt/sitename.com/docroot/blah_blah and /opt/sitename.com/etc /opt/sitename.com/bin /opt/sitename.com/data
01:34 * sri does /home/company/company.com/
01:38 sri http://i.imgur.com/vQjvW19.jpg
01:43 KindOne joined #mojo
01:44 * jberger needs to learn more about docker
01:45 bpmedley I look forward to using docker with RHEL 7
01:50 russum joined #mojo
01:50 russum left #mojo
01:56 d4rkie joined #mojo
01:57 d4rkie joined #mojo
01:58 batman sri: hahahah
01:59 damaya__ I created a user whose home directory is /var/www/sitename.com.
01:59 damaya__ bpmedley: Are you running RHEL7 beta?
01:59 bpmedley No, not yet.
02:00 damaya__ Ah, pretty nice stuff. RHEL has switched to systemd.
02:01 * damaya__ needs to learn more about docker as well. I seem to be hearing it everywhere lately.
02:06 batman damaya__: docker is awesome, but only if you need it.
02:06 batman i only run my own web apps, so it's "too much"
02:06 batman but it's super sweet if you require different sandboxes
02:13 webart http://devopsu.com/blog/ansible-vs-shell-scripts/  .... what's happening w/ rexify?
02:13 klapperl_ joined #mojo
02:14 damaya__ shutdown -h now
02:14 purl rumour has it shutdown -h now is accepted on BSDs, at least Free
02:22 webart I prefer système D to systemd
02:23 webart :-)  .... or maybe daemontools
02:45 arpadszasz_ joined #mojo
03:08 jberger the docker online tutorial is awesome!
03:13 laouji joined #mojo
03:38 laouji_ joined #mojo
04:45 preflex_ joined #mojo
04:48 good_news_everyone joined #mojo
04:48 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/tPJRcw
04:48 good_news_everyone mojo/master 8de63d8 Sebastian Riedel: better names for a few functions
04:48 good_news_everyone left #mojo
05:19 irq joined #mojo
05:47 laouji joined #mojo
05:59 laouji joined #mojo
06:05 laouji joined #mojo
06:15 arpadszasz_ joined #mojo
06:32 D4RK-PH0ENiX joined #mojo
06:53 Vandal joined #mojo
07:35 Tiger joined #mojo
07:37 abra_ joined #mojo
07:50 damaya joined #mojo
07:51 damaya Is there a plugin for creating users similar to the plugin for authentication?
07:53 crab not that i know of.
07:53 crab it doesn't seem like something to do in a plugin, really.
07:53 ver joined #mojo
08:02 arthas joined #mojo
08:08 moritz there's a Person plugin. If you use that, you don't need to worry about user generation, login, "lost password" and all that stuff
08:18 ka2u joined #mojo
08:19 crab where is it?
08:19 purl it's it!
08:24 damaya Actually, I just used Mojolicious::Plugin::Bcrypt
08:25 moritz Mojolicious::Plugin::MozPersona
08:31 odc joined #mojo
08:40 fhelmber_ joined #mojo
09:21 basiliscos joined #mojo
09:22 meshl joined #mojo
09:36 dod joined #mojo
09:37 ka2u joined #mojo
09:45 laouji joined #mojo
10:05 dod joined #mojo
10:34 damaya Has anyone successfully used Mojolicious::Plugin::DBICAdmin?
10:39 amirite joined #mojo
10:43 ka2u joined #mojo
10:59 amirite joined #mojo
11:04 amirite_ joined #mojo
11:19 ka2u joined #mojo
11:23 irq joined #mojo
11:46 hrupp joined #mojo
12:13 irq I am sure I've read somewhere about this but can't find now. How do I write and use a plugin that in not in Mojolicious::Plugin:: namespace, but instead, for instance, in MyApp:: namespace?
12:14 Tiger Guys, somebody uses Mojolicious::Plugin::Authentication?
12:16 irq ah yes, $app->plugins->namespaces, on the first page https://metacpan.org/pod/Mojolicious#plugins. Stupid me, sorry.
12:21 Adurah Tiger, you're surprised?
12:29 Tiger Adurah: i dont understand how load_user works
12:30 ka2u joined #mojo
12:31 amirite joined #mojo
12:31 Tiger i use validate_user with ldap authentication and return undef or username if authentication success, but i dont't know  what i need do in load_user sub
12:35 alnewkirk Tiger, did you read the instructions?
12:35 alnewkirk ... says to return a user object
12:36 alnewkirk e.g. return LDAP object or data describing the user specified
12:38 Tiger alnewkirk: yes, but i use  Authen::Simple::LDAP for auth and i can return only  result of ldap auth true or false
12:39 Tiger alnewkirk: http://pastebin.com/yMH3DA4M
12:41 alnewkirk Tiger: load_user => sub { pop }
12:41 alnewkirk sorry
12:41 alnewkirk Tiger: load_user => sub { [pop] }
12:43 alnewkirk ... so if you need the use current_user in your controllers, you would do $self->current_user->[0] # sould be the username
12:44 alnewkirk ... although if you user data is stored in LDAP, you should really get that data upfront, e.g. in the load_user routine
12:45 d4rkie joined #mojo
12:48 Tiger alnewkirk: thanks
12:49 Tiger sub { [pop] } is all  i needed
12:50 Tiger i try use "($app, $uid) = @_; return $uid;  " before
12:51 aleksey joined #mojo
13:06 amirite joined #mojo
13:13 irq Which user agent string parser module could provide me an easy metod like is_text() (indicating agents like lwp-request, lynx, mojo, etc.) ?
13:15 ka2u joined #mojo
13:18 alnewkirk HTTP::BrowserDetect
13:18 purl well, HTTP::BrowserDetect is crapping out with stupid errors
13:19 alnewkirk ... or similar, search metaCPAN
13:23 irq there are many: http://neilb.org/reviews/user-agent.html, hard to pick one.
13:24 D4RK-PH0ENiX joined #mojo
13:36 D4RK-PH0ENiX joined #mojo
13:36 Kulag joined #mojo
13:47 ka2u joined #mojo
13:56 Vandal joined #mojo
14:01 arpadszasz_ joined #mojo
14:11 amirite joined #mojo
14:25 Tiger joined #mojo
14:27 ka2u joined #mojo
14:29 sh4 joined #mojo
14:32 dsteinbrunner joined #mojo
15:00 gryphon joined #mojo
15:05 btyler joined #mojo
15:19 asarch joined #mojo
15:29 ka2u joined #mojo
15:34 stokachu joined #mojo
15:49 plenum joined #mojo
15:57 marty joined #mojo
16:01 abra joined #mojo
16:01 amirite joined #mojo
16:03 abra joined #mojo
16:28 mire__ joined #mojo
16:30 beyondcreed joined #mojo
16:31 mire_ joined #mojo
16:41 marty joined #mojo
16:42 marty_ joined #mojo
16:44 marty joined #mojo
16:46 marty_ joined #mojo
17:25 tempire_ joined #mojo
17:27 abra joined #mojo
17:40 amirite joined #mojo
17:42 arpadszasz_ joined #mojo
18:03 irq joined #mojo
18:26 tempire_ Interesting.
18:26 tempire_ $self->res & $self->req not being available in helpers...when did that change?
18:34 sri you drunk?
18:39 arpadszasz_ joined #mojo
18:42 tempire_ I must be. Can't reproduce it in a smaller app.
18:48 sri DON'T DRINK AND DERIVE
18:53 amirite joined #mojo
18:56 dvinciguerra joined #mojo
19:04 sri so, it appears i'm addicted to candy crush saga :o
19:05 * tempire_ has never heard of this
19:06 sri pray it stays that way
19:06 * tempire_ downloads the app
19:14 sri and that's the last we heard of him
19:38 dsteinbrunner joined #mojo
19:40 denis_boyun joined #mojo
19:59 webart joined #mojo
19:59 webart1 joined #mojo
20:19 sri oh, finally some juicy details about nsa malware
20:20 sri as expected, they own every cisco router http://www.spiegel.de/static/happ/netzwelt/2014/na/v1/pub/img/Firewalls_Cisco/S3222_JETPLOW.cleaned.jpg
20:23 marty joined #mojo
20:25 amirite joined #mojo
20:26 * sri would like to see more details about the iphone malware http://www.spiegel.de/static/happ/netzwelt/2014/na/v1/pub/img/Handy/S3222_DROPOUTJEEP.jpg
20:27 sri oh, if you work for the us government, you might want to close your eyes for a bit
20:28 Adurah Time to rally behind Stallman.
20:29 * tempire_ jumps from one extreme to the other
20:31 dsteinbrunner nice dated and declassify date
20:32 sri yea, i was betting on baseband malware being used by now... but i suppose that would be too new information for the leak
20:34 sri they did that shit in 2008...
20:35 amirite joined #mojo
20:39 meshl joined #mojo
20:42 irq_ joined #mojo
20:59 sri oh, they don't discriminate... huawei router malware is available too! http://leaksource.files.wordpress.com/2013/12/nsa-ant-headwater.jpg
21:01 Adurah TURBOPANDA
21:02 Adurah Call all forward Mojo codnames ones in these documents.
21:45 dsteinbrunner I'm using nginx with hypnotoad
21:46 dsteinbrunner any pointers on how to get nginx to handle the static files in public
21:49 marty joined #mojo
22:02 \etron joined #mojo
22:02 \etron hi
22:02 moritz hi
22:03 \etron i had a quick question regarding event loops
22:03 \etron maybe not that quick- not sure
22:03 * moritz quickly ducks
22:03 \etron haha
22:03 \etron um
22:04 \etron by the way - i totally love mojolicious!
22:04 \etron what I'm trying to acheive is to have a websocket server (got that working no problem)
22:05 \etron i more or less want a background thread independant of the actual websocket connection that I can pass information/do call backs from the websocket client connection
22:05 \etron are there any possible examples that i could refer to, or are there any tips?
22:06 \etron been trawling the docs, but I'm a bit lost as to how to go about it
22:06 \etron (it may not be a thread - i would prefer async loop with reactor??)
22:07 \etron the "thread" would be something that constantly polls for system information
22:07 \etron or anything else really
22:09 basiliscos joined #mojo
22:11 jzawodn \etron: maybe doing it with a recurring timer?
22:11 \etron okay
22:12 \etron my $id = Mojo::IOLoop->recurring(0.5 => sub {...});
22:13 \etron so start the recurring timer early, start the polling for "things".
22:14 \etron then once a websocket is connected, broadcast out to all connected clients..
22:16 jzawodn \etron: yes.  I have little stand-alnoe app (runs under morbo) that does exactly that
22:16 batman \etron: i'm mostly using Mojo::Redis and blpop. requires a redis database though.
22:17 tianon redis pubsub is very easy thanks to Mojo::Redis :)
22:17 batman pubsub only works when your design can miss messages
22:18 tianon true, so you couple that with some other storage for looking up messages you've missed and you're golden :)
22:19 \etron excellent
22:19 \etron yes, I can cater for missed messages.
22:20 batman i would /just/ use blpop for what i think \etron wants
22:21 tianon ah, because there's only one subscriber?
22:22 \etron no - because basically the data is updating in "real-time"
22:22 batman no. because there's a background worker which might be restarted
22:22 \etron so i actually don't care - its stale .
22:24 \etron basically, my end goal is create a websocket based NVD3.js systemtap/dtrace monitor (visualise systemtap/dtrace data in as close to realtime as possible)
22:25 \etron many thanks!
22:25 * \etron starts hacking away ;-)
22:36 dvinciguerra joined #mojo
22:37 tempire_ turbopanda would be a nice mojo code name
22:58 paraplexed joined #mojo
23:30 marty_ joined #mojo
23:31 paraplexed joined #mojo
23:39 cfedde after ubuntu gets to zombie zebra where do they go? on to able beaver?
23:39 Adurah I stopped using Ubuntu after Niggardly Nene.

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