🦋 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.
00:01 perlbot joined 00:02 simcop2387 joined, Skarsnik left, reportable6 left 00:05 reportable6 joined 00:07 dextercd left 00:40 patrickb left, patrickb joined 01:19 joel7 joined 01:33 joel7 left 01:43 swaggboi left 01:48 joel51 joined 01:49 joel51 left 01:51 evalable6 joined 02:07 swaggboi joined 02:08 patrickb left 02:35 monkey_ joined 02:49 hlafarge joined 02:55 hlafarge left
xinming releasable6: status 03:23
releasable6 xinming, Next release will happen when it's ready. 4 blockers. Changelog for this release was not started yet
xinming, Details: gist.github.com/53ca827aeacb71d80c...040a1d151a
03:55 releasable6 left, evalable6 left, linkable6 left 03:56 evalable6 joined 04:30 mujo joined 04:35 squashable6 left 04:56 linkable6 joined 04:58 releasable6 joined 05:28 monkey_ left 05:48 frost joined 05:49 frost left 05:55 frost joined 06:03 reportable6 left 06:04 reportable6 joined 06:56 frost left 07:32 seednode left 07:33 seednode joined 08:33 evalable6 left, linkable6 left 08:34 linkable6 joined 09:05 MoC joined 09:26 squashable6 joined 09:33 evalable6 joined
Geth raku-mode: 977b14a7c1 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | README.md
Fix flycheck Raku reference
10:07 mujo left 10:27 Xliff joined 10:31 Sgeo left 11:00 abraxxa-home joined 11:06 MoC left 12:02 reportable6 left 12:05 reportable6 joined 12:45 abraxxa-home left 13:06 Skarsnik joined 13:27 A26F64 joined 13:48 dextercd joined 14:46 patrickb joined 14:48 Colt left
Kaiepi weekly: twitter.com/Mrofnet/status/1462433612637384724 14:57
notable6 Kaiepi, Noted! (weekly)
14:57 Guest12 joined, Guest12 left 15:11 monochromec joined 15:21 monochromec left 16:21 evalable6 left, linkable6 left 16:22 evalable6 joined
tib Hello, the Raku Quizz (that I ran during the ephemeral miniconf): dev.to/thibaultduponchelle/the-eph...quizz-10jh :) 16:35
Voldenet >what is wrong about moarvm >it uses reference counting 16:45
I know what this means, but I know how this could be interpreted
moon-child haha 16:46
Skarsnik m: sub foo {return Hash}; my %hash = foo(); 16:52
camelia Cannot look up attributes in a Hash type object. Did you forget a '.new'?
in block <unit> at <tmp> line 1
Skarsnik not sure that is a good error message. (not even sure if it's an error ?) 16:53
tib (sorry Voldenet I shortened the question without noticing this, I edit it right now) 16:55
Voldenet m: sub foo {return Hash.new}; my %hash = foo(); 16:57
camelia ( no output )
Voldenet error message hints how to fix it, not that bad 16:58
moon-child m: sub foo { Hash }; my %hash := foo 16:59
camelia ( no output )
Skarsnik The issue if you have this in code, it fail on the assignment. Took me a while to figure that it was because foo was return Hash
moon-child Voldenet: ^
17:00 skaji left
Skarsnik (was working with old raku thou x)) 17:00
17:00 SmokeMachine left
tib Voldenet fixed -> What is "not true" about MoarVM? 17:01
Voldenet tib: sounds a lot better
17:07 mjgardner left, patterner_ left
timo you could makethe case that tracing GC is kind of sort of a little bit valid as "reference counting", since you count references to things, but also you only have 0 or 1 as counts, and you count all references there are, and not continuously, but every now and then ... 17:11
17:11 leont left, rjbs left
moon-child yes, 'unified theory of gc' or some such 17:12
timo byte string theory
moon-child argues gc vs rc is a continuum; esp. barriers
timo i think "deferred reference counting" is already a thing that exists? but apart from that name i don't know anything
moon-child Yeah. Don't do all the work up-front; push the object whose rc is to be decremented on a queue and then do some work on the queue when you have to. Goal is to avoid pauses 17:13
also rc systems with periodic tracing for cycle elimination cf python 17:14
17:22 pjlsergeant left 17:23 zostay left, kawaii_ left, tbrowder left, ecocode__ left 17:24 linkable6 joined, PotatoGim left
timo tracing gc is kind of like adding every object ever into a big random-accessed queue, then later deciding which objects aren't actually supposed to be in the to-be-freed queue 17:26
which ... is there a difference, really? :D 17:27
17:34 A26F64 left 17:45 monkey_ joined 18:02 reportable6 left
Skarsnik Ok, this is probably a weird question, but if I do class B is A does R {}; how can I get the base type (A) when having B ? 18:06
moon-child m: class A {}; role R {}; class B is A does R {}; say B.^mro 18:07
camelia ((B) (A) (Any) (Mu))
Skarsnik class A{}; role R {}; class B is A does R {}; say B.^isa(A) 18:10
evalable6 1
Skarsnik should this return True or False 18:11
m:class A{}; role R {}; class B is A does R {}; say B.isa(A)
evalable6 True
Xliff If we 'require' can we then 'import'? 18:16
If not, what's the proper mechanism for dyhnamically loading packages?
Skarsnik You probably can't? 18:17
I used to do this in Perl 5 to reload code x)
Xliff I know. That's a bit of a disappointment. 18:18
s/pp/p/ ?
18:23 mu joined 18:24 mu left, mae joined
Skarsnik Why I stumble upon the weirdest error xD 18:43
A line like that (qdb data is its own type and build returns explictly the same type) $!_qdb-data = build-qdorm-data(self.^parents[0]) unless self.^parents.elems == 0; get me Cannot look up attributes in a StorableStory type object. Did you forget a '.new'. This does not happen if I remove the affection. StorableStory is the name if class composed of the Role I am doing. 18:46
I don't even understand why the StorableStory type is invoked here aside the self 18:50
Oh wait, I kinda know why, The Object itself does not exists (no new) so I can't write an attribute 18:51
18:54 leont joined 18:56 mjgardner joined 18:58 monkey_ left 18:59 patrickb left 19:00 rjbs joined, patterner_ joined 19:05 pjlsergeant joined 19:06 zostay joined, tbrowder joined, SmokeMachine joined, PotatoGim joined 19:08 kawaii_ joined 19:09 skaji joined 19:10 ecocode__ joined 19:14 monkey_ joined 19:31 mae left 19:52 sm1 joined
Skarsnik not sure if it's possible to have a better error thou, like "Trying to use an attribute outside an instancied Object of MyClass" 19:57
20:04 reportable6 joined 20:12 monkey_ left
Xliff WTCF? 20:15
Um. SELECT MD5(<TEXT>) in MySQL does not match "use Digest::MD5; $d.md5_hex(<SAME TEXT>)" 20:16
Does anyone know the difference between utf8 and utf8mb4 20:22
jdv dha++ 20:30
Xliff Nope. It's not charset. 20:31
Juerd Xliff: md5_hex is not a method. You're getting the md5 of the stringified object. 20:36
That is, assuming you meant $d->md5_hex instead of $d.md5_hex 20:37
Oh, er, I'm thinking Perl.
jdv i still have a "Perl 5" tshirt. those were the days;) 20:39
yapc 12 maybe?
timo Xliff: compare it with the md5sum commandline tool? also make sure to echo -n so it doesn't have an extra newline? 20:42
Xliff Thanks, all. I just dropped the trigger and am having raku doign all the work, for now. 20:49
20:51 Sgeo joined
SmokeMachine Does it make more sense now with this new example on README.md? twitter.com/smokemachine/status/14...88000?s=20 20:57
Sorry, I meant this: github.com/FCO/RedFactory 20:58
21:51 evalable6 left, linkable6 left, monkey_ joined 21:53 evalable6 joined 21:55 Zippy joined
Zippy Hi all, 21:56
Can one use the zip operator with a function pointer?
gfldex Zippy: Not directly. You have to go through a Seq. 21:58
Zippy Please can you give an example? 21:59
gfldex m: sub subby { gather loop { take $++ } }; say 1,2,3 Z subby;
camelia ((1 0) (2 1) (3 2))
gfldex replace `take $++` with your function body.
Zippy Thank you! 22:00
gfldex You are welcome!
Zippy And why does: 'foo'.split("").map(*.ord) produce a Nil on either side? 22:01
Is it like C-strings? To delimit the start/end and so help loop termination? 22:02
gfldex m: 'foo'.comb.map(*.ord).say;
camelia (102 111 111)
Zippy m: 'foo'.split("").map(*.ord)
camelia ( no output )
Zippy I'm on 2021.04, and I get: (Nil 102 111 111 Nil) 22:03
gfldex m: 'foo'.split("").map(*.ord).say 22:04
camelia (Nil 102 111 111 Nil)
gfldex m: 'foo'.split("", :skip-empty).map(*.ord).say
camelia (102 111 111)
22:44 joel-burton joined
joel-burton Hi, all. I'm a comp sci teacher and am trying to experiment with Raku but am finding it difficult to get a working installation. Is this an appropriate place to ask for some installation help? 22:45
moon-child yes
22:46 Colt joined
joel-burton thanks, moon-child. I have a new MacBook Pro M1 (running Monterey version of MacOS). I've tried to install Raku a few ways: 22:46
Xliff joel-burton: Have you tried rakudo.org/star/macos? 22:47
joel-burton 1. At Rakudo's website, installed their dmg for Rakudo-star. This gave me a working "Raku", but it's compiled for Intel, not ARM (they don't seem to have a package for ARM). What I got works, but it doesn't include zef. And, given the battery kill of Rosetta, I'd rather have it native. Leading to ... 22:48
2. At Rakudo's website, installed their binaries for Rakudo (no star). They have ARM binaries there, and they work, but no zef (and probably other things missing, too). I found zef at GitHub, but it hangs for me in their installation process. 22:49
moon-child install is quite slow. Give it some time
Xliff joel-burton: If you want to compile for native, then you can use rakubrew.org/
Two commands:
1) rakubrew build moar
2) rakubrew build-zef
joel-burton 3. Installed Rakudo star from Home-brew. That installed easily (and is ARM). When I start up "Raku", though, I get no REPL prompt. However, I can run my Raku scripts fine. Zef is included (yay!) but it hangs on commands: `zef --debug info Readline` has been running for 30 minutes without so much as a peep. 22:50
@moon-child: I let zef's install run for ~20 mins. is that not an appropriate time? (I have a very fast network in my office here) 22:51
Xliff: I don't mind compiling; I compile lots of things and have a working toolchain. Happy to look into rakubrew.
moon-child hmm, well, that is maybe a bit long! :)
joel-burton I can get a working Raku via docker (which is ok), but it's always nice to get something on my computer itself. 22:53
(and, just as a side-note: I was a pretty serious perl5 user long ago, and am very impressed with the language features of Raku. I don't know that I'll get to teach it, but it's great to have a language to show students with interesting features. Thanks for your work on it!) 22:54
(trying rakubrew now, Xliff) 22:57
Xliff joel-burton: Good luck! 22:59
MasterDuke joel-burton: fyi, some other people have had problems with monterey 23:09
joel-burton new versions of MacOS are always basically beta, MasterDuke :-|
and I say that having been an engineer at apple ;-) 23:10
ugexe joel-burton: seems to be something to do with Monterey
MasterDuke colabti.org/irclogger/irclogger_lo...xt=checked
joel-burton rakubrew gave me a working Raku (x86 rather than ARM, but that's ok). but it hangs during the zef compilation (which is what it did when I tried to install it against the Rakudo-star from the website, too). I suspect this is the same problem other people are having with Monterey. 23:15
ok. I'll work with it via docker (the Rakudo-star image works fine, zef and all). I'll figure out how to get comma to use that ;-) 23:16
thanks, all. I appreciate your effort.
23:33 joel-burton left 23:42 dextercd left 23:53 linkable6 joined