»ö« 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:04 cyphase left 00:07 kyclark_ left 00:08 cyphase joined 00:13 itaipu left, kyclark_ joined 00:15 Ven_ joined 00:16 kyclark_ left 00:20 cyphase left 00:23 khw joined 00:25 cyphase joined 00:26 kyclark_ joined 00:29 kyclark_ left 00:31 cyphase left 00:33 cyphase joined 00:34 wamba left 00:40 committable6 joined 00:43 itaipu joined 00:48 canopus left 00:50 ShimmerFairy left 00:54 canopus joined 00:59 RabidGravy left, leont__ left 01:01 araujo_ joined 01:04 araujo left 01:09 kyclark_ joined 01:10 kyclark_ left, nebuchadnezzar left 01:11 itaipu left 01:13 FROGGS left 01:17 girafe left 01:18 itaipu joined 01:25 FROGGS joined 01:42 dataange` joined 01:43 dataangel left 01:49 dataange` left, dataangel joined, Ven_ left 02:10 ShimmerFairy joined 02:19 skids joined 02:21 Pierre_ joined 02:28 noganex joined 02:31 noganex_ left 02:33 rgrinberg joined, bjz left 02:36 Actualeyes joined 02:39 BenGoldberg left 02:51 bjz joined 02:59 kaare_ joined 03:07 bioduds left 03:12 jeek is now known as Ir0ny, Ir0ny is now known as jeek 03:14 Pierre_ left 03:17 araujo__ joined 03:20 araujo_ left 03:27 poohman_ joined 03:28 poohman__ joined, poohman left 03:29 poohman joined 03:31 poohman_ left 03:32 poohman__ left 03:35 Actualeyes left 03:39 itaipu left 03:41 poohman_ joined 03:43 poohman__ joined 03:45 poohman left 03:46 poohman_ left 03:47 luiz_lha left 03:49 Actualeyes joined, luiz_lha_ joined
dalek c: ce62c41 | (Zoffix Znet)++ | doc/Type/Cool.pod6:
Document .split(@delimiters...) form

