I don't understand why we want to use some language feature like Junctions, instead of using lists explicitly?
Unusual Raku Features
131–140 of 166 posts
Re: Unusual Raku Features
#132Wow. Sign me up for leaving the industry before I ever have to maintain a Raku codebase.
Re: Unusual Raku Features
#133Earlier quoted context omitted.
I’m not sure that I see the connection that you are making here. Can you elaborate? Also note that in contrast to Bash, Junction is a type. Regarding their utility, at their most useful level (in my experience), junctions provide for things like: $string ~~ “this”|”that”|”other” This is the same as writing $string eq “this” || $string eq “that” || $string eq “other” They have many other uses but that’s the most commo…
> I’m not sure that I see the connection that you are making here. Can you elaborate? Back when I had to write PowerShell scripts, I constantly found that piping an array to some command would almost always make that command to be invoked once for every item in array, instead of being invoked once and given the whole array as a single input. Sometimes it's the latter that you need, so the workaround is to make a new,…
In Raku, the equivalent would be:
my @a = [1,2],;
The connection to junctions is still not very clear to me, however. A junction doesn’t really have any correlation to a single element version of a list. As a super-position of potential values, it doesn’t have many correlaries in other languages.For example, part of the original concept of junctions involved parallel evaluation of junction elements in an expression but that turned out to be less useful than hoped for in practice.
Re: Unusual Raku Features
#134Earlier quoted context omitted.
Oh I’m not wealth motivated at all . My regrets are about uselessness of that time itself. E.g. I could learn ML instead and do nothing useful with it, rather than not doing nothing useful with my perl knowledge today.
This is so self-contradicting, it feels like division by zero
Re: Unusual Raku Features
#135Earlier quoted context omitted.
That's a fair reaction to the post if you haven't looked at any normal Raku code. If you look at any of the introductory Raku books, it seems a LOT like Python with a C-like syntax. By that I mean the syntax is more curly-brace oriented, but the ease of use and built-in data structures and OO features are all very high level stuff. I think if you know any other high level scripting language that you would find Raku p…
Sure, but the fact that weird stuff is possible means that someone, at some point, will try to use it in your codebase. This might be prevented if you have a strong code review culture, but if the lead dev in the project wants to use something unusual, chances are no one will stop them. And once you start...
Re: Unusual Raku Features
#136Earlier quoted context omitted.
Sure, but the fact that weird stuff is possible means that someone, at some point, will try to use it in your codebase. This might be prevented if you have a strong code review culture, but if the lead dev in the project wants to use something unusual, chances are no one will stop them. And once you start...
If you suggest a language here where nothing weird can be done, I bet someone will reply with something weird done in that language.
Re: Unusual Raku Features
#137Earlier quoted context omitted.
> I’m not sure that I see the connection that you are making here. Can you elaborate? Back when I had to write PowerShell scripts, I constantly found that piping an array to some command would almost always make that command to be invoked once for every item in array, instead of being invoked once and given the whole array as a single input. Sometimes it's the latter that you need, so the workaround is to make a new,…
Got it, that makes sense based on the link. In Raku, the equivalent would be: my @a = [1,2],; The connection to junctions is still not very clear to me, however. A junction doesn’t really have any correlation to a single element version of a list. As a super-position of potential values, it doesn’t have many correlaries in other languages. For example, part of the original concept of junctions involved parallel evalu…
A junction in Raku, when given as an argument to a function, automatically applies this function to each of the junction's element and the results are combined into a new junction as a result.
I don't know, seems like a pretty clear parallel to me. And since the Powershell's behaviour is quite often undesirable, I agreed with the original commenter that perhaps the junctions could also be somewhat annoying to use instead of just working normal lists: after all, "s in ('this', 'that', 'other')" is about just as clear as "$string ~~ “this”|”that”|”other”" but doesn't require support for magical self-destructuring containers in the language.
Re: Unusual Raku Features
#138I use Raku in production. It's the best language to deal with text because building parsers so so damn nice. I'm shocked this isn't the top language to create an LLM text pipeline.
Re: Unusual Raku Features
#139Wow. Sign me up for leaving the industry before I ever have to maintain a Raku codebase.
Same as Perl, nobody wants to maintain it, but it's extremely fun to write. It has a lot of expression. You can see that in Raku's ability to define keyword arguments with a shorthand (e.g. :global(:$g)' as well as assuming a value of 'True', so you can just call match(/foo/, :g) to get a global regex match). Perl has tons of this stuff too, all aimed at making the language quicker and more fun to write, but less rea…
Re: Unusual Raku Features
#140I use Raku in production. It's the best language to deal with text because building parsers so so damn nice. I'm shocked this isn't the top language to create an LLM text pipeline.