»ö« 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. |
|||
vrurg | .^compose works, sorry! The error was coming from another location. Thank timotimo! | 00:00 | |
timotimo | oh, cool! | ||
vrurg | Though there is another thing which is confusing me alot. When a trait is applied in a role then Attribute.package returns an object with GenericHOW metaclass. That doesn't seem correct to me. | 00:01 | |
00:04
fake_space_whale joined
00:07
mcmillhj joined
00:12
mcmillhj left
00:23
mcmillhj joined
00:27
mcmillhj left
00:28
[particle]1 joined
00:30
[particle] left
00:45
[particle]1 left
00:52
kalkin-- joined
00:56
kalkin- left
00:58
mcmillhj joined
01:00
Ven`` left,
Phraeyll joined
01:03
mcmillhj left,
TreyHarris left
01:04
[particle] joined
01:11
[particle] left
01:13
Xliff joined
|
|||
Xliff | m: ((1, 2, 3) ~~ (2, 3).any).say | 01:13 | |
camelia | True | ||
Xliff | m: ((1, 2, 3) ~~ (2, 3).none).say | ||
camelia | False | ||
01:13
Ven`` joined
|
|||
Xliff | m: ((1, 4, 5) ~~ (2, 3).none).say | 01:13 | |
camelia | False | ||
Xliff | m: ((1, 4, 5).any ~~ (2, 3).none).say | ||
camelia | True | ||
tyil | tbrowder_: I dont mind waiting for both to land at the same time, unless you can get part of it in the next rakudo star release | 01:14 | |
tbrowder_ | tyil: i will probably do just the first type first, but we’ll see | 01:15 | |
01:16
TreyHarris joined
|
|||
tyil | I'm already glad you're looking into it :> | 01:17 | |
it doesn't seem to be an issue affecting many people, so there's no hurry with it I guess | 01:18 | ||
01:26
Xliff left
01:27
mcmillhj joined
01:32
mcmillhj left
|
|||
tobs | m: say 2 ~~ 2&3; say 3 ~~ 2&3; say 2|3 ~~ 2&3; say 2&3 ~~ 2|3; | 01:36 | |
camelia | False False True False |
||
tobs | the last two are surprising to me. I'd think nothing would smartmatch 2&3 | 01:37 | |
it seems to be coming from | 01:45 | ||
m: say 2|3 ~~ 2 | |||
camelia | True | ||
tobs | which does make sense | ||
m: say 2|3 ~~ 2 and 2|3 ~~ 3 | 01:47 | ||
camelia | True | ||
benjikun | 2&3 creates all(2, 3) | 01:50 | |
m: say 2&3 | |||
camelia | all(2, 3) | ||
benjikun | You've just got to avoid thinking about it in the same way as using && | 01:52 | |
01:53
Ven`` left
01:54
Ven`` joined
|
|||
lookatme | m: say 2 ~~ 2+&3 | 01:56 | |
camelia | True | ||
lookatme | m: say 3 ~~ 2+&3 | ||
camelia | False | ||
lookatme | m: say 4 ~~ 2+&4 | ||
tobs | :) | ||
camelia | False | ||
lookatme | for fun | 01:57 | |
01:59
mcmillhj joined
02:02
Ven`` left
|
|||
tobs | benjikun: but an all junction should be equivalent to a chain of logical ands. My problem was that I read "2|3 ~~ 2&3" not as "2|3 ~~ 2 and 2|3 ~~ 3" but as "2 ~~ 2&3 or 3 ~~ 2&3". But of course, smartmatch ACCEPTS on the RHS. | 02:03 | |
02:03
mcmillhj left
|
|||
lookatme | m: say (2|3 ~~ 2) | 02:05 | |
camelia | True | ||
lookatme | m: say (2|3) ~~ (2&3) | 02:06 | |
camelia | True | ||
lookatme | m: say (2&3) ~~ (2|3) | ||
camelia | False | ||
02:23
mcmillhj joined
02:28
mcmillhj left
02:36
[particle] joined
02:40
mcmillhj joined
02:43
[particle] left
02:45
mcmillhj left
03:08
robertle left
03:10
robertle joined
03:11
vrurg left
03:12
mcmillhj joined
03:16
mcmillhj left
03:19
rouking joined
03:20
rouking left
03:25
Khisanth left
03:26
mcmillhj joined
03:31
mcmillhj left
03:36
wamba joined
03:38
Khisanth joined
03:42
Phraeyll left
03:45
molaf joined
03:55
molaf left
04:01
mcmillhj joined
04:06
mcmillhj left
04:08
w_richard_w joined
04:10
rindolf joined
04:12
mcmillhj joined
|
|||
buggable | New CPAN upload: KHPH-0.0.2.tar.gz by MLDEVINE modules.perl6.org/dist/KHPH:cpan:MLDEVINE | 04:15 | |
New CPAN upload: KHPH-0.0.1.tar.gz by MLDEVINE modules.perl6.org/dist/KHPH:cpan:MLDEVINE | |||
04:17
mcmillhj left
04:24
spycrab0 left
|
|||
buggable | New CPAN upload: KHPH-0.0.3.tar.gz by MLDEVINE modules.perl6.org/dist/KHPH:cpan:MLDEVINE | 04:25 | |
04:43
mcmillhj joined
04:48
mcmillhj left
05:15
troys left,
fake_space_whale left
05:22
mcmillhj joined
05:26
lizmat left,
robertle_ left
05:27
mcmillhj left
05:29
kerframil left
05:34
mcmillhj joined
05:36
fake_space_whale joined
05:39
mcmillhj left
05:44
jmerelo joined
05:46
Actualeyes joined
05:50
[particle] joined
05:52
fake_space_whale left
|
|||
jmerelo | squashable6: status | 05:52 | |
squashable6 | jmerelo, ⚠🍕 Next SQUASHathon in 4 days and ≈4 hours (2018-08-04 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
05:54
rindolf left
|
|||
lookatme | m: constant C = BEGIN do { 42 }; | 05:55 | |
camelia | ===SORRY!=== QAST::Block with cuid 4 has not appeared |
||
lookatme | what happened with above code ? | ||
jmerelo | lookatme: as in, it worked before? | 05:56 | |
lookatme | IDK | 05:57 | |
benjikun | m: constant C = BEGIN { 42 }; | ||
camelia | ( no output ) | ||
lookatme | m: constant C = BEGIN { 42 }; say C; | ||
camelia | 42 | ||
lookatme | great | 05:59 | |
benjikun | :) | ||
06:07
mcmillhj joined
06:10
rindolf joined
06:11
mcmillhj left
06:23
giraffe left
06:29
spycrab0 joined
06:31
vrurg joined
|
|||
masak | m: BEGIN { foo() }; sub foo() { say "OH HAI" } | 06:32 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: foo used at line 1 |
||
06:37
giraffe joined
06:38
Woodi left
06:45
vrurg left
06:47
domidumont joined
06:50
mcmillhj joined
06:52
abraxxa joined
06:53
domidumont left
06:54
domidumont joined,
w_richard_w left
06:55
mcmillhj left
|
|||
Geth | doc: aede24b1e5 | (JJ Merelo)++ | doc/Language/functions.pod6 Changes anchors and de-capitalizes headers #2223 #1303 |
07:13 | |
doc: 7390cfe886 | (JJ Merelo)++ | doc/Language/operators.pod6 Clarifies mixins examples |
|||
synopsebot | Link: doc.perl6.org/language/functions | ||
Link: doc.perl6.org/language/operators | |||
doc: cff167a121 | (JJ Merelo)++ | doc/Type/Sub.pod6 Adding an example that clarifies how subs are accessed ... from outer scopes. This closes #2220 |
|||
synopsebot | Link: doc.perl6.org/type/Sub | ||
07:18
andrzejku joined
07:20
mcmillhj joined
07:24
zakharyas joined
07:25
mcmillhj left
|
|||
Geth | doc: JJ self-unassigned Proc::Async Example needs to be modified to run on Windows 10 github.com/perl6/doc/issues/1453 990083c782 | (JJ Merelo)++ | doc/Language/classtut.pod6 Refs #2223 #1303 |
07:26 | |
07:33
mcmillhj joined
07:34
psychoslave joined
07:37
mcmillhj left
|
|||
xinming | should multi submethod work as expected? | 07:43 | |
Also, when submethod BUILD { ... } and we use augment class blabla { submethod BUILD { } }; <--- This doesn't seems to work, It says there is already a submethod named build. do we mean multi-method | 07:44 | ||
masak | m: class C { multi submethod BUILD(:$x!) { say "x" }; multi submethod BUILD(:$y!) { say "y" } }; C.new(:x); C.new(:y) | 07:45 | |
camelia | x y |
||
masak | xinming: worksforme | ||
can't speak to `augment`, basically I stay away from it ;) | 07:46 | ||
xinming | m: class C { submethod BUILD (Str :$str) { ... } }; augment class C { submethod BUILD (Str :$str, Bool $bool) { } } | 07:47 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> augment not allowed without 'use MONKEY-TYPING' at <tmp>:1 ------> 3 (Str :$str) { ... } }; augment class C7⏏5 { submethod BUILD (Str :$str, Bool $boo expecting any of: generi… |
||
xinming | m: use MONKEY-TYPING; class C { submethod BUILD (Str :$str) { ... } }; augment class C { submethod BUILD (Str :$str, Bool $bool) { } } | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Cannot put required parameter $bool after variadic parameters at <tmp>:1 ------> 3{ submethod BUILD (Str :$str, Bool $bool7⏏5) { } } expecting any of: constraint |
||
xinming | m: use MONKEY-TYPING; class C { submethod BUILD (Str :$str) { ... } }; augment class C { submethod BUILD (Str :$str, Bool :$bool) { } } | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Package 'C' already has a submethod 'BUILD' (did you mean to declare a multi-method?) at <tmp>:1 |
||
xinming | Here, this is the error I mean. | ||
masak | yes, because without any `multi`, you're basically causing a collision | ||
xinming | since in base class, It already has submethod defined | ||
masak | it's `augment`, not `supersede` | ||
xinming | In this way, How do we fix it? something like override the original method | 07:48 | |
I'I'll try bbl | |||
masak | not sure there's a simple answer. depends what you want. | ||
xinming | m: use MONKEY-TYPING; class C { submethod BUILD (Str :$str) { ... } }; augment class C { supercede submethod BUILD (Str :$str, Bool :$bool) { } } | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Package 'C' already has a submethod 'BUILD' (did you mean to declare a multi-method?) at <tmp>:1 |
||
masak | given you're using `augment`, your goals are already suspect :P | ||
xinming | m: use MONKEY-TYPING; class C { submethod BUILD (Str :$str) { ... } }; augment class C { supersede submethod BUILD (Str :$str, Bool :$bool) { } } | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> "supersede" not yet implemented. Sorry. at <tmp>:1 ------> 3thod BUILD (Str :$str, Bool :$bool) { } 7⏏5} |
||
xinming | :-) | 07:49 | |
some upstream package doesn't work well in my case. | |||
I'll have to write another one myself then.\ | 07:50 | ||
masak | yeah, maybe wrap/facade | 07:55 | |
xinming | How do we get the slot of the private variable by a string? | 08:01 | |
something like, my $private-attr = 'user'; How can we access the $!user ? | |||
08:02
mcmillhj joined
08:03
scimon joined
08:06
molaf joined,
mcmillhj left
|
|||
jmerelo | xinming: you mean, without using EVAL? | 08:06 | |
masak | m: class C { has $!user = "OH HAI"; method foo { my $var = q[user]; say C.^attributes.grep(*.name eq q[$!] ~ $var)[0].get_value(self) } }; C.new.foo | 08:09 | |
camelia | OH HAI | ||
masak | xinming: ^ | ||
could be .first helps get rid of that [0] | 08:10 | ||
also probably needs more error handling | |||
jmerelo | m: class Classy{ has $.class; method ically() { my $var = "class"; return $.::{$var}}; my $c = Classy.new( class => 'of its own' ); say $c.ically | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unsupported use of $. variable; in Perl 6 please use the .kv method on e.g. .lines at <tmp>:1 ------> 3 ically() { my $var = "class"; return $.7⏏5::{$var}}; my $c = Classy.new( class => |
||
jmerelo | m: class Classy{ has $.class; method ically() { my $var = "class"; return .^lookup($var) }; my $c = Classy.new( class => 'of its own' ); say $c.ically | 08:11 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing block at <tmp>:1 ------> 3( class => 'of its own' ); say $c.ically7⏏5<EOL> expecting any of: postfix statement end statement modifier stat… |
||
jmerelo | m: class Classy{ has $.klass; method ically() { my $var = "klass"; return .^lookup($var) }; my $c = Classy.new( klass => 'of its own' ); say $c.ically | 08:12 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing block at <tmp>:1 ------> 3( klass => 'of its own' ); say $c.ically7⏏5<EOL> expecting any of: postfix statement end statement modifier stat… |
||
jmerelo | m: class Classy{ has $.klass; method ically() { my $var = "klass"; return .^lookup($var) } }; my $c = Classy.new( klass => 'of its own' ); say $c.ically | ||
camelia | (Mu) | ||
jmerelo | m: class Classy{ has $.klass; method ically() { my $var = "klass"; say .^lookup($var).perl } }; my $c = Classy.new( klass => 'of its own' ); say $c.ically | 08:13 | |
camelia | Mu True |
||
jmerelo | m: class Classy{ has $.klass; method ically() { my $var = "klass"; say self.^lookup($var).perl } }; my $c = Classy.new( klass => 'of its own' ); say $c.ically | ||
camelia | method klass (Classy:D: *%_) { #`(Method|68448256) ... } True |
||
08:13
raynold left
|
|||
jmerelo | m: class Classy{ has $.klass; method ically() { my $var = "klass"; say CLASS.^lookup($var).perl } }; my $c = Classy.new( klass => 'of its own' ); say $c.ically | 08:13 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared name: CLASS used at line 1. Did you mean 'Classy'? |
||
jmerelo | m: class Classy{ has $.klass; method ically() { my $var = "klass"; say ::.^lookup($var).perl } }; my $c = Classy.new( klass => 'of its own' ); say $c.ically | ||
camelia | Mu True |
||
jmerelo | m: class Classy{ has $.klass; method ically() { my $var = "klass"; say $?CLASS.^lookup($var).perl } }; my $c = Classy.new( klass => 'of its own' ); say $c.ically | 08:14 | |
camelia | method klass (Classy:D: *%_) { #`(Method|77331296) ... } True |
||
jmerelo | m: class Classy{ has $.klass; method ically() { my $var = "klass"; return $?CLASS.^lookup($var) } }; my $c = Classy.new( klass => 'of its own' ); say $c.ically | ||
camelia | klass | ||
jmerelo | m: class Classy{ has $.klass; method ically() { my $var = "klass"; return $?CLASS.^lookup($var) } }; my $c = Classy.new( klass => 'of its own' ); say $c.ically() | 08:15 | |
camelia | klass | ||
buggable | New CPAN upload: Proc-InvokeEditor-0.0.4.tar.gz by SCIMON modules.perl6.org/dist/Proc::Invoke...pan:SCIMON | ||
jmerelo | benjikun: ^lookup returns the name of attributes or methods. I can't seem to get it right, though... | ||
m: class Classy{ has $.klass; method ically() { my $var = "klass"; return self.^lookup($var) } }; my $c = Classy.new( klass => 'of its own' ); say $c.ically() | 08:16 | ||
camelia | klass | ||
jmerelo | m: class Classy{ has $.klass; my $c = Classy.new( klass => 'of its own' ); say $c.^lookup('klass') | 08:17 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing block at <tmp>:1 ------> 3 'of its own' ); say $c.^lookup('klass')7⏏5<EOL> expecting any of: postfix statement end statement modifier stat… |
||
jmerelo | m: class Classy{ has $.klass }; my $c = Classy.new( klass => 'of its own' ); say $c.^lookup('klass') | ||
camelia | klass | ||
jmerelo | m: class Classy{ has $.klass }; my $c = Classy.new( klass => 'of its own' ); say $c.^lookup('klass').^name | ||
camelia | Method | ||
jmerelo | m: class Classy{ has $.klass }; my $c = Classy.new( klass => 'of its own' ); say $c.{$c.^lookup('klass')} | 08:18 | |
camelia | Type Classy does not support associative indexing. in block <unit> at <tmp> line 1 |
||
jmerelo | m: class Classy{ has $.klass }; my $c = Classy.new( klass => 'of its own' ); say $c."$c.^lookup('klass')" | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'. at <tmp>:1 ------> 3its own' ); say $c."$c.^lookup('klass')"7⏏5<EOL> |
||
jmerelo | m: class Classy{ has $.klass }; my $c = Classy.new( klass => 'of its own' ); say $c."{$c.^lookup('klass')}" | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'. at <tmp>:1 ------> 3s own' ); say $c."{$c.^lookup('klass')}"7⏏5<EOL> |
||
scimon | So I got Perl6 running on Windows. It's.... a bit horrible. | ||
jmerelo | m: class Classy{ has $.klass }; my $c = Classy.new( klass => 'of its own' ); say $c."klass" | 08:19 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'. at <tmp>:1 ------> 3 klass => 'of its own' ); say $c."klass"7⏏5<EOL> |
||
jmerelo | m: class Classy{ has $.klass }; my $c = Classy.new( klass => 'of its own' ); say $c."klass"() | ||
camelia | of its own | ||
08:19
sena_kun joined
|
|||
jmerelo | scimon: is it Windows 10? Can you help with this? github.com/perl6/doc/issues/1453 | 08:20 | |
scimon: why is it horrible? | |||
scimon | I am just not used to working in Windows really. | 08:22 | |
Too many years developing in Linux. | |||
So for the tests of Proc::InvokeEditor I used .bat files. I need to check it works properly with .exe's plan is to add some example scripts. | 08:24 | ||
(And Cygwin needs done). | |||
jmerelo | scimon: you can have AppVeyor to do it for you. | ||
scimon: also: github.com/perl6/doc/issues/1453 Pleeeeeease | |||
scimon | Assign is to me. I'll take a look when I'm at home (and have a windows box :) ) | 08:25 | |
jmerelo | scimon: done through a comment. Thanks! | 08:26 | |
scimon | S'cool :) | ||
08:36
dakkar joined
08:44
spycrab0 left
|
|||
jmerelo reminds we have a Perl 6 documentation BoF at TPC in Glasgow act.perlconference.org/tpc-2018-gla...tion%20BoF | 08:44 | ||
xinming | Is it possible to access the private attribute in parent slot? | 08:45 | |
jmerelo | xinming: no. That's why it's called private. | ||
xinming: although you can use "trusts" docs.perl6.org/language/classtut#i...methods%29 | 08:47 | ||
synopsebot | Link: doc.perl6.org/language/classtut | ||
08:55
lizmat joined
|
|||
buggable | New CPAN upload: Propius-0.1.1.tar.gz by ATROXAPER modules.perl6.org/dist/Propius:cpan:ATROXAPER | 09:05 | |
09:08
hami joined
09:11
xinming_ joined,
vrurg joined
09:13
xinming left
09:21
vrurg left
09:22
jeromelanteri joined
09:36
spycrab0 joined
09:38
stmuk_ joined
|
|||
sena_kun | m: say Int.HOW | 09:40 | |
camelia | Perl6::Metamodel::ClassHOW.new | ||
sena_kun | m: say Array.HOW | ||
camelia | No such method 'gist' for invocant of type 'Perl6::Metamodel::ClassHOW+{<anon>}'. Did you mean 'isa'? in block <unit> at <tmp> line 1 |
||
sena_kun | both are declared in BOOTSTRAP, is it a bug? | ||
09:40
stmuk left
|
|||
lizmat | well, you could argue that "say Int.HOW" works is a feature | 09:44 | |
there was a time when that didn't either | |||
it definitely is LTA, so maybe make an issue for it | |||
09:46
wamba left
|
|||
sena_kun | lizmat, if Int working is arguable, is there something else I can use to distinguish between class/role/package/module for CORE symbols? | 09:46 | |
lizmat | m: say Array.^name | 09:47 | |
camelia | Array | ||
lizmat | m: say Array.HOW.^name | ||
camelia | Perl6::Metamodel::ClassHOW+{<anon>} | ||
lizmat | m: say Int.HOW.^name | 09:48 | |
camelia | Perl6::Metamodel::ClassHOW | ||
lizmat wonders what got mixed in for Array, though | |||
m: say Hash.HOW.^name | |||
camelia | Perl6::Metamodel::ClassHOW+{<anon>} | ||
lizmat has no time to look into it now, working on the P6W | |||
sena_kun | lizmat, thanks a lot. | 09:49 | |
El_Che | lizmat: the news of the stars! | ||
09:51
kerframil joined
|
|||
sena_kun | it works now. \o/ | 09:52 | |
09:53
jeromelanteri left
|
|||
Geth | modules.perl6.org: 91cf1bec95 | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder/Dist/PostProcessor/p30METAChecker.pm Revert "Harden meta checker against failed content fetches" This reverts commit fd967f934e102962f76f29ae04bdfd9952cee4fe. We have to return problems from the methods, which the commit doesn't |
09:55 | |
modules.perl6.org: 035edc556d | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder/Dist/PostProcessor/p30METAChecker.pm Hardness meta checker against undefs |
|||
10:01
hami left
10:12
limarfrek joined,
limarfrek left
10:13
vrurg joined
10:15
vrurg left
|
|||
Geth | doc: 62e9b9cd44 | (JJ Merelo)++ | doc/Language/contexts.pod6 Adds mixin behavior to context page Thanks to @lizmat and @zoffixznet for the explanations [here](github.com/rakudo/rakudo/issues/2149) Context is everything. Always pay attention to context. |
10:22 | |
synopsebot | Link: doc.perl6.org/language/contexts | ||
cognominal | Hi, twhat is the Perl 6 equivalent of the unix(2). Is there a ressource to help people who think in term of unix system calls, that includes Perl5-ers, to map that to the knowledge of the Perl 6 setting? I know way more of the rakudo internals than the setting :( | 10:26 | |
jmerelo | cognominal: not sure what unix(2) is | ||
cognominal: but there's an extensive set of pages devoted to migrate from perl 5 to perl 6 | 10:27 | ||
cognominal: they go first here docs.perl6.org/language.html They also include a set of POSIX calls and how they are translated into Perl 6, if that's what you mean. | 10:28 | ||
cognominal | oops I mean dup(2) | ||
jmerelo | cognominal: that's dup-ing file handles? | ||
cognominal | yes | ||
jmerelo | cognominal: if there's something, you might find it under docs.perl6.org/type/IO::Handle | 10:29 | |
cognominal: I seem to remember there was something also in Proc | |||
let me check | |||
Hum. No. | |||
cognominal: I can't find anything, sorry. Maybe ask in StackOverflow? | 10:32 | ||
cognominal: you can probably use NativeCall to call the native function, but still... | 10:33 | ||
cognominal | In Perl 5, that would be : open $dupout, '>&', \*STDOUT; | ||
I am rusty, is a system call really exposed as a function ? | 10:34 | ||
jmerelo | cognominal: well, IO::Handle has a ":mode" associative, but I'm not really sure that particular mode would work. | ||
cognominal: Yep. That's what NativeCall is all about. | 10:35 | ||
lizmat | cognominal: I've ported many Perl 5 builtin functions to Perl 6 | ||
cognominal | hi, lizmat :) | 10:36 | |
lizmat | cognominal: modules.perl6.org/t/PERL5 # perhaps that can be of help ? | ||
cognominal o/ :-) | |||
10:38
rindolf left
10:42
rindolf joined
10:55
HaraldJoerg joined
11:07
wamba joined
11:09
araraloren joined
11:11
zakharyas left
11:39
wamba left
11:47
void1 joined,
void1 left,
void1 joined
11:48
void1 left
11:53
|Sno| joined
11:55
[Sno] left
|
|||
tbrowder_ | \o #perl6 | 11:55 | |
can anyone give me some help on nqp/QAST? | 11:56 | ||
masak | ask away | 11:57 | |
tbrowder_ | i’m trying to find the type of an object in an nqp program and i can’t get any of the nqp types like str, lis to return true | 11:59 | |
the object doesn’t have a .ast suffix, but i wonder if it could be one | 12:00 | ||
12:02
yqt joined
|
|||
lizmat | www.reddit.com/r/programming/comme...ming_some/ # too bad that doesn't have any reference to Perl 6 | 12:02 | |
El_Che | python? Sound pretty oldschool to me | 12:03 | |
stmuk_ | pl6anet.org/drop/ has source and windows binary for rakudo-star-2018.06-RC0 (Mac binary to follow when ++virtualsue does it) | 12:04 | |
12:10
someuser joined
12:13
Pheix joined
12:16
Pheix left
12:17
vrurg joined
12:19
vrurg left
12:22
[particle] left
12:23
Woodi joined
12:25
Ven`` joined,
kerframil left
12:26
Ven` joined
12:30
Ven`` left
|
|||
xinming_ | How do sub signatures work with alias? | 12:32 | |
hmm, something like, multi sub-name (:$user(:$rpcuser)) { ... } | |||
I can't remember the syntax for this. | |||
moritz | :user(:$rpcuser) | ||
user isn't a variable, thus no $ | 12:33 | ||
m: sub f(:a(:$b)) { say $b }; f a => 1; f b => 2; f c => 3; | |||
camelia | 1 Unexpected named argument 'c' passed in sub f at <tmp> line 1 in block <unit> at <tmp> line 1 2 |
||
xinming_ | Ok, got it, thanks | ||
12:33
diakopter joined
12:34
araraloren left
|
|||
xinming_ | so, user => :$rpcuser => (user => (rpcuser => $rpcuser)) | 12:34 | |
and this kind of nested hash can work in signatures. | |||
understand now | |||
12:34
araraloren joined
12:37
vrurg joined
12:38
wamba joined
12:42
vrurg left
12:45
jmerelo left
|
|||
xinming_ | jmerelo: so, subclass can't access anything that parents declared as private attributes. | 12:45 | |
Is it ok to override the private methods from parent? | |||
class A { method !abc () { "Hello".say; } }; class B is A { method !abc () { "xyz".say; } }; B.new.abc | 12:46 | ||
class A { method !abc () { "Hello".say; }; method test () { self!abc } }; class B is A { method !abc () { "xyz".say; } }; B.new.test; | |||
evalable6 | Hello | ||
xinming_ | m: class A { method !abc () { "Hello".say; }; method test () { self!abc } }; class B is A { method !abc () { "xyz".say; } }; B.new.test; | ||
camelia | Hello | ||
xinming_ | Is this designed behavior? | ||
12:47
[particle] joined
|
|||
moritz | yes | 12:49 | |
private methods are not polymorphic | |||
xinming_ | Ok, Thanks. | ||
moritz | otherwise they wouldn't be really private | ||
xinming_ | WHen I try to make attrs in base class be accessed in subclass, Do I have to declare it as $.attr? | 12:53 | |
Just feel confusing | |||
12:55
[particle] left
12:56
[particle] joined
|
|||
[Coke] sees several pages of camelia spam trying to catch up | 12:57 | ||
12:59
zakharyas joined
13:00
Ven` left
|
|||
xinming_ | is it possible to call BUILD method from parent in subclass? | 13:00 | |
moritz | xinming_: what are you tryint to achieve? | ||
BUILD is automatically called | |||
xinming_ | moritz: for example, a rpc client class has $!host $!port $!user $!pass in baseclass. | 13:01 | |
moritz | m: class P { submethod BUILD() { say "P Build" } }; class C is P { submethod BUILD() { say "C Build" }}; C.new | ||
camelia | P Build C Build |
||
xinming_ | tweak is also called? | 13:02 | |
moritz | yes | ||
xinming_ | Ok, Thanks. | ||
13:04
vrurg joined
13:06
[particle] left
13:07
psychoslave left,
kaare_ joined,
yqt left
13:08
psychoslave joined
13:10
[particle] joined
13:12
psychoslave left
|
|||
masak | moritz: "private methods are not polymorphic"; I'd use s/polymorphic/virtual/ there -- now thinking whether they're synonyms, or from different OO traditions, or whether one is right and one is wrong ;) | 13:14 | |
moritz | masak: you are right, "virtual" is less confusing to C++ programmers | ||
masak | "polymorphism: the ability in programming to present the same programming interface for differing underlying forms" | 13:15 | |
moritz: I'm definitely not a C++ programmer, yet I was confused :) | |||
13:15
kaare_ left
|
|||
masak | moritz: fwiw, I think `virtual` is also a keyword in C# (but not in Java, where it is the default, and has to be switched off with `final`) | 13:15 | |
moritz | ... maybe even less confusing to non-C++ programmers | ||
masak | my feeling is that "polymorphic" is a very general thing, maybe even wider than OO. it means "this one thing can have different types" | 13:16 | |
whereas "virtual" means "if you subclass, you get to supply your own" | |||
as usual though, nothing has just _one_ meaning in OO | 13:17 | ||
(you might even say it's... polymorphic) *rimshot* | |||
13:21
kaare_ joined
|
|||
masak | m: role C[::T] { has T $!x; method foo { try $!x = 0; try $!x = "OH HAI"; say $!x } }; C[Int].new.foo; C[Str].new.foo | 13:21 | |
camelia | 0 OH HAI |
||
masak | moritz: like, that $!x there could be said to be polymorphic, but not virtual :) | ||
masak .oO( this has been "Today's Bad Perl 6 Code: Don't Try This At Home" ) | 13:22 | ||
masak .oO( Don't `try` This At Home ) | |||
moritz | .oO( if you do, I'll CATCH you later ) |
||
masak | :D | 13:23 | |
I really like `CATCH` in Perl 6, but `try` is just reckless | |||
[Coke] | wreck-less. | ||
masak | it's like a construct for saying "I'd like to order up an immunity to pain, because I'm about to put my hand on the stove" | 13:24 | |
how about not putting your hand on the stove instead | |||
13:27
HaraldJoerg1 joined
13:29
HaraldJoerg left
|
|||
moritz | try has its uses cases; for example I never want my program to crash while trying to create a better error message | 13:30 | |
13:31
psychoslave joined
13:33
andrzejku left,
raschipi joined
|
|||
alexghacker | does anyone know if there's a way to ask a perl6 build which version of the UCD (Unicode Character Database, aka Unicode version) it was built with? | 13:39 | |
masak | moritz: "while trying to create a better error message" -- I'll have to think about that one. interesting. | ||
moritz: on the other hand, I see `try` being used far more often than that. | |||
13:39
skids joined
|
|||
masak suspects he'll need to blog about this, as he promised himself long ago | 13:40 | ||
moritz | masak: another use case: optional cleanups | ||
13:40
wamba left
|
|||
masak | moritz: that one I agree less with, offhand. | 13:41 | |
13:41
wamba joined
|
|||
masak | my point is that many `try` statements are an implicit "I know the exceptions I will get will be uninteresting/ignorable ones". but of course you can almost never know that. | 13:41 | |
13:42
HaraldJoerg1 is now known as HaraldJoerg,
[particle] left
|
|||
sena_kun | masak, isn't it just fallout of other languages experience when people must declare a try block to use catch thing? | 13:42 | |
alexghacker | at the moment it's not a big deal - I know which version of the UCD was included in my build, but once we get to a point when there are perl6 builds that have been around for a while it may become useful information to have, especially since it's the data that's in the UCD that drives some of the things about how NFG behaves and/or counts things. | 13:44 | |
moritz | masak: when I write an application for end-users, I *never* want to tell them that closing a socket didn't work during program shutdown. The OS will clean up after me, and the error message would just confuse the user, implying that something went wrong, and they don't have experience to assess *what* went wrong, and if it's harmful or not | ||
sena_kun | in plenty of popular languages e.g. $foo, $bar and the like you cannot write `CATCH { default {.note} }; die 'foo';` the way Perl 6 use. | ||
masak | sena_kun: I think partly, yes. `try` is like the half of Perl 5's `eval` that means "do this, and if an error happens, stuff it in $! instead of throwing" | ||
moritz: I guess I see what you're saying. there's a certain "attempt to do this, but no big deal if it doesn't work" cleanup happening in finally/LEAVE blocks, I guess. | 13:45 | ||
13:46
xinming_ left
|
|||
moritz | masak: exactly | 13:46 | |
masak | I think part of the reason I'm vocal about this is that I have misunderstood/over-used `try` in the past. | ||
I'd like to put my self-immolation on display as a warning to others | |||
13:46
xinming joined
|
|||
moritz | yes, overuse happens | 13:46 | |
masak | but you have a really valid point about the few valid use cases where it really doesn't matter | 13:47 | |
I guess that's what we should train users to see: "is the outcome here *irrelevant*? then go ahead and use `try`" | |||
basically, `try` is for those few cases where you don't want to know how it went | 13:48 | ||
masak .oO( "There is no `try`; well, almost never" -- Yoda ) | 13:49 | ||
sena_kun .o0 ( do or don't ) | 13:50 | ||
13:51
cpage_ joined
13:52
mcmillhj joined
|
|||
Juerd | Also, consider try'ing the outermost thing that you can sacrifice. For example, when dealing with incoming http requests, try the thing that handles the entire request instead of all the individual things within. | 13:52 | |
If you have lots of "try" sprinkled all around your code, you're probably doing something wrong :) | 13:53 | ||
13:54
cpage left,
cpage_ is now known as cpage
|
|||
vrurg | Juerd: it's just a question of when 'few' become 'lots'... | 13:54 | |
Juerd | vrurg: Give yourself try quota of one per day, maybe one per 100 lines of code ;) | ||
Depending on what you're building and whether failures are likely to require ignoring | 13:55 | ||
raschipi | Juerd: kinda like turning it into a transaction? | ||
Juerd | raschipi: Yes. | ||
vrurg | Juerd: ok, your quota sounds like "lots" to me... ;) | ||
Juerd | vrurg: I write dense code :D | 13:56 | |
vrurg: 100 lines is a lot! | |||
vrurg doesn't count braces and blank lines as "code" either. | |||
;) | 13:57 | ||
Juerd | github.com/Juerd/shalog/blob/master/tracking.p6 if you want to see an example | ||
I would have liked the class Stack in a separate file, but that gave weird errors. I should try that again some time, maybe the underlying bugs have been fixed. | |||
vrurg | Juerd: I'm mostly kidding. Though it looks pretty much like what I usually do. | 13:59 | |
14:01
[particle] joined
|
|||
vrurg | I meant that use of try is dependant of use cases very much. In a web application sometimes it's the only one wrapping the whole application to produce a meaningful error page to the user. And a couple more inside to deal with non-fatal exceptions. | 14:01 | |
Juerd | Of course | 14:02 | |
14:05
[particle] left
14:06
fake_space_whale joined
14:13
[particle] joined
14:15
mcmillhj left
|
|||
alexghacker | m: my $s = qq<"Thin Condensed"(s) "Regular"(s)>; $s ~~ s/ \" $<value>=( <-[\"]>+ ) \" //; say ~$<value>.^name; | 14:15 | |
camelia | Match | ||
alexghacker | m: my $s = qq<"Thin Condensed"(s) "Regular"(s)>; $s ~~ s:g/ \" $<value>=( <-[\"]>+ ) \" //; say ~$<value>.^name; | 14:16 | |
camelia | Failure | ||
alexghacker | m: my $s = qq<"Thin Condensed"(s) "Regular"(s)>; $s ~~ s:g/ \" $<value>=( <-[\"]>+ ) \" //; say ~$<value>; | ||
camelia | Type List does not support associative indexing. in block <unit> at <tmp> line 1 |
||
alexghacker | m: my $s = qq<"Thin Condensed"(s) "Regular"(s)>; $s ~~ s:g/ \" $<value>=( <-[\"]>+ ) \" //; say $s; | 14:17 | |
camelia | (s) (s) | ||
alexghacker | So the global substitution works with the named capture, but I can't get to the captured values | 14:18 | |
timotimo | m: my $s = qq<"Thin Condensed"(s) "Regular"(s)>; $s ~~ s:g/ \" $<value>=( <-[\"]>+ ) \" //; say $/; | 14:21 | |
camelia | (「"Thin Condensed"」 value => 「Thin Condensed」 「"Regular"」 value => 「Regular」) |
||
timotimo | you can, they're just in $/ rather than $s | ||
oh, i might have misunderstood | |||
alexghacker | it seems to be the ~$<value> syntax that doesn't work | 14:22 | |
timotimo | the reason why you got Failure that one time is that $/ is a list rather than a single match object | ||
since $<foo> is just short for $/<foo>, that's what's going wrong | |||
trying to do key-value lookup on an array-ish thing | 14:23 | ||
alexghacker | I see | 14:27 | |
thanks timotimo++ | |||
timotimo | YW | ||
14:32
mcmillhj joined
14:42
diakopter left
|
|||
MitarashiDango[m | For identifiers, where it mentions numbers in the docs, is that only Decimal Digit? | 14:44 | |
timotimo | u: digit | ||
unicodable6 | timotimo, U+0030 DIGIT ZERO [Nd] (0) | ||
timotimo, U+0031 DIGIT ONE [Nd] (1) | |||
timotimo, 796 characters in total: gist.github.com/7eee60a6a695d3ca12...5024e08d6e | |||
timotimo | m: my $foo෭ = 1; say $foo෭ | 14:45 | |
camelia | 1 | ||
timotimo | m: my $foo༪ = 5; say $foo༪ | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Bogus postfix at <tmp>:1 ------> 3my $foo7⏏5༪ = 5; say $foo༪ expecting any of: constraint infix infix stopper postfix statement end… |
||
timotimo | that's an No, i.e. "numeric, other" | ||
and that doesn't work | |||
m: my $foo↊ = 2; say $foo↊ | 14:46 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Bogus postfix at <tmp>:1 ------> 3my $foo7⏏5↊ = 2; say $foo↊ expecting any of: constraint infix infix stopper postfix statement end… |
||
timotimo | well, that's also just No | ||
is there anything N* other than No and Nd? | |||
MitarashiDango[m | Number, letter? | 14:47 | |
I don't think that works in an identifier either | 14:48 | ||
14:48
araraloren left
|
|||
AlexDaniel | these work for identifiers: Ll (Letter, lowercase), Lu (Letter, uppercase), Lt (Letter, titlecase), Lm (Letter, modifier), Lo (Letter, other) | 14:48 | |
not sure about numbers though | |||
14:48
araraloren joined
14:49
jmerelo joined
|
|||
jmerelo | squashable6: status | 14:49 | |
squashable6 | jmerelo, ⚠🍕 Next SQUASHathon in 3 days and ≈19 hours (2018-08-04 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
MitarashiDango[m | m: my $fooⅩ; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Bogus postfix at <tmp>:1 ------> 3my $foo7⏏5Ⅹ; expecting any of: constraint infix infix stopper postfix statement end statem… |
||
jmerelo | m:say "Ⅹ".uniprop | 14:50 | |
evalable6 | Nl | ||
jmerelo | m:say "x".uniprop | 14:51 | |
evalable6 | Ll | ||
14:52
pmurias joined
|
|||
jmerelo | MitarashiDango[m: you need them to have the "L" property, I think. But that would have been cool. | 14:52 | |
14:52
vrurg left
14:53
vrurg joined
|
|||
pmurias | masak: the don't-give-a-darn-about-any-exceptions form of bare try was super annoying when porting rakudo to the js backend | 14:53 | |
masak: it is used in two ways: to ignore a specific exception without being bothered to specificed and more rarely to ignore all exceptions | 14:54 | ||
s/specified/specify | 14:55 | ||
14:55
vrurg left,
vrurg joined
14:56
ilux joined,
vrurg left
15:00
diakopter joined
|
|||
Geth | marketing: 091d788a53 | (Zoffix Znet)++ | 14 files Add $*ARGFILES 6.d Teaser |
15:06 | |
15:08
nwellnhof joined
|
|||
nwellnhof | p6: say 1 +< -64 | 15:09 | |
camelia | 1 | ||
nwellnhof | p6: say "$_: ", 1 +< -$_, ' ', 1 +> $_ for 62..66 | ||
camelia | 62: 0 0 63: 0 0 64: 1 0 65: 0 0 66: 0 0 |
||
nwellnhof | ^^ Looks like a bug | 15:10 | |
Juerd | Did you know you can interpolate expressions? :) | 15:12 | |
p6: say "$_: { 1 +< -$_ } { 1 +> $_ }" for 62..66 | |||
camelia | 62: 0 0 63: 0 0 64: 1 0 65: 0 0 66: 0 0 |
||
nwellnhof | Yes, I know. | 15:13 | |
Juerd | (I don't know anything about how negative bitshifts should work) | ||
[Coke] | which part in particular is the bug? | ||
nwellnhof | Left-shifting by -64 behaves differently than other negative values like -63, -65, etc. | 15:14 | |
[Coke] | m: say 1 +< -64 | ||
camelia | 1 | ||
diakopter | mod 64? | 15:16 | |
15:16
ExtraCrispy joined
|
|||
diakopter | is camelia 32 bit? | 15:17 | |
timotimo | i'd expect camelia to be 64bit | ||
diakopter | p6: say "$_: { 1 +< -$_ } { 1 +> $_ }" for 30..35 | ||
camelia | 30: 0 0 31: 0 0 32: 0 0 33: 0 0 34: 0 0 35: 0 0 |
||
15:18
kerframil joined
|
|||
diakopter | p6: say "$_: { 1 +< -$_ } { 1 +> $_ }" for 126..130 | 15:19 | |
camelia | 126: 0 0 127: 0 0 128: 1 0 129: 0 0 130: 0 0 |
||
nwellnhof | Yes, also happens with multiples of 64. So there might be a mod 64 somewhere. | ||
[Coke] | m: use nqp; say nqp::bitshiftl_I(nqp::decont(1), nqp::unbox_i(64), Int) | 15:20 | |
camelia | 18446744073709551616 | ||
[Coke] | m: use nqp; say nqp::bitshiftl_I(nqp::decont(1), nqp::unbox_i(-64), Int) | ||
camelia | 1 | ||
[Coke] | github.com/perl6/nqp/blob/2434978a...um.js#L191 | 15:21 | |
timotimo | isn't shifting by the bit width of the architecture or more undefined behaviour? | ||
oh, but that's for Int, not int, right? | 15:22 | ||
15:25
araraloren left
15:32
jmerelo left
15:33
TreyHarris left
15:36
benjikun left
15:38
benjikun joined
15:40
domidumont left
15:42
ilux left
15:44
vrurg joined
15:45
TreyHarris joined
|
|||
SmokeMachine | I have a slang that some times works and some times doesn't work... | 15:48 | |
with the same data... | |||
diakopter | nondeterministic! lovely | ||
raschipi | SmokeMachine: On purpose? | ||
timotimo | perhaps precomp vs no precomp? | ||
diakopter | (or indeterminately deterministic, that is) | 15:49 | |
SmokeMachine | timotimo: even after compiled sometimes it works and some times it doesn't... | 15:50 | |
diakopter | try it in camelia? | ||
[Coke] | code? tests? | ||
15:51
vrurg left
15:53
zakharyas left
|
|||
SmokeMachine | this is my problem... www.irccloud.com/pastebin/N34VvNT3/ | 15:53 | |
the slang module is from here: github.com/FCO/p6-react | |||
here: github.com/FCO/p6-react/blob/maste.../Slang.pm6 | 15:55 | ||
[Coke] | SmokeMachine: just tried your first example in a checkout of p6-react, got output | ||
what version of perl6 are you using? | |||
SmokeMachine | try it again... it some times works... | ||
www.irccloud.com/pastebin/2pep0Mv7/ | 15:56 | ||
This is Rakudo version 2018.06-276-gbb6a6f80b built on MoarVM version 2018.06-329-g21ea40f68 | |||
[Coke] | yup, verified. was fine until I started running it in a bash loop. | 15:57 | |
SmokeMachine | it looks a bug, right? | ||
*like | |||
a little smaller example www.irccloud.com/pastebin/7KXUupfh/ | 16:01 | ||
16:04
psychoslave left
|
|||
nwellnhof | FWIW, the bitshift bug seems to be here: github.com/MoarVM/MoarVM/blob/428e...ops.c#L729 | 16:09 | |
I also filed github.com/MoarVM/MoarVM/issues/923 | |||
16:11
domidumont joined
|
|||
lizmat | releasable6: status | 16:12 | |
releasable6 | lizmat, Next release in ≈19 days and ≈2 hours. 3 blockers. 81 out of 276 commits logged (⚠ 9 warnings) | ||
lizmat, Details: gist.github.com/eea99d57c1f11bf5d6...221a018e00 | |||
16:13
natrys joined
|
|||
SmokeMachine | this is an old project... I don't remember to have this problem when I wrote this code... :( | 16:13 | |
16:15
troys joined
|
|||
[Coke] | smokemachine: if nothing else, I wouldn't expect the nondeterministic results | 16:15 | |
16:16
Ven`` joined,
wamba left
|
|||
sena_kun | m: 1 does Bool; | 16:22 | |
camelia | ( no output ) | ||
16:22
robertle left
|
|||
sena_kun | m: say 1 does Bool; | 16:22 | |
camelia | 1 | ||
sena_kun | o.0 | ||
[Coke] | m: say (1 does Bool).WHAT; | 16:23 | |
camelia | (Int+{Bool}) | ||
sena_kun | I'm getting "Unhandled exception: Cannot unbox a type object (Bool) to int.", but camelia works. | ||
[Coke] | what is your perl6 version? | 16:24 | |
sena_kun | the exception using `perl6 -e` and endless loop with "Cannot unbox a type object (Bool) to int." message. | ||
This is Rakudo version 2018.06 built on MoarVM version 2018.06 | |||
SmokeMachine | #2151 | ||
16:25
fake_space_whale left
|
|||
[Coke] | to be clear, not in the REPL? | 16:26 | |
sena_kun | when in REPL, I see exception message repeating endlessly. When with `-e`, just the exception once. | 16:27 | |
[Coke] | ah. same! | 16:28 | |
m: say $*VERSION | |||
camelia | Dynamic variable $*VERSION not found in block <unit> at <tmp> line 1 |
||
sena_kun | it is not like I need this feature now, just semi-accidentally typed that(wow) and decided to try out if it's a known issue. | ||
m: say $*VM; | |||
camelia | moar (2018.06.329.g.21.ea.40.f.68) | ||
[Coke] | thanks | 16:29 | |
2018.06-216-g7a7e5e96f here. | |||
16:30
scimon left
16:31
nwellnhof left
|
|||
sena_kun | and we have 425 github issues for word "does". not sure if wants a ticket. | 16:33 | |
16:36
vrurg joined
|
|||
xinming | What is the right way to define a string enum list? | 16:37 | |
16:38
Ven`` left,
psychoslave joined
|
|||
xinming | something like subset AssetName where { * ~~ set <cny usd jpy> } | 16:38 | |
THis version is what I can think of, But I'm thinking wether there is a better way to define the subset like this. | 16:39 | ||
16:40
Ven`` joined
|
|||
raschipi | xinming: How is that different from just an enum? | 16:42 | |
16:45
dakkar left
16:47
Zoffix joined
|
|||
Zoffix | xinming: that version is broken and will always be true. You're wrapping a WhateverCode closure inside another Block | 16:48 | |
xinming: you can just use an `any` Junction with a list | |||
m: subset AssetName where any <foo bar ber>; say $_ ~~ AssetName for <foo meow meh bar ber> | 16:49 | ||
camelia | True False False True True |
||
xinming | Zoffix: I didn't test that yet. Just think on how something can be achieved in perl6 | ||
Zoffix: Thanks for the idea | |||
16:51
molaf left
|
|||
xinming | raschipi: enum can be used as keywords directly, where we are passing strings around. | 16:51 | |
I get used to use _ for both sub and var name, After I get used to -, I feel - is better look. :-) | |||
16:56
st_elmo joined
|
|||
Juerd | m: enum AssetName <cny usd jpy>; my $an = any AssetName.enums.keys; say $_ ~~ $an for <usd eur nlg frf dem cny> | 16:56 | |
camelia | True False False False False True |
||
Juerd | If you want an enum, then use one :) | 16:57 | |
Juerd is triggerend by ".enums", it feels recursive... | |||
16:58
raynold joined
|
|||
Zoffix | sena_kun: I'd call that a case of DITWIDT. You're mixing into an object that's being used all over the shop, no wonder stuff explodes. You want to use `but` instead | 16:58 | |
(for record, it explodes because you changed "True" to be a type object and the true translate-nl param being used in a native int in core now doesn't fit anymore) | 17:00 | ||
AlexDaniel | .tell jmerelo so what's the plan? | 17:01 | |
yoleaux | AlexDaniel: I'll pass your message to jmerelo. | ||
sena_kun | Zoffix, well, I don't want anything(especially such code D: ), just asked if worth ticketing. Thanks for explanation! | 17:02 | |
Zoffix | sena_kun: no, I would not consider this a bug. There's a lengthy discussion on R#1959 on this topic, and basically implementations are allowed to cache any two objects if they share a .WHICH (so basically return the same object for it) because they're considered immutable and eventually trying to `but` into such an object will error out. | 17:05 | |
synopsebot | R#1959 [closed]: github.com/rakudo/rakudo/issues/1959 Empty set()/bag()/mix() do not return a unique object | ||
sena_kun | oh, saw that ticket. yes, makes sense then. | ||
Zoffix | Allowed to cache, but with the exception that .clone must return a fresh object | 17:06 | |
e: say 1 but Bool | |||
evalable6 | 1 | ||
Zoffix | e: say 1 but Bool; | ||
evalable6 | 1 | ||
Zoffix | e: say 1 does Bool; | ||
evalable6 | (exit code 1) 1 Unhandled exception: Cannot unbox a type object (Bool) to int. at SETTI… |
||
Zoffix, Full output: gist.github.com/b0f4c763a5d5a99115...9a1c119008 | |||
Zoffix | e: say 1.clone does Bool; | ||
evalable6 | 1 | ||
Zoffix | Works :) | ||
* trying to `does` into such an object will error out; `but` is fine, 'cause it does a clone | 17:08 | ||
17:08
Zoffix left
|
|||
masak | Juerd: it's because the nomenclature in Perl 6 is a bit tortured. an _enumeration_ (declared using the `enum` keyword) consists of one or more _enums_. | 17:14 | |
xinming | what type is best for money? | ||
Num? | |||
timotimo | Rat | ||
Num is floating point | |||
[Coke] | depends on your precision needs. I'd use Rat, myself. | ||
masak | xinming: definitely Rat. | ||
xinming | Ok, Thanks | 17:15 | |
masak | xinming: important that many languages only have a type corresponding to Num, and so programmers in that language tend to use Num for money, which often leads to tears and hair loss. | 17:16 | |
xinming | I'll convert Rat to Num before save to db | 17:17 | |
:-) | |||
masak | augh :/ | ||
then you'll lose precision. | |||
xinming | I just use it to do calculation in perl. | 17:18 | |
masak | xinming: if you care enough about the precision guaranteed by Rat (as opposed to the precision-loss of Num), storing a Rat as a Str is preferable to storing the Rat as a Num | 17:21 | |
17:22
telex left
|
|||
mst | or depending on the sort of precision you want, a decimal in the db | 17:22 | |
17:24
telex joined,
natrys left
|
|||
raschipi | Perhaps two integers would be better? | 17:26 | |
timotimo | yeah, it would | 17:27 | |
though of course if you treat the Rat bad enough it'll also turn into a Num again | |||
17:27
troys left
17:28
kaare_ left
|
|||
masak .oO( How to Train Your Rat ) | 17:29 | ||
17:33
psychoslave left,
psychoslave joined
17:34
kaare_ joined
17:39
lizmat left
17:42
Ven`` left
17:44
lizmat joined
17:48
Ven`` joined
17:56
wamba joined
|
|||
lizmat | notable6: weekly reset | 17:57 | |
notable6 | lizmat, Moved existing notes to “weekly_2018-07-30T17:57:13Z” | ||
17:57
lucasb joined
18:02
mcmillhj left
18:04
Zoffix joined,
Zoffix left,
Ven`` left
|
|||
buggable | New CPAN upload: CamelPub-0.1.0.tar.gz by DONPDONP cpan.metacpan.org/authors/id/D/DO/...1.0.tar.gz | 18:05 | |
18:05
sena_kun left,
sena_kun joined
18:07
sena_kun left,
sena_kun joined
18:08
mcmillhj joined
18:11
x[LGWs4x4i]uG2N0 left,
raschipi left
18:13
mcmillhj left
18:14
x[LGWs4x4i]uG2N0 joined
18:15
wamba left
18:16
dct joined,
wamba joined
18:17
sena_kun left
18:18
sena_kun joined
18:19
pecastro joined
|
|||
Geth | doc: 33603b1f18 | (Zoffix Znet)++ | doc/Language/numerics.pod6 [6.d] We now have a POV of `num` defaulting to 0e0 POV Impl: github.com/rakudo/rakudo/commit/f045042d4f Propspec: github.com/perl6/roast/commit/2abee09f88 |
18:21 | |
synopsebot | Link: doc.perl6.org/language/numerics | ||
18:23
mcmillhj joined
18:26
raynold left,
sauvin left
18:29
mcmillhj left
18:30
Summertime joined,
xi- left
|
|||
Geth | doc: 4a04fb1e90 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/glossary.pod6 Glossarify some of the new spec-related terms |
18:32 | |
synopsebot | Link: doc.perl6.org/language/glossary | ||
18:37
buggable left,
buggable joined,
ChanServ sets mode: +v buggable
18:38
buggable left,
Goneri joined,
buggable joined,
ChanServ sets mode: +v buggable
|
|||
Goneri | hi, can anyone explain me what I'm doing wrong here: paste.fedoraproject.org/paste/B1k0...ZrcwriZSvw | 18:38 | |
18:39
Zoffix joined
|
|||
Zoffix | Goneri: variables with Str in them are interpreted as literal strings. Use <$pattern> instead | 18:39 | |
18:39
dct left
|
|||
Zoffix | Goneri: there's was this recent "Intro Into Perl 6 Regexes and Grammars" talk, if you're interested: rakudo.party/post/Intro-Into-Perl6...-Recording | 18:40 | |
Goneri | Zoffix, thanks! | ||
18:40
mcmillhj joined
|
|||
xinming | is self.var %.var the same? | 18:40 | |
Goneri | I was using docs.perl6.org/syntax/%20Regex%20Interpolation and it's a bit confusing | 18:41 | |
xinming | I thought they are the same, But I found they don't. | ||
when I use self.var = blabla in BUILD, It worked, when I try to use %.var = blabla, It reports may not be used on partially constructed objects. | |||
Zoffix | xinming: %.var is like %(self.var), I believe | ||
xinming | let me try | 18:42 | |
then, this is probabaly a bug | |||
Zoffix | might be | ||
xinming | m: class A { has %.h = (a => 1) }; class B is A { submethod BUILD () { %.h = (b => 1) } }; B.new | 18:43 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Virtual method call %.h may not be used on partially constructed object (maybe you mean %!h for direct attribute access here?) at <tmp>:1 ------> 3 class B is A { submethod BUILD () { %.h7⏏5 = … |
||
xinming | m: class A { has %.h = (a => 1) }; class B is A { submethod BUILD () { self.h = (b => 1) } }; B.new | ||
camelia | ( no output ) | ||
xinming | m: class A { has %.h = (a => 1) }; class B is A { submethod BUILD () { self.h = (b => 1) } }; B.new.h.perl.say; | ||
camelia | {:b(1)} | ||
xinming | m: class A { has %.h = (a => 1) }; class B is A { submethod BUILD () { %(self.h) = (b => 1) } }; B.new.h.perl.say; | 18:44 | |
camelia | {:b(1)} | ||
xinming | You see, the %.h is not the same as %(self.h) | ||
Will report later. | |||
18:46
mcmillhj left
|
|||
Zoffix | Goneri: agreed. Filed an Issue in our docs repo for that: D#2230 | 18:48 | |
synopsebot | D#2230 [open]: github.com/perl6/doc/issues/2230 [docs][easy to resolve] "Regex and interpolation is a bit confusing" | ||
Zoffix | %.h is probably the same as %(self.h), except the compiler complains in the %.h case when it's in the build method | 18:52 | |
m: class A { has %.h = (a => 1); has %.b = %.h }.new.b.say; | 18:53 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Virtual method call %.h may not be used on partially constructed object (maybe you mean %!h for direct attribute access here?) at <tmp>:1 ------> 3ss A { has %.h = (a => 1); has %.b = %.h7⏏5 }.… |
||
Zoffix | m: class A { has %.h = (a => 1); has %.b = self.h }.new.b.say; | ||
camelia | {a => 1} | ||
Zoffix | Ano ther case | ||
xinming: filed it as R#2152 | 18:56 | ||
synopsebot | R#2152 [open]: github.com/rakudo/rakudo/issues/2152 Using `%.foo` in places throws, but changing it to `self.foo` works | ||
Zoffix | m: class { has @.h = <a b c d>; method z { dd %.h } }.new.z | 18:58 | |
camelia | Hash % = {:a("b"), :c("d")} | ||
18:58
mcmillhj joined
|
|||
Zoffix | Looking at QAST, %.h is like `self.h.hash` | 18:58 | |
and %(self.h) is the same thing; a method call | 18:59 | ||
19:01
domidumont left
19:06
Zoffix left
19:08
mcmillhj left,
raschipi joined
|
|||
lizmat | and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2018/07/30/...t-garbage/ | 19:08 | |
raschipi | lizmat++ | 19:09 | |
19:10
molaf joined
19:16
mcmillhj joined
|
|||
sena_kun | lizmat++ | 19:17 | |
[Coke] | lizmat++ indeed. | 19:18 | |
moritz | lizmat++ tweeted | 19:19 | |
El_Che | jnthn's grant request needs more comments (linked in the weekly) | ||
raschipi | lizmat: You listed "Tons of clarifications by Zoffix Znet." twice. | 19:20 | |
lizmat | raschipi: good catch, fixed | 19:21 | |
raschipi | I thought a had a deja vu, but in fact I had deja vu. | 19:22 | |
19:24
sno joined,
|Sno| left
|
|||
masak | lizmat++ # weekly | 19:34 | |
El_Che | raschipi: there were a lot of clarifications :) | 19:35 | |
Geth | doc: hankache++ created pull request #2231: add missing 'class' keyword for consistency with other types |
19:38 | |
AlexDaniel | jdv79: sorry, did you file a bug report? I can't find it | 19:52 | |
jdv79: for the performance issue | |||
SmokeMachine | lizmat: Injector wasn't mentioned... :( | 19:53 | |
lizmat | I missed that ? | 19:54 | |
it's in the list of updated modules ?? | |||
SmokeMachine: ^^^ | |||
SmokeMachine | no, its a new module... | 19:55 | |
AlexDaniel | lizmat: fwiw it's better to say “4 August (all timezones included)” instead of ±23 hours | ||
lizmat | SmokeMachine: I guess when I saw commits on 26 May, I assumed it was an update... | 19:56 | |
will move | |||
SmokeMachine | modules.perl6.org/search/?q=Injector | ||
AlexDaniel | because it's like (-14 … (24 hours) … +12) | ||
Geth | doc: cdce18f8d2 | (Naoum Hankache)++ | 4 files add missing 'class' keyword for consistency with other types |
19:57 | |
doc: 6a0817cea7 | (Naoum Hankache)++ (committed using GitHub Web editor) | 4 files Merge pull request #2231 from hankache/master add missing 'class' keyword for consistency with other types |
|||
AlexDaniel | Complicated maybe, but the idea is that whenever it's Saturday in *any* timezone, it's Squashathon :) | ||
SmokeMachine | lizmat: now I got it! | ||
lizmat | SmokeMachine: updated | ||
SmokeMachine | its mentioned on update!!! | ||
sorry! | |||
I thought it was new... | |||
am I a little crazy? | |||
raschipi | SmokeMachine: Sim, por ser brasileiro, mas não vem ao caso. | 19:58 | |
lizmat | it was added to the ecosystem repo last week, yes | ||
AlexDaniel: fixed | 19:59 | ||
SmokeMachine | raschipi: :) mas nesse caso não sou o único... :P | ||
El_Che | crazy brazilians alarm | ||
raschipi | Cada louco é louco da sua própria maneira, ser normal é que é chato. | 20:00 | |
🚨🚨🚨🚨 | 20:01 | ||
El_Che | chato ou gato? | ||
lizmat | si | 20:02 | |
raschipi | crazy Spanish alarm | 20:03 | |
jdv79 | AlexDaniel: not yet. i fell asleep. | ||
jnthn is on vaca anyway. whats the rush;) | 20:04 | ||
you could do it if you feel compelled | 20:05 | ||
alexghacker | I think I've discovered a problem with the values being returned by uniprop for some glyphs | 20:06 | |
m: my $s = "\c[0x377, 0x378, 0x379, 0x37a]"; say $s.uninames; say $s.uniprops('Block') | |||
camelia | (GREEK SMALL LETTER PAMPHYLIAN DIGAMMA <reserved-0378> <reserved-0379> GREEK YPOGEGRAMMENI) (Greek and Coptic No_Block No_Block Greek and Coptic) |
||
alexghacker | But, according to www.unicode.org/Public/UCD/latest/...locks.txt, "0370..03FF; Greek and Coptic" | 20:07 | |
AlexDaniel | jdv79: well I just don't want us to forget about it :) | ||
alexghacker | so even though those glyphs are reserved they still ought to be part of that block (they're included in the range) | 20:08 | |
AlexDaniel | jdv79: it's reproducible and noticeable, maybe golfable too. Good catch, you need to write it down now :) | ||
jdv79 | im at lunch. ill do it in a bit. | ||
alexghacker | should that be filed as a rakudo-specific bug or should tests be added to roast for it? | ||
raschipi | alexghacker: even though no one answered you, I bet half a dozen people are working on it already. | 20:09 | |
AlexDaniel | jdv79: thanks ♥ | 20:10 | |
alexghacker | raschipi: ty. pleased to meet you. I'm not quite new here, but it's been a long while :) | 20:12 | |
I'm good filing my own bug reports and/or merge requests; I just want to put them in the most appropriate place. | |||
SmokeMachine | lizmat: thanks! | 20:16 | |
20:34
Zoffix joined
|
|||
Zoffix | alexghacker: here's a good place: github.com/rakudo/rakudo/issues/new | 20:35 | |
alexghacker: and our resident Unicode expert is samcv if you wanted to talk to her about this stuff :) | |||
20:45
Zoffix left
20:46
st_elmo left
20:57
raschipi left
20:59
Ven`` joined
|
|||
ttkp6 | are the TPC-2018 talks going to be recorded and made available via youtube or similar? | 20:59 | |
never mind .. just found www.youtube.com/user/yapcna | 21:00 | ||
21:03
Some-body_ joined,
DarthGandalf left
21:04
Some-body_ is now known as DarthGandalf
21:05
spycrab0 left
21:06
vrurg left,
spycrab0 joined
21:13
rindolf left
21:15
skids left
|
|||
samcv | alexghacker: file a bug at github.com/MoarVM/MoarVM | 21:23 | |
i am pretty sure i know why it gives the wrong result, and how i will fix it as well. but please open a ticket so i make sure it gets done | 21:24 | ||
21:26
Zoffix joined
|
|||
Zoffix | FYI: www.p6c.org was down. Couldn't ssh to it, so I rebooted it. | 21:26 | |
I think all the sites are back.... | 21:27 | ||
21:27
Zoffix left,
mcmillhj left
21:30
HaraldJoerg left
21:32
mcmillhj joined
21:36
Goneri left
21:37
mcmillhj left
21:52
mcmillhj joined
21:54
pmurias left,
pmurias joined
21:55
vrurg joined
21:56
psychoslave left
21:57
vrurg left,
mcmillhj left
21:58
molaf left,
vrurg joined
21:59
vrurg left
22:03
sena_kun left
22:05
mcmillhj joined
22:06
DarthGandalf left
22:07
Voldenet left
22:09
DarthGandalf joined,
lucasb left
22:10
mcmillhj left,
psychoslave joined
22:16
psychoslave left
22:17
pmurias left
22:18
mcmillhj joined
|
|||
jdv79 | AlexDaniel: github.com/rakudo/rakudo/issues/2155 | 22:19 | |
happy? | |||
22:20
wamba left
22:23
mcmillhj left
|
|||
timotimo | doesn't look bad | 22:27 | |
22:29
epony left
|
|||
AlexDaniel | jdv79: yes, thank you! :) | 22:30 | |
22:30
Ven`` left,
wamba joined,
go|dfish joined
|
|||
Kaiepi | m: say await start { return start { 1 } } | 22:30 | |
camelia | An operation first awaited: in block <unit> at <tmp> line 1 Died with the exception: Attempt to return outside of any Routine in block at <tmp> line 1 |
||
Kaiepi | m: say await Promise.start({ Promise.start({ 1 }) }) | 22:31 | |
camelia | Promise.new(scheduler => ThreadPoolScheduler.new(initial_threads => 0, max_threads => 64, uncaught_handler => Callable), status => PromiseStatus::Kept) | ||
Kaiepi | damn i was hoping it'd be 1 like in js | ||
geekosaur | m: say so await Promise.start({ Promise.start({ 1 }) }) | 22:33 | |
camelia | True | ||
22:34
mcmillhj joined
|
|||
geekosaur | oh, the value. | 22:34 | |
22:36
Ven`` joined
22:38
mcmillhj left
22:50
vrurg joined
22:51
mcmillhj joined
22:54
xi- joined
22:55
Ven`` left,
Ven` joined
22:56
mcmillhj left
23:02
Ven` left
23:10
mcmillhj joined
23:15
mcmillhj left
23:18
pecastro left
|
|||
MasterDuke | alexghacker: btw, i know samcv has talked about making the unicode version discoverable (and maybe even selectable) | 23:27 | |
23:36
mcmillhj joined
|
|||
AlexDaniel | MasterDuke, alexghacker: GH#2031 | 23:40 | |
synopsebot | GH#2031 [open]: github.com/rakudo/rakudo/issues/2031 [RFC][path to stability] Ability to ensure support for a unicode version | ||
23:41
mcmillhj left
23:46
wamba left
23:50
molaf joined
|