🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
guifa Nemokosch they aren't exactly the same, but in many cases they're similar enough. 02:44
Nemokosch I think there are too many gotcha's to >>. to use it instead of map 07:52
nine Unless of course you actually want >>.'s behaviour. 07:55
Nemokosch ... which I don't think of as just a map 😉 08:27
say you have a 2d matrix of strings and you want to get the length of all of them 08:28
Voldenet I use .hyper.map instead of >>, I find the behaviour more sane 08:29
Nemokosch @matrix>>.chars is pretty much the right way to do that
Voldenet .deepmap(*.chars) would also work 08:31
the syntax is more obvious and it's likely to be actually faster 08:32
if not, you can throw in .hyper
+ hyper lets you specify parameters for parallelism 08:33
Nemokosch well _that_ is wordy for one 08:36
Voldenet operators are cool, but using "dumb methods" produces things that are easier to maintain in the long run 08:40
^ that's more of an opinion than a fact though 08:42
Nemokosch not everything needs to be "maintained"* "in the long run"** 08:50
* if it's exactly one step for you to turn a matrix of strings into their lengths, that's highly unlikely to ever change 08:52
** and to be frank, most of the time I'm not writing for "the long run"; actually it's more common that I quickly do something in the REPL 08:53
Raku is possibly the best language for quick shell-like scripting and prototyping 08:54
Voldenet sure, if it's in repl then go ahead 08:55
as long as you don't develop it into pathological habit of writing apl-like monstrosities everywhere 08:58
Nemokosch APL-like monstrosities would probably correspond to Java-like monstrosities, though 09:01
and eventually I think it all boils down to what you know about the language; it's almost too big to like "know-it-all" 09:07
for me, the hyper metaoperator means: 1. recursively traversing lists (when the operator is not nodal) 2. returning a list-like data structure rather than a sequence 3. allowing for some parallelism for calculating different values 09:11
in this order
when I see `.hyper.map`, I don't know which of these properties are captured or what the emphasis is
something that used to be one step that I have certain expectations for (and found favorable for a certain problem) turned into two steps and I wouldn't magically know what captures what 09:13
the docs also don't seem to be super elaborate but my impression is that the second point won't hold and I still have no clue about the first point 09:14
nine Reading a bit in here makes me think you actually know more about Raku than me. So how come you people are not more involved in core development? 09:28
lizmat nine: excellent question :-) 09:52
Geth ecosystem: 25b062200a | (Elizabeth Mattijsen)++ | META.list
Remove modules that now live in the zef ecosystem

IO::CatHandle::AutoLines, LN, Template6
10:02
Geth ecosystem: 6d7aec4f6f | (Elizabeth Mattijsen)++ | META.list
Freeze Grammar::Common

While it's being moved to the zef ecosystem
10:09
Geth ecosystem: fe558df857 | (Elizabeth Mattijsen)++ | META.list
Freeze MIME::Types

