»ö« 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. |
|||
00:02
mcmillhj left
00:03
daxim joined,
p6bannerbot sets mode: +v daxim
|
|||
timotimo | i made an animated | 00:08 | |
00:08
mcmillhj joined
|
|||
timotimo | not sure if imgur is liking the file | 00:08 | |
if not, it'll go up on hack | |||
00:09
p6bannerbot sets mode: +v mcmillhj
|
|||
timotimo | hack.p6c.org/~timo/flashy_ca_video.mp4 - potentially bad for people with epilepsy or motion sensitivity | 00:11 | |
(also, it's sped up a little) | |||
Herby_ | hmm | 00:12 | |
in firefox nightly, getting a "video can't be played because the file is corrupt" | |||
00:13
mcmillhj left
|
|||
timotimo | :o | 00:15 | |
MasterDuke | same in ff 61 | 00:20 | |
00:20
mcmillhj joined
|
|||
timotimo | can you download it and play it with any old media player? | 00:20 | |
00:21
p6bannerbot sets mode: +v mcmillhj
|
|||
MasterDuke | works in vlc. and man, you weren't kidding about the flashing | 00:22 | |
timotimo | my deflicker mode didn't do much :D | ||
Herby_ | could be my browser, wont let me download it either | 00:24 | |
timotimo | o_O | ||
i've got a different one that's less flashing | 00:25 | ||
00:25
mcmillhj left
|
|||
timotimo | but man, i should really render it differently than this :d | 00:25 | |
MasterDuke | what is it? i hope not a visual virus meant to infect the human brain | 00:28 | |
timotimo | just a simple cellular automaton | ||
00:30
mcmillhj joined
00:31
p6bannerbot sets mode: +v mcmillhj
00:35
mcmillhj left
00:44
mcmillhj joined
00:45
p6bannerbot sets mode: +v mcmillhj
|
|||
SmokeMachine | How difficult would it be to some one port Rakudo to iOS, as some one did with python? | 00:46 | |
00:49
mcmillhj left
|
|||
SmokeMachine | That is an app I’d love to buy! | 00:49 | |
01:11
mcmillhj joined
01:12
p6bannerbot sets mode: +v mcmillhj
01:15
mcmillhj left
01:35
bjs12 joined
01:36
bjs12 left,
mcmillhj joined
01:37
p6bannerbot sets mode: +v mcmillhj
01:41
mcmillhj left
|
|||
Herby_ | timotimo: what text editors or ide do you use for your p6 coding? | 01:45 | |
01:50
mcmillhj joined,
p6bannerbot sets mode: +v mcmillhj
01:54
mcmillhj left
01:55
molaf left
01:57
Herby__ joined
01:58
p6bannerbot sets mode: +v Herby__
|
|||
MasterDuke | Herby_: over in #moarvm he said he was going to bed about an hour ago | 01:59 | |
Herby__ | ahh ok | ||
MasterDuke: what do you use? | |||
I'm pingponging between vscode and vim | |||
MasterDuke | vim | 02:00 | |
Herby__ | hmmm | 02:01 | |
02:04
dalek left
02:05
dalek joined,
ChanServ sets mode: +v dalek,
p6bannerbot sets mode: +v dalek
02:07
molaf joined
02:08
p6bannerbot sets mode: +v molaf
02:21
mcmillhj joined,
p6bannerbot sets mode: +v mcmillhj,
Ven` joined
02:22
p6bannerbot sets mode: +v Ven`
02:24
aindilis joined,
p6bannerbot sets mode: +v aindilis
02:25
mcmillhj left
02:26
Ven` left
02:38
mcmillhj joined
02:39
p6bannerbot sets mode: +v mcmillhj
02:42
mcmillhj left
02:44
molaf left,
daxim left,
isacl_ left
02:45
molaf joined,
dalek left,
sftp left,
beeman left,
ccc left,
p6bannerbot sets mode: +v molaf
02:46
daxim joined
02:47
p6bannerbot sets mode: +v daxim,
isacl_ joined,
p6bannerbot sets mode: +v isacl_,
ccc joined
02:48
beeman joined,
p6bannerbot sets mode: +v beeman,
p6bannerbot sets mode: +v ccc
02:50
sftp joined,
p6bannerbot sets mode: +v sftp
02:54
dalek joined,
ChanServ sets mode: +v dalek
02:55
p6bannerbot sets mode: +v dalek
02:58
Herby__ left
02:59
justache21 joined
03:01
HarryCross29 joined
03:04
justache21 left,
HarryCross29 left
03:09
mcmillhj joined,
p6bannerbot sets mode: +v mcmillhj
03:13
mcmillhj left
03:25
camelia left
03:26
esh left
03:27
nine left
03:32
MasterDuke left,
camelia joined,
esh joined
03:33
p6bannerbot sets mode: +v camelia,
nine joined,
p6bannerbot sets mode: +v esh
03:34
p6bannerbot sets mode: +v nine
03:40
mcmillhj joined
03:41
p6bannerbot sets mode: +v mcmillhj
03:46
mcmillhj left
03:55
lizmat joined,
p6bannerbot sets mode: +v lizmat
03:59
lizmat left
04:01
mcmillhj joined
04:02
p6bannerbot sets mode: +v mcmillhj,
sftp left
04:05
mcmillhj left
04:07
xinming_ left,
sftp joined,
p6bannerbot sets mode: +v sftp,
xinming joined
04:08
p6bannerbot sets mode: +v xinming
04:22
nightfrog left
04:25
nightfrog joined
04:26
molaf left,
p6bannerbot sets mode: +v nightfrog
04:29
Herby_ left
04:38
mcmillhj joined
04:39
p6bannerbot sets mode: +v mcmillhj
04:44
mcmillhj left
04:47
silug left,
nightfrog left
04:49
nightfrog joined
04:50
p6bannerbot sets mode: +v nightfrog
04:53
vrurg left
04:57
Ven` joined
04:58
p6bannerbot sets mode: +v Ven`,
mcmillhj joined
04:59
p6bannerbot sets mode: +v mcmillhj
05:02
Ven` left
05:03
mcmillhj left
05:10
bairdmich joined
05:14
bairdmich left
05:19
ZL1981 joined,
ZL1981 left
05:30
mcmillhj joined
05:31
p6bannerbot sets mode: +v mcmillhj
05:34
mephinet left,
reu left
05:35
mcmillhj left
05:45
sauvin joined,
p6bannerbot sets mode: +v sauvin,
mcmillhj joined,
ccc left
05:46
spycrab0 left,
p6bannerbot sets mode: +v mcmillhj
05:49
rindolf joined
05:50
p6bannerbot sets mode: +v rindolf,
mcmillhj left
06:06
DoverMo joined
06:07
p6bannerbot sets mode: +v DoverMo,
hami joined,
p6bannerbot sets mode: +v hami
06:09
domidumont joined
06:10
p6bannerbot sets mode: +v domidumont,
mcmillhj joined
06:11
p6bannerbot sets mode: +v mcmillhj
06:14
AlexDaniel left
06:15
mcmillhj left
06:19
domidumont left
06:26
|oLa| left
06:27
mcmillhj joined,
p6bannerbot sets mode: +v mcmillhj
06:30
yubimusubi left
06:31
mcmillhj left
06:35
leont joined
06:36
p6bannerbot sets mode: +v leont
06:37
Aceeri_ joined,
p6bannerbot sets mode: +v Aceeri_
06:39
Possum joined,
p6bannerbot sets mode: +v Possum
07:50
ilogger2 joined,
ChanServ sets mode: +v ilogger2
07:51
p6bannerbot sets mode: +v ilogger2
07:58
scimon joined,
p6bannerbot sets mode: +v scimon
08:00
Ven` joined
|
|||
rindolf | hi all! Please help with the error in github.com/shlomif/perl6-CI-Gen/bl...CI/Gen.pm6 | 08:00 | |
08:01
p6bannerbot sets mode: +v Ven`
|
|||
rindolf | see www.shlomifish.org/Files/files/text/f.txt | 08:02 | |
buggable | New CPAN upload: Trait-Env-0.5.1.tar.gz by SCIMON modules.perl6.org/dist/Trait::Env:cpan:SCIMON | 08:03 | |
rindolf | some of the rakudo errors are not too helpful | ||
08:05
mcmillhj joined
08:06
p6bannerbot sets mode: +v mcmillhj
|
|||
rindolf | anyone? | 08:06 | |
08:09
robertle joined,
p6bannerbot sets mode: +v robertle
08:10
mcmillhj left
|
|||
scimon | Just looking. | 08:12 | |
rindolf | how do i pass an array ref to a subroutine? | 08:14 | |
scimon | xml-g-write-bash is calling write-bash with named parameters ( param-name=>$param-name etc) but wr-tebash is expecting positional parameters. | ||
Perl6 doesn't have Array Ref's it's got array objects. | 08:15 | ||
Xliff | \o | ||
scimon | That you can just pass. | ||
Xliff | What's the best way to convert a signed integer to uint8/16/32/64? | ||
08:15
dakkar joined
|
|||
Xliff | I was doing $int +& 0xffff, but that's only good for unsigned. | 08:16 | |
scimon | Easiest fix for rindolf is check write-bash to have this signature : (:$param-name, :@pkgs ) | ||
08:16
p6bannerbot sets mode: +v dakkar
|
|||
scimon | Makes the arguments named. :) | 08:16 | |
Not sure about the signed thing. Bit shifting isn't my forte. | |||
Xliff | ($int +& 0xffff) * ($int < 0) ?? -1 !! 1 | 08:17 | |
Or.., maybe ($int +& 0x7fff) * ($int < 0) ?? -1 !! 1 | |||
rindolf | scimon: thanks | 08:18 | |
08:20
Kaypie joined
08:21
p6bannerbot sets mode: +v Kaypie
08:22
lizmat joined,
p6bannerbot sets mode: +v lizmat
|
|||
rindolf | scimon: thanks, fixed now | 08:25 | |
Xliff: perhaps use $int.abs | |||
Xliff | rindolf: Good point. Thanks! | 08:26 | |
rindolf | Xliff: you're welcome | 08:27 | |
08:34
cosimo joined,
p6bannerbot sets mode: +v cosimo
|
|||
lizmat | weekly: brrt-to-the-future.blogspot.com/201...pdate.html | 08:35 | |
notable6 | lizmat, Noted! | ||
scimon | rindolf: www.youtube.com/watch?v=obYlOurt-44 A little talk I did on signatures in Perl6. | 08:41 | |
(I did a longer one with Types and Multi Methods as TPCiG) | |||
rindolf | scimon: ah | 08:42 | |
scimon: thanks | |||
scimon: are there slides? | 08:43 | ||
masak | woot, hygienic macros! brrt++ | ||
scimon | www.slideshare.net/SimonProctor8/p...signatures | 08:44 | |
rindolf | scimon: thanks | ||
scimon | github.com/ugexe/Perl6-ecosystems : So this says is updates every 1-2 hours but it's also saying it last updated 11 hours ago? It that because it only pushes changes if there's been releases? | 08:51 | |
08:51
pmurias joined
|
|||
scimon | rindolf: No problems. I hope it helps :) | 08:52 | |
08:52
p6bannerbot sets mode: +v pmurias
|
|||
rindolf | scimon: it does | 08:55 | |
08:59
mcmillhj joined
09:00
p6bannerbot sets mode: +v mcmillhj
09:04
mcmillhj left
|
|||
scimon | Cool... I'll wait :) | 09:05 | |
(Problem is the 0.5.0 release of Trait::Env I did last night kinda breaks. I rolled out a fix but as I'm using it in work I've sort of borked a release pipeline. Ho hum). | 09:07 | ||
On the bright side my @path is env; is now a thing and does what you expect so that's kinda cool. | |||
09:07
pmurias left
09:08
pmurias joined,
pmurias left
09:10
spycrab0 joined,
p6bannerbot sets mode: +v spycrab0
09:13
pmurias joined
09:14
p6bannerbot sets mode: +v pmurias
09:16
mcmillhj joined
09:17
p6bannerbot sets mode: +v mcmillhj
09:20
mcmillhj left
09:32
zakharyas joined
09:33
p6bannerbot sets mode: +v zakharyas
09:45
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
p6bannerbot sets mode: +v aborazmeh
09:46
p6bannerbot sets mode: +v aborazmeh
09:47
domidumont joined,
p6bannerbot sets mode: +v domidumont
09:49
ExtraCrispy joined
09:50
p6bannerbot sets mode: +v ExtraCrispy,
AlexDaniel joined,
p6bannerbot sets mode: +v AlexDaniel
10:08
domidumont left
10:27
Ven` left
10:39
Hor|zon left
10:43
Hor|zon joined
10:44
p6bannerbot sets mode: +v Hor|zon
|
|||
pmurias | the irc log seems to be down :( | 10:44 | |
11:07
zakharyas left,
zakharyas joined
|
|||
timotimo | isup.me confirms that it seems to be down | 11:07 | |
11:08
p6bannerbot sets mode: +v zakharyas
11:09
HaraldJoerg joined
11:10
p6bannerbot sets mode: +v HaraldJoerg
11:23
zakharyas left
11:24
Ven` joined
11:25
p6bannerbot sets mode: +v Ven`
11:28
Ven` left
11:30
spycrab0 left
11:32
aborazmeh left
11:44
Ven` joined,
p6bannerbot sets mode: +v Ven`
11:58
eiro joined,
p6bannerbot sets mode: +v eiro
|
|||
timotimo | hack.p6c.org/~timo/wobbly_ca_anim.mp4 - new animation that's not nearly as flashy as the previous one! | 12:02 | |
pmurias | timotimo: that's footage of a Perl 6 game of life? | 12:03 | |
timotimo | it's different from game of life in many respects, but yeah. also, that's not a screen recording, that's frames rendered out and then assembled into a video | 12:04 | |
are you interested in the specifics? :) | 12:06 | ||
12:10
pmurias left
12:14
pmurias joined,
broquaint joined
12:15
p6bannerbot sets mode: +v pmurias,
p6bannerbot sets mode: +v broquaint
12:23
molaf joined
12:24
p6bannerbot sets mode: +v molaf
12:35
ggoebel joined
12:36
p6bannerbot sets mode: +v ggoebel
|
|||
ggoebel | can't backlog today :-( colabti.org is inaccessible. Does anyone know what's up? | 12:39 | |
timotimo | not sure, just that multiple people noticed :( | 12:41 | |
pmurias | maybe the EU sent a strike team to take out our remaining irc log? | 12:43 | |
;) | |||
timotimo | i'll try to get you something | ||
hack.p6c.org/~timo/perl6_log.html | 12:47 | ||
ggoebel: check this out ^ | 12:49 | ||
i swear i saw someone else ask for logs | 12:52 | ||
anyway, same url format for moarvm and perl6-dev as well | |||
13:05
zakharyas joined
13:06
p6bannerbot sets mode: +v zakharyas
13:12
pmurias left
13:18
pmurias joined
13:19
p6bannerbot sets mode: +v pmurias
13:27
AlexDaniel left
13:29
lichtkind joined
13:30
p6bannerbot sets mode: +v lichtkind
|
|||
lichtkind | how do i say that a role relies on a attribute of the class to be present? | 13:30 | |
timotimo | well, attributes are, to an outside observer, "just" methods, so you could ask for a method to be present | 13:32 | |
lichtkind | yes | ||
thank you | |||
and you can not get a sub via a role? | 13:33 | ||
13:34
vrurg joined
|
|||
timotimo | no, subs are a package thing, not a class thing | 13:34 | |
13:34
p6bannerbot sets mode: +v vrurg
|
|||
lichtkind | allright thatswhy they were not mentioned , thanks again | 13:35 | |
timotimo | no prob :) | ||
er | |||
i should be more clear | |||
subs are "my" scoped by default, so they aren't even a package thing, but totally lexical | |||
"our" subs are a package thing, though | 13:36 | ||
13:36
Ven` left
|
|||
El_Che | good safe :) | 13:37 | |
yoleaux | 4 Sep 2018 19:09Z <AlexDaniel> El_Che: Not sure what's going on in M#951 but can I have arm arch configured for the canary repo? :) | ||
synopsebot | M#951 [open]: github.com/MoarVM/MoarVM/issues/951 [⚠ blocker ⚠] Problem running programs on RPi with 2018.08 | ||
yoleaux | 4 Sep 2018 19:11Z <AlexDaniel> El_Che: and if it's possible, then I guess arm64 won't hurt also? | ||
timotimo | yeah, actually it'd be fair to say i was wrong the first time | ||
lichtkind: ^- important clarification/correction | |||
Geth | doc: 0b8c7ba2f3 | (Will "Coke" Coleda)++ | doc/Type/Proc.pod6 Treat code block as signature |
13:38 | |
synopsebot | Link: doc.perl6.org/type/Proc | ||
El_Che | .tell AlexDaniel` That needs some work. Travis is x64 only, so will have to run a qemu image to run the acutal image. It can be done, but not easily | 13:40 | |
yoleaux | El_Che: I'll pass your message to AlexDaniel`. | ||
13:47
Ven` joined
13:48
p6bannerbot sets mode: +v Ven`
13:55
pmurias left
13:56
pmurias joined,
cosimo left
13:57
p6bannerbot sets mode: +v pmurias,
pmurias left
13:59
pyrimidine joined
14:00
p6bannerbot sets mode: +v pyrimidine
14:02
pmurias joined
14:03
p6bannerbot sets mode: +v pmurias
|
|||
vrurg | Hi! Any known workaround for bug rt.perl.org/Public/Bug/Display.html?id=130794 ? I can only think of splitting conflicting symbols in separate files and still not sure if it would work out. | 14:03 | |
14:07
lizmat left
14:08
sarna joined,
pmurias left
14:09
p6bannerbot sets mode: +v sarna
|
|||
sarna | hey, what does * mean in a twigil like @*foo? | 14:10 | |
geekosaur | normally, a dynamic variable. but in a signature it's special (dynamic variables can't occur there), means its "slurpy" | 14:12 | |
timotimo | well, in signatures the * actually goes in front of the sigil | 14:13 | |
though saying *@ is a twigil is probably also not wrong | 14:14 | ||
like, an argument could be made | |||
geekosaur | whoops, rigth | ||
14:16
cosimo joined
|
|||
geekosaur | anyway docs.perl6.org/language/variables#The_*_twigil | 14:16 | |
14:17
p6bannerbot sets mode: +v cosimo
|
|||
El_Che | I always think of %*ENV | 14:17 | |
and I translate dynamic to global in my head | 14:18 | ||
sarna | thanks :) | 14:19 | |
14:19
pmurias joined
14:20
p6bannerbot sets mode: +v pmurias
14:22
Hor|zon left,
cosimo left
14:27
pmurias left,
pmurias joined
14:28
p6bannerbot sets mode: +v pmurias
14:30
MilkmanDan joined,
p6bannerbot sets mode: +v MilkmanDan
14:33
mcmillhj joined
14:34
p6bannerbot sets mode: +v mcmillhj
14:35
Hum4n joined,
p6bannerbot sets mode: +v Hum4n
14:45
pmurias left
14:47
pmurias joined,
p6bannerbot sets mode: +v pmurias
14:49
scotticles joined
14:50
p6bannerbot sets mode: +v scotticles
14:55
cosimo joined
14:56
p6bannerbot sets mode: +v cosimo
14:58
silug joined
14:59
p6bannerbot sets mode: +v silug
15:02
zxcvz joined
15:03
p6bannerbot sets mode: +v zxcvz
15:19
meichangsu joined,
p6bannerbot sets mode: +v meichangsu
15:27
scotticles left,
Kaypie is now known as Kaiepi,
sena_kun joined
15:28
p6bannerbot sets mode: +v sena_kun
|
|||
sarna | can I somehow call subs like methods so I get a nice .foo instead of foo($_) while dealing with a topic variable? | 15:30 | |
sena_kun | m: sub foo($_) {.say}; 1.&foo; | 15:31 | |
camelia | 1 | ||
sena_kun | sarna, like this? ^ | ||
m: sub foo($_) {.say}; my $_ = 1; .&foo; | 15:32 | ||
camelia | Potential difficulties: Redeclaration of symbol '$_' at <tmp>:1 ------> 3sub foo($_) {.say}; my $_7⏏5 = 1; .&foo; 1 |
||
15:32
AlexDaniel joined,
p6bannerbot sets mode: +v AlexDaniel
|
|||
sena_kun | It gives a warning because of an explicit declaration, but I hope I understood you correctly. :) | 15:32 | |
15:33
Ven` left
|
|||
sarna | sena_kun: whoa, that's interesting. I can't name the parameter though in this case, can I? | 15:34 | |
sena_kun | sarna, I think you can. I just used `$_` as parameter to make code shorter. :) | 15:35 | |
m: sub foo($foo, $bar) {say $foo + $bar}; my $_ = 2; .&foo(2); | |||
camelia | Potential difficulties: Redeclaration of symbol '$_' at <tmp>:1 ------> 3foo($foo, $bar) {say $foo + $bar}; my $_7⏏5 = 2; .&foo(2); 4 |
||
sena_kun | sarna, ^ | ||
geekosaur | bare . doesn't care about $_ so much as it wants to be method instead of sub | 15:36 | |
sarna | m: sub foo($x) {say $x}; given "hello" { .&foo } | 15:37 | |
camelia | hello | ||
geekosaur | althogh .&... overrides that | ||
sarna | oh my! | ||
thanks sena_kun <3 | |||
geekosaur | but it's using . / metod syntax with no invocantt hat defaults to $_, not someting abiout the sub/method | ||
geekosaur hates this keyboard | 15:38 | ||
(managed to break oldone, this is a crappy backup) | |||
sena_kun | that's a very useful info, thanks. | 15:39 | |
sena_kun takes notes | |||
15:42
Ven` joined
15:43
p6bannerbot sets mode: +v Ven`
15:46
itaipu joined
15:47
p6bannerbot sets mode: +v itaipu
|
|||
sarna | is there a sub like is-upper? I'm browsing the docs but can't find anything like this, only .uc | 15:47 | |
15:47
robertle left
|
|||
sena_kun | sarna, I can come up with just doing `$foo eq $foo.uc`. | 15:47 | |
sarna | sena_kun: well yeah, that's what I'll end up doing I think | 15:48 | |
sena_kun | you also can check with regex, but I believe that might be not so fast. | ||
15:49
chenyf joined
|
|||
sarna | and less readable, I think | 15:49 | |
15:49
p6bannerbot sets mode: +v chenyf
|
|||
jkramer | m: sub is-upper(\c) { ?c.uniprops.first('Lu') }; say 'a'.&is-upper; say 'A'.&is-upper | 15:54 | |
camelia | False True |
||
sena_kun | jkramer, didn't they mean checking a string, not a letter? But yes, with minor patching if string checking is needed, this way seems very nice. | 15:55 | |
sarna, ^ | |||
jkramer | m: sub is-upper(\c) { ?c.uniprops.first('Lu') }; 'FOO'.comb.all.&is-upper.say | 15:56 | |
camelia | all(True, True, True) | ||
jkramer | m: sub is-upper(\c) { ?c.uniprops.first('Lu') }; say ?'FOO'.comb.all.&is-upper | ||
camelia | True | ||
15:58
ibo2go joined,
p6bannerbot sets mode: +v ibo2go
|
|||
jkramer | m: sub is-upper(\string) { string.uniprops.all eq 'Lu' }; say 'FOO'.&is-upper; say 'FOo'.&is-upper | 15:58 | |
camelia | all(True, True, True) all(True, True, False) |
||
jkramer | m: sub is-upper(\string --> Bool) { string.uniprops.all eq 'Lu' }; say 'FOO'.&is-upper; say 'FOo'.&is-upper | ||
camelia | Type check failed for return value; expected Bool but got Junction (all(Bool::True, Bool:...) in sub is-upper at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
jkramer | m: sub is-upper(\string) { ?(string.uniprops.all eq 'Lu') }; say 'FOO'.&is-upper; say 'FOo'.&is-upper | ||
camelia | True False |
||
chenyf | hi, #perl6 | 15:59 | |
sena_kun | chenyf, o/ | 16:00 | |
16:03
telma joined,
p6bannerbot sets mode: +v telma
|
|||
telma | Hi there, any one knows why this rule would not work? | 16:03 | |
rule propuesta { 'SE PROPONE' .* <?before [:i 'Palabra's?' clave:'||'Responsable's?]> | |||
this other rule _IS working_ fine -> rule asunto { 'ASUNTO' .* <?before ['RESULT'||'CONSIDER']'ANDO QUE' > } | 16:04 | ||
chenyf | if it is single character, try: ord('A') ~~ 65..90 | 16:05 | |
geekosaur | assumng you only care abut the US | 16:07 | |
sarna | sena_kun, jkramer: I wanted it to work on a string, not only a character | ||
jkramer | m: say ord('Ö') ~~ 65..90 | ||
camelia | False | ||
jkramer | sarna: This should do then: sub is-upper(\string) { ?(string.uniprops.all eq 'Lu') | 16:08 | |
16:08
ibo2go left
|
|||
jkramer | But I guess $foo eq $foo.uc is just as good :) | 16:08 | |
sarna | jkramer: thanks! your sub has many things I have yet to learn :^) | 16:09 | |
jkramer | Oh actually mine wouldn't work if there are special characters in the string | ||
sarna | special, like Ö, or special like &? | ||
jkramer | m: say 'FOO.foo'.uniprops | ||
camelia | (Lu Lu Lu Po Ll Ll Ll) | ||
jkramer | Anything that's not a letter | 16:10 | |
sarna | I see | ||
and you did \string instead of $string because we don't want to mutate it, right? | |||
jkramer | Yup and I think it's a bit faster | 16:11 | |
cog | hi, what is the equivalent of C typedef in Perl 6. Say I want to use C as a synonymous of: A does B | 16:12 | |
timotimo | m: constant Frob = Int; my Frob $a = 9; say $a | ||
camelia | 9 | ||
timotimo | m: constant Frob = Int; my Frob $a = "9000"; say $a | ||
camelia | Type check failed in assignment to $a; expected Int but got Str ("9000") in block <unit> at <tmp> line 1 |
||
cog | thx, timotimo | 16:13 | |
jkramer | m: sub is-upper(\s) { ?(s.comb.none eq 'Ll') }; say 'FOO'.&is-upper; say 'Foo'.&is-upper | 16:14 | |
camelia | True True |
||
jkramer | m: sub is-upper(\s) { ?(s.uniprops.none eq 'Ll') }; say 'FOO'.&is-upper; say 'Foo'.&is-upper | ||
camelia | True False |
||
SmokeMachine | m: role B {}; class A {}; subset C of A where *.^does: B; my C $a = A.new | 16:15 | |
camelia | Type check failed in assignment to $a; expected C but got A (A.new) in block <unit> at <tmp> line 1 |
||
jkramer | sarna: ^^ This only returns true if the string contains lowercase letters | ||
SmokeMachine | m: role B {}; class A {}; subset C of A where *.^does: B; my C $a = A.new but B | ||
camelia | ( no output ) | ||
SmokeMachine | cog: ^ | ||
16:15
mniip joined,
p6bannerbot sets mode: +v mniip
16:16
DarthGandalf left,
Some-body_ joined,
p6bannerbot sets mode: +v Some-body_
|
|||
sarna | jkramer: thanks again :^) | 16:16 | |
cog | thx, SmokeMachine | 16:17 | |
16:20
Some-body_ left
|
|||
cog | m: constant Frob = Int but 'foo'; my Frob $a; say ~$a | 16:21 | |
camelia | foo | ||
cog | m: constant Frob = Int but 'foo'; my Frob $a; say $a | ||
camelia | (Int+{<anon|1>}) | ||
cog | m: constant Frob = Int where * < 0 ; my Frob $a = -1; say $a | 16:22 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> 3constant Frob = Int7⏏5 where * < 0 ; my Frob $a = -1; say $a expecting any of: infix infix stopper postfix … |
||
cog | m: constant Frob = subset of Int where * < 0 ; my Frob $a = -1; say $a | 16:24 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> 3constant Frob = subset of7⏏5 Int where * < 0 ; my Frob $a = -1; say expecting any of: infix infix stopper postfix … |
||
16:25
jmerelo joined
|
|||
cog | m: subset Frob of Int where * < 0 ; my Frob $a = -1; say $a | 16:25 | |
camelia | -1 | ||
cog | m: subset Frob of Int where * < 0 ; my Frob $a = 0; say $a | ||
camelia | Type check failed in assignment to $a; expected Frob but got Int (0) in block <unit> at <tmp> line 1 |
||
16:25
p6bannerbot sets mode: +v jmerelo
|
|||
jmerelo | Hi. Back home. (Briefly) | 16:25 | |
yoleaux | 31 Aug 2018 04:57Z <AlexDaniel`> jmerelo: it's SQUASHathon time!!! :) | ||
2 Sep 2018 14:01Z <AlexDaniel> jmerelo: So I wonder, did we run out of squashable tickets in perl6/doc repo? It does feel like the fun stuff is no longer there after so many squashathons. Should we just go with random topic every month? | |||
16:32
scimon left
16:39
rfold joined
16:40
p6bannerbot sets mode: +v rfold,
dakkar left
16:44
DarthGandalf joined,
p6bannerbot sets mode: +v DarthGandalf
16:45
Ven` left
16:48
robertle joined,
p6bannerbot sets mode: +v robertle
16:49
fake_space_whale joined,
Kaiepi left,
p6bannerbot sets mode: +v fake_space_whale
|
|||
AlexDaniel | jmerelo: o/ | 16:49 | |
16:50
leont joined
|
|||
AlexDaniel | hmmm I have to rethink topics for upcoming squashathons | 16:50 | |
16:51
p6bannerbot sets mode: +v leont
16:53
meichangsu left
|
|||
jmerelo | AlexDaniel: I would be OK if we continue with docs every other month. | 16:54 | |
16:55
chenyf left
|
|||
jmerelo | AlexDaniel: there's a lot of stuff to be done still. Easy and not so easy. | 16:56 | |
AlexDaniel: on that note: github.com/perl6/doc/issues/2295 | 16:57 | ||
16:57
Kaiepi joined
16:58
p6bannerbot sets mode: +v Kaiepi
|
|||
TimToady | telma: .* in a rule is almost always wrong, because rules don't backtrack by default, so the .* will always eat up the rest of the string, and never give any back | 17:01 | |
you need the 'regex' keyword instead of 'rule' or 'token' if you want backtracking by default | 17:02 | ||
you can also put a ! or a ? on the .* to force it to backtrack right-to-left or left-to-right, but it won't by itself in either a rule or token | 17:05 | ||
17:06
sarna left
17:14
lizmat joined
17:15
p6bannerbot sets mode: +v lizmat
|
|||
masak | there's also the whole "if you're using rules it's probably because you're parsing a language, and trying to avoid multiple passes" underlying reason | 17:28 | |
TimToady: I have lots of questions, but I've currently forgotten most of them :) | 17:29 | ||
TimToady: here's one: do you think of concatenation in regexes as a "zero-width infix operator"? | 17:30 | ||
17:41
pecastro joined
17:42
p6bannerbot sets mode: +v pecastro
17:43
spycrab0 joined,
p6bannerbot sets mode: +v spycrab0
17:47
leont left
17:50
sotona joined
17:51
p6bannerbot sets mode: +v sotona
17:56
MilkmanDan left
17:58
MilkmanDan joined,
p6bannerbot sets mode: +v MilkmanDan
|
|||
TimToady | masak: not really; regexes just naturally match a bunch of things in a row, so it's more like an iterable recursive function | 18:07 | |
so more like "foo bar baz 42" only written the other way around | |||
I tend to think of the prototypical infix as a symmetrical operation, but the terms in / a b / are more hierarchical | 18:10 | ||
18:11
spajai joined,
p6bannerbot sets mode: +v spajai
|
|||
TimToady | of course, not all our infixes are entirely symmetrical... | 18:12 | |
but the relationship of a and b above is more like an "andthen" than it is like a concatenation | 18:13 | ||
18:18
zakharyas left
18:19
stmuk_ joined,
p6bannerbot sets mode: +v stmuk_
18:44
spajai left
18:49
domidumont joined,
p6bannerbot sets mode: +v domidumont
18:54
domidumont left
19:07
chenyf joined,
p6bannerbot sets mode: +v chenyf
|
|||
telma | TimToady thanks! | 19:10 | |
19:11
chenyf left
19:13
rfold left
|
|||
robertle | I am mucking around with another benchmark to compare perl 6 performance, the aim being that the tests would be closer to what I want to run and more full-sized rather than synthetic (github.com/robertlemmen/p6bench). But I am having weird issues with older versions of rakudo. for example 2017.05 (with matching nqp and moar) fails with | 19:22 | |
/usr/bin/moar --libpath="/usr/share/nqp/lib" --libpath="/usr/share/nqp/lib" perl6.moarvm --nqp-lib=blib --setting=NULL --ll-exception --optimize=3 --target=mbc --stagestats --output=CORE.setting.moarvm gen/moar/CORE.setting | |||
Unhandled exception: Failed to write string to stream: broken pipe | |||
at gen/moar/stage2/NQPHLL.nqp:1713 (/usr/share/nqp/lib/NQPHLL.moarvm:command_eval) | |||
which is odd, I am sure that I did manage to build rakudo versions early last year. also when I did have build problems in the past, the error messages were far more helpful | 19:23 | ||
has anyone seen stuff like this before? or any ideas? Is my asumption that matched versions of rakudo/nqp/moar should work together incorrect? is it possible they don't build anymore beacuse other stuff on my computer (e.g. libuv or so) is too recent? | 19:24 | ||
clarification for the above, it's the rakudo build that fails of course | 19:25 | ||
lizmat | robertle: if you're not using the libuv that comes with that version of MoarVM, that feels like a recipe for disaster | ||
as I think Moar has been adapted to match subtle changes in libuv more than once | 19:26 | ||
afk for a bit& | |||
robertle | ok, trying that. I was running with --has-stuff for everything | ||
19:29
jmerelo left
19:31
leont joined,
p6bannerbot sets mode: +v leont
19:36
sotona left
|
|||
robertle | yeah, I think that does get me a step further into the past versions! | 19:36 | |
El_Che | robertle: there have been some broken rakudo + moarvm combinations | 19:37 | |
where dot releases where needed | |||
AlexDaniel | robertle: there's also this ticket github.com/MoarVM/MoarVM/issues/951 | 19:39 | |
robertle: which is maybe unrelated but you should know about it | |||
robertle | yeah, where we had dot releases I am picking the latest of them (for each component) | 19:45 | |
the rpi issue is not what I have here, this is a box-standard pc, but is highly interesting anyway, that will probably affect the debian builds of 2018.08 | |||
19:46
chenyf joined
|
|||
robertle | rpi2 is armhf, right? armhf has extra float alignment requirements... | 19:47 | |
but that should lead to sigbus not segv | |||
19:47
p6bannerbot sets mode: +v chenyf
19:51
chenyf left
19:54
bazzaar joined,
p6bannerbot sets mode: +v bazzaar
|
|||
AlexDaniel | robertle: also there will be 2018.09 in 10 days if we resolve that issue | 19:55 | |
releasable6: status | |||
releasable6 | AlexDaniel, Next release in ≈9 days and ≈23 hours. 0 blockers. 0 out of 36 commits logged | ||
AlexDaniel, Details: gist.github.com/d7c1ecdcaf741ac49e...74af8499b0 | |||
robertle | 0 blockers? | ||
bazzaar | \o Perl6 | ||
robertle | I guess it looks at rakudo blockers only? | ||
19:56
mcmillhj left
|
|||
AlexDaniel | releasable6: status | 19:56 | |
releasable6 | AlexDaniel, Next release in ≈9 days and ≈23 hours. 1 blocker. 0 out of 36 commits logged | ||
AlexDaniel, Details: gist.github.com/cc9b0538cf50853511...9aa7d4eb78 | |||
AlexDaniel | robertle: yes… fixed :) | ||
well, “fixed” | |||
robertle | where does releasable get it's data from? | ||
19:57
sotona joined
|
|||
AlexDaniel | robertle: github.com/perl6/whateverable/blob...p6#L30-L31 | 19:57 | |
19:57
p6bannerbot sets mode: +v sotona
20:00
telma left
20:01
Sgeo__ joined
|
|||
bazzaar | $contents is a slurped .IO file and a loop of construct 'for $contents.lines -> Str $line {' gives an error, whereas 'for $contents.lines() -> Str $line {' does not. Is it to do with lazy code? Would appreciate some guidance on where in docs to look for an explanation. | 20:01 | |
20:01
p6bannerbot sets mode: +v Sgeo__
20:03
mcmillhj joined
|
|||
AlexDaniel | bazzaar: how can I reproduce this? I'm seeing no error in both cases | 20:03 | |
20:04
p6bannerbot sets mode: +v mcmillhj
|
|||
bazzaar | ok, I'll create a gist, the code is simple, it slurps in a csv file (I can't provide that though), it looks for lines with fewer than the required number of fields, and pads those lines out. | 20:07 | |
20:08
Sgeo_ joined
20:09
p6bannerbot sets mode: +v Sgeo_
20:10
sena_kun left
20:11
Sgeo__ left
|
|||
lizmat | bazzaar: which version of Rakudo are you using ? | 20:16 | |
20:16
pmurias left
|
|||
lizmat just worked on Str.lines | 20:16 | ||
bazzaar | lizmat: I'm behind the times, "This is Rakudo Star version 2018.04.1 built on MoarVM version 2018.04.1" | 20:18 | |
20:18
pmurias joined
20:19
p6bannerbot sets mode: +v pmurias
|
|||
lizmat | bazzaar: ok, so nothing I broke recently :-) | 20:19 | |
could you gist the error ? | |||
bazzaar | gist.github.com/bazzaar/914a5c3e6f...e9d16e360b | 20:23 | |
lizmat | bazzaar: you're using Slang::Tuxic, which implies you may need parens in some places ? | 20:27 | |
specifically the "$contents.lines" may need "($contents.lines)" | 20:28 | ||
bazzaar | lizmat: aaah, sounds like you are on the trail there. :-) | 20:29 | |
lizmat: the code also worked with 'for $contents.lines[^5] -> Str $line {' ..... I remember | 20:32 | ||
lizmat | bazzaar: is there a reason you need Slang::Tuxic in *your* code ?? | 20:34 | |
if not, I suggest you remove it | 20:35 | ||
it will at least make your script compile a lot faster | |||
bazzaar | lizmat: I think it was in the TEXT::CSV example / docs, ... I'll do as you say | 20:36 | |
lizmat | aah... | 20:37 | |
ok, lemme see if I can fix that :-) | |||
bazzaar | lizmat: when I comment out the 'use Slang::Tuxic' line, I get the two terms in a row error on the 'my $csv_line = Text::CSV.new⏏ (eol => "\n");' line | 20:40 | |
lizmat | indeed: you cannot have a space there in standard Perl 6 | ||
bazzaar | lizmat: aaah, thank you for that. | 20:41 | |
AlexDaniel | but | ||
my $csv_line = Text::CSV.new: eol => "\n"; | |||
20:43
lskdfj joined,
p6bannerbot sets mode: +v lskdfj
|
|||
lizmat | that would also work, but I was going for the least change :-) | 20:43 | |
20:43
lskdfj left
|
|||
lichtkind | can i export a sub from a role into its consuming class? | 20:44 | |
bazzaar | AlexDaniel: Thankyou also :-), both examples work, and Slang::Tuxic is gone | 20:45 | |
20:48
molaf left,
thundergnat joined
20:49
p6bannerbot sets mode: +v thundergnat
|
|||
lizmat | bazzaar: cool! | 20:49 | |
lichtkind: no, closest thing is a private method | 20:50 | ||
m: role A { method !foo { say "foo" } }; class B does A { B!foo } | |||
camelia | foo | ||
lichtkind | lizmat, thanks but not that what i had before, hugs | ||
20:53
leont left
|
|||
bazzaar | perl6 is totally awesome, .. world [of programming] domination will surely happen! | 20:57 | |
20:58
bazzaar left
|
|||
masak | TimToady: I see what you're saying about the hierarchic/andthen thing. after all, parsers are monads, so it makes sense :) | 21:03 | |
TimToady: there's a years-old comment in src/QRegex/P6Regex/Grammar.nqp about turning the nibbler into an EXPR | 21:05 | ||
21:05
MasterDuke joined,
p6bannerbot sets mode: +v MasterDuke
|
|||
masak | that's what got me thinking about zero-width infixes | 21:05 | |
21:07
MasterDuke left,
MasterDuke joined,
herbert.freenode.net sets mode: +v MasterDuke,
p6bannerbot sets mode: +v MasterDuke
|
|||
masak | guess it comes down to semantics; one person's "zero-width infix" is another's TTIAR... | 21:07 | |
MasterDuke | looks like colabti.org is down, anyone know why? | ||
timotimo | dunno :( | 21:10 | |
21:10
kerframil joined,
p6bannerbot sets mode: +v kerframil
|
|||
MasterDuke | oh well. anything interesting in the channels today? | 21:11 | |
timotimo | want my logs? | ||
21:11
mcmillhj left
|
|||
timotimo | hack.p6c.org/~timo/moarvm_log.html hack.p6c.org/~timo/perl6_log.html hack.p6c.org/~timo/perl6-dev_log.html | 21:12 | |
MasterDuke | cool, thanks | ||
timotimo | YW | 21:13 | |
MasterDuke: mastodon.social/@timotimo/100674655508783180 - have a look at my pretty videos if you wanna | 21:14 | ||
21:14
sotona left
|
|||
MasterDuke | i like the blue ones | 21:17 | |
21:20
noganex_ joined,
p6bannerbot sets mode: +v noganex_
21:23
giraffe joined,
p6bannerbot sets mode: +v giraffe,
giraffe is now known as Guest22183
21:29
mcmillhj joined
21:30
p6bannerbot sets mode: +v mcmillhj
21:33
leont joined
21:34
p6bannerbot sets mode: +v leont
21:38
HaraldJoerg1 joined
21:39
p6bannerbot sets mode: +v HaraldJoerg1,
HaraldJoerg left
21:42
HaraldJoerg1 is now known as HaraldJoerg
21:43
pmurias left
21:47
Sgeo__ joined,
p6bannerbot sets mode: +v Sgeo__
21:49
Sgeo_ left
21:54
Sgeo__ left
21:56
HaraldJoerg left
22:07
mcmillhj left
22:26
robertle left
22:28
itaipu left
22:30
Herby_ joined
22:31
p6bannerbot sets mode: +v Herby_
|
|||
Herby_ | \o | 22:31 | |
timotimo | o/ | 22:34 | |
Herby_ | timotimo: how goes it? | 22:35 | |
timotimo | all right. i finally got back to playing with cellular automata. but my wrists are getting worse since yesterday :| | 22:37 | |
how's you? | |||
Herby_ | cellular automata? Can't say I'm too familiar with that | 22:38 | |
and I'm doing well, just got off work, drinking coffee, and trying my hand at programming exercises | 22:39 | ||
timotimo | sounds like a chill time | ||
Herby_ | I can't complain :) | ||
whats happening with your wrists? rsi? | 22:40 | ||
22:42
huf joined
|
|||
timotimo | yeah | 22:42 | |
Herby_ | bummer :( | ||
timotimo | it really is :\ | ||
22:42
p6bannerbot sets mode: +v huf
|
|||
timotimo | want a short primer on cellular automata? | 22:42 | |
Herby_ | I'm always up for learning | 22:43 | |
22:44
mcmillhj joined
|
|||
timotimo | OK, so the most general definition is this: you have some kind of grid with individual cells. every cell can have one of N different states - think colors or numbers or animals | 22:44 | |
(that's not all of it!) | |||
(just as much as fits into one line) | 22:45 | ||
22:45
p6bannerbot sets mode: +v mcmillhj
|
|||
timotimo | so, the whole system makes "steps", where every cell is looked at, along with its "neighborhood" - for example "the cells north, east, south, and west of it on a chess board | 22:45 | |
and depending only on the states of the cell itself and the cells in its neighborhood, does the cell change its own state | 22:46 | ||
and things like what states can exist, and what the neighborhood is, and what the rules for changing state are, that's the same for every cell | |||
that's the basic case for cellular automata. Game of Life is probably the most famous one | 22:47 | ||
in game of life, the neighborhood is north, northeast, east, southeast, south, southwest, west, northwest | |||
and the rules are expressed as "if the cell is 'alive' and there are between X and Y cells nearby, it dies (starvation/suffocation), otherwise it stays alive" | 22:48 | ||
"there are between X and Y 'alive' cells nearby" | |||
22:49
mcmillhj left
|
|||
timotimo | "if the cell is 'dead' and there are between F and G alive cells nearby, the cell becomes alive (reproduction/splitting/growth), otherwise it stays dead" | 22:49 | |
i don't know the "default" numbers by heart, but there are variants with different values anyway | |||
Herby_ | ok. I've often heard of the Game of Life but I never really understood what it was about. this helps | 22:51 | |
timotimo | cool :) | ||
game of life is an example of CAs with "simple" rules that can execute arbitrary calculations | 22:52 | ||
in fact, there is a method to build a game of life simulator out of configurations of cells inside a game of life world | |||
Herby_ | sounds like inception. | 22:54 | |
What are you currently exploring with CA right now? | |||
timotimo | the ones i have right now are on a regular 2d grid with NESW neighborhood and just two states, but every cell has a random chance in every step to just do nothing | 22:55 | |
that chance is at 5% right now, but sometimes i change it on a whim | |||
mastodon.social/@timotimo/100674655508783180 - i've made a thread on mastodon with a few example videos | 22:56 | ||
Herby_ | those are awesome. is the code posted anywhere? | 22:57 | |
timotimo | not yet, still working on it :) | ||
i just made it 40% faster by removing an "int8" from one variable %) | 22:58 | ||
Herby_ | i love optimizing things, even with my very limited programming skillset | 23:00 | |
speaking of making things faster, could you eyeball my code for this puzzle to see if there are any easy wins to speed it up? | |||
gist.github.com/sylints/df1c8e2619...09d7668c09 | |||
puzzle is here: www.reddit.com/r/dailyprogrammer/c..._funnel_1/ | |||
The goal for Optional Bonus 2 is to have it run within 1 to 2 seconds. I'm currently sitting at 10 seconds | 23:01 | ||
but the result is correct | |||
23:01
mcmillhj joined
23:02
p6bannerbot sets mode: +v mcmillhj
|
|||
timotimo | since $word doesn't change in that loop inside funnel-bonus, you could move $word.chars out of the "while" statement | 23:02 | |
that'd be a miniscule win at best | |||
substr is a bit faster if you use the form without Ranges, even though it looks less beautiful | |||
23:03
sotona joined,
p6bannerbot sets mode: +v sotona
|
|||
timotimo | sometimes using .IO.slurp.lines is faster than .IO.lines | 23:03 | |
oh, and you're reading the file in twice, perhaps read the words list once, and create the Set from that afterwards | 23:04 | ||
it's possible that making $index and $counter native ints, i.e. "my int $counter", though with a bit of bad luck it'll end up slower | 23:05 | ||
23:06
mcmillhj left
|
|||
timotimo | you could use my %w := funnel-bonus, which is probably faster, since it doesn't copy the hash that was created inside funnel-bonus | 23:06 | |
i.e. binding := instead of assignment = | |||
23:06
aindilis joined
23:07
sotona left,
p6bannerbot sets mode: +v aindilis
|
|||
timotimo | let me know how it goes! | 23:07 | |
Herby_ | thanks for the feedback! i'll tweak the code and let you know how the timing changes | ||
probably the root cause of the run time is my poor choice of algorithm | 23:08 | ||
23:09
dominix joined
23:10
p6bannerbot sets mode: +v dominix
|
|||
timotimo | not enough focus to look much at the algorithm and such | 23:13 | |
Herby_ | no worries at all, just thinking aloud :) | 23:14 | |
23:16
mcmillhj joined
23:17
p6bannerbot sets mode: +v mcmillhj,
pecastro left
23:21
mcmillhj left
|
|||
MasterDuke | Herby_: you check if %words.elems > 4 in funnel-bonus and in the mainline | 23:23 | |
might be able to change to something like `if my %w = funnel-bonus($line, $word_set) { $counter++; say "bonus('$line') => " ~ %w.keys; }` | 23:24 | ||
timotimo | or just if funnel-bonus($line, $word_set) -> %w { ... } | 23:25 | |
Herby_ | MasterDuke: doh! nice catch | 23:26 | |
23:30
[particle] joined
23:31
p6bannerbot sets mode: +v [particle]
|
|||
timotimo | Herby_: "return" at the end of a sub is a little slower than just putting the result value there | 23:32 | |
vrurg | Can somebody have an idea on how to get around this bug: rt.perl.org/Public/Bug/Display.html?id=130794 ? | 23:33 | |
s/have/give/ | |||
23:34
mcmillhj joined
23:35
p6bannerbot sets mode: +v mcmillhj
|
|||
timotimo | yes, you can make an inner lexical scope to do the "use" in, and return what you wanted from it into a constant, for example with a do block | 23:35 | |
m: class is::all::right { }; constant OtherNamespace = do { use Test; Test }; OtherNamespace::is "me", "me", "yay" | 23:36 | ||
camelia | Could not find symbol '&is' in block <unit> at <tmp> line 1 |
||
timotimo | m: class is::all::right { }; constant &is = do { use Test; &is }; OtherNamespace::is "me", "me", "yay" | 23:37 | |
camelia | ok 1 - yay | ||
timotimo | wait what | ||
that's very wrong %) | |||
m: class is::all::right { }; constant &namespaced-is = do { use Test; &is }; namespaced-is "me", "me", "yay" | |||
camelia | ok 1 - yay | ||
timotimo | m: class is::all::right { }; constant &namespaced-is = do { use Test; &is }; namespaced-is "me", "me", "yay"; say is.WHAT | ||
camelia | ok 1 - yay (is) |
||
timotimo | m: class is::all::right { }; constant &namespaced-is = do { use Test; &is }; namespaced-is "me", "me", "yay"; say is.^name | 23:38 | |
camelia | ok 1 - yay is |
||
timotimo | m: class is::all::right { }; constant &namespaced-is = do { use Test; &is }; namespaced-is "me", "me", "yay"; say is.HOW.^name | ||
camelia | ok 1 - yay Perl6::Metamodel::PackageHOW |
||
timotimo | is that helpful at all? the example isn't quite 1:1 because it's a sub that i'm importing, not apackage | ||
oh ... also "is" as a sub wouldn't conflict with "&is" anyway | |||
23:38
mcmillhj left
|
|||
timotimo | let's see | 23:38 | |
23:39
Sgeo joined,
p6bannerbot sets mode: +v Sgeo
|
|||
timotimo | m: class CArray::Foo { }; constant MyNativeCall = do { require NativeCall; NativeCall }; say MyNativeCall::.keys | 23:40 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> An exception occurred while evaluating a constant at <tmp>:1 Exception details: Type check failed in binding to parameter '$top-existing-pkg'; expected Any but got NativeCall (NativeCall) … |
||
timotimo | um, huh? | ||
i don't get that error locally | |||
vrurg | timotimo: Thanks! But it turns out that there is a better solution for my task. I didn't know that a method could be run on a role itself without applying it to a class. | 23:46 | |
timotimo | ah, yes indeed | ||
vrurg | But your examples are very interesting from the syntax point of view. Another thing I've just learned. :) | ||
timotimo | it'll act as if you had an empty class to compose it into | ||
that's called "punning" | |||
23:47
chenyf joined
23:48
p6bannerbot sets mode: +v chenyf
|
|||
vrurg | I thought punning happens on instantiation. Is FooRole.method() punning too? | 23:48 | |
timotimo | yes | ||
vrurg | Ok, another things to know. Thanks a lot! | ||
23:48
mcmillhj joined
|
|||
timotimo | you're quite welcome :) | 23:49 | |
23:49
p6bannerbot sets mode: +v mcmillhj
|
|||
vrurg | Trully, RTFM: "... or use it as a type object ..." I've been through that paragraph for a couple of times now. But never noticed... | 23:50 | |
23:51
chenyf left
|
|||
timotimo | yeah, that happens all the time to me, too | 23:52 | |
23:53
mcmillhj left
23:57
mcmillhj joined
|
|||
Herby_ | MasterDuke and timotimo: I made changes based on your feedback and have dropped the runtime from roughly 9.5 seconds to 4 seconds | 23:58 | |
timotimo | nice! | ||
Herby_ | using substr() instead of $word.substr() had the biggest impact by far | ||
23:58
p6bannerbot sets mode: +v mcmillhj
|
|||
Herby_ | using that binding idea you mentioned gave me this error: Type check failed in binding; expected Associative but got Slip (Empty) | 23:59 | |
but > 50% reduction in runtime is awesome, thanks |