Fixes #901
03:50
03:51 munja left 03:59 poohman__ left 04:00 kyclark_ joined 04:03 araujo_ joined 04:04 Cabanossi left 04:05 araujo_ left 04:06 araujo_ joined 04:07 araujo__ left, Cabanossi joined 04:09 kyclark_ left 04:10 kyclark_ joined 04:13 khw left 04:14 kyclark_ left 04:18 rgrinberg left 04:21 AlexDaniel left 04:32 rgrinberg joined 05:01 Cabanossi left 05:04 rgrinberg left 05:05 Cabanossi joined 05:12 rgrinberg joined
grondilu recently learnt that ES6 has the equivalent of the slip operator. Should start a list of "things ES6 stole from Perl 6" 05:12
05:18 Pierre_ joined 05:23 pierrot_ joined, pierrot left 05:26 pierrot_ is now known as pierrot 05:31 llfourn_ joined 05:32 llfourn left 05:40 bob777 joined 05:41 MilkmanDan left 05:48 wamba joined 05:55 Pierre_ left 05:59 CIAvash joined, skids left 06:07 poohman joined
sammers_ hi perl6 06:21
TEttinger grondilu: where did perl6 get it from though 06:25
lizmat the GLR ? 06:26
Woodi TEttinger: from #perl6 :>
lizmat :-)
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)
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
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:31
06:32 rgrinberg left
sammers_ can someone educate me please.... 06:35
m: sub subparams(($head, *@tail)) { ($head, @tail).flat }; say subparams((1,2,3,4));
camelia rakudo-moar 0a7125: OUTPUT«(1 2 3 4)␤»
sammers_ that works with the Array, but fails with List: 06:36
m: sub subparams(($head, *$tail)) { ($head, $tail).flat }; say subparams((1,2,3,4));
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␤␤»
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));␤»
TEttinger just curious
sammers_ hmm
06:39 bjz left
geekosaur wonders what *$ means 06:40
btw docs.perl6.org/type/Signature#Cons..._Arguments link "Slurpy arguments" goes to docs.perl6.org/type/Slurpy_(A$FULL...Parameters which 404s 06:41
"An array or hash parameter can be marked as slurpy by leading asterisk(s)" suggests *$ should be illegal
06:42 firstdayonthejob joined 06:45 nadim joined
lizmat geekosaur: I would tend to agree 06:45
sammers_ geekosaur, thanks. that is exactly what i was looking for.
lizmat m: dd :(*$a) # apparently, it's just $a 06:46
camelia rakudo-moar 0a7125: OUTPUT«:($a)␤»
06:47 poohman_ joined
lizmat although that could also be an artefact of .perl not expecting / handling this correctly 06:47
m: sub a(*$a) { say $a }; a 42 # seems like it is correct to be just $a
camelia rakudo-moar 0a7125: OUTPUT«42␤»
lizmat geekosaur: care to rakudobug it ? 06:48
06:48 poohman__ joined 06:49 poohman left 06:50 _slade_ left 06:51 poohman_ left 06:52 djbkd left
sammers_ lizmat, should *$ be legal for Lists as well? 06:54
06:54 nebuchadnezzar joined 06:55 ufobat joined
geekosaur it should not be legal at all. what do you believe it should mean? 06:55
06:55 otaaago joined
geekosaur rakudobugged both the above 06:55
sammers_ well, we can create a List usint $
using $
geekosaur yes, but this is a signature. $ means item. what does it mean to have a slurpy item?
as opposed to a slurpy list?
06:56 poohman__ left, djbkd joined, djbkd left, poohman_ joined
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:56
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?
sammers_ yeah, it makes sense walking through it
06:58 bjz joined, rindolf joined 06:59 bjz left 07:00 poohman joined
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:03 poohman_ left
sammers_ that is what I am referring to. we can pass a list and then have to coerce it to an array. 07:05
07:06 darutoko joined
sammers_ thanks for the explanation 07:06
07:06 aries_liuxueyang left 07:08 aries_liuxueyang joined
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]␤»
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␤␤»
sammers_ m: sub ro-int([$head, *@arr]) { say @arr.WHAT; }; ro-int((1,2,3,4)); 07:11
camelia rakudo-moar 0a7125: OUTPUT«(Array)␤»
sammers_ m: sub ro-int([$head, *@arr]) { say @arr.WHAT; }; ro-int([1,2,3,4]);
camelia rakudo-moar 0a7125: OUTPUT«(Array)␤»
07:11 rindolf left
sammers_ any idea why that works with () and not []? both end up as Array inside the sub, but only () becomes ro 07:12
07:14 otaaago left 07:15 wamba left, rightfold left, wamba joined 07:16 djbkd joined 07:20 maybekoo2 joined 07:25 rindolf joined 07:26 asdfgh left
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:36
07:37 poohman left, poohman joined
sammers_ ShimmerFairy, thanks. Is there a way to see the current immutability of a given variable? 07:38
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:39
07:40 domidumont joined
sammers_ m: my $var = "String"; my $list = (1,2,$var,4); $list.VAR; 07:41
camelia ( no output )
sammers_ m: my $var = "String"; my $list = (1,2,$var,4); say $list.VAR;
camelia rakudo-moar 0a7125: OUTPUT«$(1, 2, "String", 4)␤»
sammers_ my $list = (1,2,"I am a string",4); say $list.VAR;
07:45 domidumont left, domidumont joined
ShimmerFairy m: my $var = "String"; my $list = (1,2,$var,4); say $list.VAR.WHAT; 07:48
camelia rakudo-moar 0a7125: OUTPUT«(Scalar)␤»
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␤␤»
ShimmerFairy m: my $var = "String"; my $list = (1,2,$var,4); say $list.map({$_.VAR.WHAT});
camelia rakudo-moar 0a7125: OUTPUT«((Int) (Int) (Scalar) (Int))␤»
07:52 kaare__ joined 07:54 kaare_ left 07:55 Pierre_ joined
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 ( no output )
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␤»
sammers_ m: my $list = (1,2,"string",4); sub is-mutable($list) { so Scalar ∈ $list.map({$_.VAR.WHAT}) }; is-mutable($list);
camelia ( no output )
sammers_ m: my $list = (1,2,"string",4); sub is-mutable($list) { so Scalar ∈ $list.map({$_.VAR.WHAT}) }; say is-mutable($list);
camelia rakudo-moar 0a7125: OUTPUT«False␤»
08:10 djbkd left 08:11 leont__ joined 08:12 prussian joined 08:16 finanalyst joined, bjz joined 08:22 poohman_ joined 08:23 poohman left 08:25 prussian left 08:26 poohman joined 08:29 poohman_ left 08:34 apejens joined 08:40 junior joined
junior hello. Why Int(Num(19)) -> Unable to parse expression in typename; couldn't find final ')'? 08:41
08:41 mr-foobar left
sammers_ m: say Int((Num(19))); 08:49
camelia rakudo-moar 0a7125: OUTPUT«19␤»
08:50 RabidGravy joined
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⏏0519));␤»
TEttinger that was the question and I don't know why adding extra parens helps (makes it a tuple maybe?) 08:51
08:52 smls joined 08:58 Pierre_ left 09:00 domidumont left 09:01 Pierre_ joined 09:06 Pierre_ left 09:07 TEttinger left 09:16 poohman left 09:17 poohman joined 09:20 aries_liuxueyang left 09:22 aries_liuxueyang joined 09:29 poohman left 09:34 bob777 left 09:36 bob777 joined 09:37 poohman joined 09:40 finanalyst left 09:41 mtj__ joined 09:42 mtj_ left, apejens left 09:43 apejens joined 09:46 mtj__ left, mtj_ joined 09:47 bob777 left 09:53 leont__ left
dogbert17 o/ #perl6 09:56
09:57 mtj_ left
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|␤»
dogbert17 m: say "The quick brown fox".words(5) 10:00
camelia rakudo-moar 0a7125: OUTPUT«(The quick brown fox Nil)␤»
smls dogbert17: Well, Nil is the dedicated placeholder for a missing value. 10:03
So it's at least consistent with other places in the language. 10:04
10:04 labster joined
dogbert17 smls: thx 10:05
10:12 apejens left 10:13 apejens joined, mr-foobar joined 10:16 poohman left 10:17 poohman joined
stmuk_ www.youtube.com/watch?v=wxU8OXKGNK 10:29
Steve Mynott: How to Lie With Benchmarks, Perl 6 is Faster!‎ - YAPC::Europe 2016
FROGGS ENOVIDEO
timotimo "an error occured during validation"
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
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))
timotimo this error happens because Int(Num) is syntax for a coercion type 10:32
and you're not allowed to stack coercion types into each other
would be nice if it mentioned that in the error
stmuk_ www.youtube.com/watch?v=wxU8OXKGNKc
damm copy and paste
MasterDuke yeah, that's not a great error
timotimo oh jesus, that video also has sound only on one channel 10:33
stmuk_ there is probably an ffmpeg option for that! 10:34
timotimo yup 10:37
smls m: my $a = Lock.new; $a.protect: { $a.protect: { say 42 } }
camelia rakudo-moar ccecbf: OUTPUT«42␤»
timotimo yes, we only have reentrant locks as far as i know
10:37 bob777 joined
smls timotimo: So I can rely on that working? 10:37
'cause I have two functions that need to Lock.protect their bodies, and one of them calls the other. 10:39
And I'd like to avoid keeping too many different locks around. 10:40
10:40 mtj_ joined, FROGGS left
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 c: 01a6e3b | (Jan-Olof Hendig)++ | doc/Type/Cool.pod6:
Added docs for fc and updated the method coercion table
timotimo that doesn't work? 10:42
smls timotimo: s/doesn't work/isn't safe/ 10:43
10:43 Pierre_ joined
smls because `state` initialization isn't atomic, last I checked 10:43
10:43 labster left 10:47 espadrine joined
dalek osystem: 5fd374b | (Slobodan Mišković)++ | META.list:
X11::Xlib::Raw - Xlib binding using NativeCall
10:50
osystem: a0de8fb | (Zoffix Znet)++ | META.list:
Merge pull request #247 from slobo/patch-1

X11::Xlib::Raw - Xlib binding using NativeCall
timotimo ah, yes, good point
god damn it 10:51
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
and then google calendar gave me a notification
nearly blew my head clean off my shoulders
10:53 Pierre_ left
dogbert17 timotimo: should I RT the rindex problems we discussed yesterday? 10:57
timotimo yeah, i think so 10:58
dogbert17 as an [LTA]?
timotimo hm, i think it's a tiny bit more than that
dogbert17 [BUG] then :) 10:59
timotimo i guess so
dogbert17 will fix
11:02 poohman left
dogbert17 looks as if rt is not working atm 11:19
timotimo yeah, it's down :(
11:25 poohman joined 11:26 Pierre_ joined, Pierre_ left
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
that was a big improvement like 25%
dalek k-simple: e080ab6 | timotimo++ | lib/GTK/Simple.pm6:
use "need" instead of "require" to pull in all modules

since this allows dependencies to be serialized during pre-compilation, this gives a major performance boost to "use GTK::Simple".
Closes #63
11:31
timotimo Ulti: you do bio stuff, right?
Ulti yup 11:33
timotimo well, the performance of "use" has been greatly improved. you don't happen to use "permutations", do you? 11:34
Ulti no the nearest I get to that is X 11:35
I have some really stupid stuff that does big X~ operations over and over again throwing away the same result
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
11:36 rindolf left
timotimo ah 11:36
well, if you "use" your module multiple times in your benchmark, that could very well be a big factor
Ulti like I'm sure I could make the operations much faster given the status quo right now
11:37 poohman left
timotimo probably 11:37
11:37 poohman joined
timotimo once you're below 1s, it gets harder and harder to measure improvements :) 11:37
Ulti yeah and increasingly its just startup
it might be time for me to clean up my code and instead write some actual benchmarks 11:38
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
like tux's benchmark
dalek k-simple: 4b6c723 | timotimo++ | / (2 files):
steal changes from #64 azawawi++

