Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Raku is pretty damn Cool (felix-knorr.net)
9 points by todsacerdoti on June 25, 2023 | hide | past | favorite | 3 comments


Not the point of the article, but the script can be written more concisely:

    #!/usr/bin/env raku
    
    run «git switch $_», :!out, :!err and last for <main master>;
    
    run «git branch -d $_» for run(<git branch --merged>, :out).out.lines».trim.grep: !*.starts-with: '*';
> and because you will want to use external libraries for that, and package management for scripting languages is terrible.

I'm not sure Raku can be called a scripting language, although it can be used as one.

Also I would like to know which parts of package management in Raku are terrible, I'm sure it helps people improve it, since Raku implementation and tooling are young.


Hey, just found out I'm on HN thanks to the Raku blog. What I meant with terrible package management is shared by all scripting languages. Having all dependencies always requires some sort of setup. Many scripting languages try to address that, e.g. with tools like pipenv, but things rarely work flawlessly. If you use a scripting language, you have to bother with this when you want to use the program, and I find that annoying. Rust does this to you too, and also there, it doesn't always work flawlessly, but at least that's a compile time problem. Once you have a binary, you don't need to deal with that anymore.

If you cannot just run a script, scripting languages lose most of their appeal. At least for me. And package managing has exactly this effect.

PS: also thanks for pointing out how to reduce that to two lines. :D


Are you the champion Raku needs in this respect? Or can you at least help?

----

There's been discussion for a decade of the need for bundling up a single executable that includes everything. Not merely the modules a script needs but also the Rakudo compiler itself.

(One can even imagine it one day being combined with Cosmopolitan[1] for a radically portable bootstrapping solution. But that's getting way ahead of things -- let's hope we get there later this decade.)

A decade ago there were a bunch of things that needed to be done to get to the end goal of a practical solution for a single executable that bundles dependencies and just works.

Since then almost all of the "todo list" for that has been done.

But as yet no one has gotten to the end goal of making creation of a single executable a practical thing. (And then making it become a standard part of Rakudo.)

Imo, even if all you did was start another discussion of where we're at regarding reaching that end goal, you'd be helping things along. Maybe not here but, say, reddit (r/rakulang).

[1] https://justine.lol/cosmopolitan/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: