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

IRC log for #mojo, 2015-09-08

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

All times shown according to UTC.

Time Nick Message
00:00 jontaylor joined #mojo
00:10 mattastrophe joined #mojo
00:32 jontaylor joined #mojo
00:32 iloveyou joined #mojo
01:23 sri it feels a bit like the web framework world is standing still
01:23 sri so little new stuff getting developed
01:23 sri some are catching up with websocket features, but that's about it
01:26 bpmedley I wonder what new stuff will be needed with VR.
01:27 jberger sri: solving the websocket routing/reuse problem nicely would be helpful
01:28 sri jberger: not sure that's actually a real problem, i mean we've not even seen a plugin for it yet
01:29 sri the more comprehensive solutions also have a hard dependency on a backend like redis
01:30 sri trying to solve the multiplexing issue between client/server, and the broadcasting issue between servers
01:32 bpmedley I wonder if something like inferno could be used for communication between servers.
01:32 sri what is inferno?
01:32 bpmedley http://www.vitanuova.com/inferno/ <-- Transparent resources
01:32 bpmedley Although, I've never even installed it.
01:32 sri i don't see the connection
01:34 bpmedley I could be confused.  I was assuming you were referring to some type of message passing between servers.  I should have asked for clarification.
01:35 sri any generic pub/sub system would do
01:36 sri how a fringe operating system fits into that is still a mystery to me though
01:36 bpmedley Just a sec.
01:38 sri that's already two minutes
01:47 bpmedley I can only find marketing fluff.  It's been a while since I googled it and I have no experience with the OS.  Hrmm.  I just remember reading that remote resources could be accessed via a protocol called 9P and was transparent to the app.
01:52 mattastrophe joined #mojo
01:56 iloveyou joined #mojo
02:03 noganex_ joined #mojo
02:05 preaction 9P was Plan 9 From Bell Labs
02:05 preaction ah, on which Inferno was based
02:06 jberger I just watched a video featuring Brian Kernigan and he talked about Bell Labs
02:06 jberger man I wish such a place still existed
02:06 jberger I would be there in a heartbeat
02:06 jberger (maybe Elan Musk could found it)
02:11 mattastrophe joined #mojo
02:24 iloveyou joined #mojo
02:33 sri google wants to be bell labs so bad
02:51 iloveyou joined #mojo
03:04 kaare joined #mojo
03:04 jberger the idea of the 20% time is appealing, but its not the same thing
03:13 jberger https://www.youtube.com/watch?v=QFK6RG47bww
03:27 iloveyou joined #mojo
03:29 hshong joined #mojo
03:40 iloveyou joined #mojo
03:42 sri jberger: actually, from what i hear 20% time is mostly dead
03:43 jberger sigh
03:43 jberger well then they get no claim on being Bell Lans
03:43 jberger Labs
03:44 sri seems like they have special teams now, like the Go gophers
03:49 cpan_mojo Mojo-Webqq-1.4.5 by SJDY https://metacpan.org/release/SJDY/Mojo-Webqq-1.4.5
03:52 jberger I always read that PAUSEID as SPDY, I guess 3/4 letters is good enough, and think "why would they implement SPDY rather than HTTP/2?"
03:53 firnsy jberger: you are not alone on that one
03:54 jberger good I'm not going crazy
03:54 jberger or maybe we both are
03:59 Grinnz "going"?
04:00 iloveyou joined #mojo
04:08 sri me too
04:16 mattastrophe joined #mojo
04:26 iloveyou joined #mojo
04:32 sri eeep, now lenovo even preinstalls malware on phones
04:32 sri http://au.idigitaltimes.com/malware-found-pre-installed-xiaomi-huawei-lenovo-phones-107190
04:33 Grinnz lenovo makes phones?!
04:34 sri they did, but they also own motorola now
04:34 Snelius sure
04:34 Snelius lenovo makes good phones
04:34 sri if you don't mind the malware :)
04:35 Snelius sri: motorolla mobile is own by google
04:35 sri Snelius: nope
04:36 Snelius oh, i see
04:36 sri lenovo is doing with motorola now what they did with ibm thinkpads
04:37 Snelius it's a good
04:37 sri at least the next nexus 5 will be made by lg again
04:37 Snelius heh
04:38 sri lenovo is a terrible terrible company http://www.theguardian.com/technology/2015/feb/19/lenovo-accused-compromising-user-security-installing-adware-pcs-superfish
04:39 sri you'd think maybe they learned something from that... but no http://www.theguardian.com/technology/2015/aug/14/lenovo-service-engine-pre-installed-security-superfish
04:40 sri now they even put it into the firmware
04:41 Snelius )
04:41 Snelius but thinkpads is still hot)
04:46 sri is the smiley without eyes a russian thing?
04:50 inokenty-w joined #mojo
04:52 stephen joined #mojo
04:56 jontaylor_ joined #mojo
05:01 Snelius sri: with years in irc you make it more simple. )
05:05 iloveyou batman: I'm using your oauth2 plugin to connect to linked in and getting this error: $c->oauth2->get_token(...) has changed api! Please set 'fix_get_token' in the config arguments to move forward.
05:05 iloveyou Ah, not batman
05:09 iloveyou OK, well, anyone used Mojolicious::Plugin::OAuth2 with LinkedIn? Not really sure what to set for fix_get_token and examples in CPAN documentation don't work.
05:14 pink_mist Snelius: how can you tell if it's a happy or sad smiley without eyes? :) (:   vs   :( ):
05:32 Snelius pink_mist: sad (
05:32 Snelius and yes, i'm still using that (8
05:40 batman iloveyou: doesn't it say you need to set it in the config?
05:41 * batman will make a new release which breaks the current API. Seems like it's less confusing :/
05:42 batman Will = will maybe
05:50 dod joined #mojo
05:56 dod joined #mojo
06:06 jontaylor joined #mojo
06:17 iloveyou yeah, I set it to 1, just wondering what to set it to :D
06:19 iloveyou Question: Does anyone here have an example of authenticating using Mojo::UA? Is it possible, or is this still a use case for WWW::Mechanize?
06:28 batman iloveyou: oh! right.... i really need to fix the documentation. are you around to proof read it in 10-15 minutes?
06:28 Grinnz iloveyou, it depends on the authentication method... mostly it shoudl be doable fine with Mojo::UA
06:30 batman marcus: is it ok if i remove the whole "fix_get_token" hack? we released it 2015-03-18
06:59 AndrewIsh joined #mojo
07:00 batman marcus: what do you think? https://github.com/marcusramberg/Mojolicious-Plugin-OAuth2/compare/1.52...master
07:16 iloveyou @batman, sure!
07:16 iloveyou Sorry man, been a bit busy
07:16 batman iloveyou: sorry. i decided to go another way. you can have a look at the diff above if you like.
07:16 eseyman joined #mojo
07:16 batman if marcus is on board, i will make a release
07:17 iloveyou Ah, awesome, you removed the fix_get_token stuff then?
07:17 batman that is what i'm trying to do :)
07:19 damaya joined #mojo
07:20 damaya Also, another question: if do a `my $json = $ua->get($url)->res->json;` and I want to add to it, e.g., $json->{more_data} = $ua->get($url2)->res->json;` what's the best way to do this?
07:20 Vandal joined #mojo
07:20 damaya JSON linter is complaining about multiple root elements, so the way I said in my example doesn't work.
07:20 trone joined #mojo
07:21 marcus batman: I'm fine with that.
07:21 batman sweet! :)
07:22 Grinnz damaya, why wouldn't it? $json is a perl data structure, not JSON
07:26 damaya weird, it'd seem it would :/
07:27 Grinnz what are you passing to the linter?
07:28 damaya Haha, nevermind. I was using >> to output to an already existing file rather than > and creating a new file.
07:29 Grinnz heh
07:29 cpan_mojo Mojolicious-Plugin-OAuth2-1.53 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-OAuth2-1.53
07:32 damaya ok, quick question before I proceed with this though... will I be able to easily read in a single file with multiple json objects?
07:32 Grinnz no, the decode_json method expects a single top-level item
07:33 batman damaya: why do you even have multiple docs in one file..?
07:33 Grinnz a top level object that contains multiple sub objects would work fine though
07:33 batman damaya: you could in theory split it on ex newline and then decode each document, but that only works if one document is actually one line of course
07:33 damaya Ah, the data structure would get far too big (I think) if I pushed responses to a single hashref (there's ~2million of them, each containing a lot of data).
07:33 damaya I could create a new document for each one...
07:34 damaya hehe
07:34 batman that sounds like an awful design, but it's hard to say without knowing the reason behind it.
07:34 damaya I also don't want to create this huge top level object then have my script crash before dumping the entire thing out to a file
07:35 damaya I don't want a database. I just want to save the ~2 million json responses and load them in later to migrate to a database or something
07:35 Grinnz damaya, if you use Mojo::JSON::MaybeXS it will encode and decode a JSON object of that size much quicker
07:36 batman are you sure you can't use pagination? like https://www.cloudflare.com/docs/client-api.html#s3.3
07:36 damaya OK, so push responses, then print the end result at end?
07:37 damaya This is a API lookup for a company, with 2 million companies to do, each returning JSON.
07:37 damaya each lookup I should say
07:37 damaya So, Apple, Oracle, Dell, etc.
07:37 mishanti1 Grinnz: We startet using CPanel::Json::XS a while back for performance reasons  (over mojos built in one). Any idea how Mojo::JSON::MaybeXS compares?
07:38 damaya Ah well, my drive is ext4, so realistically I can hold 2 million files in a directory
07:38 damaya lol
07:38 Grinnz mishanti1, it essentially replaces Mojo::JSON with that, via JSON::MaybeXS
07:39 ashimema Mojo::JSON::MaybeXS just uses JSON::MaybeEX to do a fallback tree for installed JSON modules..
07:39 Grinnz the mappings are all set up at compiletime so there's no real runtime performance impact
07:39 ashimema Cpanel::JSON::XS is used in preference if installed ;)
07:39 ashimema then JSON::XS and finally JSON::PP
07:40 ashimema having said that.. I'm currently having issues with it.. for some reason it's not finding my cpanel::json::xs install (Which is inside my carton local dir)
07:41 ashimema still trying to work that one out ;)
07:41 Grinnz ashimema, is JSON::XS being loaded by something? (if either Cpanel::JSON::XS or JSON::XS is in %INC already it will use that)
07:41 ashimema hmm.
07:41 ashimema possibly..
07:42 Grinnz i solve that sometimes by explicitly loading Cpanel::JSON::XS first
07:42 ashimema that may be the reason on my dev machine.. but in a fresh install it's falling all the way back to JSON::PP
07:42 Grinnz ok, that shouldn't happen unless it has no compiler
07:42 ashimema hmm
07:43 bpmedley https://github.com/brianmed/Todo/tree/master <-- Here is an iOS app written in Xamarin with a Mojolicious backend.  Both the frontend and the backend code is included.  I'll add more to the readme at a later date.
07:46 jontaylor_ joined #mojo
07:46 ashimema hmm
07:47 ashimema my @INC looks correct to me :(
07:47 ashimema and I can't see anything loading JSON::XS directly.
07:48 Grinnz %INC is where you'd see if it's been loaded, check if $INC{'JSON/XS.pm'} exists
07:54 ashimema hmm.. at what point are Mojo plugins loaded..
07:55 Grinnz whenever plugin() is called
07:55 ashimema wondering if Mojo::Log::JSON is the culprit.. it loads JSON::PP
07:55 ashimema though I may change that ;)
07:55 ashimema so in theory.. after JSON::MaybeXS has loaded :(
07:56 ashimema perhaps not that then
07:57 henq joined #mojo
08:17 damaya joined #mojo
09:11 meshl joined #mojo
09:14 akhasanov joined #mojo
09:23 henq joined #mojo
09:25 jontaylor joined #mojo
09:30 henq_ joined #mojo
09:49 henq joined #mojo
10:08 henq_ joined #mojo
10:16 Adurah joined #mojo
10:18 henq_ joined #mojo
11:10 mattastrophe joined #mojo
11:20 brrt joined #mojo
11:44 neilhwatson joined #mojo
12:02 dod joined #mojo
12:21 damaya joined #mojo
12:26 brrt joined #mojo
12:48 PryMar56 joined #mojo
13:15 ajr_ joined #mojo
13:19 jontaylor joined #mojo
13:19 cstamas joined #mojo
13:20 hernanGOA joined #mojo
13:32 damaya joined #mojo
13:49 CromeDome joined #mojo
13:56 mattastrophe joined #mojo
13:57 damaya joined #mojo
14:00 mattastrophe_ joined #mojo
14:01 jontaylor joined #mojo
14:04 gryphon joined #mojo
14:05 Ptolemarch joined #mojo
14:13 PopeFelix joined #mojo
14:18 cpan_mojo Mojo-Log-JSON-0.04 by MJEMMESON https://metacpan.org/release/MJEMMESON/Mojo-Log-JSON-0.04
14:28 jontaylor joined #mojo
14:29 ashimema that's service for you ;)
14:30 michael :)
14:32 neilhwatson joined #mojo
14:32 jontaylor joined #mojo
14:33 damaya joined #mojo
14:33 ashimema cheers
14:46 mattastrophe joined #mojo
14:46 mattastrophe_ joined #mojo
14:49 PopeF joined #mojo
14:54 cpan_mojo BenchmarkAnything-Storage-Frontend-HTTP-0.002 by SCHWIGON https://metacpan.org/release/SCHWIGON/BenchmarkAnything-Storage-Frontend-HTTP-0.002
14:55 zackiv31 joined #mojo
15:08 fred joined #mojo
15:19 tencendur joined #mojo
15:33 Ptolemarch joined #mojo
15:37 damaya joined #mojo
15:39 illywhacker joined #mojo
15:45 plicease joined #mojo
15:48 jontaylor joined #mojo
15:58 sh4 joined #mojo
16:01 mattastrophe joined #mojo
16:02 mattastrophe_ joined #mojo
16:34 bc547 joined #mojo
16:39 jontaylor joined #mojo
16:56 akhasanov joined #mojo
17:00 akhasanov joined #mojo
17:01 nicomen what am I doing wrong if my non-blocking usage of Mojo::UserAgent leads to it printing the content to STDOUT?
17:02 pink_mist dunno. what are you /doing/?
17:02 pink_mist it's hard to find out what you're doing wrong if we don't know what you're doing in the first place :P
17:03 nicomen you are right
17:05 Ptolemarch joined #mojo
17:06 berov left #mojo
17:09 jontaylor joined #mojo
17:11 genio http://thenextweb.com/insider/2015/09/07/this-hilarious-cisco-fail-is-a-network-engineers-worst-nightmare/  heh
17:18 asm35 joined #mojo
17:24 PopeFelix https://github.com/PopeFelix/Mojolicious-Quick - It generates a Mojolicious app inside a single scalar. What would a better name for this be, if any?  I named it ::Quick because you quickly get an app out of it, but maybe that's not the best name.
17:26 Grinnz Mojolicious::Anonymous?
17:28 nicomen tiny?
17:35 PopeFelix Grinnz: Mojolicious::Anyonymous sounds like a 12-step program for Mojolicious addicts.
17:36 PopeFelix "I'm Kit, and I'm a Mojolicious addict.  It's been two months since my last Mojo app.  Today, I coded a Dancer app."
17:37 PopeFelix nicomen, Tiny is overused.  Hard to distinguish it from Lite.
17:37 Grinnz haha
17:37 PopeFelix Of course, so is Quick.
17:38 pink_mist just don't name it ::Simple
17:39 PopeFelix So the things it does: puts an app into a single scalar, and optionally rewrites URLs to originate from localhost, so you can do $app->ua->get('http://foo.bar.baz/bak') and have what actually happens is $app->ua->get('/bak')
17:39 PopeFelix And Mojolicious::SingleScalarThatAlsoRewritesURLs is probably too literal.
17:40 disputin joined #mojo
17:40 nicomen perhaps ::Scalar, after all, that's what you describe it as ;-)
17:41 lluad Mojolicious::InOneVariable? My first thought was Mojolicious::IOS, as a riff on SIOD, but that so has the wrong implications.
17:41 Myk267 joined #mojo
17:41 PopeFelix lluad, right.  I don't know why you'd want to run Mojo on IOS, save "because it's there", but... :)
17:42 PopeFelix Though I don't know. Maybe you would want to use Mojo as a backend for your IOS app. :)
18:04 berov1 joined #mojo
18:16 akhasanov joined #mojo
18:17 jontaylor joined #mojo
18:20 mattastrophe joined #mojo
18:20 Kundun joined #mojo
18:23 meshl joined #mojo
18:26 zackiv31 joined #mojo
18:27 jberger PopeFelix: Seems odd to talk about the verbs as the outermost loop
18:31 akhasanov joined #mojo
18:36 Myk267 joined #mojo
18:45 dod joined #mojo
18:54 disputin joined #mojo
19:01 zackiv31 joined #mojo
19:20 akhasanov joined #mojo
19:56 akhasanov joined #mojo
20:05 PopeFelix Sorry, ran off to lunch and the DMV, and that took a while.
20:06 genio so, node went and updated from 0.12.7 all the way to 4.0.0
20:06 PopeFelix jberger, I don't follow you.  "Verbs as the outermost loop"?
20:07 jberger GET => [ route1, route2], POST => [ route1, route3 ], ...
20:08 jberger often since a route maps to a resource one normally thinks in terms of route1 => [GET, POST], route2 => [GET], route3 => [POST]
20:10 PopeFelix Oh, I see.
20:10 PopeFelix Hm.
20:12 PopeFelix Well, I don't suppose there's a reason I couldn't do it the other way.  That was just the syntax that occurred to me.
20:13 PopeFelix Really, I could probably finagle it to do both.
20:24 meshl joined #mojo
20:46 juikuen joined #mojo
21:00 kaare joined #mojo
21:10 jontaylor joined #mojo
21:15 juikuen joined #mojo
21:54 asm35 joined #mojo
22:20 disputin joined #mojo
22:47 bpmedley https://github.com/brianmed/Todo <-- Anyone happen to take a gander at this?
23:01 PopeFelix I just did.  OK, someone *did* use Mojo as a backend on IOS.
23:01 PopeFelix I'll be.
23:01 Grinnz_ heh
23:02 bpmedley PopeFelix: Thanks for looking.  I really like using Mojo as the backend.
23:03 PopeFelix bpmedley, you didn't want to query your DB directly?  Seems like adding Mojo in added a layer of abstraction you didn't need.
23:03 PopeFelix Unless this thing talks to a web backend somewhere.
23:04 preaction querying a DB directly ends up with all kinds of problems, not the least of which is you are stuck in a DB forever
23:04 PopeFelix preaction, good point.
23:04 bpmedley PopeFelix: Right.  My iOS device is the view, the model is postgres, and the controller is mojo.  I think that's right.
23:05 bpmedley I wanted a layer between iOS ListViews and the database for authentication and other business logic.
23:05 PopeFelix bpmedley, MVC is a metaphor.  How you apply it is up to you, for the most part. :)
23:05 Grinnz_ well, the difference is whether this DB is local to the application (obviously not in this case, if it's postgres) or on a server somewhere
23:16 bpmedley Thx for looking
23:16 PopeFelix certainly.
23:26 mattastrophe joined #mojo
23:53 da5id joined #mojo

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