»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
chee hey, how come the infinity emoji doesn't work here: 1, 2, *+* ... ♾ 00:05
chee i'm calling the police 00:06
DrForr Local afternoon - anyone familiar with creating traits? 00:11
vrurg DrForr: let's get back here. The other channel is for different purpose. 00:32
DrForr Nod. 00:33
I want to create a trait along the lines of C<class Y is repr(...) { }>
vrurg m: sub foo ( Any:U $class ) { say $class.WHAT, " ", $class.defined }; foo(Int); my Int $a = 42; foo( $a ) 00:35
camelia (Int) False
Parameter '$class' of routine 'foo' must be a type object of type 'Any', not an object instance of type 'Int'. Did you forget a 'multi'?
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
vrurg m: sub foo ( Any:U $class ) { say $class.WHAT, " ", $class.defined }; foo(Int);
camelia (Int) False
vrurg Note how it fails on a defined value. 00:36
So, multi trait_mod:<is>(Any:U $class, |) { ... } would only apply to classes. 00:38
DrForr Ah, the proto I'm guessing... 00:41
vrurg DrForr: BTW, depending on what class you're applying to, sometimes Mu:U is preferable. But Any is good for the most common cases. 00:52
DrForr Hate to say it's not working for me, I'm still getting "'MyClass' could not inherit from db-table..." 00:54
DrForr Ah! Mu does work... 00:55
vrurg++
It's for an ORM as it happens. 00:56
class BookOwner is db-table( 'book_owner' ) does ORM::Tiny { has Str $.name is db-column( :primary-key ); } 00:57
DrForr And yes, I'm writing a talk up on it as well. 00:59
vrurg DrForr: did you see Red? 01:34
DrForr Oh, that's who you are. Hi, not yet, I've literally just gotten to town. 01:45
vrurg DrForr: nah, that's not me. It's SmokeMachine (if I'm not mistaken). I mean, are you sure there is a need to duplicate the thing? 02:03
DrForr Duplicate what thing? 02:06
vrurg Red, the other ORM
DrForr Oh...
vrurg modules.perl6.org/dist/Red:cpan:FCO
DrForr I looked around on modules.perl6 but apparently the name didn't register. 02:07
vrurg Depends on how long ago it happened. I knew about it for a couple of months now but it was published like a month ago or so. Not sure when. 02:08
vrurg I'm usually a pro-diversity person, but Perl6 is young and it's modules ecosystem needs a lot of new things. 02:09
timotimo isn't ORM::Tiny a lot older than Red? 02:09
DrForr I've only played with this idea for a few days off and on, unless Red literally appeared in the last few days it wouldn't be. 02:10
timotimo oh, ok 02:13
vrurg I probably misunderstood. I thought DrForr is developing a new ORM.
timotimo i thought there had been a "tiny" orm before
DrForr I'm not at all sure, but I'll check out Red. 02:14
vrurg Khm, I saw the name before but it is not on the modules.perl6.org. Perhaps I stumbled upon while googling for something.
DrForr Yah, that's pretty much the design I was using. Oh well, GMTA. 02:15
And yeah, beaten by a few days. I didn't honestly know it was on the list of desired modules.
I just thought it was a neat way to bind the DB. Apparently so did someoene else, although they diverge to the point of creating a 'model'. 02:17
Heck, I've got other ideas to work on.
vrurg DrForr: That's good, I think. 02:19
DrForr The "thought it was a neat idea..." or "other ideas to work on"? 02:20
vrurg doesn't like ORMs (it's something unexplainable) but RED looks pretty interesting.
DrForr: "other ideas". :)
DrForr Ah. Well, it's more of going back to fixing other stuff, or at least it should be...
vrurg It means, we'll get some more good modules in the ecosystem. 02:21
Ok, I was wrong then.
vrurg is back to fixxing role parameterization.
DrForr Oo... I'm actually using that in perl5 and will be talking about it... 02:24
vrurg Oh, it reminds me... I have to finally pull myself together and order money for the TPC in June... 02:26
DrForr I finally have a company that's sponsoring me... 02:27
vrurg My company usually pays for me. Wanna do it as early as possible this year to finally book in the same hotel where the event takes place. 02:29
DrForr Everyone's coming, and they're planning to be working nights and do one night of social things. 02:33
"You... you're... you're new here, aren't you?" 02:34
timotimo hm?
DrForr They just think that it's going to be a working vacation, they've plainly never been to one of these things. 02:36
timotimo ah, heh. 02:38
tbrowder guifa: present? 03:05
tbrowder .tell guifa i think i see the light for an ast version from the CLDR data, but i'll need your blessing 03:07
yoleaux tbrowder: I'll pass your message to guifa.
guifa tbrowder: I’m here 04:17
yoleaux 03:07Z <tbrowder> guifa: i think i see the light for an ast version from the CLDR data, but i'll need your blessing
guifa Is there an elegant way to handle passing a scalar OR a positional for signatures? I thought about multi but that’s n^2 for n arguments that could be handled as scalar or positional. Right now I’m just doing scalar Anys for all and then doing the checking in the block itself 05:01
Idea is to say something like
.filter( :languages($single), :scripts(@several)) but also .filter( :languages:(@several), :scripts($single)) 05:03
oh wait, duh. :language and :languages adverbs
hythm role R { method modified-append (@e) { self.append(@e) }; }; my @b = 1, 2; my @a does R; @a.modified-append(@b); 05:09
p6: role R { method modified-append (@e) { self.append(@e) }; }; my @b = 1, 2; my @a does R; @a.modified-append(@b);
camelia ( no output )
hythm p6: role R { method modified-append (@e) { self.append(@e) }; }; my @b = 1, 2; my @a does R; @a.modified-append(@b); say @a; 05:10
camelia [1 2]
hythm is there a way to make role R disable method 'append', so appending any elements to @a can be done .modified-append only (and using .append should not do anything to @a) 05:11
lookatme_q hythm, you call wrap the append method 05:22
s/call/can/
if you want do something before or after append called 05:23
guifa I feel like there should be a way to do that with handle but I can’t quite figure it out 05:24
hythm I tried wrapping it, but not working for me: 05:32
p6: role R { submethod BUILD { self.^find-method('append').wrap(return self) }; method modified-append (@e) { self.append(@e) }; }; my @b = 1, 2; my @a does R; @a.modified-append(@b); @a.append: 1; say @a
camelia 5===SORRY!5=== Error while compiling <tmp>
No such method 'find-method' for invocant of type 'Perl6::Metamodel::ClassHOW+{<anon>}+{<anon>}+{<anon>}'. Did you mean 'find_method'?
at <tmp>:1
hythm weird, the above compiles fine on REPL 05:33
I guess wrapping would not work in this case, as I'm using .append itself in the modified append method 05:35
Aah, find_method not find-method; 05:44
hythm p6: role R { method append(@a) {self.modified-append(@a)}; method modified-append (@e) { say 'modified-append called'; }; }; my @b = 1, 2; my @a does R; @a.append(@b); 06:01
camelia modified-append called
Geth ecosystem/revert-430-patch-1: 99e1f04f0c | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Revert "Update META.list with the BCP57 module"
06:37
ecosystem: JJ++ created pull request #431:
Revert "Update META.list with the BCP57 module"
ecosystem: 99e1f04f0c | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Revert "Update META.list with the BCP57 module"
ecosystem: f002e7e0b3 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Merge pull request #431 from perl6/revert-430-patch-1

