From a38fc233e35a1682034abe1042b243240d989b4a Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Fri, 17 Aug 2018 16:44:51 +0200 Subject: Update TPCiG blogpost for day 3 --- .../2018-08-15-the-perl-conference-in-glasgow.adoc | 140 +++++++++------------ 1 file changed, 62 insertions(+), 78 deletions(-) (limited to '_posts') diff --git a/_posts/2018-08-15-the-perl-conference-in-glasgow.adoc b/_posts/2018-08-15-the-perl-conference-in-glasgow.adoc index 6118d50..a326642 100644 --- a/_posts/2018-08-15-the-perl-conference-in-glasgow.adoc +++ b/_posts/2018-08-15-the-perl-conference-in-glasgow.adoc @@ -16,90 +16,18 @@ feedback or comments. These talks, and the feedback I have for them, are detailed in this blog post. For some talks, I'll detail it as a summary of the presentation, because I feel the message is important. -[NOTE] -==== -The first talk I cover is not so much about Perl, but more about politics, as -the talk was mostly about the speaker's ideology. If this does not interest -you, I'd suggest you skip the link:#discourse-without-drama[Discourse Without -Drama] section, and head straight to the -link:#european-perl-mongers-organiser-s-forum-2018[European Perl Mongers -Organiser’s Forum 2018]. -==== - == Discourse Without Drama -This was the first talk, and the only talk available at this timeslot. I am -personally very much against the diversity ideology, and must admit I am -skeptical of such presentations from the get-go. Nonetheless, I did stay until -the end and tried to give it a fair shot. However, I cannot sit idle while she -tries to force her ideology on this community I care very deeply about. - [NOTE] ==== -I am not against the concept of diversity, I wholly support the idea of equal -opportunities. What I do not accept is the idea of equal outcome, or forced -diversity based on physical traits. This is what I refer to with "the diversity -ideology". I also don't think anyone has a right not to be offended, as this is -impossible to achieve in the real world. +There used to be comments on this particular talk, however, it has come to my +attention that the Perl conference has already censored a speaker and their +presentation due to some people feeling offended. This, to me, shows that I +will have to censor my criticisms of things that I consider harmful. I'm sorry +for those who would like to hear opinions of the other side, but it seems that +these are no longer a welcome idea for this community. ==== -One of the things that stood out to me is that the speaker tells us not to use -logical fallacies to condemn her ideology. This on itself I can easily agree -with. However, this should go both ways: we should also not use logical -fallacies to promote her ideology. Most notably, she pointed out the -https://en.wikipedia.org/wiki/Argumentum_ad_populum[_argumentum ad populum_]. -This basically means that just because a lot of people do or say something, -doesn't make it right. And this applies to the idea that we need to push the -diversity ideology in the Perl community as well. Try to bring facts and -statistics to show that this ideology will actually improve the community in -the long term. I've personally not seen any community improve with increasingly -harsh punishments for increasingly minor offenses. - -Another thing which slightly bothered me is the useless spin into radical -feminist ideology, which to me seems very off-topic for a Perl conference. -We're not at a political rally, and these kinds of remarks have been very -divisive in all sorts of other environments already. I'd rather not bring this -kind of behaviour to a community which I have loved for being so incredibly -friendly without needing special rules and regulations for it. - -Next, a point is raised that people should *not* grow a thicker skin. Instead, -people should get softer hearts. While I can get behind the latter part, I -have to disagree with the former. Reality shows that communications don't -always go perfectly. This is even more true in a community that exists mostly -in the digital space. Context is often lost here, and that can lead to -situations where someone may feel attacked even if this was not the intention -at all. I can safely say I've been in many situations where my comments were -perceived as an attack when they were not ment to be. - -People need to be able to handle some criticism, and sometimes you'll just have -to assume good faith from the other party. Telling people they should never -have to consider context and have a right not to be offended fosters an -environment in which people will be afraid to give genuine, valid feedback. - -She seemed very much in favour of an overly broad code of conduct as well, of -which I am also a strong opponent. There are various articles online, such as -https://shiromarieke.github.io/coc.html[this one], which show that just -slapping a generic, vague code of conduct to a community isn't going to solve -the issue of trolls or harmful behaviour. There's -http://quillette.com/2017/07/18/neurodiversity-case-free-speech/[another great -article] that I was pointed towards that highlight how this attempt to censor -people for the sake of not offending anyone can effectively halt creativity and -the exchange of ideas. There was also an interesting quote written on one of -the walls of the venue: - -[quote, Oscar Romero] -____ -Aspire not to have more, but to be more... -____ - -Don't try to add meaningless documents such as a code of conduct, which more -often than not hurts a community instead of improving it. Try to be a better -person that tries to solve actual issues without harming the community at -large. Be the adult in the conversation that can take an insult, and still be -kind. -https://rakudo.party/post/On-Troll-Hugging-Hole-Digging-and-Improving-Open-Source-Communities#hug2:feedthehandthatbitesyou[Remember -to hug the trolls], and eventually they will hug you back. - == European Perl Mongers Organiser's Forum 2018 The Perl community isn't big nowadays, which is sad. The Perl 6 language also @@ -274,3 +202,59 @@ Personally, I'd like to see something like this to be written in Perl 6. This way, it could also be used as a showcase project for the Perl 6 programming language. +== Writing a Perl 6 Module + +Perl 6 has this very neat feature called +https://docs.perl6.org/language/typesystem#index-entry-subset-subset[subsets]. +These can be used to make your own types with very little effort, which can +help tremendously to keep your code clean and consise. There are two arguments +I have in favour of subsets that the speaker did note touch upon. + +First off, using a subset instead of a `where` clause in a sub or method +signature will bring much better error messages. If you use a `where` in your +signature, and the check fails, you'll get an error that there was no signature +that matched `where { ... }`. + +Secondly, if you want to use abstract methods, you can't really use a where. +https://stackoverflow.com/questions/51570655/how-to-use-abstract-multi-methods-containing-a-where[I've +asked a question about this on Stack Overflow], which has the details as to why +this doesn't work the way you might expect. + +Next, there's some cool things about operators in Perl 6. There are many of +these available by default, and it's _very_ easy to add new ones yourself as +well. In fact, the `Math::Matrix` module used throughout the presentation makes +some available as well. Thanks to the ease of adding operators in Perl 6, if +you have a `Math::Matrix $m` in Perl 6, you can get the norm by writing `|| $m +||`. This is the mathematically correct way to write this, making it easy to +understand for everyone using matrixes in their daily lives. If you're a +mathematician, small things like these are great to have. + +I have some comments on the `Math::Matrix` module itself as well, based on +slides shown in the presentiation. The first thing I noticed is that there's a +`norm` method using a `where` clause when it's not needed: + +[source,perl6] +---- +method norm (Str $which where * eq 'row-sum') +---- + +This can be written instead as: + +[source,perl6] +---- +method norm ('row-sum') +---- + +This is shorter and clearer, and you'll get better feedback from the compiler +as well. I https://github.com/pierre-vigier/Perl6-Math-Matrix/pull/49[submitted +a pull request on the GitHub repository] in an attempt to improve this, which +got merged as well! + +Additionally, the module contains a `gist`, as it should. However, the default +behaviour of `gist` in Pelr 6 limits the number of elements it returns. To work +around this without breaking the expected behaviour of `gist`, a `full` method +was added. I personally think it would be cleaner to instead add a `gist` multi +method that allows `:full` to be set, ie `$m.gist(:full)`. This allows people +to continue to use the `gist` method as expected, and simply add a single +argument to enable the large output, instead of calling a different method +altogether. -- cgit v1.1