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

IRC log for #mojo, 2015-01-06

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

All times shown according to UTC.

Time Nick Message
00:01 marty joined #mojo
00:02 ajr_ joined #mojo
00:03 sugar_ joined #mojo
00:09 sugar__ joined #mojo
00:31 punter joined #mojo
00:34 sri muhahahaha... the laptop for all of you who have been complaining about the new ibm keyboards ;p http://www.theverge.com/2015/1/5/7495073/msi-mechanical-keyboard-gt80-titan-laptop-ces
00:37 tianon :D
00:38 tianon I love that the trackpad is dual-purposed as a numpad
00:49 zackiv31 joined #mojo
01:01 zivester joined #mojo
01:05 Grinnz mechanical keyboard... laptop?!
01:05 Grinnz 18.4" screen jesus fuck
01:05 Grinnz 15.6" is the max i'll go, after that its just a cramped desktop
01:42 tempire ooo
01:42 tempire sparkles
01:42 tempire LETS GO TO NEW YORK CITY
01:42 tempire There's plenty of dance venues.
01:42 tempire And pizza.
01:42 tempire I hear they even have the internet.
01:42 tempire now
02:38 damaya joined #mojo
02:45 klapperl joined #mojo
02:55 jberger eh, the internet is overrated
03:16 sri get off my lawn
03:17 jberger I can't believe that purl doesn't have a quote for "get off my lawn"
03:17 jberger purl: get off my lawn is <reply>darned kids!
03:17 purl OK, jberger.
03:18 sri get off my lawn
03:18 sri get off my lawn!
03:18 * jberger sigh
03:18 * sri pokes purl
03:18 * purl hits sri onna nose widda stick.
03:18 sri :O
03:18 jberger hahaha
03:19 jberger oh, damn, its expanding "my"
03:19 * jberger tries to find purl's manual again
03:21 jberger get off jberger's lawn
03:21 purl darned kids!
03:21 jberger hahahaha
03:21 purl LOLCON 4 reached.
03:23 Grinnz rofl
03:36 noganex_ joined #mojo
03:40 fhelmberger joined #mojo
04:00 damaya joined #mojo
04:37 damaya joined #mojo
04:48 hshong joined #mojo
04:51 diegok joined #mojo
04:59 jegade joined #mojo
05:30 asarch joined #mojo
05:30 Eke- joined #mojo
05:32 asarch Why www.w3.org doesn't use https?
06:04 rem_lex joined #mojo
06:19 dotandimet joined #mojo
06:43 dod joined #mojo
06:48 dod joined #mojo
07:10 rem_lex joined #mojo
07:17 alnewkirk joined #mojo
07:24 shorty_mu joined #mojo
07:37 dod joined #mojo
08:05 eseyman joined #mojo
08:08 batman ashimema: why should it?
08:13 dotan purl: wat
08:13 purl Watt?  Watt?  I can't hear you, there's this buzzing noise where my brain should be. or https://www.destroyallsoftware.com/talks/wat
08:19 Vandal joined #mojo
08:20 irq joined #mojo
08:44 Lee joined #mojo
09:12 ashimema batman.. why should what what?
09:12 ashimema I'm confused
09:26 amon joined #mojo
09:27 batman ashimema: why w3.org should use https
09:41 ashimema ahh.. asarch commented that..
09:41 ashimema no wonder I was confused
09:48 batman ashimema: ah! sorry. bad autocomplete :(
09:48 batman i meant asarch :/
10:24 trone joined #mojo
10:25 Eke- joined #mojo
10:42 basiliscos joined #mojo
10:47 Dandre joined #mojo
10:47 denis_boyun joined #mojo
11:11 batman is it ok if a plugin holds a reference back to the $app ?
11:18 Eddy joined #mojo
11:18 Eddy joined #mojo
11:24 damaya joined #mojo
11:40 irq_ joined #mojo
11:59 nathanael joined #mojo
12:17 dotandimet joined #mojo
12:30 dotandimet1 joined #mojo
12:39 jberger batman: if you are worried, you could hold a weak reference
12:40 batman ah. that's right :)
12:40 batman thanks
12:40 jberger batman: also, you can often extract it from the controller if you'd rather
12:41 batman yeah... didn't want to do it in this case
12:41 batman but i think i've managed to get around it anyway
12:55 batman anyone using assetpack? Could you review this pull request i just made? https://github.com/jhthorsen/mojolicious-plugin-assetpack/pull/35
12:57 dotandimet joined #mojo
13:02 dotandimet joined #mojo
13:07 punter joined #mojo
13:14 neilhwatson joined #mojo
13:24 Insane joined #mojo
13:26 trone_ joined #mojo
13:29 basiliscos joined #mojo
13:29 irq_ joined #mojo
13:42 denis_boyun_ joined #mojo
13:51 marty joined #mojo
13:54 asarch joined #mojo
14:08 zivester joined #mojo
14:18 genio oh, for the love of... Microsoft's merge is about the most fucked up attempt at a half-assed upsert I've ever seen.
15:02 Insane joined #mojo
15:16 basiliscos joined #mojo
15:52 Vandal joined #mojo
15:56 Ptolemarch joined #mojo
16:10 marcus Seems like a very good change to me, batman
16:24 Insane joined #mojo
16:28 lwarstone joined #mojo
16:30 lwarstone1 joined #mojo
16:30 lwarstone1 left #mojo
16:31 lwarstone1 joined #mojo
16:31 lwarstone1 Finally...
16:31 lwarstone1 Hello all.
16:31 purl i guess finally is a scope guard anyway, might as well use a regular guard
16:31 purl It's a crazy world, but hello to you too!
16:34 lwarstone1 I need some help with mojo.
16:34 lwarstone1 I've got route (via routes) but when i get it - mojo says that can't find it/ Where I can find some additional info - why mojo can't find it?
16:36 Grinnz lwarstone1, the default not_found template should list the routes it sees
16:36 lwarstone1 And it sees it
16:36 Grinnz the logger should log debug info for the controller it calls
16:36 Grinnz if anyy
16:36 Grinnz -y
16:36 lwarstone1 http://clip2net.com/s/39Znt0j
16:37 Grinnz could be other reasons, like doesn't find the controller action
16:39 sri Grinnz: he's using a very very old version of mojolicious
16:40 basiliscos joined #mojo
16:42 sri hahahaha
16:42 purl LOLCON 4 reached.
16:43 sri the message that told me that screenshot was old actually changed exactly one year ago :D
16:43 sri https://github.com/kraih/mojo/commit/b15adc31b5da097a34e90d03dd3a18475b57d7e3
16:43 Grinnz heh
16:44 lwarstone1 Yes (( It's true. This is default for Ubuntu 14.04
16:44 sri nobody is going to support that
16:46 lwarstone1 BTW: error was in wrong namespace. Tnx to all ))
16:46 lwarstone1 And I need to think about perlbrew...
16:46 Grinnz at least local::lib so you have an up to date mojo
16:47 Grinnz or Perl::Build
16:47 purl Perl::Build is the build logic of perlbrew
16:47 sri or just perlbrew
16:47 Grinnz "just" :)
16:48 lwarstone1 Even Perl is 5.18, not 5.20... (BTW: When there will be perl 5.22? There some cool speedups)
16:48 Grinnz fedora 21 still has 5.18 too... it's strange
16:49 Grinnz 5.20 was definitely out before 21
16:49 Grinnz f21 that is
16:50 * sri wont recommend any of the perlbrew alternatives until they are a) shipping with perl, or b) have a neat website with simple installation instructions http://perlbrew.pl/
16:51 Grinnz i just don't like the messing with my env vars
17:01 Insane joined #mojo
17:01 jberger Perl::Build is ok, but I still prefer perlbrew+local::lib+cpanm, its so seemless
17:04 lwarstone1 Why mojo dosn't use code attributes, like Catalyst??
17:05 lwarstone1 smth like: sub create :Route('login') mojo_name('auths_create') method('get') {
17:05 * sri didn't like attributes anymore
17:06 lwarstone1 Why?
17:07 sri attributes are horribly implemented in perl, routes have become a standard across languages, and i think they look better
17:08 sri i wouldn't use attributes for anything anymore these days
17:09 lwarstone1 Where I can read more about attributes implementation? I just think that it's cool thing that brings metaprogramming in perl.
17:11 lwarstone1 I've done it in my controller and it feels good for me. So, if there some hidden problems - I'd like to know more about it.
17:14 Ptolemarch joined #mojo
17:21 batman marcus: cool! then i feel more confident _and_ i have someone to blame ;-)
17:22 * batman is also adding browserify as core functionality to assetpack
17:28 punter joined #mojo
17:32 Insane joined #mojo
17:54 jberger lwarstone1: also remember that attributes are going to be even clunkier when used with signatures
17:57 asarch Guten tag!
17:57 asarch Wie geht's?
17:57 purl Wie geht's is what the germans say
18:01 denis_boyun joined #mojo
18:03 jberger sri: is there any built-in handling for Authorization header in the request?
18:03 jberger or do I have to parse out the header myself?
18:14 Ptolemarch joined #mojo
18:21 genio tempire made Mojolicious::Plugin::BasicAuth
18:24 jberger eh, easy enough to do by hand
18:24 Insane joined #mojo
18:26 dod joined #mojo
18:33 Ptolemarch joined #mojo
18:36 stephan48 jberger: steal his code!
18:38 jberger the spec is simple, don't even need to
18:38 jberger my bigger problem now is that I'm not able to make basic auth requests using the get command like I would expect to
18:49 tempire jberger: why not?
18:49 tempire That's kind of the purpose of basic auth
18:51 Ptolemarch joined #mojo
18:55 mst I think he means 'mojo get isn't doing what I expected'
18:56 mst I'd note that Web::Simple's build-in GET command has explicit code to support 'foo:bar@' URLs
18:56 mst so I think it's probably something that requiress code
18:56 mst unless of course he's construction his own Authorziation header, in which it's merely a question of "you did something wrong, somehwere" :)
18:58 jberger the problem is that if I try to do: ./app.pl get http://user:pass@/ it doesn't use the app's port, it uses 80
18:59 jberger which it then refuses
18:59 mst maybe you needed 'user:pass@localhost:5000/...' or whatever?
18:59 mst the defaulting may be in the wrong order, as it were
19:00 jberger it works if I know the port, but the get command uses a random port
19:00 jberger so I can start my app and then use another mojo get localhost:3000/
19:00 jberger so I can start my app and then use another mojo get user:pass@localhost:3000/
19:01 mst oh, right
19:02 mst so, my suspicion is, that because it sees *something* in the 'before the path' section
19:02 mst it's assuming you've given it all of it
19:02 jberger mst: yeah, I've tinkered, I'm now trying to MAKE it work but hacking in the get command
19:02 jberger we'll see what that does (if anything)
19:02 asarch How is better? /mycontroller?foo=bar or just /mycontroller?bar
19:03 mst foo=bar because query parameters are generally easier to work with than query keywords
19:03 mst jberger: if the bug turns out to be something other than my guess, I'll be curious to hear what it was :)
19:03 asarch Thank you :-)
19:04 mst though remember that you shouldn't be using that for e.g. ids
19:04 mst /users?id=3 is icky, you wanted /users/id/3 or similar instead
19:05 jberger mst: I'm sure you are right at least to some amount
19:07 jberger aha!
19:07 jberger //user:pass@/ works
19:08 jberger had to grok the url parse regex, then it was easy
19:13 Ptolemarch joined #mojo
19:25 sri lol
19:25 sri jberger: accidental feature
19:25 asarch I visit /packages and in that list I pick any of them so I am redirected to /packages/foo/details, but since foo is a big big package it takes a while to show the results. How can I show a "loading" animation in between?
19:25 sri i like it though
19:26 asarch That kind of animations is JavaScript, right?
19:31 sri jberger: actually, that might work because of a bug
19:32 asarch How can you use the + sign in a GET value? For example: /list?dish=chocolate+banana+icecream
19:32 sri $url->authority('sri:s3cret@localhost')->authority('localhost:3000') doesn't clear userinfo
19:33 sri jberger: so, i guess i'm breaking your feature :/
19:34 sri it's actually the same with the port
19:36 asarch Bingo! my $dish = $self->param('dish'); $dish =~ s/ /+/g;
19:38 marty joined #mojo
19:40 KCL_ joined #mojo
19:45 sri hmmm... on the other hand, nothing in Mojo::URL actually clears the previous values
19:45 sri it's all undefined behavior
19:45 sri not clearing is a lot better for performance
19:46 Insane joined #mojo
19:49 basiliscos joined #mojo
19:55 sri i guess we can safely make it a feature
19:56 sri *if* we decide we want to clear previous values before parsing that works too, just need to adjust the Mojo::UserAgent code too that merged host_port into relative URLs
19:57 Ptolemarch joined #mojo
19:57 good_news_everyon joined #mojo
19:57 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/aSNJyg
19:57 good_news_everyon mojo/master 4256b8d Sebastian Riedel: relative URLs with userinfo are a feature
19:57 good_news_everyon left #mojo
19:59 * sri shakes jberger
20:14 sri hmm, if those rumors about the retina macbook air are true my next laptop might not be an apple :o
20:20 dotandimet joined #mojo
20:20 batman sri: "not be an apple"..? why not?
20:21 sri look at it! http://www.theverge.com/2015/1/6/7504141/apple-macbook-air-12-inch-redesign-rumor
20:21 sri no ports and off button next to escape?!
20:22 tianon hahaha, remove all useful ports so we can save a few millimeters; what could possibly go wrong?
20:22 tianon kings of the proprietary $20+ adapter
20:22 sri MAKE IT THINNER!
20:22 jberger sri++
20:22 jberger sorry I was at lunch
20:22 jberger mmmmm udon
20:23 batman oh. crazy... i guess some things was better before: thinkpad and macbook :)
20:24 jberger the MBP off button is already too close to the rest of the keyboard
20:42 mst I <3 my Thinkpad Tablet 2
20:45 genio my MBP makes me happy!  macmini at work, too.  YAY
20:46 genio MB airs are just too small
20:47 mst I honestly prefer windows+cygwin to OS X for a client machine
20:47 mst (note that I wouldn't attempt to do development on either, generally)
20:47 genio homebrew, perlbrew, atom.io, and my mac make me happy
20:50 mst I have an fvwm2+xterm dev setup that I've never been able to recreate any other way
20:55 firnsy http://paste.fedoraproject.org/166496/42057754/ ... is it possible to use nested helpers in templates?
20:56 juikuen joined #mojo
21:01 damaya joined #mojo
21:05 Martin90 joined #mojo
21:05 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Adding-helpers
21:06 Martin90 Mojo love postgreSQL more than MySQL right ? ;)
21:06 Ptolemarch joined #mojo
21:06 sri right
21:07 Martin90 what features of postgresql over mysql ?
21:07 Martin90 I am bout to decide
21:07 Martin90 I have db arch. in mysql but postgresql looks attractive
21:08 sri postgresql makes sense
21:08 batman Martin90: anyone who have used both love pg more than mysql :)
21:08 Martin90 ohh it doesn't say much sri ;)
21:08 batman unless they started out with mysql and couldn't get used to pg
21:09 Martin90 batman, that;s what I noticed to, now wonder why ;)
21:09 batman i always get amazed with how much functionality there is in postgres
21:10 Martin90 true, but I value performance more in this case ;)
21:10 batman is mysql faster than postgres?
21:11 firnsy sri: my feeble mind is unable to find nested helper usage in that link you posted :(
21:11 sri things i love are transactional ddl (makes usable migrations possible), native json, native arrays, very spec compliant sql, pub/sub... and and and
21:11 batman i mean... you would probably have tons of data flowing through your db to notice
21:11 batman how large is this site??
21:11 Martin90 I haven't tested yet
21:11 firnsy hmm ... "Similar to stash values you can use a prefix like myapp.* to keep helpers from getting exposed in templates..."
21:12 sri try doing this backend in mysql *without* any dynamically generated sql https://github.com/kraih/minion/blob/master/lib/Minion/Backend/Pg.pm
21:12 sri i love small things like this
21:13 sri $db->query("delete from minion_workers where id = any (?)", \@dead)
21:13 batman Martin90: the pg schema is in the bottom of that file ^^
21:13 sri unknown number of values? no problem, use an array!
21:13 Martin90 you can make a wrapper around mysql but I see it
21:13 batman Martin90: uhm... you can make a what??
21:14 batman even if you can... do you get how weird that sounds?
21:14 batman and where does your performance go with a wrapper?
21:14 Martin90 no doubt about it ;)
21:15 sri if all you care about is performance, why bother with sql?
21:15 sri seems silly
21:15 Martin90 need relational db
21:16 Martin90 any plans to make something for redis db ?
21:16 lestrrat joined #mojo
21:19 jberger firnsy: helper 'security.check_password' => sub { ... }; ... $c->security->check_password($pass)
21:19 jberger I love nested helpers so much
21:21 firnsy jberger: using nested in the controller is not my issue, in the template is where i'm struggling
21:21 firnsy ... i think the prefix is hiding it from the template though
21:22 firnsy at least that's what i am getting from the sri's link earlier
21:22 jberger firnsy: thats the point
21:22 jberger if you need it, you can always use $c in your template
21:22 firnsy ugghh
21:22 jberger %= $c->nested->helper('thingy')
21:22 * firnsy *facepalms*
21:23 jberger you can use a . in stash keys to keep them from being variables in your template too btw
21:23 jberger (actually any character that would make the variable an invalid symbol(
21:23 jberger ))
21:23 jberger # OCD
21:25 firnsy jberger: yeah that provided me with why i couldn't see them, but the $c access in templates was the clincher
21:25 firnsy sri++, jberge++
21:26 * firnsy <3 MOJO 4 EVA
21:26 jberger sri: yay, I got my authenticated JSON API working via the get command!
21:26 jberger <3 MOJO 4 .... ALL GLORY TO THE HYPNOTOAD!!!!!
21:29 good_news_everyon joined #mojo
21:29 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/TROnvQ
21:29 good_news_everyon mojo/master 766a1a8 Sebastian Riedel: be more specific about how helpers are exposed in templates
21:29 good_news_everyon left #mojo
21:29 sri \o/
21:32 firnsy sri++ # doc improvements
21:33 jberger sri: I'm not sure about that wording
21:33 jberger does the top-level helper (the prefix) get exposed in a template?
21:34 sri no
21:34 jberger perl -Mojo -E 'helper("nested.thing" => sub { "hi" }); a("/" => { inline => q[%= nested->thing] })->start' get /
21:34 jberger right
21:34 jberger perl -Mojo -E 'helper("nested.thing" => sub { "hi" }); a("/" => { inline => q[%= $c->nested->thing] })->start' get /  #works
21:35 jberger so "Every prefix automatically becomes a +helper that returns a proxy object ..." doesn't seem exactly right
21:37 sri close enough for me
21:39 jberger ok
21:39 jberger I'm not too fussed
21:39 sri i don't see you come up with a better sentence
21:42 * jberger has been trying ... without much success
21:42 jberger its fine, I relent
21:42 jberger sri: the previous sentance explains it
21:44 good_news_everyon joined #mojo
21:44 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/oO4CYg
21:44 good_news_everyon mojo/master c39a167 Sebastian Riedel: another get command example
21:44 good_news_everyon left #mojo
21:58 Ptolemarch joined #mojo
22:05 denis_boyun joined #mojo
22:07 dotandimet joined #mojo
22:17 lwarstone joined #mojo
22:26 linagee joined #mojo
22:34 absolut_todd joined #mojo
22:34 davido___ joined #mojo
22:35 disputin joined #mojo
22:39 tempire WOO
22:39 tempire First step of ::Delay ported to swift.
22:40 sri http://www.troll.me/images/doggedly-skeptical/doggedly-skeptical.jpg
22:43 jberger is swift still a thing?
22:43 tempire Swift is the only thing
22:47 jberger haha, there is another language called swift
22:47 jberger silly apple
22:50 disputin joined #mojo
22:50 tempire I'm not sure you can call the overwhelming power of Apple silly. They just had to say "swift", and they relegated the parallel processing language to be a footnote forever.
22:50 tempire "It's cute that you named that something we would think of one day"
22:54 jberger I'm not sure that that is a good thing
22:54 sri tempire forgot the sarcasm tag
22:55 tempire I make iPhone apps. "good" is relative.
22:55 tempire <halfsarcasm />
22:56 sri "at least it's not objective-c"
22:56 tempire Indeed. That's why swift is the only thing.
22:56 tempire I knew I had a problem when I began to be comfortable looking at objc
22:58 sri it's really sad android requires java
22:58 tempire For sure.
22:58 purl like totally!
22:59 Grinnz http://www.elandroidelibre.com/wp-content/uploads/2012/03/android-sad.png
22:59 tempire I think about making some android apps every couple of days
22:59 tempire But I just can't.
22:59 sri at least the web integration in lollipop rocks
23:42 linagee tempire: why not?
23:46 tempire 1) I can't use eclipse. I get angry when I open it, it's just so ugly. The new android dev env may be better, I don't know.
23:48 sri tempire: you no longer use eclipse, but intellij ;p
23:49 tempire 2) The android team(s) have shown a complete disregard for making good tools since the beginning. Though the new ide has changed, I doubt the fundamental priorities have changed.
23:49 sri (it's not much better)
23:49 tempire If #2 changes, it will show over time, and I'll become a developer.
23:49 tempire Actually, windows phone apps seem the most interesting.
23:50 tempire The constructs that .net provides are pretty nifty, and you can make one app for all the windows platforms.
23:50 sri bit ironic how xamarin looks like the best way to build android apps
23:51 tempire I'm hoping ionic becomes a thing.
23:51 tempire Or if some company does with swift what xamarin did with .net. I'd be cool with that too.
23:52 mudler joined #mojo
23:53 linagee tempire: ??? Ionic is already a thing. :)
23:54 linagee tempire: **especially** after I get my plugin up and going. :)
23:54 linagee tempire: https://github.com/linagee/cordova-androidpublisher
23:54 tempire A thing, sure. But *the* thing.
23:54 linagee will be working on it later tonight, PRs are welcome if you fix things for me! :)
23:55 tempire 'cause appcelerator is a thing, too. But when you try to really make something, it's a mess.
23:55 tempire You spend just as much time with each platform as you would just natively developing the platform.
23:55 tempire *on the platform
23:55 linagee tempire: ionic/cordova will be *the* thing. Adobe is behind it. I'm going to make it very nice for uploading your APK.... what more do you want??? :)
23:56 tempire I want seamless matching of UI controls
23:56 sri adobe is behind flash too
23:56 linagee Well, surely it will fit a niche for "lets make a thing that does X". (Where X is not a game.)
23:56 tempire I don't want to deal with, "it kind of looks the same".
23:56 linagee sri: I think Adobe knows that flash is dead-ish.
23:56 tempire Which is what sencha and appcelerator and all the others were
23:56 tempire looks/works
23:56 linagee tempire: ionic has gone to a LOT of trouble to ensure that. its crazy. they're doing "the bounce thingy" on ios.
23:57 linagee I don't think appcelerator does that.
23:58 linagee tempire: surely native has a lot of advantages. but ionic/cordova does too. you don't need to learn 3 different langauges just to do Android/iOS/Windows. (ionic will eventually support Windows, they're getting there.)
23:58 * tempire secretly hopes android dies and windows phone takes its place
23:58 linagee eww.
23:58 linagee I hope the opposite. >:-(
23:58 tempire Windows phone is by far the nicest design.
23:59 tempire Both of the other platforms have been slowly getting closer to them for years
23:59 linagee Android is by far the most open OS. (even if large parts are proprietary still.)
23:59 tempire I'm not concerned about open if it's also ugly, to be honest.
23:59 linagee that's... concerning if large groups of people agree.
23:59 tempire I know that's not popular in the Perl community. Maybe a little more so in #mojo

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