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

IRC log for #mojo, 2016-09-28

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

All times shown according to UTC.

Time Nick Message
00:00 pink_mist wow
00:00 jberger I think I'm recalling that right
00:00 pink_mist that sounds very messed up to me
00:00 jberger Strange POSIX arcana time
00:00 jberger I remember being very surprised about it too
00:01 jberger There was weird stuff, like duping didn't help somehow
00:02 jberger I wish i could remember it all
00:03 pink_mist I can't reproduce seek pointer being per file
00:03 pink_mist I just opened two filehandles to the same file, seek'ed in one filehandle, and tell'ed the other
00:03 jberger http://man7.org/linux/man-pages/man2/dup.2.html
00:04 pink_mist dup is a whole different matter
00:04 jberger Maybe that was the issue
00:04 jberger Because a log filehandle doesn't have to be a file
00:04 jberger Hmm but tail -f ....
00:04 jberger I have no idea anymore
00:06 Grinnz it would be per file descriptor if anything
00:07 jberger Maybe it was read mode vs append?
00:08 * jberger gives up
00:08 jberger Anyway i didn't release it, to take that for what it's worth ;p
00:13 itaipu joined #mojo
00:29 arcanez https://gist.github.com/kevineye/b1bf69826da72ad6e5c8 seems like what I'd want at the moment
00:32 sri arcanez: isn't STDOUT always writable?
00:35 * sri is not actually sure
00:36 sri i know files are always writable, but are pipes?
00:37 pink_mist unless you've got a SIGPIPE, I'd assume so
00:39 arcanez sri: I'm not going to use STDOUT
00:39 arcanez plan is to read STDIN and shove it into redis
00:39 arcanez also, not my gist.
00:40 arcanez I was in a bubble for the last ~4 years at $previous_company where we just forked and reaped children.. no way would we have added an event loop, whether POE, AE, IO::Async, Mojo, etc
00:41 arcanez so I'm trying to catch up on things
01:10 arcanez seems odd that url_for would give me https:// for a websocket
01:10 arcanez shouldn't it be wss://
01:14 bpmedley arcanez : May we see your full url_for expression?
01:14 arcanez % my $url = url_for '/snmp/portinfo';
01:15 arcanez I'm running a slightly modified version of the websocket code on mojolicious.org
01:15 arcanez I changed '/title' to '/snmp/portinfo'
01:16 bpmedley You might try using a route name.  Also, see how the example uses "title" instead of "/title"?
01:16 pink_mist it's not /title in the url_for
01:16 pink_mist because that's a path instead of a route name
01:16 pink_mist you want to use the route name for it to correctly associate the route
01:17 arcanez so it'd be 'snmp/portinfo'?
01:17 arcanez also, how do I turn off template caching?
01:17 arcanez template is in __DATA__ and is staying cached too often
01:17 pink_mist http://mojolicious.org/perldoc/Mojolicious/Guides/Tutorial#Route-names
01:18 pink_mist especially see the "Nameless routes get..." bit
01:20 jberger also remember that a websocket is just a GET
01:20 jberger so if you define both a websocket and a GET on the same route name it can't know to give you ws://
01:20 jberger https://twitter.com/shadowcat_mst/status/780853588952252416
01:21 pink_mist also http://mojolicious.org/perldoc/Mojolicious/Guides/Routing#Named-routes for more in-depth info
01:22 arcanez I can't use irccloud, I connect to more than 2 nets.. I guess I could pay, but I already pay linode for my irssi (among other thigns)
01:22 arcanez @shadowcat_mst FOLLOWS YOU
01:22 arcanez poor mst
01:33 * jberger hugs convos
01:34 * bpmedley doesn't understand
01:34 arcanez jberger: you didn't seem thrilled earlier about my use of websockets for an 'snmp proxy'.. any suggestions on a better architecture?
01:35 jberger websockets are better for push notification or streaming messages
01:35 jberger snmp is request response
01:36 arcanez I'm trying to figure out how to get SNMP to a webserver realtime
01:36 arcanez and I chose websockets over ajax.. partially so I could do something new
01:36 jberger I'd have to know what you were trying to do better, but I just generally think that using websockets for req/res is usually troublesome
01:36 jberger doing something new is fun
01:37 mattp_ jberger: yes and no
01:37 jberger Galileo (my CMS) does that too, but honestly it isn't much of a benefit
01:37 arcanez I want webserver to be able to real time poll SNMP, via the netmgt box
01:37 mattp_ jberger: whats the difference between request/response and a wire protocol over a socket
01:37 arcanez I thought about using iptables SNAT to handle it, but eh
01:38 arcanez bbl
01:48 tchaves joined #mojo
01:55 jberger arcanez: ah, the server is polling snmp and then sending the result streaming to the websocket client
01:55 jberger that's a more useful thing for a websocket
01:55 jberger sorry, I thought the request was coming from the client
01:56 jberger mattp_: in a websocket there is no concept of a reply, if you send several messages you need to come up with some mechanism (UUID?) to know which is the reponse to each one
01:57 jberger sure there are protocols you can implement on top of a websocket
01:57 jberger but why when http already exists
02:07 noganex_ joined #mojo
04:08 arcanez jberger: yes, that is what I'm trying to do..
04:10 arcanez if mst were here, he'd let you know that explaining what I am trying to accomplish isn't always the first thing I do, nor when I do it, do I do it well
04:28 preaction it's been my experience that mst generally requires that you explain what you are trying to accomplish as soon as possible, and gets extremely frustrated if you do not
04:31 inokenty-w joined #mojo
04:33 arcanez preaction: _I_ take it as him not wanting to waste time.. and quite often people (myself included) don't ask the right questions
04:34 arcanez there have been a few times I've had to preface my questions with "don't ask why I'm doing it this way, see current arcane system that I can't wholesale change due to X"
06:06 mbudde joined #mojo
06:08 jamesaxl joined #mojo
06:30 salva joined #mojo
06:32 cpan_mojo Mojo-Webqq-1.8.6 by SJDY https://metacpan.org/release/SJDY/Mojo-Webqq-1.8.6
06:34 Vandal50506 joined #mojo
06:36 cpan_mojo Mojo-Weixin-1.2.0 by SJDY https://metacpan.org/release/SJDY/Mojo-Weixin-1.2.0
06:47 dod joined #mojo
06:49 ccakes joined #mojo
07:14 polettix joined #mojo
07:18 trone joined #mojo
07:53 abra joined #mojo
08:15 rshadow joined #mojo
08:30 janl joined #mojo
08:44 osfabibisi joined #mojo
08:59 arthas joined #mojo
09:12 nic Systems We Love is bizarre in its generality
09:12 nic Personally I'm saving my dollars for Things That Grow
09:12 bpmedley nic: Do you have a link?
09:19 nic If you google it, it'll be the top link most likely
09:20 nic (SF, 13 Dec)
09:26 andy_ joined #mojo
09:27 cpan_mojo Mojolicious-Plugin-JQuery-3.11000 by FERRO https://metacpan.org/release/FERRO/Mojolicious-Plugin-JQuery-3.11000
09:50 gregf_ joined #mojo
10:07 cpan_mojo Mojolicious-Plugin-JQuery-3.11001 by FERRO https://metacpan.org/release/FERRO/Mojolicious-Plugin-JQuery-3.11001
10:12 ccakes joined #mojo
10:22 coolo release early, release often ;)
10:30 kaare joined #mojo
10:33 sri judging by the version numbering scheme there, he has big plans :S
10:35 sri little surprised by how few mechanical keyboards there are made from aluminium
10:48 abra_ joined #mojo
10:57 tchaves joined #mojo
11:03 batman i wonder if FERRO knows that the plugin does nothing.
11:03 batman ...nothing that assetpack can't do by itself
11:04 * batman sends and email
11:06 tchaves joined #mojo
11:45 polettix joined #mojo
11:58 blonewolfs joined #mojo
12:11 zivester joined #mojo
12:15 polettix joined #mojo
12:31 gizmomathboy joined #mojo
12:35 itaipu joined #mojo
12:43 jacoby joined #mojo
12:44 marty joined #mojo
12:54 sri hmm, this looks pretty clunky, right? https://github.com/kraih/mojo-pg/pull/32
12:58 batman jberger: https://github.com/vuejs/vue/issues/2873
13:03 dod joined #mojo
13:03 ramortegui joined #mojo
13:07 marty joined #mojo
13:13 jberger sri: heh, i just saw it via the email and thought a similar thing
13:13 bobkare sri: overall idea makes sense to me, though I'd expect to be able to give any of the transaction modes pg supports: https://www.postgresql.org/docs/current/static/sql-begin.html
13:14 jberger batman: yes, I've been trying to only use 2.0 compatible stuff at $work
13:14 jberger I'm so glad text filters are back, originally filters were removed entirely
13:15 batman jberger: i didn't even know...
13:15 batman i'm a bit confused... does the documentation reflect 1.x or 2.x?
13:15 jberger The website is 1.x
13:16 batman ok.
13:16 jberger The document you linked is 2.x working draft
13:16 jberger And 2.x has changed a bit since its announcement
13:17 jberger Biggest change now i think is the event system got much leaner
13:17 jberger Actually maybe i should try to make a case for keeping the interpolate method
13:18 jberger I was going to use that with url_for but at the moment it is deprecated/removed in 2.x
13:40 jacoby joined #mojo
13:41 zivester joined #mojo
13:48 asarch joined #mojo
13:52 zelda joined #mojo
13:53 batman jberger. ok... let me know if there's something i should consider in convos.
13:55 Dandre joined #mojo
14:37 jacoby_ joined #mojo
14:57 itaipu joined #mojo
15:02 sri hmm, i guess i was looking for a solid keyboard :o http://boingboing.net/2016/09/28/concrete-computer-keyboard.html
15:03 jberger hahaha, wow
15:04 jberger it actually looks pretty good
15:05 nicomen concrete > brushed metal
15:05 nicomen ;)
15:06 nicomen marble would be nice
15:10 disputin joined #mojo
15:12 sri and of course there's a reddit for customized mechanical keyboards :O
15:15 sri 3d printing keycaps seems pretty cool
15:17 sri kinda like these super minimalistic ones https://www.reddit.com/r/MechanicalKeyboards/comments/54u3gf/godspeed/
15:20 sri guess i gotta browse massdrop more often https://www.massdrop.com/buy/godspeed-custom-sa-keycap-set?mode=guest_open
15:26 jberger whenever obra gets his sorted out, that looks interesting (http://keyboard.io)
15:26 sri definitely not my style
15:44 Vandal50506 joined #mojo
15:45 genio pfft all that weight and it still doesn't have the number pad?!   (concrete keyboard)
16:01 polettix joined #mojo
16:16 disputin joined #mojo
16:18 jacoby joined #mojo
16:20 itaipu joined #mojo
16:39 itaipu joined #mojo
17:01 arcanez obra's keyboard is 'spensive
17:09 dod joined #mojo
17:11 Sebbe joined #mojo
17:17 polettix joined #mojo
17:27 jacoby joined #mojo
17:28 jacoby joined #mojo
17:29 PryMar56 joined #mojo
17:46 mishanti1 If anyone in interested in a sort of lengthy read, I just put out my thoughts on some ways of doing dependency management with Perl.
17:47 mishanti1 http://christopher.rasch-olsen.no/perl-dependency-management
17:47 mishanti1 If you hate long urls, long blog-posts or me then that post is probably not for you.
18:10 Grinnz mishanti1: good writeup, just skimmed it really but i will say two things, perlbrew and plenv do directly use local::lib for their lib setups, and you might look at mst's new App::opan as another option for "local mini-cpan"
18:10 Grinnz i haven't used Pinto nor App::opan so i can't comment much more than that
18:15 mishanti1 Grinnz: Thanks for the feedback. :) I'l keep App::opan in mind and perhaps include it in a later post that is more technically oriented.
18:16 itaipu joined #mojo
18:18 perlpilot mishanti1: I quickly glanced at App::opan the other day but a more detailed write up on it would be great! :-)
18:19 mad_hatter joined #mojo
18:19 mad_hatter http://fpaste.scsys.co.uk/534539
18:20 mad_hatter hello all, im havinga problem with how to go about a solution for running down urls indefinitely:  im not sure what the best solution is going forward from the initial harvest of links from the seed urls.
18:20 mad_hatter original thoughts were to recurse that second step, passing a new list of links to it each time
18:24 pink_mist just keep a master list that you append to each time you find a new url, and when you're done with the current page, get the next one from the master list ....you've been told this several times already.
18:24 mad_hatter I'm not quite understanding..is the master_list supposed to be some global variable?
18:24 pink_mist as global as it needs to be yes
18:25 mad_hatter alright, let me try something with that idea. ive been told a bunch of different things to do, just kinda flailing here
18:26 pink_mist there are literally thousands of examples of this kind of thing. probably dozens of examples for Mojo alone
18:27 pink_mist if you're stuck you should definitely check your favourite search engine for something to look at
18:27 mad_hatter eh...the google isn't yielding anything of interest most of the day
18:30 perlpilot mad_hatter: have you read https://metacpan.org/pod/Mojo::IOLoop::Delay ?
18:30 mad_hatter yes...quite a few times today lol
18:31 mad_hatter maybe im missing something, but thats why I'm here lol
18:31 jberger I have a thing in my gists
18:32 jberger that I'm getting more and more hesitant to link to
18:32 jberger because I'm worried that people will abuse it, since it isn't a polite crawler
18:33 mad_hatter i dont want to copy anybody elses crawler, the point of this exercise is to 1. learn non-blocking mojolicious. 2. develop (my own) implementation of a crawler
18:37 jberger ok but in that case, you might learn from my example, just note that it doesn't rate limit or handle robots.txt
18:37 jberger https://gist.github.com/jberger/5153008
18:47 disputin joined #mojo
18:58 itaipu_ joined #mojo
19:39 mad_hatter anybody know why i could possibly be getting this error: Timer failed: Mojo::IOLoop::Delay: Can't locate object method "is_abs" via package "Mojo::ByteStream"?
19:43 preaction you tried calling is_abs, but the object isn't what you think it is
19:43 mad_hatter hmm but i haven't called ->is_abs anywhere in my code
19:47 preaction you can use Devel::Confess or Carp::Always and it might add a stack trace
20:48 disputin joined #mojo
20:54 ccakes joined #mojo
21:14 bpmedley mishanti1++ ; Would you consider adding something about Perl-Build?  Really handy.
21:19 sri that new ghostbusters movie is terrible
21:19 sri i tried watching it... but i just couldn't
21:19 bpmedley That's unfortunate, such a great concept
21:21 vicash has anyone had any luck with using Mojolicious::Plugin::Web::Auth with Google ?
21:22 vicash It says it supports google but its own example ends up giving 403 Forbidden on the return callback
21:22 vicash i mean redirect URI callback.
21:24 ccakes vicash i use it a bit, pretty sure the example worked
21:25 ccakes 403 might be related to your config in the google dev console, got the origins and redirect URIs set up properly?
21:25 vicash ccakes i tried the example from github today and it failed to work. gives me 403 Forbidden. the authenticate portion works and I login to google correctly, then google invokes my redirect URI and for some reason it gives a 403 error.
21:26 vicash ccakes: the origins should just be the FQDN correct ? like https://www.example.com and not https://www.example.com/auth/google/authenticate
21:27 vicash ccakes: my redirect URI is https://www.example.com/auth/google/callback
21:27 ccakes yep - thats right
21:27 ccakes let me try the example locally real quick
21:27 vicash ccakes: then i have that setup right i believe
21:28 go|dfish joined #mojo
21:32 sri omg.... samsung http://money.cnn.com/2016/09/28/news/samsung-cpsc-washing-machine-explosion-reports/index.html
21:33 mikegrb my washing machine :<
21:33 Grinnz man next you're gonna tell me my TV's going to explode
21:33 Grinnz that would make me really sad, they don't make plasma TVs anymore
21:34 arcanez at least it is top load. I heard the front loads smell like mildew
21:46 ccakes vicash the example works here, is the 403 from mojo or from google?
21:47 vicash ccakes: i believe it is from google. in the logs i see a GET /auth/google/callback and after that the on_error is called with a string description of 403 Forbidden
21:47 vicash ccakes: i also checked my application permissions for 2 separate google accounts and i get the same error.
21:48 vicash ccakes: if you can point me on how to debug this that will be helpful, otherwise i will add more logging statements to see where the problem is...
22:21 sri wonder if hearthstone will ever get good again
22:23 arcanez to play ..or watch
22:31 sri one usually goes with the other
22:34 sri every deck is a tempo deck these days... so boring
22:35 * sri tends to play a few hours to rank 5 and then just quit for the month now
22:38 ccakes joined #mojo
22:43 ccakes_ joined #mojo
22:51 arcanez I've not gotten into it.. League of Legends here.
22:52 arcanez watching and playing.. Worlds tomorrow
22:57 ccakes_ vicash sorry, the google error pages generally have useful output so the way i'd dig into that is dump the $tx->res object in the library
22:57 ccakes_ probably https://github.com/hayajo/Mojolicious-Plugin-Web-Auth/blob/master/lib/Mojolicious/Plugin/Web/Auth/OAuth2.pm#L65 or L83
23:03 asarch joined #mojo
23:11 cbd_ joined #mojo
23:14 cbd_ Hello, I am getting several instances of an error while modifying a (global) value while using Mojo's IOLoop
23:14 cbd_ The code I'm using is here: http://pastebin.com/rM2Yb0S1
23:15 cbd_ The error is "(in cleanup) Can't call method "remove" on an undefined value at /lib/perl5/Mojo/IOLoop/Client.pm line 70 during global destruction"
23:26 howitdo joined #mojo
23:26 vicash ccakes: thanks. i will try that.
23:27 pink_mist cbd_: I'm not getting any such error from your code.
23:27 pink_mist cbd_: is your mojolicious version out of date?
23:29 pink_mist cbd_: how about your perl version?
23:29 pink_mist (though I was testing that on perl 5.16, which is fairly old now)
23:38 sri it will be a very old version of perl that doesn't have ${^GLOBAL_PHASE}
23:39 sri the error is harmless, get used to it or upgrade your perl
23:39 sri ;p
23:42 sri (and before you ask, the reason we don't fix it is the same reason you don't upgrade your perl, money)
23:42 cbd_ perl v5.22.2
23:44 vicash ccakes: thanks for the tip. the problem is that Google+ API is not configured for those accounts or is restricted for some reason. I need to find other ways to access information.
23:44 pink_mist cbd_: is that the perl you used to run the script you pasted?
23:44 cbd_ yes
23:45 pink_mist cbd_: are you absolutely certain? because that sounds unlikely to me
23:46 cbd_ what is what perl -v is telling me
23:46 cbd_ *that is what perl -v is telling me
23:46 pink_mist well perl -v might be different than the perl running that script if you ran the script by doing ./foo.pl
23:46 pink_mist what does /usr/bin/perl -v tell you?
23:47 cbd_ the same thing
23:47 pink_mist hmm, ok then ... very curious
23:48 cbd_ Mojolicious 7.05
23:49 cbd_ I am running all this junk under cygwin
23:49 cbd_ actually
23:51 cbd_ cpan -l shows Mojolicious listed twice, one with version 7.05 and another with 6.36
23:52 disputin joined #mojo

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