🦋 Welcome to the former MAIN() IRC channel of the Raku Programming Language (raku.org). This channel has moved to Libera (irc.libera.chat #raku)
Set by lizmat on 23 May 2021.
00:01 _ed joined 00:02 reportable6 left 00:03 reportable6 joined 00:09 _ed left
m6locks how do I typecheck an array as an argument to a method that sometimes has zero, one, or several instances of a class? I tried passing Nil, but then I get an error expected Positional[Array] but got Nil (Nil) 00:18
Nil is the case when there's no values
japhb m6locks: What are you actually trying to check? What would be correct or incorrect ways to call your function? (I ask because "Positional[Array]" as an expected type often indicates a mistake in the typing.) 00:25
00:26 dogbert12 left
rassoc m: class C { has $.x }; sub foo(C @arr) { say @arr }; my C @cs = C.new(x => 10); foo @cs # m6locks 00:39
camelia [C.new(x => 10)]
00:40 _ed joined
rassoc Had trouble with that as well when starting out. Type @arr already is an array of Type; no need to specify Array[Type] 00:40
m: class C { has $.x }; sub foo(C @arr) { say @arr }; my C @cs; foo @cs # zero instances 00:44
camelia []
01:15 dogbert12 joined 01:20 dogbert12 left 01:22 dogbert12 joined
m6locks ok, so Nil won't do 01:23
confused because in java you can just say instance.method(null) and it works
now there's Array @a in the method arguments list, calling the method with Nil produces that error 01:25
but I'll just replace all Nils with []'s 01:26
01:32 solitario left 01:33 solitario joined
kybr does anyone know a good resource for working with Date? i want to ask things like "how many week days between 2021-01-01 and 2021-03-31?" 01:38
01:40 dogbert12 left 01:53 frost joined
rassoc other than the official docs and test suite? not really, no. 01:54
m: ('2021-01-01'.Date .. '2021-03-31'.Date).grep(*.day-of-week <= 5).elems.say
camelia 64
02:19 rassoc left 02:31 Tirifto left 02:32 Tirifto joined 02:49 _ed left 03:16 neshpion left 03:19 dogbert12 joined 03:22 dogbert17 joined 03:24 dogbert12 left 03:28 dogbert11 joined 03:29 dogbert17 left 03:33 dogbert11 left 03:36 Doc_Holliwould joined, sono_ joined 03:37 frost left, jrjsmrtn left 03:38 vodkra left, vodkra joined, jrjsmrtn joined 03:39 Doc_Holliwood left, sono left 04:12 dogbert11 joined 04:17 dogbert11 left
moon-child til 'sub f of T' 04:36
is there a difference between that and the 'returns' syntax?
cnx from the docs it seems so: docs.raku.org/language/functions#R...onstraints 04:40
moon-child hmm, nice 04:43
shorter than -->, and more consistent (for subs that take no parameters)
I guess it's not actually shorter, because you can leave out the space at the end of --> 04:51
m: sub f(-->Int) {}; sub g of int {}
camelia ( no output )
05:13 stoned75 joined 05:16 dogbert11 joined 05:20 dogbert17 joined 05:22 dogbert11 left 05:47 jmcgnh left 05:51 jmcgnh joined 05:53 ufobat joined 05:58 dogbert17 left 06:02 reportable6 left 06:03 Sgeo left, reportable6 joined 06:16 dogbert17 joined 06:20 dogbert11 joined, dogbert17 left 06:26 dogbert11 left 06:41 patrickb joined 06:52 patrickb left, patrickb joined
CIAvash patrickb: Is it possible for you to provide a checksum file or something like that for rakudo download tarballs? 07:09
moon-child CIAvash: there's a signature, is that not sufficient? 07:17
07:25 _ed joined 07:27 holli__ joined 07:28 Doc_Holliwould left 07:29 _ed left 07:30 dakkar joined 07:35 dogbert11 joined 07:38 patrickb left, patrickb joined 07:40 patrickb left, patrickb joined 07:42 patrickb left, patrickb joined 07:43 patrickb left, patrickb joined
patrickb CIAvash: Can you elaborate on your usecase? I'm more than willing to provide sha-1 and or md5 sums should there be a need. So, why is the signature insufficient? 07:45
07:53 dogbert11 left 08:01 dogbert11 joined 08:10 AntonOks joined 08:12 MoC joined 08:30 holli__ left 08:35 frost14 joined 08:41 frost14 left 08:42 frost46 joined 08:43 frost46 left, frost24 joined
CIAvash patrickb: It's probably sufficient, it's just that in the Arch Linux wiki, it says, add checksums and additionally signatures. I am generating sha256sum for the rakudo-bin AUR package, I just wanted to use checksums from source, instead of generating them from the packages I downloaded. It's not a big problem. wiki.archlinux.org/title/PKGBUILD#Integrity 08:43
08:44 ComplYue[m] left
patrickb CIAvash: Sounds sensible. Which checksums would be good to have? Only sha256? 08:45
08:45 frost24 left
CIAvash Yeah 08:46
patrickb CIAvash: OK. Thanks for the input! I'll see what I can do! 08:47
CIAvash patrickb++
08:54 Doc_Holliwood joined 08:57 frost joined 09:57 coverable6 left, shareable6 left, reportable6 left, unicodable6 left, notable6 left, committable6 left, bloatable6 left, quotable6 left, linkable6 left, nativecallable6 left, tellable6 left, sourceable6 left, squashable6 left, statisfiable6 left, benchable6 left, bisectable6 left, releasable6 left, evalable6 left, greppable6 left 09:58 sourceable6 joined, shareable6 joined, linkable6 joined, releasable6 joined 09:59 notable6 joined, unicodable6 joined, tellable6 joined, reportable6 joined, benchable6 joined, bloatable6 joined, statisfiable6 joined, bisectable6 joined, squashable6 joined 10:00 nativecallable6 joined, evalable6 joined, quotable6 joined, greppable6 joined, coverable6 joined, committable6 joined 10:09 rassoc joined 10:21 Doc_Holliwood left 10:47 RandalSchwartz joined 10:51 squashable6 left 10:53 squashable6 joined 10:54 sono_ left 11:24 _ed joined 11:28 _ed left
lizmat wonders what she should be working on first from the pile of unfinished things 11:30
moritz lizmat: start something new :-) 11:31
lizmat well, that's a thought :-)
but I guess we first want to get Geth up and running again 11:32
and since nobody has volunteered just yet...
11:37 chronon left 11:43 Geth joined
lizmat I guess that's step one 11:44
11:44 Geth left 11:45 Geth joined 12:02 reportable6 left 12:05 reportable6 joined 12:18 algorev joined
algorev Hello 12:18
12:19 Geth left
algorev I've been getting started with raku in the past few days and it's awesome 12:19
I've just got a few questions that... wel i think i'm not the first one to ask them by far
My first question is: how ready is raku yet? I know some parts of the spec are not implemented yet, but to what extent? 12:20
12:22 Geth joined
algorev And my other question is much more general: i've seen that there aren't many modules available for raku on the archive yet. and it doesn't seem to be very popular yet. It's a language that i wanna see grow. Are there ways i can help? 12:22
patrickb algorev: From a extent of implementation point of view, Raku is perfectly usable. It provides a feature set surpassing about every other language there is. 12:23
12:23 Geth left
patrickb algorev: As you already said, the ecosystem isn't as big, as it could be. 12:23
12:23 Geth joined
algorev I'm not too sure what raku would need to get used more, maybe it's just in the same situation as Haxe, nifty features but not enough people to push for it. Maybe it needs just more time, but waiting's not my favorite strategy 12:24
patrickb Performance is the other thing, where Raku still has to improve.
MasterDuke for the original specifications, i believe the POD related ones have the most not-yet-implemented parts 12:25
patrickb I personally just use it anyways ;-)
algorev I'm new to perl stuff, so i don't really know how raku is seen in the wider perl world, maybe that's something too
12:25 Kaipi joined, Kaiepi left
algorev But yeah i've been trying out raku and i love it 12:25
I'm not a good coder but i'll be doing what i can
patrickb Are there specific modules you are missing? 12:26
12:26 Kaipi left, Kaipi joined
algorev For the time being i'm looking around to see what i can easily do 12:27
I might try to write an image module that doesn't rely on ffi
lizmat that sounds... pretty cool and pretty advanced ?
algorev For the rest and as a start it'll be awesome as a powershell replacement 12:28
I'm not going to try and make it big yet
Just what i need
I don't have the level to write pillow ahah
lizmat please feel free to ask any questions here, and/or on stackoverflow.com/questions/tagged/raku
algorev Thanks! 12:29
12:29 algorev left 12:46 neula joined 13:10 Geth left, LizBot_ left 13:11 RakuIRCLogger left 13:14 RakuIRCLogger joined 13:15 Geth joined 13:17 frost left 13:33 Doc_Holliwood joined 14:19 stoned75 left 14:21 stoned75 joined 14:22 melezhik joined
melezhik . 14:22
patrickb: I'd like to bring our reddit/r3 discussion here, if you don't mind ... 14:24
14:24 Sgeo joined
melezhik r3 installation is very simple - just git clone and zef install dependencies ... I am not sure what external site you're talking about 14:25
also the idea - to let users run tests on their local environments / rakudo branches straight away and be actively involved in tests writting 14:26
14:31 Doc_Holliwood left, RandalSchwartz left 14:40 RandalSchwartz joined, RandalSchwartz left
tonyo is raku in production anywhere? 14:52
jdv i think it is for at least all the places we got logos from?... 14:54
(at the bottom of raku.org/)
14:54 _ed joined
tonyo what's it doing in prod at any of those places? 14:58
jdv idk - maybe the person that did the recent push for those logos might know... 15:00
15:01 _ed left
jdv could be a fun article to put together for someone that has time and interest:) 15:01
patrickb is back 15:12
the logo guy would be me 15:13
15:15 _ed joined
patrickb I can only speak for my company. We use Raku for several webservices consumed by internal tools. One interfaces a CRM to a mobile app another generates shiny PDFs and E-Mails for a configuration tool. 15:15
melezhik: Did I understand right, that r3 is exclusively an offline tool where each user creates their own bug-test database? 15:20
melezhik good question. yes it's offline tool. however user may want to commit their tests back to "mainstream" repo using PRs , so we have centralized database for bugs . but I am not yet sure ... right now it's only me who create those tests 15:22
but regardless of this question, the main idea - yeah - it's offline tool 15:23
15:23 _ed left
nine tonyo: most importantly our customer self-service application at mein.atikon.com/ is written in Raku and with Cro. On the backend it uses another Cro application providing a REST API to our central database. We've also used Raku for an assortment of internal services and scripts. 15:29
There's a reason why I've worked mostly on Rakudo's reliability in the past year or two :) 15:30
patrickb melezhik: But given that issues are a public shared thing, wouldn't it make sense for the issue test tool database to also be shared?
tonyo interesting, right now it sounds like it's mostly used for cro 15:32
i was looking at writing a datalog slang that could be integrated instead of ORM garbage
melezhik of course. by saying "but I am not yet sure" I meant I am not sure what is the best way to propagate users tests back to mainstream repo, but probably GH PRs should be enough. Sorry for being ambiguous
patrickb And then a service to run these tests server side would be quite nice. :-)
nine The internal stuff was pretty much "wherever asynchronicity or parallelization were important topics"
tonyo what are the pain points of using it in prod? 15:33
patrickb I have recently written prototype of a client side graphical configuration tool in Raku. That's non Cro. 15:34
melezhik sure )) thus the workflow is following 1) a user post a rakudo bug to GH 2) fork r3 repo 3) create a test for the bug 4) reproduce bug against any given version of rakudo (branch/whatreverrable/etc) 5) make PRs for a test/bug to r3 main repo
SmokeMachine tonyo: before writing it, take a look at Red… 15:35
nine Oh, and Grammars were the other thing. We have used Raku to compile our 4 million line Apache virtual hosts configuration to nginx and continue to use the code to automate changes to nginx config
tonyo i've seen red
nine: do you have a write up on that? i'd like to know more about that 15:36
nine Pain point used to be segfaults or other crashes. But nowadays it is pretty stable, so I'd say most important topic is memory usage. We do see (presumably) unbounded memory growth in the long running applications. But that may actually be because of Inline::Perl5, or maybe Cro or its underlying modules.
tonyo: you mean the web server config stuff? 15:37
tonyo nine: yea
patrickb tonyo: Re pain points. I wouldn't say there is a single major pain point. Sometimes there is a rakudo bug that is annoying and needs to be worked around, sometimes it's some library one would wish to use, but doesn't exist yet.
melezhik patrickb also for releases managers one of the workflow is to routinely run regression tests against recently closed issues against the latest rakudo commit , see this - gist.github.com/melezhik/0b65ac1b3...d19c2f22d7
tonyo SmokeMachine: red, to me, glues together the worst parts of ORMs and confusingly uses the meta method operator for normal actions. 15:38
SmokeMachine tonyo: what’s the worst parts of ORMs, and what do you thinking is confusing on Red’s meta method usage? 15:40
patrickb tonyo: A limiting factor for us is definitely the poor Windows support. Writing a native Windows GUI with Raku isn't possible today. But we have and will have many of those.
melezhik: Wouldn't it be possible to run the tests on a centralized server? 15:41
melezhik like I said, this is not main focus for em right now, but yes, r3 itself only requires a few Raku modules and that is it 15:42
it's dead easy to deploy
the more difficult part is to install whateverbale versions but I already taken care about this ))) , this task is also integrated into r3 - gist.github.com/melezhik/0b65ac1b3...nt-3799472 15:44
patrickb melezhik: Because then most of the other stuff I said makes more sense (i.e. automatically creating these issues via GH comments).
melezhik patrickb not sure if understand how GH comments are relevant here ... my view is users would create tests 15:46
SmokeMachine tonyo: if you don’t like using `Model.^all.grep` you can, on your model definition, say: `model Model is handling<map grep> { …` and use `Model.grep` (that’s a experimental feature) 15:48
tonyo SmokeMachine: the .^ method calls is used for meta methods, red uses them for normal things an ORM should do and it does it everywhere. the worst part of ORMs is writing all of the boiler plate, `this is what my table looks like, this is what relationships it has` etc. that stuff is already documented in the db with relationships. the verbosity of the code i need is equal to the sql i'd have to write and
it's far less powerful. the documentation is poor. how do i run red against postgres (the link is either broken or doesn't exist in the docs). how do i run aggregate queries? how do i run this against six databases in the same file? does RED prefetch? why do the docs advocate .^all.first:*.name eq 'xyz', why are you doing something in code that a db was designed to handle? there's a lot of _why_
questions they raise that generally don't have good answers, if i had to learn a technology to get data from a db why wouldn't i just learn sql, etc
patrickb: what kind of windows guis are you trying to make?
patrickb melezhik: I guess I have a bit of a different vision of how one could use r3. Given the explicit aim is creating tests corresponding to GH issues it makes a lot of sense to be able to create those tests right there on the ticket. I totally agree that that is impossible as long as r3 is exclusively a local tool. 15:49
tonyo .^all.grep seems so backwards in the calls, shouldn't the filter come first so it's obvious what order those things are happening in? 15:51
SmokeMachine tonyo: the usage of the .^ on Red is because the ORM runs on the meta class, not at your class, that way you can do whatever you want with your class without conflicts 15:52
patrickb tonyo: In most cases medium sized pieces of software (the type one can write up in a months time) aimed at one specific task. Some upload tool to transfer data, a tool to provide access to some webservice, some configuration utility that writes its results to an Excel file...
tonyo what's the meta class? 15:53
SmokeMachine tonyo: about the schema already being described on the database: that’s why I’ve been writing the red CLI, one of its features is read the database and generate Red code
tonyo why not just load it from the database? generating boilerplate isn't making the code less densely boring 15:54
15:54 dogbert11 left
tonyo if i do class A { } ... A.new.^WHAT <- that runs against my A object .. are you saying in red that if i do Person.^all <- this isn't running against Person? 15:55
SmokeMachine tonyo: about the verbosity: I disagree with you, many queries are much shorter with Red. The idea is to mimic Raku’s syntax. And many possible sql are niy, it’s a wip project 15:56
patrickb We have quite a set of tools interfacing and extending MS Excel. I guess those have little chance to be doable in Raku any time soon. (An Excel COM or XLL API is probably not going to happen any time soon.)
SmokeMachine tonyo: Dynamically loading crib db and running it is the next step after the code generation is done… many people is helping… but not enough to do so many stuff in parallel 15:58
tonyo SmokeMachine: having CREATE statements for managing sql table migrations in tools explicitly designed for it and then also having to describe those structures in a language capable of creating those things dynamically is verbose. the queries aren't shorter either.. Person.^all.grep: *.name eq 'SmokeMachine' vs 'select * from person where name = "SmokeMachine"' saves you six characters 15:59
in only one of those at quick glance do you know where the filtering is actually happening 16:00
SmokeMachine tonyo: no, if you do A.^meth, it will call the method ‘meth’ on the meta object of the class A… and that’s exactly what also happens with Red
tonyo so, it does run on my class in Red too, then
SmokeMachine Passing the class A as first parameter 16:01
tonyo Person.^all <- runs against Person
SmokeMachine No, Person.^all class MetamodelX::Red::Model’s all passing Person as first parameter 16:02
s/class/calls/
It’s equivalent of: MetamodelX::Red::Model.all(Person) 16:03
melezhik patrickb I get this. well, the focus is on creating tests FOR issues. I find it hard to automate this via GH comments. I would personally consider GH issues only as text descriptions rather then tests. So tests are created after an issue is described in GH 16:04
SmokeMachine And you can do that that way if you want
I mean: Person.WHAT.all(Person)
tonyo right so when i have trouble with .^all.grep: *.name.^count > 5 i can debug that down into something needlessly complex or i can just use 'select * from x where count(name) > 5'
jdv i used raku at $work for a crawler and ran into the same issue(s) mr. steven lembark did with his project he talked about maybe a year ago. 16:05
it *can* have unbounded mem usage if it gets bogged down - couldn't track it down
16:05 xinming_ left
jdv but 99% of the time it finishes before that becomes a problem 16:05
tonyo does moar hoard memory like p5 or does it release?
16:06 xinming_ joined
jdv no idea. time and lembark and i spent some time on it and it wasn't obvious 16:06
*timo
tonyo been so long since i looked at that code
jdv i think that's the only majorish issue ive found in prod so far 16:07
the others were work-around able and relatively minor
maybe half a dozen or so of those
16:07 ufobat left
SmokeMachine `.^all.grep: *.name.elems > 5`… it’s just Raku code… pretend .^all returns an array and you’ll see that makes sense… and if you want to debug, setting my $*RED-DEBUG = True will show you the SQL 16:07
jdv the worst parts of orms are...orms, ime;) 16:08
tonyo jdv: agreed 16:09
SmokeMachine The best part of Red is that’s just Raku…
tonyo that's not a glowing review of your own module 16:10
SmokeMachine That’s just my opinion…
El_Che SmokeMachine: are you in the uk nowadays?
SmokeMachine Yes 16:11
El_Che family as well?
tonyo SmokeMachine: so is .^all.grep getting everything and then .grepping the results? the docs indicate no and if not, why are the calls .^all.grep ?
SmokeMachine Yes living here since February 2019
El_Che nice
can they adjust? big change 16:12
SmokeMachine tonyo: no, it’s generating the SQL and running everything on db… but with Raku’s syntax
patrickb melezhik: But wouldn't it be possible to put the test text in a comment of a preexisting issue? A bot then sees that text and imports the test into a separate r3 website which then performs the testing. That same bot could even add another comment to the issue linking to that separate r3 website. That r3 website would be the central store for all issue tests. 16:13
SmokeMachine El_Che: my 2 daughters are already sounding like the queen (at least for my non native ears)
El_Che SmokeMachine: glad to hear it
tonyo never do i chain two calls together and expect the right most to happen first in raku .. @a.grep({ $_<name> eq "abc" }).map({ $_<found> = 1 }) <- never do i expect the .map to run first 16:14
m: my @a = ({ name => "abc" }, { name => "xyz" }); @a.grep(*<name> eq "abc").map({$_<found> = 1}); dd @a;
camelia Array @a = [{:found(1), :name("abc")}, {:name("xyz")}]
tonyo but, in red, i should expect .^all.grep to happen in the order of grep, ^all
which is aiming to be similar to raku in syntax? 16:15
SmokeMachine tonyo: it’s just like Raku, you can do Model.^all.grep(…).map(…), or if you prefer: `my @a := Model.^all; my @b := @a.grep(…); my @c := @b.map(…); .say for @c` 16:17
tonyo that's missing the point 16:18
and also, you're saying those two code paths are not equivalent .. is .^all.grep fetching every row from the DB and then actually calling .grep on them? 16:19
patrickb Have to leave. o/
16:19 patrickb left
SmokeMachine no it isn't, it will only call the database on `.say for @c` on my example 16:19
tonyo then what, exactly, is in @b ? 16:20
SmokeMachine it's a lazy list
tonyo of? 16:21
SmokeMachine it's an Red::ResultSeq object
tonyo right 16:22
SmokeMachine tonyo: www.irccloud.com/pastebin/QfJwDv6s/ 16:25
tonyo the SQL in that is much clearer
SmokeMachine  raku -I. -MRed -e ' 16:26
model Bla { has $.id is serial }
red-defaults "SQLite";
schema(Bla).create;
my $*RED-DEBUG = True;
my @a := Bla.^all;
my @b := @a.grep: *.id > 2;
my @c := @b.map: *.id;
say @b.^name;
dd @b;
'
Bla::ResultSeq
Bla::ResultSeq.new(update => Array[Pair].new(), comments => Array[Red::AST::Comment].new(Red::AST::Comment.new(msg => "method 'grep' called at: -e #10"), Red::AST::Comment.new(msg => "method 'map' called at: -e #11")), with => Red::Driver, obj => Any, chain => Red::AST::Chained.new(filter => Red::AST::Gt.new(op => ">", returns => Bool, left => Red::AST::Cast.new(type => "num", value => Red::Column.new(attr => bla.id, attr-name => "id",
auto-increment => Bool::True, id => Bool::True, name => "id", name-alias => "id", nullable => Bool::False), bind => Bool), right => Red::AST::Value.new(value => 2, column => Red::Column, type => Int), bind-left => Bool::False, bind-right => Bool::False), limit => Int, offset => Int, post => Callable, order => Array[Red::AST].new(), group => Array[Red::AST].new(), table-list => [], next => Red::AST::Chained))
sorry, wrong button...
ttonyo: www.irccloud.com/pastebin/H11acPYA/
tonyo that makes @b looks like it should be a scalar 16:27
rather than a list of one item
SmokeMachine why? @ accepts any Positional...
Bla::ResultSeq does Positional...
tonyo it also, obfuscates the fact that the db is doing the filtering and not the code
which is still the point 16:28
SmokeMachine no, because you are using Red just because of that...
tonyo saying `no` doesn't make it untrue
16:29 xinming_ left
SmokeMachine maybe not, but the sentence after that does :) 16:29
16:29 xinming_ joined
tonyo the sentence after that lacks enough nouns to make any sense 16:30
SmokeMachine tonyo: but of course you have all the right to not like that and not use that... but other people also have the right to like and use it...
tonyo so, again, Red is obfuscating where the line of what's being done by the DB and what's being done in code is happening
SmokeMachine it does not make sense, because Red is being used for doing that 16:31
that's it's main reason
tonyo i didn't say other people can't use it or like it. i said i didn't like it, you asked why, and now you're just saying `no` to the reasons i'm giving you. 16:32
SmokeMachine I'm explaining why I disagree with what you said
16:33 dakkar left
SmokeMachine maybe my English isn't helping... but that's what I'm trying to do... 16:33
tonyo i don't care why you disagree, you're not attempting to explain or to have a discussion or even try to see the points, it's to make sure nothing of red can be of critique
16:34 AntonOks left
tonyo ah, that could be it too (and probably more likely) 16:34
what is your native language? 16:35
SmokeMachine tonyo: of course not! many things in Red was already critiqued and many I've changed. But what are your suggestions to fix those issues? 16:36
tonyo: Portuguese
tonyo ahh, sorry dude, i can't bridge that gap. i'd get away from the .^all.grep.map thing, .find(*.name eq 'abc').fold({ $_<xyz> = 1 }).^all makes it clearer whether the db is doing the filtering or if the code itself is doing the filtering, there's a distinction between the steps .. is .^all grabbing everything from the db and putting it in the resultseq ? 16:39
SmokeMachine would you like to go to #red channel and discuss about that there?
isn't that enough having the possibility to add `is handling ( find => grep, fold => map )`to have that behaviour? 16:42
and no, .^all is not grabbing anything from the DB, that triggers the query is trying to access the individual values 16:43
so, for example, `.say for @my-result-seq` would trigger the query, `@my-reqult-seq.grep: *.column > 10` wouldn't 16:44
16:49 sena_kun left, jess joined 16:50 nirnam joined 17:04 MoC left 17:10 xinming_ left, xinming_ joined 17:11 dogbert11 joined
SmokeMachine tonyo: about the name of the methods, by this (github.com/FCO/Red/issues/406) I think the majority preferes grep and map (but I could be seeing that wrong) 17:12
tonyo i agree with xliff, those aliases would make the code more clear as to what is doing the filtering (code vs db) 17:23
the thunk-y searching isn't apparent in the code and a source of confusion
17:29 squashable6 left 17:31 squashable6 joined 17:33 nirnam left 17:35 _ed joined 17:40 _ed left 17:51 _ed joined 17:56 _ed left 18:02 Geth left, Geth joined, reportable6 left, reportable6 joined
nine tonyo: to be fair in Raku .grep(...).map does not run the grep first and then the map. It sets up a processing pipeline and then processes the list one element at a time 18:16
lizmat fwiw, I don't understand why anyone would do .grep.map rather than just .map 18:17
melezhik .tell @patrickb - this is not how I see this. I'd rather want people actively create/run tests rather then passively write comments and wait till some system would handle this ... Also text based approach is limited in what kind of tests people would want to write. With an offline tool one has all the freedom to express ones .
tellable6 melezhik, I cannot recognize this command. See wiki for some examples: github.com/Raku/whateverable/wiki/Tellable
melezhik .tell patrickb: - this is not how I see this. I'd rather want people actively create/run tests rather then passively write comments and wait till some system would handle this ... Also text based approach is limited in what kind of tests people would want to write. With an offline tool one has all the freedom to express ones .
tellable6 melezhik, I'll pass your message to patrickb
lizmat afk& 18:18
tonyo nine: yes but it still does those in an ordered fashion
lizmat: can map filter things now? 18:19
moon-child lizmat: the former might be a clearer expression of intent, even if anything can be expressed via the latter
tonyo: you can return a slip from a map
m: say ^10 .grep(* %% 2).map(-*) 18:23
camelia (0 -2 -4 -6 -8)
moon-child m: say ^10 .map({$_ %% 2 ?? -$_ !! Empty})
camelia (0 -2 -4 -6 -8)
moon-child m: say ^10 .map({-$_ if $_ %% 2}) #even 18:24
camelia (0 -2 -4 -6 -8)
tonyo nice 18:37
18:37 MoC joined
rassoc last one is unintuitive as hell, might be worth documenting that. any other language that just drops mapped values? 18:49
leont I think that's not a map behavior, but an if behavior 18:54
A false if returns Empty?
s/returns/evaluates as/
rassoc interesting 18:55
18:55 Doc_Holliwood joined 19:00 MoC left
Geth doc: 33ca775f06 | (Stoned Elipot)++ | util/github-action-test.sh
Add script overview in comment. ref #3906
19:07
moon-child rassoc: s7 scheme has effectively the same behaviour as raku, you can return multiple values (or no values) from a mapper
and yeah, it's Empty
m: say (0 if False), (0 if False).WHAT
camelia ()(Slip)
19:08 linkable6 left 19:10 linkable6 joined
rassoc s7? niche within a niche ;) 19:15
nine Perl does it too: > perl -E 'say map { $_ % 2 == 1 ? $_ : ()} (1,2,3,4)' 19:19
13
rassoc interesting, thanks for that. never really used perl, only the parts that ruby stole from it 19:21
moon-child same. (Well, substituting raku for ruby.) I feel like I should learn perl properly but never have 19:22
rassoc never quite liked what i saw when comparing perl and raku solutions for the perl weekly challenge. highly subjective, but the later always feels cleaner 19:27
moon-child well, I guess there's a reason they didn't stop at perl 5 :) 19:28
20:10 evalable6 left, linkable6 left 20:11 linkable6 joined 20:12 evalable6 joined 20:13 _ed joined 20:18 RandalSchwartz joined 20:19 _ed left 20:20 sena_kun joined 21:09 clarjon1 joined 21:25 neshpion joined 21:32 melezhik left 21:35 a3r0 left 21:44 Util joined 21:55 neula left 22:09 Altai-man joined 22:13 Kaipi left 22:14 Kaipi joined 22:19 Kaipi left, Kaipi joined 22:23 Merfont joined 22:24 Kaipi left 22:27 Merfont left 22:30 sono joined 22:32 Kaiepi joined
[Coke] now has a UPS, thanks whoever mentioned that. 22:34
moon-child nice! 22:35
Geth doc: 191fe4bd4a | Coke++ | util/clean-spell
Run tests in chunks, not for everything

Set a chunk size for # of files, and fail if any of the chunks fail. This allows us to fail faster in many cases.
If there's a partial chunk, run it first, with the thought that we can do less and fail slightly faster.
22:38
doc: 0afc84d618 | Coke++ | util/clean-spell
Only check word matches

We originally checked any match, but it can be very slow (e.g.
  "ents" is used, which has > 100 matches if we don't try word boundary)
  "ents" is used, which has > 100 matches if we don't try word boundary)
Slightly larger risk of false positives, so be sure to do the post-check.
doc: b3d4cec53d | Coke++ | lib/Pod/Cache.rakumod
remove diagnostic output
23:24 Altai-man left