From dfwpm at internetalias.net Wed Apr 10 11:08:39 2013 From: dfwpm at internetalias.net (Tommy Butler) Date: Wed, 10 Apr 2013 13:08:39 -0500 Subject: [DFW.pm] Meeting Tonight! Message-ID: <5165AAA7.9070906@internetalias.net> Gentle Mongers, It's that treasured time of the month again when we gather together in shared interest of the fantastic thing that is Perl. I apologize for not getting out an announcement sooner -- I do have an excuse though: my main workstation crashed and was down for repair for a week, during which repair I had a friend slice into my right leg with a machete while working in my back yard. That's a good excuse right? For reals! It hurt! But as for our meeting, we'll be gathering in the same place as usual, at 7 pm. "Come on time, or come late, there is no not-come". The floor is open tonight to discuss whatever Perl topics interest you. We'll be revisiting our curriculum based on the feedback we get. We'll also allot time for the promised interactive presentation of kickstarting a Catalyst project and firing up a catalyst application on your very own laptop. So bring a laptop, bring a friend, and bring a few bucks for a beer/soda/etc from the kitchen. Location Information 2995 Ladybird Lane, Dallas, TX www.dallasmakerspace.org (214)699-6537 See you there! Tommy Butler, AKA t-bone -------------- next part -------------- An HTML attachment was scrubbed... URL: From kassebaumj at hotmail.com Sat Apr 13 14:13:51 2013 From: kassebaumj at hotmail.com (Jerry Kassebaum) Date: Sat, 13 Apr 2013 16:13:51 -0500 Subject: [DFW.pm] CGI Web Socket In-Reply-To: References: <5123ABDB.2040103@internetalias.net>, <5123B1DB.4080407@thecommune.net>, Message-ID: Could someone please give me an HTML/JavaScript file and a Perl/CGI file to get me started with web sockets? I'd suggest something like this. A Firefox tab and a Google Chrome tab each are open to the same HTML/JavaScript site. The site has three buttons. When I press any button in either browser it changes color PLUS sends a message to my server which in turn sends a message through the web socket so that the corresponding button in the other browser also changes color. Thanks in advance! I'm willing to bribe with homebrew (mine) or homemade wine (my wife's) if that will help. Jerry Kassebaum -------------- next part -------------- An HTML attachment was scrubbed... URL: From saj at thecommune.net Sat Apr 13 16:20:08 2013 From: saj at thecommune.net (Stuart A Johnston) Date: Sat, 13 Apr 2013 18:20:08 -0500 Subject: [DFW.pm] CGI Web Socket In-Reply-To: References: <5123ABDB.2040103@internetalias.net>, <5123B1DB.4080407@thecommune.net>, Message-ID: <5169E828.2060804@thecommune.net> PDXPM did a talk on this topic on Thursday. What I gather is that you need a frontend library and a compatible backend. Socket.IO and SockJS seem to be the most popular frontends. Both have Perl modules for the backend, written by the same guy and based on Plack. PocketIO has a more interesting example and a longer history so I'm going to give that a try. https://metacpan.org/module/PocketIO https://metacpan.org/source/VTI/PocketIO-0.15/examples/chat On 04/13/2013 04:13 PM, Jerry Kassebaum wrote: > Could someone please give me an HTML/JavaScript file and a Perl/CGI > file to get me started with web sockets? > > I'd suggest something like this. A Firefox tab and a Google Chrome tab > each are open to the same HTML/JavaScript site. The site has three > buttons. When I press any button in either browser it changes color PLUS > sends a message to my server which in turn sends a message through the > web socket so that the corresponding button in the other browser also > changes color. > > Thanks in advance! I'm willing to bribe with homebrew (mine) or homemade > wine (my wife's) if that will help. > > Jerry Kassebaum > > > _______________________________________________ > Dfw-pm mailing list > Dfw-pm at pm.org > http://mail.pm.org/mailman/listinfo/dfw-pm > From saj at thecommune.net Sat Apr 13 17:18:51 2013 From: saj at thecommune.net (Stuart A Johnston) Date: Sat, 13 Apr 2013 19:18:51 -0500 Subject: [DFW.pm] CGI Web Socket In-Reply-To: <5169E828.2060804@thecommune.net> References: <5123ABDB.2040103@internetalias.net>, <5123B1DB.4080407@thecommune.net>, <5169E828.2060804@thecommune.net> Message-ID: <5169F5EB.9070705@thecommune.net> A few notes: I don't know why but the Standalone Plack backend does not work. Install Twiggy. This should do it: cpanm PocketIO Plack::App::File Plack::Builder Plack::Middleware::Static Plack::Handler::Twiggy 'plackup chat.psgi' starts up the server and will give you a local address like: http://0.0.0.0:5000/ This works but the chat.html file will be cached when you connect this way. If you want to play around with the frontend use http://0.0.0.0:5000/chat.html and you won't have to restart the server every time you change the html. Now I just need to find an excuse to use this at $work! On 04/13/2013 06:20 PM, Stuart A Johnston wrote: > PDXPM did a talk on this topic on Thursday. What I gather is that you > need a frontend library and a compatible backend. Socket.IO and SockJS > seem to be the most popular frontends. Both have Perl modules for the > backend, written by the same guy and based on Plack. > > PocketIO has a more interesting example and a longer history so I'm > going to give that a try. > > https://metacpan.org/module/PocketIO > https://metacpan.org/source/VTI/PocketIO-0.15/examples/chat > > > On 04/13/2013 04:13 PM, Jerry Kassebaum wrote: >> Could someone please give me an HTML/JavaScript file and a Perl/CGI >> file to get me started with web sockets? >> >> I'd suggest something like this. A Firefox tab and a Google Chrome tab >> each are open to the same HTML/JavaScript site. The site has three >> buttons. When I press any button in either browser it changes color PLUS >> sends a message to my server which in turn sends a message through the >> web socket so that the corresponding button in the other browser also >> changes color. >> >> Thanks in advance! I'm willing to bribe with homebrew (mine) or homemade >> wine (my wife's) if that will help. >> >> Jerry Kassebaum >> >> >> _______________________________________________ >> Dfw-pm mailing list >> Dfw-pm at pm.org >> http://mail.pm.org/mailman/listinfo/dfw-pm >> > > _______________________________________________ > Dfw-pm mailing list > Dfw-pm at pm.org > http://mail.pm.org/mailman/listinfo/dfw-pm From kassebaumj at hotmail.com Tue Apr 16 05:16:13 2013 From: kassebaumj at hotmail.com (Jerry Kassebaum) Date: Tue, 16 Apr 2013 07:16:13 -0500 Subject: [DFW.pm] CGI Web Socket In-Reply-To: <5169F5EB.9070705@thecommune.net> References: <5123ABDB.2040103@internetalias.net>, , <5123B1DB.4080407@thecommune.net>, , , , <5169E828.2060804@thecommune.net>, <5169F5EB.9070705@thecommune.net> Message-ID: Hi Stuart. Did you get the web socket to actually work for you? I'd like the url to see it in action. Let me know if you want to come by for a homebrew! Jerry > Date: Sat, 13 Apr 2013 19:18:51 -0500 > From: saj at thecommune.net > To: dfw-pm at pm.org > Subject: Re: [DFW.pm] CGI Web Socket > > A few notes: > > I don't know why but the Standalone Plack backend does not work. Install > Twiggy. This should do it: > > cpanm PocketIO Plack::App::File Plack::Builder Plack::Middleware::Static > Plack::Handler::Twiggy > > 'plackup chat.psgi' starts up the server and will give you a local > address like: http://0.0.0.0:5000/ > > This works but the chat.html file will be cached when you connect this > way. If you want to play around with the frontend use > http://0.0.0.0:5000/chat.html and you won't have to restart the server > every time you change the html. > > Now I just need to find an excuse to use this at $work! > > > > On 04/13/2013 06:20 PM, Stuart A Johnston wrote: > > PDXPM did a talk on this topic on Thursday. What I gather is that you > > need a frontend library and a compatible backend. Socket.IO and SockJS > > seem to be the most popular frontends. Both have Perl modules for the > > backend, written by the same guy and based on Plack. > > > > PocketIO has a more interesting example and a longer history so I'm > > going to give that a try. > > > > https://metacpan.org/module/PocketIO > > https://metacpan.org/source/VTI/PocketIO-0.15/examples/chat > > > > > > On 04/13/2013 04:13 PM, Jerry Kassebaum wrote: > >> Could someone please give me an HTML/JavaScript file and a Perl/CGI > >> file to get me started with web sockets? > >> > >> I'd suggest something like this. A Firefox tab and a Google Chrome tab > >> each are open to the same HTML/JavaScript site. The site has three > >> buttons. When I press any button in either browser it changes color PLUS > >> sends a message to my server which in turn sends a message through the > >> web socket so that the corresponding button in the other browser also > >> changes color. > >> > >> Thanks in advance! I'm willing to bribe with homebrew (mine) or homemade > >> wine (my wife's) if that will help. > >> > >> Jerry Kassebaum > >> > >> > >> _______________________________________________ > >> Dfw-pm mailing list > >> Dfw-pm at pm.org > >> http://mail.pm.org/mailman/listinfo/dfw-pm > >> > > > > _______________________________________________ > > Dfw-pm mailing list > > Dfw-pm at pm.org > > http://mail.pm.org/mailman/listinfo/dfw-pm > > _______________________________________________ > Dfw-pm mailing list > Dfw-pm at pm.org > http://mail.pm.org/mailman/listinfo/dfw-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From saj at thecommune.net Tue Apr 16 06:40:59 2013 From: saj at thecommune.net (Stuart A Johnston) Date: Tue, 16 Apr 2013 08:40:59 -0500 Subject: [DFW.pm] CGI Web Socket In-Reply-To: References: <5123ABDB.2040103@internetalias.net>, , <5123B1DB.4080407@thecommune.net>, , , , <5169E828.2060804@thecommune.net>, <5169F5EB.9070705@thecommune.net> Message-ID: <516D54EB.5000300@thecommune.net> Yes it did work but I was just running it on my desktop. Did you try it? I'd be happy to help remotely. On 04/16/2013 07:16 AM, Jerry Kassebaum wrote: > Hi Stuart. > > Did you get the web socket to actually work for you? I'd like the url to > see it in action. > > Let me know if you want to come by for a homebrew! > > Jerry > > > Date: Sat, 13 Apr 2013 19:18:51 -0500 > > From: saj at thecommune.net > > To: dfw-pm at pm.org > > Subject: Re: [DFW.pm] CGI Web Socket > > > > A few notes: > > > > I don't know why but the Standalone Plack backend does not work. Install > > Twiggy. This should do it: > > > > cpanm PocketIO Plack::App::File Plack::Builder Plack::Middleware::Static > > Plack::Handler::Twiggy > > > > 'plackup chat.psgi' starts up the server and will give you a local > > address like: http://0.0.0.0:5000/ > > > > This works but the chat.html file will be cached when you connect this > > way. If you want to play around with the frontend use > > http://0.0.0.0:5000/chat.html and you won't have to restart the server > > every time you change the html. > > > > Now I just need to find an excuse to use this at $work! > > > > > > > > On 04/13/2013 06:20 PM, Stuart A Johnston wrote: > > > PDXPM did a talk on this topic on Thursday. What I gather is that you > > > need a frontend library and a compatible backend. Socket.IO and SockJS > > > seem to be the most popular frontends. Both have Perl modules for the > > > backend, written by the same guy and based on Plack. > > > > > > PocketIO has a more interesting example and a longer history so I'm > > > going to give that a try. > > > > > > https://metacpan.org/module/PocketIO > > > https://metacpan.org/source/VTI/PocketIO-0.15/examples/chat > > > > > > > > > On 04/13/2013 04:13 PM, Jerry Kassebaum wrote: > > >> Could someone please give me an HTML/JavaScript file and a Perl/CGI > > >> file to get me started with web sockets? > > >> > > >> I'd suggest something like this. A Firefox tab and a Google Chrome tab > > >> each are open to the same HTML/JavaScript site. The site has three > > >> buttons. When I press any button in either browser it changes > color PLUS > > >> sends a message to my server which in turn sends a message through the > > >> web socket so that the corresponding button in the other browser also > > >> changes color. > > >> > > >> Thanks in advance! I'm willing to bribe with homebrew (mine) or > homemade > > >> wine (my wife's) if that will help. > > >> > > >> Jerry Kassebaum