🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
00:03 pilne joined 00:04 oneeggeach joined, p6steve joined 00:09 p6steve left 00:35 rbt left 00:36 rbt joined 00:42 lucasb left 00:46 farcas1982regreg joined 00:50 sena_kun joined 00:51 mike_s left 00:52 Altai-man_ left, oneeggeach left, benlittle left 00:53 benlittle joined
benlittle p6: react { 00:54
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3react {7⏏5<EOL>
benlittle with Proc::Async.new: « echo "hello world" », :out {
whenever .stdout { say "stdout: ", .say }
whenever .start {}
p6: react { with Proc::Async.new: « echo "hello world" », :out { whenever .stdout { say "stdout: ", .say } whenever .start {} } } 00:55
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3henever .stdout { say "stdout: ", .say }7⏏5 whenever .start {} } }
benlittle p6: react { with Proc::Async.new( « echo "hello world" », :out) { whenever .stdout { say "stdout: ", .say } whenever .start {} } } 00:56
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3henever .stdout { say "stdout: ", .say }7⏏5 whenever .start {} } }
benlittle p6: react { with Proc::Async.new: « echo "hello world" », :out { whenever .stdout { .say }; whenever .start {}; } } 00:59
camelia hello world
01:51 aindilis joined 01:59 cognominal joined 02:02 cognomin_ left 02:05 p6steve joined 02:06 riatre joined, finsternis joined, cpan-raku left 02:07 cpan-raku joined, cpan-raku left, cpan-raku joined 02:10 p6steve left 02:15 stoned75 left 02:16 stoned75 joined 02:22 Itaipu joined 02:25 stoned75 left 02:31 stoned75 joined 02:41 Itaipu left 02:44 Itaipu joined 02:49 Altai-man_ joined 02:51 sena_kun left
Demos[m] is there a way to get ahold of a c++ style member function pointer in raku (a callable that needs an invocant to be called) 02:56
03:17 molaf joined
cpan-raku New module released to CPAN! Test::Async (0.0.5) by 03VRURG 03:18
03:28 pilne left 03:29 melezhik left 04:10 hungrydonkey joined
guifa2 Demos[m]: there is I believe but I've not used enough NativeCall to tell you how 04:12
Demos[m] I don't want an actual c++ member fn ptr 04:15
just something that works kinda like that in raku
04:16 hungrydonkey left
Demos[m] to use instead of $obj."$methodname"() 04:16
04:17 aborazmeh left 04:22 stoned75 left 04:23 stoned75 joined 04:29 hungrydonkey joined 04:30 molaf left 04:50 sena_kun joined 04:52 Altai-man_ left 05:16 sauvin joined 05:20 hungrydonkey left
Demos[m] how do I write a Set (or SetHash) that only accepts strings as members? 05:23
06:02 p6steve joined 06:06 p6steve left 06:12 stoned75 left 06:13 stoned75 joined 06:15 andrzejku joined
Demos[m] what's the nicest way to add a parameter to all my main multi subs? 06:18
06:21 squashable6 left 06:23 squashable6 joined 06:43 sjm_uk joined
moritz depends on what you need to do with it 06:48
maybe the simplest is to simply add it to all candidates
if it's just one central action, it may be possible to do it in a proto, but I have no idea if that interferes with the introspection into the multi signatures 06:49
06:49 Altai-man_ joined 06:52 sena_kun left 07:15 pecastro joined 07:16 stoned75 left, stoned75 joined 07:22 rindolf joined 07:28 lgtaube joined 07:33 abraxxa left 07:36 dakkar joined 07:45 rindolf left 07:51 abraxxa joined 07:55 abraxxa left 07:56 abraxxa joined 08:03 p6steve joined 08:08 p6steve left 08:09 rindolf joined 08:26 natrys joined 08:34 Ven`` joined 08:37 farcas1982regreg left
Altreus Manifest0: you could use a trait mod maybe? 08:38
my Str $x is max-len(10)
08:38 farcas1982regreg joined
Altreus is intlike 08:39
08:45 AlexDaniel left 08:47 Kaeipi joined, Kaiepi left 08:50 sena_kun joined 08:52 Altai-man_ left 09:11 xelxebar_ joined, xelxebar left 09:21 kensanata joined 09:22 kensanata left 09:23 kensanata joined 09:26 Black_Ribbon left 09:29 pecastro left, pecastro joined 10:04 p6steve joined 10:05 titsuki joined 10:08 p6steve left 10:09 aborazmeh joined, aborazmeh left, aborazmeh joined 10:31 rindolf left, wbn left 10:32 wbn joined 10:46 titsuki left 10:49 Altai-man_ joined 10:52 sena_kun left 10:56 natrys left 10:58 rindolf joined 11:09 natrys joined 11:10 ensamvarg2 joined 11:13 chloekek joined
elcaro Altreus: Seems like a perfect fit for a Proxy 11:13
see my accepted answer to a similar question here: stackoverflow.com/questions/552507...c-in-perl6 11:14
in fact you could make a generalized `valid` sub that acceps a validator function, and returns a Proxy that validates against that fuction in the STORE method or throws/dies 11:15
moritz are you trying to reinvent subset types? 11:16
m: subset SmallerTen of Int where * < 10; my SmallerTen $x = 5; $x = 20; 11:17
camelia Type check failed in assignment to $x; expected SmallerTen but got Int (20)
in block <unit> at <tmp> line 1
11:19 rindolf left 11:23 girafe joined
lizmat m: my %s is Set[Str] = <a b c>; dd %s # Demos[m] 11:24
camelia Set[Str].new("b","c","a")
lizmat m: my %s is Set[Str] = 1,2,3; dd %s 11:25
camelia Type check failed in binding; expected Str but got Int (1)
in block <unit> at <tmp> line 1
Demos[m] lizmat: ah that triggers a rakudo bug in my copy of rakudo
(the latest rakudo star)
lizmat yeah, parameterization of QuantHashes is relatively recent
Demos[m] what does dd do? 11:26
moritz m: my Int $x = 42; dd $x
camelia Int $x = 42
Demos[m] oh, found it
elcaro moritz: yeah, good point... Proxy's are mainly useful when you want to attach additional logic around STORE or FETCH
lizmat basically: note @args>>.raku
moritz Demos[m]: it prints out stuff for debugging
Demos[m] but can I use it to format my hard disk? 11:29
El_Che sure, surround it with shell() :) 11:33
moritz with enough creativity, everything is possible
11:34 chloekek left
El_Che so, darlings, how is the JIT support on ARM going: www.bloomberg.com/news/articles/20...ng-in-2021 11:36
lizmat El_Che: yeah... interesting... :-( 11:45
11:46 raschipi joined
raschipi releasable6, status 11:50
releasable6 raschipi, Next release will happen when it's ready. 5 blockers. 166 out of 345 commits logged (⚠ 3 warnings)
raschipi, Details: gist.github.com/d129a05a824bd2ac31...5c3f6c68f6
12:02 k-man_ left 12:05 p6steve joined 12:06 k-man_ joined 12:09 p6steve left 12:10 rbt left 12:11 rbt joined
El_Che lizmat: the day apple made the awfull itunes optional in windows for using its devices, the macos users were doomed :) 12:21
lizmat possibly, otoh it would appear to me that JITting should be either a simpler task on ARM equipment, or less needed ? 12:22
El_Che feasability: it's a more easier arch, but I have no idea honestly. Less needed, I wouldn't think so. The mac laptos will be underpowered. 12:23
my mac airs with macos feels a lot slower than the 4y older i7 laptop with ubuntu 12:24
12:27 rindolf joined 12:28 titsuki joined
lizmat well, they do seem to target the cheaper models (aka underpowered) models first 12:31
12:40 p6steve joined, Doc_Holliwood left
El_Che Thing is, I think, that those are the models people buy if they mac is not provided by $work 12:40
lizmat well, as jnthn pointed out, the only thing you won't get is JIT, it would still have spesh and inlining 12:41
El_Che I run Linux at work, but if I wasn't allowed I would moved to mac before using win 10. But even then I wouldn't really ask for a 2500€ laptop at work :)
now I ask for many somwhat cheaper :) 12:42
so I can run all os'es :)
although Dell Latitutes are in way cheap nor low range :) 12:43
12:43 molaf joined 12:44 molaf left, p6steve left
El_Che I am glad so I can test raku on more OSes 12:44
(I sadly left the windows laptop at work for the lockdown. I am having a hard time running the tests of the SuperMAIN module on Windows) 12:46
12:46 rbt left
El_Che shell $cmd is not really a thing in Windows it seems :( 12:46
12:47 rbt joined 12:50 sena_kun joined 12:52 Altai-man_ left 13:06 melezhik joined 13:10 stoned75 left 13:12 stoned75 joined 13:19 molaf joined
Altreus I have previously made the decision to use a mac instead of a windows 10 machine 13:23
I do not regret it
nor do I now have a mac or any desire to own one :P
(I have also previously installed debian on a mac, back when they used the powerbook architecture) 13:24
raschipi People, please stop, I'm already sweating just thinking about these things. 😅 13:29
jnthn If Apple keep up making it such a nuisance to ship software to run on Mac, I wonder how many projects will just think, screw it.
raschipi Microsoft wants the same, and is already taking steps to make it so. 13:32
Windows 10 S, used on the Surface, is already this way. 13:33
13:38 Ven`` left 13:45 mowcat joined 13:47 aborazmeh left 13:51 dakkar left 13:52 dakkar joined 14:02 AlexDaniel joined, AlexDaniel left, AlexDaniel joined 14:04 chloekek joined
AlexDaniel we need JIT on ARM anyway 14:05
for all SBCs out there
hm that probably means both 64-bit and 32-bit… 14:08
jdv79 need is a strong word 14:10
14:10 chloekek left
AlexDaniel “we” is also a strong word 14:10
*I* need JIT on ARM, please :)
jdv79 diverting resources just for jit on arm - idk - if i had to pick between that and almost anything else 14:11
jnthn Probably fully switching over to the expression JIT is a pre-req for sensibly doing ARM JIT 14:12
14:15 gabiruh joined
AlexDaniel sourceable6: [2, 5].max 14:16
sourceable6 AlexDaniel, github.com/rakudo/rakudo/blob/fa3c....pm6#L1310
AlexDaniel sourceable6: [2, 5].max()
sourceable6 AlexDaniel, github.com/rakudo/rakudo/blob/fa3c....pm6#L1311
14:18 stoned75 left
AlexDaniel sourceable6: 42 cmp ‘foo’ 14:19
sourceable6 AlexDaniel, github.com/rakudo/rakudo/blob/fa3c...er.pm6#L15
AlexDaniel sourceable6: 42.5.Bridge cmp 50.5.Bridge 14:20
sourceable6 AlexDaniel, github.com/rakudo/rakudo/blob/fa3c...nt.pm6#L83
AlexDaniel nope sourceable6, that's wrong :)
good try though 14:21
sourceable6: (42.5.Bridge) cmp (50.5.Bridge)
sourceable6 AlexDaniel, github.com/rakudo/rakudo/blob/fa3c...m.pm6#L415
AlexDaniel sourceable6: 42.5 cmp 50.5 14:22
sourceable6 AlexDaniel, github.com/rakudo/rakudo/blob/fa3c...rs.pm6#L61
AlexDaniel lizmat: interesting… so cmp for Rats goes through Nums? 14:23
lizmat looks like
AlexDaniel ah no, I'm blind again :)
sourceable6: 42.5 <=> 50.5 14:24
sourceable6 AlexDaniel, github.com/rakudo/rakudo/blob/fa3c...t.pm6#L492
AlexDaniel that's what it does
lizmat ah, yes
m: NaN cmp 0e0
camelia WARNINGS for <tmp>:
Useless use of "cmp" in expression "NaN cmp 0e0" in sink context (line 1)
lizmat m: dd NaN cmp 0e0
camelia Order::More
lizmat m: dd 0e0 cmp NaN 14:25
camelia Order::Less
lizmat m: dd NaN cmp NaN
camelia Order::Same
14:25 Maylay joined
lizmat wow 14:25
jnthn I'm not sure where's any good answer for the first two...
moritz m: say 'NaN' cmp '0e0'
camelia More
lizmat I sorta expected all of those to give NaN 14:30
or a Failure
now for something completely different: Pictures! twitter.com/liztormato/status/1253...4237483016
AlexDaniel lizmat: omg! Amazing! 14:31
so many camelias ♥
jnthn lizmat: Failure maybe, but cmp is spec'd to return Order, and I don't think Order or Num is much good; Order with the usual Failure sneaking through rule could work I guess 14:32
14:33 sena_kun left 14:34 sena_kun joined, sena_kun left 14:35 sena_kun joined
raschipi lizmat: Could you ask Wendy for a more explicit license because sometimes it's a requirement. 14:41
Oh, now I found it. 14:42
I think the NonCommercial limitation is a problem, though. Can't be used by anyone actually involved in Raku or any of it's websites, since all of them are commercial. 14:44
Unless that's what is intended the intention. 14:45
Anyone that wrote a book about Raku also can't use it. 14:46
14:49 Altai-man_ joined 14:51 sena_kun left 14:53 Doc_Holliwood joined 15:04 kensanata left 15:14 aborazmeh joined, aborazmeh left, aborazmeh joined
Demos[m] raku's MAIN multi sub is real neat 15:26
raschipi What I think is even neater is that the whole language was shaped to make MAIN fit very well. Very well designed, the features aren't just bolted on. 15:45
15:45 p6steve joined, stoned75 joined 15:49 k-man__ joined 15:51 k-man_ left 16:04 ensamvarg2 left, ensamvarg_g6 joined
Demos[m] I consider bolted on features a feature of perl (and raku) 16:11
I love the live and let live attitude perl has
(and raku)
Real question though: Is there a way to instruct rakudo's build system to link additional static libraries? 16:12
Kaeipi i haven't really seen HyperWhatever get much love 16:14
m: say (1...10).map(*+1)
camelia (2 3 4 5 6 7 8 9 10 11)
Kaeipi m: say (1...10).&(**+1)
camelia (2 3 4 5 6 7 8 9 10 11)
Kaeipi useful for one-liners ig
didn't mean to interrupt tho, didn't see i was scrolled up when i sent the first message 16:17
Demos[m] also: is there a way to add a trait for every sub in a block 16:26
I wanna add "is native('...') is export without having to write it every time
jnthn Demos[m]: No, there's no way to factor that out, though it's typical to have a `constant` for the native library name so that isn't repeated. 16:29
moritz this would be a good use case for macros (but probably not in the first macro iteration)
Demos[m] I mean I should be able to define a sub that just creates the native sub and adds it to the module via the MOP right? 16:31
or a YOLO slang :D
oh also, on the native call front: is there a way to override the library name?
jnthn The MOP is about OO stuff. You could define your own trait_mod that applies the two, however. 16:32
Demos[m] I want to be able to distribute my application as a single executable, that incluedes the interpreter, static linked to the libs I need, and my files
jnthn And that will mean there's only one thing to repeat
Demos[m] mmm that could be good
Well you can muck around with ModuleHOW no? 16:33
jnthn I don't see how it'd help you really; subs are lexical
So there's not a way to reach them via ModuleHOW 16:34
The language generally has a quite strict early-bound (lexical) vs late-bound (objects) split.
16:37 dakkar left
Demos[m] so I guess my own trait, or a YOLO slang 16:41
moritz well, you could always have a list of subs 16:43
apply-traits( sub a(...) { }, sub b(...) { }); 16:44
that way apply-traits gets a list of subs as arguments
and can go wild :D
jnthn Not really because traits should be applied at BEGIN time 16:46
I guess you can try sticking a BEGIN before calling apply-traits
16:48 p6steve left 16:50 sena_kun joined, andrzejku left 16:51 Altai-man_ left 16:53 aborazmeh left 16:56 chloekek joined 17:03 titsuki left
Geth doc: 27b676ce47 | (JJ Merelo)++ | doc/Type/Test.pod6
Notes on cached Seqs, refs #2632
doc: 5649e1b768 | (JJ Merelo)++ | doc/Language/operators.pod6
Single arg version of eqv #2632
doc: 195b3b4159 | (JJ Merelo)++ | doc/Language/operators.pod6
Single arg version of :=: #2632
linkable6 Link: docs.raku.org/type/Test
linkable6 DOC#2632 [open]: github.com/Raku/doc/issues/2632 [Hacktoberfest][RFE][big][docs][good first issue][help wanted][new][⚠ Top Priority ⚠] Checklist for 6.d
Link: docs.raku.org/language/operators
17:10 rbt left 17:11 rbt joined, p6steve joined
Geth doc: 910c6efd15 | (JJ Merelo)++ | doc/Type/Grammar.pod6
Literally that #2632

