Live data from Hacker News

Raku: A language for gremlins

buttondown.email

21–30 of 257 posts

Re: Raku: A language for gremlins

#21

Earlier quoted context omitted.

Maybe C?

You can definitely get there with C but the language isn’t actively pushing you into horror.

It's the "unsurprising" part in "unsurprising & horrifying" - if you manipulate raw pointers incorrectly, of course it will crash or be vulnerable, to the surprise of no one by design.

Re: Raku: A language for gremlins

#22

Earlier quoted context omitted.

You can definitely get there with C but the language isn’t actively pushing you into horror.

It's the "unsurprising" part in "unsurprising & horrifying" - if you manipulate raw pointers incorrectly, of course it will crash or be vulnerable, to the surprise of no one by design.

This rings true the more I think about it. Any large code base gets there with size, but with C one gets there pretty reliably after a certain heft of code.

Re: Raku: A language for gremlins

#23

One way you might arranging programming languages in a 2D space is with two axes: 1. How much should the language surprise you? 2. When the language does surprise you, should it delight you or horrify you? surprising ^ | | | delight horrify | | | v unsurprising Only a sadist would deliberately design a language for the top right quadrant, but there are many esoteric languages in there. I think most people tacitly ass…

> You check set membership with ∈

Yeah, ok, I see what you mean.

>> 0,2,4...10

> (0 2 4 6 8 10)

>> 1,2,4...10

> (1 2 4 8)

Wait... what? Is it looking the next number up in OEIS or something?

Re: Raku: A language for gremlins

#24
post #17

One way you might arranging programming languages in a 2D space is with two axes: 1. How much should the language surprise you? 2. When the language does surprise you, should it delight you or horrify you? surprising ^ | | | delight horrify | | | v unsurprising Only a sadist would deliberately design a language for the top right quadrant, but there are many esoteric languages in there. I think most people tacitly ass…

The problem is those are subjective axes. And things can both delight and horrify; I wrote some javascript once where I did document.write = function ... which is kind of delightful in that I was able to do what I needed as a result, but also pretty horrifying :) Other people I showed it to felt it was more on the horrifying side, but like I said, it's subjective.

Then a 3d chart with "likelihood of" being a point or region in the space. The axises would then be "Surprise", "Delight", and "Horrify".

Re: Raku: A language for gremlins

#25

Earlier quoted context omitted.

FTA: "The regex syntax isn't backwards compatible with Perl 5. For thirty years languages followed the PCRE "standard" and Perl 6 just… threw it all away." so it looks like the author has at least passing familiarity.

Which also gives away some gaps in the author's knowledge. Perl wasn't following the PCRE standard. It was the PCRE standard. Everything else was following it. Usually with some piece missing--far more implementations should have the /x modifier. The Perl 6 design process didn't throw it away after 30 years. It threw it away with less than 10 years. There was already widespread knowledge that Perl had gone beyond "re…

> It was the PCRE standard

haha true

> The language itself could be parsed in it, and Raku sometimes is, depending on the implementation.

That's fantastic, didn't realize.

Re: Raku: A language for gremlins

#26

Raku is interesting as a language indeed. I can't get over some of the idioms, they just don't map nicely in my head. The same reason AppleScript struck me as weird, it trys to use natural language on one hand (e.g. `my`, `say`, `sub`, `gather`) with some oddities like `@` being used for (assuming?) scoped iterations or declaring modules[0] and some other from-an-outsider byzantine syntax decisions. For instance, I c…

Let me guess, you were never a Perl programmer? Trust me, if you have a Perl background, a lot of that syntax looks pretty familiar (the @ sigil in particular denotes an array).

Re: Raku: A language for gremlins

#27

One way you might arranging programming languages in a 2D space is with two axes: 1. How much should the language surprise you? 2. When the language does surprise you, should it delight you or horrify you? surprising ^ | | | delight horrify | | | v unsurprising Only a sadist would deliberately design a language for the top right quadrant, but there are many esoteric languages in there. I think most people tacitly ass…

I'm very interested in bottom right langs.

Absolutely JavaScript, in that it is easy to accidentally do horrifying things, but absolutely not surprising if you’ve spent any time working with it, as you quickly get used to how awful it is.

Re: Raku: A language for gremlins

#28

One way you might arranging programming languages in a 2D space is with two axes: 1. How much should the language surprise you? 2. When the language does surprise you, should it delight you or horrify you? surprising ^ | | | delight horrify | | | v unsurprising Only a sadist would deliberately design a language for the top right quadrant, but there are many esoteric languages in there. I think most people tacitly ass…

I'm very interested in bottom right langs.

Languages where there has been significant modernization and progress, but where codebases and online resources lag behind: CMake, PHP, CSS

Re: Raku: A language for gremlins

#29

Earlier quoted context omitted.

It's the "unsurprising" part in "unsurprising & horrifying" - if you manipulate raw pointers incorrectly, of course it will crash or be vulnerable, to the surprise of no one by design.

This rings true the more I think about it. Any large code base gets there with size, but with C one gets there pretty reliably after a certain heft of code.

That being said, while C's surprises are certainly fewer than other languages, it still does have a few surprising corner cases in contrary to its usual "portable assembly" character (without compiler optimization) - implicit type promotion in expressions with mixed data types, potential malloc() in printf(), possibility of Duff's device, and the likes. A Sun engineer Peter van der Linden has a book Expert C Programming, Deep C Secrets that explores these topics.

Re: Raku: A language for gremlins

#30
Let's face it, the Perl 5/PCRE regex syntax is atrocious. The only reason it exists is that (? was a syntax error in earlier regex syntaxes, so it could be redefined to mean anything.

Raku is an attempt to design a sane regular expression language from first principles, now that we know what we want them to be able to express. The alternative is being stuck with (?:this|(?>or that)) for the next 30 years.

Post reply on HN