»ö« 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 | |
00:05
pecastro left
|
|||
chee | i'm calling the police | 00:06 | |
DrForr | Local afternoon - anyone familiar with creating traits? | 00:11 | |
00:16
patrickb left
00:25
aindilis joined
|
|||
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 | ||
00:38
Cabanossi left
00:40
netrino joined,
El_Che left
|
|||
DrForr | Ah, the proto I'm guessing... | 00:41 | |
00:41
El_Che joined,
Cabanossi joined
00:42
sortiz left
00:47
ayerhart left
00:48
ayerhart joined
|
|||
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 | |
00:54
perl007 joined
|
|||
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 | ||
00:59
perl007 left
|
|||
DrForr | And yes, I'm writing a talk up on it as well. | 00:59 | |
01:11
MasterDuke joined
01:12
MasterDuke left,
MasterDuke joined
01:15
netrino left
01:16
zachk left
01:20
w_richard_w left
|
|||
vrurg | DrForr: did you see Red? | 01:34 | |
01:36
snarkyboojum left
01:43
kentnl is now known as kent\n
|
|||
DrForr | Oh, that's who you are. Hi, not yet, I've literally just gotten to town. | 01:45 | |
01:49
mahafyi left
01:52
choiboi joined
01:57
choiboi left,
choiboi joined
02:02
cfa left
|
|||
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 | |
02:08
w17t left
|
|||
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 | |
02:09
woolfy left
|
|||
timotimo | isn't ORM::Tiny a lot older than Red? | 02:09 | |
02:10
lizmat left
|
|||
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. | |||
02:22
perl007 joined
02:24
molaf left
|
|||
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 | |
02:26
perl007 left
|
|||
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 | |
02:37
molaf joined
|
|||
timotimo | ah, heh. | 02:38 | |
02:55
woolfy joined
|
|||
tbrowder | guifa: present? | 03:05 | |
03:06
angelds joined
|
|||
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. | ||
03:33
choiboi left
03:41
zacts joined
03:58
sacomo joined
04:10
zacts left
|
|||
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 | ||
04:24
zacts joined
04:26
ayerhart left
04:27
ayerhart joined
04:43
zacts left,
dct joined
04:53
dct left
04:54
kent\n left
04:58
kent\n joined
05:00
angelds left
|
|||
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 | |||
05:08
ferreira left
05:09
hythm joined
|
|||
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 | |
05:16
molaf left
|
|||
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 | |
05:29
zacts joined
|
|||
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 | ||
05:46
zacts left
05:51
zacts joined
05:54
curan joined
|
|||
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 | ||
06:06
zacts left
06:12
ayerhart left,
kent\n left
06:15
ayerhart joined
06:19
ayerhart left
06:26
kent\n joined
06:28
hythm left
06:32
nebuchadnezzar joined
06:35
sauvin joined
06:36
jmerelo joined
|
|||
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" |
|||
07:00
sena_kun joined
|
|||
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. | ||
07:12
ravenousmoose joined
07:15
ravenousmoose_ joined
07:17
ravenousmoose left
|
|||
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 |
|||
07:21
jmerelo left
07:32
rindolf joined
07:48
lizmat joined,
w17t joined
08:02
ufobat joined
08:15
pecastro joined
08:22
ravenousmoose joined
08:26
ravenousmoose left
08:32
sena_kun left
08:34
pecastro left
08:38
Kaiepi left
08:40
dakkar joined
08:41
rindolf left
08:57
eseyman joined
|
|||
SmokeMachine | DrForr: You could help us with Red if you want... :) | 08:58 | |
09:03
sena_kun joined
09:11
ravenousmoose joined
09:13
ravenousmoose_ left
09:15
rindolf joined
09:19
mowcat left,
mowcat joined
09:22
kensanata joined
09:51
cjkinni left
09:57
cjkinni joined
10:04
ravenousmoose left
10:05
ravenousmoose joined
10:08
random_yanek left
10:20
random_yanek joined
10:26
dominix_ joined
10:30
dominix__ left
|
|||
SmokeMachine | m: say "hi Camelia" | 10:32 | |
camelia | hi Camelia | ||
10:37
angelds joined
10:38
kensanata left
10:49
w17t left
10:50
Kaiepi joined
11:32
curan left
11:35
snarkyboojum joined
|
|||
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 | |
12:03
kensanata joined
|
|||
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 | |
12:33
lucasb joined
|
|||
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 | ||
12:45
w17t joined
|
|||
jkramer | sena_kun: You're probably right, all commits in their repos are done by other users, not shuppet | 12:45 | |
12:47
ravenous_ joined
12:51
ravenous_ left
|
|||
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 | |||
13:37
snarkyboojum left
|
|||
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 | |||
13:46
perl007 joined
|
|||
lizmat | sno: I cannot repro the problem | 13:47 | |
SmokeMachine | lizmat: was that for me? | ||
13:47
cpage_ joined
|
|||
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 | |
13:50
cpage left,
cpage_ is now known as cpage,
dotdotdot left
13:54
dotdotdot joined
14:00
reach_satori left
14:13
hd joined
14:28
perl007 left
14:40
hd left
14:49
kurahaupo left,
kurahaupo_ joined
14:53
kaare_ joined,
kaare__ left
14:54
Sgeo joined
14:57
Sgeo__ left
14:59
angelds left
15:04
Sgeo_ joined
15:07
Sgeo left
15:17
lizmat left
|
|||
Geth | doc: d458018c2a | cfa++ | doc/Type/Pair.pod6 Fix typo. |
15:20 | |
synopsebot | Link: doc.perl6.org/type/Pair | ||
15:22
molaf joined
|
|||
Geth | doc: 51479affec | cfa++ | doc/Type/Pair.pod6 Clarification. |
15:28 | |
synopsebot | Link: doc.perl6.org/type/Pair | ||
15:33
sno left
15:35
Sgeo joined
15:38
Sgeo_ left
|
|||
Geth | doc: 53976f875c | cfa++ | 2 files Fix typo, reference signatures from Type/Sub (closes #2625). |
15:41 | |
15:53
Actualeyes joined
15:56
kensanata left
16:02
woolfy left
16:06
ravenous_ joined,
ferreira1 joined
|
|||
Altreus | hello | 16:08 | |
jkramer: ya, shuppet is an organisation | |||
16:10
ravenous_ left
|
|||
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 :) | |||
16:22
jmerelo joined
|
|||
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 | |||
16:28
w17t left
16:30
ferreira1 left
16:31
sno joined
16:38
titsuki joined
16:50
llfourn left
|
|||
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 | ||
16:51
llfourn joined
|
|||
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 | ||
17:09
lucs left,
hobbs left,
wmoxam left
17:15
hobbs joined
17:16
hobbs left,
hobbs joined
17:17
awwaiid left,
wmoxam joined
17:18
ferreira1 joined
17:26
kurahaupo_ left,
kurahaupo joined,
kurahaupo left
17:27
kurahaupo joined
17:36
dakkar left
17:37
awwaiid joined
17:41
zacts joined
|
|||
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 | |
17:59
sno left
18:05
zachk joined
18:07
kurahaupo left
18:08
kurahaupo joined,
kurahaupo left,
kurahaupo joined
18:13
reach_satori joined
18:19
cfa joined
|
|||
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) |
||
18:25
lucs joined
|
|||
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 |
||
18:27
random_yanek left
|
|||
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 | ||
18:39
random_yanek joined
|
|||
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 | ||
18:46
zacts left
18:52
kurahaupo_ joined,
kurahaupo left
18:53
kurahaupo_ left,
kurahaupo joined
18:54
ravenous_ joined
18:58
ufobat_ joined
|
|||
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 |
||
19:02
ufobat left
|
|||
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 | ||
19:17
mowcat left
|
|||
timotimo | maybe precomp didn't invalidate and recompile for some reason?!? | 19:18 | |
guifa | Ah possibly. Didn’t think about that | 19:19 | |
19:20
ravenous_ left
19:21
ravenous_ joined
19:28
sauvin left
19:29
mowcat joined
19:30
perl007 joined
19:31
ravenous_ left
19:32
ravenous_ joined
19:42
ryn1x left
19:46
molaf left,
ravenous_ left
19:47
ravenous_ joined
19:48
netrino_ joined
|
|||
Xliff | Is there any way to get the calling Routine object from a Block? | 19:50 | |
19:52
ravenous_ left
19:54
ravenous_ joined,
random_yanek left
20:01
xinming_ joined
20:03
xinming left
20:06
random_yanek joined
20:17
jmerelo left
20:25
kurahaupo left
20:26
kurahaupo joined,
kurahaupo left,
kurahaupo joined
20:34
SyrupThinker left
20:35
SyrupThinker joined
|
|||
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 | ||
20:40
molaf joined
20:41
SyrupThinker left
20:42
SyrupThinker joined
20:44
sno joined
|
|||
timotimo | wakelift.de/2019/02/21/always-wear...scalaring/ - published my latest grant report for moarperf | 20:46 | |
20:46
lizmat joined
20:48
Kaiepi left,
SyrupThinker left
20:50
SyrupThinker joined
20:51
sno left
20:53
SyrupThinker left
20:54
ravenous_ left
20:56
sno joined
20:58
lizmat left
21:01
lizmat joined
|
|||
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 | |||
21:04
ravenous_ joined
|
|||
xinming_ | timotimo: Thanks | 21:05 | |
21:05
sena_kun left
21:12
lizmat left
21:15
choiboi joined
21:16
choiboi left,
sno left
21:17
choiboi joined
21:19
perl007 left
|
|||
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 |
||
21:23
Xliff left
21:29
Actualeyes left
21:32
lucasb left
21:35
zacts joined
|
|||
cfa | hmm, bailador dies on GET: github.com/Bailador/Bailador/issues/313 | 21:49 | |
not sure whether any bailador folks are around | |||
21:52
molaf left
21:54
sno joined
21:57
ayerhart joined
|
|||
tadzik | I'm not sure if Bailador has anything left of the initial napkin version I wrote :) | 21:58 | |
21:59
Xliff joined
|
|||
Xliff | \o | 21:59 | |
tadzik | damn, almost 800 commits to it | ||
Xliff | m: say Block ~~ Routine | ||
camelia | False | ||
21:59
random_yanek left
|
|||
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 | :) | ||
22:00
SyrupThinker joined
|
|||
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 | |||
22:09
ravenous_ left
22:11
random_yanek joined
22:12
cjkinni left,
cjkinni joined
|
|||
guifa ’s ears perk up. Bad Spanish wha? where?! | 22:20 | ||
22:20
mowcat left
|
|||
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] | |||
22:26
choiboi left
22:27
dominix__ joined
|
|||
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 | |||
22:31
dominix_ left
|
|||
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 | |||
22:35
SyrupThinker left,
SyrupThinker joined
|
|||
timotimo | is my expectation wrong, or is this the right idiom i should look to implement? | 22:37 | |
Xliff | Looking | 22:39 | |
22:41
SyrupThinker left
22:42
MasterDuke left
|
|||
Xliff | timotimo: I think we've had this discussion before. | 22:43 | |
But lemme verify. | |||
22:43
Kaiepi joined
|
|||
Xliff | OK. Write error is gone, but 23 fails. | 22:44 | |
22:44
SyrupThinker joined
22:45
kkielak joined
|
|||
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. | |||
22:56
zacts left
|
|||
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 | ||
23:17
snarkyboojum joined
|
|||
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. | ||
23:33
kkielak left
|
|||
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 | |
23:35
ryn1x joined
|
|||
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? | |||
23:48
snarkyboojum_ joined
23:51
snarkyboojum left
|
|||
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 |
||
23:57
Kaiepi left,
snarkyboojum_ left,
w_richard_w joined
|
|||
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. | ||
23:59
lizmat joined
|
|||
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! :) |