Home > Raku > wat-freeness

wat-freeness

Sadly I can’t attend the conference in the cloud because I lend my wings to an angel and the sucker didn’t bring them back. But there is nothing – not even a plague – that can stop me from writing a blog post.

Conferences tend to be a time of reflection and mug throwing. I aim to do so with this post. Most of my work on Raku went into the docs and this blog (please note the recursive reflection). This was a very selfish act. Without a documentation that does not have holes, learning a language can be quite tricky. The blog helped me a great deal to do the thinking that was required for hole plugging. It is a great tool for contemplation and creating awareness of new but not young language. I can strongly recommend to use a blog for both. The hits on this particular blog went up by about 63% relative to last year. If we can keep up that grown it will take only 54 years for the interest in Raku to exceed the population of the earth.

In my last post I struggled to understand the nature of a not-bug. It took a good nights sleep to figure out why. The reason seems to be that I didn’t have a mental category to put that thing it. To my delight wat turns into culture. In the context of programming a wat is not undefined behaviour. It is not a violation of syntax or semantics. It it an emergent interaction between different subsystems of a language implementation that violates the principle of least surprise. An LTA is a subset of wat. Let’s have a bit of code.

class C { has $.a = s; }
sub s {}
# OUTPUT: ===SORRY!===
#         Null regex not allowed
#         ------> class C { has $.a = s; ⏏}; sub s {}
#         Couldn't find terminator ;
#         ------> class C { has $.a = s; ⏏}; sub s {}
#             expecting any of:
#                 ;

wat.

If we rename the sub we can make this work.

class C { has $.a = a; };
sub a { 42 }
say C.new.a;
# OUTPUT: 42

What happens here is that the Raku grammar is looking for s/// instead of making a mental note to check for the existence of a sub called s at the end of the compilation unit. At first I thought it to be an LTA. So wats can be really deceiving. As such any language implementor should avoid them where ever possible. With Raku we aim to do so.

Do we tell newcomers? Or to phrase this question differently: Do we still suck at marketing? Let’s have a look at raku.org.

The Raku Programming Language

Hi, my name is Camelia. I’m the spokesbug for Raku. Raku intends to carry forward the high ideals of the Perl community. Raku has been developed by a team of dedicated and enthusiastic volunteers, and continues to be developed. You can help too. The only requirement is that you know how to be nice to all kinds of people (and butterflies). Go to #raku (irc.freenode.net) and someone will be glad to help you get started.

This is astoundingly bad. The heading doesn’t fit to the text right underneath it. It explains Camelia not what Raku is. Granted Camelia, although quite pretty, desperately needs explaining. The author of that paragraph is clearly a language implementor addressing other language implementors. The high ideals of the Perl community are not named nor are the high ideals of the language implementors. Fishing for grants is quite important, just not at the front page to the programming language. With this front page we manage to miss the audience in the very first lines one who is (rightfully) interested in the language will read. This needs to change.

Good marketing provides a benefit to all parties involved. We need to find out what we want the world to know about Raku and put it on that page. Much work goes into the weekly news. Big thanks to lizmat and her occasional replacements. Yet, why is this very helpful content not on raku.org? We link to irc-logs. We are bloody coders that have a really nice language with a really nice web framework. Do we use it to provide a community we want to grow with a hub to get what they need? I think we should.

Raku was meant as a rewrite of the language by the community and of the community. The language and its compiler are in a good place already. If we want it to become a replacement for all dynamic languages, we need to up our game in the marketing department. Changing the name of the language was the easy part of this endeavour.

I hope you, the kind reader of this blog, can make something good of my ramblings. Maybe even take some of it to a conference. In fact, if you read this blog post while attending the conference of strange times, I will consider myself hugged.

Categories: Raku