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

IRC log for #mojo, 2016-08-17

| 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:17 dvinciguerra joined #mojo
00:21 itaipu joined #mojo
00:32 Pierre joined #mojo
00:39 Kripton joined #mojo
01:08 jberger batman: I know you've been busy with convos, have you looked at the multiplex plugin yet at all?
01:12 zivester joined #mojo
01:12 jberger anyone else is welcome to comment too
01:12 jberger https://github.com/jberger/Mojolicious-Plugin-Multiplex
01:12 cafe joined #mojo
01:13 jberger a plugin for reusing a single websocket for multiple bidirectional feeds on a single connection
01:47 kiwiroy joined #mojo
01:49 kiwiroy left #mojo
02:15 noganex joined #mojo
02:45 ivi joined #mojo
02:56 lluad joined #mojo
03:25 PryMar56 joined #mojo
04:05 tl joined #mojo
05:42 Pierre joined #mojo
06:02 inokenty-w joined #mojo
06:05 Jonis morning
06:30 marcus lilo dalas multiplex
06:30 dod joined #mojo
06:30 marcus jberger: typo in synopsis - multoplex
06:31 dod joined #mojo
06:31 marcus jberger: other than that, lgtm - interesting concept
06:34 trone joined #mojo
06:36 dod joined #mojo
07:10 AndrewIsh joined #mojo
07:12 Vandal joined #mojo
07:57 kes joined #mojo
08:32 jontaylor joined #mojo
08:44 good_news_everyon joined #mojo
08:44 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v6ruV
08:44 good_news_everyon mojo/master e9702b4 Sebastian Riedel: fix typo in example
08:44 good_news_everyon left #mojo
08:50 batman jberger: yeah. and drinking beer. never forget about the beer :)
08:51 batman yeah, i've looked at it, but i don't see the usecase for it :(
08:52 sri say you have multiple uses for a websocket on the frontend
08:52 sri like, a chat and a stock ticker
08:52 sri the idea of this kind of multiplexing is to use the same websocket connection easily for both kinds of messages
08:53 sri without having to worry about serializing and meta fields in the json
08:55 sri now, in my mind, a core version of websocket multiplexing in core would even go a little further, and add a new concept of controller, where these different classes of messages are dispatched to
08:55 sri s/in core/
08:55 sri what jberger did is the most minimalistic version, which is pretty good for a plugin
08:59 batman sri: yeah, i can see the usecase for a more complex system, but i don't see how the multiplex header give me any more than just posting json with {"type":"myevent", ...} or {"channel": "#mojo", ...}
08:59 batman /complex system in core/
09:00 sri it's just abstraction
09:00 sri and it's supposed to handle little details like reconnect
09:01 * batman is not convinced :/
09:02 cuechan joined #mojo
09:03 batman ...about Mojolicious-Plugin-Multiplex
09:22 * ashimema was wondering the same things.. but felt silly wondering them
09:46 mpapec I'm convinced about ws multiplexing as I've had to write my own controller
09:47 mpapec http://stackoverflow.com/questions/13373734/is-rest-over-websockets-possible
09:47 mpapec (20k views)
10:08 sri hahaha, this is hilarious https://circleci.com/blog/its-the-future/
10:08 sri our industry in a nutshell
10:15 romel joined #mojo
10:19 osfabibisi joined #mojo
10:23 Pierre joined #mojo
10:24 mishanti1 sri: Funny read. I might be an old fart, but I did not read it as satire (like the author meant it) at all.
10:25 marcus mishanti1: it def. reads as satire
10:25 mishanti1 It seems all our industry is spending time doing these days is spend time to find new ways to waste time.
10:29 mpapec imo, it's all about horizontal scaling, redundancy, and "easier" deployment
10:30 mpapec the main question is "do I need this?"
10:32 mpapec and second perhaps, "at which point I start to benefit from such infrastructure?"
11:17 CHYC joined #mojo
11:18 tchaves joined #mojo
11:21 tchaves joined #mojo
11:25 Pierre joined #mojo
11:31 tchaves joined #mojo
11:36 jberger sri: hahaha just read that one too
11:37 jberger And no mine doesn't handle reconnect yet, but it needs to
11:43 cafe joined #mojo
12:03 jontaylor joined #mojo
12:04 Pierre joined #mojo
12:28 Pierre joined #mojo
12:35 zivester joined #mojo
12:40 gizmomathboy joined #mojo
12:47 neilhwatson joined #mojo
12:54 jontaylor joined #mojo
13:18 jberger I don't think i want to be in #perl anymore
13:20 jberger I'm not sure I've seen one person helped that wasn't also yelled at
13:20 jberger Sure the questioners are strong with the derp
13:20 jberger But sigh
13:24 ribasushi whenever I notice this kind of crap, I open a pm, apologize on behalf of the channel in question (if only it were #perl) and try to wrap up whatever was left to answer
13:24 cuechan joined #mojo
13:24 ribasushi not ideal, but don't have the mental energey to "clean up house"... yet
13:29 ribasushi jberger: which #perl btw - agnet or freenode or both?
13:31 genio I gernerally only pay attention to freenode #perl.  it hasn't seemed so bad lately.
13:45 batman jberger: you can steal the reconnect code from convos
13:55 jberger ribasushi: magnet
13:56 jberger I know #mojo isn't and hasn't always been perfect
13:56 jberger but I DO feel like we are actually trying
13:58 cafe blz
13:59 cafe ops, wrong focused window :)
14:00 cafe thankfully wasn't something like P@ssw0rd, lol
14:01 ribasushi I only see hunter2 on my screen...
14:01 nic It might be a character set issue, but mine is only showing Password123
14:02 cafe jberger, I can tell that IMHO, the perl community is a very kind one, in general
14:03 jberger cafe: I agree, in general
14:04 cafe I'm not sure about #perl, but the module-related channels a filled with kind and helpful people... and I ask for help here on irc for more than 6 years
14:05 cafe I can see that on YAPC videos as well
14:06 ribasushi cafe: generally you are correct and I am glad your combined experience is a positive one
14:06 cafe :)
14:06 ribasushi what "the old guard" is decrying is that at times there is *way too much* room for improvement
14:06 jontaylor joined #mojo
14:07 ribasushi it's all a relative thing
14:07 cafe I understand
14:13 cafe watched a sawyerx talk on youtube some weeks ago.. where he told about when he first came to irc asking for help, and someone spent hours explaining even the most basic things to him... and later he found out that the guy was some very experienced developer.. and how amazing that was and stuff
14:14 jberger cafe: that i totally agree with
14:14 cafe i have the same filling about that
14:14 cafe sorry, feeling
14:14 cafe :)
14:14 cafe I came here on the CGI day.. someone pointed at Mason
14:14 cafe the Catalyst...
14:14 purl it has been said that the catalyst is better than mojolicious
14:15 jberger purl: forget catalyst
14:15 purl jberger: I forgot catalyst
14:15 cafe someone pointed to DBIx::Class from pure DBI I was using as the time
14:16 cafe also Moose... when it was a new thing
14:16 nic grrrr, purl, you are nothing but annoying noise
14:16 jberger There are only a few people now that can be really abusive
14:16 jberger And even they mostly are ok unless you set them off
14:16 cafe yeah
14:17 jberger It just is unfortunate that they feel the need to do that
14:17 cafe we even have people that can yell at you and you still like him
14:17 cafe you know... strange accent guys
14:17 cafe lol
14:17 jberger And at least in one case they feel like they are doing a service to the community in doing so
14:18 jberger We might be talking about the same person
14:18 cafe lol
14:18 jberger Who for the record i do actually like
14:20 cafe Only people without sense of humor doesn't
14:20 arthas joined #mojo
14:21 genio IRC is hard as text is difficult to convey tone, etc.  When you're trying to be helpy and people can't grasp what you mean, it takes a lot of effort to back up and re-explain differently.  So, people trying to help get easily frustrated.  If you're asking for help and don't understand the help you get, you get caught in a cycle of dumb and unless you're willing to go and research and read, you're going to annoy those trying to help you even ...
14:22 genio ... further.
14:22 nic Do flash values need to be scalars?
14:22 genio knowing when to stop and go read on your own is the hard part.
14:22 nic (The only examples are for strings)
14:22 cafe back in the teenager days (late 90') on irc "hackers" channels was a lot worse, really harsh
14:23 nic There was an element of the wild west to be sure
14:23 cafe genio, yeah.. most of the time o got yelled at I haven't explained my problem properly
14:24 genio If you can take the yelling with a grain of salt and realize that you're ignorant of a topic and go read, you won't have a problem.  If you continue asking the same question different ways, you get yelled at more.
14:26 cafe yeah.. there is guilt on both sides... but real kind people can be kind even on that situation (easier said than done)
14:27 Lee sometimes people just need a duck
14:28 zivester joined #mojo
14:28 nic a duck?  not heard that advice before
14:29 Lee https://en.wikipedia.org/wiki/Rubber_duck_debugging
14:29 genio nic: flash: https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Controller.pm#L121-L134
14:29 cafe lol, duck debugging is new to me :)
14:30 cafe DDD - Duck Driven Development
14:30 * nic hangs up phone to the pet shop
14:35 jberger as I said the other day, beautiful plumage
14:36 jberger nic: I'm pretty sure it can be any datastructure that can be serialized to json
14:36 jberger but then again, it is subject to the same size restrictions as a cookie
14:36 jberger and it is the sum of the session and flash sizes since they are stored in the same cookie
14:37 nic yeah, that's the way it looks.  thanks genio & jberger
14:59 blonewolfs joined #mojo
15:05 * sri wonders why nobody has made a patch for 988 yet
15:05 sri the solution i came up with is a bit costly https://gist.github.com/anonymous/6cb0ed7ad64c91c05facd6f49a41df53
15:10 jberger sri: what about socks?
15:10 sri ?
15:11 jberger I thougtht that socks:// was a valid protocol?
15:11 jberger maybe I'm wrong
15:11 sri for the proxy attribute, not the url
15:12 jberger oh, ok, I've never used socks so I didn't know that
15:13 sri point taken though, think i'll -1 the feature
15:13 sri next thing someone requests validation of the proxy url
15:14 sri then headers
15:14 sri and we'll be slow as hell
15:16 lluad joined #mojo
15:17 jberger :s
15:17 jberger I can't really argue against either side
15:17 jberger what was the cost looking like?
15:18 jberger is two string comparisons slower than one regex?
15:18 Bean joined #mojo
15:20 sri and voted https://github.com/kraih/mojo/issues/988#issuecomment-240446274
15:20 sri jberger: i mean 4 lines of code
15:24 jberger I don't think I can get rid of any lines
15:24 jberger I'm kinda surprised Carp wasn't already loaded
15:24 jberger but I guess not
15:25 sri anyway, i'm more worried about setting a precedent
15:25 genio honestly, I'd limit that to just '
15:25 genio oops.
15:26 bobross joined #mojo
15:26 bobross Using the example on Mojo::UserAgent documentation regarding Websockets, in the IO::Loop, how do I send a ping every 30 seconds?
15:27 bobross I've got the $tx->on(json => sub {}); and below that $tx->send({json => {});
15:27 genio sri: Would starting a blacklisted set of protocols not be a less slippery slope?  croak qq/Unsupported protocol "$proto"/ if $proto && $proto eq 'file';
15:27 jberger Mojo::IOLoop->recurring(20 => sub { ... })
15:28 bobross jberger, do I modify this Mojo::IOLoop->start unless Mojo::IOLoop->is_running; and add that, or do I put it in the $ua->websocket callback?
15:29 bobross I have the loop listening for websocket messages, but I'd also like to send a message every 30 seconds as well.
15:29 bobross sorry for my ignorance here
15:30 jberger starting the loop is blocking, so you need to do it before then
15:30 bobross But wouldn't tx be undefined then?
15:31 jberger which example are you reading?
15:31 jberger in the useragent synopsis?
15:31 jberger at the end of the connect callback, there is a send
15:32 jberger just add a recurring after or in place of that send
15:32 bobross $ua->websocket('ws://server/ws' => sub { my ($ua, $tx) = @_; $tx->on(json sub => {}); $tx->send({json => {}); }); Mojo::IOLoop->start unless Mojo::IOLoop->is_running;
15:32 bobross That's pretty much the code with the stuff in the on cut out, and the send cut out
15:32 jberger right, so you see where you can send
15:32 jberger so set up the recurring right around there
15:32 bobross Ohhh, :D
15:33 bobross Thank you jberger, that makes sense
15:34 bobross That works, you're a boss.
15:40 * jberger blushes
15:40 nicomen joined #mojo
15:42 dod joined #mojo
15:42 PryMar56 joined #mojo
16:00 cuechan joined #mojo
16:02 jabberwok re #988 perhaps in Mojo::UserAgent::Transactor POD adding: "The HTTPS protocol will if it is specified; otherwise HTTP is used, even if other protocols (file:, smtp:, nttp:, etc) are given."
16:17 bobross Hm, even with the loop sending a ping it seems websockets stops receiving messages after a few minutes. Javascript client does not have this issue. Is there some way to set timeout for websocket?
16:18 bobross Or to debug what's happening I guess
16:32 good_news_everyon joined #mojo
16:32 good_news_everyon [mojo] kraih tagged v7.02 at 80a32bd: https://git.io/v6ozb
16:32 good_news_everyon left #mojo
16:34 good_news_everyon joined #mojo
16:34 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v6ogt
16:34 good_news_everyon mojo/master 1cf011b Sebastian Riedel: bump version
16:34 good_news_everyon left #mojo
16:35 sri oh shit
16:35 sri i uploaded a broken release :(
16:37 sri accidentally included the user agent protocol check
16:38 Kripton joined #mojo
16:39 good_news_everyon joined #mojo
16:39 good_news_everyon [mojo] kraih tagged v7.03 at f51cca4: https://git.io/v6ogx
16:39 good_news_everyon left #mojo
16:39 * Grinnz_ is thankful for [Git::Check]
16:40 good_news_everyon joined #mojo
16:40 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v6o2t
16:40 good_news_everyon mojo/master 25ae8ab Sebastian Riedel: bump version
16:40 good_news_everyon left #mojo
17:14 Grinnz_ sri: typo in example, https://metacpan.org/pod/Mojo::Pg::Database#results_class
17:15 Grinnz_ references $pg instead of $db
17:16 sri oops
17:27 trone joined #mojo
17:45 tchaves joined #mojo
18:06 sri Grinnz_: ohoh, lots of nerfs and buffs coming to overwatch
18:06 sri Grinnz_: https://playoverwatch.com/en-us/blog/20243886#patchnotes
18:09 abra joined #mojo
18:11 jabberwok when I'm in a sub inside MyApp::Model::Cart, how can I call a method in MyApp::Model::Order for example?  i.e., inside a Model how can I get the controller's App object ? or am I doing this wrong
18:17 Grinnz "Sit and laugh emotes are now unlockable for all heroes" FINALLY
18:17 Grinnz ;)
18:18 Grinnz jabberwok, if the model needs the app you might be doing it wrong, usually you pass what the model needs to the particular method
18:19 Grinnz but i havent used specific model classes much myself
18:38 Grinnz sri, the genji nerfs, daaaamn
18:39 Grinnz the zenyatta and lucio ones were kinda expected though :P
18:56 cafe what!? is this HoN + Quake?
18:57 cafe okay, i'll pretend i haven't seen that game.. safer. lol
19:01 neilhwatson joined #mojo
19:12 Grinnz one of us! one of us!
19:16 mauke I've got you in my sights
19:18 Grinnz we're all overwatch players now
19:21 Bean you may want to append overwatch to the topic of the irc
19:27 cafe joined #mojo
19:34 jabberwok what is overwatch?
19:34 purl it has been said that overwatch is definitely fun, not sure it's enough content to justify the price though
19:34 Topic for #mojo is now 🍩 nom nom | http://mojolicious.org | http://irclog.mojolicious.org | http://code-of-conduct.mojolicious.org | Overwatch!
19:35 * sri likes #mojo being somewhat of a social channel, as long as it doesn't get out of hand
19:35 sri Grinnz: looks like hanzo is back in the meta
19:42 Grinnz_ jabberwok: do you know team fortress 2? that's the closest comparison
19:43 Grinnz_ it's that, but with 22 heroes and blizzard style
19:44 Grinnz_ sri: i'm curious if the faster arrows will be enough to make him more consistent
19:44 Grinnz_ that was his biggest problem at high level
19:44 Phil21 What's a Mojo devs favorite Overwatch toon?
19:44 sri Grinnz_: just watched a twitch stream of the ptr, yes, hanzo is a beast
19:44 Phil21 Answer: Hanzo.  Because all Mojo devs love them some arrows.
19:44 Grinnz_ seagull? :)
19:44 sri Grinnz_: yes :D
19:45 Grinnz_ he was very salty about the genji nerfs lol
19:45 mauke mei $foo;
19:46 Grinnz_ Phil21: ahah, took me a while
19:47 sri http://instantrimshot.com/index.php?sound=rimshot&play=true
19:53 Phil21 Grinnz_: :)
19:53 Phil21 the office joke is giving shit about arrows to jberger
19:53 Phil21 if there is a bug it's just "why don't you add some more arrows?"
19:55 jabberwok Grinnz_: no... about the only game i play is simutrans ... never had a videogame system altho a friend did have an atari 2600. i tried mario brothers once but couldn't figure out all the buttons, it doesn't fit my hand, do folks use their thumb instead of fingers for those things?  =shrug=
19:56 Grinnz_ jabberwok: heh then i dunno what to relate it to... it's an online multiplayer 6v6 first person shooter, where everyone plays one of 22 characters that each have very different abilities (even their basic attacks)
19:57 jabberwok ah.  I did play everquest for a bit in the 90s but i don't like shoot-em-up things really. as long as i could stick to fishing and trading and spells i enjoyed it, after that meh
19:58 jabberwok if i wrote a game it would probably be called "I _CAN_ Drive 55."
19:59 Grinnz_ heh. there is the truck simulator games ;)
20:00 lluad You might like "Desert Bus" then.
20:01 sri some people just drive around all day in gta v too
20:02 Grinnz_ heh, i wasted a bit of time following traffic laws in LA noire
20:03 jabberwok i just know that any time someone has me try mario brothers, all this stuff comes flying at me and then i'm dead.  "what are all those things? what do i do?" so lost... lol
20:04 Grinnz_ i dont like the original mario bros style games much myself. too much focus on a time constraint. i like the super mario 64 style where you have as much time as you want to explore
20:07 mauke all the buttons? mario brothers uses 2
20:07 mauke and the d-pad
20:07 Grinnz_ and yes people use their thumbs for them :P
20:08 Grinnz_ thats one of the limitations of the modern gamepad still, you generally only can press 1 button on the face with your thumb, and 1 on the shoulder, on each side of the gamepad at once
20:09 Grinnz_ and thats including the analog sticks for moving and looking
20:09 pink_mist err, you can easily mash two buttons with your thumb =) (depending on your thumb, maybe even three or four)
20:09 mauke or 3
20:10 mauke required for some moves in street fighter
20:10 mauke also, super metroid: run + jump + shoot
20:10 Grinnz_ yeah though some combos are not so fun as i found in arkham games :P
20:10 Grinnz_ X+Y usually required repositioning my right hand
20:12 Bean To be clear, I think the irc is great. Love the lighthearted discussion. Hope I didn't come off as patronizing
20:23 jabberwok i figured if there are four buttons, it should be one button per finger.
20:23 jabberwok at least three fingers, like WASD or arrows
20:25 Grinnz_ yeah it works differently, you're (outside of the above mentioned instances) expected to press one at a time
20:28 jabberwok curious.  then again i also was taught it is rude to dial a telephone with your thumb and i still can't/won't do it
20:28 Grinnz_ haha
20:29 Grinnz_ wanna see something even crazier for your thumb? http://www.razerzone.com/gaming-mice/razer-naga
20:30 Grinnz_ a lot of MMOs at high levels you commonly have 12+ abilities that you need to be able to activate quickly, so that happened
20:31 Grinnz_ (and non-number keys are usually all used up as menus and such)
20:32 Grinnz_ glad i never bought one though, i don't play MMOs anymore :P
20:32 jabberwok the thumb is for the spacebar.
20:33 Grinnz_ well on my current mouse, the thumb is for push-to-talk and melee :)
20:33 * jabberwok waves his deck of punchcards -- Whippersnappers!
20:34 Bean Nothing compares to Starcraft imo https://www.youtube.com/watch?v=glSiSoAounY
20:36 jabberwok Bean ++
20:36 mauke jabberwok: the original NES only had 2 buttons there
20:37 mauke http://www.gamnesia.com/images/uploads/NES-controller.jpg
20:39 Grinnz_ the gameboy through gameboy advance, too
20:44 jabberwok ah, i had used one of those once.... right index finger on A, middle finger on B, left two fingers on 'joystick'
20:48 Bean That's one way to approach it I guess
20:48 mauke what the hell
20:55 laidback_01 joined #mojo
21:45 jnbek joined #mojo
21:55 mcsnolte joined #mojo
21:59 meshl joined #mojo
22:47 mvorg joined #mojo
22:49 mvorg hi everybody: I'm trying to use an instance of Mojo::Log to output messages to both a file and on stderr, but as soon as I set a file, stderr is ignored...any hints?
23:01 Grinnz_ you can use the message event to log however you need https://metacpan.org/pod/Mojo::Log#message
23:01 Grinnz_ the default message event handler only logs to `handle` which is stderr or a filehandle
23:14 zivester joined #mojo
23:21 mvorg Grinnz_: can a log object have more than one "handle" ? Otherwise I see the only way to output also on stderr is to create another Mojo::Log and use then inside the message callback...
23:23 Grinnz_ no, it cannot
23:24 mvorg then how the message event could help me?
23:24 Grinnz_ you don't need a Mojo::Log to output on stderr, just warn, you can even call the format callback yourself
23:26 mvorg by merely warning a string I won't get the default format (date/time) right?
23:26 Grinnz_ my ($log, $level, @lines) = @_; warn $self->format->(time, $level, @lines);
23:27 Grinnz_ er, replace first $log with $self
23:27 Grinnz_ or other way around since you aren't doing this in the log class. sorry lol
23:27 Grinnz_ my ($log, $level, @lines) = @_; warn $log->format->(time, $level, @lines);
23:28 mvorg oh ok the other way around, replace first $self with $log...
23:33 mvorg mmhh...I get an exception because the format subroutine callback can't handle the string returned by time...
23:34 orev joined #mojo
23:36 mvorg is there any method to get the same default format (day/time) and warning a string ?
23:37 Grinnz_ sorry what? time() returns an epoch timestamp
23:38 Grinnz_ what exception?
23:38 purl exception is A reasonable response to an unreasonable situation.
23:45 mvorg Grinnz_: assuming I got right your suggestion, this throw exceptions: http://paste.scsys.co.uk/531865
23:46 Grinnz_ mvorg: missing an arrow after 'format'
23:46 Grinnz_ format returns a coderef which is what you're actually calling there
23:48 mvorg Grinnz_: ups....thank you! it's working now...
23:48 Grinnz_ another thing to keep in mind, your callback will warn on any log level unless you also check that yourself
23:49 meshl joined #mojo
23:49 Grinnz_ you could do that by adding "if $log->is_level($level)" condition to the warn
23:49 mvorg Grinnz_: right(!!)..double thanks!
23:50 mvorg it's very late here...see you later...thanks again for the support...

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