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

IRC log for #mojo, 2015-01-15

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

All times shown according to UTC.

Time Nick Message
00:37 neyasov joined #mojo
00:51 disputin joined #mojo
00:55 Ptolemarch joined #mojo
01:05 sri oh, nice article about postgres queues http://johtopg.blogspot.de/2015/01/queues-queues-they-all-fall-down.html
01:07 muraiki_ joined #mojo
01:09 jberger Grinnz_: I always set the mode by env var now
01:09 jberger sri: I can take a look, hopefully tonight
01:10 Grinnz yeah, and i could certainly see env var being an accepted way to set it for commands, since they are supposed to always be from a shell :P
01:10 jberger the command system is a part of mojo that I'm really selling to new users lately
01:10 Grinnz being the accepted way, rather
01:11 jberger Grinnz: at this point it's really the only way that works for everything
01:11 Grinnz jberger, in my case, outside of Test::Mojo files, a command is used for everything
01:12 jberger btw I've started reworking my mojolicious talk to use reveal js rather than my home built presentation app
01:12 jberger Grinnz++ # nice work
01:12 Grinnz hmm.. are env vars easy to set per command in windows systems?
01:13 jberger not sure
01:13 jberger I'm basically a Windows noob again at this point
01:13 Grinnz heh
01:13 Grinnz i've never had to set an env var in windows aside from things like %PATH
01:13 genio Grinnz: no.
01:13 jberger I've been away a very long (happy) time
01:13 Grinnz that could be a potential reason why having an option is better
01:15 jberger Grinnz: i suppose
01:16 jberger the major exception is hypnotoad which doesn't work on Windows anyway
01:17 Grinnz right
01:20 sri Mojolicious::Commands is not horrible... but there's some odd stuff going on i'm not happy about https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Commands.pm
01:20 sri sadly there's good reasons for most of it :S
01:22 sri _args(), MOJO_APP_LOADER, MOJO_NO_DETECT, MOJO_HELP...
01:22 Grinnz MOJO_HELP kinda seems like something that doesn't belong in an env var
01:23 sri but try making it work differently
01:23 Adura PRAY_FOR_MOJO
01:24 Grinnz MOJO_PLS
01:25 Adura https://www.youtube.com/watch?v=OlDEzmSff3M Suprised Fox didn't remove it, but 9s is fair use to me!
01:25 sri Grinnz: i suspect you've not looked into hypnotoad yet :)
01:25 sri it's full of those env vars https://github.com/kraih/mojo/blob/master/lib/Mojo/Server/Hypnotoad.pm#L43
01:25 sri although for slightly different reasons
01:25 Grinnz sri, not closely no :P
01:26 sri (data needs to survive fork/exec)
01:26 Grinnz i was going to guess that
01:26 Grinnz makes sense
01:42 lsm joined #mojo
02:07 Grinnz sonova
02:07 Grinnz http://paste.fedoraproject.org/169848/12876361/
02:08 Grinnz this is with the stock perl 5.10.1 on my centos 6 box
02:08 Grinnz i cpanm --reinstalled Sub::Util and it worked
02:09 Grinnz that test fix hasn't made it to a release yet right?
02:09 Grinnz yeah that was just on monday
02:13 Grinnz https://grinnz.com:8080 there, set up a direct port to SSL hypnotoad to mess with
02:13 Grinnz bah, ssl labs only supports port 443, lol
02:14 good_news_everyon joined #mojo
02:14 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/GMM5cQ
02:14 good_news_everyon mojo/master 13727da Sebastian Riedel: a few more command tests
02:14 good_news_everyon left #mojo
02:21 good_news_everyon joined #mojo
02:21 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/gg-PMQ
02:21 good_news_everyon mojo/master d22e0ac Sebastian Riedel: test MOJO_NO_DETECT environment variable
02:21 good_news_everyon left #mojo
02:22 neyasov joined #mojo
02:24 good_news_everyon joined #mojo
02:24 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AbMFVA
02:24 good_news_everyon mojo/master db7cf14 Sebastian Riedel: test --help as well
02:24 good_news_everyon left #mojo
02:31 klapperl_ joined #mojo
02:44 Ptolemarch joined #mojo
02:49 Grinnz i think the IO::Socket::SSL docs are full of it, their "secure default" cipher list is just the openSSL default
02:53 Grinnz sri, how would you prefer a suggestion for setting SSL ciphers default?
02:54 Grinnz https://www.ssllabs.com/ssltest/analyze.html?d=grinnz.com with just that simple change
02:57 sri Grinnz: been there
02:57 sri i'd rather like to see IO::Socket::SSL use better defaults
03:00 Grinnz i can open an issue with them, but dont know how that will go
03:01 Grinnz it's very simple, just 'DEFAULT:!aNULL:!RC4'
03:18 sri problem with having our own defaults is that we need to update them regularly
03:20 Grinnz sure
03:21 Grinnz issue opened, lets see what they say: https://github.com/noxxi/p5-io-socket-ssl/issues/22
03:25 noganex joined #mojo
03:54 zackiv31 joined #mojo
04:11 neyasov joined #mojo
04:29 Grinnz sri, i just found your gist re: get -f, https://gist.github.com/anonymous/5877a1fcfff5be7f7048
04:29 Grinnz very similar to what i just came up with but more concise, haha
04:32 Grinnz https://github.com/Grinnz/mojo/compare/get_form
04:33 Ptolemarch joined #mojo
04:38 Grinnz i don't remember seeing it before but perhaps i subconsciously remembered it :P
04:46 hshong joined #mojo
04:47 D4RK-PH0ENiX joined #mojo
04:48 irq joined #mojo
06:00 neyasov joined #mojo
06:08 neyasov joined #mojo
06:27 rem_lex joined #mojo
06:45 marmez joined #mojo
06:46 dotandimet joined #mojo
07:01 dod joined #mojo
07:05 dod joined #mojo
07:09 juikuen joined #mojo
07:09 batman sorry, sri, but i haven't followed the discussion regarding the "commands" question
07:10 batman is there a suggestion on change or just a generic question on what to improve?
07:10 batman i think the gist Grinnz made makes sense, except it seems to mix "get" mojo command and POST, which *could be* a bit confusing...
07:11 batman i like the idea though: being able to do POST with a mojo command
07:13 batman the proxy change is ok, but i like just setting the environment variable to be able to do requests without proxy as well
07:16 tempire so the swagger sample is not pretty at all
07:16 * tempire needs to create some pretty api docs
07:17 tempire best api docs I've found are github and stripe
07:24 d4rkie joined #mojo
07:28 batman tempire: which swagger sample?
07:31 reneeb joined #mojo
07:31 neyasov joined #mojo
07:32 batman tempire: i would very much like if you would contribute to making my editor more pretty :)
07:32 batman that would be awesome
07:35 dotandimet joined #mojo
07:37 d4rkie joined #mojo
07:38 batman tempire: i'm away for some while now, but please let me know if you would like to contribute.
07:38 batman my module isn't stable at all, so it can very much be changed :)
07:38 batman tempire: here is what i have now: https://ssl.thorsen.pm/swagger2
07:43 D4RK-PH0ENiX joined #mojo
07:50 Eddy joined #mojo
07:59 basiliscos joined #mojo
08:06 eseyman joined #mojo
08:11 Ptolemarch joined #mojo
08:17 Vandal joined #mojo
08:25 basiliscos joined #mojo
08:27 trone joined #mojo
08:28 dp_ joined #mojo
08:38 sugar joined #mojo
08:50 arthas joined #mojo
09:03 marmez joined #mojo
09:15 tempire gurgle
09:15 tempire the inline pod is killing me
09:15 * tempire dies
09:16 tempire I admit, I'm a little confused as to the full purpose of swagger
09:16 tempire is it like markdown for api docs?
09:17 tempire on another note
09:17 tempire Seems like perl 5.2x signatures are what should be used in pod to document args
09:33 irq joined #mojo
09:42 batman tempire: what do you mean about "inline pod" ?
09:43 batman tempire: the thing is that using Mojolicious::Plugin::Swagger2, you can use the api spec to automatically build input and output validation
09:48 batman the purpose of swagger is to build documentation and api specification, which again can be used in your server to make sure the server (and client) also follow the specification
09:48 batman i've not yet built javascript and mojo client, but it's on my todo list. (at least a javascript module)
09:49 jkramer left #mojo
10:00 Ptolemarch joined #mojo
10:06 denis_boyun joined #mojo
10:43 cpan_mojo Mojolicious-Plugin-Directory-Stylish 0.001 by COFFEE - http://metacpan.org/release/COFFEE/Mojolicious-Plugin-Directory-Stylish-0.001
10:54 fhelmberger joined #mojo
11:09 denis_boyun joined #mojo
11:39 jegade left #mojo
11:49 Ptolemarch joined #mojo
12:04 neyasov_ joined #mojo
12:13 marcus o/
12:21 Averna joined #mojo
12:28 dvinciguerra joined #mojo
12:35 Nemix joined #mojo
12:51 amon joined #mojo
13:11 neilhwatson joined #mojo
13:14 jberger \o
13:15 d4rkie joined #mojo
13:15 jberger batman: of course you can already post with the get command
13:15 batman could be "of course" to you :P
13:16 batman i see it now
13:16 jberger what Grinnz is after is making multiple requests with the same ua
13:16 * batman wonder when that came around
13:16 batman ok
13:16 jberger because he needs to login first
13:17 jberger so if the ua isn't in a lexical then he can subclass the get command
13:17 jberger I THINK it's been there for quite a while tbh
13:17 batman that's cool
13:18 jberger yeah I support the idea
13:18 batman i'm no fan of lexicals that can't be changed without a wizard of the dark forces
13:24 d4rkie joined #mojo
13:25 sri o/
13:37 jberger \o
13:38 Ptolemarch joined #mojo
13:42 sri batman: there was a proposal http://irclog.perlgeek.de/mojo/2015-01-14#i_9942098
13:44 kwa joined #mojo
13:50 batman sri: is it regarding modifying @ARGV on compile time?
13:56 asarch joined #mojo
14:11 ignacio_ joined #mojo
14:17 hernan605 joined #mojo
14:23 Eddy joined #mojo
14:30 cpan_mojo App-SimpleHTTPServer 0.002 by COFFEE - http://metacpan.org/release/COFFEE/App-SimpleHTTPServer-0.002 (depends on Mojolicious::Plugin::Directory)
14:30 Eddy joined #mojo
14:35 marty joined #mojo
14:35 marmez joined #mojo
14:47 batman should mojolicious support "?a=1;b=2" or just "?a=1&b=2"
14:48 batman query string ^
14:48 batman should/does
14:48 batman looks like it only supports "&"
14:54 Grinnz support where?
14:54 purl i guess support is http://forum.acky.net
14:55 batman Grinnz: CGI implementors support the use of ";" in place of "&" to save authors the trouble of escaping "&" characters in this manner.
14:55 batman trying to convert cgi to mojo, but i need to support old links...
14:55 Grinnz yeah i've seen it, but what part of mojolicious doesn't support it exactly? there are a few things you could mean :P
14:56 Grinnz it's an option for the URL query spec
14:56 batman Grinnz: Mojo::Parameters
14:57 Grinnz creating them?
14:57 Grinnz or parsing?
14:57 purl i heard parsing was only for code attributes
14:58 batman Grinnz: https://metacpan.org/source/SRI/Mojolicious-5.72/lib/Mojo/Parameters.pm#L89 and https://metacpan.org/source/SRI/Mojolicious-5.72/lib/Mojo/Parameters.pm#L177
14:58 Grinnz IO::Socket::SSL maintainer says they will remove RC4 on the server side in the next release
14:59 jberger purl forget support
14:59 purl jberger: I forgot support
15:00 batman i wonder how it's possible to figure out if the delimiter is ; or &
15:01 irq joined #mojo
15:02 Grinnz it definitely should parse ;, at least
15:03 batman i guess & will be escaped, if ; is used
15:05 batman sri: what do you think about supporting split on ";" ?
15:10 Grinnz batman, you should just be able to split on /[&;]/, neither is allowed to be unescaped
15:10 Grinnz https://metacpan.org/source/ETHER/URI-1.65/URI/_query.pm#L71
15:10 batman right
15:11 Grinnz for joining, you would need to have some setting, or remember it from the split :P
15:11 Grinnz thats more complicated
15:12 Grinnz but on the bright side, you can't implement it in a worse way than CGI.pm did
15:13 Grinnz https://metacpan.org/pod/CGI#newstyle_urls
15:13 Grinnz "newstyle_urls became the default in version 2.64." I still wonder who thought this was ever a good idea
15:15 genio eww
15:16 jberger_ joined #mojo
15:16 Lee that's one of the many things i should throw out in v5 :D
15:19 Grinnz you're the maintainer? hehe
15:19 Lee yeah, i get to have all the "fun"
15:20 Lee most of my maintaining, thus far, has been to persuade people not to use CGI.pm
15:20 Grinnz :)
15:20 genio Lee++  :)
15:20 Grinnz i just saw CGI::Alternatives, nice one
15:20 jberger hahaha, Lee++
15:21 Lee it's astonishing the amount of people that still do though - *every single day* there's something on perlmonks/linkedin/stackoverflow/etc
15:21 Grinnz yep
15:21 * jberger facepalm
15:21 purl Oh geez, not this shit again.
15:21 * jberger pats purl
15:21 * purl stabs
15:21 Grinnz people don't know something like mojo exists or how easy it is
15:21 genio yea, I've been fighting that battle here at work for quite some time.
15:21 Grinnz i didn't before i tried it
15:22 jberger Grinnz: or that it runs in a CGI environment!
15:22 Grinnz right
15:22 jberger not that I recommend that either, but it does work
15:22 genio I've had more luck pushing Web::Simple than Mojo here :(
15:22 Grinnz we're about to hopefully convert every last CGI script in our project to Mojo though
15:22 Grinnz :)
15:22 Lee ditto, we're in transition too
15:23 Grinnz i've already converted most, just waiting on the javascript to support the new routes
15:26 Ptolemarch joined #mojo
15:30 gryphon joined #mojo
15:46 irq joined #mojo
15:47 mgrimes joined #mojo
15:55 sh4 joined #mojo
16:12 rem_lex|pivo joined #mojo
16:21 cpan_mojo Mojolicious-Plugin-CGI 0.17 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-CGI-0.17
16:24 genio batman: The description on M::P::CGI ....   s/matter/manner/
16:24 batman thanks :)
16:26 Snelius :)
16:28 genio that's the only nitpick I see in the documentation
16:30 cpan_mojo Mojolicious-Plugin-Directory-Stylish 0.001001 by COFFEE - http://metacpan.org/release/COFFEE/Mojolicious-Plugin-Directory-Stylish-0.001001
16:31 batman genio: it is?? i'm actually a bit surprised :)
16:31 batman thanks
16:31 batman genio: https://github.com/jhthorsen/mojolicious-plugin-cgi/commit/3cd883b7f81d936c9c51585c6b6f4031121adf59 # not going to make an new release any time soon though :/
16:32 jberger batman: when cpan_mojo posts a metacpan link, does your convos embed a 404 each time?
16:32 batman no. it doesn't do anything
16:33 jberger hmmmmm
16:33 batman no idea which version i'm running though
16:36 jberger http://imgur.com/YBXaPjE
16:36 jberger batman: ^^, tbh neither am I
16:36 * jberger checks
16:36 batman maybe the page isn't available over the sea soon enough :)
16:37 batman jberger: there's probably a bug in https://github.com/jhthorsen/mojolicious-plugin-linkembedder/blob/master/lib/Mojolicious/Plugin/LinkEmbedder/Link/Text/Metacpan.pm
16:37 migo joined #mojo
16:37 Ptolemarch joined #mojo
16:37 jberger 0.14
16:38 batman could you submit an issue?
16:38 jberger will do
16:38 jberger also, I need to upgrade to get XKCD!
16:38 batman also what happens when you click on the actual metacpan link?
16:38 jberger works fine
16:38 batman ok
16:40 jberger batman: https://github.com/jhthorsen/mojolicious-plugin-linkembedder/issues/14
16:40 jberger for completeness and for XKCD I'm going to upgrade now
16:41 batman :)
16:42 jberger joined #mojo
16:42 jberger http://xkcd.com/208/
16:43 jberger \o/
16:43 jberger oh that makes me so happy
16:43 batman jberger: what about assigning #14 to yourself? ;)
16:43 batman hehe
16:43 * batman will take it
16:43 batman no worries
16:43 jberger oO
16:43 jberger metacpan links seem to be working now
16:44 jberger two possibilities, cpan_mojo posts before metacpan is ready
16:44 jberger or the bug is fixed between 0.14 and 0.17
16:44 batman thanks. care to comment on the issue?
16:47 jberger and now, though the xkcd image embedded itself originally, now on refreshing, it isn't showing again
16:48 batman works here.
16:49 batman using hypnotoad jberger?
16:49 jberger no, I have just been using daemon
16:49 jberger should I be?
16:49 batman no. just curious if it was -really- reloaded
16:50 batman now it doesn't work here either :(
16:55 batman GET http://chat.thorsen.pm/oembed?url=http://xkcd.com/208/ 200 0.4244s
16:55 batman GET http://chat.thorsen.pm/oembed?url=http://xkcd.com/208/ 404 0.0081s
16:55 batman that is very strange
16:56 batman do you see the same thing jberger?
16:57 * batman don't have time for this
16:57 batman *doesn't
16:57 batman sorry
16:57 batman crap!
16:57 batman sorry. wrong channel
16:59 sri batman: no, we won't support ;
17:00 batman ok. guess i have to keep my hackery around then.
17:00 sri you had your chance to argue for it a few months (years?) ago
17:00 batman ok
17:00 sri Grinnz: no, it shouldn't
17:01 sri we follow the html spec now, and that's it
17:01 Grinnz_ it's not in the html spec?
17:01 batman Grinnz_: i think it's a CGI spec
17:01 Grinnz_ ah
17:03 * sri just got back from the dentist and is super grumpy
17:03 Grinnz_ well, someone could maybe make a Mojo::Parameters subclass
17:03 batman dentist--
17:03 batman Grinnz_: why?
17:03 Grinnz_ if you wanted it to support that
17:04 batman nah. i'm supporting 15 year old code.
17:04 Grinnz_ heh
17:05 Ptolemarch joined #mojo
17:05 jberger Grinnz_: almost nothing makes requests with those as seperators anymore
17:05 Grinnz_ almost nothing ever did
17:06 jberger joined #mojo
17:08 neyasov_ joined #mojo
17:09 sri https://html.spec.whatwg.org/#application/x-www-form-urlencoded-encoding-algorithm
17:13 dotan In the spec there's a link to a bug, with Hixie commenting "Please don't reuse this format outside HTML, it's crazy town."
17:14 dotan (which seems like very wishful thinking to me)
17:14 jberger joined #mojo
17:14 Grinnz_ heh
17:16 dotan I presume that if your query string has ';' as a parameter separator, it came from CGI.pm
17:21 sri batman: btw. we do not modify @ARGV at compile time, we just look for values we might like
17:25 batman sri: Ok. Then I need to read the backlog again.
17:25 batman I don't know what I'm answering :(
17:26 good_news_everyon joined #mojo
17:26 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/npdhbA
17:26 good_news_everyon mojo/master 7d95994 Sebastian Riedel: mention that we do not want to remove options from @ARGV
17:26 good_news_everyon left #mojo
17:26 sri consider yourself set on fire
17:27 batman Yeah. Been on fire (not the right kind) all day :(
17:28 * jberger hands batman a candy bar and a fire extinguisher
17:28 batman I just need my Browserify module to work, so I can move on :(
17:31 batman sri: What did the dentist say? Did you get any fun painkillers? :)
17:36 sri no, just boring novocaine :(
17:37 batman Too bad :/
17:37 sri just had to get a filling replaced, but have to go again next week :S
17:39 batman Does the dentist cost a lot in Germany?
17:39 batman As in, do you have to pay full price?
17:39 sri the basics are free, but you pay for special filling materials
17:42 batman Oh. Not too bad.
17:42 sri you have to pay in norway?
17:42 batman In Norway you pay for everything, unless it's categorized as surgery.
17:43 sri :o
17:44 batman "Regular" doctors are subsidized... It's a bit strange...
17:47 sri i want to get laughing gas at the dentist... like americans get :)
17:47 sri nobody around here does that
17:49 Grinnz_ most here don't either
17:50 batman Hehe
18:14 jberger I don't like the gas, and no, most clinics don't do that anymore (that I know of)
18:20 hernan604 joined #mojo
18:28 basiliscos joined #mojo
18:36 irq joined #mojo
18:37 irctc750 joined #mojo
18:38 irctc750 how do I use a variable in my mojolicious template?  In my controller I have:  $self->stash( server_result => 'foo');  then in my template I have % if ($server_result) {
18:38 irctc750 but I get an error
18:38 irctc750 Global symbol "$server_result" requires explicit package name at template search/index.html.ep line 11.
18:41 irctc750 actually, I'm looking at a previous project where I did exactly the same thing... and that project works.
18:41 Grinnz_ https://metacpan.org/pod/Mojolicious::Guides::Rendering#Embedded-Perl
18:41 Grinnz_ should just work
18:44 irctc750 http://paste.scsys.co.uk/454628
18:44 irctc750 when I comment out <%#= $server_result %>
18:44 irctc750 it renders the page correctly.
18:46 irctc750 I am getting a new error now that I've stripped everything out of my template
18:46 irctc750 Server available at http://127.0.0.1:3001. Use of uninitialized value $line in scalar chomp at /opt/perl5/perls/perl-5.18.2/lib/site_perl/5.18.2/Mojo/Exception.pm line 47.
18:46 irctc750 is there a way to figure out what's going wrong?
18:49 irctc750 can I debug what is being passed?
18:50 irctc750 it's $self->stash to store variables to make them available to the template right?  That hasn't changed and the docs weren't updated or something...
18:50 Grinnz_ correct
18:52 cpan_mojo Mojolicious-Plugin-Directory-Stylish 1.000 by COFFEE - http://metacpan.org/release/COFFEE/Mojolicious-Plugin-Directory-Stylish-1.000
18:52 sri you literally should be getting a dump of the stash on that error
18:53 sri perl -Mojo -E 'a({inline => q{%= $foo}, bar => "baz"})->start' daemon
18:55 irctc750 all that that says is
18:55 irctc750 "action" => "index",   "controller" => "search"
18:55 irctc750 which is where I have the $self->stash ( server_result => 'foo' );
18:56 sri there you go
18:56 sri i bet the answer is in the logs
18:57 irctc750 ah! logs!
18:57 irctc750 it says my controller doesn't exist...
18:57 sri :)
18:58 irctc750 oh man.
18:58 irctc750 Find/Web/Serch.pm
18:58 * irctc750 sigh
18:58 irctc750 well thanks guys!
18:58 Grinnz_ haha
18:59 * sri loves the log messages at the bottom of the error pages
19:00 irctc750 well, fixing my typo sure has the desired effect.
19:00 irctc750 thanks!
19:01 sri that kill(0) p5p discussion made me look into the morbo code again... and i'm scared
19:02 sri eeep https://github.com/kraih/mojo/blob/master/lib/Mojo/Server/Morbo.pm#L72
19:02 Grinnz_ discussion regarding?
19:04 Grinnz_ i've used kill 0 in the past but i think i just use pidfiles now
19:08 sri http://code.activestate.com/lists/perl5-porters/216746/
19:09 Grinnz_ oh god, windows
19:09 sri all the questionable code in morbo only exists because it works on windows... most of the time ;p
19:09 sri and i'm terrified of changing it :o
19:12 Grinnz_ well, the permissions issue shoudl not come up in this case, since morbo is what started the process to begin with
19:12 Grinnz_ and apparently the shadow process issue is the same on linux
19:12 D4RK-PH0ENiX joined #mojo
19:17 d4rkie joined #mojo
19:20 Ptolemarch joined #mojo
19:21 batman sri: in Mojo::JSON there's if (blessed $value && (my $sub = $value->can('TO_JSON'))) {...} is it undefined what happens if the object does not have the method TO_JSON() ?
19:22 batman ah. it's stringyfied...
19:30 batman nevermind
19:30 purl Well piss off then, batman
19:30 Grinnz_ lol
19:30 batman playing rough ey, purl?
19:30 purl batman: i'm not following you...
19:49 dod joined #mojo
19:50 dotandimet joined #mojo
19:50 sri lol
19:55 dotandimet joined #mojo
20:02 dotandimet joined #mojo
20:13 marcus purl is not taking any chances.
20:13 * marcus pets purl
20:13 purl don't mess with me
20:13 marcus purl: botsnack.
20:13 purl :)
20:13 batman i think purl is about to create a terminator...
20:14 Grinnz_ or is
20:14 batman ;)
20:22 dotandimet joined #mojo
20:32 Grinnz_ interesting... POE::Loop::Mojo_IOLoop has only gotten one failure so far and it was on perl 5.21.7 on freeBSD
20:34 D4RK-PH0ENiX joined #mojo
20:40 d4rkie joined #mojo
20:40 Grinnz_ also the error output is completely unhelpful or nonexistent
20:40 Grinnz_ oh well
20:44 cpan_mojo POE-Loop-Mojo_IOLoop 0.002 by DBOOK - http://metacpan.org/release/DBOOK/POE-Loop-Mojo_IOLoop-0.002
20:57 dotandimet joined #mojo
21:19 rem_lex joined #mojo
21:29 sugar_ joined #mojo
21:31 irq joined #mojo
21:40 sri argh
21:40 sri i hate the Atom packaging stuff...
21:41 sri so i pushed a 1.0.0 tag... and then ran "apm publish" to get it into the package index... and of course it magically bumped the version again to 2.0.0, created a tag, and pushed everything to github and the index -.-
21:41 Grinnz_ gg
21:41 sri (╯°□°)╯︵ ┻━┻
21:42 Grinnz_ the Dzil plugin i'm using just bumps version -after- release lol
21:42 genio a bear just flipped over a table!
21:43 sri of course i don't care enough to fix the whole mess... and the next time i have to update one of my packages i'll have forgotten all this again
21:50 dotandimet1 joined #mojo
21:54 Ptolemarch joined #mojo
21:55 tempire batman: if you can give me some direction in how to make it pretty, I'd consider it
21:56 dotandimet joined #mojo
21:56 batman tempire: i thought you already had some ideas..?
21:57 tempire how, as in where it's located, what part of the code does what
21:57 batman you don't have to do any actual coding, just make a stylesheet and/or choose a font/colors and i will add it
21:57 tempire oh, are you just outputting it to pod?
21:57 batman yeah
21:57 batman tempire: but i'm also open for outputting it as something that can actually draw tables
21:58 batman ...or just dropping the tables completely, in favor of lists
21:58 tempire I'm going to make an api docs design similar to stripe
21:58 tempire maybe you'll be able to use it in your project
21:59 Grinnz_ 11:44:18           <jberger> two possibilities, cpan_mojo posts before metacpan is ready
21:59 Grinnz_ this is accurate
21:59 Grinnz_ by the way
21:59 purl well, by the way is "0" still a legal class name?
21:59 batman but why not write them in swagger and *force* me to make a pretty renderer in Swagger2::Editor ?
21:59 batman Grinnz_: yeah. closing https://github.com/jhthorsen/mojolicious-plugin-linkembedder/issues/14 now
21:59 batman tempire: ^ the "but..." was to you :)
22:00 tempire ugh.
22:00 Grinnz_ i clicked the link it posted for my module just after i released it, and it didnt work yet ;)
22:00 tempire fine, I'll learn this swagger format.
22:01 batman tempire: \o/
22:01 tempire batman: will you answer my swagger questions?
22:01 batman tempire: it's not hard. just look at the examples.
22:01 batman tempire: yes.
22:01 tempire like, what's a "tag" ?
22:01 batman metainfo
22:01 * Grinnz_ tags tempire. you're it!
22:02 tempire I saw that description, but can you give me an example of how it would be used
22:02 batman i think you need to find a usage for it yourself, since it's just metainfo :(
22:02 batman i haven't found any yet.
22:02 tempire lulz
22:02 Grinnz_ lol
22:02 tempire ok, I'll put it in the ignore column
22:03 batman but i'm thinking about adding tags @work, where i tag the different endpoints with who's using it
22:03 batman i'm also thinking about using tags to group together similar endpoints
22:03 tempire I'm looking at https://github.com/jhthorsen/swagger2/blob/master/t/data/bodytest.json
22:03 batman so i can run the spec through a processor and output different versions of the same api
22:04 tempire I'm confused a little by the "definitions" section
22:04 batman @work i have the same api, but not everyone who use it can use the same methods, so i'm making one "master api" and going to split it up...
22:05 batman tempire: the definitions section is for reuse, so you can define a "Cat" in one place, but make on endpoint output a list of cats, or another output jus one cat
22:05 batman but "Cat" is only defined one place.
22:05 batman *reuse*
22:06 tempire So, "Pet" is defined, but I don't see "Pet" used anywhere else
22:06 batman same goes for the "parameters" section (but that's for input)
22:06 batman look for "$ref" : "#/definitions/Pet"
22:06 tempire ooooooh
22:06 batman ;)
22:07 batman you can also reference external definitions... something like: $ref: "http://example.com/other-api.json#/definitions/Pet" if you want to get fancy :)
22:09 batman i mostly reuse "parameters". like: parameters: [ { $ref: "#/parameters/id" }, { $ref: "#/parameters/page" } ]
22:10 batman and then define parametes: { page: { type: integer, in: query, description: "used for pagination" } }
22:10 cpan_mojo Mojolicious-Plugin-LinkEmbedder 0.18 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-LinkEmbedder-0.18
22:10 batman jberger: ^ enjoy
22:11 tempire lulz
22:11 tempire You used $c->delay in the examples?
22:11 tempire I think you just broke most peoples brains
22:11 jberger batman: \o/
22:11 batman tempire: in which examples?
22:11 tempire Mojolicious::Plugin::LinkEmbedder
22:12 batman tempire: ah. yeah... it's only non-blocking
22:12 batman tempire: nevermind linkembedder. let's make the most awesome editor! :)
22:13 sugar__ joined #mojo
22:13 tempire I think I have an emotional blockage from appreciating anything javascript programmers create.
22:13 batman tempire: https://raw.githubusercontent.com/Nordaaker/convos/swagger2/public/api.json <-- here is a more complex example
22:14 batman tempire: then appreciate what i've done, because it's better :)
22:14 tempire I'm referring to the swagger spec
22:14 batman aha. well... i don't think the swagger guys have made anything that follow the spec yet :P
22:15 Grinnz_ lol
22:15 batman that's why i made Swagger2::Editor, so i could use the complete list of features
22:15 tempire That example helps, thanks
22:15 batman like $ref to whatever
22:16 * tempire dives into javascript.
22:16 batman tempire: that's also the next level of convos, so... no, it's not dead. just sleeping :)
22:16 tempire If I don't reappear within 3 days, I'm dead.
22:16 batman tempire: and if you have any yaml module, you can write yaml instead.
22:16 batman i really like yaml, compared to json for this
22:16 jberger joined #mojo
22:16 tempire I've been bitten by yaml too many times.
22:16 tempire I'll stick with json
22:16 batman BITE BACK!
22:16 batman ;)
22:16 tempire I am.
22:16 tempire With json :)
22:16 batman hehehe
22:17 batman tempire: so... my editor isn't perfect (duh!), but i would very much like to improve it.
22:18 tempire I've never seen a swagger editor.
22:18 batman and the documentation for M::P::Swagger2 might also be garbage
22:18 tempire What makes it more than rte?
22:18 batman rte?
22:18 tempire rich text editor
22:18 tempire or just a textarea, for that matter
22:18 batman ah. i meant the output.... sorry about that
22:21 disputin joined #mojo
22:23 batman output = right side pane
22:23 jberger tempire: as I understand it, Swagger is just a mechanism for declaring REST apis and batman's editor is left side editor and right side pod which is autogenerated by the spec
22:27 batman that is correct.
22:28 batman but you also get input/output validation on the server side, using M::P::Swagger2
22:28 batman meaning your Pet will always be right ;)
22:28 jberger right, the spec is about generating more than just pod
22:36 alnewkirk joined #mojo
22:44 se3jay joined #mojo
22:52 tempire Did you post a link to the current editor, or a screenshot?
22:52 tempire I thought you did, but can't find it
22:53 tempire batman ^
22:54 batman tempire: https://ssl.thorsen.pm/swagger2
22:54 batman tempire: just copy/paste the convos api into the editor to see how it looks
23:00 salparadise joined #mojo
23:07 tempire magic
23:08 batman haha
23:10 batman tempire: the editor store whatever you did last in in the browser, so it will be remembered if you close the browser
23:10 tempire cookie?
23:10 purl C is for cookie, it's good enough for me!
23:10 batman but it doesn't save it to disk anywhere, so you have to copy/paste back to "some file"
23:10 batman WebStorage
23:10 tempire k
23:11 batman i'm guessing you're not using ie8, so i just took it for granted that your browser supported it ;)
23:11 Grinnz_ local storage
23:11 purl somebody said local storage was needed to keep track of what's updated
23:11 Grinnz_ the javascript guys here love it
23:15 sri do we have any windows users present?
23:15 sri i'd like to try a morbo change :)
23:17 * Grinnz_ uses windows, but not for perl
23:18 good_news_everyon joined #mojo
23:18 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/pgRIIA
23:18 good_news_everyon mojo/master 7536b49 Sebastian Riedel: this check should not be necessary
23:18 good_news_everyon left #mojo
23:18 sri windows users please try master now
23:18 sri and especially morbo
23:18 sri edit an app a bit, have it die and restart a few times
23:41 good_news_everyon joined #mojo
23:41 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/ztB24g
23:41 good_news_everyon mojo/master a87e2ff Sebastian Riedel: better attribute name
23:41 good_news_everyon left #mojo
23:41 sri *crickets*
23:41 jnbek I'm not at a Winders machine atm
23:42 jnbek and won't be for a few hours
23:42 jnbek :)
23:42 jnbek err :(
23:42 sri :)
23:42 sri :(
23:42 sri :)
23:43 sri http://i.imgur.com/3Ev6K6m.gif
23:45 Grinnz_ haha
23:45 Grinnz_ also, i never think about $_[0] being an array lookup, haha
23:46 Grinnz_ it took me a minute to figure out how that change wouldn't break anything
23:56 asarch joined #mojo

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