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

IRC log for #mojo, 2014-09-26

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

All times shown according to UTC.

Time Nick Message
00:03 marty joined #mojo
00:11 tempire People have been telling me to move to postgres for years.
00:11 tempire Over a decade, literally
00:20 woz joined #mojo
00:20 sri i advice you not to take database advice from me
00:27 sri muhahaha... the first samsung ad to ever make me laugh http://s1.ibtimes.com/sites/www.ibtimes.com/files/styles/v2_article_large/public/2014/09/25/samsung-ad.jpeg?itok=H3I9bwny
00:29 Averna joined #mojo
00:37 gefunden joined #mojo
00:52 mst sri: or from me
00:52 mst sri: it was like 2-3 years after I first wrote DBIx::Class that I actually read a book about databases :D
00:52 dvinciguerra joined #mojo
00:54 zivester joined #mojo
01:09 howitdo joined #mojo
01:16 Mso150 joined #mojo
01:30 neyasov______ joined #mojo
01:30 d4rkie_ joined #mojo
01:46 preaction joined #mojo
01:49 laouji joined #mojo
01:57 doublelel joined #mojo
02:13 noganex_ joined #mojo
02:30 neyasov______ joined #mojo
02:36 howitdo joined #mojo
02:47 woz joined #mojo
02:56 howitdo joined #mojo
03:04 basic6 joined #mojo
03:12 ceej_ joined #mojo
03:18 woz joined #mojo
03:23 dexteruk joined #mojo
03:31 neyasov______ joined #mojo
03:50 woz joined #mojo
03:52 KCL_ joined #mojo
03:57 KCL joined #mojo
03:58 woz joined #mojo
04:04 KCL_ joined #mojo
04:11 preaction joined #mojo
04:15 chansen joined #mojo
04:16 irq joined #mojo
04:29 woz joined #mojo
04:32 neyasov______ joined #mojo
04:56 rem_lex joined #mojo
04:58 laouji joined #mojo
05:27 woz joined #mojo
05:29 sujithm joined #mojo
05:33 neyasov______ joined #mojo
05:46 mr-foobar joined #mojo
05:52 ningu joined #mojo
05:59 ningu Mojo::DOM's next() method seems to be rather slow. has anyone else noticed this?
05:59 ningu I've done something like $dom->find('b'), and it's quite fast to loop over all of those. but if I do $b->next within the loop, it slows it down by a lot.
06:00 ningu other things, like ->text() for example, seem to be quite fast.
06:01 rem_lex|pivo joined #mojo
06:16 mr-foobar joined #mojo
06:20 dp_ joined #mojo
06:27 woz joined #mojo
06:33 jamesaxl joined #mojo
06:33 neyasov______ joined #mojo
06:34 Mso150 joined #mojo
06:41 dod joined #mojo
06:43 ningu left #mojo
06:56 basiliscos joined #mojo
07:02 Vandal joined #mojo
07:16 rawler joined #mojo
07:20 trone joined #mojo
07:27 woz joined #mojo
07:34 neyasov______ joined #mojo
07:54 arthas joined #mojo
08:07 tempire harumph
08:07 tempire can't install any dists with perlbrew on centos 7
08:10 woz joined #mojo
08:11 Dandre joined #mojo
08:14 neyasov______ joined #mojo
08:18 Dandre1 joined #mojo
08:19 tempire oh, I'm a goober.
08:19 tempire works fine.
08:23 markov question: my controller which specializes in devel wants to access the the controller which handles authentication (to change things in its configuration at runtime)  How can I get access to some controller object without using routes?
08:24 tempire markov: You want to access one controller from another controller?
08:25 Dandre joined #mojo
08:25 tempire If that's what you're asking, then don't do it.
08:25 tempire It's the wrong way
08:26 tempire Abstract the functionality into a helper
08:26 tempire And access it from both controllers
08:26 markov Yes.  I want to find the object which handles auth, in   ->to('auth')
08:27 * tempire has mastered auto-layout
08:27 tempire relatively
08:27 markov In general, you are correct.  In this case, it is a controller which helps with development/debugging.  I do not want to interfere with the clean structure of the main code.
08:42 fhelmber_ joined #mojo
08:53 basiliscos joined #mojo
09:05 Dandre joined #mojo
09:24 basiliscos joined #mojo
09:35 denis_boyun joined #mojo
09:35 basiliscos joined #mojo
09:40 basiliscos joined #mojo
09:42 edestler joined #mojo
09:46 meshl joined #mojo
09:57 basiliscos joined #mojo
10:34 Mikey_ joined #mojo
11:03 irq joined #mojo
11:48 neyasov______ joined #mojo
11:51 irq joined #mojo
12:02 sawtooth joined #mojo
12:09 meshl joined #mojo
12:19 neyasov______ joined #mojo
12:23 lipizzan joined #mojo
12:26 Insane joined #mojo
12:28 Insane hi all, if I'm doing my $ua = Mojo::UserAgent->new(); my $page = $ua->get(), how could I change page contents with s///g ?
12:28 Insane before saving it to disk
12:30 marty joined #mojo
12:39 nicomen $tx = $ua->get; my $body = $tx->res->body; $body =~ s{foo}{bar}gmx;
12:40 D4RK-PH0ENiX joined #mojo
12:42 Insane and how to save modified page after that?
12:44 Nei the same way you had saved it before
12:45 Insane $tx->res->content->asset->move_to ?)
12:50 Kripton_ joined #mojo
12:53 Nei if you do text replacements and don't need to put it back into the response Mojo::Util::spurt $body, "file"
13:03 good_news_everyon joined #mojo
13:03 good_news_everyon [mojo] kraih pushed 2 new commits to master: http://git.io/HM0-Gw
13:03 good_news_everyon mojo/master f7100a6 Stefan Adams: Fix typo
13:03 good_news_everyon mojo/master 8510806 Sebastian Riedel: Merge pull request #678 from s1037989/patch-1...
13:03 good_news_everyon left #mojo
13:08 ryozi joined #mojo
13:17 odc did I miss something here? https://github.com/kraih/mango/pull/25#issuecomment-56958617
13:19 neilhwatson joined #mojo
13:20 Nei there might be a difference between empty hash and no hashref, the reporter says empty hash would equal to "find any" but he wants to make a distinction between empty hash and not set
13:20 Nei if his proposal is sounds, ...I have my doubts
13:22 odc so my comment is right
13:22 odc (i'm oliwer there)
13:22 Nei I'd say your comment is right and wrong
13:23 Nei testing if the hash is empty won't resolve his issue if he needs to make difference between explicitly empty or default empty
13:34 Eitz joined #mojo
13:34 Eitz Is there a easy way to get the http_referrer from the template?
13:38 marty Eitz:  I think you can do $self->req->headers->referrer
13:41 nicomen can I alter the actual "GET / HTTP/1.1" line that a Mojo::UserAgent sends? I need to test some ruined proxy server repair functionality
13:49 Eitz Works like a charm, thanks <a href="<%= ($self && $self->req && $self->req->headers && $self->req->headers->referrer) ? $self->req->headers->referrer : 'javascript:history.back(-1)'%>" class="btn">Voltar</a>
13:50 nicomen Eitz: are you makeing a page for people without back buttons?
13:51 edestler joined #mojo
13:52 Eitz Heh, i'm doing this for people who doesn't understand how a back button work... Also, dead ends in a website are bad
13:59 neyasov______ joined #mojo
14:11 zivester joined #mojo
14:15 trone joined #mojo
14:22 sh4 joined #mojo
14:31 sujithm joined #mojo
14:48 good_news_everyon joined #mojo
14:48 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/MenylQ
14:48 good_news_everyon mojo/master 7e28990 Sebastian Riedel: improved performance of next, next_sibling, previous and previous_sibling methods in Mojo::DOM significantly
14:48 good_news_everyon left #mojo
14:50 sri quite significantly actually :)
14:50 sri https://gist.github.com/anonymous/db24fb923e8076f4a369
14:52 genio \o/
14:55 batman sri++
14:55 mib_y6krim joined #mojo
15:00 good_news_everyon joined #mojo
15:00 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/FmpIrw
15:00 good_news_everyon mojo/master be8e643 Sebastian Riedel: improved performance a little bit more for many common cases
15:00 good_news_everyon left #mojo
15:00 neyasov______ joined #mojo
15:02 disputin joined #mojo
15:09 zgarnog joined #mojo
15:12 andrewp joined #mojo
15:30 sri hah, i'm not the only unhappy mongodb driver author, someone else spoke up in the secret google group
15:31 Nei just switch to postgres!
15:31 sri looks like almost everyone else is now employed by mongodb inc though... have a feeling they are fine with us giving up
15:32 sri funny thing is, i was always worried mongodb would get bought by oracle... i never realized that they are *becoming* oracle
15:33 sri i actually just bought the sql cookbook to get better at postgresql :D
15:33 sri awesome book!
15:34 genio To get better how?  At writing queries?
15:35 sri yea
15:36 genio Do people just not deal with databases often?  writing queries is such a huge part of my work day, I've never understood the push for nosql
15:36 * genio didn't mean that to be accusatory or mean in any way.  I've just been confused at the push for nosql for a long time
15:37 sri i love the style of the sql cookbook, it shows answers for the individual databases if there are differences
15:38 sri well, there's tons of functions in postgresql to learn
15:39 sri thing about mongodb is that the query language is just nested data structures, that makes it very comfortable to use from any programming language
15:40 sri everything else is really garbage, very comfortable to use garbage
15:41 sri i do see the beauty of SQL, but using it from another programming language is... well...
15:41 Nei you can also put json in postgres
15:42 genio that's where views come in, etc.  you know what you're going to need, you write it once and make your queries simple in your code
15:43 Nei and use v8 as postgres function language to write json functions
15:43 sri that's the other thing... i want a nice migration system that uses raw sql :)
15:43 genio you then get a nice, normalized structure with views for common queries
15:43 sri (working on that atm.)
15:45 sri fun fact... i think i wrote the first sql migration system for perl like 10 years ago... the memories are foggy though
15:46 sri how do you manage the evolution of your databases atm?
15:46 Nei yea, you need to define versions and upgrade scripts
15:46 Nei most orm mappers help you with that
15:46 r0b3rt liquibase
15:46 purl liquibase is java, so i dont want it in echosystm's perl projects
15:46 * sri pats purl
15:46 * purl stabs
15:50 basiliscos Hello everyone! What I should to to let Mojo::JSON::j handle utf8-encoded strings ? http://pastebin.com/MwwXWKfc
15:51 basiliscos I'm bootstraping my backbone model in some start page, and the model (json) contains utf8-strings :(
15:52 basiliscos Regular utf8-chars appear OK in the page, but after Mojo::JSON::j they become incorrect
16:00 Mso150 joined #mojo
16:01 KCL joined #mojo
16:01 neyasov______ joined #mojo
16:03 basiliscos arrrrrggggghhhh... It seems I just need decode('utf8', j({x => 'абц'}) )
16:12 preaction joined #mojo
16:17 marcus sri: we've been using deploymenthandler
16:18 Adura joined #mojo
16:21 mad_hatter joined #mojo
16:30 andrewp joined #mojo
16:38 zgarnog joined #mojo
16:41 sri marcus: what do you like about it?
16:50 sri oh, the liquibase sql format looks better than i expected
16:51 sri sql files with special comments seem to be popular
16:52 sri http://www.liquibase.org/
16:52 sri same in play framework https://www.playframework.com/documentation/2.4.x/Evolutions
16:53 sri (i keep looking at play framework because they are one of the few frameworks that has been encouraging pure sql for a long time)
16:56 zgarnog joined #mojo
16:58 zgarnog joined #mojo
17:02 neyasov______ joined #mojo
17:02 cfedde step 1: Find developers who don't say "Let's just use MongoDB"
17:04 preaction joined #mojo
17:07 disputin joined #mojo
17:09 ceej hey, so I’m completely new to mojo…. I just installed it, "which mojo" gives me “/home/cj/perl5/bin/mojo” but when I run “mojo generate app yah” I get this error Can't locate Mojolicious/Commands.pm in @INC … I then ran cpan install Mojolicious::Commands but I still get the same error
17:11 basiliscos joined #mojo
17:12 ceej I really want to see unicorns ;(
17:13 cfedde what does 'perldoc -l Mojolicious::Commands' show you?
17:14 ceej cfedde: No documentation found for "Mojolicious::Commands".
17:14 cfedde hum
17:16 cfedde what does 'which perl' show you?
17:16 ceej /usr/bin/perl
17:16 purl /usr/bin/perl is canonical
17:34 dvinciguerra joined #mojo
17:36 * Eitz finds the closest large object and gives dvinciguerra a slap with it
17:36 marcus ceej: so you probably installed in in perl5 and have that in path, but not in your @INC
17:37 ceej @marcus ye it’s looking in  /home/cj/perl5/bin/../lib but ~/perl5/lib is actually ~/perl5/lib/perl5 for some reason
17:38 marcus ceej: I recommend using perlbrew
17:38 marcus it'll set it all up for you.
17:39 ceej export PERL5LIB=$HOME/perl5/lib/perl5  worked
17:39 ceej I’ll give that a try, ty :)
17:41 ceej marcus, cfedde  thank you
17:43 dod joined #mojo
17:48 ceej marcus: is there anything similar to https://github.com/deivid-rodriguez/pry-byebug for mojo/perl ?
17:56 mib_b5pb2p joined #mojo
18:01 ua_ joined #mojo
18:03 neyasov______ joined #mojo
18:06 ua_ left #mojo
18:07 disputin joined #mojo
18:08 d4rkie joined #mojo
18:13 dvinciguerra joined #mojo
18:15 lipizzan joined #mojo
18:23 jamesaxl joined #mojo
18:26 disputin joined #mojo
18:41 irq joined #mojo
18:45 memowe joined #mojo
19:01 woz joined #mojo
19:04 neyasov______ joined #mojo
19:07 ningu joined #mojo
19:07 ningu does kraih go by a different name here? :)
19:08 ningu sri?
19:08 purl sri is, like, A PONIE!!1! and a  or no more a javascript noob or evil or a spelling guerilla or the temporary channelclown or a snob now or the perl guerilla or a small mouse with a big head aiming for world domination or the evil sith or has no clue about fuzzy logic or no longer a real hacker :/ or a copycat or pimp to many children or a holy man or looks a lot like pitr or puny or making Mojolicious delicious
19:08 ningu heh
19:09 ningu yes, him
19:11 ningu if he's in Germany he might still be up, if in Belarus perhaps not :P
19:11 Mso150 joined #mojo
19:13 ceej so I’m trying to deploy to heroku by doing 'carton exec script/yah deploy heroku —create’ but I’m getting this error 'Not an ARRAY reference at /home/cj/mojo/yah/local/lib/perl5/Net/Heroku.pm line 115.’  anyone ran into it before?
19:16 good_news_everyon joined #mojo
19:16 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/9yyNIw
19:16 good_news_everyon mojo/master 86a4601 Sebastian Riedel: fixed compatibility with older versions of Perl
19:16 good_news_everyon left #mojo
19:21 ceej turns out I entered the wrong password :)
19:22 ningu sri: thanks for the quick fix!
19:23 sri ningu: wait, is that you on github?
19:23 ningu yes
19:23 * sri sets ningu on fire
19:23 ningu haha
19:23 sri you should know better than to open a feature request issue!
19:23 hertzhaft joined #mojo
19:24 ningu sri: couldn't slowness be considered a bug?
19:24 sri certainly not in this case
19:26 sri i guess it's a blurry line
19:27 * sri extinguishes the flames again
19:28 ningu haha
19:30 genio and sri never sleeps.  he's a robot
19:31 sri anyone who tells you different is a liar
19:31 woz joined #mojo
19:34 ningu and liar backwards is rail, which is how you might get from Germany to Belarus
19:36 sri http://i.imgur.com/j74SykU.gif
19:44 seifer joined #mojo
19:45 genio heh... mind blown
19:58 good_news_everyon joined #mojo
19:58 good_news_everyon [mojo] kraih pushed 2 new commits to master: http://git.io/vw29Fw
19:58 good_news_everyon mojo/master c45cc8d Olaf Alders: Fixes typo.
19:58 good_news_everyon mojo/master 09a96b8 Sebastian Riedel: Merge pull request #681 from oalders/master...
19:58 good_news_everyon left #mojo
20:04 woz joined #mojo
20:05 neyasov______ joined #mojo
20:12 woz joined #mojo
20:15 tempire joined #mojo
20:15 tempire sri: my bouncer ip has changed
20:15 tempire If that matters
20:16 good_news_everyon joined #mojo
20:16 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/lUY0hQ
20:16 good_news_everyon mojo/master b3598d4 Sebastian Riedel: fixed a few typos
20:16 good_news_everyon left #mojo
20:18 ningu that commit only fixes one typo. clearly a liar
20:25 tempire_ joined #mojo
20:28 hertzhaft left #mojo
20:37 zgarnog joined #mojo
20:43 woz joined #mojo
20:47 denis_boyun joined #mojo
20:47 good_news_everyon joined #mojo
20:47 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/OA-5lw
20:47 good_news_everyon mojo/master eada279 Sebastian Riedel: added extracting attribute to Mojo::UserAgent::CookieJar
20:47 good_news_everyon left #mojo
20:52 denis_boyun_ joined #mojo
20:54 disputin joined #mojo
21:00 good_news_everyon joined #mojo
21:00 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/m3Nilw
21:00 good_news_everyon mojo/master 1ef444e Sebastian Riedel: improved Mojo::Cache to allow caching to be disabled (closes #682)
21:00 good_news_everyon left #mojo
21:06 neyasov______ joined #mojo
21:08 good_news_everyon joined #mojo
21:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/_7rcaw
21:08 good_news_everyon mojo/master 4642a80 Sebastian Riedel: endpoints are just routes
21:08 good_news_everyon left #mojo
21:16 noganex joined #mojo
21:18 neilhwatson joined #mojo
21:25 tianon joined #mojo
21:25 Mso150 joined #mojo
21:29 good_news_everyon joined #mojo
21:29 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/D18EtQ
21:29 good_news_everyon mojo/master 1fa9f44 Sebastian Riedel: test return values
21:29 good_news_everyon left #mojo
21:31 dexteruk joined #mojo
21:34 woz joined #mojo
21:35 neyasov______ joined #mojo
21:38 Mso150 joined #mojo
21:48 good_news_everyon joined #mojo
21:48 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/hmzaOQ
21:48 good_news_everyon mojo/master eea6404 Sebastian Riedel: deprecated Mojolicious::Routes::Route::has_conditions
21:48 good_news_everyon left #mojo
22:08 sugar_ joined #mojo
22:08 ua_ joined #mojo
22:16 neyasov______ joined #mojo
22:34 woz joined #mojo
22:37 ceej what do you guys use to manage local environment vars for mojo?
22:40 good_news_everyon joined #mojo
22:40 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Yfn5gg
22:40 good_news_everyon mojo/master 3878d57 Sebastian Riedel: fixed url_for bug where deeply nested WebSocket routes would not work correctly
22:40 good_news_everyon left #mojo
22:44 meshl joined #mojo
22:55 yuni joined #mojo
23:34 woz joined #mojo
23:38 phillipadsmith ceej: when you say "manage," what are you referring to?
23:38 ceej phillipadsmith: just load from a file
23:39 phillipadsmith you want to load MOJO_MODE or something like that ?
23:40 ceej phillipadsmith: ye or things like APP_SECRET, DATABASE_URL etc...
23:41 phillipadsmith Ah, I would call those *configuration* variables typically
23:42 phillipadsmith I usually just put them into app_name.json and load them with my $config = plugin 'JSONConfig';
23:42 phillipadsmith Mojo gives you the "mode" automatically, so app_name.development.json and app_name.json "Just Work(™)" when you run the app via morbo or hypnotoad
23:42 ceej phillipadsmith: well if you host on heroku it uses $ENV vars for everything
23:43 ceej plus you don’t want to store keys and stuff in github :)
23:43 phillipadsmith Obviously, you don't commit that into your repo
23:43 phillipadsmith But when you say "manage," I'm not following… what more than exporting them into the environment do you want to do?
23:44 ceej phillipadsmith: just that, I want to store my env vars in a file and load them locally
23:44 ceej phillipadsmith: like we do here https://github.com/punchgirls/job_board
23:44 phillipadsmith I was reading something about a .env file the other day, but I can't find it… I'm guessing that's what you're thinking...
23:45 ceej I mean I could do env $$(cat env.sh)
23:45 ceej but then I end up with this huge command
23:45 ceej env $$(cat env.sh) carton exec morbo script/yah -l "http://*:8080"
23:45 ceej LOL
23:45 phillipadsmith LOL
23:46 ceej I tried adding `env \$(cat env.sh)`; into script/yah but it didn’t do anything
23:46 phillipadsmith Not so bad, really, if you need to use environmental variables. But, I don't really see what the difference is between that and loading a configuration file
23:46 ceej phillipadsmith: because heroku uses environmental variables
23:47 phillipadsmith The benefit of the config file is that with a simple environmental variable switch, MOJO_MODE, you can load in different configurations (local dev, testing, production, etc.).
23:47 ceej phillipadsmith: yes but you can’t add files to heroku, which is why the use env vars :)
23:47 phillipadsmith I have no experience with heroku, so I can't help there… is there a reason it wouldn't work with a config file?
23:48 phillipadsmith Oh, weird, didn't know about that limitation on Heruko
23:48 ceej phillipadsmith: because you can’t ssh in and sscp a file
23:48 phillipadsmith Okay, gotcha', makes total sense
23:48 dexteruk joined #mojo
23:50 phillipadsmith I'm sure someone here knows the answer to that, as there is built-in Heroku deploy support in Mojolicious, IIANM
23:51 ceej phillipadsmith: well that’s just for deploying :)
23:51 ceej I found this http://search.cpan.org/~jmcada/Env-Sourced-1.00/lib/Env/Sourced.pm-orig
23:51 ceej but carton can’t find it to install it
23:51 phillipadsmith That looks frightening
23:52 phillipadsmith 06 Nov 2005
23:55 phillipadsmith ceej: could you use foreman + a .env file?
23:57 ceej phillipadsmith: how do you mean?
23:58 phillipadsmith https://devcenter.heroku.com/articles/procfile#setting-local-environment-variables
23:59 phillipadsmith I dunno, I'm just guessing here, because I've not used Heroku

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