Live data from Hacker News

Raku: A language for gremlins

buttondown.email

131–140 of 257 posts

Re: Raku: A language for gremlins

#131
post #105

Isn't this still the usual critique of a language before knowing much about the language? We were used to this with Perl's "line noise". Now we get > Raku has no qualms about using Unicode operators. You have the option. I have used this option because I want my code to be compact and expressive on screen. A good fit for careful, considered, creative unicode usage. Or the ever popular (Jeez that's new): > I hate the…

How do you type the non-ASCII operators? Special keyboard layout? Your editor automatically converting some sequences? Raw Unicode escapes? This seems complicated pointless to me just to save a couple characters.

When I last looked at this -- admittedly years ago at this point -- all Unicode operators had an ASCII alternative. So maybe you could enter the code as Ascii and prettify it into Unicode?

Re: Raku: A language for gremlins

#132
post #113

Earlier quoted context omitted.

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

I don't think those are orthgonal though. For example, if a language lacks expressiveness, that can hinder its readability. But on the flip side, if it is highly expressive that can also potentially hurt readibility, especially if the reader isn't very familiar with the language. Although both are somewhat subjective (readability moreso than expressiveness), and context specific.

Exactly, they don't need to be orthogonal in my opinion. Every language should strive to be in the top right quadrant.

Keep in mind, this is just what I value in a language. The perfect programming language to me is one that is expressive while also being easy to read. I think Python is nice in that regard, and probably why it's so popular to this day. But there's always room for improvement!

Re: Raku: A language for gremlins

#133

Earlier quoted context omitted.

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

Yes. Though that's my point, to me it doesn't feel the most welcoming to others who know another language (or languages). By all means though, if folks like it, carry on. I am sure Raku as a runtime is well engineered, I respect that. I don't know what lineage Raku shares other than Perl, but it seems to be on its own plane if you will, and thats cool.

Calculus also doesn't feel welcoming for accountants.

Re: Raku: A language for gremlins

#134

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.

Racket begs to differ. Also does things right.

  > (/ 1.0 3.0)
  0.3333333333333333
  > (/ 1 3)
  1/3
  > (- (+ 0.1 0.2) 0.3)
  5.551115123125783e-17

Re: Raku: A language for gremlins

#135

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.

Java 4, Java 6, maybe even Java 8.

Re: Raku: A language for gremlins

#136
post #71

Earlier quoted context omitted.

The issue I have with the language is that I went from the top left of that graph to fairly far on the right, vacillating between the top or bottom. That happened for me long before it became Raku. I clearly remember reading through the synopsis and exegesis documents around fifteen years ago and being excited for what was to come, but I also remember the first bits that gave me pause. Like unspace[1]. I also clearly…

Perl used to bandy about "TMTOWTDI" (Tim Towdy) incessantly in those days of Perl4/5. There's More Than One Way To Do It

Yes, and it even had a way to pronounce it, I'd read:

  timtowdy

which I somehow did not like, but shrug.

And then Python got on the bandywagon :) with:

There should only be one, preferably obvious, way to do it

or such, which, in later years, seems to be not bandied about as much.

Re: Raku: A language for gremlins

#137

"If you define a MAIN function, any parameters you give it will be automatically turned into CLI flags." This is actually cool

What other languages do this? I love it

Practically any language that supports reflection has a library for that.

Re: Raku: A language for gremlins

#138

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.

Examples?

Also, related and recent:

Ask HN: Are you using Raku? Pros / cons?

https://news.ycombinator.com/item?id=36922692

Question inspired by starting to watch this: Raku for Beginners, at TPRC 2023:

https://youtu.be/eb-j1rxs7sc

Re: Raku: A language for gremlins

#139

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

Newer versions of Rakudo allow you to tune this behaviour dynamically through the $*RAT-OVERFLOW dynamic variable (which defaults to Num for the described behaviour).

See: https://docs.raku.org/language/variables#$*RAT-OVERFLOW*

Re: Raku: A language for gremlins

#140
post #57
post #6

When I was looking at the language, I didn't find the documentation "really poor". In fact I was impressed at how much of a one-stop-shop the official docs site was for both conceptual docs and API docs. https://docs.raku.org/ Look at the following page as a jumping off point for conceptual stuff. Absolutely top class: https://docs.raku.org/language

The Perl man pages were always excellent.

Yes.

I remember downloading them, as multiple PDF files, one for each broad subsection (like perlsub, perlvar, etc.) under the main TOC or so, over a somewhat slow Internet cafe connection and then reading many of them.

Not only excellent content, but excellent typography and design too, even though they were mainly text. I remember, even now, thinking that the PDFs looked really good.

Post reply on HN