Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-09-11

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:08 cyphase joined #perl6
00:13 kyclark_ joined #perl6
00:15 Ven_ joined #perl6
00:23 khw joined #perl6
00:25 cyphase joined #perl6
00:26 kyclark_ joined #perl6
00:33 cyphase joined #perl6
00:40 committable6 joined #perl6
00:43 itaipu joined #perl6
00:54 canopus joined #perl6
01:01 araujo_ joined #perl6
01:09 kyclark_ joined #perl6
01:18 itaipu joined #perl6
01:25 FROGGS joined #perl6
01:42 dataange` joined #perl6
01:49 dataangel joined #perl6
02:10 ShimmerFairy joined #perl6
02:19 skids joined #perl6
02:21 Pierre_ joined #perl6
02:28 noganex joined #perl6
02:33 rgrinberg joined #perl6
02:36 Actualeyes joined #perl6
02:51 bjz joined #perl6
02:59 kaare_ joined #perl6
03:17 araujo__ joined #perl6
03:26 poohman_ joined #perl6
03:28 poohman__ joined #perl6
03:29 poohman joined #perl6
03:41 poohman_ joined #perl6
03:43 poohman__ joined #perl6
03:49 Actualeyes joined #perl6
03:49 luiz_lha_ joined #perl6
03:50 dalek doc: ce62c41 | (Zoffix Znet)++ | doc/Type/Cool.pod6:
03:50 dalek doc: Document .split(@delimiters...) form
03:50 dalek doc:
03:50 dalek doc: Fixes #901
03:50 dalek doc: review: https://github.com/perl6/doc/commit/ce62c4122d
04:00 kyclark_ joined #perl6
04:03 araujo_ joined #perl6
04:06 araujo_ joined #perl6
04:07 Cabanossi joined #perl6
04:10 kyclark_ joined #perl6
04:32 rgrinberg joined #perl6
05:05 Cabanossi joined #perl6
05:12 rgrinberg joined #perl6
05:12 * grondilu recently learnt that ES6 has the equivalent of the slip operator.  Should start a list of "things ES6 stole from Perl 6"
05:18 Pierre_ joined #perl6
05:23 pierrot_ joined #perl6
05:31 llfourn_ joined #perl6
05:40 bob777 joined #perl6
05:48 wamba joined #perl6
05:59 CIAvash joined #perl6
06:07 poohman joined #perl6
06:21 sammers_ hi perl6
06:25 TEttinger grondilu: where did perl6 get it from though
06:26 lizmat the GLR  ?
06:26 Woodi TEttinger: from #perl6 :>
06:26 lizmat :-)
06:27 Woodi what is date on ES6 standard ?
06:27 geekosaur not sure it got it from anywhere unless you want to consider common lisp's ,@ (which I would argue is different because it's a macro expansion)
06:27 TEttinger if I'm not mistaken, lua has has that for at least 15 years, it should be possible anywhere you can use something like metatables
06:31 TEttinger I don't understand the docs page at all, but I haven't really tried to learn much of perl 6 (and it's a huge surface area to learn)
06:35 sammers_ can someone educate me please....
06:35 sammers_ m: sub subparams(($head, *@tail)) { ($head, @tail).flat }; say subparams((1,2,3,4));
06:35 camelia rakudo-moar 0a7125: OUTPUT«(1 2 3 4)␤»
06:36 sammers_ that works with the Array, but fails with List:
06:36 sammers_ m: sub subparams(($head, *$tail)) { ($head, $tail).flat }; say subparams((1,2,3,4));
06:36 camelia rakudo-moar 0a7125: OUTPUT«Too many positionals passed; expected 2 arguments but got 4 in sub-signature␤  in sub subparams at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
06:37 TEttinger m: sub subparams(($head, *$tail)) { ($head, @tail).flat }; say subparams((1,2,3,4));
06:37 camelia rakudo-moar 0a7125: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@tail' is not declared. Did you mean any of these?␤    $tail␤    &fail␤␤at <tmp>:1␤------> 3ub subparams(($head, *$tail)) { ($head, 7⏏5@tail).flat }; say subparams((1,2,3,4));␤»
06:37 TEttinger just curious
06:37 sammers_ hmm
06:40 * geekosaur wonders what *$ means
06:41 geekosaur btw https://docs.perl6.org/type/Signat​ure#Constraining_Slurpy_Arguments link "Slurpy arguments" goes to https://docs.perl6.org/type/Slurpy_(A$FULL_ST​OPK$FULL_STOPA$FULL_STOP_Variadic)_Parameters which 404s
06:41 geekosaur "An array or hash parameter can be marked as slurpy by leading asterisk(s)" suggests *$ should be illegal
06:42 firstdayonthejob joined #perl6
06:45 nadim joined #perl6
06:45 lizmat geekosaur: I would tend to agree
06:45 sammers_ geekosaur, thanks. that is exactly what i was looking for.
06:46 lizmat m: dd :(*$a)   # apparently, it's just $a
06:46 camelia rakudo-moar 0a7125: OUTPUT«:($a)␤»
06:47 poohman_ joined #perl6
06:47 lizmat although that could also be an artefact of .perl not expecting / handling this correctly
06:47 lizmat m: sub a(*$a) { say $a }; a 42  # seems like it is correct to be just $a
06:47 camelia rakudo-moar 0a7125: OUTPUT«42␤»
06:48 lizmat geekosaur: care to rakudobug it ?
06:48 poohman__ joined #perl6
06:54 sammers_ lizmat, should *$ be legal for Lists as well?
06:54 nebuchadnezzar joined #perl6
06:55 ufobat joined #perl6
06:55 geekosaur it should not be legal at all. what do you believe it should mean?
06:55 otaaago joined #perl6
06:55 * geekosaur rakudobugged both the above
06:55 sammers_ well, we can create a List usint $
06:55 sammers_ using $
06:55 geekosaur yes, but this is a signature. $ means item. what does it mean to have a slurpy item?
06:55 geekosaur as opposed to a slurpy list?
06:56 djbkd joined #perl6
06:56 poohman_ joined #perl6
06:56 geekosaur this is a signature; slurpy list means a list receiving remaining positional parameters, slurpy hash means a hash receiving remaining named parameters. slurpy item means ... ?
06:57 sammers_ I guess it is just one of those "special cases" that we have to consider. We can use *@ and *%, so why shouldn't we be able to use *$ for listy Lists as well?
06:57 geekosaur did you look at what I just said they meant?
06:57 sammers_ yeah, it makes sense walking through it
06:58 bjz joined #perl6
06:58 rindolf joined #perl6
07:00 poohman joined #perl6
07:01 sammers_ m: sub subparams(($head, *@tail)) { ($head, @tail).flat }; my List $list = (1,2,3,4); say subparams($list);
07:01 camelia rakudo-moar 0a7125: OUTPUT«(1 2 3 4)␤»
07:05 sammers_ that is what I am referring to. we can pass a list and then have to coerce it to an array.
07:06 darutoko joined #perl6
07:06 sammers_ thanks for the explanation
07:08 aries_liuxueyang joined #perl6
07:09 sammers_ m: sub ro-int([$head, *@arr]) { @arr[0] = 45; say @arr; }; ro-int([1,2,3,4]);
07:09 camelia rakudo-moar 0a7125: OUTPUT«[45 3 4]␤»
07:10 sammers_ m: sub ro-int([$head, *@arr]) { @arr[0] = 45; say @arr; }; ro-int((1,2,3,4));
07:10 camelia rakudo-moar 0a7125: OUTPUT«Cannot modify an immutable Int␤  in sub ro-int at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
07:11 sammers_ m: sub ro-int([$head, *@arr]) { say @arr.WHAT; }; ro-int((1,2,3,4));
07:11 camelia rakudo-moar 0a7125: OUTPUT«(Array)␤»
07:11 sammers_ m: sub ro-int([$head, *@arr]) { say @arr.WHAT; }; ro-int([1,2,3,4]);
07:11 camelia rakudo-moar 0a7125: OUTPUT«(Array)␤»
07:12 sammers_ any idea why that works with () and not []? both end up as Array inside the sub, but only () becomes ro
07:15 rightfold left #perl6
07:15 wamba joined #perl6
07:16 djbkd joined #perl6
07:20 maybekoo2 joined #perl6
07:25 rindolf joined #perl6
07:36 ShimmerFairy sammers_: I think *@args _might_ be flattening the given list, though I'm not sure. As to the difference, () means a List of immutable objects, [] means an Array of mutable objects. That is, the [] wraps all the elements in Scalar containers.
07:37 poohman joined #perl6
07:38 sammers_ ShimmerFairy, thanks. Is there a way to see the current immutability of a given variable?
07:39 ShimmerFairy well, you can see if something has a Scalar container via .VAR , but I'm not sure if that's a recommended way or not.
07:40 domidumont joined #perl6
07:41 sammers_ m: my $var = "String"; my $list = (1,2,$var,4); $list.VAR;
07:41 camelia rakudo-moar 0a7125: ( no output )
07:41 sammers_ m: my $var = "String"; my $list = (1,2,$var,4); say $list.VAR;
07:41 camelia rakudo-moar 0a7125: OUTPUT«$(1, 2, "String", 4)␤»
07:41 sammers_ my $list = (1,2,"I am a string",4); say $list.VAR;
07:45 domidumont joined #perl6
07:48 ShimmerFairy m: my $var = "String"; my $list = (1,2,$var,4); say $list.VAR.WHAT;
07:48 camelia rakudo-moar 0a7125: OUTPUT«(Scalar)␤»
07:49 ShimmerFairy m: my $var = "String"; my $list = (1,2,$var,4); say $list.map(*.VAR.WHAT);
07:49 camelia rakudo-moar 0a7125: OUTPUT«Cannot resolve caller map(List: Whatever); none of these signatures match:␤    ($: Hash \h, *%_)␤    (\SELF: &block;; :$label, :$item, *%_)␤    (HyperIterable:D $: &block;; :$label, *%_)␤  in block <unit> at <tmp> line 1␤␤»
07:49 ShimmerFairy m: my $var = "String"; my $list = (1,2,$var,4); say $list.map({$_.VAR.WHAT});
07:49 camelia rakudo-moar 0a7125: OUTPUT«((Int) (Int) (Scalar) (Int))␤»
07:52 kaare__ joined #perl6
07:55 Pierre_ joined #perl6
07:57 sammers_ m: my $var = "String"; my $list = (1,2,$var,4); sub is-mutable($list) { so Scalar ∈ $list.map({$_.VAR.WHAT}) }; is-mutable($list);
07:57 camelia rakudo-moar 0a7125: ( no output )
07:58 sammers_ m: my $var = "String"; my $list = (1,2,$var,4); sub is-mutable($list) { so Scalar ∈ $list.map({$_.VAR.WHAT}) }; say is-mutable($list);
07:58 camelia rakudo-moar 0a7125: OUTPUT«True␤»
07:58 sammers_ m: my $list = (1,2,"string",4); sub is-mutable($list) { so Scalar ∈ $list.map({$_.VAR.WHAT})  }; is-mutable($list);
07:58 camelia rakudo-moar 0a7125: ( no output )
07:58 sammers_ m: my $list = (1,2,"string",4); sub is-mutable($list) { so Scalar ∈ $list.map({$_.VAR.WHAT})  }; say is-mutable($list);
07:58 camelia rakudo-moar 0a7125: OUTPUT«False␤»
08:11 leont__ joined #perl6
08:12 prussian joined #perl6
08:16 finanalyst joined #perl6
08:16 bjz joined #perl6
08:22 poohman_ joined #perl6
08:25 prussian left #perl6
08:26 poohman joined #perl6
08:34 apejens joined #perl6
08:40 junior joined #perl6
08:41 junior hello. Why Int(Num(19)) -> Unable to parse expression in typename; couldn't find final ')'?
08:49 sammers_ m: say Int((Num(19)));
08:49 camelia rakudo-moar 0a7125: OUTPUT«19␤»
08:50 RabidGravy joined #perl6
08:50 TEttinger m: say Int(Num(19));
08:50 camelia rakudo-moar 0a7125: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in typename; couldn't find final ')' ␤at <tmp>:1␤------> 3say Int(Num(7⏏19));␤»
08:51 TEttinger that was the question and I don't know why adding extra parens helps (makes it a tuple maybe?)
08:52 smls joined #perl6
09:01 Pierre_ joined #perl6
09:17 poohman joined #perl6
09:22 aries_liuxueyang joined #perl6
09:36 bob777 joined #perl6
09:37 poohman joined #perl6
09:41 mtj__ joined #perl6
09:43 apejens joined #perl6
09:46 mtj_ joined #perl6
09:56 dogbert17 o/ #perl6
09:59 dogbert17 m: say "The quick brown fox".words(5).join("|") # is this somewhat LTA?
09:59 camelia rakudo-moar 0a7125: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤The|quick|brown|fox|␤»
10:00 dogbert17 m: say "The quick brown fox".words(5)
10:00 camelia rakudo-moar 0a7125: OUTPUT«(The quick brown fox Nil)␤»
10:03 smls dogbert17: Well, Nil is the dedicated placeholder for a missing value.
10:04 smls So it's at least consistent with other places in the language.
10:04 labster joined #perl6
10:05 dogbert17 smls: thx
10:13 apejens joined #perl6
10:13 mr-foobar joined #perl6
10:17 poohman joined #perl6
10:29 stmuk_ https://www.youtube.com/watch?v=wxU8OXKGNK
10:29 stmuk_ Steve Mynott: How to Lie With Benchmarks, Perl 6 is Faster!‎ - YAPC::Europe 2016
10:29 FROGGS ENOVIDEO
10:29 timotimo "an error occured during validation"
10:30 MasterDuke bisectable6: say Int(Num(19))
10:30 bisectable6 MasterDuke, On both starting points (good=2015.12 bad=20ed9e2) the exit code is 1 and the output is identical as well
10:30 bisectable6 MasterDuke, Output on both points: ===SORRY!=== Error while compiling /tmp/6Qyh7P1Z4V␤Unable to parse expression in typename; couldn't find final ')' ␤at /tmp/6Qyh7P1Z4V:1␤------> say Int(Num(<HERE>19))
10:31 timotimo this error happens because Int(Num) is syntax for a coercion type
10:32 timotimo and you're not allowed to stack coercion types into each other
10:32 timotimo would be nice if it mentioned that in the error
10:32 stmuk_ https://www.youtube.com/watch?v=wxU8OXKGNKc
10:32 stmuk_ damm copy and paste
10:32 MasterDuke yeah, that's not a great error
10:33 timotimo oh jesus, that video also has sound only on one channel
10:34 stmuk_ there is probably an ffmpeg option for that!
10:37 timotimo yup
10:37 smls m:  my $a = Lock.new;  $a.protect: { $a.protect: { say 42 } }
10:37 camelia rakudo-moar ccecbf: OUTPUT«42␤»
10:37 timotimo yes, we only have reentrant locks as far as i know
10:37 bob777 joined #perl6
10:37 smls timotimo: So I can rely on that working?
10:39 smls 'cause I have two functions that need to Lock.protect their bodies, and one of them calls the other.
10:40 smls And I'd like to avoid keeping too many different locks around.
10:40 mtj_ joined #perl6
10:41 smls Especially since `(state $l = Lock.new).protect: ...` doesn't work, so the locks need to be declared outside of the function/method.
10:41 dalek doc: 01a6e3b | (Jan-Olof Hendig)++ | doc/Type/Cool.pod6:
10:41 dalek doc: Added docs for fc and updated the method coercion table
10:41 dalek doc: review: https://github.com/perl6/doc/commit/01a6e3be54
10:42 timotimo that doesn't work?
10:43 smls timotimo: s/doesn't work/isn't safe/
10:43 Pierre_ joined #perl6
10:43 smls because `state` initialization isn't atomic, last I checked
10:47 espadrine joined #perl6
10:50 dalek ecosystem: 5fd374b | (Slobodan Mišković)++ | META.list:
10:50 dalek ecosystem: X11::Xlib::Raw - Xlib binding using NativeCall
10:50 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/5fd374b381
10:50 dalek ecosystem: a0de8fb | (Zoffix Znet)++ | META.list:
10:50 dalek ecosystem: Merge pull request #247 from slobo/patch-1
10:50 dalek ecosystem:
10:50 dalek ecosystem: X11::Xlib::Raw - Xlib binding using NativeCall
10:50 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/a0de8fb479
10:50 timotimo ah, yes, good point
10:50 timotimo god damn it
10:51 timotimo i was watching stmuk's talk and of course i had my headphones turned all the way up so i could hear anything at all
10:51 timotimo and then google calendar gave me a notification
10:51 timotimo nearly blew my head clean off my shoulders
10:57 dogbert17 timotimo: should I RT the rindex problems we discussed yesterday?
10:58 timotimo yeah, i think so
10:58 dogbert17 as an [LTA]?
10:58 timotimo hm, i think it's a tiny bit more than that
10:59 dogbert17 [BUG] then :)
10:59 timotimo i guess so
10:59 dogbert17 will fix
11:19 dogbert17 looks as if rt is not working atm
11:19 timotimo yeah, it's down  :(
11:25 poohman joined #perl6
11:26 Pierre_ joined #perl6
11:30 Ulti woop tests just got a big leg up... not sure what did it but assuming nine++ almost down to 1s on my Macbook 2016, so might even be below 1s on a more powerful computer
11:30 Ulti that was a big improvement like 25%
11:31 dalek gtk-simple: e080ab6 | timotimo++ | lib/GTK/Simple.pm6:
11:31 dalek gtk-simple: use "need" instead of "require" to pull in all modules
11:31 dalek gtk-simple:
11:31 dalek gtk-simple: since this allows dependencies to be serialized during
11:31 dalek gtk-simple: pre-compilation, this gives a major performance boost
11:31 dalek gtk-simple: to "use GTK::Simple".
11:31 dalek gtk-simple:
11:32 dalek gtk-simple: Closes #63
11:32 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/e080ab676c
11:32 timotimo Ulti: you do bio stuff, right?
11:33 Ulti yup
11:34 timotimo well, the performance of "use" has been greatly improved. you don't happen to use "permutations", do you?
11:35 Ulti no the nearest I get to that is X
11:35 Ulti I have some really stupid stuff that does big X~ operations over and over again throwing away the same result
11:36 Ulti but I'm basically not touching my code because so far its been a good benchmark for how fast will my stupid first thought code be on Rakudo
11:36 timotimo ah
11:36 timotimo well, if you "use" your module multiple times in your benchmark, that could very well be a big factor
11:36 Ulti like I'm sure I could make the operations much faster given the status quo right now
11:37 timotimo probably
11:37 poohman joined #perl6
11:37 timotimo once you're below 1s, it gets harder and harder to measure improvements :)
11:37 Ulti yeah and increasingly its just startup
11:38 Ulti it might be time for me to clean up my code and instead write some actual benchmarks
11:39 timotimo mayhaps
11:39 Ulti something like total number of sequences parsed per second is a better real world indicator of when we can predict bioinformatics being viable
11:39 Ulti like tux's benchmark
11:42 dalek gtk-simple: 4b6c723 | timotimo++ | / (2 files):
11:42 dalek gtk-simple: steal changes from #64 azawawi++
11:42 dalek gtk-simple:
11:42 dalek gtk-simple: Closes #64
11:42 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/4b6c723304
11:42 masak Ulti: well volunteered!
11:42 rindolf joined #perl6
11:44 Ulti yup
11:44 Ulti do we have any infrastructure for running on historic Rakudo?
11:45 Ulti and by we I mean is there a testing server or something I can pinch the code for
11:47 dogbert17 Ulti: maybe this https://github.com/perl6/w​hateverable/wiki/Benchable
11:47 stmuk_ https://github.com/japhb/perl6-bench
11:47 stmuk_ perl6-bench has rakudobrew like support for multiple versions and backends
11:48 Ulti ahh neat
11:48 Ulti I have a less than awesome VPS I can probably throw at that
11:48 timotimo it'll require quite a bit of disk space
11:48 timotimo benchable and commitable has support for compressing the rakudos while each is not in use
11:49 MasterDuke Ulti: AlexDaniel has a server with builds of rakudo back to 2015.07
11:49 MasterDuke where bisectable, benchable, and committable are run
11:49 Ulti the issue is really I would have to write code compatible pre/post GLR which is a bit pointless
11:50 MasterDuke and timotimo is correct, they are compressed with zstd after being build and decompressed when used
11:50 Ulti might as well just cover ^.c
11:50 Ulti 6.c
11:50 timotimo yes, it'd be sensible to just cover 6.c and newer
11:50 Ulti plus we know Rakudo used to be slow ;)
11:50 timotimo yup
11:51 MasterDuke yeah, it's convenient to have the old builds to validate old bug reports
11:51 MasterDuke but otherwise the recent stuff is more interesting for benchmarking
11:51 timotimo thing is, MasterDuke has a build for every single commit
11:52 timotimo you might not need it to be that fine-grained :)
11:52 Ulti o___O
11:52 Ulti that would be cool though since you could find out which lines contributed the most to perf of the benchmark
11:52 MasterDuke every commit back to 2015.07
11:52 Ulti wow
11:52 MasterDuke have you seen benchable?
11:53 Ulti I saw the repo a while ago but haven't played with it at all
11:53 timotimo no need for the repo ;)
11:53 MasterDuke bench: releases .comb for ^10000
11:53 benchable6 MasterDuke, starting to benchmark the 11 given commits
11:54 benchable6 MasterDuke, benchmarked the given commits, now zooming in on performance differences
11:56 smls joined #perl6
11:56 MasterDuke ha, oh damn, i thin that was too many iterations
11:56 timotimo how far does it zoom in? :)
11:57 MasterDuke it keeps bisecting as long as it finds a 10% speed difference between two commits
11:58 MasterDuke but what actually happened is that it was running the benchmarking so long it didn't respond to the ping, and IRC::Client thinks it got disconnected
11:59 MasterDuke ^^^
11:59 timotimo oh crap
11:59 timotimo time to use the async-based irc stuff?
11:59 MasterDuke it actually finished and is still running
11:59 timotimo will benchable still post the gist?
12:00 MasterDuke yeah, we're trying to figure out what's best
12:00 * timotimo AFK for a bit
12:01 MasterDuke unfortunately not
12:01 benchable6 joined #perl6
12:09 MasterDuke bench: releases my @a = .comb for ^1000
12:09 benchable6 MasterDuke, starting to benchmark the 11 given commits
12:10 benchable6 MasterDuke, benchmarked the given commits, now zooming in on performance differences
12:10 holyghost joined #perl6
12:11 benchable6 joined #perl6
12:12 araujo joined #perl6
12:12 araujo joined #perl6
12:13 domidumont joined #perl6
12:14 araujo__ joined #perl6
12:15 ItayAlmog joined #perl6
12:16 araujo__ joined #perl6
12:19 FROGGS joined #perl6
12:26 Pierre_ joined #perl6
12:33 cdg joined #perl6
12:35 dalek doc: d2944f2 | (Steve Mynott)++ | bin/p6doc:
12:35 dalek doc: fix p6doc -l unique
12:35 dalek doc: review: https://github.com/perl6/doc/commit/d2944f25bb
12:39 ItayAlmog joined #perl6
12:48 rgrinberg joined #perl6
12:56 canopus joined #perl6
12:57 Pierre_ joined #perl6
13:03 ItayAlmog joined #perl6
13:07 BenGoldberg joined #perl6
13:15 itaipu joined #perl6
13:15 Pierre_ Hi All
13:16 Pierre_ something strange i do not get with Supply
13:16 Pierre_ let's take the following example
13:16 Pierre_ m: my $s = Supplier.new; my $l = $s.Supply; start { sleep 1; $s.emit(1); $s.done;}; $l.wait();say "done";
13:16 camelia rakudo-moar 1ddb7c: OUTPUT«done␤»
13:16 Pierre_ if i run the same thing, but i use tap on $l, then the $l.wait block indefinitely
13:16 Pierre_ -- my $s = Supplier.new; my $l = $s.Supply; $l.tap( -> $v { say $v;} ); start { sleep 1; $s.emit(1); $s.done;}; $l.wait();say "done";
13:17 Pierre_ not running it there, as it is jsut timing out
13:17 Pierre_ is tap() doing a king of inplicit wait?
13:19 timotimo well, do you close the tap?
13:19 timotimo oh, you $s.done, i see
13:19 Pierre_ yes, i'm not closing the tap, but the supply
13:20 timotimo it should not time out; let me check it out locally
13:20 Pierre_ i mean i am calling done on the supply
13:20 Pierre_ i stumbles across that after one of my bug
13:20 Pierre_ the code was "finishing" before all the expected value where seen through the tap
13:21 Pierre_ i thought my process was finish without waiting for the async worker to be done
13:21 timotimo it has two threads that are both waiting for something
13:21 Pierre_ so i added a wait
13:21 Pierre_ yes, now that you are talking about the close
13:21 Pierre_ i think i know
13:21 TheLemonMan joined #perl6
13:22 timotimo you may want to wait on a tap instead of the supply, but ... hmm
13:23 Zoffix joined #perl6
13:23 Zoffix m: my %what = foo => 42, bar => 43; my @keys = %what.keys; say 'foo3bar4' ~~ /@keys 4/
13:23 camelia rakudo-moar 1ddb7c: OUTPUT«「bar4」␤»
13:24 Zoffix Is there a way to do that without using @keys? Just with %what.keys directly somehow?
13:24 timotimo if at all, then with curly bracse
13:24 Pierre_ Method 'wait' not found for invocant of class 'Tap'
13:24 timotimo Pierre_: oh, ok
13:24 Zoffix Pierre_, that looks like a bug to me
13:24 Zoffix Pierre_, your original hang I mean
13:24 * timotimo hasn't done nearly enough with supplies to know all methods by heart
13:25 Zoffix m: my %what = foo => 42, bar => 43; say 'foo3bar4' ~~ /@({%what.keys}) 4/
13:25 camelia rakudo-moar 1ddb7c: OUTPUT«Block object coerced to string (please use .gist or .perl to do that)␤  in regex  at <tmp> line 1␤Block object coerced to string (please use .gist or .perl to do that)␤  in regex  at <tmp> line 1␤Block object coerced to string (please use .gist or …»
13:25 Zoffix m: my %what = foo => 42, bar => 43; say 'foo3bar4' ~~ /{@(%what.keys)} 4/
13:25 camelia rakudo-moar 1ddb7c: OUTPUT«「4」␤»
13:25 FROGGS m: my %what = foo => 42, bar => 43; say 'foo3bar4' ~~ /@( %what.keys ) 4/
13:25 camelia rakudo-moar 1ddb7c: OUTPUT«「bar4」␤»
13:25 Zoffix FROGGS++ thanks
13:25 Pierre_ i'll open a ticket on RT then
13:25 Pierre_ was not sure if i was doing something wrong
13:26 Zoffix m: my $s = Supplier.new; my $l = $s.Supply; $l.tap: { $^v.say }; start { sleep 1; $s.emit: 1; $s.emit: 2; $s.done; }; $l.wait(); say "done";
13:26 Zoffix The .wait just sits and waits, even though it's done
13:26 camelia rakudo-moar 1ddb7c: OUTPUT«(timeout)1␤2␤»
13:26 Pierre_ exactly, where if you remoce the $l.tap()
13:26 Pierre_ it's working as expected
13:27 Pierre_ m: my $s = Supplier.new; my $l = $s.Supply; start { sleep 1; $s.emit: 1; $s.emit: 2; $s.done; }; $l.wait(); say "done";
13:27 camelia rakudo-moar 1ddb7c: OUTPUT«done␤»
13:27 mniip joined #perl6
13:27 Zoffix s: Supplier.new.Supply, 'done', \()
13:27 SourceBaby Zoffix, Something's wrong: ␤ERR: Could not find candidate that can do \()␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-​Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 29␤  in block <unit> at -e line 6␤␤
13:27 Zoffix s: Supplier.new, 'done', \()
13:27 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/bl​ob/1ddb7c0/src/core/Supply.pm#L1458
13:27 Zoffix s: Supplier.new.Supply, 'wait', \()
13:27 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/bl​ob/1ddb7c0/src/core/Supply.pm#L620
13:28 Pierre_ s is a nice bot :)
13:29 timotimo forget about the baby
13:29 BenGoldberg m: my $ier = Supplier.new; my $y = $ier.Supply; my $t = $y.tap(&say); start { sleep(1), $s.emit($_) for 1..2; $s.done }; $y.wait; say "done";
13:29 camelia rakudo-moar 1ddb7c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$s' is not declared␤at <tmp>:1␤------> 3my $t = $y.tap(&say); start { sleep(1), 7⏏5$s.emit($_) for 1..2; $s.done }; $y.wait␤»
13:30 BenGoldberg m: my $ier = Supplier.new; my $y = $ier.Supply; my $t = $y.tap(&say); start { sleep(1), $ier.emit($_) for 1..2; $ier.done }; $y.wait; say "done";
13:30 camelia rakudo-moar 1ddb7c: OUTPUT«(timeout)1␤2␤»
13:31 BenGoldberg m: my $ier = Supplier.new; my $y = $ier.Supply; my $t = $y.tap(&say); start { sleep(0.5), $y.emit($_) for 1..2; $y.done }; $y.wait; say "done";
13:31 rindolf Hi all! So I read TimToady 's Slashdot interview and he said there that tools like git have mostly eliminated the need for the "patch" program, but I'm still using patch in conjunction with git and on my own code, so I wonder if I don't know git too well (but then again - who does?)
13:31 camelia rakudo-moar 1ddb7c: OUTPUT«(timeout)»
13:31 Zoffix rindolf, there's git patch
13:31 edehont joined #perl6
13:31 Pierre_ so i guess, i really should open a ticket on RT
13:31 Zoffix Pierre_, yeah
13:32 rindolf Zoffix: $ git help patch ==> No manual entry for gitpatch
13:33 timotimo you may want "apply" and "diff", and potentially "format-patch"
13:33 Zoffix rindolf, oh yeah, it's git apply
13:33 Zoffix And you give it a patch file and it applies it
13:33 rindolf Zoffix: in a commit?
13:34 Zoffix You'd have to commit yourself
13:34 rindolf Zoffix: ah.
13:34 rindolf Zoffix: then why should I use it instead of "patch"?
13:37 FROGGS patch just modifies files, and apply'ing a git-am-ready patch files adds a commit with author information
13:37 timotimo right, that's what git format-patch creates for you
13:37 timotimo git format-patch creates patch files with appropriate subject + description, but it takes already-made git commits as input
13:38 cdg joined #perl6
13:43 canopus joined #perl6
13:44 MilkmanDan joined #perl6
13:48 kalkin- joined #perl6
13:48 ft joined #perl6
13:49 kalkin- hi
13:49 timotimo greetings kalkin-
13:51 kalkin- 😃
13:51 itaipu joined #perl6
13:57 rindolf I don't want to do a commit immediately.
13:59 timotimo that's what the index of git is for
13:59 timotimo also, commits are extremely cheap
14:00 mst why wouldn't you want to do a commit immediately?
14:00 timotimo there's nothing stopping you from making a commit every second by amending your previous commit
14:00 mst using a commit to checkpoint your work on a throaway branch is awesome
14:00 mst also, I think by *mostly* he means that there's lots of cases that would've been handled by publishing patch sets that can now be handled better by publishing your fork of the repo
14:04 poohman joined #perl6
14:11 Zoffix Is there a way to find out if a live supply is done?
14:13 mst kill -9, $*PID; # it's done now
14:14 Zoffix :)
14:19 Ven_ joined #perl6
14:19 Zoffix m: Supplier::Preserving.new
14:19 camelia rakudo-moar 1ddb7c: ( no output )
14:19 Zoffix This one appears to be undocumented at all
14:20 Zoffix And unspecced
14:20 itaipu joined #perl6
14:21 timotimo maybe it was meant to be inside Rakudo::Internals :P
14:21 AlexDaniel joined #perl6
14:22 zakharyas joined #perl6
14:22 Zoffix By its description... doesn't seem to be.
14:22 rindolf timotimo: I want to review, benchmark, test, and modify the changes first.
14:23 El_Che mst: you're a violent man
14:24 khw joined #perl6
14:26 poohman joined #perl6
14:30 poohman hello all, I have a question about look ahead regex in Grammars
14:30 Zoffix Ask away
14:30 poohman it seems to work if I use it as a normal regex but fails when used in a token
14:31 Zoffix tokens don't backtrack, maybe that's why
14:31 poohman ok
14:32 poohman let me see if I can parse it in some other way
14:32 poohman thanks for the info
14:32 Zoffix Any time.
14:35 MilkmanDan joined #perl6
14:37 itaipu joined #perl6
14:47 mst ok, so, this is possibly a terrible idea, but I'm curious if it's doable anyway
14:48 mst 'my @foo := @bar.map(...);' is an exception because Seq doesn't do positional
14:48 mst but 'my @foo := @bar.map(...).list;' works fine
14:48 mst would it be possible to have a pragma that intercepts that type failure and implicitly adds the .list ?
14:49 mst (pragma, slang, whatever-term-I-should've-asked-for)
14:49 Zoffix m: my @bar = ^10; my @foo := @bar.map(*+1) but Positional; dd @foo
14:49 camelia rakudo-moar 1ddb7c: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).Seq␤»
14:50 Zoffix m: my @bar = ^10; my @foo := @bar.map(*+1); dd @foo; CATCH { .^name; exit }
14:50 camelia rakudo-moar 1ddb7c: ( no output )
14:50 Zoffix m: my @bar = ^10; my @foo := @bar.map(*+1); dd @foo; CATCH { .^name.say; exit }
14:50 camelia rakudo-moar 1ddb7c: OUTPUT«X::TypeCheck::Binding␤»
14:50 smls mst: It already does that for signatures (e.g. a Seq can be passed to a @ parameter).
14:50 mst so 'but Positional' makes it do that implicitly?
14:50 smls If ::= (signature binding) were implemented, you could use that for variables too
14:50 Zoffix m: my @bar = ^10; my @foo := @bar.map(*+1); dd @foo; CATCH { .resume  }
14:50 camelia rakudo-moar 1ddb7c: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10... (lazy list)␤»
14:51 Zoffix mst, `but Positional` makes a copy of the object and mixes role Positional into it
14:52 mst hrm, I thought Seqs forgot their values after iterating
14:52 mst but the .resume one, I seem to still be able to access elements more than once
14:54 mst hm. oh. I didn't get a SORRY, so the binding is failing at runtime?
14:55 mst smls: I'm basically experimenting to see how much of my data I can keep read-only
14:55 mst this may be a terrible idea in reality, but it's a fun exercise in poking at things
14:57 Pierre_ m: :16("FF" x 8)
14:57 camelia rakudo-moar 1ddb7c: ( no output )
14:57 Pierre_ m: say :16("FF" x 8)
14:57 camelia rakudo-moar 1ddb7c: OUTPUT«18446744073709551615␤»
14:57 Zoffix m: my @bar = ^10; my $foo = @bar.map(*+1); dd $foo; $foo[2] = 42
14:57 camelia rakudo-moar 1ddb7c: OUTPUT«Seq $foo = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10).Seq␤Cannot modify an immutable Int␤  in block <unit> at <tmp> line 1␤␤»
14:59 mst Zoffix: yeah, I can do that, or :=
14:59 mst Zoffix: I was trying to achieve @-sigiled container + read-only + not need to '.list' manually
14:59 Zoffix ¯\_(ツ)_/¯
15:00 mst hey, c'mon, you can't be surprised that my first reaction to new toys is to bend them as hard as I can and see where they snap :P
15:00 domidumont joined #perl6
15:00 dogbert17 timotimo: rt is up again https://rt.perl.org/Public/​Bug/Display.html?id=129248
15:00 tushar joined #perl6
15:03 tushar can someone explain the difference between list and array? Also, provide their best use cases? Thanks.
15:03 Zoffix tushar, list is immutable, array is mutable
15:03 mst tushar: https://docs.perl6.org/language/list.html
15:03 smls mst: `constant` will do that for you, but is compile-time.
15:03 smls m: constant @a = 1...*;  say @a.WHAT;
15:03 camelia rakudo-moar 1ddb7c: OUTPUT«(List)␤»
15:04 mst smls: yes, and I don't want a constant :)
15:04 * mst has a very strong habit in perl5 of doing single-assignment
15:04 mst i.e. "once I've assigned a variable, never mutate it again"
15:04 mst (I might've been corrupted by erlang)
15:05 mst and I've been experimenting with how far I can convince perl6 to enforce it, rather than relying on me not screwing it up
15:05 Zoffix left #perl6
15:05 smls mst: \ variables are single-assignment
15:05 smls m: my \a = 1;  say a;  a = 2;
15:05 camelia rakudo-moar 1ddb7c: OUTPUT«1␤Cannot modify an immutable Int␤  in block <unit> at <tmp> line 1␤␤»
15:05 mst yeah, but for a map result, an @foo variable is just nicer
15:05 mst I'm trying to have my pretty *and* my safety at once
15:05 smls But when you assign a Seq to it, it won't be cached of course.
15:06 tushar @Zoffix, @mst - thanks.
15:06 wamba joined #perl6
15:06 smls mst: I don't disagree... :)
15:06 smls m:  say list 1...*;  say cache 1...*;  say (1...*).list;
15:06 camelia rakudo-moar 1ddb7c: OUTPUT«(...)␤(...)␤(...)␤»
15:07 smls m:  say WHAT list 1...*;  say WHAT cache 1...*;  say WHAT (1...*).list;
15:07 camelia rakudo-moar 1ddb7c: OUTPUT«(Seq)␤(List)␤(List)␤»
15:07 itaipu joined #perl6
15:07 smls ^^ I wonder why the function-like for of .list behaves differently
15:08 profan U/win 20
15:08 profan wops
15:08 smls mst: But at least  `@a := cache ...`  can be used as a slightly nicer alternative to `@a := (...).list`
15:08 mst yeah
15:09 kaare__ joined #perl6
15:09 mst seems like what I could really do with is C# style lexically scoped extension methods
15:09 mst so I could, say, add a method lmap that's equivalent to map(...).list
15:10 mst aha, the old 'stuff it in a var' trick seems to work
15:12 mst hmm
15:13 mst m: my @foo = ^10; my $map = method (&expr) { self.map(expr).list }; say @foo.$map(*+1)
15:13 camelia rakudo-moar 1ddb7c: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in block <unit> at <tmp> line 1␤␤»
15:13 mst how ... is *+1 ... not an argument?
15:13 mst or did I spoon something else?
15:14 poohman_ joined #perl6
15:14 smls mst: You need  .map(&expr)
15:15 mst AHA
15:15 mst so, that'll so me for the moment, I think
15:15 mst @bar.$map(*+1) is (to me) prettier than .list or cache
15:16 mst and is certainly sufficient for me to play with the style I'm thinking about
15:16 lichtkind_ joined #perl6
15:17 smls m: &map.wrap: ->| { cache callsame };  say WHAT map *+1, (1...10)
15:17 camelia rakudo-moar 1ddb7c: OUTPUT«(List)␤»
15:18 poohman_ joined #perl6
15:18 smls Heh, .wrap lets you modify built-in functions :P
15:18 mst oooh, which means I could probably do that lexically
15:18 smls Not sure
15:19 poohman__ joined #perl6
15:24 mst my \_map = &map; sub map (|args) { &_map(|args).list };
15:24 mst I get "Cannot find method 'Nil' on object of type List"
15:24 mst is there an obvious mistake in what I just tried/
15:25 inokenty joined #perl6
15:30 smls m: constant &_map = &map; sub map (|c) { &_map(|c).list };  say WHAT map 1+*, (1...5);
15:30 camelia rakudo-moar 1ddb7c: OUTPUT«(List)␤»
15:31 mst oh COOL
15:31 smls m: sub map (|c) { &CORE::map(|c).list };  say WHAT map 1+*, (1...5)
15:31 camelia rakudo-moar 1ddb7c: OUTPUT«(List)␤»
15:31 smls Even better ^^
15:31 mst ah, so basically, my \_map was the wrong way to make the copy
15:31 mst oki
15:32 mst excellent
15:32 smls mst: It took the copy too late
15:32 mst ohhhh
15:32 mst gotcha
15:32 mst <3
15:32 mst and that way, I can just remember "if I want a seq, use .map()"
15:32 mst that ... is totally fine by me, I think
15:33 mst smls++ # enabler
15:33 smls :)
15:36 kurahaupo joined #perl6
15:40 mst hrmf
15:41 mst so, I have my star dists
15:41 mst not 100% happy with all of them
15:41 mst wondering if I should just stick giant warnings in there and ship 'em anyway
15:41 mst actually, I should get them committed, and some skeleton docs, and *then* figure out wtf
15:42 john51 joined #perl6
15:45 Ven_ joined #perl6
15:46 Ven_ joined #perl6
15:46 Zoffix joined #perl6
15:47 * Zoffix has a fix for Pierre_'s bug
15:47 Zoffix But it's kinda iffy... :)
15:47 Pierre_ :)
15:48 Pierre_ i'm listening
15:48 Zoffix Well, it's not iffy if we decide that .wait on finished live supplies returns Nil.
15:49 Zoffix And to maintain current behaviour, a tappable will have to update last emitted value on each emitted value... dunno how terrible it is
15:51 holyghost joined #perl6
15:52 Pierre_ hum, using tap make the supply live?
15:53 Zoffix m: dd Supplier.new.Supply.live
15:53 camelia rakudo-moar 376b5f: OUTPUT«Bool::True␤»
15:53 ringer1 joined #perl6
15:54 Zoffix Hm, maybe I'm wrong... Because here .wait is called before .done, but it still hangs
15:54 Zoffix m: my $supplier = Supplier.new; my $supply = $supplier.Supply; $supply.tap: *.say;  start { sleep 2; $supplier.emit: $_ for ^2; $supplier.done; }; $supply.wait; say "done";
15:54 Zoffix I guess I should say, I have a fix for golfed hanging version :)
15:54 camelia rakudo-moar 376b5f: OUTPUT«(timeout)0␤1␤»
15:54 Pierre_ :)
15:55 Pierre_ it's a first step
15:55 Zoffix Oh, and the above just exists with 'done'....
15:55 Zoffix Back to the drawing board XD
15:56 tushar How many kinds of "undefined values are available in Perl 6? I know one of them "Nil".
15:57 Zoffix tushar, infinite number
15:57 Zoffix m: class BlahBlah {}.defined.say
15:57 camelia rakudo-moar 376b5f: OUTPUT«False␤»
15:57 Zoffix Any type object is undefined
15:57 Zoffix huggable, Mu
15:57 huggable Zoffix, The root of the Perl 6 type hierarchy.: https://docs.perl6.org/type/Mu
15:58 Zoffix huggable, Mu name
15:58 huggable Zoffix, nothing found
15:58 Zoffix :(
15:58 tushar @Zoffix : thanks.
16:06 poohman joined #perl6
16:07 poohman_ joined #perl6
16:18 djbkd joined #perl6
16:22 stundenull joined #perl6
16:24 Zoffix holy shit. I fixed it... Even fixed another bug in it too
16:25 Zoffix Achievement Unlocked: fix an async bug in Rakudo \o/
16:28 Zoffix hm, three bugs actually, if I'm understanding this right. Third one being a race condition
16:29 Pierre_ Nice!
16:29 Pierre_ if you want to reply to the ticket, it's that one : https://rt.perl.org/Ticket/Display.html?id=129247
16:32 itaipu joined #perl6
16:32 CIAvash joined #perl6
16:39 stundenull joined #perl6
16:52 stux|RC joined #perl6
16:53 robertle I need to wait for external events or points in time, which boils down to a wait with timeout. is Promise.in() + Promise.anyof as suggested here http://qs343.pair.com/~monkp​erl/index.pl?node_id=1168103 really the way to go?
16:54 robertle I am surprised that there is no timed wait. the promise/cahnnel/supply stuff is great, but a timed wait seems natural and no less safe, concise or expressive...
16:55 Zoffix robertle, what's a "timed wait"?
16:56 Zoffix m: Promise.in(2).then: {say "Two seconds later"}; say "Meow meow"; sleep 3;
16:56 camelia rakudo-moar 376b5f: OUTPUT«Meow meow␤Two seconds later␤»
16:57 robertle like receive() with a timeout
16:58 robertle but I guess the question is whether you call something like that once for each thing returned, or (like we now do) once witha  lmabda that gets called...
17:01 itaipu joined #perl6
17:02 Zoffix Pierre_, well, I ultimately failed. But hoping saved some time for jnthn++ to actually fix it :) Commented: https://rt.perl.org/Ticket/Display.html?id=129247
17:04 robertle pr await(promise, timeout)
17:04 robertle s/pr/or/
17:05 Zoffix left #perl6
17:07 Pierre_ m: await( Promise.in(2) ); say now - BEGIN { now };
17:07 camelia rakudo-moar 376b5f: OUTPUT«2.01323755␤»
17:12 Pierre_ Zoffix, intersting, async is tricky :)
17:15 stux|RC-only joined #perl6
17:15 Actualeyes joined #perl6
17:16 Ven_ joined #perl6
17:20 zacts hi perl6 nerds
17:21 zacts does perl6 support threads well?
17:21 zacts from what I recall perl5 didn't do this too well.
17:21 jferrero zacts: https://www.youtube.com/watch?​v=JpqnNCx7wVY&amp;app=desktop
17:21 mst zacts: perl6 has its own concurrency stuff
17:22 mst zacts: direct use of threads is generally stupid in any language
17:22 mst zacts: perl5's solution to this is a mixture of async + fork + abstractions
17:22 mst zacts: perl5's solution is a miaxture of async + parallelism abstractions, which incidentally may use threads under the hood, but that's not the point
17:22 mst gah, 6 in that second one
17:24 El_Che zacts: https://docs.perl6.org/language/concurrency
17:25 zacts ah ok
17:25 zacts mst: cool
17:25 zacts thanks for the info on that
17:25 zacts jferrero: El_Che thanks! :-)
17:25 El_Che zacts: there are plenty of high level options without the need to handle threads directly. But if you must, you can
17:25 zacts I really need to hang out in #perl and #perl6 more often
17:26 zacts just to listen more, and soak in more wisdom
17:26 zacts El_Che: ok cool
17:26 TimToady m: my %what = foo => 42, bar => 43; my @what = %what.keys; say 'foo3bar4' ~~ /<cat=@what>  4/;
17:26 camelia rakudo-moar 376b5f: OUTPUT«「bar4」␤ cat => 「bar」␤»
17:27 TimToady m: my %what = foo => 42, bar => 43; say 'foo3bar4' ~~ /<cat=@(%what.keys)>  4/;
17:27 camelia rakudo-moar 376b5f: OUTPUT«「bar4」␤ cat => 「bar」␤»
17:29 mst zacts: basically "does X support threads well" is a bizarre question to ask about a high level language
17:30 mst zacts: are you writing C? no? why are you trying to use threads again? :)
17:30 zacts mst: I see. :-) yes my question is naive, as I definitely need to learn more about this stuff.
17:30 mst (also nginx is a great demonstration of how really performant C tends to be done via async, not threads, anyway)
17:30 zacts mst: heh I see what you mean now
17:31 zacts mst: I've been doing some rudimentary Ruby man, and they provide I think Fibers and Threads
17:32 zacts but I'm just learning about concurrency and related topics with Ruby. I can't wait to get back into perl though
17:33 TimToady fibers and threads are not composable, so we provide higher-level concepts above them that are composable
17:33 zacts nice TimToady
17:33 mst zacts: oh, yeah, ruby can't do concurrency worth shit
17:33 zacts mst: :-P, so you can see why my questions are naive then, hopefully
17:33 mst promises and supplies and channels are where it's at
17:34 mst (and IO::Async in perl5 provides similar albeit not-quite-as-nice versions of the same)
17:34 tailgate what problems does ruby have? Is it like python and the GIL?
17:34 mst its threading is all green threading
17:34 mst beyond that, I don't really know
17:35 mst ruby's OO is so terrible compared to perl5+Moo(se) that I can't bring myself to write enough ruby code to find out any further problems
17:35 zacts Ruby is all spaghetti sauce with tofu for concurrency? can we at least agree on that?
17:35 mst I've no idea what that means
17:35 zacts mst: that's the point
17:35 mst mostly I find ruby to be shiny for trivial things, but sufficiently bad at OO I don't want to write non-trivial things in it
17:36 zacts yeah
17:36 mst also, ruby has https://github.com/eventmachine/eventmachine
17:36 mst which is probably a better plan than threads
17:36 El_Che tailgate: yes, Ruby MRI -> GIL
17:36 zacts ruby reminds me of lego bricks, where perl reminds me of a UNIXy power tool. but back to #perl6
17:36 zacts I just have to try perl6 sometime soon
17:37 zacts anyway, thanks for the perspectives and info
17:38 zacts I guess for a first step, I did install perl6 via rakudobrew
17:38 zacts I have it installed on my laptop, so soon I'll try some guides and tutorials
17:39 zacts although, mst I have a question for you.
17:39 zacts I want to learn perl6, and I have no Perl5 projects to work on. Can I just dive in to perl6?
17:39 zacts rather than reviewing perl5 again, and then doing perl6?
17:39 djbkd joined #perl6
17:40 zacts and then I gtg... but my client is 24/7.
17:40 zacts :-)
17:42 BenGoldberg joined #perl6
17:43 robertle zacts: I don't find perl5 particularily helpful when understanding perl6, quite the opposite: it's similar enough to get confused, but different enough to limit the carryover...
17:45 MilkmanDan joined #perl6
17:45 El_Che zacts: I created some packages in case you run Ubuntu 16.04 or Centos7. Created by this: https://github.com/nxadm/rakudo-pkg . Example packages here for now: http://claudio.ulyssis.be/perl6/
17:48 nadim_ joined #perl6
17:51 holyghost joined #perl6
17:57 MilkmanDan joined #perl6
18:00 krunen joined #perl6
18:15 FROGGS joined #perl6
18:16 wamba joined #perl6
18:18 TheLemonMan joined #perl6
18:45 itaipu joined #perl6
18:46 zakharyas joined #perl6
18:47 domidumont joined #perl6
18:49 girafe joined #perl6
18:49 zacts El_Che: oh cool, yes I am running Ubuntu 16.04
18:49 zacts thanks
18:49 zacts robertle: ah good to know
18:49 zacts I'll just dive in to perl6
18:50 masak let us know how it goes!
18:51 zacts thanks! :-)
18:51 zacts oh so I've heard that much of Perl6's OOP system is inspired in part by CLOS?
18:52 zacts I wonder if reading the book on CLOS might help me with Perl6 OOP, or if there is enough doc to cover the overall design concepts from a user/programmer perspective (as opposed to a perl6 internals perspective)
18:52 zacts I've tried a bit of rudimentary common lisp in the past
18:52 masak I think the biggest overlap between Perl 6's OOP system and CLOS is that both have a MOP
18:52 masak though I'd say they are rather different in the specifics
18:53 masak I happen to know jnthn was reading "The Art of the Metaobject Protocol" around the time he designed Perl 6's MOP :)
18:53 El_Che zacts: Perl6's OO system is pretty straight forward in my opinion.
18:54 zacts ok cool
18:54 andrzejku joined #perl6
18:54 El_Che zacts: have you done Moo(se) in Perl5 in the past?
18:54 zacts I'll probably be starting with OOP and then going into other paradim shifts after that.
18:54 mst Perl6's OO is basically Moose+-
18:55 El_Che mst: Moose++? ;)
18:55 mst El_Che: no
18:55 zacts El_Che: I've heard of Moose, and written a rudimentary toy app with it, but _NO_ experience whatsoever with Moose
18:55 mst masak: well, yes, and the current version was after I'd had him go over Moose's MOP, which was based on that book as well
18:55 masak Moose was based on a bunch of things :)
18:55 eliasr joined #perl6
18:56 masak among other things Pugs' MOP
18:56 zacts I need to probably read the Moose doc? but I would rather just avoid perl5 if possible and dive into perl6
18:56 mst zacts: no
18:56 mst nobody even remotely suggested that
18:57 El_Che masak: because no one has posted this on this discussion: http://i.imgur.com/sxgSiHg.gif
18:57 mst stop making up reasons to avoid learning perl6 yet :(
18:57 masak don't avoid Perl 5 just for the sake of it, though :)
18:57 zacts mst: ah ok. Ok ok! I'll stop making excuses to learn perl6 :-)
18:57 mst if anything, learning perl6's OO first
18:57 mst should make Moose/Moo easier to learn
18:57 zacts sweet
18:57 mst also less disappointing than the other way around
18:57 El_Che they are very similar (I like both)
18:58 masak El_Che: those of us who are deeply intertwined with the Perl 6 development process are well aware of that fake book cover :)
18:58 * mst keeps reaching for method modifiers and lazy builders and not finding them
18:58 masak mst: I think I'd like to see lazy builders, too.
18:59 El_Che masak: It could be a good laptop sticker that beast
18:59 zacts which pastebin is for this channel?
18:59 zacts (just for when I have full example questions)
18:59 mst http://fpaste.scsys.co.uk/perl6 will, amazingly enough, work
18:59 zacts I didn't see it in topic. cool
19:00 aries_liuxueyang joined #perl6
19:02 timotimo i find it a bit surprising that the "designing perl6" book claims something about a committee
19:02 El_Che timotimo: at least it got the butterfly wings right
19:03 timotimo yeah, the animal part of it is pretty
19:03 masak timotimo: maybe they confused the RFC discussions with a committee
19:03 masak timotimo: but yes, that fake book cover reminds me most of the time of the ways in which Perl 6 has succeeded, not the ways in which it has failed
19:03 El_Che I wouldn't take it too seriously, it's just a quick laught
19:03 El_Che -t
19:04 masak El_Che: yes, of course
19:04 masak El_Che: what you have to realize is that it's probably the 100th time I see it ;)
19:05 timotimo :)
19:05 El_Che haha
19:05 El_Che it won't be the last
19:05 timotimo https://github.com/timo/perl6-vor​trag/blob/master/Wolpertinger.jpg i once used this on a slide for a perl6 talk
19:06 El_Che lol
19:12 * [Coke] waves from Dublin.
19:13 lizmat [Coke] o/
19:13 timotimo o/ lizmat, [Coke]
19:13 masak \o, [Coke]-in-Dublin
19:13 timotimo o/ masak
19:13 masak and lizmat, and timotimo :)
19:22 stmuk_ the other perl6ish image is
19:22 stmuk_ https://s-media-cache-ak0.pinimg.com/736x/bf​/3f/4c/bf3f4c4e4cbc909f957f939bb6bc7cc6.jpg
19:25 cdg joined #perl6
19:25 lizmat o/ masak
19:25 timotimo yes <3
19:36 dalek gtk-simple: e1dfb78 | timotimo++ | lib/GTK/Simple/ (2 files):
19:36 dalek gtk-simple: gtk_scrolled_window_new needs its parameters
19:36 dalek gtk-simple:
19:36 dalek gtk-simple: otherwise random values in registers get interpreted
19:36 dalek gtk-simple: as pointers by that function and explosions happen.
19:36 dalek gtk-simple:
19:36 dalek gtk-simple: Fixes #66
19:36 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/e1dfb781bd
19:38 rudolfochrist joined #perl6
19:50 Sgeo joined #perl6
19:52 Ven_ joined #perl6
19:58 djbkd joined #perl6
19:59 nadim joined #perl6
20:08 MilkmanDan joined #perl6
20:15 kyclark_ joined #perl6
20:20 TEttinger joined #perl6
20:21 _slade_ joined #perl6
20:26 djbkd joined #perl6
20:29 Hotkeys So I'm trying to build p6 on windows and I have mingw stuff installed
20:29 Hotkeys but I'm getting this error http://pastebin.com/4vu0ZrAQ
20:31 skids joined #perl6
20:32 Hotkeys I could just install visual studio but I'd rather now
20:32 Hotkeys not
20:33 skids m: use NativeCall; my class C { has uint8 $.f; method foo { say nativesizeof($!f) } }; C.new.foo;
20:33 camelia rakudo-moar 04af57: OUTPUT«NativeCall op sizeof expected type with CPointer, CStruct, CArray, P6int or P6num representation, but got a P6opaque (Int)␤  in sub nativesizeof at /home/camelia/rakudo-m-inst-1/share/perl6/sou​rces/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) li…»
20:33 moritz Hotkeys: this sucks, but probably the simplest way to diagnose this is to edit lib/probe.pm in MoarVM
20:33 skids Anyone know how to check a native attributes size without 4 lines of introspection?
20:33 moritz Hotkeys: around line 56 it says  system $command\n and return;
20:34 timotimo ooooh, did you know it was Brendan Gregg who yelled at those hard drives in a datacenter?
20:34 moritz Hotkeys: if you insert a  say $command;  before that, you'll know exactly what command it tries to execute
20:34 mspo timotimo: best video
20:36 Hotkeys alright
20:36 Hotkeys I'll try that, thanks
20:36 skids m: use NativeCall; my class C is repr("CStruct") { has uint8 $.f; method foo { say nativesizeof($!f) } }; C.new.foo; # same problem.
20:36 camelia rakudo-moar 04af57: OUTPUT«NativeCall op sizeof expected type with CPointer, CStruct, CArray, P6int or P6num representation, but got a P6opaque (Int)␤  in sub nativesizeof at /home/camelia/rakudo-m-inst-1/share/perl6/sou​rces/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) li…»
20:37 tbrowder hi #perl6
20:37 skids o/
20:37 tbrowder any way to change the locale temporarily inside a p6 prog?
20:38 timotimo m: m: use NativeCall; my class C { has uint8 $.f; method foo { say nativesizeof($!f<>) } }; C.new.foo;
20:38 camelia rakudo-moar 04af57: OUTPUT«NativeCall op sizeof expected type with CPointer, CStruct, CArray, P6int or P6num representation, but got a P6opaque (Int)␤  in sub nativesizeof at /home/camelia/rakudo-m-inst-1/share/perl6/sou​rces/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) li…»
20:38 timotimo ah. oh well.
20:41 timotimo mspo: yes, definitely best video
20:41 Ven_ joined #perl6
20:41 timotimo tbrowder: what kinds of effects do you require? you can set %*ENV<LC_ALL> for example, that'd have an effect when you shell out to other programs, or with Proc::Async etc etc
20:42 Hotkeys moritz: "gcc  -o try.o -c try.c >nul 2>&1"
20:42 mspo https://www.youtube.com/watch?v=tDacjrSCeq4
20:42 mspo if anyone is wonderin
20:42 mspo g
20:43 tbrowder i'm working on examples for propsed Str sprintf doc and want to test the effect of locales on the decimal separator
20:44 tbrowder specifically i want to test locales "nl_NL" and "da_DK"
20:44 timotimo oh
20:44 timotimo i don't think we have locale-aware formatting of numbers
20:45 skids m: use NativeCall; my class C is repr("CStruct") { has uint8 $.f; method foo { say nativesizeof(C.^attributes.grep(*.name eq "\$\!f")[0].type) } }; C.new.foo; # best I can come up with so far.
20:45 camelia rakudo-moar 04af57: OUTPUT«1␤»
20:45 skids running a iterator to find the attribute is a bit icky.
20:45 tbrowder timotimo: i'm just testing to make sure we've looked at stuff that's implemented and working, stuff that's not implemented, and expceptions
20:46 timotimo ah
20:49 MilkmanDan joined #perl6
20:52 moritz Hotkeys: so, what happens when you run that on the command line yourself, preferably without >nul 2>&1 ?
20:54 Hotkeys gcc: error: try.c: No such file or directory
20:55 geekosaur o.O
20:57 moritz Hotkeys: oh, it creates a probe/ dir where the file is
20:57 moritz ... and deletes that pretty reliably :(
20:57 Hotkeys lol
20:57 moritz so maybe just remove the redirect from sub compile in lib/probe.pm
20:57 Hotkeys yeah no probe/ dir here
20:58 tbrowder ref docs: as i crudely stated the other day, i have a strawman doc (to replace the current sprintf doc) for comment in a gist:  https://gist.github.com/tbrowder/​fecfedbe4d1524ca6f2373655477a542
20:58 moritz anyway, time to sleep here
20:58 moritz moarvm's configure really needs a --verbose to make it stop nom the errors
20:59 tbrowder interested parties please comment; in the meantime, i am creating more tests for examples that are not currently in the doc
21:03 tbrowder i copied the new version from a linux printf man page and tried to tailor it for p6; one significant difference from the current doc that, IMHO, is an improvement is that the examples will be moved to the end following all the heavy details which need to be considered as a whole before heavy examples.  i think numbering the examples and referring to them in
21:03 tbrowder the descriptions might be a good way to go; thoughts, please
21:10 MasterDuke tbrowder: would your tests make good roast material?
21:10 tbrowder maybe, but right now they're kind of messy
21:11 tbrowder and still in work aiming to test sprintf corners
21:11 tbrowder still finding corners
21:13 tbrowder the final effort will be a PR that someone else should merge or disapprove
21:17 MasterDuke is there supposed to be any difference between the Perl 5 sprintf and the Perl 6 sprintf?
21:17 cpage joined #perl6
21:17 cpage__ joined #perl6
21:17 MasterDuke if not (much), maybe that's a small and regular enough bunch of code that it wouldn't be too transform the Perl 5 tests to Perl 6
21:18 MasterDuke *too much work
21:18 MasterDuke *too much work to
21:20 MasterDuke tbrowder: think there's an extraneous 'which' at the end here https://gist.github.com/tbrowder/fecfedbe4d1524ca6​f2373655477a542#file-proposed-sprintf-doc-txt-L15
21:26 MasterDuke tbrowder: https://gist.github.com/tbrowder/fecfedbe4d1524ca6​f2373655477a542#file-proposed-sprintf-doc-txt-L88 this and the previous sentence use 'prefix' and 'prepend' with the same apparent meaning, it might be good to use the same word
21:26 tbrowder MasterDuke: thanks for L15;if you look at the p5 docs, p5 has a lot of stuff that follows the POSIX and C and gcc features (such as length modifiers) that don't make sense on Perl 6, and we assume that's why they were not implemented, but I haven't looked closely at the specs
21:28 MasterDuke https://gist.github.com/tbrowder/fecfedbe4d1524ca6​f2373655477a542#file-proposed-sprintf-doc-txt-L136 "left-adjust- ment"
21:28 Hotkeys welp
21:29 Hotkeys it looks like I just had a problem with mingw
21:29 Hotkeys because reinstalling fixed my compiling issue
21:32 MasterDuke tbrowder: there are a couple other places where it looked like a word hyphenation because of a newline wasn't undone correctly, i think you could just search for "dash space" to find most
21:32 tbrowder MasterDuke: all three fixes made in the gist (I chose prepend instead of prefix).
21:33 tbrowder yeah, i used the wrong command to man and it justified the text and i haven't caught all the extraneous spaces and hyphens yet, thaks for close reading!
21:33 MasterDuke https://gist.github.com/tbrowder/fecfedbe4d1524ca6​f2373655477a542#file-proposed-sprintf-doc-txt-L207 this might be "Inf" for Perl 6 instead?
21:35 tbrowder maybe, haven't tried that yet--just intended to get text out first so perlpilot and other interested people could see where i'm heading
21:36 tbrowder i anticipate dropping several of the feature that i don't believe are implemented or ever were intended to be implemented
21:38 tbrowder the first major redo of sprintf that i did that's on the docs now i did tests for all the examples and i have eliminated the NYIs for them, but i still need to test  some others i missed
21:39 djbkd joined #perl6
21:40 MasterDuke nice
21:43 tbrowder t'anks
21:59 _slade_ joined #perl6
22:00 kyclark_ joined #perl6
22:01 itaipu joined #perl6
22:03 telex joined #perl6
22:17 canopus joined #perl6
22:23 El_Che The wordpress blog does not allow me to share before publishing. If someone want to have a quick look at this (http://claudio.ulyssis.be/v​ar/tmp/p6smallscript.html) to check I don't write too much nonsense. It's about using p6 for small scripts
22:32 MasterDuke El_Che: you use 'is rw' on the $action parameter in check_params, why not on $action_p in MAIN?
22:33 lizmat El_Che: you actually want to use "is copy" there probably
22:34 kyclark_ joined #perl6
22:34 MasterDuke ha, right
22:35 lizmat El_Che: also, seems to me the last two lines can be simplified to: run($rsync...) == 0
22:36 lizmat if that's not true, you already get False
22:37 lizmat you could prefix with a "return" if you want to emphasize that you're returning there
22:41 MasterDuke this may be more a matter of taste as to how explicit you want to be, but i believe '%sync_dirs{$target}<something>.elems > 0' can just be '%sync_dirs{$target}<something>'
22:42 El_Che thx, I'll fix it tomorrow. About the copy:  I can not change a value received from MAIN. The vars in the sig are read only it seems
22:43 lizmat El_Che: not even when you have "is copy" ?
22:43 El_Che (now looking for the key to my office before going to bed, otherwise I can't get in :) )
22:44 lizmat $ 6 'sub MAIN($a is copy) { $a = "foo"; say $a }' bar
22:44 lizmat foo
22:44 lizmat $ 6 'sub MAIN($a is copy) { say $a }' bar
22:44 lizmat bar
22:45 lizmat otherwise I'm too tired to look at it it more detail, so good night, #perl6!
22:45 timotimo good night lizmat!
22:51 firstdayonthejob joined #perl6
22:53 MasterDuke El_Che: also, your entire first if block in sync() could be just '@params.append: %sync_dirs{$target}<excludes>.map({ "--exclude=$_" })'
23:03 MasterDuke or, '@params.append: "--exclude=" «~« %sync_dirs{$target}<excludes>'
23:07 MasterDuke hmm, though the hyperoperator way will add an empty Array if %sync_dirs{$target}<excludes> is empty and the explicit map won't
23:27 dalek doc: bbfe152 | hoelzro++ | doc/Language/operators.pod6:
23:27 dalek doc: Mark prefix:<||> as TODO
23:27 dalek doc: review: https://github.com/perl6/doc/commit/bbfe1528d2
23:27 dalek doc: 704f4a0 | hoelzro++ | doc/Language/operators.pod6:
23:27 dalek doc: Add docs for buffer bitwise operators
23:27 dalek doc: review: https://github.com/perl6/doc/commit/704f4a011d
23:38 shmibs joined #perl6
23:41 geraud joined #perl6
23:45 Pierre_ joined #perl6
23:48 dj_goku joined #perl6
23:53 dataangel I take it is not a coincidence that as I read the racket manual I keep coming up on bits of syntax and terms that are in Perl6, like the keyword argument syntax or "augment"
23:54 dataangel Does Perl6 have call/cc?
23:55 pdcawley joined #perl6
23:56 MilkmanDan joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo