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

IRC log for #mojo, 2015-11-16

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

All times shown according to UTC.

Time Nick Message
00:19 sri oh, 25 more commits and we'll reach 10000 :o
00:20 * jberger waits patiently
00:59 jontaylor joined #mojo
01:03 asarch joined #mojo
01:39 voldemortensen joined #mojo
01:40 jontaylor joined #mojo
02:11 lluad joined #mojo
02:18 sri jberger: packaging error ;p https://api.metacpan.org/source/JBERGER/Mojolicious-Plugin-MountPSGI-0.05/
02:20 sri i think the convention is to have custom keys in the psgi env lower case (not MOJO.CONTROLLER)
02:26 jberger sri: gahhhh
02:26 jberger I hate Makefile.PL
02:26 * jberger blames marcus for everything
02:41 kaare joined #mojo
02:41 aborazmeh joined #mojo
02:47 aborazmeh joined #mojo
02:49 jberger I guess I could have added mojo.controller
02:49 jberger but oh well
02:49 cpan_mojo Mojolicious-Plugin-MountPSGI-0.06 by JBERGER https://metacpan.org/release/JBERGER/Mojolicious-Plugin-MountPSGI-0.06
03:02 McA joined #mojo
03:10 inokenty-w joined #mojo
03:13 jberger this is interesting: http://www.effectiveperlprogramming.com/2015/11/apple-recommends-installing-your-own-perl/
03:13 jberger I wonder if other OS distributors have ever made similar recommendations
03:13 jberger it would be good ammo for the "but we always use system perl" crowd
03:14 sri i wouldn't be surprised if they all did that
03:14 jberger in conversation sure, but is there something we can link to?
03:28 noganex joined #mojo
04:11 bpmedley joined #mojo
05:00 irqq joined #mojo
05:06 ichi joined #mojo
05:15 irqq joined #mojo
05:33 jontaylor joined #mojo
05:39 melo joined #mojo
05:59 ichi joined #mojo
06:36 cpan_mojo Mojo-IRC-Server-Chinese-1.7.6 by SJDY https://metacpan.org/release/SJDY/Mojo-IRC-Server-Chinese-1.7.6
06:36 buu I can serve chinese?
06:38 buu How random
06:40 preaction no, that's an IRC server
06:40 preaction that's awesome
06:42 buu What makes it chinese?
06:42 preaction i imagine because all the log messages and docs are in chinese
06:47 preaction but with that, and convos, one could build an entire, self-contained, web-based team messaging platform
07:03 Lee joined #mojo
07:10 Averna joined #mojo
07:13 buu I thought there was already a mojo-irc server
07:14 marcusr Mojo::IRC::Server::Japanese
07:14 buu preaction: Have you seen uh gitter.im
07:14 preaction nope
07:14 buu Well, now you have
07:14 marcusr I would prefer that the chinese started using english on cpan, but until then I'm quite pleased with the ::Chinese namespace
07:15 preaction buu: is it built in perl?
07:15 buu no
07:15 preaction i mean, otherwise, why not slack?
07:15 buu Dunno, does slack do irc?
07:15 preaction yep
07:15 marcusr It has a gateway
07:15 buu No idea
07:15 buu A project I was attempting to communicate with has a gitter channel
07:16 buu It's not awful
07:16 dod joined #mojo
07:18 dod joined #mojo
07:19 dod joined #mojo
07:21 dod joined #mojo
07:30 Averna joined #mojo
07:31 Vandal joined #mojo
07:34 McA joined #mojo
07:48 melo1 joined #mojo
08:06 Vandal joined #mojo
08:06 ichi joined #mojo
08:07 salva joined #mojo
08:12 osfabibisi joined #mojo
08:16 sue joined #mojo
08:18 eseyman joined #mojo
08:32 trone joined #mojo
08:36 AndrewIsh joined #mojo
09:03 ashimema joined #mojo
09:10 Lee joined #mojo
09:16 jontaylor joined #mojo
09:17 Mattjes joined #mojo
09:23 jontaylor joined #mojo
09:29 jontaylor joined #mojo
09:51 dod joined #mojo
09:57 jontaylor joined #mojo
10:13 dod joined #mojo
10:25 dboehmer joined #mojo
10:36 dboehmer joined #mojo
10:40 kes joined #mojo
10:49 jontaylor joined #mojo
11:26 sue joined #mojo
11:51 jontaylor joined #mojo
11:52 asarch joined #mojo
11:58 jontaylor joined #mojo
12:03 neilhwatson joined #mojo
12:05 jontaylor joined #mojo
12:07 melo joined #mojo
12:27 carneirao joined #mojo
12:41 FatalNIX Something about Mojo::IOLoop is very magical
12:42 FatalNIX super easy to set up, I made a simple socket server with it and made a typo in the listener, and it didn't creash the server at all :)
12:42 FatalNIX I assume it preforks or something and I just crashed the child?
12:43 jberger No the loop has a pretty tight eval around it
12:43 kaare joined #mojo
12:44 FatalNIX Thatl do it
12:46 jberger But yes it is wonderfully stable
12:46 jberger <3 Mojo::IOLoop
12:46 FatalNIX seems to have a reactor too
12:46 FatalNIX that is exposed
12:47 jontaylor joined #mojo
12:47 jberger FatalNIX: that's how you write bindings for other loop drivers
12:47 jberger Grinnz has a few on cpan
12:47 FatalNIX ah like Reflex and AE?
12:49 jberger AE was supported via EV
12:49 jberger but POE and IO::Async
12:49 jberger What is reflex?
12:50 FatalNIX Reflex is caputos port of POE to Moose
12:50 crab what should i look at for a "best practice" example of how to write my own async tcp client using Mojo::IOLoop?
12:50 FatalNIX or whatever
12:50 FatalNIX it's a lot different than POE though
12:50 FatalNIX to me
12:51 FatalNIX I've been using Reflex for a while and I love it, but it took me a while to get used to it
12:52 FatalNIX jberger: as far as I've noticed, it makes heavy use of Moose roles to handle the event stuff, which is kinda fun
12:53 FatalNIX no more crazy kernel->yield( foobar => args )
12:54 jberger I have really used POE, I've always heard that it's patterns are a bit different
12:54 jberger Have NEVER really
12:54 buu POE has a much more formal approach to event oriented programming
12:54 buu It's kinda like catalyst compared to cgi::app
12:55 FatalNIX buu: I like POE, but I have -always- thought POE was a one way ticket to making my code super ugly
12:55 FatalNIX other than that it's pretty awesome
12:55 nic batman: Were you working on something a while back related to crab's question?
12:59 batman nic, crab: i was working on a tcp server, built on top of "prefork"
13:00 batman crab: not sure what more than this you need: https://metacpan.org/pod/Mojo::IOLoop::Client ?
13:00 nic ah, cheers
13:01 jontaylor joined #mojo
13:01 FatalNIX I love how the configuration for teh ioloop server is in a hashref
13:02 FatalNIX means I can just drop in a segment of the configuration file data structure
13:02 FatalNIX no more knitt picking at hashref values!
13:03 FatalNIX sudden off topic news: .. my laptop didn't crash last night, but I found its hard drive on the floor this morning. Good thing it's an SSD...
13:03 crab batman: examples of how to do things other than connecting might be a start. ;)
13:04 FatalNIX nod
13:04 FatalNIX crab: like sending data?
13:05 crab that might someday come in handy in a tcp client, for sure.
13:06 jontaylor joined #mojo
13:06 * FatalNIX hates TCP
13:09 FatalNIX there are times when a reliable UDP connection or something is so much better, and ridiculously faster. I'm just kind of upset that the whole world has settled in on TCP, and not continued to use other protocols so much when they should, like RUDP, SCTP, DCCP, etc
13:12 punter joined #mojo
13:13 FatalNIX TCP is pretty useful, but it is also a bit overkill for a lot of stuff and cuts your bandwidth a lot.
13:15 crab a reliable UDP connection
13:15 jontaylor joined #mojo
13:16 FatalNIX There are plenty of those, too, like TFTP
13:17 FatalNIX but I don't think TFTP adds a connection to it, I believe it remains connectionless.
13:25 hernan605 joined #mojo
13:31 FatalNIX crab: if I were designing a 3D game protocol or something, I would likely use UDP and possibly require an acknowlegement for every X ammountof movement position update packets, calling them position keyframes, and then for everything that is important otherwise, require acknowledgements as well. For just about everything I would need for that, datagram order isn't a necessity that I can think of.
13:32 crab ok.
13:32 FatalNIX I talk too much. :P
13:32 crab you could call it FTP, short for FaTalnixP
13:33 buu FatalNIX: A lot of games do you use udp
13:33 buu er, do use
13:33 buu And there's a lot of semi-reliable protocols built ontop of udp
13:34 FatalNIX buu: this is true
13:34 gryphon joined #mojo
13:39 FatalNIX buu: unless you're playing Minecraft, and then you have an application protocol mostly made up of strings that are all UTF-16 so that every other octet in the packet is almost always just 0x0
13:39 FatalNIX causing everything to use ~twice as much bandwidth as it needs
13:41 batman FatalNIX: tftp is not very fast, since it require "ack" on each packet before sending a new
13:41 batman i think tftp is because of it's simplicity, not because of speed
13:41 batman (the ack is on the application level)
13:41 FatalNIX Whoever said that TFTP is fast? :P{
13:42 FatalNIX I only gave tftp as an example of something that uses UDP with some reliability
13:42 batman hehe... just wanted to mention it since you mentioned "...and ridiculously faster" in a sentence back
13:45 val joined #mojo
13:46 FatalNIX the speed thing is variable by a lot of factors and isn't always the best selling point
13:49 FatalNIX in Minecraft, I've been porting ATM and STM to this computer in some mod called open computers. with just plain ATM the maximum bandwidth is about 1KB/s
13:49 gryphon_ joined #mojo
13:49 FatalNIX but sitting ATM on top of STM gives me about ~160KB/s
13:50 crab more layers == more speed?
13:50 FatalNIX no
13:50 FatalNIX that's like saying global warming kills pirates :P
13:50 crab more excitement == more typos?
13:51 FatalNIX crab: in that case, it is because the default setting for a relay switch in that mod is 20 packets per second
13:51 FatalNIX or something like that, I forget the actual numbers, and then MTU is like 8KB
13:52 crab i have no idea what any of this means. but did you actually mean 1KB/s?
13:52 FatalNIX by putting ATM cells in STM streams, I can multiplex hundreds of ATM cells at the same time and send them interlaced
13:53 FatalNIX yeah, so if I just used ATM it'd be about 1KB/s max, with STM I can have hundreds of 1KB/s streams, if you want more bandwidth, you just need to confugure your switch to aggregate the cells.
13:53 FatalNIX kind of like a T1 / T3
13:57 neilhwatson joined #mojo
14:02 marcusr /win 19
14:02 marcusr agh
14:02 jberger marcusr: did you see/like the recent MountPSGI work?
14:03 marcusr jberger: I did now. Looks great.
14:03 marcusr jberger++
14:03 jberger cool
14:05 ajr_ joined #mojo
14:06 FatalNIX marcusr uses irssi
14:06 FatalNIX :)
14:06 FatalNIX probably?
14:09 jberger marcusr: what no convos?
14:09 FatalNIX ooh, Galileo looks different
14:10 jberger different from what?
14:11 FatalNIX just looks like some of the text change3d
14:11 jberger the text?
14:12 FatalNIX ah crap I gotta run for the bus!
14:18 * CandyAngel hopes String::Interpolate is at least somewhat safe >.>
14:19 melo joined #mojo
14:20 FatalNIX meh. can't find my keys so I missed it. Anyhow, it just looked like the pages were updated
14:20 FatalNIX but I also didn't check for a couple years
14:45 voldemortensen joined #mojo
14:50 melo joined #mojo
14:54 crab i appreciate Mojo::Template so much when i have to deal with things like jinja2
14:57 FatalNIX onteresting.. I can't seem to get accept working with Mojo::IOLoop::Server
14:59 shadowpaste "fatalnix" at 217.168.150.38 pasted "accept not working" (34 lines) at http://paste.scsys.co.uk/501565
15:00 FatalNIX I must have made a typo I can't seem to see somewhere ^
15:00 Grinnz you didn't close the Mojo::IOLoop->server
15:01 Grinnz or the $stream->on( s
15:01 Grinnz heh
15:01 FatalNIX it doesn't use that under the hood?
15:01 Grinnz no i mean you didn't close the braces
15:01 FatalNIX ...
15:01 Grinnz wait, i guess i am just reading the indenting wrong
15:01 FatalNIX oh crap
15:02 Grinnz nevermind, i got confused because the sub opens werent lined up with the function opens
15:02 FatalNIX wait no I mean.. I'm getting data on read...
15:02 FatalNIX yeah I had to do that because emacs was being a dick
15:03 FatalNIX otherwise it put the damn ending bracers all the way to the right
15:06 FatalNIX I'd preferrably have them point to another non anonymous function but I dunno how I'd reliably pass a reference to $self that way
15:06 crab is there a Mojo::DOM-style CSS parser?
15:08 bpmedley_ joined #mojo
15:28 PryMar56 joined #mojo
16:13 McA joined #mojo
16:17 jb360 joined #mojo
16:23 marcus jberger: I'm on convos here.
16:24 marcus jberger: marcusr is my work tmux, I'm using it to connect to work jabber as well, using bitlbee
16:24 marcusr o/
16:27 sri crab: http://mojolicio.us/perldoc/Mojo/IOLoop#SYNOPSIS
16:39 asarch joined #mojo
16:44 FatalNIX YAY! I just found my keys after hours
16:44 FatalNIX they were in front of me next to my keyboard, under my CRT
16:44 FatalNIX this whole time
16:44 Grinnz_ i found your problem. you've traveled back to the year 2000
16:45 FatalNIX lol
16:45 FatalNIX Nah. it has a nice resolution
16:45 FatalNIX 2048x1536
16:46 FatalNIX being 22" and having a nice flat screen it works quite well for when I'm at my desktop. But I spend most of my time on my laptop
17:17 jontaylor joined #mojo
17:33 bpmedley joined #mojo
17:44 sh4 joined #mojo
17:53 mtj joined #mojo
18:10 disputin joined #mojo
18:20 bobkare joined #mojo
18:20 disputin joined #mojo
18:46 ichi joined #mojo
18:49 hernan605 joined #mojo
18:54 hernan605 joined #mojo
19:05 denny joined #mojo
19:05 stephen joined #mojo
19:06 trone joined #mojo
19:13 trone_ joined #mojo
19:46 batman sri: what do you suggest i do? https://github.com/jhthorsen/mojo-ioloop-readwritefork/issues/2
19:47 sri stop using the file backend ;p
19:47 sri or adopt it
20:01 batman it's for the test that failed a couple of weeks ago
20:02 marty joined #mojo
20:03 batman i guess i can just change to sqlite...
20:03 batman another thing: should the generated app use $app and $c instead of $self? https://metacpan.org/source/SRI/Mojolicious-6.31/lib/Mojolicious/Command/generate/app.pm
20:04 sri why should it?
20:06 batman i thought it might be easier to follow, compared the $c and $app used in the documentation.
20:07 sri but nobody uses $app/$c in that context
20:07 sri it's bad style
20:08 batman oh. i thought jberger did that... i was planning to adapt the style :)
20:08 batman why do we use $c/$app in the documentation then?
20:08 sri i think you misunderstood soemthing
20:09 sri we always use $self when referring to an instance of the current class
20:12 batman okidoki
20:12 sri or did you actually see anything in the docs? that could be a typo
20:13 batman $c is used all over the place in Mojolicious::Controller (under each method, not the synopsis)
20:13 sri link?
20:14 batman https://metacpan.org/pod/Mojolicious::Controller#app
20:14 sri there is no context, for all you know it's called from outside the class
20:15 dod joined #mojo
20:15 sri the synopsis (with context!) literally uses $self https://metacpan.org/pod/Mojolicious::Controller#SYNOPSIS
20:15 batman that's what i just said :)
20:15 sri that's not what you said
20:15 batman i think i get it now. not my style, but it's fine :)
20:15 batman "under each method, not the synopsis" <---
20:16 sri the $self convention depends entirely on context
20:16 batman sure
20:16 batman thanks
20:30 voldemortensen joined #mojo
20:32 sri oh, you said it
20:33 sri anyway, if that's jberger's style, i strongly disagree with it
20:34 voldemortensen joined #mojo
20:38 ribasushi joined #mojo
20:44 ajr_ joined #mojo
20:50 jberger Yes I do always do $app and $c and $plugin
20:51 jberger Specifically because $app->helper_name receives a controller instance
20:52 jberger And because most of my helpers are created by plugins
20:52 jberger So the context IS strange for new users
20:52 sri this is not about helpers
20:52 sri but actual methods in a class
20:57 batman not sure if using $c instead of $self is the worst thing to do... like $self inside a delay() looks a bit odd to me.
20:57 batman (not saying it's right either)
20:58 sri huh
20:58 sri $self inside a delay is wrong
20:59 Grinnz_ unless you are referring to an outer $self?
20:59 sri closing over a $self is something else
21:00 batman sri: so how do you do this then? https://ssl.thorsen.pm/paste/d21706224fa9
21:00 sri there si absolutely nothing wrong with that
21:00 mattastrophe1 joined #mojo
21:01 batman but the steps are called on $delay, so inside the sub{}, $self should be $delay
21:01 sri no
21:02 sri context again!
21:02 batman Delay.pm has eval { $self->$cb(@args); 1 }
21:02 batman so $cb is called on $self, which in that context is $delay
21:02 sri NOOOO!!!!
21:02 Grinnz_ you aren't creating the delay in Delay.pm
21:02 Grinnz_ or a subclass of Delay.pm or anything
21:03 Grinnz_ $self is only an object of the current class
21:03 sri $self is a convention that depends entirely on the current class
21:04 jberger sri is saying that if the top of your file says "package MyClass" and you are writing sub (MyClass::)method_name { } then the invocant should be $self
21:04 jberger he's also saying that if those conditions are not true, then the instance should not be called $self
21:04 * sri nods
21:04 jberger I agree entirely with the second point
21:05 batman ok. thanks.
21:05 jberger I don't mind being super clear about the first case though, ie when defining the instance methods themselves, if there is ANY chance of confusion, I still use a semantically named invocant
21:13 melo joined #mojo
21:16 sue joined #mojo
22:03 bjakubski joined #mojo
22:04 neilhwatson joined #mojo
22:05 sri wow, the letsencrypt client is a total mess
22:06 sri it actually messes with virtualenv (python perlbrew)
22:06 jberger yeah, it does lots of strange stuff
22:06 jberger the original version also messed with your nginx config
22:06 jberger though I noticed this weekend that it didn't do that that time
22:07 stephan48 isn't it made to mess with your apache and nginx config to automatically include your cert?
22:07 sri makes you wonder how much more they screwed up
22:07 stephan48 that might just be some plugin throu which they showcase alot
22:07 stephan48 ...what could possibly go wrong...
22:07 sri wouldn't be surprised if they had a major breach soon after public release
22:07 jberger well, they wrote it in python ... so
22:08 jb360 joined #mojo
22:08 sri it's like they have not thought it through at all
22:09 sri just make stuff up as they go
22:09 stephan48 i think there are already alternative clients available especially because the official client requires sudo(root) permissions
22:10 jberger I think a mojo client might be fun
22:10 stephan48 jup
22:10 Grinnz_ i think it's a matter of "there is really no good way to do this stuff automatically"
22:10 stephan48 configure a hostname and enable lets encrypt support
22:10 jberger their problem is that they want a working server so that they can make a request of the hostname and get the desired response
22:10 stephan48 few seconds later your hypnotoad app has a offical ssl cert
22:11 jberger that's easy with mojo
22:11 jberger since you don't have to block to start a server
22:11 sri yea, could just be a plugin
22:11 stephan48 yea
22:11 stephan48 it would be quite awesome throu i think
22:12 jberger preaction: if you want a quick couple bucks, a mojo letsencrypt client might be a fun tpf grant proposal
22:20 mattastrophe joined #mojo
23:05 preaction http://socket.io/blog/socket-io-p2p/ <- this looks nice. I should make Mercury's JS bits have this kind of feature
23:06 Zoffix Anyone notice that if you hotdeploy hypnotoad from two different dirs it seems to
23:06 jberger I don't know nearly enough about webrtc
23:06 Zoffix Ooops.. never mind
23:08 preaction afaict it's basically p2p sockets through browsers

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