»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:08
astj joined
00:19
Cabanossi left
00:20
Cabanossi joined,
ovechkin left
00:24
astj left
|
|||
timotimo | i'll go to bed now; hopefully going to bed a bit earlier will result in better sleep and better getting-out-of-bed | 00:33 | |
00:49
Cabanossi left
00:50
Actualeyes left,
Cabanossi joined
00:56
protium joined
00:57
geekosaur left
00:58
geekosaur joined
01:04
noganex left,
astj joined
01:07
astj left
01:17
Redrield left
01:18
Cabanossi left
01:20
Cabanossi joined
01:23
mcmillhj joined
01:25
astj joined
01:28
mcmillhj left
01:34
gdonald left,
gdonald joined
01:38
mxco86 left
01:52
Actualeyes joined
02:02
Cabanossi left
02:05
Cabanossi joined
02:10
noganex joined
02:11
Cabanossi left
02:16
awwaiid left
02:17
labster left
02:18
Cabanossi joined
02:23
mcmillhj joined
02:28
mcmillhj left
02:32
labster joined
|
|||
skids | m: my %h is default(slip()); [%h{2,}].perl.say | 02:39 | |
camelia | [] | ||
skids | m: my %h is default(slip()); [%h{2}].perl.say | ||
camelia | [Empty,] | ||
02:39
kurahaupo left,
mcmillhj joined
|
|||
skids | m: [slip()].perl.say | 02:40 | |
camelia | [] | ||
skids | hmm... was there a reason for nonslice indexing to be protective? | 02:43 | |
02:44
mcmillhj left
|
|||
gfldex | m: my %h is default(|()); [%h{2}].perl.say | 02:45 | |
camelia | [slip(),] | ||
skids | m: my %h is default(slip()); (%h{2},).perl.say | ||
camelia | () | ||
skids | maybe some interaction with array element itemization... | 02:46 | |
02:46
Cabanossi left
02:53
gdonald left,
gdonald joined
02:54
Cabanossi joined
02:59
perigrin_ joined,
perigrin_ left
03:00
perigrin_ joined
|
|||
SmokeMachine | m: my @a = a => 1, a => 2, c => 3; say @a.reduce: -> $p {state %a; %a{$p.key} += $p.value}; | 03:01 | |
camelia | Too many positionals passed; expected 1 argument but got 2 in block <unit> at <tmp> line 1 |
||
03:01
wamba joined
03:02
perigrin_ left,
perigrin_ joined
|
|||
skids | reduce func needs parms for the new value and the accumulator. | 03:04 | |
03:04
perigrin_ left
|
|||
skids | m: my @a = a => 1, a => 2, c => 3; say @a.reduce: -> $p, $ {state %a; %a{$p.key} += $p.value}; | 03:04 | |
camelia | No such method 'key' for invocant of type 'Int' in block <unit> at <tmp> line 1 |
||
SmokeMachine | m: my @a = a => 1, a => 2, c => 3; say @a.reduce: -> %reduced, Pair $p {%reduced{$p.key} += $p.value; %reduced} | ||
camelia | Cannot assign to an immutable value in block <unit> at <tmp> line 1 |
||
skids | m: my @a = a => 1, a => 2, c => 3; say @a.reduce: <-> %reduced, Pair $p {%reduced{$p.key} += $p.value; %reduced} | 03:05 | |
camelia | Cannot assign to an immutable value in block <unit> at <tmp> line 1 |
||
SmokeMachine | skids: is the accumulator the first or the last one? | ||
skids | m: my @a = a => 1, a => 2, c => 3; say @a.reduce: -> %reduced is rw, Pair $p {%reduced{$p.key} += $p.value; %reduced} | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> For parameter '%reduced', '%' sigil containers don't need 'is rw' to be writable Can only use 'is rw' on a scalar ('$' sigil) parameter, not '%reduced' at <tmp>:1 |
||
skids | m: my @a = a => 1, a => 2, c => 3; say @a.reduce: -> $b, $a { say "$a $b"; $a + $b }; | 03:06 | |
camelia | a 2 a 1 Cannot resolve caller Numeric(Pair: ); none of these signatures match: (Mu:U \v: *%_) in block <unit> at <tmp> line 1 |
||
skids | m: my @a = a => 1, a => 2, c => 3; say @a.reduce: -> $b, $a { say "$a $b"; $a.key + $b }; | ||
camelia | a 2 a 1 Cannot resolve caller Numeric(Pair: ); none of these signatures match: (Mu:U \v: *%_) in block <unit> at <tmp> line 1 |
||
skids | m: my @a = a => 1, a => 2, c => 3; say @a.reduce: -> $b, $a { say "$a $b"; $a + $b.value }; | 03:07 | |
camelia | a 2 a 1 Cannot resolve caller Numeric(Pair: ); none of these signatures match: (Mu:U \v: *%_) in block <unit> at <tmp> line 1 |
||
skids | hrm. | ||
m: my @a = 1,2,3; say @a.reduce: -> $a, $b { say "$a $b"; $a + $b }; | 03:08 | ||
camelia | 1 2 3 3 6 |
||
03:08
perigrin_ joined
|
|||
skids | m: my @a = 1,2,3,4; say @a.reduce: -> $a, $b { say "$a $b"; $a + $b }; | 03:09 | |
camelia | 1 2 3 3 6 4 10 |
||
skids | The first then. | ||
03:09
perigrin left
|
|||
SmokeMachine | m: my @a = a => 1, a => 2, c => 3; say @a.reduce: -> $d, Pair $p {my BagHash $data; if $d ~~ Pair {$data{$d.key} = $d.value} else {$data = $d}; $data{$p.key} += $p.value; $data} | 03:10 | |
camelia | BagHash.new(a(3), c(3)) | ||
SmokeMachine | there is no way to set the initial value of the accumulator on a reduce? | 03:11 | |
like: @a.reduce: :initial(BagHash), -> BagHash $acc, Pair $p {$acc{$p.key} += $p.value} | 03:13 | ||
skids | Add it at the front of the list? | 03:14 | |
SmokeMachine | m: (BagHash, |@a).reduce: -> BagHash $acc, Pair $p {$acc{$p.key} += $p.value} | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '@a' is not declared at <tmp>:1 ------> 3(BagHash, |7⏏5@a).reduce: -> BagHash $acc, Pair $p {$a |
03:15 | |
SmokeMachine | m: my @a = a => 1, a => 2, c => 3; say (BagHash, |@a).reduce: -> BagHash $acc, Pair $p {$acc{$p.key} += $p.value} | ||
camelia | Cannot modify an immutable BagHash in block <unit> at <tmp> line 1 |
||
skids | .new. | ||
SmokeMachine | m: my @a = a => 1, a => 2, c => 3; say (BagHash, |@a).reduce: -> BagHash $acc is rw, Pair $p {$acc{$p.key} += $p.value} | ||
camelia | Parameter '$acc' expected a writable container, but got BagHash value in block <unit> at <tmp> line 1 |
||
SmokeMachine | m: my @a = a => 1, a => 2, c => 3; say (BagHash.new, |@a).reduce: -> BagHash $acc is rw, Pair $p {$acc{$p.key} += $p.value} | 03:16 | |
camelia | Parameter '$acc' expected a writable container, but got BagHash value in block <unit> at <tmp> line 1 |
||
skids | m: my @a = a => 1, a => 2, c => 3; say ($ = BagHash.new, |@a).reduce: -> BagHash $acc is rw, Pair $p {$acc{$p.key} += $p.value} | ||
camelia | Type check failed in binding to parameter '$acc'; expected BagHash but got Int (1) in block <unit> at <tmp> line 1 |
||
skids | m: my @a = a => 1, a => 2, c => 3; say ($ = BagHash.new, |@a).reduce: -> BagHash $acc is rw, Pair $p {$acc{$p.key} += $p.value; $acc;} | 03:17 | |
camelia | BagHash.new(a(3), c(3)) | ||
03:17
mcmillhj joined
03:18
Cabanossi left
03:20
Cabanossi joined
|
|||
SmokeMachine | m: my @a = a => 1, a => 2, c => 3; say (Bag.new, |@a).reduce: -> Bag $acc, Pair $p {$acc ⊎ $p.key xx $p.value} | 03:21 | |
camelia | bag(a(3), c(3)) | ||
03:22
mcmillhj left
|
|||
skids | xx probably not the most efficient way to go about that. | 03:22 | |
SmokeMachine | skids: worse than $acc ⊎ $p.key for ^$p.value ? | 03:23 | |
skids | m: my @a = a => 1, a => 2, c => 3; say (Bag.new, |@a).reduce: -> Bag $acc, Pair $p {$acc ⊎ $p} | 03:28 | |
camelia | bag(a(3), c(3)) | ||
SmokeMachine | :) | 03:29 | |
03:32
Actualeyes left
03:38
mcmillhj joined
03:42
mcmillhj left
03:46
Cabanossi left
03:49
Cabanossi joined
04:01
AlexDaniel joined
04:06
mcmillhj joined,
AlexDaniel left
04:10
mcmillhj left
04:12
wamba left
04:21
skids left
04:23
mcmillhj joined
|
|||
ugexe | timotimo: zef reporter branch + `zef install Net::HTTP` + ZEF_REPORTER_P6C=1 enables test reporting and the reports show up on testers.p6c.org now | 04:27 | |
04:27
mcmillhj left
|
|||
ugexe | I havent merged it into master yet because I have to multiplex output from TAP.pm6 somehow. For reporting to work it doesn't show any test output until the tests are all finished. | 04:28 | |
testers.p6c.org/reports/145800.html | |||
fwiw I think reporting quit working for panda (which uses a raw socket) around 2-28, so maybe some newline change? | 04:30 | ||
04:30
BenGoldberg left,
vike left
|
|||
ugexe | if you can figure it out let me know... i'd like to remove the Net::HTTP dependency | 04:31 | |
04:35
vike joined
04:45
Actualeyes joined
04:47
Cabanossi left
04:49
Cabanossi joined
04:57
itaipu left
04:58
perigrin_ left
05:00
AlexDaniel joined
05:24
wamba joined
05:31
perigrin joined
05:46
Cabanossi left
05:48
wamba left
05:49
Cabanossi joined
05:52
RabidGravy joined,
lowbro joined,
mr-foobar joined,
lowbro left,
lowbro joined
05:55
lizmat_ is now known as lizmat
|
|||
samcv | well my install of every module. it hung somewhere. not sure why | 06:01 | |
06:01
xtreak joined
|
|||
samcv | at testing NCurses module | 06:01 | |
moritz | samcv: putting stuff on hack in ~/public_html/ should work | 06:03 | |
samcv | and then it's accecible where? | ||
moritz | hack.p6c.org/~samcv/ | 06:04 | |
samcv | yay | ||
moritz | I can get an SSL cert for that domain if desired | ||
samcv | hack.p6c.org/~samcv/install_log.txt gonna have to figure out how to fix hanges | 06:05 | |
i'm using `run` atm to run zef commands | 06:06 | ||
moritz | I believe you have to use Proc::Async to work with timeouts | ||
samcv | best way is to use proc::async? yeah | ||
moritz | my book has an example :-) | ||
samcv | i've done it before. i wish it were less work though | ||
moritz too | 06:07 | ||
time for a high-level module that abstracts this out, I think | 06:08 | ||
samcv | hmm how long to make the timeout | 06:13 | |
5 minutes maybe? | |||
idk. what's the max time a module and every single dependency could take? | |||
it should be a leave it alone thing. so i don't want it timing out too early | |||
06:28
lizmat_ joined
06:31
lizmat left
06:34
lizmat_ left
06:35
movl left
06:40
rindolf joined
06:47
wamba joined
06:53
ChoHag joined
|
|||
moritz | 15min maybe | 06:58 | |
samcv | moritz, ok going for try 2 now. set a timeout at 10 minutes | ||
we'll see how it goes | |||
moritz, why does my utf-8 file show up not in the right encoding? | 07:00 | ||
moritz | Content-Type: text/plain | ||
samcv | not sure what the server settings are hack.p6c.org/~samcv/install_log_live.txt this. in firefox and chrome show wrong. though i can manually select Unicode and shows fine | ||
moritz | let me try something... | 07:01 | |
samcv | thanks :) | ||
moritz | Content-Type: text/plain; charset=utf-8 | 07:02 | |
better. | |||
should work now. | |||
samcv | \o/ | ||
very yes. much good | |||
moritz | AddDefaultCharset utf-8 | 07:03 | |
was the secret apache sauce | |||
samcv | :) thought so | 07:05 | |
up to at least 19 failing so far | 07:06 | ||
also think i found a zef problem with dependencies. though could be the packages to blame | 07:09 | ||
HTTP::Tiny fails because it can't find HTTP::Tinyish during testing. though it tests HTTP::Tinyish before it | 07:10 | ||
07:10
wamba left
|
|||
samcv | hmm gist.github.com/samcv/1030286eb95f...xt-L38-L56 | 07:11 | |
moritz | are those two in separate distributions? | ||
samcv | not sure | 07:12 | |
moritz | looking at modules.perl6.org: yes | 07:13 | |
samcv | that's what i had guessed | ||
i can install HTTP::Tiny with zef myself. but it could be the long dependency chain messed it up somewhere | 07:14 | ||
07:14
wamba joined
07:15
abraxxa joined
07:16
Cabanossi left
07:19
Cabanossi joined
07:27
darutoko joined
|
|||
Geth | ecosystem: IanTayler++ created pull request #319: Added MinG. |
07:28 | |
07:30
xtreak left
07:31
xtreak joined
07:35
xtreak left
|
|||
moritz | what's our policy for ecosystem pull requests with a broken source URL in META6.json? | 07:40 | |
wait for a fix? or merge straight away? | |||
eater | moritz: doesn't matter | 07:43 | |
Geth | ecosystem: b8e1972ab9 | (Ian Tayler)++ (committed by Moritz Lenz) | META.list Added MinG. MinG is a module for working with Minimalist Grammars: a mildly-context-sensitive formalism first described by Edward Stabler in 1996. MinG::S13 is an implementation of Stabler's 2012/2013 parser for Minimalist Grammars. |
||
eater | its fixed now :d | ||
moritz | aye | 07:45 | |
07:45
TEttinger left
|
|||
moritz just invited a few of the last ecosystem contributors to the perl6 org | 07:45 | ||
07:46
azawawi joined
|
|||
azawawi | Good morning #perl6 | 07:46 | |
Bug of the day github.com/azawawi/perl6-ncurses/issues/11 :) | |||
cglobal does not work as expected when use-d from another library that uses that cglobal (e.g. NCurses) | 07:47 | ||
Commenting out the cglobal section fixes the problem github.com/azawawi/perl6-ncurses/b...es.pm6#L30 | 07:48 | ||
should cglobal's generally be called later? | 07:49 | ||
like github.com/azawawi/perl6-ncurses/b...es.pm6#L40 that is | |||
07:54
zakharyas joined
08:01
jonas1 joined
08:03
Cabanossi left
08:04
Cabanossi joined
08:06
xtreak joined,
AlexDaniel left
08:20
CIAvash joined,
bjz joined
08:21
dakkar joined,
g5 joined
08:31
Actualeyes left
08:38
xtreak left
08:42
nadim joined
08:47
kent\n left
08:48
salva joined,
kent\n joined
08:52
azawawi left
|
|||
nadim | morning P6! \o/ | 08:52 | |
who is the king of pod? | 08:53 | ||
I am thinking about porting my module search.cpan.org/~nkh/POD-Tested-0.0.../Tested.pm and wonder if that is not already done in some way. I read Synopsis but found nothig, want to check. | 08:54 | ||
08:56
xtreak joined
|
|||
gfldex | nadim: not as a module, we got a test in the docs tho | 08:56 | |
nadim | do you mean inlining the test in the pod? | 08:58 | |
08:58
CIAvash left,
xtreak left
|
|||
gfldex | we can extract examples from the docs and compile them, what helps a bit to detect bitrot | 08:59 | |
08:59
astj_ joined,
astj left,
xtreak joined
|
|||
nadim | What tool does that? can Pod be injected as result of code defined in the pod? | 09:00 | |
My module is very much about avoiding documentation rot but also as a tool to write cookbooks and design a module with test first | 09:01 | ||
09:01
Cabanossi left
09:03
Cabanossi joined
09:04
xtreak left
|
|||
gfldex | nadim: in that case you might have to patch rakudo itself because ambient nodes are not implemented yet | 09:06 | |
09:12
dogbert17_ joined
|
|||
dogbert17_ | o/ | 09:12 | |
is the document 'Learn Perl 6 in Y minutes' available in our repos? It seems to be hosted on a different server. | 09:15 | ||
it contains some errors which should be fixed | |||
nadim | gfldex: do you feel the functionality should be in rakudo or in a module. I am not sure a tool to write cookbooks that are tested are best in rakudo but you know better I guess. | 09:20 | |
gfldex | nadim: right now the pod parser (that is part of Rakudo) will skip any non-pod parts. If you need them to do facy stuff with the code and pod nodes, you will either have to implement your own parser (very welcome, we don't got that yet) or fix the planned but never implemented Pod::Block::Ambient in Rakudo. | 09:26 | |
09:28
gdonald left
09:29
gdonald joined
09:33
xtreak joined
09:34
kurahaupo joined
|
|||
timotimo | github.com/adambard/learnxinyminutes-docs - dogbert17_ | 09:34 | |
moritz | dogbert17_: github.com/adambard/learnxinyminutes-docs/ | ||
github.com/adambard/learnxinyminut...l.markdown | 09:35 | ||
09:41
mxco86 joined
|
|||
timotimo | m: use nqp; <1 2 3>.map: { when * > 5 { "test {nqp::unbox_i($_ // 0)}" } } | 09:42 | |
camelia | ( no output ) | ||
timotimo | m: sub test { use nqp; <1 2 3>.map: { when * > 5 { "test {nqp::unbox_i($_ // 0)}" } } } | ||
camelia | ( no output ) | ||
timotimo | ... ?! | ||
09:44
robertle joined
09:45
bjz left
09:46
bjz_ joined
|
|||
gfldex | lolibloggedtoday: gfldex.wordpress.com/2017/04/19/de...h-fallout/ | 09:52 | |
timotimo | i'm mildly surprised that try has looser precedence than // does | 09:57 | |
09:58
jonas1 left
10:00
labster left
10:01
xtreak left
|
|||
u-ou | m: role A { has $.x }; role B does A { }; role C does A { }; role D does B does C { }; | 10:06 | |
camelia | ( no output ) | ||
gfldex | .seen retupmoca | 10:07 | |
yoleaux | I saw retupmoca 8 Jun 2016 21:09Z in #perl6: <retupmoca> m: say ('a'..'d').rotor(2 => -1).perl; | ||
u-ou | m: role A { has $.x }; role B does A { }; role C does A { }; class D does B does C { }; | 10:08 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Attribute '$!x' conflicts in role composition at <tmp>:1 |
||
u-ou | m: role A { has $!x }; role B does A { }; role C does A { }; class D does B does C { }; | 10:10 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Attribute '$!x' conflicts in role composition at <tmp>:1 |
||
10:15
lowbro left,
mr-foobar left
10:16
mr-foobar joined
10:17
Cabanossi left
|
|||
timotimo | gfldex: i think the code in your blog post is actually slightly wrong | 10:18 | |
m: my $result = try "oh lord".&die // "default"; say $result | |||
camelia | (Any) | ||
10:18
Cabanossi joined
|
|||
timotimo | well, that's not failure | 10:19 | |
m: my $result = try "oh lord".&fail // "default"; say $result | |||
camelia | default | ||
timotimo | oh, interesting | ||
m: my $result = try "oh lord".&fail.butthismethdoesntexist // "default"; say $result | 10:20 | ||
camelia | (Any) | ||
gfldex | timotimo: already fixed | ||
timotimo | OK! | 10:21 | |
gfldex | I noticed because I'm writing a 2nd blog post right nao! | 10:22 | |
timotimo | that's good bloggage | ||
10:28
kurahaupo left,
mr-foobar left
10:29
mr-foobar joined
|
|||
gfldex | m: sub picky(\c:($,$)) {say &c.arity}; picky(* - *); | 10:30 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: c used at line 1 |
||
gfldex | m: sub picky(\c:($,$)) {say c.arity}; picky(* - *); | 10:31 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: c used at line 1 |
||
timotimo | wouldn't you want |c there? | ||
oh | |||
gfldex | m: sub picky(&c:($,$)) {say &c.arity}; picky | ||
camelia | Too few positionals passed; expected 1 argument but got 0 in sub picky at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
timotimo | sorry, that's different | 10:32 | |
gfldex | m: sub picky(&c:($,$)) {say &c.arity}; picky({$^a, $^b}) | ||
camelia | 2 | ||
gfldex | m: sub picky(&c:($,$)) {say &c.arity}; picky(* - *) | ||
camelia | Constraint type check failed in binding to parameter '&c'; expected anonymous constraint to be met but got WhateverCode ({ ... }) in sub picky at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
gfldex | is there a way to say "I want a WhateverCode but it must have 2 params!"? | ||
timotimo | well, you can have a where clause for that, but it should have worked with what you had there, i think | 10:33 | |
gfldex | m: my &c = * - *; &c.arity.say | ||
camelia | 2 | ||
timotimo | yeah | ||
gfldex | so the compiler knows | ||
timotimo | maybe it's expecting Any, but gets Mu? | ||
moritz | m: sub picky(WhateverCode \c where .arity == 2) { c(1, 2) }; say *-* | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '&c' is not declared at <tmp>:1 ------> 3ky(WhateverCode \c where .arity == 2) { 7⏏5c(1, 2) }; say *-* |
||
moritz | m: sub picky(WhateverCode \c where .arity == 2) { c.(1, 2) }; say *-* | 10:34 | |
camelia | { ... } | ||
timotimo | m: my &c = * - *; &c.signature.perl.say | ||
camelia | :(;; $whatevercode_arg_1 is raw, $whatevercode_arg_2 is raw) | ||
gfldex | moritz: thx | ||
moritz | though in most cases I'd restrict to Callable, not to WhateverCode | ||
so picky(&c where .arity == 2) { } | 10:35 | ||
10:37
wamba left
10:38
Luna521 joined
10:39
mr-foobar left
10:41
mr-foobar joined
10:42
wamba joined
|
|||
nadim | Playing with the profiler, It seems that quite some time is spend as sink at SETTING::src/core/Seq.pm:183, is that usual? | 10:46 | |
10:46
lowbro joined,
lowbro left,
lowbro joined,
wamba left
|
|||
jnthn | nadim: Inclusive time, or exclusive time? | 10:47 | |
But yes, it's very normal if your program has, say, a for loop | |||
gfldex | m: sub picky(WhateverCode $c) { $c.(1) }; say (try picky( return * )) // $!.^name | ||
camelia | X::ControlFlow::Return | ||
nadim | it Data::Dump::Tree, lots of loops, but and that is a gut feeling, it seems that most of the time is spend there | 10:48 | |
jnthn | Since for @a { body } compiles into @a.map({ body }).sink | ||
nadim | ah! | ||
jnthn | The .sink being what actually makes the work happen since map is lazy | ||
10:48
Luna521 left
|
|||
nadim | ok, good to know | 10:48 | |
10:53
itaipu joined
10:54
domidumont joined
10:59
domidumont left
11:00
domidumont joined
|
|||
gfldex | lolibloggedagain! gfldex.wordpress.com/2017/04/19/yo...-you-like/ | 11:01 | |
11:04
wamba joined
11:17
g5 left,
Cabanossi left,
mr-foobar left
11:19
Cabanossi joined,
mr-foobar joined
|
|||
grondilu | m: say grammar { rule TOP { <ident> | <TOP>+ % \+ } }.parse: 'foo+bar' | 11:25 | |
camelia | Nil | ||
grondilu was hoping that would work | |||
jnthn | No, the LTM is terminated by recursion | 11:26 | |
So the <ident> ends up winning | |||
grondilu | oh yeah | ||
11:29
AlexDaniel joined,
wamba left
11:30
iH2O joined
|
|||
grondilu | wait but then why doesn't it return "foo"? | 11:30 | |
11:32
iH2O left
|
|||
jnthn | Because parse anchors at the end of the string | 11:35 | |
Presumably .subparse would give back foo | |||
11:38
xtreak joined
11:41
mr-foobar left
11:43
mr-foobar joined
11:46
ChoHag left,
Cabanossi left
11:49
Cabanossi joined
12:00
wamba joined
12:06
mr-foobar left,
itaipu left
12:07
mr-foobar joined
12:08
ChoHag joined
|
|||
Geth | doc: 555bb55d87 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Any.pod6 Document Any.unique |
12:12 | |
12:13
itaipu joined
|
|||
dogbert17_ | moritz: thx for the link, sorry for the late reply | 12:15 | |
moritz | dogbert17_: no problem | 12:16 | |
12:17
Cabanossi left
12:19
Cabanossi joined,
mr-foobar left
12:20
mr-foobar joined
|
|||
Geth | doc: af1c4ddc4b | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/List.pod6 Add advice to reword .unique :with using :as when possible The :with has O(n²/2) complexity and basically slows to a crawl with 2000+ element lists. my @p = 1..3000; @ = @p.unique: :with(&[eqv]); say now - INIT now; # 25.42728348 my @p = 1..3000; @ = @p.unique: :as(*.Str); say now - INIT now; # 0.0185597 say 25.427/.0186; # 1367.043011 |
12:20 | |
12:23
jeek left
12:31
bjz_ left,
AlexDaniel left
12:33
bjz joined
12:41
mcmillhj joined
12:44
kyan left,
mcmillhj left
12:45
mr-foobar left
12:46
mr-foobar joined,
Cabanossi left
12:47
mcmillhj joined
12:49
Cabanossi joined
12:52
itaipu left,
domidumont left
12:55
mr-foobar left
12:57
mr-foobar joined
13:00
xtreak left
13:03
jonas1 joined,
jonas1 left
13:04
jonas1 joined
13:09
mr-foobar left
13:10
mr-foobar joined
13:12
ChoHag left
13:22
jonas1 left
13:23
jonas1 joined
13:24
Stamm joined
13:29
ChoHag joined
13:42
jeek joined
|
|||
Stamm | hello | 13:43 | |
i have a small question about hashes | |||
what is the syntax to add an element with a non-string key? | |||
13:43
skids joined
|
|||
timotimo | you just put it in with %thehash{$object} = "hi" | 13:46 | |
but the hash must be an object hash, or else it'll stringify $object for you | |||
docs.perl6.org/type/Hash#index-ent...bject_hash | |||
moritz | m: my %h{Any}; my $key = []; %h{$key} = 'foo'; say %h{$key}; say %h{[]} | ||
camelia | foo () |
||
moritz | Stamm: ^^ that's a way to work with an object hash | 13:47 | |
MasterDuke_ | m: my %h{Int}; my $a = "a"; %h{$a}++ | 13:48 | |
camelia | Type check failed in binding to parameter 'key'; expected Int but got Str ("a") in block <unit> at <tmp> line 1 |
||
13:48
Stamm_ joined
|
|||
Stamm_ | ok, thank you | 13:48 | |
13:50
Stamm left
13:56
Stamm_ left
13:59
sufrostico left
14:01
Cabanossi left
|
|||
ugexe | samcv: the reason HTTP::Server::Tinyish fails is because it does some-test-that-does-run($my-code-with-dependency) with the assumption that all their dependencies are fullfilled by CURI and not one of the other possible CURs | 14:02 | |
14:04
Cabanossi joined
14:05
isBEKaml joined
|
|||
isBEKaml | OHHAI | 14:05 | |
timotimo | greetings | 14:06 | |
14:10
sufrostico joined,
sufrostico left,
sufrostico joined
|
|||
isBEKaml | Were there some changes to moarvm's configure script recently? | 14:11 | |
My daily builds don't work anymore -- I'll try to fetch a detailed trace output in a bit | 14:12 | ||
14:12
dmaestro left
14:13
gregf_ left,
cdg joined
|
|||
timotimo | it could very well be that it's choking on libtommath | 14:14 | |
i turned it from a folder full of files into a submodule | |||
git really, really, really, really, really, really didn't like that | |||
so just nuke your moar and all should be good | |||
isBEKaml | yeah, that's what it looks like.... it failed on a submodule update and silently screamed at me for those existing folders! | ||
timotimo | maximum ugh. | 14:15 | |
isBEKaml | I wiped 3rdparty, let's see if that works | ||
timotimo | might be bad. now there's stuff missing in there | ||
isBEKaml | *shrug* -- I'll know soon | ||
\o/ | 14:16 | ||
it works! | |||
timotimo | nice | ||
isBEKaml | urr, 3rdparty/uthash.c? Not cool, man | 14:17 | |
timotimo | it'd be cool if we had a piece of code in the configure script that could figure out what's happening with the submodules | ||
and mv the 3rdparty/libtommath folder out of the way | |||
(so that no local changes, if any, get destroyed) | |||
isBEKaml | this 3rdparty folder is trucked | 14:20 | |
I'm downloading a fresh zip from Github and copying over missing folders | 14:21 | ||
Okay, it's all good now | 14:25 | ||
14:28
wamba left
14:29
nicq20 joined
|
|||
nicq20 | Hello \o | 14:29 | |
yoleaux | 9 Feb 2017 17:34Z <tony-o> nicq20: you may have to do zef update - | ||
timotimo | why not just git reset --hard? taht'll give you all files back, too | 14:30 | |
14:31
lowbro left
|
|||
isBEKaml | timotimo: I don't have any local changes. I usually do: 'git clean -xdf' and 'git pull' for taking off on git HEAD | 14:32 | |
timotimo | you had local changes, you rm -rf'd 3rdparty/ | 14:33 | |
3rdparty contains files under gits control | |||
so reset --hard would get them back | |||
isBEKaml | Oh, right -- totally forgot about that. Anyway, I've now fully built perl6 | 14:34 | |
nicq20 | Is there a way to get `my $var = 'PLAYING CARD TEN OF DIAMONDS'; say "\c[$var]";` to work? Is interpolation disabled for unicode names? | ||
timotimo | we have something for that now | 14:35 | |
14:35
sufrostico left
|
|||
ilmari | m: my $var = 'PLAYING CARD TEN OF DIAMONDS'; say $var.parse-names | 14:36 | |
camelia | 🃊 | ||
timotimo | m: say parse-names('PLAYING CARD TEN OF DIAMONDS') | ||
camelia | 🃊 | ||
timotimo | i don't remember when that name was decided upon? | ||
nicq20 | Yeah, I was going to say it seems like an odd choice... | 14:37 | |
Oh, well. :) | |||
ilmari | Author: Zoffix Znet [email@hidden.address] | ||
Date: 2017-03-02 19:22:23 +0000 | |||
Implement Str.parse-names | |||
Naming: the name follows Str.parse-base that parses a string containing numerals in some base; whereas this routine parses a string of character names | 14:38 | ||
nicq20 | Huh, ok. | ||
14:39
sufrostico joined
|
|||
timotimo | ah | 14:41 | |
skids | maybe parse-uninames to match Str.uninames? | 14:45 | |
14:45
moray` joined
14:48
cdg left
|
|||
nicq20 | skids: That would make more sense to me at least. | 14:50 | |
skids wonders what zoffix handle-of-the-day is. | 14:51 | ||
isBEKaml | parse-uninames definitely makes more sense | ||
14:55
nicq20 left
|
|||
TreyHarris | Is a Junction::Utils with constructs to construct complex junctions so you can say "two", "three", "n or more", "n or less" a silly idea? I just needed a "2 or more" junction and wondered if it was worth generalizing | 14:58 | |
15:03
Cabanossi left,
bjz left,
sufrostico left
15:04
Cabanossi joined
|
|||
perlpilot | TreyHarris: what's a "2 or more" junction? | 15:05 | |
15:05
sufrostico joined
|
|||
perlpilot | TreyHarris: you mean like "any(@foo) but at least 2" ? | 15:05 | |
timotimo | yeah | 15:06 | |
15:06
Zoffix joined
|
|||
Zoffix | skids: the handle is Zoffix | 15:06 | |
skids: what'd you want? | |||
15:06
gregf_ joined
|
|||
skids | Oh somehow I missed seeing you in the user list. | 15:07 | |
The suggestion was that Str.parse-names might be better Str.parse-uninames | |||
Zoffix | I wasn't | ||
[Coke] | I wouldn't use it, but if it's something you needed, abstracting it out into a module might help someone else, sure. | ||
Zoffix | skids: I don't follow this channel, but my bot pinged me because of name mention | 15:08 | |
skids | ZofBot? | ||
Zoffix | Yup | ||
skids | ZofBot: .botsnack | ||
ZofBot | skids, om nom nom nom | ||
synopsebot6 | om nom nom | ||
Zoffix | .parse-names has been in two releases already. The name bikeshedding kinda concluded when the PR with it got merged. | 15:09 | |
You can join #perl6-dev if you wish to keep current to development discussions. | |||
... such as what to name .parse-names :) | 15:10 | ||
Zoffix reads back | 15:12 | ||
TreyHarris | timotimo: exactly. like "one(...)", only "two(...)" or "two-or-more(...)" (obviously, parameterized, so actually probably "exactly(2, ...)" or "at-least(2, ...)" or "at-most(2, ...)" ... is that the best signature or is there a cleaner one? | ||
perlpilot | TreyHarris: are you *sure* junctions are the right answer? Feels more like sets and counting to me. | 15:13 | |
Zoffix | "don't remember when that name was decided upon?". I proposed the name on March 2nd EST morning, then in afternoon made a PR. Lizmat merged it later in the day, after a +1 from [Coke]: github.com/rakudo/rakudo/pull/1031 | 15:14 | |
moritz | TreyHarris: IMHO junctions are neat, but if they don't do what you want, they aren't worth tweaking | ||
I tend to use junctions only as boolean matchers | |||
perlpilot too | |||
moritz | in that context you can typically fall back to a callback instead | ||
Zoffix | skids: so yeah, .parse-uninames sounds better if a bit too much typing. But I don't want to change something that's been in a release already. | 15:15 | |
TreyHarris | moritz: ah, I haven't looked into how to run authothreading manually, but that's why I was using them, because "so at-least-one(...)" was quite useful to me and embarrassingly parallell | ||
Zoffix | in 2 releases | ||
15:15
Zoffix left
|
|||
TreyHarris | sorry, "at-least-two" | 15:16 | |
"at-least-one" we have, "any" | |||
(er, how to do *threading* manually, I meant, obviously) | 15:18 | ||
moritz | junction don't actually evaluate in parallel yet | 15:19 | |
skids | ah, well, bummer. Unfortunately I barely have the attention-time to keep current on everything. | ||
15:20
mr-fooba_ joined,
domidumont joined
|
|||
skids | s/barely/rarely/ | 15:20 | |
15:20
mr-foobar left
|
|||
TreyHarris | moritz: I know, but I like maintaining the fiction for future-proofing. In this case I'm using junctions of attributes of machines in a datacenter, so it's an obvious case | 15:20 | |
moritz | TreyHarris: I can't follow that line of reasoning | 15:21 | |
but you don't actually have to convince me | 15:22 | ||
putting stuff into a junction makes it harder to actually use the stuff, unless you only ever use them as boolean matchers | 15:23 | ||
TreyHarris | moritz: if autothreading would likely come to Sets at the same time (or soon after) it came to Junctions, then you've convinced me. | ||
moritz: (you don't understand why I'd want to future-proof so that the code would autothread later on? I know you don't want me to convince you, so I won't continue arguing, I just want to be sure I know what you don't understand so will know what to reconsider my thinking on) | 15:25 | ||
moritz | TreyHarris: you're basically saying you rely on behavior that might change in future, in order to future-proof your code | 15:27 | |
TreyHarris | moritz: oh, i thought the one point of junctions was this thing--if I can't rely on it, then I should be doing map-so-length checks instead, no? | 15:29 | |
because maps can be parallelized easily in most languages. | |||
(sorry, I said I wasn't going to argue. So nm, but I apparently don't get it....) | 15:30 | ||
15:30
Zoffix joined
|
|||
moritz | TreyHarris: the point of junctions is to express ideas more idiomatic | 15:30 | |
or more direct | |||
TreyHarris | right, and map-so-length >= 2 is idiomatically, "at-most 2" | 15:31 | |
but yeah, I'll just use sets and lenghts. | 15:32 | ||
Zoffix | Wanted to clarify "bikeshedding kinda concluded when the PR with it got merged". I meant the name was proposed in a PR first; I didn't just commit. It's very easy to change a name for a feature added, but *before it's in a release*. Telling people to go use something and then pulling the carpet from under them is LTA. And on more official level: .parse-name isn't even part of Perl 6 language yet, since it's | 15:33 | |
only in the `master` spec that's yet to be reviewed and approved for 6.d. In the future, we'll likely want to improve this process, so there's some grace period or somethign for features that need time to solidify. OTOH, Slangs are not official either, but people are using them :/ | |||
15:34
robertle left
|
|||
Zoffix | Telling people to go use something as in a release changelog/docs I mean | 15:35 | |
15:35
sufrostico left
|
|||
TreyHarris | Zoffix: are you saying that bikeshedding names _before_ that _is_ a good use of time? Because I seems to remember a certain TimToady giving a certain State of the Onion on the importance of naming.... ;-) | 15:35 | |
15:36
moray` left
|
|||
Zoffix | TreyHarris: that question is ambiguous since "bikeshedding" can mean "trying to decide on a name in a group" or "pointlessly wasting time on irrelevant minutae" | 15:37 | |
moritz | investing time in names that appear in a public API sounds like a good investment, if used productively | ||
skids slinks to a discrete corner of the room and tries to pretend he didn't start this. | |||
TreyHarris | skids: lol | 15:38 | |
Zoffix | :) | ||
perlpilot | not to bikeshed, but I probably would have called it unichars(). uninames() is given some chars it gives you names, unichars() is given some names it gives you chars. | ||
moritz | skids: I prefer continuous corners over discrete corners :-) | 15:39 | |
TreyHarris | Zoffix: maybe "speak up if a name seems objectively BAD (i.e., reads as ungrammatical English in the way it's typically used, so will lead to frustrating and repeatedspelling mistakes) or if you have a name you think is so much obviously better, but don't waste time iterating on names?" | 15:40 | |
Zoffix | skids: you did bring up an issue in the process, I think | ||
15:40
nadim left
|
|||
Zoffix | That public API changes should probably given some X amount of time for dev/community feedback. | 15:41 | |
15:41
sufrostico joined
|
|||
Zoffix | m: "foo.txt" | 15:42 | |
camelia | WARNINGS for <tmp>: Useless use of constant string "foo.txt" in sink context (line 1) |
||
skids | I am reminded to bother TimToady or anyone else for bikeshedding "insist role" or "insist method" for my noisy roles branch. | ||
Zoffix | m: "bar/foo.txt".IO.sibling("meow.txt").say | ||
camelia | "bar/meow.txt".IO | ||
Zoffix | Like that was added after a brief mention on IRC channel. | ||
skids | (gist.github.com/skids/18fa6fb1de77...e82e9fcc2) | ||
Zoffix | skids: I liked the old thing that was proposed. Some sort of prefix to method | 15:43 | |
forget what it was | |||
skids | claim. |