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

IRC log for #mojo, 2014-11-15

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

All times shown according to UTC.

Time Nick Message
00:10 sri oooh, i missed this interesting addition to IO::Socket::SSL https://metacpan.org/pod/IO::Socket::SSL::PublicSuffix
00:28 disputin joined #mojo
00:29 disputin1 joined #mojo
00:40 good_news_everyon joined #mojo
00:40 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/HMOqoA
00:40 good_news_everyon mojo/master e644799 Sebastian Riedel: added certs directory
00:40 good_news_everyon left #mojo
00:46 good_news_everyon joined #mojo
00:46 good_news_everyon [mojo] kraih tagged v5.61 at d4172f4: http://git.io/USP-eQ
00:46 good_news_everyon left #mojo
00:47 good_news_everyon joined #mojo
00:47 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/WVjbCw
00:47 good_news_everyon mojo/master 42c388f Sebastian Riedel: bump version
00:47 good_news_everyon left #mojo
01:22 s1037989 joined #mojo
01:49 s1037989 joined #mojo
01:52 jberger soooo, I have some news
01:52 jberger today, I resigned my job
01:52 jberger my job was python system for FX trading
01:53 jberger starting Dec 1 I will be moving to a new company
01:53 bpmedley What will the new job be?
01:53 jberger its a compounding pharmacy growing quickly
01:53 jberger they need to modernize their web backend
01:54 jberger they are bringing me on, and one of my goals will be to migrate their platform to Mojolicious!
01:54 jberger I AM GOING TO BE PAID TO DO MOJOLICIOUS!!!
01:54 bpmedley Nice
01:54 jberger \o/
01:55 jberger its part of why I've been a little absent these last couple weeks, I've been rather busy
01:55 marmez Wow! Sounds interesting. Awesome.
01:57 sri \o/
01:57 marmez You're lucky man :-)
01:57 jberger sri: I hope to have a quote for the site not long afterwards
01:58 sri :D
01:58 jberger marmez: I really am
01:59 jberger sri: thanks for writing Mojolicious, core devs thanks for having me
01:59 jberger users: thanks for using and promoting
02:00 jberger I'm just grinning from ear to ear
02:00 marmez :-D
02:00 jberger (core devs: thanks for your hard work too)
02:01 jberger batman: I might be getting very interested in Mojo::mysql in the next few months
02:02 jberger then again, I don't know if they are interested, but I will try to see if they are interested in Mojo::Pg and all that move would entail
02:02 jberger (once 1.0 of course)
02:04 marmez Good news for you and everyone here. Is their platform based on Perl already?
02:05 jberger yes already Perl based
02:06 marmez That's great.
02:07 jberger it was good enough while they were small, now that they are growing they want something more maintainable and testable
02:13 s1037989 joined #mojo
02:18 firnsy jberger: congrats on the new position
02:18 firnsy mojo++
02:19 jberger firnsy: thanks!
02:28 * sri prepares for many new feature proposals from jberger
02:30 jberger oh, I'm sure they are coming :-)
02:30 jberger or maybe not, who knows
02:33 sri that's a new one https://travis-ci.org/kraih/mojo/jobs/41060979
02:34 jberger wow sri, way to break the build!
02:34 sri :(
02:37 jberger there it goes
02:38 sri oh my, never noticed the restart button :O
02:38 jberger its a lifesaver on TFBM
02:38 jberger or is it FWBM
02:38 jberger whatever
02:39 jberger they have 100+ tests, most of which you don't care about and each takes at least 10min
02:39 jberger so you cancel the whole thing and restart the one you care about
02:41 s1037989 joined #mojo
02:41 sri looks like Net::DNS::DNS 0.13 is working out well
02:41 sri umm
02:41 sri Net::DNS::Native
02:42 jberger tests like this: https://travis-ci.org/TechEmpower/FrameworkBenchmarks/builds/40799862
02:45 jberger build too >24hours :O
02:45 sri Oo
02:45 jberger they have had a few "talking to"s with the people at travis
02:45 sri i can imagine
02:45 sri "fixed a typo" -> one worker gone for 24 hours :S
02:48 jberger then again, they have found and reported several travis bugs
02:48 sri hahaha, they are actually building a custom perl
02:48 sri https://travis-ci.org/TechEmpower/FrameworkBenchmarks/jobs/40799934
02:48 jberger as you can imagine, they stress the system
02:48 jberger they install a fresh install of all dependencies of each framework
02:49 jberger that's why each test is separated
02:49 jberger building the entire thing takes forever
02:49 * sri wonders how many trees have died because of this :o
02:49 jberger trees?
02:49 purl ask percy about trees, not me
02:49 * jberger shoves purl down the stairs
02:50 jberger hmmm
02:50 * jberger pushes purl down the stairs
02:50 * purl dodges and laughs as jberger loses balance and crashes down the stairs.
02:50 jberger purl was just baiting me, I suppose
02:50 purl jberger: what?
02:51 jberger goes to get celebratory pizza
02:54 * sri has heard of chicago style pizza *drools*
02:55 mst YAPC::NA Chicago was fun
03:03 Fistful_of_Coins i would like to make multiple concurrent get requests using mojolicious, from inside an IOLoop->recurring, and have the code block waiting for them all to return, i'm using IOLoop::Delay and delay->wait,
03:04 Fistful_of_Coins that is what wait is for right? (i'm not sure from the doc, and it's not working for me)
03:06 bpmedley Are you asking to syncronize multiple concurrent requests?
03:06 sri Fistful_of_Coins: please don't cross post questions
03:06 Fistful_of_Coins bpmedley: yes
03:06 Fistful_of_Coins sri: sorry? I was sent here from freenode #perl
03:07 preaction i said to ask here, so blame me
03:07 bpmedley Fistful_of_Coins: Try: http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Backend-web-services
03:07 sri Fistful_of_Coins: ah, sorry my bad
03:08 preaction Fistful_of_Coins: i think the next step is to show code. I think there's something about if you want to block completely (no other IOloop operations), just spawn a new ioloop
03:34 s1037989 joined #mojo
03:40 jberger preaction: I think you are reading too deeply into the question
03:40 jberger and mmmmmm pizza
03:41 jberger mst: I'm sorry I wasn't around the Perl world yet for the YAPC::NAs in Chicago
03:41 jberger who knows, maybe we will get to host another one at some point
03:48 jberger Fistful_of_Coins: I agree with preaction, we really need to see some code, make a paste
03:57 s1037989 joined #mojo
04:06 jamesw joined #mojo
04:08 basic6 joined #mojo
04:17 Fistful_of_Coins jberger: preaction ok
04:17 Fistful_of_Coins http://nopaste.linux-dev.org/?323294
04:19 Fistful_of_Coins here's the gist of what i do in my code, what i want to do is to get them all synchronized where i call $delay->wait, and only continue once they have all finished the get
04:20 jberger Fistful_of_Coins: I think you have fundamentally misunderstood Delay and I think recurring as well
04:22 jberger or maybe I'm just having a hard time following your code
04:22 Fistful_of_Coins Ya, that's very likely, do you know how i could do what i describe above? If delay/recurring is not what i should use?
04:22 bpmedley Fistful_of_Coins: In general, you want to use Mojo::UserAgent to concurrently process a list of URLs and only continue on when they’re all processed.  Is that correct?
04:23 Fistful_of_Coins bpmedley: that is correct, i have a list of URL providing me with data that needs to be processed and stored in a hashtable, then once all the URLs are processed/stored i can go to step 2
04:23 jberger Fistful_of_Coins: http://blogs.perl.org/users/joel_berger/2013/11/writing-non-blocking-applications-with-mojolicious-part-2.html
04:23 bpmedley Are you creating a command-line program?
04:23 Fistful_of_Coins yes
04:24 jberger Fistful_of_Coins: the global $delay was very confusing
04:24 KCL_ joined #mojo
04:24 jberger I try to keep my delay scopes very close
04:24 jberger following non-blocking code is hard as it is
04:30 bpmedley Fistful_of_Coins: http://pastie.org/9720390 <— How is this?
04:34 Fistful_of_Coins bpmedley: ya it looks like what i want to do
04:42 sujithm joined #mojo
04:50 preaction jberger: looking at how Mojolicious does under(), i think i'm going to make the Freyr router do it that way too and add the same kind of hooks Mojolicious::Route has to get some of the other features i want
04:53 Vertig0 joined #mojo
04:56 sujithm_ joined #mojo
05:01 sujithm joined #mojo
05:02 jberger preaction: yeah I like that pattern
05:02 jberger that sri has a few good ideas
05:06 marmez joined #mojo
05:26 s1037989 joined #mojo
05:32 bpmedley http://pastie.org/9720454 <— Would something like this be handy for command-line programs?
05:49 rem_lex| joined #mojo
05:54 * sri loves data structures in postgresql
05:57 sri <3 https://github.com/kraih/minion/commit/8fa446ebd6c9fcd7a72dbd187e40e55a7ce11d04#diff-6c2d02af894f2ce916d89f7b04f4b54aR212
05:58 sri there is sooooooo much to learn
05:58 s1037989 joined #mojo
06:11 zivester joined #mojo
06:52 irq joined #mojo
07:29 irq can myapp find how it is launched? I mean ./myapp vs. morbo myapp vs. hypnotoad myapp ?
07:39 batman irq: no. there's no api for that.
07:39 batman there are ways, but not documented
07:40 batman so it will probably break and is pretty fragile.
07:40 batman i used it in convos. it was not a good idea, so i've removed it now
07:54 KCL joined #mojo
07:59 KCL_ joined #mojo
08:03 sujithm joined #mojo
08:04 sujithm_ joined #mojo
08:05 Vandal joined #mojo
08:23 amon joined #mojo
09:31 basiliscos joined #mojo
09:31 dod joined #mojo
09:52 Eke- joined #mojo
09:54 chansen joined #mojo
11:45 alnewkirk joined #mojo
12:04 sh4 joined #mojo
12:36 jberger bpmedley: i think that would cause more confusion than it would help
13:08 jberger plus it would be the first helper-like functionality given to the ua or anything beyond the app/controller/template
13:50 Charpa joined #mojo
13:57 gtodd sri: postgresql++ :-)
14:00 gtodd http://stackoverflow.com/questions/26945497/pushing-data-to-browser-from-ubuntu-server  can this poor person just use Mojo as a webscraper?  I have never done this via PHP and ajax since if you're already running a server why not just run mojo  and it would be faster and more async ...
14:02 marcus joined #mojo
14:03 gtodd anyone "mounting" mojolicious onto a directory under/behind a proxy or an olde-fashioned LAMP frontend server to add ajax and async progress etc.  Isn't that how a lot of sites are going to use Convos  eg.  www.myapache1.2site.com/chat/      ... where /chat/ is mojo and Convos?
14:04 gtodd if so then www.oldefashionedwebsite.com  could have bits of Mojo attached or "mounted" at /supershiny/  /chat/ etc. until they are ready to fully modernize
14:21 berov joined #mojo
14:24 berov Hi!. How can I set the port on which my application is running while testing?
14:24 berov I tried in my *.t file BEGIN{$ENV{MOJO_LISTEN} = 'http://localhost:3000';} but no luck. Any hint?
14:27 mst why do you think your application is running on a port at all?
14:27 mst normal testing doesn't do that
14:27 mst well, ok, no somewhere over ten years ago people used to test directly against servers
14:28 berov I know
14:28 mst but sri demonstrated that was unnecessary ten years ago in early versions of Catalyst and it's since become best practice
14:28 mst so your question makes no sense at all. try asking a more detailed one?
14:29 berov now I am testing my app if it authenticates my users using Google as provider
14:29 berov Google wants to know in advance a redirection url
14:29 berov that is why I need it
14:30 berov using Mojolicous::Plugin::Oauth2
14:30 mst ok, so how are you starting the mojo server in your test?
14:30 berov so it makes sence now?
14:30 mst no
14:30 mst you're asking "how do I control the server?"
14:30 mst you've not explained where the server came from in the first place
14:30 berov that was the next think I was thinking to do just start the serverDaemon
14:31 mst since mojo tests don't actually have one
14:31 mst ...
14:31 mst ok, so you already understood why your question was insane, but you asked it anyway
14:31 berov Test::Mojo->new('MyApp')
14:31 mst that isn't a server
14:32 berov ok I will start Mojo::Server::Daemon
14:32 berov and then make requests
14:32 mst you might find Test::TCP and Test::SharedFork to be helpful there
14:33 berov all I want is my app running on localhost:3000
14:33 berov thanks
14:36 mst no, you don't
14:36 berov why?
14:36 mst because the oauth flow should allow you to give google the URL as you're authentication
14:36 mst so the port doesn't have to be 3000
14:37 mst so long as you know what the port *is*, it's fine
14:37 berov I google development console there is
14:37 berov redirect URI
14:37 mst oooh, right, that's a different and stupider setup to the last OAuth thing I dealt with
14:37 berov Goggle will redirect back
14:37 mst however, you still want to pick something other than 3000
14:38 berov like?
14:38 berov 8080
14:38 mst no!
14:38 mst jesus fucking christ
14:38 berov what?
14:38 mst the goal here is to have a port that ISN'T going to be used by anything else
14:39 mst because the thing you really don't want
14:39 mst is for 'I left another mojo app's morbo running' to break the tests for this app
14:39 mst hence not 3000
14:39 mst so 8080 is even worse
14:39 berov I know that
14:39 mst if you knew that, then I have no idea why you suggests 8080
14:39 mst I'd go for "pick a random number between 10,000 and 65,000 using a perl one-liner"
14:39 berov but then the question - how to find usually unused part
14:39 berov port
14:40 mst which could still fail, but is much, much less likely to
14:40 mst so what you do is, you paste the one liner into your test as a comment
14:40 mst and if you ever need to move again, you re-run the one liner and update the port number
14:40 berov I will run this test onlu locally
14:41 mst I've managed to create this problem, for myself, locally, without any help from anybody else
14:41 berov but I ams till stuck with the settings of my app in the GDC(Google Dev console)
14:42 mst yeah
14:42 mst so have two comments
14:42 mst one containing the perl one liner
14:42 mst and one reminding you that you need to poke GDC when you change the value
14:42 mst and then underneath the two comments you have
14:42 mst my $port = 12345; # generated by the one liner above
14:43 berov IN GDC i can set several redirect URIs so I will do this
14:44 mst mostly I want to be able to start a full test run
14:44 mst and then do something else while it's running
14:44 mst having port 3000 or whatever eaten isn't good for that
14:44 mst and if I seem paranoid
14:44 mst it's because if you use 3000, then in six months when it breaks
14:44 mst it'll be REALLY confusing to debug
14:45 mst I don't want that to happen to anybody else, it was horrible enough when it happened to me ;)
14:45 berov No, thanks. I set my comments and explanations in my *.t file.
14:45 berov Now let's say I want to run this test automatically even on cpantesters
14:45 mst given the google developer console thing, I'm not sure how you'd get them the hostname
14:45 berov I will have to put my app ID and secret
14:46 berov they allow localhost
14:46 mst ooh, so, it might still work
14:46 berov yes
14:46 mst remember I'm not talking about generating the port on every run
14:46 mst I'm talking about generating it once, and sticking the actual number in the test file
14:46 berov only the user agent communicates with them
14:47 mst i.e. http://xkcd.com/221/
14:47 berov and the redirect is just a header finally
14:47 berov :D
14:48 mst it's just that humans when asked to pick a number between 1 and 10, almost always pick 3 or 7
14:48 mst so it's not safe to -pick- the number yourself
14:48 mst hence my suggesting rand()
14:50 berov Now if I decide to publish my app on CPAN
14:50 berov I will have to give away one app secret and app ID
14:51 berov if I want to run this test automatically
14:51 berov I think nobody does that
14:51 mst I would recommend simply accepting that you can't run that test
14:51 basiliscos joined #mojo
14:51 berov agreed
14:51 mst and have a way for a user to supply their own secret+ID
14:51 mst if they want to run the test on their machine
14:51 berov yes I have this
14:52 mst right, so, check if that file, or whatever, is there
14:52 mst and if not skip the test
14:53 berov that is what I am doing - thanks mst.!
14:53 sri mst: actually, Test::Mojo uses a real server
14:54 sri as it turns out, fake servers are garbage when it comes to testing real-time web stuff
14:54 mst sri: wat, really?
14:54 mst the code didn't look like it did
14:54 sri ya rly
14:54 mst berov: ok, ignore me, I'm a fucking idiot
14:55 berov :)
14:55 sri don't ignore the choosing a port stuff though
14:55 berov I was trying to find a way to set the port
14:55 mst sri: it might be worth having Test::Mojo say that
14:55 sri yes, that's a very very bad idea
14:56 mst sri: since inline testing has become sufficiently normal that it didn't occur to me to look
14:56 mst and if I'm going to make that mistake, others probably will too
14:56 mst my stupidity isn't that special ;)
14:56 sri mst: why do you care in the first place?
14:57 sri your advice was spot on otherwise, don't set a static port
14:58 berov sri:, ok but is there an easy way to set the port via Test::Mojo
14:58 mudler_ joined #mojo
14:58 sri we actually have better APIs than Test::TCP, since we are non-blocking
14:58 berov I remember I was doing this somewhere in 0.95
14:58 sri server and client run in the same process
14:58 berov yes
14:59 mst sri: I've used it to pick a port and then fork()ed before now
14:59 mst I just can't be bothered re-inventing the "find a spare port" logic
15:01 mudler joined #mojo
15:01 sri right, we started out with "find spare port" logic, but that doesn't always work, so we later switched to "bind to random port and return it" logic
15:04 berov sri: what would you recommend as a way to set the port using Test::Mojo ?
15:04 sri berov: i will not help you with that
15:04 berov ?
15:04 sri you are free to shoot yourself in the foot, but i'm not aiming for you
15:06 berov so no way. I will have to start my app from within the test file using Mojo::Server::Morbo
15:06 berov then have Test::Mojo also
15:07 jberger berov: even if you do that, why choose Morbo?
15:07 mst sri: if he pre-generates a random high port for this particular test, and is only running it locally, I don't really see the problem
15:07 mst it's not perfect, but if the google developer console thing needs the port
15:07 mst then I don't see what else will work
15:07 mst I think he's pretty aware that it's not ideal at this point
15:07 sri mst: we've done it for a few years, there were always race conditions somewhere
15:08 berov actually iGoogle does not need the port at all
15:08 berov it is how HTTP works
15:08 berov I mean I have to give a redirect url thats all
15:09 berov which after the user(human) cliks ok(makes a post requests to google)
15:09 jberger berov: can you just have a route and then use url_for('that_route')->to_abs
15:09 berov gogle replyes with a redirect header to the user agent
15:10 sri don't you just need to know on which port the test server runs?
15:10 sri http://mojolicio.us/perldoc/Test/Mojo#ua
15:10 berov this redirect url is set previously
15:10 sri there are APIs for that
15:12 berov ok but then I do not set the port I just can find out what it is
15:14 berov Google needs the URI before the communication is started, otherwise every app on the planet can make google redirect wherever it wants
15:20 zivester joined #mojo
15:24 marcus joined #mojo
15:27 good_news_everyon joined #mojo
15:27 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/dXYNuQ
15:27 good_news_everyon mojo/master 4e169a5 Sebastian Riedel: mention that Test::Mojo is based on Mojo::UserAgent
15:27 good_news_everyon left #mojo
15:31 berov sri: so the user agent starts the server, right?
15:33 berov so if I say Test::Mojo->new->ua->server(%params) this could work probably?
15:36 berov ah it will work I can use Mojo::UserAgent::Server to pass my app
15:36 berov thanks
15:46 berov hm Mojo::UserAgent::Server is not Mojo::Server::Daemon but is Mojo::Base
15:47 berov ok
15:48 sri i think you're inventing problems
15:49 sri if you have to set the google redirect url un advance, set it to some silly value and rewrite the url in a $t->ua->on(start => sub {...})
15:49 jberger joined #mojo
15:50 sri these are not new problems, there's usually a super easy solution
15:50 berov I will receive a redirect header from google ... aha good idea
15:52 sri mst: dunno what else to mention here http://mojolicio.us/perldoc/Test/Mojo#DESCRIPTION
15:52 berov actually this will solve my problem. All I want is to have an automated test for this. I spent quite  alot of time in implementing it.
15:53 mst sri: something like "While $t->app is available in process, the server is run in a child process in order to make testing asynchronous code more elegant"
15:54 mst which tells you about the child process -and- wanrs you "don't poke $t->app and expect it to affect the server"
15:54 sri for the record, there are many ways to solve this, if you want to control the web server completely, you could just create a Mojo::Server::Daemon instance and use Test::Mojo with absolute urls
15:54 berov uf it must be real, because after the redirect my app will make one final request to google to get the user credentials
15:54 sri mst: there is no child process
15:55 sri mst: the wonders of being totally non-blocking, we don't need for for eal tests :)
15:55 sri s/eal/real/
15:55 sri argh
15:55 sri s/for/fork/
15:56 sri it's quite beautiful really
15:56 mst sri: oh. you're using a TCP port, but not a second process?
15:57 sri right
15:57 berov seems like my solution is not to use Test::Mojo, but use Test::More, Mojo::UserAgent and Mojo::Server::Daemon and that's all for this test
15:57 mst sri: ok, so, that's -not- what I'd take by 'real server'
15:58 sri haha
15:58 mst sri: 'in-process server instance against a real TCP port' would describe that to me
15:58 mst to mean, 'real server' means 'separate process, running standalone, just like you might have out in the real world'
15:58 sri if it uses the actual protocols it's pretty real to me
15:59 mst 'real', to me, implies I could run the same test as an integration test against a full deployment just the same
15:59 mst yes, yes, I understand your argument that the current thing *is* real
15:59 mst that's not the point
15:59 mst the point is the picture people get in their head given only the words 'real server'
16:00 mst and in my case that included 'in its own process'
16:00 mst I don't think I even noticed that was an assumption I was making
16:06 ceej__ joined #mojo
16:14 jberger batman/marcus: I'm having troubles starting Convos from a clean cpan installation :(
16:15 batman ok
16:20 batman jberger: you're exactly flooding over with information...
16:20 jberger batman, hehe, sorry, I'm still trying to gather it
16:20 batman maybe you could look at this: https://metacpan.org/pod/distribution/Convos/lib/Convos/Manual/Running.pod ?
16:20 jberger oh, has it changed?
16:20 jberger ooops
16:22 batman yes. https://metacpan.org/source/JHTHORSEN/Convos-0.8601/CHANGELOG.md
16:23 batman we just killed off a lot of code, since it made life awful in most cases.
16:28 jberger Use of uninitialized value in -f at /home/joel/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Daemon/Control.pm line 313.
16:28 jberger so the config file is gone then?
16:29 batman impossible to answer, when i have no idea how you produced that error
16:29 jberger convos daemon
16:29 jberger I'm not trying to difficult, sorry,
16:31 mst which is line 313?
16:31 mst my first guess would be "somehow you didn't pass a pid file"
16:31 batman jberger: i'm a bit low on energy, so i might answer in a very agitated way.
16:31 mst since I can't think of anything else Daemon::Control uses -f on
16:31 mst probably the answer would be that it doesn't default the pid file path
16:31 mst and you didn't set it in config before starting convos
16:31 batman jberger: what i'm trying to say: 1) what are you doing 2) what happens 3) what do you expect to happen (answer those every time you come with a problem)
16:31 mst but I am -totally- guessing here
16:32 dvinciguerra joined #mojo
16:32 jberger batman, no, its my fault, I wish I could offer more, I just don't know what I don't know
16:32 batman mst: the pid file
16:32 purl i heard the pid file was wrong
16:32 mst jberger: crack open the D::C code and LOOK
16:32 jberger mst: working on that now
16:32 mst also, I'm sure kaitlyn would take a patch to produce a more useful error there
16:33 batman mst: if ( ! -f $self->pid_file ) { ...
16:33 * mst takes a bow
16:33 batman pretty sure it's wrong usage by convos
16:33 batman jberger: perldoc -m Daemon::Control # i thought these things was basic to you...
16:34 mst view $(perldoc -l Daemon::Control)
16:34 batman jberger: maybe you need PERL5LIB=local/lib
16:34 mst though it might take a few days to get applied, since she's currently being a tourist in edinburgh and flies back to LA on tuesday
16:35 jberger batman, I think your last statement might start to get at the issue, I'm not using carton, I just did cpanm Convos
16:35 jberger is that not recommended?
16:35 batman it's on cpan :)
16:35 jberger so why should I need PERL5LIB?
16:36 batman jberger: in case you did something custom
16:36 batman hence the *MAYBE*
16:36 basiliscos joined #mojo
16:36 jberger batman, ok
16:36 batman jberger: i'm seeing the same here now
16:36 batman jberger: morbo works, right?
16:37 jberger much closer
16:37 jberger a daemon at least starts up
16:37 batman yeah. the backend doesn't start by itself
16:38 batman CONVOS_BACKEND_EMBEDDED=1 will make "morbo" start the backend
16:38 batman i will send a new Convos release to cpan soon
16:39 jberger batman, when I do that I get "CONVOS_REDIS_URL is not set"
16:40 batman it's because you're in dev mode. set MOJO_MODE=production or set CONVOS_REDIS_URL
16:40 jberger which obviously I can fix, but it is documented to default to "redis://127.0.0.1:6379/1"
16:40 batman jberger: https://metacpan.org/pod/Convos::Manual::Environment
16:40 batman if started in production mode. -- were does it say it should default to that in morbo mode?
16:40 batman *where
16:41 jberger https://metacpan.org/pod/Convos::Manual::Environment#CONVOS_REDIS_URL
16:41 batman thanks. will fix that as well
16:47 jberger batman++
16:47 jberger yes, this has been a terrible bug report, I admit it
16:49 batman thanks
16:53 batman jberger: you can fix it by manually setting CONVOS_BACKEND_PID_FILE=/tmp/foo.pid
16:53 jberger ah, interesting
16:54 bpmedley http://mojolicio.us/perldoc/Mojolicious/Plugin/Mount <— Does convos work with this?
16:54 jberger I have been trying to start using backend/frontend but just the simple daemon is plenty for me
16:55 jberger_ joined #mojo
16:55 jberger_ o/
16:55 batman bpmedley: it works with toadfarm, so i don't see why it won't work with the Mount plugin
16:55 jberger_ batman: that worked!
16:55 batman of course ;D
16:56 jberger_ on startup, I did get one error: Mojo::Reactor::Poll: Read failed: Can't call method "_return_command_data" on an undefined value at /home/joel/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Mojo/Redis.pm line 37.
16:56 jberger_ but it seems to be working fine
16:56 batman that's because Mojo::Redis is shit
16:56 jberger_ ah, not Redis2
16:56 jberger_ Mojo::Redis2++
16:57 sri so... Mojo::Redis3?
16:57 batman haha
16:57 jberger_ batman: is the convos upgrade command gone?
16:58 jamesaxl joined #mojo
16:58 batman jberger_: yeah. not doing that any more
16:58 jberger_ so when I upgrade convos, how does the schema advance?
16:58 bpmedley batman: Do you have an example toadfarm config for convos?
16:58 franzkafka I have an idea
16:58 franzkafka Do any of you guys use Puppet, Chef, etc?
16:58 jberger_ batman: just curious
16:58 batman jberger_: haven't decided yet
16:58 jberger_ ah ok
16:59 batman bpmedley: {"apps"=>["convos"=>{}]}
16:59 batman bpmedley: https://metacpan.org/pod/distribution/Toadfarm/lib/Toadfarm/Manual/Config.pod
16:59 franzkafka I use Puppet pretty extensively, but it has a lot of problems. Why not a Mojolicious-based configuration management tool?
16:59 batman franzkafka: using ansible
17:00 franzkafka Perl was pretty much the original language for sys admins, it only makes sense.
17:00 franzkafka Ansible is mojo based?!
17:00 batman no. it's python
17:00 batman rex is perl based... (haven't used it)
17:00 jberger joined #mojo
17:01 franzkafka batman, ohh, I tried rex, it's pretty cool, but it's not at the level of Puppet
17:01 franzkafka It has a lot of growth to do
17:01 franzkafka Ansible I have not tried yet.
17:01 franzkafka I'm just a bit disappointed with Puppet. There are so many problems with it, and people use exec like crazy as a bandaid.
17:01 franzkafka I think the whole role/profile thing really illuminates Puppet's problems.
17:02 franzkafka Hm, maybe I will work on a Mojo based CM tool myself.
17:02 franzkafka I like the idea of it.
17:02 bpmedley franzkafka: Sounds cool
17:03 franzkafka sri, do you have a rough ETA on Mojo::Pg being production ready?
17:03 sri not since the notification problems
17:03 franzkafka bpmedley, I was actually working on a rough idea a long time ago, but it never really came to anything: https://github.com/danielamaya/neuadmin
17:04 jberger franzkafka: I did see this: https://metacpan.org/pod/Rex::JobControl
17:04 jberger which is mojo based
17:04 jberger admittedly I haven't tried it
17:04 franzkafka Oh that's awesome. I didn't set up a web interface when I was using Rex. I will have to check it out.
17:06 franzkafka sri, notification problems?
17:07 franzkafka sri, I am using Mojo::Pg in a webapp at work, haven't run into any issues with it yet. Admittedly, I am not doing much database-wise in the app.
17:09 sri http://irclog.perlgeek.de/mojo/2014-11-12#i_9648042
17:11 cfedde joined #mojo
17:11 sri that was problem 1
17:11 sri http://irclog.perlgeek.de/mojo/2014-11-13#i_9651195
17:11 sri that is problem 2
17:12 sri the solution to problem 2 is rather sketchy https://github.com/kraih/mojo-pg/commit/2f93c50f5519d5e54436f85a8b5484e4766bc19f#diff-3ff1b9e1103956cba792fae2f31a2f46R149
17:14 sri so i fear Mojo::Pg might not reach 1.0 this year
17:15 sri of course there's always the possibility of removing notification support, but i'd like to avoid that
17:17 batman jberger: cpanm https://github.com/Nordaaker/convos/archive/0.8602.tar.gz # wanna try it out?
17:17 jberger will do
17:17 franzkafka sri, how do you duplicate this?
17:18 sri franzkafka: the test case is included
17:18 jberger_xchat joined #mojo
17:18 sri same commit
17:19 sri specifically select pg_terminate_backend(?)
17:19 franzkafka Ah, I see it, perfect
17:20 jberger joined #mojo
17:20 jberger batman: o/
17:21 jberger batman: that worked with just 'convos daemon', no CONVOS_REDIS_URL needed
17:21 batman sweet
17:22 batman even got four more tests :)
17:22 jberger batman++
17:22 * jberger restarts in background
17:22 sri franzkafka: and there's also the question if a close event is the correct solution
17:22 jberger joined #mojo
17:22 * jberger is back
17:23 batman jberger: i forgot to tell you, you might want to upgrade M::P::LinkEmbedder :)
17:23 jberger now you tell me
17:23 jberger :)
17:23 jberger I have 0.14?
17:24 jberger I updated everything
17:24 sri franzkafka: so there's really two parts to it, 1) how to detect a connection close reliably, and 2) what's the right way to handle it
17:24 jberger actually I just did cpan-outdated | cpanm, and that borked spectacularly, so I brewed a brand new perl
17:25 sri 1 is sketchy with the eval, and 2 kinda works, but there might be better solutions out there
17:25 jberger this is running from 5.20.1
17:25 batman ok. then i guess you have the latest (it's not _that_ new)
17:25 davido_ joined #mojo
17:26 * jberger was hoping for xkcd support, maybe I should do that today as a gift for patching convos so quickly
17:26 batman that would be cool.
17:26 batman jberger: wanna be co-auth for LinkEmbedder?
17:27 jberger hey look, I already did that :)
17:27 batman i don't see any trouble with you adding features and releasing similar things to imgur
17:27 jberger sure
17:28 batman ah. right :D
17:28 jberger was there some reason my xkcd patch wasn't merged? I really don't recall
17:28 batman i don't think i can remember it
17:28 * jberger can't either
17:29 jberger it seems there are merge conflicts, will update
17:29 mst REBASTIALITY
17:29 purl i guess REBASTIALITY is slacking.  http://twitter.com/rjbs/status/9594060124
17:37 cfedde joined #mojo
17:40 jberger batman: I've been looking forward to upgrading since I knew you had fixed the scolling
17:40 jberger <3
17:40 batman :)
17:57 KCL_ joined #mojo
18:02 basiliscos joined #mojo
18:23 KCL_ joined #mojo
18:24 spikkie joined #mojo
18:24 spikkie Hi Mojo team
18:25 spikkie wanted to know how can I get involved in mojolicious dev
18:25 * sri wonders if https://cpanmin.us is up yet
18:25 sri it is! \o/
18:25 sri marcus++
18:26 jberger spikkie: I started by using Mojolicious, finding features/bugs, and paying attention here
18:28 sri that's how it works
18:28 spikkie ok I'm using Mojolicious for my setting up my own website, still working on it,  so that is a start already,
18:28 mst spikkie: if you're new, starting off by helping clarify documentation is really useful
18:29 mst only newbies know what isn't obvious
18:30 sri and if you're an expert, there's a pretty big todo issue ;p https://github.com/kraih/mojo/issues/423
18:30 sri generally, keeping an eye on github issues is a very good idea
18:31 spikkie ok I read great parts of http://mojolicio.us/perldoc and the wiki
18:32 spikkie but I'm at the bottom of learning curve
18:32 sri most big decisions happen here on irc though
18:32 jberger spikkie: read all of the guides (and ::Lite), actually recommend reading them twice
18:32 spikkie perl I can master , taht shouldn't be the problem ;-)
18:33 sri most core devs start out by becoming an expert in one area, like Mojo::DOM, Mojo::IOLoop, Mojolicious
18:34 sri (at least that's how i remember it :o)
18:34 jberger guess that makes me the ioloop guy
18:34 sri jberger basically opened so many pull requests we had no choice but to invite him to join :)
18:34 jberger haha, I miss the Galileo days
18:35 jberger I have been thinking about a sequel, but most of the design in my head was based on Mango
18:35 good_news_everyon joined #mojo
18:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/nmU0fg
18:35 good_news_everyon mojo/master ccfe98c Sebastian Riedel: recommend a more secure installation one-liner
18:35 good_news_everyon left #mojo
18:35 sri funny thing, the Mojo::Pg backend for Minion is actually less code than the Mango one
18:38 jberger I consider Galileo to have succeeded at it's goals, but those goals were limiting
18:38 spikkie ok thanks ,  I will stay here til I'm THE expert ;-)
18:39 jberger the next one would be more REST (rather than all websocket) though there would still be plenty of that
18:39 atom joined #mojo
18:40 jberger and I would have to give up on cpan deployable (meaning sqlite or dbm deep) support
18:40 jberger the idea for the Mango based one was to abstract the backend between dbm deep and mango
18:41 sri well, Minion is DBM::Deep+PostgreSQL
18:41 jberger right but that is still limiting
18:41 sri depends on the use case of course
18:41 jberger I think the next one would be too have all the internals Nonblocking
18:41 sri but i din't find it limiting for a job queue
18:42 sri hmm, that would be tough
18:42 sri pretty much only leave a database with HTTP api
18:42 sri *+s
18:45 sri hmm... super secure installation one-liner
18:45 sri curl -L https://cpanmin.us | perl - --mirror https://cpan.metacpan.org --mirror-only --verify -n Mojolicious
18:46 sri (if you trust cpanmin.us and github.com)
18:47 klapperl joined #mojo
19:00 jamesaxl joined #mojo
19:06 zivester joined #mojo
19:06 jamesaxl joined #mojo
19:11 * jberger would really like a mojo aggregator site
19:11 jberger core dev blogs, tweets etc
19:12 sri working on it
19:12 jberger whaaaaaaaa
19:12 jberger sri++
19:13 * jberger would really like a bunch of money and a pony
19:14 mst but then we'd have to argue about who gets to eat the pony
19:14 sri a nice aggregator was supposed to be my case study for minion... then mango fell apart...
19:14 sri now i'm slowly getting back on track
19:14 jberger mst gets to eat the money
19:15 mst :(
19:15 mst a good horse steak is AWESOME
19:16 jberger mst is dothraki it seems
19:16 jberger I've never had the opportunity
19:16 sri moose burgers were surprisingly tasty too
19:16 jberger that's true
19:17 jberger though I've had bison before
19:17 * sri wants to try bison
19:17 sri if i ever eat horse, certain members of my family would kill me
19:17 jberger come to na, I'm sure we could find them
19:18 mst the last I had was from an italian variety bred specifically for food
19:18 mst any time somebody complains I ask them if they'd rather the breed of horse went extinct
19:22 KCL_ joined #mojo
19:26 jberger there are fast growing trees grown just for paper, I say the same thing about paper recycling
19:27 jberger forests tended just for paper
19:27 mst and the end product of using the horse is even more biodegradable than the paper :)
19:28 jberger true enough
19:44 bobkare joined #mojo
19:51 good_news_everyon joined #mojo
19:51 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/RtDo0g
19:51 good_news_everyon mojo/master da45de2 Sebastian Riedel: --verify is useless
19:51 good_news_everyon left #mojo
19:51 sri shit
19:52 sri looking into Module::Signature is scary
19:53 sri it's not just optional in cpanm, it only checks if *someone* from the keyserver signed the module
19:53 sri you can only use it for something if you know who is supposed to have signed it, and verify manually
19:54 mst and IME there's enough dists where somebody fucked up signing them
19:54 mst that I've never known anybody to leave it turned on for very long
19:57 sujithm joined #mojo
19:57 sri curl -L https://cpanmin.us | perl - --mirror https://cpan.metacpan.org --mirror-only -n Mojolicious
19:57 sri so this is the best we can do
20:07 Eke- joined #mojo
20:16 jberger batman/marcus: another possible suggestion, and this is entirely up to you, but if the organization defaulted to Convos rather than Nordaaker I think it would be the expectation
20:16 jberger that said, its good promotion, so I would understand if you want to keep it
20:22 sri i don't think anyone involved in convos is at nordaaker anymore
20:31 jberger it seems that websockets are enabled by default in heroku now
20:32 jberger suddenly editing works on the demo app :o
20:32 jberger luckily the ephemoral filesystem keeps it clean
20:45 bobkare joined #mojo
20:47 franzkafka joined #mojo
20:53 marcus joined #mojo
21:12 bobkare joined #mojo
21:22 sri perhaps the frontpage one-liner should just get a little longer
21:23 sri curl -L https://cpanmin.us | perl - --mirror https://cpan.metacpan.org --mirror-only -n Mojolicious
21:23 sri is not that bad
21:23 sri considering the security gain
21:23 * mst dislikes -n given how fast your tests run anyway
21:24 mst but I guess if you're trying to induce a rapid 'wow' moment
21:24 sri people using the one-liner will compare install times to rubygems
21:25 sri can't say i like it, but we've tried both, and -n seems to make beginners happier
21:25 mst right
21:25 sri of course we try to steer them towards a real dev environment later on
21:25 mst "I don't like it but I see why it's a good idea" is about where I am too
21:33 denis_boyun joined #mojo
21:40 Eke- joined #mojo
22:08 zivester joined #mojo
22:23 * batman almost always install with -n
22:44 franzkafka I never really understood why install time was so important.
22:44 franzkafka I see tempire talk about the install time of Mojolicious quite often and I never really got why it mattered that much.
22:45 franzkafka I'm installing DBIx::Class right now, it's taking its time, and I am here
22:45 franzkafka in #mojo, rambling
22:45 franzkafka I get it now.
22:58 batman jberger: i don't mind either. you can suggest it to marcus (send him an email)
22:58 batman i see the point though
23:39 marcus sri: https://cpanmin.us/ is operational
23:40 sri marcus: i noticed :)
23:40 marcus sri: I noticed you noticed after I wrote it :)
23:41 sri marcus: and i spoiled it a bit for miyagawa... he was a little upset you didn't tell him
23:41 sri anyway... i'm now trying to make the cpanm one-liner a little shorter :) https://github.com/miyagawa/cpanminus/pull/417
23:42 marcus sri: I did tell him I was thinking of doing it tho.
23:42 marcus And it's still pointing to his web server

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