»ö« 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. |
|||
timotimo | er, at least i think so | 00:00 | |
well, when you "but" or "does" them in at run time, they will | |||
Xliff | m: role A { method data { 1; }; }; class B does A { method data { 2; }; }; | ||
camelia | ( no output ) | ||
Xliff | m: role A { method data { 1; }; }; class B does A { method data { 2; }; }; B.new.data.say | ||
camelia | 2 | ||
00:01
graphene left
|
|||
Xliff | m: role A { method data { 1; }; }; class B { method data { 2; }; }; my $b but A = B.new; $b.data | 00:01 | |
camelia | Cannot modify an immutable 'Any+{A}' type object in block <unit> at <tmp> line 1 |
||
Xliff | m: role A { method data { 1; }; }; class B { method data { 2; }; }; my $b = B.new but A; $b.data | ||
camelia | ( no output ) | ||
Xliff | m: role A { method data { 1; }; }; class B { method data { 2; }; }; my $b = B.new but A; $b.data.say | ||
camelia | 1 | ||
Xliff | \o/ | ||
00:02
graphene joined
|
|||
Xliff | That syntax has taken me long enough to finally grok, but I think I finally got it. | 00:02 | |
Class but (also) Role | 00:03 | ||
00:03
p6bannerbot sets mode: +v graphene
|
|||
Xliff | m: role A { method data { 1; }; }; class B { method data { 2; }; }; my $b = B.new does A; $b.data.say | 00:04 | |
camelia | 1 | ||
Xliff | I think I prefer that. | ||
timotimo++ # Thanks! Have a great night! | |||
timotimo | thanks, and same to you :) | 00:05 | |
00:06
kurahaupo joined,
p6bannerbot sets mode: +v kurahaupo
00:10
graphene left
00:11
kurahaupo left,
graphene joined
00:12
p6bannerbot sets mode: +v graphene
00:14
w_richard_w joined
00:15
p6bannerbot sets mode: +v w_richard_w
00:16
kurahaupo joined
00:17
p6bannerbot sets mode: +v kurahaupo
00:18
bolangi joined
00:19
p6bannerbot sets mode: +v bolangi,
w_richard_w left
00:27
kurahaupo left
00:30
kurahaupo joined
00:31
p6bannerbot sets mode: +v kurahaupo
00:44
kurahaupo left
00:45
kurahaupo joined
00:46
p6bannerbot sets mode: +v kurahaupo
00:52
kurahaupo left
01:04
literal left
01:10
lizmat left
01:12
MasterDuke joined,
p6bannerbot sets mode: +v MasterDuke,
MasterDuke left,
MasterDuke joined,
herbert.freenode.net sets mode: +v MasterDuke,
p6bannerbot sets mode: +v MasterDuke
01:32
graphene left
01:33
graphene joined
01:34
p6bannerbot sets mode: +v graphene
01:37
lizmat joined,
p6bannerbot sets mode: +v lizmat
01:40
beeman left
01:41
lizmat left
02:09
Aceeri_ joined,
p6bannerbot sets mode: +v Aceeri_
|
|||
awwaiid | hello peeps. In case you didn't see, we are hosting the DC-Baltimore Perl Workshop on April 6, 2019 in Silver Spring, MD (DC metro area). Y'all are invited! We are accepting talks through the end of the year; I'd love some perl6/raku/rakudo deliciousnesss -- CFP Press Ctrl-c to copy | 02:19 | |
bit.ly/dcbpw-cfp | |||
mmm | |||
copy/paste link fail. Oh well. Also see dcbpw.org/dcbpw2019/ | 02:20 | ||
02:33
vike joined
02:34
p6bannerbot sets mode: +v vike
02:36
molaf left
02:48
molaf joined
02:49
p6bannerbot sets mode: +v molaf
03:01
bolangi left
03:02
bolangi joined
03:03
p6bannerbot sets mode: +v bolangi,
someuser left
03:08
leont left
03:23
sivoais joined,
p6bannerbot sets mode: +v sivoais
03:41
john_parr joined
03:42
p6bannerbot sets mode: +v john_parr
03:49
graphene left
03:50
graphene joined
03:51
p6bannerbot sets mode: +v graphene
|
|||
SmokeMachine | Is there any defined way to write browser modules? | 04:25 | |
04:27
kurahaupo joined
04:28
p6bannerbot sets mode: +v kurahaupo
|
|||
holyghost | SmokeMachine: start with the headers ? | 04:29 | |
SmokeMachine | holyghost: what do you mean? | ||
holyghost | C headers API or something | ||
what's your "browser" ? | 04:30 | ||
e.g. you can do that for lynx, firefox etc. AFAIK | |||
SmokeMachine | holyghost: I mean something like perl6.github.io/6pad/#3d9c7dd4834c...9011ab6420 | 04:31 | |
holyghost | I cannot read that https | 04:32 | |
do you have a http link somwhere ? | |||
SmokeMachine | holyghost: I mean for Rakudo.js | ||
holyghost | I'm going a little bit of topic, mod_perl (5) for apache, and for js for I don't remember | 04:33 | |
There was talk about it last week | |||
SmokeMachine | I mean running modules in a browser | 04:34 | |
holyghost | if you output to js ti should work | ||
s/ti/it | |||
but you have to have a perl6 plugin in firefox before using it | 04:35 | ||
except the js I mean | |||
See perlyroids in the year 2000+, an internet explorer plugin for perl5 | 04:36 | ||
by Adobe | |||
SmokeMachine | holyghost: have you seen Rakudo.js? | 04:38 | |
holyghost | no | ||
ah now I see | 04:39 | ||
I don't know, but to use perl browserwise you have to load a plugin | 04:40 | ||
SmokeMachine | No, you haven’t... | ||
.seen pmurias | 04:42 | ||
yoleaux | I saw pmurias 19 Nov 2018 21:43Z in #perl6: <pmurias> * survey | ||
holyghost | I don't know much about js but you can load it in your browser then use it's API | ||
SmokeMachine | .tell pmurias would you mind of giving me your opinion about perl6.github.io/6pad/#3d9c7dd4834c...9011ab6420 ? | 04:43 | |
yoleaux | SmokeMachine: I'll pass your message to pmurias. | ||
SmokeMachine | holyghost: my question was to know if is there something different I should do on my module if it will depend on js... | 04:44 | |
holyghost | now I understand, | 04:45 | |
SmokeMachine | .tell pmurias is there something different I should do on my module if it will depend on js... | ||
yoleaux | SmokeMachine: I'll pass your message to pmurias. | ||
holyghost | I don't know really | ||
SmokeMachine | Does anyone know? | 04:46 | |
tyil | I'm trying to use a react/whenever block for Proc::Async, but when I run my code, I get the error I should tap stderr/stdout before running the process p.tyil.nl/fdtn | 04:48 | |
04:54
Cabanoss- joined
04:55
p6bannerbot sets mode: +v Cabanoss-
04:56
Cabanossi left
|
|||
lookatme_q | tyil, you should put the stderr/stdout tap before start | 05:13 | |
tyil | I have that now, and getting a moarvm panic | 05:14 | |
lookatme_q | tyil, yeah, I got too | 05:18 | |
What happened ? :/ | 05:19 | ||
tyil | :/ | ||
if I knew I wouldn't be asking :p | |||
lookatme_q | Maybe a bug | 05:25 | |
I manual start the Proc::Async outside the react block, it works | 05:26 | ||
05:40
Bucciarati left,
avar left
05:41
Bucciarati joined,
avar joined,
avar left,
avar joined,
p6bannerbot sets mode: +v avar
05:42
p6bannerbot sets mode: +v Bucciarati,
p6bannerbot sets mode: +v avar
|
|||
tyil | lookatme_q: can you show me what you mean? | 05:46 | |
05:52
Sound joined,
p6bannerbot sets mode: +v Sound
|
|||
tyil | it seems to not panic if I dont return inside the whenever block | 05:53 | |
05:57
finanalyst joined
05:58
p6bannerbot sets mode: +v finanalyst
|
|||
finanalyst | could anyone here tell me how to use %?RESOURCES, mentioned at docs.perl6.org/language/variables#..._variables ? I have default files in a module that I want to access when an object is built | 06:01 | |
tyil | finanalyst: put them into the resources directory, and reference them in the META6.json in the resources list | 06:02 | |
then you can use %?RESOURCES<relative/path/from/resources/dir> to access them | |||
finanalyst | tyil: thanks | 06:11 | |
tyil: do I need to reference each file in META6.json, or can I use a * ? | 06:12 | ||
tyil | I believe you'll need to add each file, no globbing | ||
holyghost | finanalyst: reference every file | 06:20 | |
it does not parse too well | |||
06:20
Sound left
06:21
ufobat joined
06:22
p6bannerbot sets mode: +v ufobat
06:24
sauvin joined,
p6bannerbot sets mode: +v sauvin
06:27
jmerelo joined,
p6bannerbot sets mode: +v jmerelo
|
|||
holyghost | hi jmerelo | 06:29 | |
I am working on perl6 sound software, I have a WAV parser and am coding the GUI of a Wave Editor. I need to build a player too (I guess based on the linux sound C headers) | 06:30 | ||
I'll put it on github when it's ready | 06:31 | ||
I built some widgets today, need an OOP widget tree | 06:32 | ||
problem is I know that using design patterns (gang of four book) works but I cannot use the papers at the end of the chapters because of patents, so it'll be more common | 06:35 | ||
The first module should become Soundx::Tina (WAV things) | 06:38 | ||
jmerelo | Software patents do not apply in Europe and it would be stupid to include stuff in books that can't be used | 06:55 | |
holyghost: hi | |||
07:19
jcarty joined
07:20
p6bannerbot sets mode: +v jcarty
07:23
domidumont joined
07:24
p6bannerbot sets mode: +v domidumont
07:26
someuser joined
07:27
p6bannerbot sets mode: +v someuser
07:29
ChoHag joined
07:30
p6bannerbot sets mode: +v ChoHag
07:38
domidumont left
07:39
graphene left
07:40
graphene joined
07:41
p6bannerbot sets mode: +v graphene
07:44
Bucciarati left
07:45
Bucciarati joined
07:46
p6bannerbot sets mode: +v Bucciarati
|
|||
andrzejku | .seen loren | 07:47 | |
yoleaux | I saw loren 8 Jul 2016 13:51Z in #perl6: <loren> e, ^_^ .. haha don't mind | ||
andrzejku | .seen lookatme_q | ||
yoleaux | I saw lookatme_q 05:26Z in #perl6: <lookatme_q> I manual start the Proc::Async outside the react block, it works | ||
07:50
khatar joined
07:51
p6bannerbot sets mode: +v khatar
07:52
abraxxa joined
07:53
p6bannerbot sets mode: +v abraxxa
07:54
abraxxa left
07:57
abraxxa joined,
zakharyas joined
07:58
p6bannerbot sets mode: +v abraxxa,
p6bannerbot sets mode: +v zakharyas
07:59
rindolf joined,
domidumont joined,
p6bannerbot sets mode: +v rindolf,
abraxxa left
08:00
p6bannerbot sets mode: +v domidumont
08:01
abraxxa joined
08:02
robertle joined,
p6bannerbot sets mode: +v abraxxa
08:03
p6bannerbot sets mode: +v robertle
08:14
coet[work] joined,
p6bannerbot sets mode: +v coet[work]
|
|||
lookatme_q | andrzejku, I am busying :) | 08:23 | |
09:01
lizmat joined,
p6bannerbot sets mode: +v lizmat
09:08
finanalyst left,
finanalyst joined
09:09
p6bannerbot sets mode: +v finanalyst
09:12
finanalyst left
09:13
finanalyst joined,
p6bannerbot sets mode: +v finanalyst
09:21
scimon joined
09:22
p6bannerbot sets mode: +v scimon
09:23
vike left
09:29
vike joined
09:30
p6bannerbot sets mode: +v vike
09:43
vike left
09:48
vike joined
09:49
p6bannerbot sets mode: +v vike
10:04
bolangi left
10:09
coet|login joined,
p6bannerbot sets mode: +v coet|login
10:10
coet[work] left,
coet|login is now known as coet[work]
10:16
bolangi joined
10:17
p6bannerbot sets mode: +v bolangi
|
|||
Geth | doc: 1e74f97826 | (Elizabeth Mattijsen)++ | doc/Language/glossary.pod6 Added lemma about gradual typing |
10:31 | |
synopsebot_ | Link: doc.perl6.org/language/glossary | ||
10:33
ChoHag left
10:46
tobs` joined,
p6bannerbot sets mode: +v tobs`
10:48
finanalyst left
10:50
finanalyst joined
10:51
p6bannerbot sets mode: +v finanalyst
10:56
ChoHag joined
10:57
p6bannerbot sets mode: +v ChoHag
10:58
leont joined
10:59
p6bannerbot sets mode: +v leont
11:25
finanalyst left
12:00
kurahaupo left,
kurahaupo joined
12:01
p6bannerbot sets mode: +v kurahaupo
12:06
ChoHag left
12:09
zakharyas left,
molaf left
12:11
khisanth_ left,
ChoHag joined
12:12
p6bannerbot sets mode: +v ChoHag
12:14
christopher joined,
christopher is now known as Guest41175
12:15
Guest41175 left
|
|||
tbrowder | I just read about the quantum ide qiskit from ibm and also found a list of quantum simulator software in many languages, including perl 5. is anyone working on one in p6? | 12:29 | |
12:33
ChoHag left
|
|||
jmerelo | tbrowder: not that I know of. | 12:34 | |
tbrowder | any person here know enough about quantum computing to add a quantum-centric task on rosettacode? | 12:36 | |
jmerelo | tbrowder: I'm kind of skeptic on that kind of thing... | 12:39 | |
tbrowder | damian has demoed some kind of quantum mockup...something to help understand the thoeory and such | 12:41 | |
jmerelo | tbrowder: I'm OK with the theory, I'm not so sure about the "computing" part | 12:42 | |
tbrowder | :-/ | ||
i know what yoy mean—it’s the end of the world when q starts beaking pki all over | 12:43 | ||
*breaking | |||
12:47
kensanata joined,
p6bannerbot sets mode: +v kensanata
12:53
molaf joined
12:54
p6bannerbot sets mode: +v molaf
13:05
jmerelo left
13:10
coet[work] left
13:12
rindolf left
|
|||
lizmat | wow: example of how providing type information will let your code run faster: | 13:21 | |
m: sub a($a) { }; for ^10_000_000 -> int $_ { a 42 }; say now - INIT now | |||
camelia | 5.9543976 | ||
lizmat | m: sub a(Int $a) { }; for ^10_000_000 -> int $_ { a 42 }; say now - INIT now | ||
camelia | 0.1108427 | ||
lizmat | m: sub a($a) { }; for ^10_000_000 -> int $_ { a 42 }; say now - INIT now | ||
camelia | 5.87832916 | ||
lizmat | m: sub a(Int $a) { }; for ^10_000_000 -> int $_ { a 42 }; say now - INIT now | ||
camelia | 0.1038929 | ||
lizmat | m: sub a($a) { }; my $a = 42; for ^10_000_000 -> int $_ { a $a }; say now - INIT now | 13:22 | |
camelia | 0.3800129 | ||
lizmat | m: sub a(Int $a) { }; my $a = 42; for ^10_000_000 -> int $_ { a $a }; say now - INIT now | 13:23 | |
camelia | 0.1804015 | ||
lizmat | the last two are probably more real world examples | ||
13:24
beeman joined,
p6bannerbot sets mode: +v beeman
13:32
ChoHag joined
|
|||
jnthn | When it's `Int $a`, then we don't emit code to produce the Scalar container. Thanks to lexical to local lowering of `$a`, that probably means spesh can see the box operation is dead, so doesn't bother. | 13:32 | |
13:33
p6bannerbot sets mode: +v ChoHag
|
|||
jnthn | Whereas when we have to allocate the container 'cus the thing passed may be Iterable, we can't avoid the boxing, so it's two more allocations | 13:33 | |
This is one of the things the work on EA/SR is aimed at tackling | |||
lizmat | well, it's already doing quite well.. :-) | ||
13:34
zakharyas joined
13:35
p6bannerbot sets mode: +v zakharyas
|
|||
lucasb | EA/SR? | 13:39 | |
jnthn | Escape Analysis, Scalar Replacement | 13:40 | |
13:42
sena_kun joined
13:43
p6bannerbot sets mode: +v sena_kun
13:44
loops left
|
|||
lizmat | yeah, --profile shows that the Int case doesn't do any allocations at all | 13:46 | |
lucasb | ah, thanks! | 13:57 | |
dogbert2_ | m: sub a($a) { }; for ^10_000_000 -> int $_ { a 42 }; say now - INIT now | 14:12 | |
camelia | 6.024947628 | ||
dogbert2_ | heh | ||
that example runs a lot faster on my 32 bit system | |||
lizmat | dogbert2_: oddly enough, it does for me as well locally | 14:13 | |
dogbert2_ | strange indeed | 14:14 | |
lizmat | it's more like only 2x as slow for me | ||
dogbert2_ | same here | ||
what might be the cause of that discrepancy | 14:15 | ||
14:16
loops joined
|
|||
lizmat | I have no idea | 14:16 | |
14:17
p6bannerbot sets mode: +v loops
14:19
lizmat left
|
|||
mornfall | can i still catch exceptions with "or foo"? | 14:22 | |
if so, how do i get at the error? | |||
timotimo | doesn't "orelse" have exception catching semantics? | 14:24 | |
mornfall | i mean, jget ... or fail( "stuff broke" ); seems to do what i mean | 14:25 | |
*but* i don't know how to get at the exception object that way | |||
timotimo | m: sub doesnt-work { die "oh no" }; doesnt-work orelse say "message: $_" | 14:27 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: orelse used at line 1 |
||
timotimo | m: sub doesnt-work { die "oh no" }; doesnt-work() orelse say "message: $_" | ||
camelia | oh no in sub doesnt-work at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
timotimo | m: sub doesnt-work { die "oh no" }; try doesnt-work() orelse say "message: $_" | ||
camelia | ( no output ) | ||
timotimo | m: sub doesnt-work { die "oh no" }; (try doesnt-work()) orelse say "message: $_" | ||
camelia | Use of Nil in string context message: in block at <tmp> line 1 |
||
timotimo | m: sub doesnt-work { die "oh no" }; (try doesnt-work()) orelse say "message: $!" | ||
camelia | message: oh no | ||
timotimo | that's how ^ | ||
14:28
ChoHag left
|
|||
timotimo | m: sub doesnt-work { die "oh no" }; (try doesnt-work()) or say "message: $_" | 14:28 | |
camelia | Use of uninitialized value of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. message: in block <unit> at <tmp> line 1 |
||
timotimo | m: sub doesnt-work { die "oh no" }; (try doesnt-work()) or say "message: $!" | ||
camelia | message: oh no | ||
timotimo | or that way | ||
mornfall | i tried $! but something failed... lemme try again | ||
(i mean, that's the first thing i tried) | |||
yeah, $! seems to be Nil for typed exceptions :\ | 14:29 | ||
timotimo | does the sub in question fail or throw? | ||
m: sub doesnt-work { fail "failed" }; (try doesnt-work()) or say "message: $!" | 14:30 | ||
camelia | message: failed | ||
timotimo | m: sub doesnt-work { fail "failed" }; (doesnt-work()) or say "message: $!" | ||
camelia | Use of uninitialized value of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. message: in block <unit> at <tmp> line 1 |
||
timotimo | ^- if you put a "try", the failure is fatalized | ||
jnthn | m: sub doesnt-work { fail "failed" }; doesnt-work() orelse say "message: $_" | 14:31 | |
camelia | message: (HANDLED) failed in sub doesnt-work at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
jnthn | m: sub doesnt-work { fail "failed" }; doesnt-work() orelse say "message: $_.exception()" | ||
camelia | message: failed | ||
mornfall | thanks (clearly or and orelse behave differently for 'fail') | 14:35 | |
timotimo | orelse is there for exceptiony things | ||
14:36
khatar left
14:39
graphene left
|
|||
timotimo | as is andthen | 14:39 | |
14:40
graphene joined
14:41
p6bannerbot sets mode: +v graphene
14:42
finanalyst joined,
finanalyst left
14:45
Merfont left
|
|||
mornfall | any ideas why jget from WWW would give me this? Cannot use a Buf as a string, but you called the Str method on it | 14:51 | |
timotimo | is there a way to specify an encoding? perhaps the server doesn't serve a Content-Type or something? | 14:56 | |
15:01
jcarty left
|
|||
mornfall | timotimo: indeed, using 'get' seems to do okay and JSON::Tiny fails on the result... thanks for the tip | 15:04 | |
15:09
MasterDuke left
|
|||
ufobat | how could I pass random key=value paris to a p6-script, what would be a good signature for MAIN() | 15:10 | |
15:14
molaf left
|
|||
moritz | have you tried *%options? | 15:14 | |
$ perl6 -e 'sub MAIN(*%options) { say %options.perl }' --foo=bar | |||
{:foo("bar")} | |||
ufobat | i've tried it without * which didnt work | 15:17 | |
15:18
uzl joined
15:19
p6bannerbot sets mode: +v uzl
15:21
uzl left,
uzl joined
15:22
p6bannerbot sets mode: +v uzl
|
|||
ufobat | does this work for you? perl6 -e 'my %*SUB-MAIN-OPTS = {:named-anywhare}; sub MAIN("a", :$b) {}' a -b=1 | 15:24 | |
15:25
ZofBot joined,
ChanServ sets mode: +v ZofBot,
p6bannerbot sets mode: +v ZofBot
15:26
ZofBot_ joined,
ChanServ sets mode: +v ZofBot_,
p6bannerbot sets mode: +v ZofBot_,
ZofBot__ joined,
ChanServ sets mode: +v ZofBot__,
ZofBot__ left,
ZofBot_ left,
ZofBot left,
ZofBot joined,
ChanServ sets mode: +v ZofBot,
p6bannerbot sets mode: +v ZofBot
|
|||
uzl | m: class A {has $!id; method get-id { $!id }; submethod TWEAK { $!id = "Class A" }}; class B is A { has $!id; submethod TWEAK { $!id = "class B" }}; say B.new.get-id; | 15:28 | |
camelia | Class A | ||
15:28
clarkema joined
|
|||
uzl | m: class A {has $!id; method get-id { $!id }; submethod TWEAK { $!id = "Class A" }}; class B is A { has $!id; submethod TWEAK { $!id = "class B" }}; say B.new.^attributes; | 15:29 | |
camelia | (Mu $!id Mu $!id) | ||
15:29
dotdotdot left
|
|||
uzl | m: class A {has $!id; method get-id { $!id }; submethod TWEAK { $!id = "Class A" }}; class B is A { has $!id; submethod TWEAK { $!id = "class B" }}; say B.new.^attributes(:local); | 15:29 | |
camelia | (Mu $!id) | ||
15:29
p6bannerbot sets mode: +v clarkema
|
|||
uzl | How can I get the value of $!id in the class B instead of A? | 15:29 | |
moritz | uzl: inside the class body, just use $!id | 15:31 | |
ufobat | but i'd say within the method get-id you cant get it, because get-id of A cant see the private attributes of subclasses | 15:32 | |
sena_kun | my $attr = B.new.^parents[0].^attributes(:local); $attr.get_value(B.new); | ||
SmokeMachine | m: class A {has $!id; method get-id { $!id }; submethod TWEAK { $!id = "Class A" }}; class B is A { submethod TWEAK { self.^attributes.first(*.name eq q[$!id]).set_value: self, "class B" }}; say B.new.get-id; # I know... its terrible... | ||
camelia | class B | ||
15:32
coet[work] joined,
p6bannerbot sets mode: +v coet[work]
|
|||
ufobat | B doesn't see $!id of A and A doesnt see $!id of B, they're both something different | 15:33 | |
sena_kun | using MOP, but that is a bad thing (though I hope you __really__ want that). | ||
m: class A { has $!id; method get-id { $!id }; submethod TWEAK { $!id = "Class A" }}; class B is A { has $!id; submethod TWEAK { $!id = "class B" }}; my $attr = B.new.^parents[0].^attributes(:local)[0]; say $attr.get_value(B.new); | 15:34 | ||
camelia | Class A | ||
ufobat | you could make $.id public? | ||
15:35
uzl left
|
|||
moritz | or you could trust the parent class | 15:35 | |
15:35
tobs` left
|
|||
SmokeMachine | m: class A {has $.id is rw = "Class A"; method get-id { $!id }; class B is A { submethod TWEAK { $.id = "class B" }}; say B.new.get-id; # I know... its terrible... | 15:36 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> 'A::B' cannot inherit from 'A' because 'A' isn't composed yet (maybe it is stubbed) at <tmp>:1 |
||
15:37
dotdotdot joined
15:38
p6bannerbot sets mode: +v dotdotdot
15:39
uzl joined,
p6bannerbot sets mode: +v uzl
|
|||
uzl | sorry, i got disconnected. | 15:40 | |
moritz: I meant accessing it through the inherited `get-id` method. | |||
jnthn | m: class A { has $.id = 1; }; class B is A { has $.id = 2 }; given B.new { say .id; say .A::id } | 15:42 | |
camelia | 2 1 |
||
moritz | uzl: the inherited get-id method can't access it | 15:43 | |
uzl | I was backlogging and read the responses. Thanks! | 15:47 | |
15:47
uzl left
15:58
coet|login joined,
coet|login left,
abraxxa left
16:03
graphene left
16:04
graphene joined
16:05
p6bannerbot sets mode: +v graphene,
coet[work] is now known as orejotas,
orejotas left,
orejotas joined,
barjavel.freenode.net sets mode: +v orejotas,
p6bannerbot sets mode: +v orejotas
16:06
khatar joined,
khatar left,
rindolf joined,
p6bannerbot sets mode: +v rindolf,
orejotas is now known as coet
16:07
coet left,
coet joined,
barjavel.freenode.net sets mode: +v coet,
p6bannerbot sets mode: +v coet,
eiro1 joined
16:08
p6bannerbot sets mode: +v eiro1
16:09
coet is now known as coet[work]
16:12
ChoHag joined
16:13
Kaiepi joined,
p6bannerbot sets mode: +v ChoHag
16:14
p6bannerbot sets mode: +v Kaiepi,
eiro1 left,
eiro joined,
coet[work] left,
pampolut joined,
p6bannerbot sets mode: +v pampolut,
pampolut left
16:15
coet[work] joined,
p6bannerbot sets mode: +v coet[work],
coet[work] left
|
|||
mornfall | can I somehow ask that a thing happens at exit? sort of like with END {}, but I only want to run the thing if I get to a certain point of the program | 16:15 | |
16:15
p6bannerbot sets mode: +v eiro,
coet[work] joined,
p6bannerbot sets mode: +v coet[work],
coet[work] left
|
|||
mornfall | what I actually want: I have a Proc::Async running in the background and I want to clean it up if someone calls exit(1) in the middle of the script | 16:16 | |
it's a bit problematic because the program is actually running under a different UID, so Proc::Async won't be able to kill it even if it wanted to | |||
16:16
coet[work] joined,
p6bannerbot sets mode: +v coet[work]
|
|||
mornfall | so I need my own piece of code to run | 16:16 | |
well i guess i can do a thing like END { cleanup if ( $pid ); } | 16:17 | ||
Xliff | mornfall: I was about to suggest something like that. | 16:18 | |
timotimo | there's a module for that, afaik | 16:23 | |
oh, the bots aren't there? | |||
16:24
kensanata left
|
|||
mornfall | another thing: how do i undef a variable? $pid = undef tells me to use Any, but Any.new gives me something that evaluates to true? | 16:24 | |
timotimo | you're supposed to assign Any, not Any.new :) | 16:25 | |
mornfall | as in the type? | ||
jkramer | Or assign Nil | ||
timotimo | yeah | ||
type objects are what perl6 has for undefined values | |||
16:25
domidumont left
|
|||
[Coke] | you can think of the type objects like Any or Int type-specific undefs. | 16:26 | |
mornfall | interesting | ||
timotimo | it has all kinds of cool consequences in the language | 16:27 | |
for example, when you write my FooBar $blep .= new, it'll work because the default value for $blep is the FooBar type object | 16:31 | ||
so that'll call new on the type object and assign the result to the variable | 16:32 | ||
mornfall | any neat tricks to get get Proc::Async stdout/stderr as lines? | 16:34 | |
jnthn | $proc.stdout.lines | 16:35 | |
16:35
robertle left
|
|||
mornfall | .tap, i just tried that (dunno if it worked yet) | 16:35 | |
jnthn | `whenever $proc.stdout.lines -> $line { }` | ||
mornfall | \o/ almost (need to tack a newline at the end now) | 16:36 | |
cool stuff | |||
i think i'll get used to this :p | 16:37 | ||
timotimo | can probably :!chomp in the .lines | 16:38 | |
mornfall | .lines already eats the newlines (but i need them back) | ||
timotimo | yes | ||
that's why you :!chomp instead of the default which is :chomp | |||
mornfall | oh wait... is !chomp supposed to un-chomp? | 16:39 | |
timotimo | docs.perl6.org/routine/lines#class_Supply | ||
yeah, :foo is foo => True and :!foo is foo => False | |||
mornfall | okay, another day :) there's only so much magic i can digest in one afternoon | ||
ufobat | is this a rakudo bug= | ||
gist.github.com/ufobat/cea6b00f102...mmands-txt | |||
timotimo | the sub main opts need to be exported, too | 16:41 | |
mornfall | if a Proc::Async dies of its own volition, am i guaranteed to get everything it spewed via .tap? | ||
timotimo | i'd assume when rakudo's not able to process enough, it'll block the process so it can't write data that won't arrive | 16:42 | |
but i'd have to verify | |||
AFKBBL | |||
ufobat | timotimo, even with our %*SUB-MAIN-OPTS is export = ( 'named-anywhere' => True); it doesnt work | 16:43 | |
mornfall | okay something is not working :| | 16:53 | |
16:54
ChoHag left
16:56
rindolf left
16:57
ExtraCrispy joined,
p6bannerbot sets mode: +v ExtraCrispy
17:01
ChoHag joined
17:02
p6bannerbot sets mode: +v ChoHag
|
|||
mornfall | okay i think i need to somehow wait for the tapped supplies | 17:05 | |
17:06
TreyHarris joined,
p6bannerbot sets mode: +v TreyHarris
|
|||
mornfall | okay I can get a Promise out of it, it seems | 17:06 | |
17:07
robertle joined
17:08
p6bannerbot sets mode: +v robertle
17:30
rindolf joined
17:31
p6bannerbot sets mode: +v rindolf
17:37
ufobat left
17:38
Ven`` joined
17:39
p6bannerbot sets mode: +v Ven``
|
|||
mornfall | okay i have no idea how to use react | 17:43 | |
or Supply.from-list | |||
hm, that bit seems to work... i'm still puzzled though :\ | 17:46 | ||
17:47
andrzejku_ joined,
p6bannerbot sets mode: +v andrzejku_
17:48
andrzejku_ is now known as andrzejku
17:50
molaf joined
17:51
p6bannerbot sets mode: +v molaf
17:56
andrzejku_ joined
17:57
p6bannerbot sets mode: +v andrzejku_
17:59
andrzejku left,
andrzejku_ is now known as andrzejku
18:01
ryn1x joined,
p6bannerbot sets mode: +v ryn1x
18:02
beeman left
|
|||
mornfall | okay the captive program is buffering its output /o\ | 18:04 | |
can i ask Proc::Async to run the thing in a PTY? | |||
or is there some other way to coax external programs to autoflush? | |||
18:06
ryn1x left
18:15
coet[work] left
|
|||
timotimo | PTY is really, really, really fiddly to do | 18:16 | |
especially when crossplatforming something | |||
18:16
Ven`` left
18:19
Ven`` joined,
andrzejku left
18:20
p6bannerbot sets mode: +v Ven``
|
|||
mornfall | timotimo: i know, since the slave is a python script i figured i can just do python -u ... | 18:20 | |
nonetheless, a single 'whenever' block can run concurrently with itself? | 18:21 | ||
because that's something i didn't expect | |||
(i would also like to stop that from happening but didn't find a way yet) | |||
throttle might be the thing, but it's... confusing | 18:24 | ||
18:31
beeman joined,
p6bannerbot sets mode: +v beeman
18:33
random_yanek joined,
p6bannerbot sets mode: +v random_yanek,
Ven`` left
18:38
joy_ joined,
p6bannerbot sets mode: +v joy_
18:41
andrzejku joined,
p6bannerbot sets mode: +v andrzejku
18:48
Ven`` joined
18:49
p6bannerbot sets mode: +v Ven``
18:56
scimon left,
andrzejku_ joined
18:57
p6bannerbot sets mode: +v andrzejku_
18:59
andrzejku__ joined,
andrzejku left,
andrzejku__ is now known as andrzejku
19:00
p6bannerbot sets mode: +v andrzejku,
zakharyas left
19:02
andrzejku_ left
|
|||
timotimo | there's only ever one piece of code running per "react" or "supply" block | 19:07 | |
19:14
hamhu3 left
19:17
pmurias joined,
p6bannerbot sets mode: +v pmurias
|
|||
pmurias | SmokeMachine: hi | 19:18 | |
yoleaux | 04:43Z <SmokeMachine> pmurias: would you mind of giving me your opinion about perl6.github.io/6pad/#3d9c7dd4834c...9011ab6420 ? | ||
04:45Z <SmokeMachine> pmurias: is there something different I should do on my module if it will depend on js... | |||
pmurias | SmokeMachine: super cool that you are building something with rakudo.js | ||
SmokeMachine | pmurias: hi! | ||
pmurias: is there any best practices to crete modules for it? | 19:19 | ||
pmurias | SmokeMachine: not yet, just started thinking about it | ||
I'll have to go through the module meta data spec and see how implementation dependend ones should be marked | |||
and it would be cool if 6pad had a way of using modules, got to think how to hook that up too | 19:20 | ||
19:21
perlbot joined
|
|||
SmokeMachine | that would be wonderful! | 19:21 | |
19:21
p6bannerbot sets mode: +v perlbot,
perlbot left
|
|||
pmurias | is that our official META6.json spec: design.perl6.org/S22.html#META6.json | 19:25 | |
19:32
graphene left,
sena_kun left
19:33
perlbot joined,
p6bannerbot sets mode: +v perlbot,
graphene joined
19:34
p6bannerbot sets mode: +v graphene
19:35
lizmat joined,
p6bannerbot sets mode: +v lizmat,
simcop2387 joined,
p6bannerbot sets mode: +v simcop2387
19:37
pmurias left
19:38
pmurias joined,
p6bannerbot sets mode: +v pmurias
|
|||
lucs | What do I need to change to make something like this, which works: | 19:55 | |
if $cond { $instance.foo } else { $instance.bar } | |||
to something like this (which doesn't): | |||
$instance.($cond ?? foo !! bar) | |||
pmurias | SmokeMachine: I'm thinking we need something like a :from style modifier as dependency | 19:57 | |
SmokeMachine: See design.perl6.org/S22.html#%3Afrom%3Cbin%3E | |||
SmokeMachine: a :from<npm> seems sensible for js modules not sure right know what a good one for just raw EVAL stuff would be | 19:58 | ||
SmokeMachine | pmurias: I agree | 19:59 | |
tobs | m: IntStr.new(10, "ten")."{ $_ ?? "Int" !! "Str" }"().say for True, False | 20:03 | |
camelia | 10 ten |
||
tobs | lucs: this uses ."method-name" call syntax, which allows interpolation of expressions | ||
the parentheses are required though | 20:04 | ||
lucs | tobs: Perfect. Thanks. | 20:06 | |
masak | m: IntStr.new(10, "ten")."$(my $method)"().say given $method = $_ ?? "Int" !! "Str" for True, False | 20:10 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing semicolon at <tmp>:1 ------> 3ay given $method = $_ ?? "Int" !! "Str" 7⏏5for True, False |
||
20:11
sena_kun joined
|
|||
masak | oh, `given` and `for` clash, maybe | 20:11 | |
m: (IntStr.new(10, "ten")."$(my $method)"().say given $method = $_ ?? "Int" !! "Str") for True, False | |||
camelia | 10 ten |
||
masak | not my best code... :P | ||
20:11
p6bannerbot sets mode: +v sena_kun
20:12
irdr left
|
|||
vrurg | Have a question. Lets assume theres a class B inheriting from A. There is an instance of A (my $a = A.new). How do I create and instance of B which would be a clone of $a without manulally passing on all attributes from A? | 20:13 | |
20:14
TreyHarris left
|
|||
vrurg | Something like B.new( |$a.Hash )? | 20:15 | |
jnthn | If they're all public attributes, probably B.new(|$a.Capture) will do it | 20:16 | |
vrurg | Yes, they're. Thanks jnthn! | 20:18 | |
20:19
irdr joined
20:20
p6bannerbot sets mode: +v irdr
|
|||
pmurias | SmokeMachine: I'll have to play around with how code splitting in parcel works so it might be possible to precompile a lot of Perl 6 modules to allow them to be usable in 6pad | 20:20 | |
masak | m: class C { has $.x; has $.y }; my $c = C.new(:x(1), :y(2)); say $c.Capture | 20:21 | |
camelia | \(:x(1), :y(2)) | ||
20:22
andrzejku_ joined
20:23
p6bannerbot sets mode: +v andrzejku_
|
|||
pmurias | got to walk the dog (as I fear it might be going berserk on house interior) | 20:23 | |
& | |||
20:25
andrzejku left,
andrzejku_ is now known as andrzejku,
AlexDaniel joined,
p6bannerbot sets mode: +v AlexDaniel
|
|||
El_Che | weekly: news.ycombinator.com/item?id=18561587 lots op Perl 6 in the comments | 20:27 | |
notable6 | El_Che, Noted! | ||
El_Che | ^-- lizmat | ||
lizmat | yeah, Go2 ... :-) | ||
El_Che | every language seems to have a Perl 6/Python 3 moment :) | 20:28 | |
mornfall | how about php 6 :p | 20:38 | |
El_Che | lizmat: it's look like they are jumping on the unicode wagon (1. #20706 General Unicode identifiers based on Unicode TR31) although not Perl6-crazy style :) | ||
lizmat | then they will find out that it is not enough :-) | 20:39 | |
masak | El_Che: if identifiers are made public by making the first character uppercase, how would you make an identifier starting with a Chinese character public? | ||
El_Che | yeah, they are pretty ambivalent about the go 2 changes | ||
masak: "There are normalization questions which we need to answer" ? | 20:40 | ||
20:40
zakharyas joined
|
|||
El_Che | masak: maybe they'll introduce twigils :) | 20:41 | |
20:41
p6bannerbot sets mode: +v zakharyas
|
|||
masak | this does not seem to be about normalization. it's about using the capitalization of the first character in the identifier as a `public`/`export` trait | 20:44 | |
and you can't do that with (e.g.) hanzi, because they do not have lowercase/uppercase | 20:45 | ||
El_Che | masak: I am completely ignorant (perfectly numb) about casing in Chinese | ||
masak | it's simple: there is none | ||
El_Che | then we have a problem :) | ||
masak | that's my point | ||
maybe you simply can't use hanzi for API-level things | 20:46 | ||
El_Che | - new features: support for most languages, execept Chinese and some other "minor" languages :) | ||
masak | pfah :) | ||
El_Che | masak: It's weird to combine latin names and local alphabets | 20:47 | |
like articles do by adding random local words in the article | |||
"So, he answered in Spanish, "Hey, compadre, where are you going" | 20:48 | ||
grr | |||
:) | |||
masak | my native language isn't English, but I do all my programming in English. which probably makes me biased in a way | 20:49 | |
El_Che | or old | 20:50 | |
:) | |||
20:51
lizmat left
20:53
lizmat joined,
p6bannerbot sets mode: +v lizmat
20:57
lizmat_ joined,
p6bannerbot sets mode: +v lizmat_
|
|||
masak | not that you're wrong, but how would using English make me old? :) | 20:58 | |
El_Che | because in the olde days, that's all we had :) | 20:59 | |
20:59
lizmat left,
kurahaupo_ joined
21:00
p6bannerbot sets mode: +v kurahaupo_
|
|||
masak | not sure what you mean | 21:00 | |
all mainstream languages have keywords in English -- I'd be interested to hear about even one exception | 21:01 | ||
21:01
kurahaupo left
|
|||
masak | English, for better or worse, is the lingua franca (yes, I know) of computing | 21:02 | |
21:03
kurahaupo joined
21:04
p6bannerbot sets mode: +v kurahaupo
21:05
kurahaupo_ left
21:07
kurahaupo left
|
|||
El_Che | masak: you missed zoffix's utf8 tweets about crazy operators :) | 21:08 | |
masak: but, idd, I also use english vars and whatnot | |||
s/idd/indeed/ | 21:11 | ||
timotimo | masak: i have one for you, but i forgot what it's called! | 21:12 | |
nas.sr/%D9%82%D9%84%D8%A8/ here it is | |||
21:14
pmurias left
|
|||
lucasb | ah, the great قلب programming language | 21:16 | |
21:20
pmurias joined,
p6bannerbot sets mode: +v pmurias
21:21
ranguard joined
|
|||
El_Che | manual.lenguaje-latino.org/si_sino_if_else.html | 21:21 | |
programming in spanish | |||
21:21
ranguard left
|
|||
El_Che | Logo also has a Spanish version, iirc | 21:22 | |
timotimo | well, i mean, there's also basic in german, isn't there? | 21:23 | |
El_Che | baßic? | 21:24 | |
en.wikipedia.org/wiki/Non-English-..._languages | 21:25 | ||
timotimo | baſic | ||
El_Che | thinking of the Cold War, I would expect some Russian languages | ||
21:26
zakharyas left
|
|||
El_Che | Someone here going to DockerCon next week? | 21:27 | |
21:28
lizmat_ left
|
|||
AlexDaniel | El_Che, robertle: 2018.11 was released some seconds ago :) v6.d is now the default language version | 21:31 | |
El_Che | \œ/ | 21:32 | |
it's a typo, but consider it a Janus face looking at the past and the future at the same time :) | |||
AlexDaniel: thx, running on travis now! | 21:34 | ||
AlexDaniel | squashable6: next | 21:40 | |
squashable6 | AlexDaniel, ⚠🍕 Next SQUASHathon in 2 days and ≈12 hours (2018-12-03 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
Geth | advent: Altai-man++ created pull request #3: Claiming a spot for my second article |
21:47 | |
lucasb | cool, just noticed 5.28.1 was also released! | 21:51 | |
21:54
dct joined,
p6bannerbot sets mode: +v dct
|
|||
Geth | advent: 184a254a1c | Altai-man++ (committed using GitHub Web editor) | perl6advent-2018/schedule Claiming a spot for my second article |
22:01 | |
advent: ce0746744e | (Aleks-Daniel Jakimenko-Aleksejev)++ (committed using GitHub Web editor) | perl6advent-2018/schedule Merge pull request #3 from Altai-man/patch-1 Claiming a spot for my second article |
|||
sena_kun wonders how many words are "too many" for a blog post | 22:04 | ||
22:05
Celelibi joined
22:06
p6bannerbot sets mode: +v Celelibi
22:14
sno joined,
p6bannerbot sets mode: +v sno
22:18
sno left
22:22
Ven`` left
22:23
sno joined,
graphene left
22:24
p6bannerbot sets mode: +v sno,
sena_kun left,
graphene joined
22:25
p6bannerbot sets mode: +v graphene
22:30
sena_kun joined,
p6bannerbot sets mode: +v sena_kun
22:41
Khisanth joined,
graphene left
22:42
p6bannerbot sets mode: +v Khisanth,
graphene joined
22:43
p6bannerbot sets mode: +v graphene
|
|||
tbrowder | i have posted a draft of my Advent article here ,github.com/tbrowder/Perl6-Advent/b...-04.md> | 22:46 | |
i would appreciate any technical corrections (particularly the grammar stuff) or other suggestions | 22:47 | ||
22:53
sena_kun left,
perlbot left,
simcop2387 left
22:57
simcop2387 joined,
p6bannerbot sets mode: +v simcop2387
|
|||
lucasb | just a nitpick about capitalization, which you may disagree, I prefer to use "POD" for the Perl 5 variant and "Pod" for the Perl 6 variant of the "plain old documentation" formats :) | 22:57 | |
I think this case distinction helps to distinguish which variant is being talked about | 22:59 | ||
El_Che | lucasb: that's confusing | 23:00 | |
lucasb | indeed it is | 23:01 | |
tbrowder | i consciously used POD because it's really an acronym, but I'm amenable to changing. jmerelo: thoughts? | ||
23:02
Celelibi left
|
|||
El_Che | if one needs an explanation of the difference between POD and Pod, it looks like a lost battle to me | 23:03 | |
damn, we suck at names | |||
tbrowder | jmerelo i think is pushing for "Pod 6" or "Pod6". we do use the ".pod6" file extension... | ||
AlexDaniel | haha let's call it rakud | 23:04 | |
tbrowder | "rakupod?" | 23:05 | |
rakup | |||
23:06
perlbot joined,
p6bannerbot sets mode: +v perlbot
|
|||
tbrowder | "rakup" the balls, boys, and lets have a pool game! | 23:06 | |
23:07
lizmat joined,
p6bannerbot sets mode: +v lizmat
23:08
Celelibi joined
23:09
p6bannerbot sets mode: +v Celelibi
23:13
andrzejku left,
andrzejku joined
23:14
p6bannerbot sets mode: +v andrzejku
23:16
kerframil joined,
p6bannerbot sets mode: +v kerframil
23:23
rindolf left
23:28
pmurias left
23:42
beeman left
|