Revert "Update META.list with the BCP57 module"
jmerelo releasable6: status 07:09
yoleaux 20 Feb 2019 21:32Z <choiboi> jmerelo: Thank you!
20 Feb 2019 22:59Z <tbrowder> jmerelo: have you heard from sean morrison?
releasable6 jmerelo, Next release will happen when it's ready. 4 blockers. 175 out of 311 commits logged (⚠ 1 warnings)
jmerelo, Details: gist.github.com/06b94e99e6f5f7ac47...678d95ef8e
jmerelo .tell tbrowder not really...
yoleaux jmerelo: I'll pass your message to tbrowder.
Geth doc: 7a8b99ced5 | (JJ Merelo)++ | doc/Type/Any.pod6
Adds sum, refs #1494
07:20
synopsebot Link: doc.perl6.org/type/Any
doc: 45c8634646 | (JJ Merelo)++ | doc/Type/Any.pod6
Adds join refs #1494
SmokeMachine DrForr: You could help us with Red if you want... :) 08:58
SmokeMachine m: say "hi Camelia" 10:32
camelia hi Camelia
tbrowder jmerelo: i just pinged sean, cc you 11:56
yoleaux 07:09Z <jmerelo> tbrowder: not really...
tbrowder jmerelo: when you're not busy (ha ha) can you see why my attempted link to " interpolating" at the top of the packages.pod6 doesn't work? thanks 11:58
sno stackoverflow.com/questions/547805...-on-darwin 12:22
jkramer Does anyone know if github.com/shuppet/ is here with some different nick? 12:30
sena_kun jkramer, isn't it an organization? 12:39
ping Altreus 12:40
jkramer sena_kun: Dunno, their website is down so it's difficult to find tell :) 12:43
sena_kun .seen Altreus 12:44
yoleaux I saw Altreus 16 Feb 2019 15:18Z in #perl6: <Altreus> bailador can be installed from github master
jkramer sena_kun: You're probably right, all commits in their repos are done by other users, not shuppet 12:45
lucasb why does Any needs .print-nl and .nl-out methods? 13:17
lizmat FWIW, I'm actually not sue 13:19
*sure
SmokeMachine is any one else having this problem? 13:21
www.irccloud.com/pastebin/DdEdgTzn/ 13:22
lizmat SmokeMachine: I think that's one of the remaining release blockers ? 13:24
and/or that module is doing stuff in internals it shouldn't, and is now broken because the internals changed ? 13:25
SmokeMachine lizmat: I don't know... I saw that when I was trying to install Red on my new work's Mac... 13:26
lizmat github.com/rakudo/rakudo/issues/2703
and: github.com/salortiz/NativeHelpers-Blob/issues/7
SmokeMachine lizmat: Thanks! Im sorry... I just moved, so I haven't seen (or Ive seen and have forgotten)... too much stuff to be done... :( 13:38
lizmat yeah.. no pb... 13:39
glad to have been able to answer your question quickly, sad that it wasn't a solution
lizmat sno: I cannot repro the problem 13:47
SmokeMachine lizmat: was that for me?
lizmat no, for sno 13:47
sno lizmat: I show you this evening
SmokeMachine sorry... :(
lizmat sno: I will show you as well :-)
sno sure, and we figure probably out what's going on 13:48
Geth doc: d458018c2a | cfa++ | doc/Type/Pair.pod6
Fix typo.
15:20
synopsebot Link: doc.perl6.org/type/Pair
Geth doc: 51479affec | cfa++ | doc/Type/Pair.pod6
Clarification.
15:28
synopsebot Link: doc.perl6.org/type/Pair
Geth doc: 53976f875c | cfa++ | 2 files
Fix typo, reference signatures from Type/Sub (closes #2625).
15:41
Altreus hello 16:08
jkramer: ya, shuppet is an organisation
jkramer Altreus: Yeah nvm, I thought I had a quick question but I just opened an issue 16:13
Altreus are you the throwaway? 16:16
register, coward, you're only going to fix a bug
was helpful :)
jmerelo releasable6: status 16:23
releasable6 jmerelo, Next release will happen when it's ready. 4 blockers. 175 out of 311 commits logged (⚠ 1 warnings)
jmerelo, Details: gist.github.com/37c86ac24eaa97d182...7682059a9b
Geth doc: ee348ea7ea | (JJ Merelo)++ | doc/Type/Any.pod6
Deindents and adds text refs #1494
16:51
doc: a1bc2ebb99 | (JJ Merelo)++ | doc/Type/Any.pod6
Adds head, refs #1494 #2631
synopsebot Link: doc.perl6.org/type/Any
Geth doc: 06b56f427f | cfa++ | doc/Type/IO/Path.pod6
IO::Path: Clarify smartmatching on Pairs (closes #2621).

Repeated "TIP" text removed.
17:03
synopsebot Link: doc.perl6.org/type/IO::Path
ryn1x . 17:48
timotimo ohai ryn1x
have you been away from irc for a while per chance?
ryn1x hey, yeah I have... 17:49
timotimo oh, i just noticed you have a Hexagonal_Minesweeper project
have you ever heard of HyperRogue?
it has a land that's also basically minesweeper, but on a hyperbolic plane 17:50
ryn1x Yeah... I saw that on twitter before
looks neat
timotimo it's pretty rad 17:52
you can play an older version for free if you get it off of itch.io 17:53
ryn1x cool. I'll check it out. it is pretty cool and the crazy stuff that can be done with hexagons. 17:54
When I was messing around with them I was referencing this awesome site: www.redblobgames.com/grids/hexagons/
timotimo oh, that feels familiar 17:55
cfa o/ 18:19
guifa multi sub infix:<eqv> (Int $a, Int $b, :$speak) { say "HELLO" if $speak; $a == $b }; 1 eqv 2; 1 eqv 2 :speak; 18:22
p6: multi sub infix:<eqv> (Int $a, Int $b, :$speak) { say "HELLO" if $speak; $a == $b }; 1 eqv 2; 1 eqv 2 :speak;
camelia 5===SORRY!5=== Error while compiling <tmp>
You can't adverb &infix:<eqv>
at <tmp>:1
------> 3eak; $a == $b }; 1 eqv 2; 1 eqv 2 :speak7⏏5;
expecting any of:
pair value
guifa boo hiss 18:23
sena_kun m: multi sub infix:<eqv> (Int $a, Int $b, :$speak) { say "HELLO" if $speak; $a == $b }; say 1 eqv 2; infix:<eqv>(1, 2, :speak); 18:25
camelia WARNINGS for <tmp>:
False
HELLO
Useless use of "infix:<eqv>(1, 2, :speak)" in expression "infix:<eqv>(1, 2, :speak)" in sink context (line 1)
sena_kun you can call it like this, but you, likely, don't want to do it. 18:25
timotimo p6: multi sub infix:<eqv> (Int $a, Int $b, :$speak) is default { say "HELLO" if $speak; $a == $b }; 1 eqv 2; 1 eqv 2 :speak;
camelia 5===SORRY!5=== Error while compiling <tmp>
You can't adverb &infix:<eqv>
at <tmp>:1
------> 3eak; $a == $b }; 1 eqv 2; 1 eqv 2 :speak7⏏5;
expecting any of:
pair value
sena_kun m: multi sub infix:<eqv> (Int $a, Int $b, :$speak) { say "HELLO" if $speak; $a == $b }; say 1 eqv 2; say infix:<eqv>(1, 2, :speak)
timotimo strange.
camelia False
HELLO
False
Xliff m: class A{}; class B {}; @a = (A.new, B.new); sub ($a) { 1.say if $a =:= @a[0]; 2.say if $a =:= @a[1] }; a($_) for @a; 18:35
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@a' is not declared
at <tmp>:1
------> 3class A{}; class B {}; 7⏏5@a = (A.new, B.new); sub ($a) { 1.say if
Xliff m: class A{}; class B {}; my @a = (A.new, B.new); sub ($a) { 1.say if $a =:= @a[0]; 2.say if $a =:= @a[1] }; a($_) for @a; 18:36
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
a used at line 1
Xliff m: class A{}; class B {}; my @a = (A.new, B.new); sub a ($a) { 1.say if $a =:= @a[0]; 2.say if $a =:= @a[1] }; a($_) for @a;
camelia ( no output )
Xliff ^^ Why doesn't that work?
m: class A{}; class B {}; my @a = (A.new, B.new); sub a ($a) { 1.say if $a =:= @a[0]; 2.say if $a eqv @a[1] }; a($_) for @a;
camelia 2
Xliff m: class A{}; class B {}; my @a = (A.new, B.new); sub a ($a) { 1.say if $a eqv @a[0]; 2.say if $a eqv @a[1] }; a($_) for @a;
camelia 1
2
Xliff Oooo.
Still, isn't the bound $_, passed by reference the same container? 18:37
And nope... eqv didn't work in the larger code this was golfed from. 18:38
lucasb hmm, that perl6-users thread suggests there's NO list comprehension in Perl 6? did I understand correctly? 18:43
m: say ($_ if $_ %% 2 for ^10)
camelia (0 2 4 6 8)
lucasb ^^ I would argue this is a kind of list comprehension
sena_kun "kind of", I think. 18:44
I didn't read it, but I'd assume that "a special language constructions" is what's considered, not "You can do it easily using _normal, more generic constructions_". 18:45
timotimo wakelift.de/p/1a4b9bd1-bde8-4a34-8d...670f60c43/ - i'd appreciate proof-reading and general comments :) 18:59
guifa p6: class A {}; class B { method new (A :@bar = ()) { ; }}; B.new 19:02
camelia Type check failed in binding to parameter '@bar'; expected Positional[A] but got List ($( ))
in method new at <tmp> line 1
in block <unit> at <tmp> line 1
guifa thinks an default value empty list ought to pass type check 19:02
timotimo m: class A {}; class B { method new (A :@bar) { ; }}; B.new 19:04
camelia ( no output )
timotimo m: class A {}; class B { method new (A :@bar) { say @bar.perl; }}; B.new
camelia Array[A].new()
guifa Aaah. That’s cleaner code. But still, seems odd that the type check fails, no? 19:05
timotimo in parameter lists, = has binding semantics
guifa Although I can get that reduced example to work, it’s oddly not fixing my code 19:09
Type check failed in binding to parameter '@languages'; expected Positional[Language] but got Array ($[])
With method new( Language :$language, Language :@languages, … ) as my signature
timotimo right, you'll have to pass something that's got the right type nominally 19:10
moritz m: say [] ~~ Array[Int]
camelia False
timotimo are you sure you're not passing anything at all to @languages? or maybe it's actually a different candidate that's being called and the line number is wrong?
moritz m: say Array[Int].new() ~~ Array[Int]
camelia True
guifa Totally sure. Only calling via coercion and that is 19:11
method LanguageTagFilter { LanguageTagFilter.new(:$.language,:$.script,:$.region,:@.variants,:@.extensions,:@.privateuses) } 19:12
okay now THAT’s weird 19:13
I literally just added the line say “foo” as the first line of the block to triple check it was happening in the signature area and … now it works?
guifa is clueless. But it’s working now so ……… happy days 19:15
timotimo maybe precomp didn't invalidate and recompile for some reason?!? 19:18
guifa Ah possibly. Didn’t think about that 19:19
Xliff Is there any way to get the calling Routine object from a Block? 19:50
timotimo m: sub callee { say &CALLER::ROUTINE }; sub caller { callee }; caller 20:37
camelia Nil
timotimo m: sub callee { say &CALLER::CODE }; sub caller { callee }; caller
camelia Nil
timotimo m: sub callee { say &CALLER::.keys }; sub caller { callee }; caller
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
CALLER used at line 1
timotimo m: sub callee { say CALLER::.keys }; sub caller { callee }; caller
camelia ($/ $*DISPATCHER $¢ $!)
timotimo somehow this
timotimo wakelift.de/2019/02/21/always-wear...scalaring/ - published my latest grant report for moarperf 20:46
xinming_ !release 21:03
timotimo releasable6: status
releasable6 timotimo, Next release will happen when it's ready. 4 blockers. 175 out of 311 commits logged (⚠ 1 warnings)
timotimo, Details: gist.github.com/9ceb077b02fcfce3cf...e8ead8fc34
xinming_ timotimo: Thanks 21:05
Xliff m: my $c = 10; while $c-- { next if $c == 8; say $c; } 21:22
camelia 9
7
6
5
4
3
2
1
0
cfa hmm, bailador dies on GET: github.com/Bailador/Bailador/issues/313 21:49
not sure whether any bailador folks are around
tadzik I'm not sure if Bailador has anything left of the initial napkin version I wrote :) 21:58
Xliff \o 21:59
tadzik damn, almost 800 commits to it
Xliff m: say Block ~~ Routine
camelia False
cfa m: say Routine ~~ Block 21:59
camelia True
cfa Xliff: (Routine is Block) 22:00
tadzik github.com/Bailador/Bailador/commi...ce4d4c9552
those were simple times <3
cfa :)
Xliff tadzik: Heh! I know the feeling. 22:01
m: Block.^name.say 22:03
camelia Block
Xliff m: Routine.^name.say
camelia Routine
tadzik I wrote it with pen and paper during my spanish classes: that's why its original spanish is actually incorrect :P
7 year later I got a laptop sticker with its logo 22:04
I assume this must be what parenthood feels like
guifa ’s ears perk up. Bad Spanish wha? where?! 22:20
guifa is a Spanish professor by day 22:20
guifa pulls out red pen
tadzik :D 22:21
the function was called "bailar" instead of "baile" 22:22
I got corrected by sorear++ then
guifa Well, most signage is done in the infinitive so … I’d actually expect to the see it being used. 22:24
But I haven’t seen a lot of code written in Spanish (at best some database stuff, but that doesn’t tend to have many verbs) 22:25
Xliff Aside from GLOBAL, are there any other builtin names for Routine.package?
timotimo please verify my C thinking, i tend to get the pointer syntax wrong
Xliff pointer syntax *sux
timotimo in my C i have short buffer[32]; DLLEXPORT int ReturnPointerToArray(void **pointer) { *ptr = &buffer } 22:26
so i'd expect the user to pass in a pointer's address and the pointer at that address would now point at the buffer?
i.e. ptr[0] would access buffer[0]
Xliff Is that *ptr or *pointer? 22:27
timotimo oh, it's pointer
tadzik timotimo: looks good to me
Xliff That looks right.
timotimo OK
tadzik the value of the pointer is the address of the buffer
timotimo how would you do that with perl6?
Xliff Use a CArray
my $pointer = CArray[Pointer].new; $pointer[0] = $buffer; 22:28
I'm shocked that I'm giving you advice, timotimo. :) 22:29
timotimo i'm getting a "invalid write of size 8" on the line i'm setting *ptr
Xliff timotimo: Got code?
timotimo it's "0 bytes into a block of size 4 allocated" where the CArray gets initialized
yup, just a sec
gist.github.com/timo/39af56a0a6828...bb5f717187 - you can apply this to your rakudo checkout and then ./perl6-valgrind-m t/04-nativecall/15-rw-args.t 22:30
valgrind is optional
timotimo OK, the part in CArray is allocating the storage of the CArray itself 22:32
oh btw i'm not using CArray[Pointer], i'm using "CArray[uint8] $foo is rw" in the signature
so i'm hoping to get a CArray[uint8] variable filled by calling that function 22:33
because i'd like this to work without a nativecast from Pointer to CArray
timotimo is my expectation wrong, or is this the right idiom i should look to implement? 22:37
Xliff Looking 22:39
Xliff timotimo: I think we've had this discussion before. 22:43
But lemme verify.
Xliff OK. Write error is gone, but 23 fails. 22:44
Xliff expected 14, got 2056 22:45
timotimo so what happens there? 22:47
Xliff I will gist what I've done in a sec. 22:52
Just things aren't working to even my expectations, atm.
Xliff ptr = &buffer 23:04
buffer is already *buffer since it's an array
or *prt = (void *)buffer 23:07
or *ptr = (void *)buffer, even
timotimo: Also, looks like the "is rw" trait isn't getting applied, since I get "4" back even though I've verified that $buffer was set. 23:09
timotimo: gist.github.com/Xliff/13aff4976b12...0dad62bea6 23:15
^^ Gets rid of the "invalid write of size 8"
But the buffer remains unchanged.
now to figure out why $c.package.^name gets through my while loop eq to 'GLOBAL' when I have this at the end of it: "next if $c.package.^name eq 'GLOBAL';" 23:17
timotimo wait, now you're assigning to ptr, doesn't that not change what's passed in? 23:18
Xliff Hmmm... 23:21
OK. Was focused on getting rid of that error. 23:22
That does defeat the purpose.
Apologies. I'm scattered between projects ATM
\o/ 23:27
replace "short" with "char"\
I will update gist. 23:28
timotimo is that what makes the number wrong? 23:29
Xliff updated
timotimo i think moar just doesn't have support for an "is rw" CArray
Xliff Well, I went back to setting *ptr
timotimo what we have now works? 23:30
Xliff And switching short (which looks to be 16 bits, not 8) to char seems to have done the trick.
timotimo oh, d'oh
i didn't want to add another header so i could have uint8_t
Xliff Also, $buffer had to go from CArray[uint8] to CArray[CArray[uint8]
timotimo but now you have CArray[CArray[uint8]]
Xliff Yes. 23:31
timotimo i wish it were different
Xliff Lemme reset that and see if I get same results. You might be right about "is rw"
Yeah. Blows up with CArray[uint8] 23:33
timotimo right
it seems that it's even treating CArray[something] $foo is rw as if the rw weren't there at all
Xliff Yeah.
Xliff Now you know some of my pain. :) 23:33
timotimo so it could also be a good idea to throw a warning or an error in the "check signature sanity" part of NativeCall
at least until I or someone else implements that
Xliff Yes.
So now you know why I do CArray[Pointer[SomeStruct]] 23:34
timotimo right
Xliff Rather than CArray[SomeStruct]
The latter just isn't supported.
timotimo greppable6: CArray.*is\s+rw
greppable6 timotimo, 35 lines, 13 modules: gist.github.com/3a08124f14dbd77437...e2534f56ef 23:35
timotimo that'll require a little bit of care, i guess 23:36
Xliff Yeah.
timotimo should there be a transition period or something? :) 23:37
Xliff Give a heads up now and a few release to catch up. 23:38
So. Yes. ;)
timotimo one or two releases warn, another errors, the next one makes it work properly? 23:41
maybe?
Xliff Sure! 23:52
I'd actually go 1 warn, 1 error next fix.\ 23:53
So 3 releases.
m: my @a = <A B C D>; my $i = 0; while $a = @a[$i++] { next if $a eq 'B'; $a.say } 23:55
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$a' is not declared. Did you mean '@a'?
at <tmp>:1
------> 3my @a = <A B C D>; my $i = 0; while 7⏏5$a = @a[$i++] { next if $a eq 'B'; $a.sa
Xliff m: my @a = <A B C D>; my $i = 0; while my $a = @a[$i++] { next if $a eq 'B'; $a.say }
camelia A
C
D
guifa If there’s only one method of a given name, attaching “multi” to it shouldn’t do anything, right? 23:58
Xliff No. If you do that and it's the only routine, rakudo will throw an error
guifa Hrm, it’s not throwing an error, it’s just pretending as if it didn’t happen.
Xliff guifa: Code? 23:59
\o lizmat!
guifa Lemme see if I can golf it down. It involves crud from a few different files
Xliff Throw it all up! :)