Live data from Hacker News

Raku: A language for gremlins

buttondown.email

91–100 of 257 posts

Re: Raku: A language for gremlins

#91
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.

This is true. Often times it's simple, stuff I wrote: delightful. stuff other people wrote: horrifying.

Re: Raku: A language for gremlins

#92

My favorite feature of Raku: Integer division and decimal literals both return `Rat`, a rational fraction type. Even though everyone knows floats suck, nobody is actually moving away from them except Raku. If you want a float literal you specifically have to use scientific notation.

Raku contain so many cool things.

Re: Raku: A language for gremlins

#93

Earlier quoted context omitted.

It doesn't actively push you there, which is why it's on the bottom half. There is a fairly coherent mental model for C and once you have it, the language rarely surprises you. But when it does surprise you, it's almost never anything good. Stuff like Duff's device, `3[someArray] = value`, etc. The surprises are always the language's raw machinery showing through in unpleasant ways, and never a delightful bonus featu…

> The surprises are always the language's raw machinery showing through in unpleasant ways, and never a delightful bonus feature the designers added for you. I was reading "Writing Solid Code" by Steve Maguire (though it should really be called "how to write code in C without shooting yourself in the foot"). One thing that surprised me, but which made sense, was that pointers can overflow. It's unlikely, and ANSI non…

Gone through a whole range of emotions looking at this. Tried to put together an argument about the high bits of (common) address spaces being zero and therefore it's safe but I don't think that works. It's the while (i++ < UINT32_MAX) bug in different clothing. Would make for a cruel take on the interview question of "tell me what bugs you see in this function".

Re: Raku: A language for gremlins

#94

Earlier quoted context omitted.

Apparently by replacing them with new horrifying surprises, if this article is any indication. Good grief, I don't miss working in Perl.

One person's unspeakable horror is another's creature comfort.

De gustibus ...

Re: Raku: A language for gremlins

#96

Earlier quoted context omitted.

> The surprises are always the language's raw machinery showing through in unpleasant ways, and never a delightful bonus feature the designers added for you. I was reading "Writing Solid Code" by Steve Maguire (though it should really be called "how to write code in C without shooting yourself in the foot"). One thing that surprised me, but which made sense, was that pointers can overflow. It's unlikely, and ANSI non…

Gone through a whole range of emotions looking at this. Tried to put together an argument about the high bits of (common) address spaces being zero and therefore it's safe but I don't think that works. It's the while (i++ < UINT32_MAX) bug in different clothing. Would make for a cruel take on the interview question of "tell me what bugs you see in this function".

>Tried to put together an argument about the high bits of (common) address spaces being zero and therefore it's safe but I don't think that works.

Yep; on AMD64, bits 48 through 63 must be identical to bit 47, which can be 1 or 0, akin to sign extension.

In practice, I don't think any sane OS would let you reserve the very last n bytes of memory, especially not with an address space as large as that of AMD64, but you can't assume the architecture, and you don't always have an operating system.

And yeah, you could see the same bug with integer array indices, if signed integers wrap.

  /* Endless loop if end == INT_MAX */
  for (int i = 0; i 

Re: Raku: A language for gremlins

#98
post #17

Earlier quoted context omitted.

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.

I was thinking axes of 'readability' and 'expressiveness' would make a nice chart for programming languages.

As long as the negative sides of both axes are included too.

            e
            |
            |
            |
   -r ------------- r
            |
            |
            |
           -e

Re: Raku: A language for gremlins

#99

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 like to think Ruby is dead center, by virtue of the fact that sometimes I'm not sure if I'm delighted or horrified.

https://codegolf.stackexchange.com/a/33217

Re: Raku: A language for gremlins

#100

Earlier quoted context omitted.

I was thinking axes of 'readability' and 'expressiveness' would make a nice chart for programming languages.

As long as the negative sides of both axes are included too. e | | | -r ------------- r | | | -e

Filling in language names is left as a fun exercise for the reader.
Post reply on HN