Live data from Hacker News

Raku: A language for gremlins

buttondown.email

41–50 of 257 posts

Re: Raku: A language for gremlins

#41

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.

I think my vote goes to ColdFusion.

Re: Raku: A language for gremlins

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

Re: Raku: A language for gremlins

#43
post #39
post #37

Earlier quoted context omitted.

Unable to deduce arithmetic or geometric sequence from: 1,2,5 Did you really mean '..'?

> arithmetic or geometric See, that doesn't delight me. OEIS is what's needed here.

Welp now I know what "using it in anger" is gonna look like

Re: Raku: A language for gremlins

#45

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 found about raku one time I had an assignment for college where I needed to create a parser. I found raku's grammar features really interesting and used it for my project, it felt almost like cheating since it did pretty much every thing for me (actually it was probably just cheating but it was still fun).

That’s exactly what you want in a language. It should always feel like cheating!

Also debuggers. Give RR a try some time :)

Re: Raku: A language for gremlins

#46

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.

It's actually an awful misfeature, because those Rats will automatically turn into floats when the rational representation gets too big:

  > WHAT 1/10
  (Rat)
  > WHAT 1/100000000000000000000
  (Num)
(There is FatRat, which does not so 'promote', but it is not the default.)

Re: Raku: A language for gremlins

#47

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.

I'm not sure what I think about that. I know when to use decimal/rational types vs floats, but my own Python code has a whole lot more float() calls than Decimal()s. Floats are almost always what I want unless I'm directly working with money.

Re: Raku: A language for gremlins

#49

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.

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

Scheme’s numeric tower has a handled exact expressions with exact representations correctly for decades, so I guess its true that is not “moving away from” unnecessary and error-prone use of inexact floats where not explicitly requested, but only because it was never there to move away from.

Re: Raku: A language for gremlins

#50
post #39
post #37

Earlier quoted context omitted.

Unable to deduce arithmetic or geometric sequence from: 1,2,5 Did you really mean '..'?

> arithmetic or geometric See, that doesn't delight me. OEIS is what's needed here.

Maybe there's some way to extend the compiler to use OEIS. Is there a "liboeis" that lets you download and interact with the OEIS database offline?
Post reply on HN