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

IRC log for #mojo, 2016-09-17

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

All times shown according to UTC.

Time Nick Message
00:02 meshl joined #mojo
00:33 loorko joined #mojo
00:35 loorko Hello evryone
00:35 loorko I have a question
00:35 loorko http://stackoverflow.com/questions/39541648/how-can-i-refreseh-a-helper-function-in-mojolicious
00:36 loorko Can anyone help?
00:36 sri that is a very confusing question
00:37 sri i'm sure there's a simple answer if you can make us understand the problem
00:40 loorko Hi, give me a minute, I try to write an example
00:40 jberger If your database connection information is in configuration
00:41 jberger Then when you change the config just hot restart
00:41 jberger And the new client connections get the new configuration
00:42 loorko I'm working on a frontend solution for the ProxySQL
00:42 loorko https://github.com/loorko/Docker-ProxySQL-Frontend
00:44 loorko So the probelem is (my language knowladge)
00:44 loorko I store the databese connection information in a sqlite databse
00:45 loorko But if somthing changed on the target server ... so that is the problem
00:46 loorko I hope you understand my problem. :|
00:46 sri that repo name is illegal
00:47 sri apparently you're not allowed to use the name Docker for anything
00:47 sri you'll prolly get a letter from Docker inc lawyers soon
00:48 sri and no, afraid i don't understand your problem
00:49 preaction so you have a helper and it might have connection information that is out-of-date?
00:50 loorko I think yes.
00:50 loorko But why illegal my repo name?
00:51 sri just to get this out of the way, helpers can be redefined at any time
00:51 preaction how does the connection information get changed?
00:51 sri $app->helper(foo => sub {...}) will simply redefine it
00:51 preaction also, you can just have your helper check the database for connection information every time
00:52 genio oh, Docker is another Nagios?
00:54 sri loorko: Docker is going after open source projects with their lawyers https://twitter.com/MacYET/status/775535642793086976
00:57 loorko Docker is a virtualization solution, ProxySQL almost like the nagios.
00:57 loorko https://github.com/mszel42/Docker-Ansible-MHA-ProxySQL
00:57 loorko http://www.proxysql.com/
01:00 loorko sir:  I did not know. Sorry. I learned something.
01:01 loorko You are right. I will delete, and create a new repo
01:04 Pierre joined #mojo
01:20 loorko jberger:
01:20 loorko jberger: thx
01:21 loorko but i'm afraid I can't write down what is my problem exactly. But, my last run ;) Everybody use the helper function for the database connection. But how can we resolve when the conection information change.
01:32 loorko joined #mojo
01:36 loorko joined #mojo
02:00 loorko joined #mojo
02:16 jberger loorko: a helper is just a perl function reference
02:16 jberger Nm left
02:17 Pierre joined #mojo
02:20 noganex joined #mojo
02:44 laidback_01 joined #mojo
02:54 stefan_ joined #mojo
02:55 stefan_ Mojo::ACME seems to fail if I have a default layout enabled.  What can I do?
03:09 kaare_ joined #mojo
03:27 lluad joined #mojo
03:48 jberger stefan_: what?
03:49 jberger I have no idea why having a default layout would matter
03:55 jberger I just checked through, there are no render calls that use templates or render calls that are delayed and do not set render_later
03:55 jberger I don't see how a default layout could affect anything
04:09 stefan_ jberger: I'll see if I can demonstrate something.  When I ran acme cert generate I got back a HASH with an error message that showed some HTML.  I looked at the HTML and it was from my default layout.  So then I commented out $self->defaults(layout => ...); and then it worked just fine!
04:10 stefan_ Indeed, it may be something else in my code doing something it shouldn't.
04:11 stefan_ Mostly, good to know that this shouldn't be a problem, which let's me know it's something in my code.  So I'll investigate further!  Thanks for the response, jberger!
04:14 jberger stefan_: i am very curious
04:14 jberger Vr
04:15 jberger Not sure what ^^ is
04:15 jberger Anyway, no that shouldn't affect anything in ACME
04:17 jberger Do you have any *_render hooks?
04:17 jberger Or any hooks at all?
04:18 jberger What plugins are you using? Etc
04:20 haarg joined #mojo
04:30 stefan_ jberger: Figured it out!  I have an under on / for the purpose of authentication and it redirects to a sign in page if not authenticated.
04:33 jberger Ah
04:34 jberger Load the plugin first
04:34 stefan_ Hmmm, the plugin is first.
04:35 jberger https://metacpan.org/source/JBERGER/Mojo-ACME-0.06/lib/Mojolicious/Plugin/ACME.pm#L42
04:36 jberger That needs to be unencumbered
04:36 stefan_ Hmm...  what I said isn't true.  I disabled all routes and I'm still having a default layout applied.
04:37 stefan_ [Fri Sep 16 23:35:38 2016] [debug] GET "/.well-known/acme-challenge/mc0C37o-EdMXvEydmVQThNlpvwbmsumn0v73bgyjChQ"
04:37 stefan_ [Fri Sep 16 23:35:38 2016] [debug] Routing to a callback
04:37 stefan_ [Fri Sep 16 23:35:38 2016] [debug] Rendering template "layouts/default.html.ep"
04:40 jberger I mean, if that's true then nothing in your app can call render
04:41 jberger Nothing **else**
04:41 stefan_ "Routing to a callback" ... anyway that I can trace which??  Must mean an anonymous coderef, anyway to trace which tho??
04:45 jberger I'm trying to put together a quick check
04:45 jberger give me a sec
04:47 jberger ok I'm going to have you add a route
04:47 stefan_ Well, I copied your Synopsis and added a default layout and it worked fine!!
04:47 jberger ok
04:47 stefan_ So it *must* be something in my code!
04:47 jberger that's good to hear
04:47 jberger (for me)
04:47 jberger :-P
04:47 stefan_ :D
04:48 stefan_ Do you have a route that could help me?  Or was it just for verifying your plugin is all good?
04:48 jberger as I said, do you have any hooks installed?
04:48 jberger I was just going to have you add something to check
04:48 jberger try adding this
04:48 stefan_ Nope.  And I trimmed it down to just two plugins: config and ACME
04:49 stefan_ And all routes disabled.
04:50 jberger $r->get('/test' => sub { my $c = shift; $c->delay(sub{ Mojo::IOLoop->next_tick(shift->begin) }, sub { $c->render(text => 'hello world') }) });
04:50 stefan_ I left a bunch of helpers defined, but those shouldn't be getting called since there are no routes.
04:50 jberger do you have one called delay?
04:51 stefan_ A helper?  No.
04:51 jberger anyway, add that route and get /test
04:51 stefan_ Ok, I added that route, now routes shows the well-known and now /
04:51 jberger and /test
04:51 jberger I hope
04:51 stefan_ Shouldn't it show /test?
04:51 stefan_ No, just /
04:52 jberger $r is the router?
04:52 jberger $app->routes->get(...)
04:52 stefan_ Sorry!  Wrong file.  Was still calling my quick test of your synopsis.  O_o
04:52 stefan_ Ok, yes, well-known and /test
04:53 jberger and when you get /test?
04:53 laidback_01 joined #mojo
04:53 stefan_ . /test is 404
04:55 jberger .?
04:55 jberger anyway, if you can't render that then something is borked
04:56 jberger here is that exact same route but made into a one-liner (s/'/"/) as proof
04:56 jberger perl -Mojo -E 'my $r = app->routes; $r->get("/test" => sub { my $c = shift; $c->delay(sub{ Mojo::IOLoop->next_tick(shift->begin) }, sub { $c->render(text => "hello world") }) }); app->start' get /test
04:56 stefan_ Weird, using curl is 404.  Using the command get /test I get my default layout without hello world as the content
04:56 jberger well, it is definitive then, something in your code
04:56 jberger I'm going to guess that you are redefining the delay helper
04:57 jberger or you have a hook doing something crazy
04:57 jberger actually, replace $r with $app->routes for me
04:58 jberger hmmm, no, that won't be any different
04:59 stefan_ Gosh, I have everything in my lib/App.pm commented out except config and ACME plugins and the test route!
05:01 jberger ah nope
05:01 jberger if I make a layout file in the appropriate place and set a default layout, only the layout gets rendered
05:01 jberger perl -Mojo -E 'app->defaults(layout => "mylayout"); my $r = app->routes; $r->get("/test" => sub { my $c = shift; $c->delay(sub{ Mojo::IOLoop->next_tick(shift->begin) }, sub { $c->render(text => "hello world") }) }); app->start' get /test
05:02 jberger $ cat templates/layouts/mylayout.html.ep
05:02 jberger <p>Whoops</p>
05:02 jberger and I get <p>Whoops</p> out
05:03 jberger doesn't even need to be in the next tick
05:03 jberger perl -Mojo -E 'app->defaults(layout => "mylayout"); my $r = app->routes; $r->get("/test" => sub { my $c = shift; $c->render(text => "hello world") }); app->start' get /test
05:06 jberger anyway, here's what's going on: https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Renderer.pm#L106-L123
05:06 jberger somehow the text stash value still uses the template inheritance system
05:06 jberger I'm not sure if that is by design or not
05:08 jberger but I can say one thing, I do consider this a problem in your code generally
05:08 stefan_ Here's a gist: https://gist.github.com/s1037989/e812171b8dc32d280df8938cfd451fc1
05:08 jberger it wouldn't be possible to code for all the edge cases of what happens if unexpected stash defaults leak into routes in plugins
05:09 stefan_ And we're at a point that has nothing to do with ACME of course.
05:09 jberger setting a default stash value for layout is really tempting but it is difficult
05:09 jberger can you set it in an under at least?
05:10 stefan_ Ah!  But if I switch the route you gave me from render text to render data it works!  No layout applied!
05:10 jberger right, that's pretty clear from the mojo section I linked to
05:10 jberger same for json
05:10 stefan_ Yes, I could definitely move my defaults to an under.
05:10 stefan_ Oh, sorry.  So can ACME use data instead of text?
05:11 jberger like I said, I'm not going to code for this
05:11 stefan_ And that's actually probably the perfect solution!
05:11 jberger I have render calls all over my plugins
05:11 stefan_ I didn't realize it would take more than just switching the word text to data?
05:11 jberger in this one instance it would
05:12 stefan_ I see, you want to retain consistency between your different modules?
05:12 jberger the question is where to draw a line
05:13 jberger I expect render to work as expected
05:13 jberger if someone's app alters how render works globally, there isn't much I can do about that generally
05:13 jberger like if someone sets a before_render hook
05:14 stefan_ Well wait, adding defaults is in the Mojo docs, isn't it?  Like, it's advised...
05:14 jberger but, it alters how render works
05:14 jberger consider if I had a template in a plugin
05:14 stefan_ I don't see anything silly about what I did in my mode.
05:14 jberger I do that quite regularly
05:14 stefan_ code
05:15 jberger I'm not saying that what you are doing is wrong, but ... it is a global default
05:15 jberger very very global
05:15 jberger it works as advertised (in some sense)
05:16 jberger now I think it could be argued that the text key shouldn't be subject to template inheritance
05:16 jberger but plugins can call render
05:16 jberger and render_to_string
05:16 jberger with a template
05:16 jberger which would then get wrapped in the layout
05:16 stefan_ And I get your point about drawing the line, but just so I understand, what's wrong about choosing to data instead of text?
05:18 jberger what if I changed it to $c->render(inline => '<%= $auth %>');
05:18 jberger that would be a perfectly valid thing to do
05:18 stefan_ Ok?
05:18 jberger well, double quotes
05:18 jberger that's a template
05:19 stefan_ Of course.
05:19 jberger and so it would get your layout
05:19 jberger even if the behavior in mojo was fixed so that text keys aren't run through the template inheritance system
05:19 jberger that would still fail
05:20 jberger but it is a thing that plugin can and will do
05:20 stefan_ Right.  But in the case of ACME, you don't want any template processing to happen, so why not use data?
05:20 jberger because I'm I don't want to have to think about all the things that could be done globally to the renderer
05:21 jberger data is for unencoded data, text if for strings that should be utf8 encoded
05:21 stefan_ Another way of asking: why did you choose text over data originally?  At the moment you first coded it, would it have been wrong to choose data?
05:21 jberger for the reason just above
05:21 stefan_ Got it!  Ok, that makes sense!
05:21 jberger yeah
05:22 stefan_ Perfect.  Sorry to draw it out so long, just wanted to understand.  :D  And, as I said, I think your suggestion about moving the defaults to an under is perfect!
05:22 jberger I mean, I could call local $c->stash->{layout}; before every time I call the renderer
05:22 jberger yeah, that's safer
05:22 jberger but still, any other call to render from within that under, even if it is a plugin, will have that happen
05:23 stefan_ Here's another question.  How to document things like this?  Like this was difficult for us to track down.  Even you a core dev didn't realize something about text (IIUC).  So how could a dev like me ever expect to deal with this?
05:24 jberger I think I consider the text thing a bug
05:24 jberger and I will discuss that with sri tomorrow
05:25 stefan_ Great!  Ok, I wasn't sure if you were saying that might be earlier.
05:25 jberger so just to be more clear, he is a real example that setting a default layout (even in an under) might break
05:25 jberger https://metacpan.org/source/JBERGER/Mojolicious-Plugin-ReplyTable-0.07/lib/Mojolicious/Plugin/ReplyTable.pm#L23
05:26 jberger $c->reply->table([[11,12],[21,22]])
05:26 jberger one sec
05:27 stefan_ You're saying setting a default helper would break an html rendering of reply table?  Why?  Why wouldn't it just put the result in the layout's content?
05:27 jamesaxl joined #mojo
05:28 jberger perl -Mojo -E 'plugin "ReplyTable"; app->defaults(layout => "mylayout"); a("/" => sub { shift->reply->table([[11,12],[21,22]]) })->start' get /.html
05:28 stefan_ In the case of ACME, it expects a very specific result.  In the case of HTML, I wouldn't have a problem shoving the reply table generated html into my layout.  In fact I'd prefer it.  I'd call that intended behaviour.
05:28 jberger well, yes if you consider that the correct behavior then that's what it does
05:28 stefan_ :D
05:29 jberger I'd personally consider that a problem :-P
05:29 jberger actually
05:29 stefan_ Personally, in that case, I'd expect to turn of the default layout or choose an empty layout.
05:29 stefan_ Because I know I'm generating HTML.
05:29 jberger yeah, you can put it on the user
05:30 jberger well, route author, whatever you call that
05:30 jberger I guess ACME is a little on in that case because it sets up the route all the way up
05:30 jberger s/on/odd/
05:31 stefan_ Yeah, and it *requires* due to protocol a very specific message.  Which is actually why I'd think data makes sense.  But you're point about utf8 is a good one.
05:32 jberger well we will see if the text behavior is intended tomorrow and that might clear some things up
05:32 stefan_ Yep yep!  Hey, thanks for the discussion!  That was super enlightening!
05:32 jberger yeah, no problem
05:32 jberger anyway, I'm off to bed
05:32 jberger nn all
05:32 stefan_ g'night!
06:00 Pierre joined #mojo
06:19 Vandal joined #mojo
06:37 eseyman joined #mojo
07:11 anton joined #mojo
07:15 inokenty-w joined #mojo
07:25 sri holy backlog batman
07:29 sri so, since the next minion release will be 6.0, maybe i should make another breaking change
07:29 sri which would be to leave behind windows fork emulation
07:30 sri big question is where to make minion bail
07:30 sri since i do want all perl versions to be able to enqueue jobs
07:31 sri suppose Minion::Worker::register might be the right spot
07:31 sri one thing i could do then is add Minion::Job::kill
07:32 sri and add a remote control command kill to Minion::Command::worker to allow jobs to be safely killed remotely
07:35 sri with the broadcast functionality it would be pretty nice
07:35 sri you'd just to ./myapp.pl minion job -c kill -a '[10023]'
07:36 sri and all workers in the cluster would check if they have that job, and if they do kill it
08:25 sri hmm, or minion should just not work for emulation as a whole
08:29 Sebbe joined #mojo
09:21 sri ok, i did it :o
09:21 sri https://github.com/kraih/minion/commit/1360f5a9f65d4ec24e66f1fefe283a98e6cf056e
09:22 gbhat joined #mojo
09:46 gbhat left #mojo
10:05 dod joined #mojo
10:10 dod joined #mojo
10:21 sri and i'm renaming -c to -b
10:21 sri -b being short for --broadcast, to make sure the behavior is obvious
10:24 sri it's getting pretty big https://github.com/kraih/minion/compare/63fefa1b66bdb7b361229fb1058e1ccef62f66ed...master
11:30 * sri closed 3 minion feature issues https://github.com/kraih/minion/issues
11:34 irqq joined #mojo
12:44 jberger sri: good morning
12:45 jberger Any opinion on the behavior of text with a layout?
12:55 sri seems like a bug
12:57 jberger Ok
12:58 jberger Once I'm really up and moving i can open an issue for it if you like
13:02 mishanti1 jberger: I have a quick question on community / etiquette specific for Perl and wondered if you are up for a PM on the subject. Would that be ok?
13:02 jberger sure
13:14 stefan_ joined #mojo
13:15 good_news_everyon joined #mojo
13:15 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/viP1F
13:15 good_news_everyon mojo/master dc8b5d0 Sebastian Riedel: fix bug where Mojolicious::Renderer would wrap text in layouts
13:15 good_news_everyon left #mojo
13:17 jberger heh, just finished my bug test case :-P
13:17 jberger sri++
13:18 sri my test case was simply MOJO_LOG_LEVEL=debug perl -Ilib -Mojo -E 'app->build_controller->render(text => "lalala", layout => "foo")'
13:19 jberger why do you call it _maybe?
13:19 stefan_ Hey, hey!!  Right on, guys!!  Thanks, sri and jberger!
13:19 jberger that is basically the fix I would have proposed but I was going to call it _encode
13:20 sri because i'm not very creative with names today
13:20 jberger doesn't matter of course
13:20 jberger thanks for the quick fix
13:20 sri and _encode doesn't fit on the line
13:20 jberger hahaha
13:20 jberger _maybe it is then
13:21 jberger stefan_: glad it got tracked down
13:21 jberger cheers
13:43 dod joined #mojo
14:10 kaare_ joined #mojo
14:12 * sri has a hard time believing that a rather cheap headset is supposed to be the best on the market
14:12 sri anyone here tried a hyperx cloud 2 by any chance?
14:14 sri only competition seems to be a $300 headset from beyerdynamic Oo
14:15 stephan48 sounds strange but not really surprising. i heard good things of cheap headsets in combination with good soundcards
14:16 sri funny you say that, the hyperx comes with a usb soundcard
14:16 stephan48 yes
14:18 stephan48 usually works quite well but can also be a problem depending on the audio chip they use
14:19 sri considering the reviews it seems to work amazingly well ;p
14:20 stephan48 aslong as you don't buy logitech headsets(g930, g35) usb works quite good :D
14:21 sri i've actually looked into logitech headsets... ye... the reviews look bad
14:23 sri guess i'll get those just go and get those hyperx for testing
14:25 stephan48 please report back, looks definitively interesting.. one thing i find interesting is that apparently the usb soundcard is detachable from the headset
14:28 stephan48 btw, why are you searching for a new one?
14:29 mishanti1 sri: I found this video interesting while back: https://www.youtube.com/watch?v=mgCMRai9K8I  Other than that a youtube-search for 'hardwarecanucks headphones' gives several videos with decent reviews.
14:53 abra joined #mojo
15:01 abra Hi all! How to print message to channel by using Mojo::IRC?
15:04 asarch joined #mojo
15:05 irqq_ joined #mojo
15:09 jamesaxl joined #mojo
15:48 batman abra: you might get some ideas from https://github.com/Nordaaker/convos/blob/master/lib/Convos/Core/Connection/Irc.pm
15:48 batman Have a look at the send() method
15:49 abra batman ok, tnx!
16:04 sri stephan48: i never actually had a headset, just decent sony headphones i got like 10 years ago and apple earpods for everything else
16:05 stephan48 ah ok
16:05 sri few weeks ago i started looking for new headphones, but then stumbled over reports of how good headsets have become
16:06 batman abra: let me know if that doesn't make sense
16:07 batman sri: i'm really happy with my shure 353 ear plugs. they are no longer the best version, but instead a bit cheaper :)
16:08 sri would be cool to find something i can wear all day for programming and also while gaming
16:09 sri never heard of shure
16:10 sri but my ears tend to hurt from pretty much all earphones aside from the apple earpods
16:11 batman sri: i like the kind where you can change the cable and tips
16:11 batman the tips is a must, but changing cable is also important, since cables tend to break :/
16:20 laidback_01 joined #mojo
16:30 mishanti1 sri: I would recommend headphones that do not touch the ears at all, that being the "around ear" kind.
16:30 mishanti1 Especially if you plan on using them for long sessions.
16:40 tyldis Agreed for stationary work.
16:58 PryMar56 joined #mojo
17:00 lluad joined #mojo
17:11 sri mishanti1: got an example?
17:24 mishanti1 sri: My experience is limited but Bose headphones have served me very well. Last pair I got was Bose AE2. Those are not the best for gaming though. I think they have largely been replaced by the Bose QuietComfort series.
17:25 mishanti1 sri: This is a (by no means complete) list of around ear headphones a friend forwarded: http://www.techradar.com/news/audio/portable-audio/best-over-ear-headphones-1280342
17:25 sri oh, you mean over-ear headphones
17:26 sri yes, i'm definitely looking for over-ear, and not on-ear
17:26 sri the bose don't seem too good for programming with the active noise cancelling
17:27 mishanti1 Yeah, when I bought my Bose I specifically chose the ones without noise-cancelling.
17:28 sri i actually did just buy these and will try them in a bit :) https://www.amazon.de/HyperX-Cloud-Gaming-Kopfh%C3%B6rer-metal/dp/B00SAYCVTQ/
17:28 * Grinnz hasn't had any problems with G35... the surround sound is nice
17:28 mishanti1 Of the headphones I have tried the best _listening_ experience I have had was with the Fostex TH-X00.
17:30 mishanti1 I have yet to find a headset that nails both listening and more interactive experiences like gaming.
17:33 Grinnz I generally only use my G35 for gaming
17:38 trone joined #mojo
17:46 jamesaxl joined #mojo
17:49 disputin joined #mojo
18:04 mishanti1 Our whole house smells of angry farts. Having Norways national dish for dinner.
18:04 mishanti1 (fårikål)
18:10 sri i did not need to know that
18:12 mishanti1 sri: You should try fårikål if you come to Norway again. It really is quite tasty.
18:24 genio You're not selling it well if it smells like that! :)
18:24 sri yea, not sold
18:25 genio Although I'm pretty sure you're talking about the effects it has on you afterwards with the whole cabbage and whatnot
18:27 genio The pictures of it on google look pretty good, though!
18:42 trone_ joined #mojo
18:46 rubin joined #mojo
18:51 sri ok, first impression of the hyperx headphones.... holy shit... how are those not more expensive?!
18:53 sri ridiculously confortable
18:54 sri s/n/m/
18:57 thowe joined #mojo
18:57 sri pretty much everything made from aluminium
18:58 sri no plastic, just some parts coated with the same rubbery material that's on the back of the kindle
19:00 sri sound is definitely better than on my old sony mdr headphones
19:03 sri the external usb sound card is weird, you can plug the headphones directly into the macbook headphone jack or use the external sound card
19:03 sri sound is quite a bot better with it
19:05 stefan_ joined #mojo
19:17 Adura joined #mojo
19:39 vicash sri: is the headset wire detachable ?
19:40 sri nope
19:40 sri but it's one of those braided wires
19:40 sri and the external sound card is basically a detachable extension cable, doubling the length
19:41 vicash ah.. it is an external amplifier
19:41 vicash it allows you to use it on shitty hardware too where the sound card can be a cheap one
19:42 sri definitely sounds better than the native mac sound card
19:44 sri which is apparently a cirrus logic
19:46 vicash the top review on this for me is hilarious.. some guy was using HyperX II and he didnt hear a murder happening above his apartment.. so he gives the headset 5 stars
19:46 sri heh, that one is a classic
19:46 sri but the isolation is in fact really good
19:47 sri imagine in very warm weather they could get uncomfortably hot
19:47 vicash sri have you thought of using affiliate marketing on amazon for Mojolicious ? since the developers discuss so many products here, maybe it can make sense to use that for the project to raise some funds
19:47 sri haha
19:50 mishanti1 Well, it is not a bad idea.
19:50 mishanti1 I would happily visit amazon-by-mojo-proxy if it meant that some of the purchase went towards Mojolicious.
19:53 vicash yea, imagine if you subscribe to getting monthly toilet paper and Mojolicious gets $1 for it every time.. the more you use, the more Mojo gets.. then you can pair that with suggestions of things that make you want to use more toilet paper...
19:54 preaction one of those amazon buttons that you click to get toilet paper delivered, and mojolicious gets a dollar
19:54 preaction "wipe yourself for mojolicious!" ... okay, i'm not proud of that one...
19:55 vicash someone should manufacture toilet paper with perl oneliners
19:56 vicash like the word-a-day ones.. perl-oneliner-a-day
19:56 thowe Actually, that would be a cool desk calendar...
19:56 sri bummer, looks like i can't actually make amazon.com affiliate links
19:56 thowe tear away cmd tips and tricks and one liners.  You could learn to use your shell over the course of a year...
19:57 sri if you want to buy the headset i have in germany though... :) http://amzn.to/2cxOrk7
19:58 vicash my firefox doesn't open that link saying unsafe SSL negotiation ..
20:00 sri talking about money for mojolicious... just yesterday me and jberger talked about how nice it would be to have a little marketing budget for mojolicious
20:01 thowe I use Moose for a small lib in a project of mine, but I'm wondering if I couldn't just use the Mojo::Base class (?)
20:01 thowe https://github.com/thowe/MoPieNg/blob/master/lib/PieDB/FreeSpace.pm
20:01 sri like for buying 500 of these to give away at perl conferences https://www.stickermule.com/marketplace/10014-mojolicious-night-sky
20:01 preaction thowe: sure. and if you still want roles, Role::Tiny
20:02 vicash thowe: Moo + Role::Tiny is great..
20:02 vicash thowe: if you just want the simplest object system Mo is also a good candidate..
20:02 thowe yeah, don't use roles...  Just have a pretty basic object that represents the empty space between IP subnets.
20:02 preaction right, but if you already have Mojo::Base, why require more that you don't want?
20:03 sri how odd, i swear 500 stickers got cheaper since yesterday
20:03 preaction NetAddr::IP doesn't already do that? sounds like something to add there?
20:03 sri now it's about $220
20:04 thowe I use NetAddr::IP, but I have to do stuff it doesn't do.
20:05 thowe This is sort of an object for the space between NetAddr::IP objects.  and doing things with that space
20:05 preaction right. i was thinking you could add it to that. like "my $between = $net->between( $other_net );" $between is another NetAddr::IP object
20:07 thowe It's possible.  I' haven't really thought about it with that goal in mind.  Just built the one-off stuff I need.  The most annoying thing NetAddr::IP does a couple of annoying things I have to work arround.
20:07 sri wow, these headphones are made for programming
20:08 thowe heh, that sentence mad no sense as I decided not to go into examples....
20:08 sri alternative rock sounds good, but electronic music sounds amazing
20:09 thowe like the work-around I had to do here: https://github.com/thowe/MoPieNg/blob/master/lib/PieDB/FreeSpace.pm#L141
20:10 thowe It's just I'm looking at this and have no friggin clue why I used Moose.
20:10 * sri is currently listening to this playlist https://play.spotify.com/user/dondemon/playlist/3upJSeV6lAHhMTuraNg5J4
20:10 thowe But it was one of the first things I ever wrote in Perl, so re-thinking it is probably a good idea.
20:12 thowe originally did it in Catalyst, might have had something to do with it.
20:13 * thowe needs rainbow-puking unicorn raptors
20:13 thowe on stickers, I mean
20:14 sri think i have to pay like $20 for every new sticker i want to add
20:14 * thowe looks for his checkbook
20:16 sri ah, no, it's exactly $56 now, since i need to order 50 myself before i can add them to the marketplace
20:17 * thowe hides his checkbook again
20:17 sri they don't do lower quantities anymore it seems
20:19 sri lol, if i really wanted i suppose i could open a second accound for 3 more free stickers
20:19 sri could invite myself
20:42 thowe so, if I inherit Mojo::Base -base, and I want to make some check on the values used to create my obj, does it make sense to create my own ->new method and call $self->SUPER::new(@_) and then check what I get?  I assume I am not imagining the best way out of the gate.
20:43 thowe I want some validation on the data used to cretae my obj
20:43 Grinnz sure. if you use Moo or Class::Tiny::Chained that would go in the BUILD method
20:44 thowe Yeah, I have a BUILD method in my Moose version, but I am trying to just use Mojo::Base
20:44 Grinnz my $class = shift; my $self = $class->SUPER::new(@_);
20:44 polettix joined #mojo
20:44 thowe That's what I thought off the top of my head, which is why I don't trust it ;P
20:46 thowe my process is, generally, come up with my idea, run it by Perl people, learn how I am stupid, be slightly less stupid.
20:46 * Grinnz wanted to write Class::Tiny::Chained specifically to get (mostly) Mojo::Base semantics in non-Mojo projects
20:46 thowe I may very well look into that, but for this simple thing I am trying to not require any extra modules.
20:48 thowe Is Class::Tiny a pretty common thing, I assume?
20:48 genio yea
20:48 thowe oh, wait, you're saying you wrote that to do the same things...  Nifty
20:49 Grinnz i didn't write Class::Tiny, just the Chained version :P
20:49 thowe Yeah, I got that.  Still..  Nifty
20:49 thowe OK, I'm gonna try this.  Thanks for your help, as always!
20:50 Grinnz i think Class::Tiny would be neat to have in core, which reminds me, wonder how p5-mop is coming along :P
20:54 genio Is that still being attempted?  It seems like great work is being done on it, then I don't hear about it for quite some time. Then great work, then ...
20:54 Grinnz btw another slightly related thing, MooX::ChainedAttributes was recently optimized which is nice (haarg++)
20:54 Grinnz and by recently i mean several months ag
20:54 genio haarg++
20:55 Grinnz genio: no commits for 3 months... stevan got distracted again i guess :P
20:57 sri i miss chained attribute accessors every time i use Moo
20:58 genio same here ^^
21:02 cuechan joined #mojo
21:04 good_news_everyon joined #mojo
21:04 good_news_everyon [mojo] kraih tagged v7.06 at a9614cc: https://git.io/viXTf
21:04 good_news_everyon left #mojo
21:05 good_news_everyon joined #mojo
21:05 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/viXTI
21:05 good_news_everyon mojo/master 2668dc9 Sebastian Riedel: bump version
21:05 good_news_everyon left #mojo
21:18 cpan_mojo Mojo-Pua-0.005 by ALEXBYK https://metacpan.org/release/ALEXBYK/Mojo-Pua-0.005
21:25 vicash batman: i am debugging AssetPack::Pipe::Fetch right now. seems like even though the images in url() are fetched they don't seem to be patched back into the stored asset CSS file.. for example if the CSS says background-image:url("../images/some.png"), images/some_png is downloaded but the CSS file still refers it to as ../images/some.png and when AssetPack creates a new URL for that file, it refers to "/asset/images/some.png" which
21:35 vicash batman: please ignore .. i have to use Png Pipe.. then it works.
22:08 batman vicash: very cool that you're doing things I've not thought about :)
22:11 disputin joined #mojo
22:20 * jberger reads the backlog
22:20 jberger shure is a well known microphone company, not as sure what their reputation is for headphones
22:22 sri love the hyperx headset, definitely keeping that
22:23 sri comfy enough to wear all day
22:24 vicash batman: maybe coolo's problem on github is that he isn't using all the pipes he needs to use
22:26 jberger there is https://metacpan.org/pod/MooX::ChainedAttributes
22:27 jberger and now I'm caught up
22:27 batman jberger: the 353 is awesome. Too bad I've gotten used to them :/ I think I have to get a molded tip some time soon...
22:28 jberger batman: ?
22:28 batman The Shure ear plugs
22:28 jberger ah
22:29 batman vicash: I don't know :/
22:31 batman Sorry. I meant 535... I always mix them up :(
22:32 jberger $500 earbuds ...
22:32 jberger wow
22:32 jberger do the come with a gold watch?
22:32 batman It's funny how I was so skeptical and then when I tried them I just sat for 15 minutes listening to music without noticing anything else :)
22:33 sri i imagine they are even more expensive in norway :o
22:33 batman Haha. No. just excellent sound :)
22:34 batman sri: I bought them in france. I think I saved around 120 euros by doing that iirc
22:35 batman It's been three years now I think...
22:36 batman i think they will be cheaper in the long run. I used to spend 80$ per year before that on crap :/
22:36 stefan_ joined #mojo
22:37 jberger I've been reasonably happy with the free headphones I got with the samsung s3 (yes 3)
22:37 jberger we had two because my wife and I both got the same phones, when I finally wrecked mine I found out she had never used hers
22:37 jberger and now I have another one form the s7 just waiting in a little box for me when I finally wreck these
22:38 jberger I'm sure they aren't in the same league as the things you are talking about but they do the job for me
22:38 jberger I'm still amazed at how crappy bluetooth headphones are
22:38 batman Yeah. I hear the same from people who have iPhones... I've never managed to get them to fit in my ears :(
22:38 jberger I got a few crappy pairs and they would drop sometimes, so I ponied up for a good pair and they still drop sometimes
22:40 batman Yeah. That's just awful :(
22:41 batman I've changed the cable a couple of times. I bought some bad cables on eBay after the original broke
22:41 batman bur it's really nice when everything can be changed, except of the actual speaker
22:42 stefan__ joined #mojo
22:42 disputin joined #mojo
22:42 batman means that the pricy part can last for many years
22:43 stefan__ I'm sure this isn't the quality you guys are looking for, but for an active lifestyle, these are perfect: http://aftershokz.com/
22:47 sri heh, those look weird
22:47 sri i like it
22:47 sri for sports i'm still using the apple earpods
22:50 stefan__ What's great is that they are bone conduction, on your cheeckbone, so nothing in your ear.  Can still hear what's going on around you, as well as your audio.
23:03 stefan__ jberger: Mojo::ACME...  The certs are only good for 90 days.  With LE, you had to put in a cronjob to refresh your cert.  How do you refresh the cert with ACME?  If it's built into the module, can you point me to the code that triggers auto-renewal?  I'm curious to see how that works.
23:15 jberger I don't understand the difference you are making between Mojo::ACME and LE?
23:16 jberger Mojo::ACME is a client for Let's Encrypt
23:16 jberger do you mean the horrible official client?
23:17 jberger anyway, just run the generate script again, replace the old cert with the generated one (you can just point the output to the same place) and then reload nginx or hot reload hypnotoad
23:17 jberger should be like 3-5 lines of bash
23:17 stefan__ Well, I ran the generate script again ( a few times for testing (shoulda used -t!!) and now it tells me I have too many certs.
23:18 stefan__ Will it be OK by the time 90 days hits?
23:18 jberger https://letsencrypt.org/docs/rate-limits/
23:18 stefan__ But, yes, that's what I was asking about.  Is the acme cert generate command what I need to schedule in cron?
23:18 jberger and yes, that is what -t is for
23:18 jberger yes
23:19 stefan__ Perfect!  That's what I thought.  The error message that I had too many certs threw me off.
23:19 jberger my Mojo::ACME is basically a port of the python acme-tiny script
23:19 jberger note that one cert can be for multiple names
23:20 stefan__ I used the LE scripts when LE first came out.  It was really quite overly complicated.  Required a full VM or something!!  The new tools like yours are SOO much nicer!!  :D
23:20 jberger so if you need several sites just wait until your rate limit backs off by one and issue one cert for each one you need
23:20 jberger the official client is terrible
23:20 jberger and it rewrites your nginx config for you! yeah, not gonna allow that
23:20 stefan__ Perfect!  Thanks, jberger!  What a really great plugin!!
23:20 jberger thanks
23:21 jberger the official client also requires virtualenv ... WAT?
23:25 stefan__ Yeah, that's the WORST!!!
23:25 stefan__ I ran it one time, and it worked, but was like this is not sustainable!!
23:25 stephan48 its complete madness
23:28 Grinnz https://maroskukan.files.wordpress.com/2014/10/c6650-madness.gif
23:31 stephan48 jberger++ #acme-tiny port
23:37 stefan_ joined #mojo

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