Closes #64
11:42
masak Ulti: well volunteered!
11:42 rindolf joined
Ulti yup 11:44
do we have any infrastructure for running on historic Rakudo?
and by we I mean is there a testing server or something I can pinch the code for 11:45
dogbert17 Ulti: maybe this github.com/perl6/whateverable/wiki/Benchable 11:47
stmuk_ github.com/japhb/perl6-bench
perl6-bench has rakudobrew like support for multiple versions and backends
Ulti ahh neat 11:48
I have a less than awesome VPS I can probably throw at that
timotimo it'll require quite a bit of disk space
benchable and commitable has support for compressing the rakudos while each is not in use
MasterDuke Ulti: AlexDaniel has a server with builds of rakudo back to 2015.07 11:49
where bisectable, benchable, and committable are run
Ulti the issue is really I would have to write code compatible pre/post GLR which is a bit pointless
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
6.c
timotimo yes, it'd be sensible to just cover 6.c and newer
Ulti plus we know Rakudo used to be slow ;)
timotimo yup
MasterDuke yeah, it's convenient to have the old builds to validate old bug reports 11:51
but otherwise the recent stuff is more interesting for benchmarking
timotimo thing is, MasterDuke has a build for every single commit
you might not need it to be that fine-grained :) 11:52
Ulti o___O
that would be cool though since you could find out which lines contributed the most to perf of the benchmark
MasterDuke every commit back to 2015.07
Ulti wow
MasterDuke have you seen benchable?
Ulti I saw the repo a while ago but haven't played with it at all 11:53
timotimo no need for the repo ;)
MasterDuke bench: releases .comb for ^10000 11:54
benchable6 MasterDuke, starting to benchmark the 11 given commits
MasterDuke, benchmarked the given commits, now zooming in on performance differences
11:56 smls left, smls joined
MasterDuke ha, oh damn, i thin that was too many iterations 11:56
timotimo how far does it zoom in? :)
MasterDuke it keeps bisecting as long as it finds a 10% speed difference between two commits 11:57
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:58
11:58 benchable6 left
MasterDuke ^^^ 11:59
timotimo oh crap
time to use the async-based irc stuff?
MasterDuke it actually finished and is still running
timotimo will benchable still post the gist?
MasterDuke yeah, we're trying to figure out what's best 12:00
timotimo AFK for a bit
MasterDuke unfortunately not 12:01
12:01 benchable6 joined
MasterDuke bench: releases my @a = .comb for ^1000 12:09
benchable6 MasterDuke, starting to benchmark the 11 given commits
MasterDuke, benchmarked the given commits, now zooming in on performance differences 12:10
12:10 benchable6 left, holyghost joined 12:11 benchable6 joined 12:12 araujo joined, araujo left, araujo joined 12:13 domidumont joined 12:14 araujo__ joined, araujo_ left 12:15 araujo__ left, ItayAlmog joined 12:16 araujo__ joined 12:17 araujo left 12:18 ItayAlmog left 12:19 FROGGS joined 12:27 Pierre_ joined 12:32 Pierre_ left 12:33 cdg joined
dalek c: d2944f2 | (Steve Mynott)++ | bin/p6doc:
fix p6doc -l unique
12:35
12:39 ItayAlmog joined 12:41 cdg left 12:46 ItayAlmog left 12:48 rgrinberg joined 12:50 canopus left 12:55 rgrinberg left 12:56 canopus joined 12:57 Pierre_ joined 13:03 ItayAlmog joined 13:07 BenGoldberg joined 13:09 poohman left 13:15 itaipu joined
Pierre_ Hi All 13:15
something strange i do not get with Supply 13:16
let's take the following example
m: my $s = Supplier.new; my $l = $s.Supply; start { sleep 1; $s.emit(1); $s.done;}; $l.wait();say "done";
camelia rakudo-moar 1ddb7c: OUTPUT«done␤»
Pierre_ if i run the same thing, but i use tap on $l, then the $l.wait block indefinitely
-- 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";
not running it there, as it is jsut timing out 13:17
is tap() doing a king of inplicit wait?
timotimo well, do you close the tap? 13:19
oh, you $s.done, i see
Pierre_ yes, i'm not closing the tap, but the supply
timotimo it should not time out; let me check it out locally 13:20
Pierre_ i mean i am calling done on the supply
i stumbles across that after one of my bug
the code was "finishing" before all the expected value where seen through the tap
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
Pierre_ so i added a wait
yes, now that you are talking about the close
i think i know
13:21 TheLemonMan joined
timotimo you may want to wait on a tap instead of the supply, but ... hmm 13:22
13:23 Zoffix joined
Zoffix m: my %what = foo => 42, bar => 43; my @keys = %what.keys; say 'foo3bar4' ~~ /@keys 4/ 13:23
camelia rakudo-moar 1ddb7c: OUTPUT«「bar4」␤»
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
Pierre_ Method 'wait' not found for invocant of class 'Tap'
timotimo Pierre_: oh, ok
Zoffix Pierre_, that looks like a bug to me
Pierre_, your original hang I mean
timotimo hasn't done nearly enough with supplies to know all methods by heart
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 …»
Zoffix m: my %what = foo => 42, bar => 43; say 'foo3bar4' ~~ /{@(%what.keys)} 4/
camelia rakudo-moar 1ddb7c: OUTPUT«「4」␤»
FROGGS m: my %what = foo => 42, bar => 43; say 'foo3bar4' ~~ /@( %what.keys ) 4/
camelia rakudo-moar 1ddb7c: OUTPUT«「bar4」␤»
Zoffix FROGGS++ thanks
Pierre_ i'll open a ticket on RT then
13:25 mniip left
Pierre_ was not sure if i was doing something wrong 13:25
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
The .wait just sits and waits, even though it's done
camelia rakudo-moar 1ddb7c: OUTPUT«(timeout)1␤2␤»
Pierre_ exactly, where if you remoce the $l.tap()
it's working as expected
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
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␤␤
Zoffix s: Supplier.new, 'done', \()
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/1ddb...y.pm#L1458
Zoffix s: Supplier.new.Supply, 'wait', \()
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/1ddb...ly.pm#L620
Pierre_ s is a nice bot :) 13:28
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";
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";
camelia rakudo-moar 1ddb7c: OUTPUT«(timeout)1␤2␤»
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?)
camelia rakudo-moar 1ddb7c: OUTPUT«(timeout)»
Zoffix rindolf, there's git patch
13:31 edehont joined
Pierre_ so i guess, i really should open a ticket on RT 13:31
Zoffix Pierre_, yeah
rindolf Zoffix: $ git help patch ==> No manual entry for gitpatch 13:32
timotimo you may want "apply" and "diff", and potentially "format-patch" 13:33
Zoffix rindolf, oh yeah, it's git apply
And you give it a patch file and it applies it
rindolf Zoffix: in a commit?
Zoffix You'd have to commit yourself 13:34
rindolf Zoffix: ah.
Zoffix: then why should I use it instead of "patch"?
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
git format-patch creates patch files with appropriate subject + description, but it takes already-made git commits as input
13:37 canopus left 13:38 cdg joined 13:41 FROGGS left 13:43 canopus joined 13:44 MilkmanDan joined 13:45 itaipu left 13:48 domidumont left, kalkin- joined, ft joined
kalkin- hi 13:49
timotimo greetings kalkin-
kalkin- 😃 13:51
13:51 itaipu joined
rindolf I don't want to do a commit immediately. 13:57
timotimo that's what the index of git is for 13:59
also, commits are extremely cheap
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
mst using a commit to checkpoint your work on a throaway branch is awesome
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 itaipu left, poohman joined 14:08 kaare__ left 14:11 poohman left
Zoffix Is there a way to find out if a live supply is done? 14:11
14:11 ItayAlmog left
mst kill -9, $*PID; # it's done now 14:13
Zoffix :) 14:14
14:19 Ven_ joined
Zoffix m: Supplier::Preserving.new 14:19
camelia ( no output )
Zoffix This one appears to be undocumented at all
And unspecced 14:20
14:20 itaipu joined
timotimo maybe it was meant to be inside Rakudo::Internals :P 14:21
14:21 AlexDaniel joined 14:22 zakharyas joined
Zoffix By its description... doesn't seem to be. 14:22
rindolf timotimo: I want to review, benchmark, test, and modify the changes first.
El_Che mst: you're a violent man 14:23
14:24 khw joined 14:25 wamba left 14:26 poohman joined
poohman hello all, I have a question about look ahead regex in Grammars 14:30
Zoffix Ask away
poohman it seems to work if I use it as a normal regex but fails when used in a token
Zoffix tokens don't backtrack, maybe that's why 14:31
poohman ok
let me see if I can parse it in some other way 14:32
thanks for the info
Zoffix Any time.
14:35 MilkmanDan left, MilkmanDan joined 14:36 itaipu left 14:37 itaipu joined
mst ok, so, this is possibly a terrible idea, but I'm curious if it's doable anyway 14:47
'my @foo := @bar.map(...);' is an exception because Seq doesn't do positional 14:48
but 'my @foo := @bar.map(...).list;' works fine
would it be possible to have a pragma that intercepts that type failure and implicitly adds the .list ?
(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
camelia rakudo-moar 1ddb7c: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).Seq␤»
Zoffix m: my @bar = ^10; my @foo := @bar.map(*+1); dd @foo; CATCH { .^name; exit } 14:50
camelia ( no output )
Zoffix m: my @bar = ^10; my @foo := @bar.map(*+1); dd @foo; CATCH { .^name.say; exit }
camelia rakudo-moar 1ddb7c: OUTPUT«X::TypeCheck::Binding␤»
smls mst: It already does that for signatures (e.g. a Seq can be passed to a @ parameter).
mst so 'but Positional' makes it do that implicitly?
smls If ::= (signature binding) were implemented, you could use that for variables too
Zoffix m: my @bar = ^10; my @foo := @bar.map(*+1); dd @foo; CATCH { .resume }
camelia rakudo-moar 1ddb7c: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10... (lazy list)␤»
Zoffix mst, `but Positional` makes a copy of the object and mixes role Positional into it 14:51
mst hrm, I thought Seqs forgot their values after iterating 14:52
but the .resume one, I seem to still be able to access elements more than once
hm. oh. I didn't get a SORRY, so the binding is failing at runtime? 14:54
smls: I'm basically experimenting to see how much of my data I can keep read-only 14:55
this may be a terrible idea in reality, but it's a fun exercise in poking at things
14:55 itaipu left
Pierre_ m: :16("FF" x 8) 14:57
camelia ( no output )
Pierre_ m: say :16("FF" x 8)
camelia rakudo-moar 1ddb7c: OUTPUT«18446744073709551615␤»
Zoffix m: my @bar = ^10; my $foo = @bar.map(*+1); dd $foo; $foo[2] = 42
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␤␤»
mst Zoffix: yeah, I can do that, or := 14:59
Zoffix: I was trying to achieve @-sigiled container + read-only + not need to '.list' manually
Zoffix ¯\_(ツ)_/¯
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
15:00 domidumont joined
dogbert17 timotimo: rt is up again rt.perl.org/Public/Bug/Display.html?id=129248 15:00
15:00 tushar joined
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
mst tushar: docs.perl6.org/language/list.html
smls mst: `constant` will do that for you, but is compile-time.
m: constant @a = 1...*; say @a.WHAT;
camelia rakudo-moar 1ddb7c: OUTPUT«(List)␤»
mst smls: yes, and I don't want a constant :) 15:04
mst has a very strong habit in perl5 of doing single-assignment
i.e. "once I've assigned a variable, never mutate it again"
(I might've been corrupted by erlang)
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
15:05 Zoffix left
smls mst: \ variables are single-assignment 15:05
m: my \a = 1; say a; a = 2;
camelia rakudo-moar 1ddb7c: OUTPUT«1␤Cannot modify an immutable Int␤ in block <unit> at <tmp> line 1␤␤»
mst yeah, but for a map result, an @foo variable is just nicer
I'm trying to have my pretty *and* my safety at once
smls But when you assign a Seq to it, it won't be cached of course.
tushar @Zoffix, @mst - thanks. 15:06
15:06 wamba joined
smls mst: I don't disagree... :) 15:06
m: say list 1...*; say cache 1...*; say (1...*).list;
camelia rakudo-moar 1ddb7c: OUTPUT«(...)␤(...)␤(...)␤»
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
smls ^^ I wonder why the function-like for of .list behaves differently 15:07
profan U/win 20 15:08
wops
smls mst: But at least `@a := cache ...` can be used as a slightly nicer alternative to `@a := (...).list`
mst yeah
15:09 kaare__ joined
mst seems like what I could really do with is C# style lexically scoped extension methods 15:09
so I could, say, add a method lmap that's equivalent to map(...).list
aha, the old 'stuff it in a var' trick seems to work 15:10
hmm 15:12
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␤␤»
mst how ... is *+1 ... not an argument?
or did I spoon something else?
15:14 poohman_ joined
smls mst: You need .map(&expr) 15:14
mst AHA 15:15
so, that'll so me for the moment, I think
@bar.$map(*+1) is (to me) prettier than .list or cache
and is certainly sufficient for me to play with the style I'm thinking about 15:16
15:16 lichtkind_ joined 15:17 poohman left
smls m: &map.wrap: ->| { cache callsame }; say WHAT map *+1, (1...10) 15:17
camelia rakudo-moar 1ddb7c: OUTPUT«(List)␤»
15:17 TheLemonMan left, poohman_ left 15:18 poohman_ joined
smls Heh, .wrap lets you modify built-in functions :P 15:18
mst oooh, which means I could probably do that lexically
15:18 lichtkind__ left
smls Not sure 15:18
15:19 poohman__ joined 15:22 poohman_ left
mst my \_map = &map; sub map (|args) { &_map(|args).list }; 15:24
I get "Cannot find method 'Nil' on object of type List"
is there an obvious mistake in what I just tried/
15:25 inokenty joined 15:28 Ven_ left
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)␤»
mst oh COOL 15:31
smls m: sub map (|c) { &CORE::map(|c).list }; say WHAT map 1+*, (1...5)
camelia rakudo-moar 1ddb7c: OUTPUT«(List)␤»
smls Even better ^^
mst ah, so basically, my \_map was the wrong way to make the copy
oki
excellent 15:32
smls mst: It took the copy too late
mst ohhhh
gotcha
<3
and that way, I can just remember "if I want a seq, use .map()"
that ... is totally fine by me, I think
smls++ # enabler 15:33
smls :) 15:34
15:36 kurahaupo joined
mst hrmf 15:40
so, I have my star dists 15:41
not 100% happy with all of them
wondering if I should just stick giant warnings in there and ship 'em anyway
15:41 maybekoo2 left, john51_ left
mst actually, I should get them committed, and some skeleton docs, and *then* figure out wtf 15:42
15:42 john51 joined 15:45 Ven_ joined 15:46 Ven_ left, Ven_ joined, Zoffix joined
Zoffix has a fix for Pierre_'s bug 15:47
But it's kinda iffy... :)
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 holyghost left
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:49
15:50 Ven_ left 15:51 holyghost joined
Pierre_ hum, using tap make the supply live? 15:52
Zoffix m: dd Supplier.new.Supply.live 15:53
camelia rakudo-moar 376b5f: OUTPUT«Bool::True␤»
15:53 ringer1 joined
Zoffix Hm, maybe I'm wrong... Because here .wait is called before .done, but it still hangs 15:54
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";
I guess I should say, I have a fix for golfed hanging version :)
camelia rakudo-moar 376b5f: OUTPUT«(timeout)0␤1␤»
Pierre_ :)
it's a first step 15:55
Zoffix Oh, and the above just exists with 'done'....
Back to the drawing board XD
tushar How many kinds of "undefined values are available in Perl 6? I know one of them "Nil". 15:56
Zoffix tushar, infinite number 15:57
m: class BlahBlah {}.defined.say
camelia rakudo-moar 376b5f: OUTPUT«False␤»
Zoffix Any type object is undefined
huggable, Mu 15:58
huggable Zoffix, The root of the Perl 6 type hierarchy.: docs.perl6.org/type/Mu
Zoffix huggable, Mu name
huggable Zoffix, nothing found
Zoffix :(
tushar @Zoffix : thanks.
16:06 poohman joined 16:07 poohman_ joined 16:09 poohman__ left 16:11 poohman left 16:14 junior left 16:18 djbkd joined, kurahaupo left 16:20 stundenull left 16:22 stundenull joined 16:24 itaipu left
Zoffix holy shit. I fixed it... Even fixed another bug in it too 16:24
Achievement Unlocked: fix an async bug in Rakudo \o/ 16:25
16:26 CIAvash left
Zoffix hm, three bugs actually, if I'm understanding this right. Third one being a race condition 16:28
Pierre_ Nice! 16:29
if you want to reply to the ticket, it's that one : rt.perl.org/Ticket/Display.html?id=129247
16:29 BenGoldberg left 16:32 stundenull left, itaipu joined, CIAvash joined 16:39 stundenull joined, stundenull left 16:42 itaipu left 16:46 tushar left 16:52 stux|RC joined 16:53 Actualeyes left
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 qs343.pair.com/~monkperl/index.pl?n...id=1168103 really the way to go? 16:53
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:54
Zoffix robertle, what's a "timed wait"? 16:55
16:56 bob777 left
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␤»
robertle like receive() with a timeout 16:57
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... 16:58
16:58 wamba left 17:01 itaipu joined, stux|RC-only left
Zoffix Pierre_, well, I ultimately failed. But hoping saved some time for jnthn++ to actually fix it :) Commented: rt.perl.org/Ticket/Display.html?id=129247 17:02
robertle pr await(promise, timeout) 17:04
s/pr/or/
17:05 Zoffix left 17:07 cdg left
Pierre_ m: await( Promise.in(2) ); say now - BEGIN { now }; 17:07
camelia rakudo-moar 376b5f: OUTPUT«2.01323755␤»
Pierre_ Zoffix, intersting, async is tricky :) 17:12
17:15 stux|RC-only joined, Actualeyes joined 17:17 Ven_ joined
zacts hi perl6 nerds 17:20
does perl6 support threads well? 17:21
from what I recall perl5 didn't do this too well.
17:21 Ven_ left, stux|RC left
jferrero zacts: www.youtube.com/watch?v=JpqnNCx7wV...pp=desktop 17:21
mst zacts: perl6 has its own concurrency stuff
zacts: direct use of threads is generally stupid in any language 17:22
zacts: perl5's solution to this is a mixture of async + fork + abstractions
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
gah, 6 in that second one
El_Che zacts: docs.perl6.org/language/concurrency 17:24
zacts ah ok 17:25
mst: cool
thanks for the info on that
jferrero: El_Che thanks! :-)
El_Che zacts: there are plenty of high level options without the need to handle threads directly. But if you must, you can
zacts I really need to hang out in #perl and #perl6 more often
just to listen more, and soak in more wisdom 17:26
El_Che: ok cool
TimToady m: my %what = foo => 42, bar => 43; my @what = %what.keys; say 'foo3bar4' ~~ /<cat=@what> 4/;
camelia rakudo-moar 376b5f: OUTPUT«「bar4」␤ cat => 「bar」␤»
TimToady m: my %what = foo => 42, bar => 43; say 'foo3bar4' ~~ /<cat=@(%what.keys)> 4/; 17:27
camelia rakudo-moar 376b5f: OUTPUT«「bar4」␤ cat => 「bar」␤»
mst zacts: basically "does X support threads well" is a bizarre question to ask about a high level language 17:29
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.
mst (also nginx is a great demonstration of how really performant C tends to be done via async, not threads, anyway)
zacts mst: heh I see what you mean now
mst: I've been doing some rudimentary Ruby man, and they provide I think Fibers and Threads 17:31
but I'm just learning about concurrency and related topics with Ruby. I can't wait to get back into perl though 17:32
TimToady fibers and threads are not composable, so we provide higher-level concepts above them that are composable 17:33
zacts nice TimToady
mst zacts: oh, yeah, ruby can't do concurrency worth shit
zacts mst: :-P, so you can see why my questions are naive then, hopefully
mst promises and supplies and channels are where it's at 17:34
(and IO::Async in perl5 provides similar albeit not-quite-as-nice versions of the same)
17:34 djbkd left
tailgate what problems does ruby have? Is it like python and the GIL? 17:34
mst its threading is all green threading
beyond that, I don't really know
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?
mst I've no idea what that means
zacts mst: that's the point
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
zacts yeah 17:36
mst also, ruby has github.com/eventmachine/eventmachine
which is probably a better plan than threads
El_Che tailgate: yes, Ruby MRI -> GIL
zacts ruby reminds me of lego bricks, where perl reminds me of a UNIXy power tool. but back to #perl6
17:36 MilkmanDan left
zacts I just have to try perl6 sometime soon 17:36
anyway, thanks for the perspectives and info 17:37
I guess for a first step, I did install perl6 via rakudobrew 17:38
I have it installed on my laptop, so soon I'll try some guides and tutorials
although, mst I have a question for you. 17:39
I want to learn perl6, and I have no Perl5 projects to work on. Can I just dive in to perl6?
rather than reviewing perl5 again, and then doing perl6?
17:39 djbkd joined
zacts and then I gtg... but my client is 24/7. 17:40
:-)
17:42 BenGoldberg joined
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:43
17:45 MilkmanDan joined
El_Che zacts: I created some packages in case you run Ubuntu 16.04 or Centos7. Created by this: github.com/nxadm/rakudo-pkg . Example packages here for now: claudio.ulyssis.be/perl6/ 17:45
17:46 krunen left 17:48 nadim left, nadim_ joined 17:49 Pierre_ left 17:50 holyghost left 17:51 holyghost joined 17:54 domidumont left 17:55 MilkmanDan left 17:57 MilkmanDan joined 18:00 krunen joined 18:07 Actualeyes left 18:10 zakharyas left 18:15 FROGGS joined 18:16 wamba joined 18:18 TheLemonMan joined 18:33 Sgeo_ left 18:38 itaipu left 18:45 itaipu joined 18:46 zakharyas joined 18:47 domidumont joined 18:49 girafe joined
zacts El_Che: oh cool, yes I am running Ubuntu 16.04 18:49
thanks
robertle: ah good to know
I'll just dive in to perl6
masak let us know how it goes! 18:50
zacts thanks! :-) 18:51
oh so I've heard that much of Perl6's OOP system is inspired in part by CLOS?
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
I've tried a bit of rudimentary common lisp in the past
masak I think the biggest overlap between Perl 6's OOP system and CLOS is that both have a MOP
though I'd say they are rather different in the specifics
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.
zacts ok cool 18:54
18:54 andrzejku joined
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.
mst Perl6's OO is basically Moose+-
18:54 djbkd left
El_Che mst: Moose++? ;) 18:55
mst El_Che: no
zacts El_Che: I've heard of Moose, and written a rudimentary toy app with it, but _NO_ experience whatsoever with Moose
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
masak Moose was based on a bunch of things :)
18:55 eliasr joined
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
mst zacts: no
nobody even remotely suggested that
El_Che masak: because no one has posted this on this discussion: i.imgur.com/sxgSiHg.gif 18:57
mst stop making up reasons to avoid learning perl6 yet :(
masak don't avoid Perl 5 just for the sake of it, though :)
zacts mst: ah ok. Ok ok! I'll stop making excuses to learn perl6 :-)
mst if anything, learning perl6's OO first
should make Moose/Moo easier to learn
zacts sweet
mst also less disappointing than the other way around
El_Che they are very similar (I like both) 18:58
18:58 darutoko left
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 aries_liuxueyang left
masak mst: I think I'd like to see lazy builders, too. 18:58
El_Che masak: It could be a good laptop sticker that beast 18:59
zacts which pastebin is for this channel?
(just for when I have full example questions)
mst fpaste.scsys.co.uk/perl6 will, amazingly enough, work
zacts I didn't see it in topic. cool
19:00 aries_liuxueyang joined
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
timotimo yeah, the animal part of it is pretty 19:03
masak timotimo: maybe they confused the RFC discussions with a committee
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
El_Che I wouldn't take it too seriously, it's just a quick laught
-t
masak El_Che: yes, of course 19:04
El_Che: what you have to realize is that it's probably the 100th time I see it ;)
timotimo :) 19:05
El_Che haha
it won't be the last
timotimo github.com/timo/perl6-vortrag/blob...tinger.jpg i once used this on a slide for a perl6 talk
El_Che lol 19:06
[Coke] waves from Dublin. 19:12
lizmat [Coke] o/ 19:13
timotimo o/ lizmat, [Coke]
masak \o, [Coke]-in-Dublin
timotimo o/ masak
masak and lizmat, and timotimo :)
19:14 MilkmanDan left
stmuk_ the other perl6ish image is 19:22
s-media-cache-ak0.pinimg.com/736x/...bc7cc6.jpg
19:25 domidumont left, cdg joined
lizmat o/ masak 19:25
timotimo yes <3
19:31 itaipu left
dalek k-simple: e1dfb78 | timotimo++ | lib/GTK/Simple/ (2 files):
gtk_scrolled_window_new needs its parameters

