Live data from Hacker News

A Complete Course of the Raku programming language

course.raku.org

81–90 of 110 posts

Re: A Complete Course of the Raku programming language

#81
post #36

My first question whenever a new programming language comes up: does it solve the problem of "what color is your function"? [1] [1] https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...

Does that mean, “does it have threads and culturally emphasize their use over await or callback hell type arrangements?”

Re: A Complete Course of the Raku programming language

#82
post #43
post #36

My first question whenever a new programming language comes up: does it solve the problem of "what color is your function"? [1] [1] https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...

Yes, unlike the languages mentioned in TFA, it just works. Specifically, you can `await` anywhere without the requirement of declaring the surrounding context as async which in practice means you eliminate the red/blue distinction.

That must mean that it blocks and wait for the result. That doesn't "solve" the problem though.

Re: A Complete Course of the Raku programming language

#83
post #75

Earlier quoted context omitted.

I'm going to butcher my question so my apologies, I've heard Perl described as a sort of linguist / grammatical type of language, where you can solve the same problem using multiple approaches and syntax. Is this something Raku is drifting from or embracing? I think Raku is kind of interesting and I did try it out a few times whilst it was called Perl 6, but I'm not sure what its niche is. I mostly do Python for prof…

There are a TON of experiments and language mash-ups in Raku. Let's see here.... Types can include guard clauses that are evaluated at runtime. Typed multi-dispatch on top of that. In addition to normal "sets" it has "junctions", like some sort of funky quantum superposition or something. In theory those can be made parallel at some point. Stuff like that. One that is particularly funky is the "whatever-star". This i…

XPath has such a thing:

     (4, 5, 6, 7) ! (. + 7)

Re: A Complete Course of the Raku programming language

#84
post #63

Earlier quoted context omitted.

If you insist on comparing it to Perl, you could consider it "Perl Re-Imagined". Just like "The Lord Of The Rings" is a re-imagination of "The Hobbit".

> If you insist on comparing it to Perl, you could consider it "Perl Re-Imagined". Just like "The Lord Of The Rings" is a re-imagination of "The Hobbit". The Lord of the Rings is a sequel to The Hobbit, rather than a re-imagining. Of course there was a bit of re-imagining necessarily involved, much like the relationship between Star Trek: The Original Series and it's sequel The Next Generation.

As a Tolkien aficionado, Larry Wall I think knew what he was saying when he made this comparison. I think that if you compare https://en.wikipedia.org/wiki/The_Hobbit#Plot with https://en.wikipedia.org/wiki/The_Lord_of_the_Rings#Plot, you'll get an appreciation as to what Larry Wall meant.

Re: A Complete Course of the Raku programming language

#85
post #36

My first question whenever a new programming language comes up: does it solve the problem of "what color is your function"? [1] [1] https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...

Does that mean, “does it have threads and culturally emphasize their use over await or callback hell type arrangements?”

Not sure why I’m getting downvoted? The linked article goes at length saying callback hell is terrible, await is a partial solution, and languages that are free to use threads have it best. Author upholds that, “Goroutines in Go, coroutines in Lua, and fibers in Ruby are perfectly adequate.”

Re: A Complete Course of the Raku programming language

#87
post #20

Raku seems to be stuck in a "we'll optimise that later" dead-end, especially with string processing. Parse a large log file with a regex and compare Raku with Perl5. Raku has a long way to go.

Raku also suffers from a lack of ecosystem. Perl5 and Node have huge advantages there.

'use Inline::XXX;' gives raku coders access to Perl5 (CPAN) and python modules

Re: A Complete Course of the Raku programming language

#88
post #7

Over the years I have learned and dipped my toes in many programming languages, and I'd need some kind of reason to look into yet another language. What are Raku's main contributions to the programming language design space that I probably haven't seen elsewhere?

great question @msvan - raku has many ... for me the unique genius of raku is to have stolen all of the best parts of type system, OO, grammars & regex, functional and procedural coding and jammed them into one smoothly integrated syntax

Re: A Complete Course of the Raku programming language

#89
post #27

Earlier quoted context omitted.

Gradual / optional type declaration, grammars as a first class language feature, async / parallel programming, rational numbers, lazy evaluation, OOP with classes and roles and an underlying metaobject protocol.

The real bummer about optional typing is that it doesn’t speed up the program. I used it all over thinking that I was “optimizing” or helping the compiler. Really I was creating more work for it.

typing, roles/inheritance and multi dispatch together offer a very clean coding model that cuts through the usual if-then-else wool

Re: A Complete Course of the Raku programming language

#90
post #43

Earlier quoted context omitted.

Yes, unlike the languages mentioned in TFA, it just works. Specifically, you can `await` anywhere without the requirement of declaring the surrounding context as async which in practice means you eliminate the red/blue distinction.

That must mean that it blocks and wait for the result. That doesn't "solve" the problem though.

It's a cooperative yield point so while the code containing the `await` blocks and waits, the underlying thread/core is released and "stolen" by the standard scheduler for other work, and then resumed when the processes it's waiting for complete or are cancelled.

What problem is there beyond that?

Post reply on HN