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

IRC log for #mojo, 2014-09-19

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

All times shown according to UTC.

Time Nick Message
00:22 sri damn, oreilly is already selling 400 page swift books :O
00:22 sri someone must have written day and night
00:23 sri rofl, and a 1000 page cookbook!
00:27 d4rkie joined #mojo
00:54 woz joined #mojo
00:56 laouji joined #mojo
01:25 woz joined #mojo
01:47 davido__ joined #mojo
01:56 sri left #mojo
01:56 sri joined #mojo
01:57 woz joined #mojo
01:57 sri batman: fyi. my accidental leaving #mojo count is up to 5 now i believe -.-
01:58 sri usually happens when i try to click on tweetbot and miss :(
01:59 sri some sort of confirmation might be a good idea
02:05 woz joined #mojo
02:36 woz joined #mojo
02:43 noganex_ joined #mojo
02:47 irq joined #mojo
02:50 sri https://github.com/kraih/mojo/issues/676 # we have an open bug issue
03:00 sri batman: /list seems broken now
03:01 * sri wanted to look if there's a cpantester channel... but i guess not today
03:07 woz joined #mojo
03:15 Guest joined #mojo
03:26 heytitle joined #mojo
03:26 radixo joined #mojo
03:27 radixo hello guys.. is there a way to have two sessions with mojolicious.. I want 1 session with 5 minutes of expiration and other with 1 week..
03:39 preaction sri: you probably want #perl-qa
03:54 preaction joined #mojo
03:56 woz joined #mojo
04:04 neyasov joined #mojo
04:04 purl joined #mojo
04:07 heytitle left #mojo
04:08 heytitle joined #mojo
04:17 radixo Hello guys.. I need to make a lock when one user gets a register to work on... how can I do that??
04:18 preaction what should the lock disallow?
04:18 preaction there's lockerd, if you need a networked lock
04:21 radixo preaction: The lock should disallow other users to see the sama register while other is working on it..
04:21 preaction so set a flag in a database or something?
04:22 preaction or just set which user is currently using the register, and then the open registers are those that have no user
04:23 radixo preaction: good!!
04:23 radixo preaction: thanks
04:24 crab i take it these are not registers like %eax
04:28 radixo guys just to generate the discussion..
04:28 radixo what is the best practice, use database users, or create a users table?
04:28 preaction users table
04:29 preaction database users are people who have access to the database. do not allow normal users access to the database...
04:33 ryanc joined #mojo
04:33 human39 joined #mojo
04:56 woz joined #mojo
04:59 laouji joined #mojo
05:35 firnsy joined #mojo
05:51 Vandal joined #mojo
05:56 woz joined #mojo
06:02 dod joined #mojo
06:11 mr-foobar joined #mojo
06:30 sujithm joined #mojo
06:39 dp_ joined #mojo
06:42 mr-foobar joined #mojo
06:42 KCL joined #mojo
06:45 heytitle Hi, I would like to ask you about Mojo::Base.
06:47 heytitle Is it possible to create a role from Mojo::Base and let another packages consume that role?
06:54 batman no, but you can use Role::Tiny
06:56 woz joined #mojo
07:05 Lee_ joined #mojo
07:06 Guest_ joined #mojo
07:08 Guest joined #mojo
07:14 sujithm joined #mojo
07:16 basiliscos joined #mojo
07:22 heytitle thanks
07:30 trone joined #mojo
07:55 irq joined #mojo
07:56 woz joined #mojo
08:00 Lee joined #mojo
08:06 woz joined #mojo
08:07 aleksey joined #mojo
08:36 edestler joined #mojo
08:42 fhelmber_ joined #mojo
09:22 sujithm joined #mojo
09:23 sujithm_ joined #mojo
09:24 denny joined #mojo
09:49 basiliscos joined #mojo
09:53 basiliscos joined #mojo
09:53 noganex_ mh... why should i specify a passphrase via app->secrets? couldn't i just use a randomly generated passphrase?
09:55 batman noganex_: no, since when you restart the server, all the sessions will be invalid
09:56 batman i usually read the secrets from a file. not quite, but something like $HOME/.mojo/passphrases
09:56 noganex_ mh.. that's actually something i'd want...
09:56 batman where the file has ["secret","old_secret","need_to_remove_secret"];
09:57 noganex_ yeah. i just thought some java like properties file app.secrets=... would be neat.
09:57 batman something you want? that sounds very, very strange...
09:58 batman yeah, you can do that. app->secrets([ Mojo::Util::md5_sum(time.$$.rand 10000) ]);
09:58 noganex_ batman: so besides lossing the sessions it has no other impact?
09:58 batman err... droo the md5_sum() part. it's redundant :P
09:58 batman not that i can see...
09:58 noganex_ thanks :)
09:59 batman but loosing the sessions = people need to log in = people get angry :P
10:00 noganex_ batman: it's a little admin interface i've written. there's only one person using it... ;)
10:00 batman ok, hehe
10:00 batman at least, it's better to have a one angry user, instead of an insecure app :)
10:01 batman app->secrets([ rand 100000 ]); # this will do
10:01 batman even though a longer secret is better
10:05 noganex_ nah. i'm not going to reinvent the wheel: http://neilb.org/reviews/passwords.html
10:05 batman WHAT!?!? NOT RE-INVENTING THE WHEEL!??!
10:05 batman ;)
10:05 batman noganex_++
10:06 noganex_ i'm just lazy. that's all ;-)
10:06 batman that's the best way of laziness
10:06 batman marcus: i'm looking forward to getting feedback on the kiosk-mode convos branch
10:22 wim joined #mojo
10:28 basiliscos joined #mojo
10:34 basiliscos joined #mojo
10:45 Insane joined #mojo
10:47 Insane hi all, could someone pls tell me what am I doing wrong with this: http://pastebin.com/tKbSKFYJ ? I'm trying to iterate thru li elements and parse aech of them
10:47 Insane each*
10:58 sujithm joined #mojo
11:10 gatitskiy joined #mojo
11:11 go|dfish Insane: Well if you want li, you could change your selector e.g. foreach my $li ($dom->find('div[class=somediv] li'))
11:11 go|dfish Insane: the problem you have is that ->find() returns a Mojo::Collection object
11:25 basiliscos joined #mojo
11:27 cpan_mojo Mojolicious-Plugin-PetalTinyRenderer 0.04 by Lars Balker Rasmussen - http://metacpan.org/release/LBR/Mojolicious-Plugin-PetalTinyRenderer-0.04
11:31 basiliscos1 joined #mojo
11:32 basiliscos joined #mojo
11:33 neilhwatson joined #mojo
11:35 * lb wonders where that Rasmussen lives
11:35 basiliscos joined #mojo
11:36 lb it's not on my cpan-page nor in pause
11:36 lb jberger: where does the bot get the info?
11:49 marcus lb: ESP
11:50 lb faulty esp then
11:50 * lb exposes marcus as a fraud!
11:50 marcus lb: Most ESP is faulty.
11:51 radixo joined #mojo
12:17 lb hmm, my tv-bot hasn't downloaded the daily show today
12:17 * lb celebrates the date
12:34 sri hmm, i guess nobody knows why our tests suddenly fail
12:34 sri https://github.com/kraih/mojo/issues/676
12:35 jberger lb: it gets its data from http://friendfeed.com/cpan which gets its data from miyagawa++'s script which gets its data from cpantesters fast-update repo
12:35 jberger in that way, there is only one poller on the fast-update repo and everyone else can use its results
12:37 jberger sri: was there a new version of the smoker modules?
12:38 sri jberger: you tell me!
12:39 jberger how would I know!?
12:39 jberger I actually hate the structure of the smoker system
12:40 jberger the fact that they just keep appending blib paths to PERL5LIB is not testing a real system
12:40 jberger now that we have things like local::lib they should be doing a full install to a local lib and testing that
12:42 jberger sri: https://metacpan.org/changes/distribution/ExtUtils-Install
12:42 * jberger suspects this ^^'
12:43 jberger do all the failures have ExtUtils::Install v2.0?
12:44 d4rkie joined #mojo
12:44 sri oh how i love Changes files without dates
12:44 * sri sets BinGOs on fire
12:45 Nei https://metacpan.org/release/BINGOS/ExtUtils-Install-2.04 "jump  to version" etc has dates
12:45 jberger 2.0 was 9/16 as was 2.02
12:45 r0b3rt joined #mojo
12:46 mr-foobar joined #mojo
12:47 noeleon joined #mojo
12:47 sri i have a very bad feeling about this... like we are going to see years of falsely broken test results because that one shipped with 5.20
12:47 Nei hihi
12:47 jberger seriously? how did that ship with 5.20?
12:48 jberger it was only just released!
12:48 * jberger hangs head
12:49 mr-foobar joined #mojo
12:49 sri due to missing releases i can't diff to find out which one broke it
12:49 jberger sri: we should petition CPANTesters to expunge failing results with that module
12:49 jberger missing releases?
12:49 sri 5.20 shipped 1.67
12:49 jberger does backpan help?
12:49 sri on metacpan
12:49 jberger scroll down farther
12:50 jberger the backpan releases are under the cpan releases
12:50 mr-foobar joined #mojo
12:50 Nei faulty and outdated releases move to backpan
12:51 sri there it is
12:51 sri https://metacpan.org/diff/file?target=BINGOS/ExtUtils-Install-2.04/&source=BINGOS/ExtUtils-Install-2.00/
12:51 sri ok, then it's not so bad
12:51 sri the testers just need to update their environments
12:51 Nei should probably resolve itself
12:54 mr-fooba_ joined #mojo
12:56 mr-foobar joined #mojo
13:01 marcus ^^ Famous last words
13:01 marcus :)
13:22 * jberger reminds marcus that he has been exposed as a fraud
13:26 * marcus gently wipes jberger's mind.
13:28 doby joined #mojo
13:31 ignacio_ joined #mojo
13:44 lipizzan joined #mojo
13:53 marty joined #mojo
13:57 denis_boyun joined #mojo
14:09 ignacio_ joined #mojo
14:16 dod joined #mojo
14:16 sh4 joined #mojo
14:35 lb jberger: ah, weird, miyagawa's script mirrors http://cpan.cpantesters.org/authors/01mailrc.txt.gz which contains the right name
14:38 marty joined #mojo
14:59 doby joined #mojo
15:04 mr-foobar joined #mojo
15:05 sri (Ծ‸Ծ )
15:06 sri batman/marcus: looks like a lot of stuff is broken in convos now... aside from /list not working... join/part messages also just vanish
15:06 sri ┻━┻ ︵ヽ(`Д´)ノ︵ ┻━┻
15:06 gatitskiy joined #mojo
15:27 * lb wonders if he'll ever give enough of a frack to make his irssi handle emojis
15:37 * genio never will
15:40 dabudabu (´・ω:;.:...
15:41 dabudabu All you need to do is set it to use UTF8, which you should be using anyway, and use a reasonable terminal font, which you should be doing anyway
15:42 dabudabu It's easy (・∀・)
15:43 * dabudabu flips the chabudai back on its legs
15:51 good_news_everyon joined #mojo
15:51 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/16JVkQ
15:51 good_news_everyon mojo/master 3b04921 Sebastian Riedel: use consistent terminology
15:51 good_news_everyon left #mojo
15:57 cpan_mojo WWW-Crawler-Mojo 0.06 by Sugama Keita - http://metacpan.org/release/JAMADAM/WWW-Crawler-Mojo-0.06
15:57 batman sri: they are supposed to vanish. (Join/part)
15:57 * batman is on his way to Berlin...
15:57 sri batman: while i'm still reading the backlog?
15:58 batman Yes. They timeout after 30 seconds or
15:58 batman Something
15:58 sri ouch
15:58 batman Discuss it with jberger and marcus.
15:58 sri jberger/marcus: I HATE THAT!
15:59 batman Haha! Best discussion ever :)
16:00 sri you know, when i'm talking to someone on irc i'd like to know when they got disconnected and rejoined afterwards
16:01 sri of course i use irc more than most
16:01 * sri shrugs
16:05 gatitskiy joined #mojo
16:06 batman The thing is that we think it's not important to see the messages if you're not paying attention
16:06 batman Maybe we should bump the timer, but I doubt we will keep the messages around forever.
16:06 batman When that is said: I really don't care much.
16:06 batman I don't like to go backwards though. I like better to iterate forward :)
16:07 batman Now....
16:07 batman FIGHT! 🙈⛄️🍺
16:09 sujithm joined #mojo
16:10 sujithm_ joined #mojo
16:13 marcus batman: the timer was your idea, actually.
16:13 marcus I just want an option to ignore those messages
16:14 denny joined #mojo
16:14 marcus sri: we already didn't save those messages, they were just there until you switched channels.
16:15 sri marcus: right, that worked for me
16:15 sri like i said, i care when i am in a conversation, i want to know when the person i talk to vanishes
16:16 sri you know, when i'm switching between the convos window and my editor every now and then
16:16 marcus sri: So a timeout of like 1 hour would probably work for you?
16:17 sri maybe, i don't get why you want them to just vanish though
16:18 marcus sri: well, I personally just don't want them
16:18 sri haha, now nobody had the idea? :)
16:18 disputin joined #mojo
16:18 sri lets blame jberger
16:19 lb #dammitjoel
16:19 sri !
16:21 marcus I have logs. it was batman's idea ;)
16:22 marcus https://gist.github.com/marcusramberg/55b8e99bba259e93ad14
16:22 marcus "what about if we timeout the messages? like only have the elements visible for let's say 1 minute before removing them from the conversation list?"
16:24 lb jberger: haha, problem found, miyagawa says the bot has been running since May 2012, which is when it cached authors
16:24 nic We have a rule at work that we don't blame each other
16:24 nic unless that person is out of the building
16:24 nic in which case we blame them for everything
16:24 * marcus blames nic for the problem
16:25 * nic blames Alex Salmond
16:27 * sri arrests batman
16:28 marcus I think the proper solution is to implement a good /ignore actually
16:28 marcus so people can ignore whatever they want
16:29 marcus /IGNORE [-regexp | -word] [-pattern <pattern>] [-replies] [-except]         [-channels <channel>] <mask> <levels> <^levels>
16:29 sri and the opposite while you're at it ;p
16:29 marcus sri: you want unignore too? You beast
16:30 sri /highlight
16:30 marcus ah yes. I think there's an issue
16:31 marcus Well, I think the timing out joins was an interesting experiment, but ultimately confusing to users and not really solving the issue.
16:31 sri /unignore is a silly idea
16:31 marcus sri: irssi has it.
16:31 sri why would you ever change your mind?
16:32 marcus yeah that never happens
16:51 sujithm joined #mojo
16:54 disputin joined #mojo
16:59 mst I believe apeiron ended up modifying his irssi's unignore so any time he tried to unignore rindolf it printed "You've tried that before and it was a terrible idea" and refused to do it
17:00 marty joined #mojo
17:00 marty joined #mojo
17:08 marty joined #mojo
17:14 marty joined #mojo
17:17 lb haha
17:26 * jberger_ rejects blame
17:26 * jberger_ petitioned at the time to keep the old behavior
17:27 sri :O
17:29 jberger_ http://paste.ubuntu.com/8381285/
17:29 * jberger_ passes the buck
17:45 * lb passes the duck
17:47 tempire According to http://newgtlds.icann.org/en/program-status/delegated-strings, .mango is a thing.
17:47 tempire If I understand what a delegated string is.
18:04 jamesaxl joined #mojo
18:06 marcus tempire: otoh .singles and .diamonds are also things
18:06 tempire .glitter is not a thing
18:06 tempire nor is .sparkles
18:07 marcus in what world is that right?
18:15 sri some of these are glorious http://nodejsreactions.tumblr.com/
18:16 sri "The not-quite-right feeling when I try Go" http://media.tumblr.com/2199ea3743d91aa6adf97da39e5732e8/tumblr_n484u8winX1s373hwo1_400.gif
18:17 basiliscos joined #mojo
18:20 sri perl could really use something like that
18:21 sri "When they let me near the CSS" http://i.imgur.com/7WNEbrT.gif
18:23 jberger http://nodejsreactions.tumblr.com/post/88580764710/when-i-find-out-that-windows-deployment-is-a-project
18:23 irq joined #mojo
18:24 jberger When I find out that Windows deployment is a project requirement
18:24 jberger http://media.tumblr.com/ed4809859af85b26263d20b7404c5fc6/tumblr_n35x5iWMRQ1s373hwo1_500.gif
18:24 sri :D
18:28 sri some can be easily adapted
18:28 jamesaxl joined #mojo
18:28 sri Mojo::IOLoop->singleton->reactor->on(error => sub {}) http://media.giphy.com/media/gFwZfXIqD0eNW/giphy.gif
18:31 d4rkie joined #mojo
18:37 sri "Creating issues in my own GitHub project" http://media.tumblr.com/191a58eb03ef610f7a53cde24578af83/tumblr_inline_mxzjneadlg1s0m7nr.gif
18:39 * sri declares meme friday
18:47 dod joined #mojo
18:57 disputin joined #mojo
18:57 sri All green on CPAN Testers http://media.tumblr.com/7e1563ad5f6ebf7c3b6b51150eb03bfb/tumblr_mqpq2lU5o11stn6klo1_500.gif
18:59 basic6 joined #mojo
19:26 jamesaxl joined #mojo
20:02 sri so, we now have netflix in germany, i'll be off for the rest of the month ;p
20:15 davido_ Has netflix improved its selection in the past few years? I unsubscribed from Netflix a few years ago when I realized the streaming was only good in principle, but in practice left out most of the titles that I was actually interested in watching.
20:32 tempire I love it
20:33 tempire There's tons of stuff
20:33 tempire I just discovered a new show
20:33 tempire seems to happen periodically
20:33 tempire davido_: ^
20:38 mst mostly I subscribe to netflix in returns for not feeling any guilty whatsoever when I torrent things whose owners refuse to stream them :)
20:39 marcus that, and my children watch like 100 hours of netflix every month
20:39 marcus I'm kind of glad they don't have stats really
20:39 mst "HELP HELP NETFLIX IS JUDGING MY PARENTING" ?
20:40 marcus That would be bad, yes :)
20:41 marcus Almost done watching 'Honourable Woman now'. 1 more episode
20:41 mst does she get a Bat'leth?
20:42 ignacio_ joined #mojo
20:43 marcus Not yet, but something just exploded
20:43 marcus I guess that is to be expected in Gaza
20:49 disco joined #mojo
20:52 woz joined #mojo
20:52 batman marcus: i know the timer was my idea. the whole thing was implemented by me :P https://github.com/Nordaaker/convos/pull/197
20:53 batman though, i can't blame you for allowing me to do the timer, instead of just removing them directly.
20:53 batman after all.... i did get you drunk on cava ;)
20:54 davido_ Back in the "dvd exchange" days, I liked it because I could get almost any title.  Then things began to shift to streaming, and the dvd exchange became an add-on with additional costs.  The streaming had considerably less content than the DVD exchange.  Eventually I just dumped it.
20:55 batman anyway, what i meant about sri had to fight you was that i'm not pro that feature at all, i just wanted to try it out. and i do like the way the timer work: i see that people join/quit, but it's not taking over the window in an idle channel.
20:55 batman anyhow. do as you like, but make it obvious that someone you're talking with has left the conversation
20:55 * batman gets some sleep.
20:55 batman i'm back on tuesday for some more in depth discussions.
20:56 batman now, i'm ~ranting~ since it's not two way :( (not very productive, and i'm sorry about that)
21:14 marcus batman: :')
21:14 marcus batman: have fun in berlin
21:23 jberger batman++ # getting stuff done
21:23 jberger batman++ # trying things out
21:24 jberger marcus++ # getting drunk :-)
21:51 cpan_mojo Mojolicious-Plugin-BootstrapHelpers 0.0173 by CSSON - http://metacpan.org/release/CSSON/Mojolicious-Plugin-BootstrapHelpers-0.0173
21:51 woz joined #mojo
22:03 woz joined #mojo
22:05 woz_ joined #mojo
22:15 disputin joined #mojo
22:34 woz joined #mojo
22:52 marcus btw, one thing I dislike in the convos templates is this pattern: my $sidebar = stash('sidebar') || 'chat';
22:52 marcus is there a better way to do that?
23:03 firnsy marcus: http://mojolicio.us/perldoc/Mojolicious#defaults ?
23:04 marcus firnsy: that can't be done from the template tho
23:05 thomasoniii joined #mojo
23:08 firnsy marcus: yes, but it would ensure a value for stash('sidebar')
23:11 thomasoniii I figure you guys'd appreciate this. I volunteered to write an app for my son's school to hopefully speed up the carpool pickup process, which is glacially slow. Right now, a woman walks along with a clipboard writing down carpool numbers and then they read 'em over the PA and hope the students hear.
23:11 thomasoniii I thought it might be more efficient to give her a phone app so she could punch the numbers in on it and then broadcast them straight to the computers in the classrooms and the kids could read the numbers off the monitors, and only the ones for their specific room. Plus, I realized I could pre-sort the kids to certain spots on the sidewalk based upon the car order. And hopefully speed everything up at least a little.
23:11 thomasoniii To do this, I decided to use mojo, which I've really liked from the little I've screwed around with it, but I haven't done anything really involved. I finished up the app the other day and it's looking pretty good. I'm quite content.
23:17 jberger marcus: why do you dislike that pattern?
23:17 jberger other than maybe using //
23:17 thomasoniii But then there's the issue of deployment - the teacher I've spoken with down there says they have a server, but who knows what that means. It could just be windows running active directory for all I know. So I started considering alternate deployment models. It runs like lightning on my imac at home locally, as expected.
23:17 thomasoniii Unfortunately, my web host won't let me run mojo as a server, as is typical for shared hosting environments. So I made the .htaccess tweaks to run it as a CGI. And it works, but it's slow as molasses. Locally I'd typically get 1 second respond times, but as a CGI remotely I was getting 7 second or so. Ick. The app needs to support up to around 200 concurrent users (all making slightly staggered requests and getting back small
23:17 thomasoniii So I came up with an admittedly crazy alternate solution, which looks viable - I picked up a raspberry pi today and set it up with raspbian, then installed mysql + mojo and cranked that up.
23:17 thomasoniii And it performs quite well, considering that it's a $60 computer. I'm typically getting response times in the 2-3 second range, so it clobbers the performance of running as an CGI on the beefy shared servers. Load tests seem admirable as well, I've been handling 60-70 concurrent hits w/o any noticeable difficulty, other than needing to up my require.js timeout value, which I can optimize away anyway.
23:18 thomasoniii So is this a good solution? Ha. No, not really. But schools are on extremely tight budgets and tend to lack tech expertise, and I'm willing to part with $60 to donate an itty bitty box to the school, especially if it saves time out of my day every day.
23:18 thomasoniii And the fact that it performs acceptably at all is just really really cool. The cost of an xbox game to run a full fledge application that they can plug into the wall and forget about? That's pretty damn cool. :-)
23:22 firnsy thomasoniii++ # winning!
23:28 sri damn, the netflix selection is indeed not that great
23:28 sri so... i'm back already :(
23:29 sri marcus: we don't make optional not look better because they should not be used
23:29 sri s/optional/optional stash values/
23:30 sri s/not//
23:30 * sri brain his damage
23:32 sri every combination of template + names of stash values gets their own template compiled
23:33 sri so if you have two optional stash values, that's already 4 Mojo::Template objects, which all need to be cached too
23:34 sri happens here https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Plugin/EPRenderer.pm#L25
23:34 sri and here https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Plugin/EPRenderer.pm#L36
23:35 sri marcus: if you know a better way to handle that, be my guest
23:35 sri but right now too many stash values totally destroy performance
23:35 sri argh
23:36 sri s/stash values/optional stash values/
23:37 sri oh, nordic perl workshop has a nice deisgn http://act.yapc.eu/npw2014/
23:42 neilhwatson joined #mojo

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