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

IRC log for #mojo, 2015-07-14

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

All times shown according to UTC.

Time Nick Message
00:15 hesco joined #mojo
00:26 hesco I'm hoping to run multiple environments at distinct ports on a single server. Is there any way I can kill one invocation of my application, without affecting my ability to leave others running?  https://gist.github.com/hesco/60816016cfbdd9a554e4
00:27 cpan_mojo Mojo-JSON-MaybeXS-0.008 by DBOOK https://metacpan.org/release/DBOOK/Mojo-JSON-MaybeXS-0.008
00:41 dvinciguerra joined #mojo
00:46 bpmedley hesco: I'm wondering if it would be easier with hypnotoad.
01:14 elik joined #mojo
01:14 hesco bpmedley: perhaps it is time I learn hypnotoad then.  Does it support what I am trying to do here?  With the multiple versions at multiple ports on a single server?
01:33 bpmedley I think.  It looks like your conf file is the dynamic part and the code is the same across versions?
01:43 hesco right.
01:45 purl right. is probably not.
01:45 hesco well, actually I am using puppet's vcsrepo to deploy with, so the environments each get a different ref out of the git repo, a specific tag or commit ref, that is.
01:45 hesco but yes, the primary difference, or the one relevant here is that each environment's conf file specifies a specific port.
01:46 bpmedley hesco: https://bitbucket.org/snippets/bpmedley/xRpXG <-- I think this works
02:12 noganex joined #mojo
02:20 Kogurr joined #mojo
02:33 hesco bpmedley: thanks for the head start.  I will test that right after this coming conference call.
02:48 cpan_mojo Mojo-Snoo-0.14 by CURTIS https://metacpan.org/release/CURTIS/Mojo-Snoo-0.14
03:03 kaare joined #mojo
03:24 good_news_everyon joined #mojo
03:24 good_news_everyon [mojo] kraih tagged v6.14 at d848fab: http://git.io/vmquN
03:24 good_news_everyon left #mojo
03:26 good_news_everyon joined #mojo
03:26 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vmqzq
03:26 good_news_everyon mojo/master c666428 Sebastian Riedel: bump version
03:26 good_news_everyon left #mojo
03:37 hshong joined #mojo
03:48 absolut_todd joined #mojo
03:59 zivester joined #mojo
05:32 sri http://i.imgur.com/5SLlDLS.jpg
05:32 sri :O
05:37 * coolo had to look it up - http://www.urbandictionary.com/define.php?term=Filet+Minion
05:48 cpan_mojo API-Facebook-0.01 by AWNCORP https://metacpan.org/release/AWNCORP/API-Facebook-0.01
05:51 punter joined #mojo
05:55 davido___ joined #mojo
05:56 frederico joined #mojo
06:15 melo joined #mojo
06:16 jontaylor joined #mojo
06:24 jontaylor is there some throttling on spitting debug messages to stdout with morbo?
06:24 jontaylor I ran some benchmarking over night, and I stopped it this morning
06:25 jontaylor but I can still see the console streaming logging from 6 hours ago
06:47 mattastrophe joined #mojo
06:49 amon joined #mojo
06:56 AndrewIsh joined #mojo
07:11 Vandal joined #mojo
07:21 D4RK-PH0ENiX joined #mojo
07:33 trone joined #mojo
07:50 berov joined #mojo
08:06 buu jontaylor: Consoles in general often have limits?
08:07 jontaylor buu: Yeah I think it was iterm2 causing the lag on that
08:07 jontaylor the log file was about 24GB
08:07 buu zounds
08:07 batman jontaylor: btw, it's STDERR and not STDOUT (unless you changed it)
08:08 buu So what did benchmarking morbo for 10 hours tell you?
08:08 jontaylor oh I wasn’t really benchmarking my application tier, I was looking at the database mostly
08:08 jontaylor i’ve got 24 million rows in my postgres DB now
08:08 jontaylor i’m new to postgres having been a mysql DBA, and certain things in postgres annoy me
08:09 jontaylor like its not got an internal scheduler, and partitioning tables requires tons of manual work
08:10 buu what does a scheduler do?
08:11 jontaylor buu: its like cron for the DB
08:12 jontaylor so for example, lets say you have metrics streaming in, and you want to roll that up by say, minutes, hours, days, weeks etc
08:12 jontaylor in mysql you’d run a function every minute to aggregate the raw metrics, and insert into a rollup table by minutes etc
08:13 jontaylor whereas in postgres you need to poke that from outside, where you need to be careful about running multiple instances, and matching the DB servers time etc
08:52 bin_005 joined #mojo
08:56 bobkare jontaylor: For partitioning pg_partman works well
08:57 jontaylor bobkare: I had a look at that, its absolutely perfect for what I want, however if I use that it means I can no longer use amazons RDS service
08:57 jontaylor so i’m super stalled by indecision at the moment
09:02 bin_005 joined #mojo
09:23 McA2 joined #mojo
10:02 bobkare jontaylor: Hm, can you not use user defined functions at all, or is it just compiled extensions you can't use? The latest pg_partman version requires compilation, but the earlier ones are just some plpgsql functions
10:03 jontaylor bobkare: its just extensions that are the problem, I didn’t know it had an earlier version based on just importing some functions, that’ll likely work!
10:15 dod joined #mojo
10:17 dod joined #mojo
11:13 plicease joined #mojo
11:26 eitz joined #mojo
11:31 neilhwatson joined #mojo
11:50 plicease joined #mojo
11:52 ans1 joined #mojo
12:04 plicease joined #mojo
12:24 mattastrophe1 joined #mojo
12:30 ans joined #mojo
12:37 mattastrophe joined #mojo
12:39 ajr_ joined #mojo
12:39 mattastrophe1 joined #mojo
12:41 dvinciguerra joined #mojo
12:45 buu Is there no json pretty printer in mojo someplace?
12:48 Grinnz Mojo::JSON doesn't really have "extras" like that
12:49 Grinnz when i've needed that, ill just throw it through JSON::MaybeXS encoder
12:49 Grinnz (which i'm usually already using anyway via Mojo::JSON::MaybeXS)
12:56 mattastrophe joined #mojo
12:58 dod joined #mojo
13:00 mattastrophe joined #mojo
13:12 oetiker joined #mojo
13:17 zivester joined #mojo
13:23 batman buu: when do you need it?
13:24 buu Just as a utility thing
13:24 buu I suppose I could just use data dumper
13:24 nicomen I normally use Dumper with a decoded json struct
13:29 batman buu: use Mojo::Util 'dumper'; warn dumper($tx->res->json);
13:29 jberger <3 Data::Printer for human inspection
13:29 batman buu: the dumper() utility is often more pretty than the default Dumper() function
13:30 buu ohh ok
13:31 batman buu: dumper() == Data::Dumper->new([@_])->Indent(1)->Sortkeys(1)->Terse(1)->Useqq(1)->Dump;
13:35 nicomen handy as a helper c.dumper
13:35 nicomen in template land
13:35 buu yeah
13:35 buu nicomen: I've been contemplating using handlebar templates in mojo
13:36 buu It has some interesting effectts
13:36 hesco joined #mojo
13:38 jberger buu: what handlebars engine are you using?
13:43 nicomen buu: like?
13:45 nicomen $ echo "{{ foo }}" | tpage --start_tag {{ --end_tag }} --define foo=bar
13:45 nicomen bar
13:45 nicomen ;)
13:47 jberger Oh, you are just modifying mojo template to do handlebars, cute
13:47 nicomen actually TT, but we have people moaning about template format for stupid reasons, and that would help
13:48 nicomen equally stupid reasons for moaning about perl
13:48 Grinnz_ i ride my bike, with no templating
13:48 Grinnz_ with no templating
13:49 nicomen we have one of Norways's biggest portal page which  is more or less static html, yet we have several JS frameworks in place, because ...I have _no_ idea...
13:50 Grinnz_ because shiny
13:52 batman nicomen: you have it because of caching
13:52 * batman used to work as a contracter at the same place
13:53 Grinnz_ heh
13:59 nicomen batman: no, we have it because of shiny, and because "buhuu but I want to work with this week's popular framework" frontenders, first we "optimized" the page with lazy loading, making it slower for the enduser using angular, then we spent another year rewriting using a mixture of other things, grids and what not. I think I counted 10k DOM elements. And it's still as slow.
13:59 batman nicomen: ah! sorry. i missed the "several" part :)
13:59 nicomen The whole time they just needed to fix the backend and remove all unnecessary js from the page. When I'm done with my current project, I want to reimplement the page using the mojo engine we use on http://abcnyheter.no
14:00 nicomen hopefully I'll have time before I quit early August
14:00 batman abcnyheter is killing my cpu :( (chrome)
14:01 batman Refused to execute script from 'https://klm.commander1.com/v3/?....' ? :)
14:01 nicomen ads...
14:01 nicomen luckily chrome is killing off flash too, I hope our ads will be made with techonology from this side of the millenium then.
14:02 batman i have flash disabled with a plugin... maybe it's the plugin's fault :/
14:02 nicomen hm, I don't think we have implemented ad-blocker blockers yet
14:03 nicomen can't get the KLM ad
14:07 genio stupid flash
14:10 ans1 joined #mojo
14:24 genio FF is declaring war on Flash as well?  http://gizmodo.com/firefox-now-blocks-flash-by-default-1717664482
14:26 Jonis jberger: <3 DDP
14:27 Jonis would love for mojo to use Data::Printer if it existed instead of Data::Dumper
14:27 ajr_ joined #mojo
14:41 elik joined #mojo
14:41 mattastrophe joined #mojo
14:54 elik joined #mojo
14:55 mattastrophe joined #mojo
15:01 sh4 joined #mojo
15:12 nicomen why isn't there a !? ternary operator?
15:12 nicomen not_true() !? do_it() : nah()
15:12 Grinnz_ like, negated?
15:13 Grinnz_ because you can just switch the last two :P
15:13 batman Grinnz_: hehe
15:13 nicomen if any language should have it, it's perl ;)
15:13 jberger or add a ! in the conditional
15:13 Grinnz_ that too
15:13 Grinnz_ you can call it !? still even, just there's a condition in between the two characters ;)
15:13 nicomen well, the same reasons !~ is useful applies
15:13 Grinnz_ not really
15:14 jberger nicomen: I very rarely use !~ either
15:14 Grinnz_ there is no difference between a negated ternary operator and a negated condition or switched operands
15:14 Grinnz_ i guess you can negate a whole match condition too
15:14 nicomen Grinnz_: !($foo =~ /lol/} == ($foo !~ /lol/) # no?
15:15 nicomen it adds clarity some times
15:15 buu jberger: Oh, sorry, I wrote a mojo renderer for text-handlebars but now I'm going to port that to use handlebars.js
15:15 Grinnz_ yeah i was thinking more that the regex itself doesn't have a good representation of negation which is why i need !~
15:15 buu Which lets me use the precompilation feature of handlebars
15:15 Grinnz_ but negating the whole expression is equivalent
15:16 jberger except for short circuiting I imagine
15:16 Grinnz_ oh maybe
15:16 nicomen not_true() ? ok() : nope() # :-D
15:17 nicomen perl6 material I guess
15:17 Grinnz_ also, there's this word for "not true"
15:21 cpan_mojo Mojo-Redis-1.02 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojo-Redis-1.02
15:22 Grinnz_ batman++
15:23 batman :)
15:24 lluad joined #mojo
15:34 ans joined #mojo
15:35 cpan_mojo Mojolicious-Plugin-CGI-0.22 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-CGI-0.22
15:36 cpan_mojo Swagger2-0.43 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Swagger2-0.43
15:38 jberger batman is teh releaze
15:40 cpan_mojo Toadfarm-0.66 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Toadfarm-0.66
15:41 batman jberger: yeah. got failing tests :(
15:42 jberger eh, better than not knowing about it
15:42 jberger <3 cpantesters
15:43 Grinnz_ +1
15:43 purl 1
15:45 berov batman: how  using '/' is better than catfile() ? just interested
15:46 batman jberger: indeed!
15:46 berov asking regarding youlast fix of loading API files
15:46 batman berov: aha. yeah... so the thing is that Swagger2::Editor splits the filename on "/" and the use catfile to join it back
15:47 batman if i use catfile() directly on win32... it doesn't work
15:47 * batman is no win32 expert
15:47 berov ahaaaa ok :)
15:47 batman berov: pretty sure my code is wrong. but i don't care too much :(
15:47 berov but you can split_path i think
15:47 batman probably. i have no idea :)
15:48 berov or the name of the function was different
15:48 berov splitpath
15:48 berov http://perldoc.perl.org/File/Spec/Functions.html
15:49 batman yeah. i'm not going to fix it. but i will take a pr
15:49 berov :)
15:49 berov ok
15:50 sri why would you want platform specific path handling?
15:50 sri seems stupid
15:51 sri "if you deploy this app on windows you'll have to rewite all paths... herp derp"
15:51 sri oh, this is not #swagger2
15:53 batman sri: there's no such thing. i created #swagger :)
15:54 cpan_mojo Mojo-Redis2-0.21 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojo-Redis2-0.21
15:56 batman hope i won't have to release this many modules tomorrow :)
16:00 batman Hope there will be less dependencies to Mojo::Redis as well...
16:03 jberger send a message to the few reverse dependencies at least
16:04 berov joined #mojo
16:05 berov left #mojo
16:06 batman jberger: I started deprecating the module ten months ago. I don't feel like a dick if I don't send them a private email.
16:06 batman I might do it anyway. Haven't decided.
16:06 berov joined #mojo
16:07 jberger I meant specifically if you wanted to drive down the number of dependencies
16:07 jberger oh, but I think I misunderstood your statement
16:07 batman Ok
16:08 absolut_todd joined #mojo
16:20 PryMar56 joined #mojo
16:48 ajr_ joined #mojo
16:50 berov left #mojo
16:52 mattastrophe joined #mojo
17:03 punter joined #mojo
17:08 Grinnz batman, lots of people just put a module up on CPAN and then forget about it, or don't pay attention to its dependencies anymore; it's definitely worth throwing a brief polite email
17:15 jberger yea/nea on the show "Ascension"?
17:15 batman Grinnz: thanks for the push
17:16 batman jberger: the what..?
17:16 lluad jberger: Worth watching, if you've not seen any spoilers. But go in with low expectations.
17:16 jberger lluad: wow, that's quite a set of caveats
17:17 batman :)
17:18 lluad I enjoyed it, but it's deeply flawed. I could hint at some of the reasons why, but that'd be spoilers. And, more than many shows, spoilers will ruin the experience.
17:28 disputin joined #mojo
17:28 jberger lluad: ok, well enough said then
17:29 disputin joined #mojo
17:34 berov1 joined #mojo
17:39 disputin joined #mojo
17:44 batman jberger: what do you think about extending Mojo::Phantom with methods such as phantom_click_ok(), phantom_text_is() ...
17:44 batman seems like a lot of boilerplate to write all those HERE docs all the time :/
17:48 batman jberger: nevermind. i think i got it backwards
17:51 trone joined #mojo
17:54 mattastrophe joined #mojo
18:00 amon joined #mojo
18:05 sri joined #mojo
18:06 y1mmm joined #mojo
18:10 batman jberger: just a heads up... i've added https://raw.githubusercontent.com/conversocial/phantomjs-polyfill/master/bind-polyfill.js since "obj.method.bind(obj)" does not seem to work under phantomjs :/
18:19 jontaylor joined #mojo
18:21 Ptolemarch joined #mojo
18:37 jberger its webkit is too old still?
18:40 gryphon joined #mojo
18:49 PryMar56 joined #mojo
19:02 bin_005 joined #mojo
19:16 stephen joined #mojo
19:19 jberger batman: interesting that MDN gives a polyfill too: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind#Polyfill
19:47 punter joined #mojo
19:55 mattastrophe joined #mojo
20:00 batman jberger: not sure :/
20:05 dod joined #mojo
20:17 eitz Hello, is there any "Apps made with Mojo" list?
20:18 lluad https://github.com/kraih/mojo/wiki/Projects-and-Companies-Using-Mojolicious has some
20:19 * lluad should add his
20:21 sri we also wanted to make a list with user quotes, but perl companies are really shitty about supporting the community :( https://github.com/kraih/mojo/wiki/User-quotes
20:21 * lluad should do a quote too
20:22 sri think few things have demotivated me more than trying to make that list
20:24 eitz Thanks lluad
20:25 Grinnz_ a bit amusing to see Oracle on that list
20:27 jberger sri: our mojo codebase just went live a month or so ago
20:27 jberger I could probably get my boss to write a blurb
20:30 trone joined #mojo
20:32 disputin joined #mojo
20:32 batman jberger: write it yourself and make your boss approve it.
20:33 batman probably easier to get done, unless your boss is really into writing blurb :)
20:33 jberger I suppose so, I'd rather have his name on it since it would be obvious that I like Mojo
20:33 mst write it yourself, make him put his name on it ;)
20:33 Grinnz_ "blah blah blah i like cheese" - boss guy
20:33 jberger mst: that I could probably do
20:34 mst basically, what you do is say "I was tihnking something like" and give him a complete quote
20:34 Grinnz_ heh
20:34 mst a lot of the time people are happy enough just saying "eh, put my name on that, it's close enough"
20:34 dave__ joined #mojo
20:37 lluad Yeah. Almost always works, that.
20:42 * lluad added a quote
20:42 melo joined #mojo
20:44 jberger a craigslist quote would be killer
20:51 sri many quotes have been promised and forgotten
20:51 sri not sure it makes sense to try and keep collecting them
20:51 jberger a quote from my company wouldn't have been truthful until my port of the old codebase went live
20:53 sri also time to make a new post-it note... "do not help anyone connecting through a corporate gateway to irc"
20:54 * sri actually gets very bitter when the topic comes up again... we really should end the quote thing gracefully
20:59 jberger sri: I would say "give it time" personally
21:26 absolut_todd joined #mojo
21:27 sri like who'd counting the years
21:27 sri s/d/s/
21:31 mattastrophe joined #mojo
21:37 dave__ craigslist is using mojo?
21:43 jberger dave__: http://www.meetup.com/San-Francisco-Perl-Mongers/events/223265033/
22:22 dave__ nice
22:23 gryphon joined #mojo
22:36 Ptolemarch joined #mojo
22:47 bpmedley I just want to throw this out there.. I'm working on a new website that will be api driven and I've never had this much fun coding it.  Mojolicious is awesome.  I'm under a NDA, so I can't detail the site specifics.
22:59 hesco joined #mojo
23:08 frederico joined #mojo
23:51 dave__ on a pre-forking server for mojo, can one assume that a websocket connection remains connected to the same process for the life of the connection?
23:53 preaction that meetup is happening in a few hours. do they record?
23:54 jberger preaction: I asked him if they did and he didn't think so
23:54 preaction slides perhaps then?

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