otherwise random values in registers get interpreted as pointers by that function and explosions happen.
Fixes #66
19:36
19:38 rudolfochrist joined 19:50 Sgeo joined 19:52 Ven_ joined 19:56 Ven_ left 19:58 djbkd joined 19:59 nadim joined 20:03 nadim_ left 20:08 MilkmanDan joined 20:15 andrzejku left, kyclark_ joined 20:18 espadrine left 20:19 djbkd left 20:20 kyclark_ left, kim1599 left, TEttinger joined 20:21 CIAvash left, _slade_ joined 20:25 kaare__ left 20:26 djbkd joined
Hotkeys So I'm trying to build p6 on windows and I have mingw stuff installed 20:29
but I'm getting this error pastebin.com/4vu0ZrAQ
20:31 skids joined
Hotkeys I could just install visual studio but I'd rather now 20:32
not
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/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) li…»
moritz Hotkeys: this sucks, but probably the simplest way to diagnose this is to edit lib/probe.pm in MoarVM
skids Anyone know how to check a native attributes size without 4 lines of introspection?
moritz Hotkeys: around line 56 it says system $command\n and return;
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
mspo timotimo: best video
Hotkeys alright 20:36
I'll try that, thanks
skids m: use NativeCall; my class C is repr("CStruct") { has uint8 $.f; method foo { say nativesizeof($!f) } }; C.new.foo; # same problem.
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/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) li…»
tbrowder hi #perl6 20:37
skids o/
20:37 wamba left
tbrowder any way to change the locale temporarily inside a p6 prog? 20:37
20:38 smls left
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/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) li…»
timotimo ah. oh well.
mspo: yes, definitely best video 20:41
20:41 Ven_ joined
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:41
Hotkeys moritz: "gcc -o try.o -c try.c >nul 2>&1" 20:42
mspo www.youtube.com/watch?v=tDacjrSCeq4
if anyone is wonderin
g
tbrowder i'm working on examples for propsed Str sprintf doc and want to test the effect of locales on the decimal separator 20:43
20:43 MilkmanDan left
tbrowder specifically i want to test locales "nl_NL" and "da_DK" 20:44
timotimo oh
i don't think we have locale-aware formatting of numbers
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␤»
skids running a iterator to find the attribute is a bit icky.
20:45 _slade_ left
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:45
timotimo ah 20:46
20:48 zakharyas left 20:49 MilkmanDan joined
moritz Hotkeys: so, what happens when you run that on the command line yourself, preferably without >nul 2>&1 ? 20:52
Hotkeys gcc: error: try.c: No such file or directory 20:54
geekosaur o.O 20:55
moritz Hotkeys: oh, it creates a probe/ dir where the file is 20:57
... and deletes that pretty reliably :(
Hotkeys lol
20:57 Ven_ left
moritz so maybe just remove the redirect from sub compile in lib/probe.pm 20:57
Hotkeys yeah no probe/ dir here
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: gist.github.com/tbrowder/fecfedbe4...655477a542 20:58
moritz anyway, time to sleep here
moarvm's configure really needs a --verbose to make it stop nom the errors
tbrowder interested parties please comment; in the meantime, i am creating more tests for examples that are not currently in the doc 20:59
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
the descriptions might be a good way to go; thoughts, please
21:08 edehont left
MasterDuke tbrowder: would your tests make good roast material? 21:10
tbrowder maybe, but right now they're kind of messy
and still in work aiming to test sprintf corners 21:11
still finding corners
the final effort will be a PR that someone else should merge or disapprove 21:13
MasterDuke is there supposed to be any difference between the Perl 5 sprintf and the Perl 6 sprintf? 21:17
21:17 cpage left, cpage joined, cpage__ joined
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:17
*too much work 21:18
*too much work to
21:19 cpage_ left, cpage__ is now known as cpage_
MasterDuke tbrowder: think there's an extraneous 'which' at the end here gist.github.com/tbrowder/fecfedbe4...oc-txt-L15 21:20
21:21 rudolfochrist left
MasterDuke tbrowder: gist.github.com/tbrowder/fecfedbe4...oc-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
MasterDuke gist.github.com/tbrowder/fecfedbe4...c-txt-L136 "left-adjust- ment" 21:28
Hotkeys welp
it looks like I just had a problem with mingw 21:29
because reinstalling fixed my compiling issue
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:32 djbkd left 21:33 ufobat left
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 gist.github.com/tbrowder/fecfedbe4...c-txt-L207 this might be "Inf" for Perl 6 instead?
21:34 TheLemonMan left
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:35
i anticipate dropping several of the feature that i don't believe are implemented or ever were intended to be implemented 21:36
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:38
21:39 djbkd joined
MasterDuke nice 21:40
21:43 BenGoldberg left
tbrowder t'anks 21:43
21:53 grondilu left 21:59 _slade_ joined 22:00 kyclark_ joined 22:01 itaipu joined 22:02 telex left 22:03 telex joined 22:07 aindilis left 22:10 canopus left 22:17 canopus joined 22:21 kyclark_ left
El_Che The wordpress blog does not allow me to share before publishing. If someone want to have a quick look at this (claudio.ulyssis.be/var/tmp/p6smallscript.html) to check I don't write too much nonsense. It's about using p6 for small scripts 22:23
22:26 RabidGravy left 22:27 firstdayonthejob left
MasterDuke El_Che: you use 'is rw' on the $action parameter in check_params, why not on $action_p in MAIN? 22:32
lizmat El_Che: you actually want to use "is copy" there probably 22:33
22:34 kyclark_ joined
MasterDuke ha, right 22:34
22:35 TEttinger left
lizmat El_Che: also, seems to me the last two lines can be simplified to: run($rsync...) == 0 22:35
if that's not true, you already get False 22:36
you could prefix with a "return" if you want to emphasize that you're returning there 22:37
22:39 cdg left
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:41
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:42
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 :) )
lizmat $ 6 'sub MAIN($a is copy) { $a = "foo"; say $a }' bar 22:44
foo
$ 6 'sub MAIN($a is copy) { say $a }' bar
bar
22:45 kyclark_ left
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
MasterDuke El_Che: also, your entire first if block in sync() could be just [email@hidden.address] %sync_dirs{$target}<excludes>.map({ "--exclude=$_" })' 22:53
22:53 rindolf left 22:56 firstdayonthejob left
MasterDuke or, [email@hidden.address] "--exclude=" «~« %sync_dirs{$target}<excludes>' 23:03
23:05 girafe left
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:07
dalek c: bbfe152 | hoelzro++ | doc/Language/operators.pod6:
Mark prefix:<||> as TODO
23:27
c: 704f4a0 | hoelzro++ | doc/Language/operators.pod6:
Add docs for buffer bitwise operators
23:29 shmibs left 23:36 geraud left 23:38 shmibs joined 23:41 geraud joined 23:45 Pierre_ joined 23:48 dj_goku joined 23:49 MilkmanDan left 23:51 Pierre_ left, bjz left
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:53
23:53 pdcawley left
dataangel Does Perl6 have call/cc? 23:54
23:55 pdcawley joined 23:56 MilkmanDan joined