OK, I should probably ellaborate on this, but that would need a lot of additional context. Let's leave that for later improvement.
linkable6 Link: docs.raku.org/type/Grammar
DOC#2632 [open]: github.com/Raku/doc/issues/2632 [Hacktoberfest][RFE][big][docs][good first issue][help wanted][new][⚠ Top Priority ⚠] Checklist for 6.d
melezhik vrurg: I just tested a new version of Test-Async on both centos/debian it fails - repo.westus.cloudapp.azure.com/rakudist 17:23
logs: repo.westus.cloudapp.azure.com/raku...662128.txt
weird enough, but now details are seen on logs 17:24
verbose mode is not enabled in rakudist, but it's rare when it is really needed 17:25
vrurg melezhik: and this is actually when verbose is needed the most, I guess. :)
melezhik yeah, but in 99% default `zef install` produces enough information ... 17:26
I can tweak rakudist harness though and rerun test
5 minutes
have launched new build with verbose mode enabled, so let's see :-) 17:27
repo.westus.cloudapp.azure.com/raku...662831.txt 17:28
vrurg Aha, thanks! Meanwhile, Linux Mint – installed with no problem.
Demos[m] Can I make new allomorphs? 17:30
vrurg Demos[m]: p 17:31
Sorry, wrong window. :)
Demos[m] ummm
were you addressing me in another window? 17:32
vrurg Demos[m]: it's autocompletion.
But, anyway: look for but
Another way is to have a class coercing the way you need it. 17:33
m: class Foo { method Str { "StrFoo" }; method Bool { False } }; say ~Foo.new; say ? Foo.new'
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3{ False } }; say ~Foo.new; say ? Foo.new7⏏5'
expecting any of:
infix stopper
statement end
vrurg m: class Foo { method Str { "StrFoo" }; method Bool { False } }; say ~Foo.new; say ? Foo.new
camelia StrFoo
vrurg m: say IntStr.^mro.map(*.^name).join(", ") 17:34
camelia IntStr, Int, Str, Cool, Any, Mu
17:35 kst joined
El_Che sena_kun, jnthn: on commaide.com/download you can only download the community release, while the changelog on the samepage is for the Complete release I think 17:41
sena_kun El_Che, no? 17:42
El_Che no
I misread
it's 2019.03 changelog
sena_kun El_Che, 2020.03 starts with "Add a Raku REPL with multiline commands, history, auto-completion of symbols, and the usual range of annotations and intentions". ;)
El_Che not 2020.03
17:42 p6steve left
El_Che so the changelog is not for 2020.01.0 17:42
still mismatch, but not the one I wrongly saw 17:43
sena_kun El_Che, no, it is correct.
El_Che ah ok
sorry for the noise then
sena_kun El_Che, it says "migrated to 2019.03", but this is because we indeed migrated (well, for community folks) in 2020.01. 17:44
El_Che yeah, I get that now
melezhik so vrurg: it's test failure - repo.westus.cloudapp.azure.com/raku...662831.txt 17:45
at t/150-throws-fails.t ...
please also be aware it runs on docker 17:46
17:47 cpan-raku left 17:48 cpan-raku joined, cpan-raku left, cpan-raku joined
vrurg melezhik: I can't test on docker, it doesn't support macos. Otherwise the log is still pretty much useless. The failed test is a subtest which is in turn a bunch of subtests too. :( 17:48
melezhik yeah. i can't help more, it run in verbose mode. other than run stuff from docker manually ... 17:49
I can't test on docker, it doesn't support macos"
this is why rakudist exists
17:51 aborazmeh joined, aborazmeh left, aborazmeh joined, andrzejku joined
vrurg melezhik: I think there is an env var which causes zef/prove to output all test messages 17:53
melezhik I don't know, if you tell me. so far I use "zef install --verbose"
zef --debug ? 18:02
18:02 p6steve joined
melezhik but I doubt it will give us more info 18:02
vrurg melezhik: Nah. zef uses prove. I can't quickly find what forces prove to output everything, not just summaries. 18:03
Geth doc: patrickbkr++ created pull request #3347:
Document `:$win-verbatim-args` argument of `run()` and related functions
18:08 p6steve left 18:09 p6steve joined 18:11 patrickb joined
cpan-raku New module released to CPAN! BitEnum (0.4) by 03CTILMES 18:14
18:16 benlittle left
moritz hoelzro: hub.docker.com/_/rakudo-star lists you as the contact person. Any chance we can get a rakudo star 2020.01 on dockerhub? 18:20
18:20 p6steve left, molaf left 18:22 xfix joined
jdv79 m: class C is Hash { method m { self .= new } }; C.m 18:24
camelia Cannot resolve caller STORE(C:U: C:D); none of these signatures match:
(Hash:D: \to_store, *%_)
(Hash:D: \keys, \values, *%_)
in method m at <tmp> line 1
in block <unit> at <tmp> line 1
hoelzro moritz: oh, we should change that
jdv79 how can i do something like that?
moritz jdv79: like what? 18:25
18:25 sauvin left
jdv79 oh, i see. nm. 18:25
18:28 chloekek left
cpan-raku New module released to CPAN! BitEnum (0.5) by 03CTILMES 18:29
hoelzro I'd like to find someone to take the rakudo star image off my hands - anyone interested?
moritz if nobody else does it, maybe 18:30
though I'm usually too little around to do it justice
rakudostar.com/files/star/ doesn't contain the 2020.01 files -- is there a new URL for that?
18:37 x[LGWs4x4i]uG2N0 joined
x[LGWs4x4i]uG2N0 hello, is it possible to use grammars for things that aren't strings? 18:38
moritz not yet 18:39
x[LGWs4x4i]uG2N0 ah
moritz though signatures are pretty good at matching data structures
timotimo we have someone working on something like that
x[LGWs4x4i]uG2N0 oh, cool
MasterDuke x[LGWs4x4i]uG2N0: and guifa2 is currently working on supporting grammars for binary data
guifa2 note that you *can* right now but it's a bit clunky 18:40
18:40 chloekek joined
x[LGWs4x4i]uG2N0 oh? how? 18:40
guifa2 See blogs.perl.org/users/sylvain_coline...3-gfx.html
x[LGWs4x4i]uG2N0 haha, thanks 18:41
so basically you just turn your thing into a string?
i was thinking of using grammars as a quick way to implement a VM 18:44
and i guess turning the sequence of operations into a string works, except for cases where an operation also changes the sequence itself 18:45
but i guess grammars might not be the right tool for that 18:46
guifa2 x[LGWs4x4i]uG2N0: basically. For old-school regex (like, in 8-bit encoding era) there wouldn't be muchof a question because there wasn't much of a distinction between a string and a blob, they were both totally arbitrary pieces of data taken in 8bit chunks 18:47
Most (all?) regex engines these days are focused on string processing, and strings today are ...more complicated today :-) 18:49
18:49 Altai-man_ joined 18:51 sena_kun left
hoelzro moritz: in the interim, if you'd like to try to make the change to get the 2020.01 release out, I can clean out the cobwebs in my mind and try to walk you through it =) 18:53
moritz hoelzro: I'd love to, but I already fail at the download URLs :/ 18:55
hoelzro =(
moritz + curl -fsSL rakudostar.com/files/star/rakudo-s...tar.gz.asc -o /tmp/tmp.tuE3jMPjfJ/rakudo.tar.gz.asc 18:57
curl: (22) The requested URL returned error: 404
19:00 p6steve joined
melezhik vrurg: - here is the longest log - repo.westus.cloudapp.azure.com/raku...668061.txt 19:01
and it shows something, , thanks ugexe: for help 19:02
ugexe: thanks
vrurg melezhik: so, what's the env for getting it? 19:03
19:03 Xliff joined
Xliff \o 19:03
melezhik zef install . --verbose --/prove --/tap-harness
Xliff For NativeCall, is there a way to tell if a CArray is managed or unmanaged?
managed meaning created and provisioned by Raku 19:04
19:06 sjm_uk left, k-man__ left
vrurg melezhik: ok, thanks! Especially for the log. It looks weird. 19:07
Xliff vrurg: ^^ 19:08
Or is that a better question for nine?
19:09 k-man__ joined
Xliff m: use NativeCall; sub malloc (uint64) returns CArray[uint8] is native; my $a = malloc(100); say $a.elems 19:09
camelia 5===SORRY!5=== Error while compiling <tmp>
A unit-scoped sub definition is not allowed except on a MAIN sub;
Please use the block form. If you did not mean to declare a unit-scoped sub,
perhaps you accidentally placed a semicolon after routi…
Xliff m: use NativeCall; sub malloc (uint64) returns CArray[uint8] is native { * }; my $a = malloc(100); say $a.elems
camelia Don't know how many elements a C array returned from a library
in method elems at /home/camelia/rakudo-m-inst-1/share/perl6/core/sources/8660F65A7B3492675BB3B2058DB30E411A4C4E54 (NativeCall::Types) line 223
in block <unit> at <tmp> line 1
vrurg Xliff: I know almost nothing about NativeCall besides of it's purpose.
Xliff Right. So the only way I can tell is to trap something like the above.
I generally would like to avoid exception checking where I can. 19:10
19:11 ensamvarg_g6 left
melezhik vrurg: you are welcome 19:11
Geth problem-solving: patrickbkr++ created pull request #178:
Solution for #20: Windows process argument quoting
19:21 farcas1982regreg left 19:24 andrzejku left 19:27 Tirifto joined 19:28 Black_Ribbon joined, xfix left 19:30 rindolf left 19:31 xfix joined
p6steve -e '(a => 42, b => 666).map: -> |c { dd c }' 19:34
p6: say (a => 42, b => 666).map: -> |c { dd c } 19:35
camelia \(:a(42))
(Nil Nil)
vrurg melezhik: how many cpu cores your docker image is using?
p6steve why |c not \c in block signature? 19:36
p6: say (a => 42, b => 666).map: -> \c { dd c } 19:37
camelia :a(42)
(Nil Nil)
melezhik vrurg: I don't know. host system has 2 cores
vrurg melezhik: So far, I can't reproduce the error. I thought that opensuse as debian-based one would behave the same, but it's not. Core is the only thing I can think of so far. 19:40
circle-ci passes too.. Weirdier and weirdier... 19:42
vrurg is afk&
melezhik vrurg: yeah. the same errors for alpine and centos and debian - repo.westus.cloudapp.azure.com/rakudist
19:42 aborazmeh left
melezhik it _could be_ I am prepared to believe a docker related issue 19:43
Xliff p6steve: That's a raw value.
p6: say (a => 42, b => 666).map: -> |c { dd c }
camelia \(:a(42))
(Nil Nil)
Xliff p6steve: ^^
So your \c is capturing the value passed. 19:44
p6: if 2, 3 -> |c { dd c }
camelia \((2, 3))
Xliff p6: if 2, 3 -> \c { dd c }
camelia (2, 3)
19:50 girafe left, abraxxa left 19:51 rindolf joined 19:53 abraxxa joined 19:54 stoned75 left 19:56 stoned75 joined
p6steve @Xliff Inside a Signature, a Capture may be created by prefixing a sigilless parameter with a vertical bar |. This packs the remainder of the argument list into that parameter. 19:57
@Xliff thanks for the guidance - helped me to find the doc!! 19:58
19:58 girafe joined
guifa2 Success! I now have two types of binex nodes working :-) 20:07
guifa2 . o O ( it's only concat and literal, but hey, it's handling scouring pretty swell)
jdv79 is there a fast yaml module? 20:15
i have a feeling YAMLish is slowing my stuff down 20:16
20:16 girafe left
MasterDuke have you profiled (i love that rakudo comes with one built-in)? 20:16
jdv79 uh, i haven't been able to get a browser to load a real profile in a long time 20:18
i just added something with YAMLish and now its dog slow - gotta check though
20:18 rindolf left
MasterDuke timotimo's moarperf handles large profiles (you have to generate sql profiles though) 20:20
jdv79 oh nice. i pulled a large chunk of code into the "script" as well - that's it 20:21
compilation speed
nevermind then
20:21 girafe joined
jdv79 i tried a few times to do the more complicated profiling stuff but could never get it to work 20:22
be neat if it was like Devel::NYTProf - that profiler is amazing
MasterDuke it currently has a problem with the
index page redirect. you may have to manually to go localhost:20000/#/prof/home/ 20:23
20:23 stoned75 left
jdv79 iirc they wrote the profiler and then stopped using perl, in part cause it was slow. 20:24
jnthn jdv79: I replaced YAMLish with YAML::Parser::LibYAML in one codebase doing a load of YAML and got a significant speedup
SmokeMachine I was thinking… is there a way of creating custom types that work like Junctions? I mean: not child of Any and if passed to a function expecting that type would just run the function as usual and if it expect Any it would behave differently (eg: run multiple times (or no time at all) on parallel as Junctions do).
jnthn It does have a native dependency, however.
MasterDuke jdv79: huh, didn't know that history
jdv79 ah, i'll try that 20:25
raschipi SmokeMachine: That's what we want macros for.
jdv79 if it runs anywhere it'll be in a docker thing so no issue with a native dep
SmokeMachine raschipi: by macro you mean the function would be a macro or the RakuAST would give us power to change it behaviour? 20:27
raschipi Well, a function isn't a macro and RakuAST isn't macros either, so I'1m a little confused about what you mean... 20:29
SmokeMachine I was wandering about having a Junction like Maybe type, for example, and if you do `any-function($my-maybe)` and it’s Nothing, than it would not run the `any-function` and would return Nothing again... 20:30
raschipi: I meant how would you implement that with macros? 20:31
raschipi Well, have the macro expand to code that checks the type and do different things depending on it. 20:37
20:38 molaf joined
SmokeMachine raschipi: so I’d have to implement the “function” as the macro… and I was thinking as a general thing to use on any function/method... 20:39
raschipi Well, then you want a Slang (NIY). 20:40
Geth doc: Kaiepi++ created pull request #3349:
Add textwidth=72 vim setting for all POD6 documentation files
guifa2 any efficient way to concat several blobs? Something like Blob.new(Blob @) ?
SmokeMachine m: my $a = all(1,2,3); sub a($b) { say $b}; a $a 20:41
camelia 1
raschipi guifa2: [~] ?
20:42 maray joined
SmokeMachine raschipi: is Slang NYI? but there are several slangs on the ecosystem... 20:42
raschipi The interface isn't stable, so I don't think it's worth trying.
20:43 maray left 20:44 p6steve left
SmokeMachine raschipi: I did try some time ago… it was cool… github.com/FCO/p6-react 20:44
raschipi Without a stable interface, they aren't more convenient than patching the compiler...
SmokeMachine that’s why I’m waiting for custom compiler passes with RakuAST… I already have a few plans for testing with it... 20:45
raschipi Melhor esperar sentado... 20:46
SmokeMachine Why?
raschipi Just a joke 20:47
SmokeMachine raschipi: Are you Brazilian?
guifa2 raschipi: does the compiler optimize that?
raschipi SmokeMachine: Yep
SmokeMachine me too (as you probably know… because you spoke portuguese with me...) 20:48
raschipi Yep
guifa2 se sois brasileiros então, a falarmos português em @raku-pt haha
lizmat que?
raschipi Que diabo de língua é essa? 20:49
lizmat ik snap er helemaal niets van!
guifa2 sois = vós (falo europeu)
SmokeMachine there is a #raku-br
El_Che poha
20:50 sena_kun joined
guifa2 lizmat: my international talk got B-listed =\ 20:50
lizmat meh