🦋 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.
melezhik2 I've just added my comment to the latest Rakudo release - mybf.io/project/Rakudo/reviews#mel...1635034626 , if someone has something to say - you can reply to the same thread 03:35
andinus is there a way to get all combinations with repetition? 06:57
i want all possible combinations of throw 2 dices
m: (1..6).combinations: 2
camelia ( no output )
andinus m: say (1..6).combinations: 2
camelia ((1 2) (1 3) (1 4) (1 5) (1 6) (2 3) (2 4) (2 5) (2 6) (3 4) (3 5) (3 6) (4 5) (4 6) (5 6)) 06:58
andinus i could use permutations, but how do i ask it to pick only two elements from the list? it seems to permute over the whole thing
say (1..6).permutations 06:59
m: say (1..6).permutations
camelia ((1 2 3 4 5 6) (1 2 3 4 6 5) (1 2 3 5 4 6) (1 2 3 5 6 4) (1 2 3 6 4 5) (1 2 3 6 5 4) (1 2 4 3 5 6) (1 2 4 3 6 5) (1 2 4 5 3 6) (1 2 4 5 6 3) (1 2 4 6 3 5) (1 2 4 6 5 3) (1 2 5 3 4 6) (1 2 5 3 6 4) (1 2 5 4 3 6) (1 2 5 4 6 3) (1 2 5 6 3 4) (1 2 5 6 4 3…
SmokeMachine m: say (1..6) X (1..6) 07:45
camelia ((1 1) (1 2) (1 3) (1 4) (1 5) (1 6) (2 1) (2 2) (2 3) (2 4) (2 5) (2 6) (3 1) (3 2) (3 3) (3 4) (3 5) (3 6) (4 1) (4 2) (4 3) (4 4) (4 5) (4 6) (5 1) (5 2) (5 3) (5 4) (5 5) (5 6) (6 1) (6 2) (6 3) (6 4) (6 5) (6 6))
SmokeMachine andinus: something like that ^^ ? 07:47
Anton Antonov I mentioned this yesterday— I have hard time doing development work with Raku on macOS Monterey. `zef` and `prove6` do not work. Trying to compile them from sources hangs. Compiling and installing `moar-blead` with `rakubrew` also hangs. 09:41
lizmat Anton Antonov: sorry to hear that. 09:46
I'm stuck on Mojave for several reasons, so can't be of much service :( 09:47
OOC, is this on an M1 ?
El_Che Anton Antonov#7232: have you tried homebrew? Last time I checked it had raku binaries 09:48
(and formulas)
solitario 5 10:01
Anton Antonov @lizmat No, it is on a Intel-processor MacBook Pro. 10:42
@E_Che I tried `homebrew` — I can run Raku. I cannot do much software development with it. (On macOS Monterey.) 10:43
lizmat Anton Antonov: perhaps start with gisting the output of `perl Configure.pl --gen-moar` ? 10:46
Anton Antonov @lizmat Ok. I will try that. (Later today.) 10:47
I have to say I see these problems as my fault — I should have not rushed upgrading to macOS Monterey… 10:48
El_Che Can't upu install zef from homebrew of kickstarted with the homebrew raku? 11:08
lizmat Anton Antonov: fwiw, I've come to the conclusion I won't upgrade MacOS anymore 11:11
after Catalina destroyed all of my videos / audio workflows 11:12
so the one machine I had upgraded, I had to downgrade to Mojave at great expense and weeks of work :-(
El_Che lizmat: how did an OS update do that? They killed previously bundled applications? 11:30
lizmat killed iPhoto for one 11:34
and with no viable upgrade path
they *do* provide an upgrade path, but after it had been busy on my photo database for a **WEEK**, I killed the orocess 11:35
and that was the 3rd try
El_Che I read they introduces an app called photos 11:36
lizmat yes, and the conversion program does not run to completion :-( 11:37
so: iPhoto is capable of handling my photo database (20+ years of *many* pictures), but Photos is not
I'm sure it has many nice new features :-( 11:38
yes, I'm disappointed in Apple
El_Che that's a big archive to catalogue again, indeed 11:43
lizmat well, I would understand that it could take a long time to convert 11:53
but after a week it just sits around doing nothing (0.1% CPU) 11:54
so I guess the conversion program gets in some sort of deadlock and never recovers
[Coke] is reminded to update github.com/coke/scripts/blob/master/sw_hist so he can double check and say "I'm only on 11.x, sorry" 12:06
I was one of several people pondering getting an updated mac, but it's a huge investment cost and I'm not feeling great about it. (liz's story a contributing factor) 12:07
lizmat yeah, for the first time in ~20 years, I'm seriously considering not having an MBP for my next notebook 12:09
jast there's a lot of value in using open source software for this kind of thing (if the software in question covers your use case, which isn't always a small "if")... 12:15
lizmat jast: yes, I was going for convenience... 12:19
if you want something done well, you have to do it yourself :-)
jast true way too often, unfortunately
andinus SmokeMachine: that works, thank you :)
[Coke] lizmat: did you see the new mbp has the notch in the menu bar for the camera (like the 11 model iphone) and things render behind the camera? 12:21
El_Che I saw rending beneath
menus and the like
lizmat no 12:22
won't be looking at a new notebook until sometime next year anyway
El_Che my main machine is a linux, but the mac I have for testing stuff is getting slow (air) 12:24
I thought, let's try to get a mbp 16
and then I saw the notch
I know it would bother me to no end 12:25
ugexe they must have assumed everyone puts tape there anyway
El_Che ugexe: lol
twitter.com/SnazzyQ/status/1453143...59968?s=20 12:31
[Coke] Do brew or macports provide a way to test things out on the new OSes? 12:39
Anton Antonov El_Che — thanks for sharing 🙂 12:57
El_Che I tried the jump start from Big Sur partition of my laptop -- worked to a point. I will try jump start using `homebrew` installations. 13:05
El_Che I agree the notch on new MacBoo Pros is a deal breaker. 13:26
Nemokosch being a Mac itself is a deal breaker 14:29
melezhik I've implemented a simple notification system in mybfi - mybf.io/article/Formatting , if use `@user` in comment/reply/review a respect user will get notification via their account on mybfio ... 18:02
melezhik if someone help me to test this, it'd be cool ... thanks 18:03
Anton Antonov I am looking for suitable symbol to represent missing values or not-available values when manipulating datasets. I considered Whatever, but that is too generic (and hints multiple possible interpretations or actions.) Any other suggestions? Should I just make suitable simple classes that inherit from Mu? 18:49
lizmat Nil 18:54
is what you're looking for 18:55
docs.raku.org/type/Nil
thundergnat NOTABUG, but certainly LTA; and it confused the heck out of me for about 20 minute before I figured out what was going on. 19:35
m: say 123.comb.Bag, ' | ', <1 2 3>.Bag, ' | 123.comb.Bag eqv <1 2 3>.Bag? ', 123.comb.Bag eqv <1 2 3>.Bag;
camelia Bag(1 2 3) | Bag(1 2 3) | 123.comb.Bag eqv <1 2 3>.Bag? False
thundergnat I wonder if we should mention that on the Bag docs? Or at least in the Traps section?
That wasn't a bug; but I believe that this _is_. 19:37
m: say "Wat...\nNegative numbers should never be considered prime, even if the absolute value is!!"; my @n = (0 .. 500); say "{-$_} is prime??" if (-$_).is-prime for @n;
camelia Wat...
Negative numbers should never be considered prime, even if the absolute value is!!
-5 is prime??
-17 is prime??
-65 is prime??
-99 is prime??
-107 is prime??
-135 is prime??
-153 is prime??
-185 is prime??
-209 is prime??
thundergnat m: say "\nSome negative numbers are considered prime even if the absolute value isn't!!"; say "Negative \"primes\"?? ", my @m = (0...-500).grep: &is-prime; say "Negative {-$_} is prime??" unless (.abs).is-prime for @m; 19:37
camelia
Some negative numbers are considered prime even if the absolute value isn't!!
Negative "primes"?? [-5 -17 -65 -99 -107 -135 -153 -185 -209 -267 -299 -315 -353 -369 -387 -419 -467 -483]
Negative 65 is prime??
Negative 99 is prime??
Negative …
MasterDuke thundergnat++ that's my bad 19:45
lizmat m: use nqp; dd nqp::isprime_I(-5) # underlying issue 19:47
camelia 1
lizmat MasterDuke: should that be fixed in MoarVM or in Rakudo? 19:47
MasterDuke i'm testing a moarvm fix now
passes a spectest 19:48
thundergnat Should I file an issue? Seems like you already have a fix in progress. 19:53
MasterDuke github.com/MoarVM/MoarVM/pull/1587 19:54
Anton Antonov @lizmat I will try Nil -- thanks! 20:56
Nemokosch I don't think negative primes would be a problem per se, there are pretty sensible definitions for that 21:27
although -65 or -99 shouldn't be prime numbers under any circumstances
[Coke] (file a bug for negative prime) I think there should be a bug, yah. Then if someone finds the issue in a pre-released version, they can see it's fixed in a future release. 22:52
and we can refer to the bug in the commit message as well.