While it's being moved to the zef ecosystem. Also fix capitalization on the URL
11:39
Voldenet re java-like monstrosities: yes, it all boils down to how familiar the syntax is to people, that's why I voiced it as an opinion :P 12:04
Nemokosch I doubt the average Joe has good feelings about Java-like monstrosities, whether it seems familiar or not 12:06
Voldenet it's all cool until you see proxy facade for flyweight bridges factory
Voldenet in fact, java took the debatable route of using regular methods even as getters and setters 12:07
Voldenet regarding core development involvement – not sure if that remark is even pointed towards me, but I don't know enough and I doubt I'm good enough at what I think I know 12:25
Geth ecosystem: 494259aefc | (Elizabeth Mattijsen)++ | META.list
Revert capitalization on MIME
12:27
Nemokosch Whatever you refer to as "APL-like monstrosities", I think that would take more than one operator or two 12:28
So I thought the fair comparison would be something sufficiently complex 12:29
Voldenet I'm just convinced that it's possible to solve complex problems interactively in repl (by adding more and more operators to it) and then persist it as a solution in a file 12:40
Nemokosch how is this different from adding more and more methods to it, though 12:41
Voldenet My reasoning was that method calls are visually longer, so you can't put as much in one line 12:46
Nemokosch hahaha 12:49
you imagine 😂 12:51
tbh I didn't get the presumption; I don't think disposable or "immutable" code mixes that much with long-term development 12:55
it often really just boils down to what you accept as a "common solution of a common task"
I've grown used to int conversion of arrays giving the length 12:56
now I don't even need to think 12:57
but if you asked me "tabula rasa", I would definitely say that this is an odd conversion choice I rather disagree with
lizmat OOC, so what should your tabula rase self have expected ? 12:58
Nemokosch Most probably that it won't convert to an Int at all 😅 but I can tell you a couple of behaviors that don't seem less valid than taking the length 13:01
I might be weird but after JS, I could have anticipated something like "length - 1", for the biggest present index 13:03
Or first element as an int
Or, restricting ourselves to int arrays: the sum
lizmat well.. the sum would be a bad idea, as that would only work for int arrays, and sometime you don't know what you're getting back from a sub 13:05
Nemokosch anyway, it's not a big deal; I just thought this is a good example of what you accept as a legitimate solution for a common problem
and this is often more a community choice than a language choice
indeed, that was rather a hypothetical, if arrays were inherently bound to a certain type 13:06
like I could imagine another language / another data structure where that makes sense 13:07
another one: if you are a fan of vector operations, +@something could mean: turn this "vector" into an "int vector", converting all the elements or someting 13:08
Back to the point... In Javascript, the community moved towards stigmatizing coercion rules, I would say, beyond rational reasoning, with that === paranoia and all. 13:11
While from what I see, it's kind of the other way around in Raku. "Type coercions are a great thing - if you have predictable, well-documented rules." And it's apparent that this was the goal.
In JS, using the unary plus for numeric conversion is considered a weirdo thing, in Raku, it's considered pretty normal, including the named array conversion. These are like community or "culture" choices, 13:17
and if `+@foo` is accepted for the common task of "take the length of the array @foo", I don't see why `@table>>.chars` couldn't be accepted for a moderately common (but still rather generic) task of "turn the table into the string lengths in the table" 13:19
Voldenet >I don't think disposable or "immutable" code mixes that much with long-term development 13:26
Voldenet stares into the sky profoundly
it happens a lot more often than you'd expect 13:28
Voldenet `@foo -> int` conversion exists since perl5, but I think I see more of @foo.elems 13:35
than +@foo
nine Voldenet: I joined core development during the great list refactor. Didn't know anything then. I just tried if some code that had been commented out would actually already work and it did. Thus my first commit was made 13:38
It was really not more than that. The rest followed by applying a normal debugging process and discovering how stuff works along the way 13:39
There's very little magic involved. Its mostly just code 13:40
Truth is, no one knows enough when they start :) I'm not sure I know enough even now. I just ignore that topic altogether ;) 13:46
Voldenet 'very little magic', but not zero - ideally I'd expect to understand well how core grammar and jit work before doing anything, otherwise I might be introducing bugs that are impossible to debug/reproduce 13:48
and probably gc as well 13:49
nine thats what reviews are for 13:57
Nemokosch > it happens a lot more often than you'd expect 13:59
for whom, though
At my work, it's next to impossible to mix up the "serious" C and Java codes with the "casual" shell and Perl codes 14:01
if the latter doesn't work well, it might as well be thrown to the trash bin
Voldenet Sometimes I get asked to make "single use powershell/sql/raku/js" and after a year get improvement requests for it :( 14:12
Nemokosch 😅 14:20
gcd is prove6 the preferred way to run tests? 14:36
gfldex gcd: not mine, see: gfldex.wordpress.com/?s=raku-test-all 15:13
gcd I can't get prove6 to acknowledge my DYLD_LIBRARY_PATH environment variable I need for DBIish, so I'm doing for file in `ls t/*`; do raku -Ilib $file; done at the moment. 16:09
warriors so libera how replaces freenode? 16:48
sjn warriors: yes; freenode was hijacked by new management a while back, which led to a huge exodus to other networks. libera.chat was set up as an alternative managed by the same people as the old freenode, and I believe a majority of the old communities there moved here 16:56
some old freenode channels moved to OFTC.net (the Debian network) and probably others. 16:57
warriors why did they do that, is there any money in it 17:00
people hardly use irc anymore
Voldenet ¯\_(ツ)_/¯ 17:05
because some guy had money and needed to 'fix irc', but broke it instead by mistake 17:12
warriors :) 17:22
did he declare regrets
i think elon musk might be doing the same thing with twitter, much more money thought 17:23
rjbs There's an amazing graph that shows average number of users on various IRC networks, and you can see Freenode utterly plummer while Libera skyrockets. It's almost unbelievable. 17:39
lizmat yeah, the move was pretty swift and pretty complete
Nemokosch Has Twitter ever been good though 18:05
xinming DBDish::Pg: Error: could not access file "$libdir/plpgsql": No such file or directory <--- This issue is fixed by upgrading postgres to newest, before was 13.x running quite well, didn't notice the postgres update. 18:47
[Coke] (prove6) I use 'zef test .' for many things these days 19:13
lizmat yeah, for CI I use zef test . only if there are no dependencies 19:30
gcd `zef test .` doesn't see my environment variable either. 22:42