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

IRC log for #mojo, 2018-02-02

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

All times shown according to UTC.

Time Nick Message
00:00 maschine_ probably because like Grinzz said, why would you want to populate a password field :p
00:00 nohuhu maschine_: When you try to figure out very many things at once, having to drop to the code every 5 minutes instead of just following the docs is getting pretty old pretty quick
00:01 nohuhu Grinnz: That's why I said I'd personally prefer to set every attribute individually instead of keeping track of what type of field wants what kind of input
00:02 nohuhu It's just one of the many little irksome things that get in the way
00:02 Grinnz maybe you want to be using https://metacpan.org/pod/Mojolicious::Plugin::TagHelpers#tag then?
00:03 nohuhu Honestly at this point I don't even understand why there's need for tag helpers at all
00:03 nohuhu Why not just write HTML?
00:03 Grinnz oh, I've never used them, I'm just making suggestions since you're trying to use them :P
00:04 maschine_ like anything, it's a tool that has it's place.  you don't have to use them - I use them somtimes, and sometimes I don't.
00:04 nohuhu I'm only trying to use them because every guide out there is suggesting to :)
00:04 Grinnz you can perfectly well never touch TagHelpers
00:04 Grinnz they're just for convenience for people who want it
00:04 nohuhu For once I decided to be a good boy and actually read what smart people are recommending to do
00:04 purl thanks nohuhu :)
00:04 nohuhu purl ? :)
00:04 purl nohuhu: excuse me?
00:05 Grinnz purl: don't thank people randomly
00:05 purl Grinnz: i'm not following you...
00:05 Grinnz bots... :P
00:05 * nohuhu is confused
00:06 nohuhu Grinnz: That's exactly the point I'm trying to get across: that tag helpers are more confusing to newcomers than they are helpful
00:06 nohuhu It is not mentioned anywhere that they're optional. It's kind of implied but, hey, I'm following a guide here?
00:07 nohuhu Considering that writing HTML is easier than using tag helpers, what's the reason to have them at all? It's confusing
00:07 maschine_ I just started with Mojo like a year ago - personally, I didn't find it confusing
00:08 maschine_ and somtimes it's not easier to write HTML, sometimes it is.  It's just personal preference mostly.
00:08 nohuhu Well I started with Mojo the day before yesterday and I do find many things confusing
00:09 nohuhu And there's just one chance to share my experience as a confused newbie, and I'm trying to use it here :)
00:12 sri tag helpers hook into the validation system and get filled out automatically if the form has to be displayed more than once
00:13 nohuhu That makes sense, thanks.
00:14 nohuhu Right, I see it mentioned in the doc, in a way: Most form helpers can automatically pick up previous input values and will show them as default.
00:15 nohuhu Having the above explanation in the doc would be really helpful to understand why tag helpers are helpful
00:15 nohuhu Grr, that's not very DRY
00:16 Grinnz 100% of my mojo-rendered forms are javascript forms so I've never used this side of it :P
00:16 * Grinnz is a bit prejudiced against HTML POST
00:16 nohuhu Well this whole concept of server side web applications is amusingly old fashioned, even nostalgic in a way :)
00:18 nohuhu I'm coming from the extreme opposite side of the spectrum, where you don't even have to think about HTML. You write JavaScript to make use of components, and the DOM markup is generated automatically
00:19 Grinnz heh
00:19 nohuhu But this back and forth stuff looked funny so I decided to dabble with it :)
00:31 nicomen https://opensource.com/article/18/1/why-i-love-perl-5
01:51 dylan hmm, anyone have experience replacing some custom-ish TheSchwartz stuff with Minion?
02:15 Afristar_ joined #mojo
02:28 aborazmeh joined #mojo
02:38 gordonfish joined #mojo
03:49 aborazmeh joined #mojo
04:12 Maschine joined #mojo
04:41 inokenty-w joined #mojo
05:04 dboehmer_ joined #mojo
06:29 Seth joined #mojo
07:08 polettix joined #mojo
07:27 Vandal joined #mojo
07:49 bianca joined #mojo
07:49 dod joined #mojo
07:50 McA joined #mojo
07:51 petru joined #mojo
07:55 dod joined #mojo
08:16 jamesaxl joined #mojo
08:17 trone joined #mojo
08:52 Edward joined #mojo
10:25 bouncy joined #mojo
10:32 sri random comments in old commits are not very helpful https://github.com/kraih/mojo/commit/f9ff45e48f6068d11cf4a1f610d410a788c4e08a#r27282205
10:34 sri that said, i have no clue why that line exists
10:49 exp-innit sri: sorry for not getting that PR completed
10:49 exp-innit bit busy at work, i'll try and find time tonight
10:55 Afristar For those who´ll be at Delirium tonight in Brussels (marcus haarg batman): let´s have a beer! I´ll be wearing a dark magenta t-shirt and a yellow "SwissArmy::Chainsaw" button. Feel free to poke me.
11:01 wouter joined #mojo
11:01 wouter is it possible to tell Mojo::Migrations that a particular modification should not be done inside a transaction?
11:01 wouter because I'm getting "DBD::Pg::st execute failed: ERROR:  ALTER TYPE ... ADD cannot run inside a transaction block at /usr/share/perl5/Mojo/Pg/Migrations.pm line 66."
11:03 sri i think there are workarounds that work in a transaction
11:04 wouter such as?
11:05 wouter ah, cheating works
11:05 sri ?
11:06 wouter have it in a single version, and say COMMIT just before the ALTER TYPE line
11:06 sri i mean rename type, rename column, create new type, create new column, drop old column
11:06 sri your solution is definitely not "supported"
11:07 wouter hrm, that way
11:07 wouter that's not a bad idea, indeed
11:08 tchaves joined #mojo
11:09 wouter and actually, what I did doesn't work, it's just that I forgot my test suite doesn't call migrations unless I set the database name to clobber in an env var :)
11:23 itaipu joined #mojo
12:22 good_news_everyon joined #mojo
12:22 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vNNmx
12:22 good_news_everyon mojo/master cdb82fb Sebastian Riedel: this line does not appear to do anything
12:22 good_news_everyon left #mojo
12:22 sri please test, i have no idea of that breaks anything
12:22 sri s/of/if/
12:40 karjala_ joined #mojo
13:04 tcohen joined #mojo
13:41 maschine joined #mojo
13:42 sri oh my, a perl tweet that's not negative has gone viral, what a time to be alive
13:50 * exp-innit visits news.yc to see the inevitable sarcastic responses
13:51 exp-innit sri: got a link?
13:51 sri i retweeted it
13:53 exp-innit the one from 2 days ago?
13:53 exp-innit that is cute
13:53 sri yea
13:55 exp-innit i'm trying to write Hash::Merge strategies to build DBIx::Class joins dynamically, this is a pain in the arse, but it's still a thousand times better than writing this in anything else
13:57 sri Mojo::Pg does joins now
13:58 exp-innit sri: yeah but i'm quite deeply invested in dbic, not that I have anything against Mojo::Pg
13:58 exp-innit friend of mine raves about it
14:04 gryphon joined #mojo
14:12 orev joined #mojo
14:27 gryphon_ joined #mojo
14:30 geheimnis` joined #mojo
14:46 gizmomathboy joined #mojo
15:36 sh14 joined #mojo
15:36 agregory joined #mojo
15:41 maschine was reading a Perl article linked here, and saw mention of Matt's script archive - http://bit.ly/2DVkUxg - that's how I started with Perl, eeek!!!
15:47 jberger so I want to say a little something here
15:47 jberger yesterday, mohawk made a statement, borne of some frustration, but I took it in the worst possible way and helped to inflame a situation that might not otherwise have done so
15:48 jberger and then reacted to it badly
15:48 jberger I apologize to him and the community
15:49 jberger if I may offer some context (not an excuse) I have some things going on at home that are difficult
15:49 jberger not coincidentally, the same stuff that was going on when I lost my cool at sri during the delay callback signatures stuff a few months ago
15:49 exp-innit FWIW I do think the Contributing page should be more prominently linked, especially the 'please discuss your proposals before starting work so to avoid conflict'
15:50 exp-innit a friend of mine informed me this is the preferred direction after I'd already written the PR
15:50 jberger my wife and I have been trying to talk about it, since we hate the stigma almost as much as the problem
15:50 exp-innit and I accidentally implied to sri that I thought the right option was to just remove things
15:50 jberger I'm not sure it is the right venue exactly, but I do want to say, that if anyone in the channel has fertility problems, please feel free to reach out to me
15:51 jberger I'm not sure we have much to teach, but a common shoulder might be all someone else needs
15:51 exp-innit jberger: I hope everything works out for you
15:52 jberger exp-innit: thanks
15:53 exp-innit jberger: I mean that sincerely, you've answered a few questions for me in the past and I see you hanging around, never had any suggestion you were anything but lovely
15:54 jberger exp-innit: I very much want to be that person and try very hard to be
15:54 exp-innit nobody deserves the sort of stress you're clearly under, and coming back and apologising is absolutely the right thing to do
15:54 jberger when I fall down, I want to own it and make it right
15:54 exp-innit so try not to let it affect you, anyone who would judge you harshly for a minor snap is committing a worse faux pas than you :)
15:56 jberger I'm not worried about how I'm judged, I worry about holding myself to my standards
15:56 jberger but thanks
15:58 CandyAngel jberger: At least you didn't set fire to any Minecraft houses..
15:58 sri that's oddly specific
15:59 jberger Oo
16:00 sri purl: CandyAngel is also a Minecraft arsonist
16:00 purl okay, sri.
16:00 CandyAngel As far as I know (and hopefully so), that is the worst thing I've ever done
16:00 sri no mater what jberger says, i can't help but imagine him like this http://i.imgur.com/UPfFmXF.jpg
16:00 CandyAngel And now purl is going to remind me of it. Thanks sri :P
16:00 agregory when working with embedded apps, is the best way to prevent session variables from clobbering each other just to use app-specific prefixes in the keys?
16:01 sri agregory: you could also change the name of the session cookie
16:01 jberger purl: CandyAngel ?
16:01 purl CandyAngel is correct, you need that information to prevent endless restarting or a Minecraft arsonist
16:01 sri then have a separate cookie per embedded app
16:02 sri no purl, CandyAngel is a Minecraft arsonist
16:02 purl okay, sri.
16:02 CandyAngel :|
16:02 CandyAngel I was really upset!
16:03 jberger is there a minecraft jail that one is sent to for that ?
16:03 agregory sri: i tried that but the primary app accesses the session before the embedded app gets routed to, so the embedded app ended up getting the saved session from the primary app
16:03 CandyAngel jberger: Everyone forgave me except me.. and I think about it often enough. No jailtime plz
16:03 sri purl: CandyAngel is also soon in Minecraft jail
16:03 purl okay, sri.
16:03 jberger hahaha
16:04 sri agregory: oh, right, that doesn't work :S
16:04 sri then yea, app prefix keys
16:05 CandyAngel >.<
16:06 agregory would it make sense for mojolicious itself to keep them separate by caching the loaded session per-app?
16:07 sri agregory: don't think it's a common enough problem
16:08 agregory sri: fair enough, thanks
16:08 sri most common use for embedded apps is the mount plugin, for deploying a bunch of apps with the same mojo server
16:08 sri there it shouldn't be a problem
16:11 mohawk jberger, it takes guts to admit fault, and i salute you for that
16:13 ChmEarl joined #mojo
16:21 * sri wonders who has the minion setup with the most processed jobs, $work app is getting close to 4 million
16:28 CandyAngel You haven't specified that useful work has to be done... *modifies the benchmark script a little
16:29 exp-innit sri: regarding trying to find alternative uses of ->origin, using grep::cpan i found only the persistent cookie module you mentioned
16:30 exp-innit and i believe my patch makes that work fine, do you have any other suggestions for where to search?
16:30 exp-innit don't think i'll have time to finish it off tonight as i've still got lots of code to get done in the next 90 mins, but i'll push it monday if i can't find any other uses
16:31 sri exp-innit: that's always the problem, you don't know what's out there in darkpan
16:32 exp-innit sri: well the updated version of the patch sets domain early, but falls back to origin if it remains unset
16:33 sri doesn't look like you ran perltidy over the patch
16:34 exp-innit I haven't pushed the new version yet :)
16:34 sri oh
16:34 exp-innit i'll squash and test before I update
16:34 exp-innit just saying I've tried to take the safest road in both obeying the spec but providing a fallback to the origin behaviour
16:35 sri did you deprecate origin?
16:35 exp-innit so this is something I meant to ask, I looked through the history, and can only find deprecation warnings for functions
16:35 exp-innit not attributes
16:35 sri they get turned into functions for deprecation
16:35 exp-innit (i'm aware attributes get accessors)
16:35 exp-innit right
16:36 exp-innit do you have one in mind that I could use as a reference?
16:37 sri that one https://github.com/kraih/mojo/blob/master/lib/Mojo/IOLoop/Delay.pm#L25
16:38 tcohen joined #mojo
16:38 sri or this one, for a full commit https://github.com/kraih/mojo/commit/4d9b7f39848607ebda66fe9251b486e21e7e2887#diff-bf69c09402d7c06fb7bc3c8165e20dac
16:39 sri this one removed lots of deprecated stuff https://github.com/kraih/mojo/commit/953ddc87219fa79e02f5884de3051088048c8a8d
16:41 sri this is an interesting one https://github.com/kraih/mojo/commit/20c14d5b7c921445e737ffa6c35367de4583b6cb#diff-1c16334ff36c3caec7a1a3a0a1fd912c
16:41 sri it turns attribute accessors into functions that do nothing
16:42 sri since the functionality can no longer be provided
16:49 exp-innit sri: sorry I got called away from the desk, frustratingly
16:49 sri how dare you :)
16:49 exp-innit ty for the references
16:49 exp-innit monday morning meeting arranging :(
16:49 exp-innit for code review too
16:50 exp-innit lots of trolly code to show: return if( any { $_ eq $k; } map { keys($_->%*) } grep { ref eq 'HASH' } $self->columns->@*);
16:50 exp-innit that'll be fun
16:51 sri the parentheses look odd there
16:52 sri and the semicolon
16:52 purl the semicolon is the end of hmmm
16:52 exp-innit sri: yeah no need for the semi, this is actually 5 lines i just joined into one to paste
16:52 exp-innit so that's why the parens are a bit odd
16:52 sri heh
16:53 exp-innit despite any avoidance of Perl6, it does provide much nicer semantics for this
16:53 sri wish i could use postderef and signatures in work code
16:53 exp-innit but 5 is still ok
16:53 exp-innit sri: well you seem to like `my ($a, $b, $c) = @_`
16:53 exp-innit wheras i tend to still go with `my $a = shift // 'default'`; endlessly
16:54 exp-innit but yeah postderef is excellent
16:54 sri oh, i do "my ($a, $b, $c) = (shift, shift // 'default', shift);"
16:54 dantti_laptop joined #mojo
16:54 exp-innit tim toady eh
16:55 sri signatures are my first choice though if possible
16:55 exp-innit the code in mojo does seem to be about as terse as it's possible to be
16:55 exp-innit it makes for tiny methods, but I admit it took me a while to read through a few sections
16:55 exp-innit for example this is more than a tiny bit evil: https://github.com/kraih/mojo/blob/master/lib/Mojo/UserAgent/CookieJar.pm#L75
16:56 exp-innit (i can't remember binding order between || and eq off by heart :))
17:14 * sri disagrees
17:15 sri i mean, i don't memorize the whole table, but knowing that equality operators are higher up than logical operators is not so hard
17:17 genio and then the logicals are easy to remember because the acronym for the order means "no" in portuguese. Not, And, Or.  não
17:18 mohawk feel the brackets flow through you, luke
17:18 exp-innit sri: I write a whole bunch of different languages though
17:18 exp-innit this is the first Perl 5 i've written professionally in a couple years I think
17:19 exp-innit anyhow I know the order now, but no doubt i'll be back to `perldoc perlop` next time
17:19 exp-innit not that I have a problem with terseness, but that particular line is perhaps the optimal one for having two plausible mechanisms
17:28 nohuhu joined #mojo
18:12 trone joined #mojo
18:18 disputin joined #mojo
18:55 Repaster joined #mojo
18:58 Seth1 joined #mojo
19:11 disputin joined #mojo
19:25 preaction joined #mojo
19:40 petru joined #mojo
19:50 tcohen joined #mojo
20:55 Seth joined #mojo
21:22 Pyritic joined #mojo
21:51 dikim joined #mojo
22:16 jberger I think codegolf games gave perl a bad name and I think overall hurt perl
22:17 jberger and yet when you play some full on codegolf games in perl you really learn operator precedence rules well
22:17 pink_mist I've stayed far away from codegolf because it just looks like brainfuck rather than perl
22:18 pink_mist especially some JAPH stuff I've seen
22:18 jberger I would never never say that that stuff should be in prod or even any work code
22:18 jberger but it can be fun and you learn a LOT
22:27 haarg my current favorite code golf type thing is $[[[]][[]]
22:28 haarg it doesn't do anything useful, unless you consider out of memory errors useful
22:33 ribasushi jberger: you wouldn't trust your bitcoin to a golfed base58heck encoder?! https://twitter.com/ribasushi/status/939954274569785344
22:34 polettix joined #mojo
22:34 jberger ribasushi: :p
22:34 jberger I mean, I don't trust bitcoin in any way shape or form ... sooooooooo
22:35 jberger (not the tech necessarily, just everything around it)
22:35 ribasushi ( this is not a joke btw - all of it works )
22:35 jberger oh I'm sure it does
22:35 jberger that's a fun thing
22:35 jberger tweet-thread sized
22:52 sri haarg: lol
23:08 dabudabu Not sure I've ever used a system where lpr actually did anything
23:12 ribasushi any system with cups-bsd installed DTRT
23:12 ribasushi ( that's the debian name for the wrappers )

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