🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
00:46 jpn left 01:28 lizmat_ joined 01:32 lizmat left 02:42 hulk joined 02:43 kylese left 03:15 hulk left, kylese joined 03:30 kylese left 03:33 kylese joined 06:41 samebchase left 06:46 samebchase joined 07:26 Xliff left 07:37 jpn joined 08:47 Sgeo left 09:02 jpn left 09:37 lizmat_ left, lizmat joined 09:48 CIAvash joined 10:08 CIAvash left 10:09 CIAvash joined 10:13 CIAvash left, jpn joined 10:18 jpn left 10:23 abraxxa-home joined 11:50 eseyman_ is now known as eseyman 15:02 jpn joined 15:07 jpn left 15:31 sdfgsdfg left 15:48 jpn joined 15:52 jpn left 16:08 dakkar joined
tbrowder__ anyone ever use quickemu to run win and macos on linux? 16:30
saw a youtube channel showing it, looks very cool for helping pot 16:31
*port raku to windows in particular
see github.com/quickemu-project/quickemu 16:35
.tell leont see my new PR for YAMLish 16:50
tellable6 tbrowder__, I'll pass your message to leont
[Coke] m: class P { has $.f = False}; my $a=P.new; $a.f=True; 17:04
camelia Cannot modify an immutable Bool (False)
in block <unit> at <tmp> line 1
[Coke] ah, missing is rw.
17:04 jpn joined
antononcube @Coke I good meme could be "raw coke". 17:05
weekly: rakuforprediction.wordpress.com/20...ormations/ 17:06
notable6 antononcube, Noted! (weekly)
17:09 jpn left 17:17 sena_kun joined 17:21 dakkar left
leont tbrowder__: is windows CI usable enough right now to actually add? I've been having some bad experiences with it 17:31
tellable6 2024-02-17T16:50:00Z #raku <tbrowder__> leont see my new PR for YAMLish
17:31 amenonsen left 17:32 amenonsen joined
ugexe tbrowder__: fwiw re CI: it will always be faster to do the testing via `zef install .` than `zef test . && zef install . --/test` 17:33
the former will only need to precompile once, whereas the second has to precompile twice due to `zef test .` not using a staging repo 17:34
further, you should always install the module being tested as part of CI tests, not just run `zef test .` 17:35
so in all of your examples i would change `run: zef --debug test .` to `run: zef --debug install .` 17:36
18:06 jpn joined 18:10 jpn left 18:34 vlad joined 18:49 Sgeo joined 19:24 derpydoo joined 19:39 jpn joined 19:48 jpn left 20:02 jpn joined 20:08 vlad left 20:11 jpn left 20:17 MasterDuke joined 20:22 Xliff joined
Xliff \o 20:22
m: multi sub trait_mod:<is> (Attribute:D $a, :$bleah) {
camelia ===SORRY!=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> ait_mod:<is> (Attribute:D $a, :$bleah) {⏏<EOL>
Xliff m: multi sub trait_mod:<is> (Attribute:D $a, :$bleah) { $a.package.^methods.map( *.name ).gist.say }; class A { has $!a is bleah }; A.a.new.say 20:23
camelia ()
No such method 'a' for invocant of type 'A'
in block <unit> at <tmp> line 1
Xliff m: multi sub trait_mod:<is> (Attribute:D $a, :$bleah) { $a.package.^methods.map( *.name ).gist.say }; class A { has $.a is bleah }; A.a.new.say
camelia ()
Cannot look up attributes in a A type object. Did you forget a '.new'?
in method a at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff ????
^^ lizmat nine [Coke]
lizmat m: m: multi sub trait_mod:<is> (Attribute:D $a, :$bleah) { $a.package }; class A { has $.a is bleah }; 20:25
camelia ( no output )
lizmat m: m: multi sub trait_mod:<is> (Attribute:D $a, :$bleah) { $a.package.^methods }; class A { has $.a is bleah };
camelia ( no output )
lizmat m: m: multi sub trait_mod:<is> (Attribute:D $a, :$bleah) { $a.package.^methods.map(*.name) }; class A { has $.a is bleah };
camelia ( no output )
lizmat m: m: multi sub trait_mod:<is> (Attribute:D $a, :$bleah) { say $a.package.^methods.map(*.name) }; class A { has $.a is bleah }; 20:26
camelia ()
Xliff lizmat: Yeah, that's the other odd outcome.
lizmat m: multi sub trait_mod:<is> (Attribute:D $a, :$bleah) { $a.package.^methods.map(*.name).gist }; class A { has $.a is bleah };
camelia ( no output )
lizmat m: multi sub trait_mod:<is> (Attribute:D $a, :$bleah) { $a.package.^methods.map(*.name).gist.say }; class A { has $.a is bleah };
camelia ()
lizmat m: multi sub trait_mod:<is> (Attribute:D $a, :$bleah) { $a.package.^methods.map( *.name ).gist.say }; class A { has $.a is bleah }; 20:27
camelia ()
lizmat m: class A { has $.a }; A.a
camelia Cannot look up attributes in a A type object. Did you forget a '.new'?
in method a at <tmp> line 1
in block <unit> at <tmp> line 1
lizmat Xliff: that's your issue
m: multi sub trait_mod:<is> (Attribute:D $a, :$bleah) { $a.package.^methods.map( *.name ).gist.say }; class A { has $.a is bleah }; A.new.a.say 20:28
camelia ()
(Any)
lizmat A.new.a instead of A.a.new
Xliff m: multi sub trait_mod:<is> (Attribute:D $a, :$bleah) { $a.package.^methods.map( *.name ).gist.say }; class A { has $.a is bleah; method b { }; method c { } }; A.new.a.say
camelia ()
(Any)
Xliff lizmat: Sure about that? 20:29
lizmat: Shouldn't the output be "b, c"?
lizmat the traitmod is run at compile time 20:30
m: multi sub trait_mod:<is> (Attribute:D $a, :$bleah) { $a.package.^methods.map( *.name ).gist.say }; class A {method b { }; method c { }; has $.a is bleah }; A.new.a.say 20:31
camelia (b c)
(Any)
lizmat the methods weren't known yet, as they were defined *after* the traitmod ran
Xliff Ahh! OK.
That... sucks. 20:32
m: multi sub trait_mod:<is> (Attribute:D $a, :$bleah) { INIT $a.package.^methods.map( *.name ).gist.say }; class A { has $.a is bleah; method b { }; method c { } }; A.new.a.say 20:34
camelia (b c a BUILDALL)
(Any)
Xliff AHAH!
m: multi sub trait_mod:<is> (Attribute:D $a, :$bleah) { INIT $a.package.^methods.map( *.name ).gist.say }; class A { has $.a is bleah; method b { }; method c { } }; A.new
camelia (b c a BUILDALL)
Xliff OK, so my initial thought of using INIT was valid, but I was getting nothing for .^methods. 20:35
m: my @a; multi sub trait_mod:<is> (Attribute:D $a, :$bleah) { INIT @a = $a.package.^methods.map( *.name ) }; class A { has $.a is bleah; method b { }; method c { } }; @a.gist.say
camelia [b c a BUILDALL]
tbrowder__ ugexe: will do, thnx 20:43
leont: i get good tests on windows for some modules. but i like to always show the windows test results to let interested windows ppl file an issue and show them we care about windows 20:47
ugexe: you do the same for linux and macos? 20:49
zef --debug install . <== for all OSs? 20:51
20:53 sena_kun left
tbrowder__ .tell leont the windows test is showing green on my PR 20:53
tellable6 tbrowder__, I'll pass your message to leont
tbrowder__ i.e., it is passing 20:54
leont No need to .tell, I will see it if you mention my name ;-) 20:58
tbrowder__ ok 20:59
ok, i have to advertise Compress::PDF for being a cool module. Thanks to Ghostscript, compress-pdf just compressed 2 scans of newspaper clippings from 9.4M tp 249K and 7.9M to 206K, all at the command line 21:23
antononcube @tbrowder Can it be used for other types of files. For example, the supporting data for Geographics packages tend to be (and become) quite large. 21:25
aruniecrisps sorry to rehash this questionagain but does anyone have an example of a cro application using Red broken up into multiple files? 21:27
tbrowder__ no, it's just a pdf compressor, but pdf docs are all over our internet use for pictures and records and such. i just hugely reduced the size of my tax statements from my bank and such. 21:30
and gzip seems not to do much compression on pdf 21:32
nor does xz 21:33
i think the secret is Ghostscript deletes all the unused font chars in a pdf, and modern font files like opentype and truutype are quite large in total 21:37
antononcube: have you tried xz? 21:38
i think that's supposed to be one of the best gp compression utils around 21:39
antononcube @tbrowdedr Is this a Raku package? 21:55
21:57 chemitz joined
chemitz  my uint64 $a = 9223372036854775808;my uint64 $b = 5919231096550412837; print $a +^ $b; # -3304140940304362971 21:57
evalable6 -3304140940304362971
chemitz That can't be right?
actually for comparison: 22:00
 my $a = 9223372036854775808;my $b = 5919231096550412837; print $a +^ $b; # 15142603133405188645
evalable6 15142603133405188645
gfldex m: my uint64 $a = 9223372036854775808;my uint64 $b = 5919231096550412837; say ($a, $b, ($a +^ $b))».&{ .base(2), .WHAT }; 22:26
camelia ((1000000000000000000000000000000000000000000000000000000000000000 (Int)) (101001000100101010101010101001000100101010101010101001000100101 (Int)) (-10110111011010101010101010110111011010101010101010110111011011 (Int)))
22:26 chemitz left
gfldex m: my uint64 \a = 9223372036854775808;my uint64 \b = 5919231096550412837; say (a, b, (a +^ b))».&{ .base(2), .WHAT }; 22:26
camelia Type check failed in binding; expected uint64 but got Int (9223372036854775808)
in block <unit> at <tmp> line 1
gfldex m: my uint64() $a = 9223372036854775808;my uint64() $b = 5919231096550412837; say ($a, $b, ($a +^ $b))».&{ .base(3), .WHAT }; 22:28
camelia Cannot find method 'is_dispatcher' on object of type BOOTCode
in block <unit> at <tmp> line 1
gfldex Rakudo doesn't really know about native types. So it can't DWIM here.
m: unit64.HOW.say; 22:30
camelia ===SORRY!=== Error while compiling <tmp>
Undeclared routine:
unit64 used at line 1
gfldex m: uint64.HOW.say;
camelia Perl6::Metamodel::NativeHOW.new
22:40 jpn joined 22:47 jpn left
tbrowder__ antononcube: yes, Compress::PDF is a raku pkg, but it requires system ps2pdf to be installed 22:49
no build provided yet 22:50
antononcube I see -- thanks! 22:52
ugexe tbrowder__: yes i would use `zef install .` for all OSes, and in fact it is less likely to encounter the windows path length issues than `zef test .` 23:03
tbrowder__ cool! i'm on it 23:07
leont: i change the owner names in the PR
23:07 jpn joined 23:12 jpn left 23:37 jpn joined 23:42 jpn left