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

IRC log for #mojo, 2018-02-01

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

All times shown according to UTC.

Time Nick Message
00:03 * haarg will be at fosdem
00:03 nicomen that was fast ;)
00:04 nicomen haarg: batman and marcus too
00:05 nicomen and apparently someone named Afristar ;)
00:05 Afristar Hey, that´s me!
00:06 Afristar Let´s have a beer at Café Delirium on Friday!
00:07 * nicomen is not going
00:07 nohuhu joined #mojo
00:07 Afristar Why not? :)
00:07 nohuhu Is there a way to debug Mojolicious application with perl -d? Naïve approach with setting a breakpoint in controller code and running perl -d morbo doesn't really work, interactive debugger is not activated and request times out.
00:09 nicomen Afristar: not good at planning upfront
00:09 nohuhu A quick ducking didn't reveal any secret sauce so far
00:10 nicomen nohuhu: perhaps perl -d:Trace might help (except huge amounts of output, but you can limit by say: |& grep /path/to/your/code )
00:11 nohuhu nicomen: Ideally I'd like to use interactive debugger to step through the code. Logging can be figured out but it's kinda backwards way
00:11 nicomen nohuhu: perhaps you can use Test::Mojo with perl -d ?
00:12 nohuhu nicomen: Not sure how that would help in debugging server side code. Care to elaborate?
00:35 nohuhu Solved the problem by running Mojo app under plackup. Interactive debugging just works as expected.
00:37 robx joined #mojo
00:47 Grinnz under plackup, the event loop doesn't run, so that probably is simpler for the debugger
00:48 Grinnz also morbo is a complicated way to run an app, did you try ./app.pl daemon?
00:48 nohuhu Right, that's what I was looking for. Not sure why something simple like that is not bundled with Mojo though.
00:49 nohuhu Grinnz: I did try to run it that way, didn't help with debugger. I didn't explore other aspects at that time.
00:49 pink_mist ./app.pl daemon is certainly bundled with mojo
00:49 pink_mist and plackup is too simple to support Mojo's async features
00:50 Grinnz './app.pl get /somepath' is also a good way to run the app and a single request without starting up the whole daemon
00:52 nohuhu Grinnz: What if I need the app to traverse several routes before I hit the sub I need to debug? It's just easier to set a breakpoint where I need it.
00:53 Grinnz just mentioning the option in case it was relevant
00:53 Grinnz i tend to debug with $c->app->log->warn()
00:59 nohuhu Grinnz: It seems to be the official way, but it's less than efficient in many cases. I'm only getting my feet wet with Mojolicious and used one particular problem with my code as a training excercise. I know I'll need to debug code later so might as well figure out how to do that beforehand.
00:59 Grinnz i dunno about official, just least complicated :P
00:59 pink_mist there's also the MOJO_DEBUG env var
01:00 nohuhu Grinnz: Not sure what you mean. What could be less complicated than setting a breakpoint and stepping over code? :)
01:00 Grinnz nohuhu: that's all very foreign to me, whereas changing lines of code is natural
01:01 nohuhu Grinnz: Different strokes I guess.
01:12 jberger nohuhu timtwotdi of course, but it does seem that many people debug async code with logging rather than debuggers
01:12 jberger The nonlinearity can be hard to reason about in real time
01:12 jberger Not impossible certainly
01:13 nohuhu jberger: Right. What I meant is that server code does not have to be async in many cases. It certainly is not that helpful when developing/debugging.
01:14 jberger Sure, but for example much of my code is async so I'd need it to run that way anyway, so you fall into a habit
01:15 jberger I was just mentioning for completeness, looks like you got some answers for procedural stuff
01:15 nohuhu jberger: By the way, insane amount of kudos for mojolicious.io
01:15 * jberger blushes
01:15 jberger Drat I need more content!
01:16 jberger That was a hard month but I think I'm recovered
01:16 nohuhu No I'm serious. I've written some docs and/or blog posts at $work so I can appreciate the amount of effort that went into that website
01:16 jberger Thanks
01:16 nohuhu A month? I'd thought you were preparing the whole year before that.
01:16 jberger HAHAHA
01:17 jberger That was an insane idea I had a week before December
01:17 nohuhu jberger: Also re: debugging, I've seen several questions posted on SO and other websites about that, but no definitive answer. Might be a good idea to mention this or that approach in the docs.
01:17 jberger And stupidly I spent moist of that week importing a new template for statocles
01:18 jberger s/moist/most/ obviously
01:18 jberger Hmmmm ill think about where it could go in the docs, but it would make a great blog post too!
01:18 nohuhu I was always in awe at people who can write stuff this good this quickly, just like that. Would take me a lot of excruciating effort and knuckle biting and more tea I could possible survive.
01:19 jberger Oh I spent way too many nights up until 3am. It was mad dash typing in all my free time
01:20 jberger Honestly it's a miracle any of it is readable
01:20 nohuhu I dunno, I didn't actually read it. But appreciated it anyway. :)
01:20 jberger And if it hadn't been for guest posts I don't know if I could have made it
01:21 jberger Awwww 😁
01:22 nohuhu I plan to read most of that blog though, very interesting looking stuff
01:22 nohuhu Server side web applications are... New to me I must admit.
01:35 epiphero sri: woohoo ... thanks!
01:41 aborazmeh joined #mojo
02:57 ilbot2 joined #mojo
02:57 Topic for #mojo is now 🍩 nom nom | http://mojolicious.org | http://irclog.mojolicious.org | http://code-of-conduct.mojolicious.org
03:16 Ya_ALLAH_Ya_Muhmd_ joined #mojo
03:16 Ya_ALLAH_Ya_Muhmd_ left #mojo
03:58 purl joined #mojo
03:59 bianca joined #mojo
05:04 dboehmer joined #mojo
05:16 bianca joined #mojo
05:34 bianca Morning! Is there something like Mojolicious::Plugin::TagHelpers::Pagination but without specifying the total count of pages?
05:35 Grinnz how does one paginate without knowing how many pages?
05:37 bianca well, I have a high amount of objects so I can stop the search when I found the ones on the given page, therefore not knowing how many pages there really are
05:38 bianca does that make sense? Or am I writing the query wrong?
05:38 Grinnz without knowing how many pages there are, you won't know if there are more pages to look at
05:38 Grinnz maybe more of a "show more results" situation?
05:39 bianca yes you may be right. I was thinking more like "request the next page" and if that one does not contain enough results (may even be empty) then you can't have a next
05:40 bianca if it's empty just print "no more results to show" or sth similar
05:41 bianca do you know of something already implemented for showing more results, similar to the pagination module? (still having a prev and next arrow)
05:42 bianca or even something like a news feed, where you can request more results
05:43 bianca Grinnz sorry forgot the tag
05:47 iamb it's a very useful pattern...a bit tricky to explain breifly but not hard to figure out. assume an incrementing serial id...you can do first, prev, next, and last by using params 'before' and 'after', and querying for limit+1 from that id possibly reversing order...dont know of anything pre-written sorry
05:49 bianca iamb thank you, I'll think of a good way to do that :)
06:03 Peppard joined #mojo
06:05 bianca iamb I looked over the code in the pagination module and apparently if you supply -1 to the number of pages it works just right, but without showing the number of the last page
06:06 bianca ok I just noticed that it's in the README on github, I didn't notice that on cpan
06:06 iamb cool i haven't checked out the module...yep
06:06 iamb just saw that :)
06:07 bianca it is on cpan as well. If I had only looked hard enough
06:14 iamb ah looks like that's just dressing assuming you know page number and total, yeah if you handle 'no results' that works...doesn't seem the module helps much in that case but whatevers clever
06:27 Vandal joined #mojo
06:29 inokenty-w joined #mojo
06:37 polettix joined #mojo
06:54 dod joined #mojo
07:11 dod joined #mojo
08:01 marcus https://www.youtube.com/watch?v=9SZzQNXPSnA wow mom
08:05 marcus Afristar / haarg : def up for a beer at Delirium tomorrow :)
08:05 marcus And I'll force batman too, as much as he hates beer.
08:05 marcus :-p
08:06 marcus We're flying in early, so will try to get to delirium before it's completely filled up.
08:36 trone joined #mojo
08:49 dabudabu joined #mojo
08:51 wouter left #mojo
08:56 karjala_ joined #mojo
09:05 Edward joined #mojo
09:09 Vandal omg this video - my eads are bleefing
09:09 Vandal *ears
10:21 dotan_convos joined #mojo
10:55 tchaves joined #mojo
11:00 itaipu joined #mojo
11:18 jonyvx joined #mojo
11:18 jonyvx left #mojo
11:26 johnvx joined #mojo
11:26 johnvx left #mojo
11:35 tchaves joined #mojo
11:39 CHYC joined #mojo
11:46 jonyvx joined #mojo
11:46 jonyvx left #mojo
12:01 tyldis A bit off topic, but postgres is popular here, so: https://github.com/paunin/PostDock
12:01 tyldis Easy to  set up a redundant cluster in docker
12:57 tcohen joined #mojo
13:10 bianca joined #mojo
13:24 bianca joined #mojo
13:51 dikim joined #mojo
13:54 aborazmeh joined #mojo
14:05 tcohen1 joined #mojo
14:15 gizmomathboy joined #mojo
14:23 Pyritic joined #mojo
14:55 gryphon joined #mojo
15:02 jberger mohawk: new mustache? I don't remember it from PTS. Nice
15:17 orev joined #mojo
15:19 tchaves joined #mojo
15:37 mishantil joined #mojo
15:42 sri say what you will about systemd, journald is damn comfortable to use
15:46 sh14 joined #mojo
15:49 marcus sri: That's what I want to say. Also writing systemd units is heaps better than sysv shell scripts
15:59 disputin joined #mojo
16:09 allie joined #mojo
16:24 jabberwok geologic ages ago, we used djb's daemontools.  the little bit of systemd I have had to touch, reminds me of that.
16:29 disputin joined #mojo
16:32 sri i like that you can do stuff like "sudo journalctl --vacuum-size=1G"
16:34 exp-innit it is also really nice that most of it has a --user option
17:06 vicash While using Mojolicious::Plugin::Minion with named queues and multiple workers, I have a bit of confusion understanding how to get some workers to dequeue only from one particular queue. Let's say I have 2 queues, A and B, and 8 workers. I want 6 of those workers to always dequeue from queue A and 2 of those remaining workers to always dequeue from queue B. I am not writing custom workers but just using the whole Mojo app along with
17:06 vicash I can enqueue stuff correctly though
17:07 CandyAngel vicash: You pass the "-q $queue" arguments when starting the workers?
17:08 vicash CandyAngel: thanks. will try that. didn't even look at the commandline options .. duh!
17:15 ghenry joined #mojo
17:21 tcohen joined #mojo
17:29 ChmEarl joined #mojo
17:50 tcohen1 joined #mojo
18:22 petru joined #mojo
18:22 petru hi, if I'm executing commands using system on hypnotoad, will they be executed by a separate user or as the user who started hypnotoad?
18:24 Grinnz unless you've changed user (using the SetUserGroup plugin for example) it will be the same user and group as that process, since it's done by forking
18:25 gryphon joined #mojo
18:25 dod joined #mojo
18:27 petru Grinnz: thanks. Is there a reason then why the following lines would work when run by PGDATABASE=supersecret_test carton exec perl super_secret daemon -l http://127.0.0.1:2323 but fail if ran by carton exec -- hypnotoad super_secret
18:28 petru the commands just update some things in the database
18:30 Grinnz how does it fail? could be a multitude of reasons
18:33 petru I don't know since hypnotoad doesn't log a lot of info on the server, I thought that it may be a permission problem for the db, I'll look more
18:37 nohuhu joined #mojo
18:49 petru how can I run 2 instances of hypnotoad on the same machine? I've tried editing the configuration file and setting a different port, but I've still got an error saying that there's already a server running.
18:52 pink_mist petru: setting a different port in the configuration works fine for me
18:53 pink_mist I have 3 or 4 different hypnotoads running on one of my servers
18:53 pink_mist and they all have different ports set in their respective configuration
18:53 pink_mist and it works absolutely flawlessly
18:59 tyldis petru: Are you sure you changed the configuration for hypnotoad specifically?
19:02 Grinnz petru: also make sure there isn't something also running on that second port already
19:06 petru you're right, sorry for the question
19:14 ghenry joined #mojo
19:34 sri oh, bitcoin is crashing again
19:38 coolo again? I would say still :)
19:39 sri it was stable for almost a few days!
19:50 Seth joined #mojo
19:55 pink_mist I mostly hope bitcoin crashes so I can get a new gpu sometime this year
19:57 polettix joined #mojo
19:57 jberger pink_mist: hahaha, hadn't thought of that
19:59 jabberwok i wonder if Vegas is taking bets on what bitcoin will be next 01Jan
20:03 jberger $400
20:05 jberger https://www.betfair.com/exchange/plus/financial-bets
20:05 sri the gpu situation is crazy
20:07 pink_mist http://canibuyagpuyet.xyz/
20:08 jberger hahahaha
20:08 purl LOLCON 4 reached.
20:09 polettix I thought using GPUs for mining was obsolete (if the reference to bitcoin above is tied to the GPU thread)
20:10 pink_mist it was
20:10 pink_mist then bitcoin got a huge boost in value
20:10 pink_mist and so people believe it isn't anymore
20:10 polettix uhm
20:11 pink_mist also, the gpus got better at it I believe
20:12 polettix just 1 hour ago I saw a video lecture on Coursera about it… and it was definitely obsolete in 2014
20:12 Grinnz no, they made alternate crypto currencies that are easier to mine with gpus and harder for asics. those are traded for bitcoins since they have no real value
20:12 Grinnz then asics got better at those, so they made more
20:12 polettix this probably makes much more sense
20:13 Grinnz it's all about keeping up with new algorithms your gpus can handle
20:14 Grinnz mining actual bitcoin with gpus was never really a thing, however there are some Bitcoin forks that are gpu friendly
20:15 Grinnz it's just up to whether you can find someone to give you Bitcoin for whatever you are moving
20:15 Grinnz mining
20:17 Grinnz core Bitcoin has always been sha256 which is way better for cpus
20:18 pink_mist Grinnz++ # good explanation
20:18 jabberwok polettix: i like the reverse-proxy bit.  I had a few minor grammar suggestions for one sentence.
20:18 Grinnz and don't think you're going to get anywhere with your Intel desktop cpu. you need server farms of mining cpus
20:18 Grinnz this is why only a few big corporations are doing most of the Bitcoin mining now
20:20 jabberwok reductio ad nihil
20:20 Grinnz Chinese mostly iirc
20:20 polettix jabberwok: eager to listen. Is it time to propose it as a PR and ease the feedback loop?
20:21 jabberwok i was just about to do that polettix but github does funny bits when you try to fork a project by the same name as you've already got one... heh.
20:22 polettix ok I’ll do that then
20:23 polettix I will not squash commits for now, because I anticipate that there will be changes to be done anyway
20:23 polettix is this an accepted practice?
20:29 Grinnz polettix: you can squash at any time, no reason not to
20:32 polettix Grinnz: just to be sure, it would be squash then push -f to my repo right?
20:32 Grinnz right
20:33 polettix ok
20:33 Grinnz and make the pr with a branch, not your master branch, will make things easier later
20:33 Grinnz learned that the hard way :)
20:34 polettix yes, that is already the case :)
20:41 mohawk marcus, why "wow mom"?
20:42 pink_mist I assumed Ed J was his mom
20:42 pink_mist oh wait, that's you
20:42 pink_mist lol
20:45 polettix ok, squashed and created a PR
20:47 sri star trek discovery has no right to be this good
20:47 sri somehow they turned it around
20:54 sri polettix: i like the reverse proxy section, very nicely visualised, but it needs grammar fixes
20:57 polettix sri: suggestions on how to proceed? I can do modifications with suggestions either as comments to the PR or here in IRC
20:57 polettix I fear I’m a bit “blind” to the needed fixes
20:58 sri i'm not great at writing, better to get native english speakers involved
20:58 * sri just sees that it doesn't read very smoothly
20:58 sri content is fine though
20:59 polettix that’s the first 80%. Not let’s fix the other 80%
20:59 sri yea :)
21:03 polettix I’ll tweet asking for help, hopefully Perl Weekly will retweet and someone will show up
21:04 sri i'd hope jberger would help
21:04 sri mailing-list might be the best choice for asking for help
21:05 jberger o/
21:06 jberger I can give it a read
21:06 polettix thanks
21:06 polettix if it still doesn’t click I’ll write in the ML
21:06 polettix https://github.com/polettix/mojo/blob/patch/doc-reverse-proxy/lib/Mojolicious/Guides/Cookbook.pod#reverse-proxy
21:07 sri i commented too, so it's more visible that help is wanted
21:08 jberger what does "protecting your application in the backend" mean?
21:09 sri yea, backend and frontend can be confusing
21:09 sri frontend in web dev usually means something else
21:09 jberger well I don't even know what it means by protect
21:09 jberger how does it protect it, in what way
21:10 polettix it might add throttling for example, or reduce the surface of attack because you need to harden the reverse proxy instead of the backend servers
21:10 sri no direct socket access, reverse proxy limits the number of concurrent sockets open on the app server
21:11 polettix it shouldn’t be difficult to get rid of frontend/backend
21:12 Grinnz yeah i think that would be less confusing with other names, but still good to keep them consistently referenced. Mojolicious server vs proxy server maybe
21:12 jberger ssl termination is another good one to add
21:13 jberger I'd maybe start slightly differently
21:13 Grinnz I'm adding comments for basic grammar fixes
21:13 jberger something along the lines of "A reverse proxy architecture is a deployment technique used in many production environments"
21:14 jberger Having a why to care right at the front helps set the tone
21:16 * sri closes https://github.com/kraih/mojo/issues/1175
21:16 jberger I guess ssl termination is mentioned, just not by name
21:17 jberger (and not in the list of benefits)
21:17 sri how do we feel about this now? https://github.com/kraih/mojo/issues/1159
21:17 jberger if you want to mention socket protection, you might also note that the connection to the application server can be a unix socket
21:18 * polettix working
21:18 jberger re 1159, is there a way to pass through that switch?
21:18 Grinnz sri: it's probably a File::Find bug, but I still think it would be nice to provide the option to pass dont_use_nlink as a general workaround when users need it
21:19 Grinnz even if it's fixed in File::Find, old versions will need to do
21:19 Grinnz it
21:19 sri Grinnz: i hate adding non testable options :S
21:19 jberger Grinnz: is it fixed in newer File::Find?
21:19 Grinnz yeah :/
21:19 Grinnz jberger: not that i know of
21:20 Grinnz what i meant was "even if it was to be fixed in File::Find"
21:20 jberger ok
21:28 good_news_everyon joined #mojo
21:28 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vNbJK
21:28 good_news_everyon mojo/master 32118b0 Sebastian Riedel: add dont_use_nlink option to list_tree method in Mojo::File (closes #1159)
21:28 good_news_everyon left #mojo
21:29 sri jberger: didn't you want to change something in the get command? i can't find a pull request
21:30 jberger sri: oh, I never actually opened the PR it seems :P
21:31 jberger https://github.com/kraih/mojo/compare/get-user
21:33 sri jberger: well, now you missed me in a merge-friendly mood :p
21:35 Grinnz http://s2.quickmeme.com/img/06/065a70a9431cbeee5164f4632964d0bc1c0e03e41ea1006a22ff2460e1ee54d2.jpg
21:35 jberger quick quick ...
21:35 jberger hahaha, forgot to change the text :-D
21:36 Grinnz YELLING PLACEHOLDER TEXT
21:37 Grinnz hmm random thought re 1179, what about Mojo::Promise->all(@promises_or_values, {ioloop => $loop})
21:39 * sri rejects https://github.com/kraih/mojo/pull/1177
21:39 Grinnz i never really liked the implicit "use the ioloop from the first promise/future" so an explicit way to specify it would be nice, if not ugly...
21:39 sri it was ugly
21:39 sri whole thing is ugly
21:40 sri i'm fine with only accepting then-ables for now
21:40 epiphero Oh man, I was just reading 1177 to see what could be done to make it better. :/
21:40 sri promises for secondary event loops is such a fringe use case anyway
21:40 sri epiphero: why are you interested in it?
21:40 Grinnz i dunno. with Future it's a common use case, but Future also has a ->get which is designed to be used to spin the event loop
21:41 Grinnz well maybe not terribly common
21:41 jberger I have done so many ioloop-based modules that have ioloop attributes and never used them once
21:41 jberger mine are simple enough that it doesn't hurt to have so I keep doing it
21:42 jberger but I can see both arguments
21:42 epiphero In making the role with `any` in it, I was trying to have my role methods match JS libraries / expectations as much as possible.
21:42 Grinnz secondary event loops are generally going to be done for emulating blocking behavior
21:42 Grinnz so if you're not doing that, you won't come across it
21:42 jberger I know
21:42 jberger I'm just saying, I never had ended up doing that
21:42 Grinnz $future->get is the primary mechanism of emulating blocking behavior in IO::Async
21:43 mohawk sri seems to not be interested in being very close to the JS API
21:43 Grinnz since for example Net::Async::HTTP has no built in blocking emulation
21:43 Grinnz like Mojo::UA does
21:43 good_news_everyon joined #mojo
21:43 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vNbk2
21:43 good_news_everyon mojo/master 274bf63 Sebastian Riedel: Merge pull request #1188 from kraih/get-user...
21:43 good_news_everyon left #mojo
21:43 epiphero Well I see value in making things more perly than JSy
21:44 epiphero ...but if we're passing lists around, why not be able to handle whatever is in them?
21:44 mohawk epiphero, not sure what's JSy or perly about Promise.all(promises_or_values)
21:44 Grinnz it's not hard to make your lists Promise->new->resolve($_)
21:44 jberger \o/
21:45 epiphero mohawk: in this case nothing. :)
21:45 jberger I made a strong case with the default text
21:45 mohawk so far as i can tell: http://s2.quickmeme.com/img/4b/4b94a42e7d20c9c425695dc405a21b31a38422758873247d103fa0b9059863ac.jpg
21:45 Grinnz but making Mojo::Promise be able to handle non-promises everywhere is a significant code and api burden
21:45 Grinnz especially if more features get added
21:46 maschine_ <epiphero> I have some suggestions for wording but am not admittedly very experienced with Github
21:46 jberger mohawk: careful
21:46 mohawk left #mojo
21:46 good_news_everyon joined #mojo
21:46 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vNbkj
21:46 good_news_everyon mojo/master c4990e5 Sebastian Riedel: update Changes
21:46 good_news_everyon left #mojo
21:48 sri oh, i wanted to continue the discussion about promises... but i guess after that mic drop we better let it die
21:48 epiphero Grinnz: yes, can definitely map them
21:50 mohawk joined #mojo
21:50 mohawk to be clear: i'm saying that is the message i'm perceiving
21:50 marty jberger: stop being a hypocrite:  https://irclog.perlgeek.de/mojo/2017-08-15#i_15021541
21:51 mohawk not one i'm sending
21:51 Grinnz marty: it's not about the profanity, and i suggest not contributing to antagonism
21:52 Grinnz mohawk: sri closing pull requests does not mean the end of a discussion, he actually used to do it more often which people interpreted as you are
21:53 mohawk i was offering a semi-humorous answer to epiphero's point
21:53 mohawk sri, what are your thoughts on promises
21:53 jberger mohawk: which is why I only said careful
21:53 sri mohawk: i'm out now
21:53 mohawk smashing
21:57 sri i kinda want to reject #1167, but it feels like there might be a good reason to have full ISO 8601 support and we've just not found it yet https://github.com/kraih/mojo/pull/1167
21:57 Grinnz mohawk: perhaps you should have PMd it then instead of making implications about motivations
21:58 polettix I pushed some modifications based on the feedbacks received (and some more): https://github.com/polettix/mojo/blob/patch/doc-reverse-proxy/lib/Mojolicious/Guides/Cookbook.pod#reverse-proxy
21:58 jberger mohawk wasn't around for some of the high-temper days of a few years ago
21:58 polettix thanks for all the help, I’ll continue tomorrow :)
21:58 Grinnz sri: i don't use Mojo::Date for all of that but maybe it would be nice if it could be...?
21:58 jberger as such he wasn't aware that we really try to refrain from profanity directed at others
21:59 jberger yes, we will all slip up from time to time
21:59 jberger just know that that is a direction we try to avoid here
22:00 mohawk i wonder what % of mojo PRs have been merged vs closed
22:00 mohawk and i wonder how many person-hours have gone into the closed PRs in aggregate
22:01 jberger ok, now this is going in a direction that could get out of hand quickly
22:01 sri https://github.com/kraih/mojo/pull/1167#issuecomment-362416633
22:01 sri maybe someone here has a use case for ISO 8601 dates
22:02 jberger mohawk unfortunately, hard work does not and should not guarantee admittance of code
22:02 jberger best of intentions is great
22:06 mohawk perhaps the contribution guideline should be updated to heavily suggest discussion first before coding
22:06 sri mohawk: your PR did not pass the vote, me personally ruling against it only means that i did not use the project founder privilege to merge it anyway because it fits my vision for promises
22:06 jberger mohawk: pretty sure it has that alraedy
22:06 mohawk jberger, if you think talking about facts could get out of hand, is that a sign of an underlying problem?
22:06 jberger not at all, I'm worried about accusations being thrown around
22:07 maschine_ polettix: http://bit.ly/2GF6fUy
22:07 mohawk sadface that i missed this: https://www.reddit.com/r/IAmA/comments/7ujhia/hello_i_am_a_graphic_designerhuman_man_and_i_am/
22:07 sri discussion before pull request is very very very heavily encouraged in the docs
22:07 maschine_ mostly changes to consistency of wording
22:07 Grinnz mohawk: please don't try to misrepresent passive aggression as "talking about facts", it's dishonest and impolite
22:07 maschine_ (hopefully I didn't screw that up)
22:09 epiphero sri: I'm using 8601 when talking to Postgres, but convert to epoch when needed...
22:10 sri epiphero: extract(epoch from foo) as foo
22:10 epiphero right, which works fine
22:10 sri parsing dates with Mojo::Date seems like a waste of cpu
22:11 sri all the rest apis i'm aware of use the RFC 3339 subset of ISO 8601
22:18 sri does this only sound weird to me? https://github.com/kraih/mojo/pull/1187/files#diff-b659d9bfeffa6b78a1f2950c7e72259bR133
22:18 mohawk Grinnz, are you saying i'm being dishonest and impolite?
22:19 Grinnz in your interpretation of your statements, yes
22:19 epiphero sri: maschine_'s edits included s/like/as/, which made it better.
22:20 sri ah
22:20 epiphero FWIW, I think maschine_'s version reads well.
22:21 Grinnz polettix left, so might not see those edits
22:21 sri maschine_: better add your edits to the pull request
22:21 sri so they don't get forgotten
22:21 maschine_ ok will do
22:22 sri maschine++
22:22 Grinnz maschine_: i don't think the "However," is needed, it's continuing from the previous paragraph not contrasting with it
22:22 Grinnz otherwise, +1
22:23 maschine_ Well, it seemed more like a statement before, rather than continuing the previous thought
22:24 Grinnz it's not a new section, it's a continuation from the example given
22:24 maschine_ Right, it just didn't read that way to me.
22:25 trone joined #mojo
22:27 mohawk Grinnz, that's a fairly unpleasant thing to say.
22:27 Grinnz mohawk: you made fairly unpleasant implications
22:28 mohawk you are reading what i said in your own way
22:28 Grinnz mohawk: if you want to foster constructive conversation and people to be receptive to your ideas, you are going the opposite way of that with that attitude
22:29 mohawk if i jokingly say "the reason why this API does not match that other api on which it is somewhat based, is actually because of this amusing meme image"
22:29 mohawk it is somewhat unexpected to be accused of all sorts of things
22:29 mohawk however, you do you
22:30 * sri agrees with Grinnz
22:30 Grinnz mohawk: in the context of the other things you said, it did not appear to be meant as a meaningless joke
22:34 mohawk in the case where things appear to be escalating, if one must respond to things, one can either do so in an escalate-y way, or an inquire-y, de-escalate-y way
22:34 mohawk agree so far?
22:34 Grinnz mohawk: no, there are many other nuances one could employ
22:35 mohawk there is a general direction of escalate vs de-escalate, though
22:36 mohawk i have yet to see a situation that was de-escalated by accusing people of things like dishonesty
22:36 mohawk for most, that's a bit of an escalate-y thing
22:36 mohawk disagree?
22:36 Grinnz mohawk: I call it as I see it
22:37 mohawk well, like i said before: you do you
22:37 Grinnz mohawk: and I did not mean that you were being dishonest to us, I meant you were being dishonest to yourself
22:37 mohawk HA HA HA HA HA
22:37 mohawk good one
22:37 purl You know it!
22:38 sri Grinnz is about the least confrontational person i know on IRC, think i've never seen him get into an argument before
22:39 sri like, in all the years i know him
22:40 Grinnz that's why I was trying to point out that such statements could be interpreted as confrontational (and were)
22:40 mohawk would you agree that using the word "dishonest" could be interpreted as confrontational?
22:40 shmoo joined #mojo
22:40 Grinnz absolutely, but I felt it was necessary
22:41 mohawk so that's a fire-with-fire type thing?
22:42 Grinnz no, it's the only way I could convey my meaning
22:44 Grinnz maybe "misrepresentative" would be clearer
22:44 mohawk are you saying you meant to tell me i was being "misrepresentative (with myself)"?
22:44 mohawk i'm losing you
22:44 Grinnz with your own statements, yes
22:45 mohawk that would need to be spelled out a bit more, doesn't make sense to me
22:45 Grinnz "I was just talking about facts" is a defense of ignorance (and before you say it, I am not calling you ignorant)
22:46 Grinnz one needs to be mindful of how their statements are going to be interpreted to foster constructive community
22:47 jberger I really wish I didn't have to step back in here, but I really don't think the implication that we close too many pull requests and waste contributors time was intended as anything but an accusation
22:48 jberger the fact that I was then asked if there was some underlying problem would seem to solidify that notion
22:48 jberger yes, I suspect we close more PRs than most projects
22:48 jberger by percentage even
22:48 jberger no, I don't think that is indicative of an underlying problem
22:48 purl okay, jberger.
22:49 jberger purl: forget I don't think that
22:49 purl jberger: I forgot i don't think that
22:50 jberger we hold high standards, those standards are spelled out in the contributing guide
22:51 jberger merges are not handed out as prizes and closes don't mean the code wasn't good, we have to think about the project and whether changes are good or bad is of higher importance than the work the contributor put in to doing it
22:52 jberger and I've written a LOT of code that hasn't been included in mojo over the years myself
22:52 jberger how many branches did I do towards http/2? or css4 selectors?
22:53 jberger its how this goes
22:53 Grinnz pretty sure I've done a few things that I've had to reimplement as external modules (which is easy now with roles!)
22:53 jberger same, indeed that's how Test::Mojo::Role got started
22:57 mohawk jberger, the problem i was referring to is not the one you have inferred
22:58 mohawk the problem i WAS referring to is one i also referred to of contributor guidelines
22:58 mohawk i think it would be useful to put in bold on https://github.com/kraih/mojo/blob/master/.github/CONTRIBUTING.md "it is strongly suggested that you discuss any ideas you have before you start coding"
22:59 mohawk because linking to a 4-page (on my browser) document and saying "job done" is not the most effective communication
22:59 mohawk do you disagree?
23:00 jberger I could see expanding that template slightly, but that document is shown as a banner above a PR (IIRC)
23:00 jberger it can't be very long or it will overtake the page
23:00 Grinnz if mojo used dzil i'd suggest using a plugin to generate CONTRIBUTING.pod from Contributing.pod :P
23:00 mohawk i am suggesting literally that one line
23:00 Grinnz jberger: it's not shown as a banner. it's just linked to
23:01 Grinnz in fact looks like they moved to a tooltip now
23:02 jberger I remember it being more prominent than that
23:02 jberger I really thought it was a (yellow?) banner across the top of the page
23:02 jberger I wouldn't see that link at all
23:03 mohawk even if it's a banner, just a hyperlink isn't enough
23:03 jberger mohawk: pause, before we take this any further, I'm ok with adding a little text to that thing if it turns out that that is useful at all
23:03 mohawk what do you mean by "pause"?
23:03 jberger I'm trying to figure out if that is useful and if not what else might be done
23:04 jberger let's not escalate,
23:04 mohawk if you think saying a thing isn't enough is "escalating", that may be something you brought by way of interpretation
23:05 jberger you know, I had a thing I was typing out
23:05 jberger here it is
23:05 jberger "Mojolicious is very conservative in what accepts. Please read L<Contributing> and consider discussing the changes before opening
23:05 jberger but I'm taking a break
23:05 jberger o/
23:08 jberger no, one more thing. my point was that I think we used to only get one line because of the way it was displayed
23:08 jberger while trying to remember that, it seems that even that isn't true
23:09 jberger (anymore)
23:09 jberger so while it may not be enough, it might have been all we got at the time
23:09 jberger meanwhile, there IS a 4 page document describing how to contribute
23:10 jberger so we can think of how best to get people there and get them to actually read it
23:10 jberger and I'll be happy to have that discussion in a little bit
23:11 Grinnz jberger: suggestion: make .github/CONTRIBUTING.pod a symlink to lib/Mojolicious/Guides/Contributing.pod
23:12 Grinnz (and removing CONTRIBUTING.md)
23:19 sri maschine_: i don't think a second pull request works
23:21 maschine_ yeah, sorry, I knew something went wrong.  Haven't actually done one before
23:21 Grinnz oh, yeah, just comment on the existing PR with your suggestions
23:21 Grinnz on https://github.com/kraih/mojo/pull/1187/files use the + that pops up when you hover over a line
23:22 nohuhu Reading this manual section: http://mojolicious.org/perldoc/Mojolicious/Guides/Rendering#Embedded-Perl , specifically the section on the template syntax
23:22 nohuhu It says: <%= Perl expression, replaced with XML escaped result %>
23:22 nohuhu Somewhere else I've seen that <%== %> means XML escaped
23:22 maschine_ Grinnz: thanks!
23:22 nohuhu Which one is right?
23:23 Grinnz nohuhu: it's dependent on the auto_escape parameter to Mojo::Template, which EPRenderer enables by default
23:23 Grinnz http://mojolicious.org/perldoc/Mojo/Template#SYNTAX
23:24 nohuhu Grinnz: So auto_escape defaults to truthy, and <%= %> is therefore escaping by default?
23:24 nohuhu Grinnz: Just clarifying.
23:24 Grinnz nohuhu: for EPRenderer, yes
23:24 Grinnz https://metacpan.org/source/SRI/Mojolicious-7.61/lib/Mojolicious/Plugin/EPRenderer.pm#L13
23:24 nohuhu Grinnz: I think the wording is a bit ambiguous
23:25 sri nohuhu: you're not the only one, that comes up every few weeks :S
23:25 Grinnz nohuhu: I've gotten tripped up by it in the past as well, but still haven't figured out how to improve it
23:25 sri but so far no good suggestions for improving ti
23:25 nohuhu sri: I'd submit a pull request but after the discussion above... Kind of reluctant to do that :P
23:25 sri nohuhu: best to discuss it here first
23:26 Grinnz I think some of the confusion comes from in http://mojolicious.org/perldoc/Mojo/Template#SYNTAX, the "non-auto-escape" form is in the middle of all the other examples but the "escape-form" is by itself leading people to believe that's the default example to copy paste
23:26 Grinnz but I can't think of a good way to avoid that
23:26 nohuhu Uh, even minor doc corrections? That's some iron grip on the project.
23:26 Grinnz nohuhu: the docs are one of the most important parts of the project
23:27 nohuhu Grinnz: Right, that's why I said minor corrections. :)
23:27 Grinnz typos, sure, but this is less minor than that
23:27 sri we do in fact apply the same rules for doc patches as for code patches
23:27 sri and doc patches are valued as such
23:28 nohuhu Not going to dispute your right to do what you think is best, it's your project :)
23:29 Grinnz sri: maybe... a comment in the "reverse with auto_escape" example that says "with auto_escape => 1" or so?
23:29 Grinnz something to make that aspect as prominent as the code example itself
23:29 Seth joined #mojo
23:29 * sri shrugs
23:30 nohuhu That would probably be helpful
23:36 nohuhu Are newlines escaped within expressions? Something like q{%= text_field foo => 'bar', \\n required =>1} doesn't seem to work
23:37 nohuhu qq{} rather, so that \n is extrapolated :)
23:37 Grinnz %= only applies to that line, so a newline will end the tag
23:38 nohuhu Hm. What's the blessed way of writing such things then?
23:38 nohuhu Say, a text field with several attributes, class names, etc. Gets a bit longish
23:39 Grinnz <%= ... %> should work across lines
23:40 nohuhu Looks like it does, thanks
23:45 nohuhu Seems that tag helpers for input fields have fixed argument signature, e.g. I can't use text_field name => 'foo', value => 'bar'
23:45 nohuhu I don't see that mentioned in the docs unfortunately
23:45 nohuhu Also as a suggestion, I'd rather prefer to use full form like above, it's more readable
23:46 nohuhu But looking at the TagHelpers.pm source it's not supported
23:46 Grinnz the only examples i see listed all have name and value as the two first parameters
23:47 Grinnz after that is arbitrary tags
23:47 nohuhu Not all fields: https://metacpan.org/pod/Mojolicious::Plugin::TagHelpers#password_field
23:47 Grinnz er, attributes
23:47 Grinnz i'm talking about text_field specifically
23:47 nohuhu It wasn't apparent that password_field accepts only name but not value
23:47 nohuhu *shrug* A password field is a subset ot text input
23:48 Grinnz not sure how it could be made clearer
23:48 nohuhu The easy way is to mention that arguments are fixed, name => value
23:48 nohuhu It's not apparent that it's not flexible
23:48 nohuhu I mean, it's Perl right?
23:49 Grinnz i would assume the examples given are the only supported forms, but maybe i'm just used to mojo doc style
23:49 nohuhu Grinnz: That's why I'm sharing my newbie impressions here
23:51 maschine_ does %= password_field pass => foo, id => 'bar'
23:51 maschine_ work to set your value?
23:51 Grinnz why would you set a value on a password field?
23:51 maschine_ I don't know, it was the example nohuhu pointed to
23:52 nohuhu maschine_: No, it renders invalid HTML instead
23:52 nohuhu Also I didn't want to set a value on the password field but rather fumbled around with a template trying to make it work around 11pm(ish) :)
23:54 maschine_ pretty sure %= text_field foo => 'bar' does what you think %= text_field name => 'foo', value => 'bar' should do
23:54 maschine_ it's in the example
23:54 Grinnz I would assume the tag helpers signatures are meant to be a compromise between consistency and how they are expected to be most often used
23:55 Grinnz in other words, pragmatism :)
23:59 nohuhu maschine_: It's not about what it does, it's about consistency. text_field wants ($name, $value), password_field wants ($name)

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