»ö« 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.
BooK mmm, same error with the commit before that, it seems 00:02
timotimo masak: thanks for the fantastic laugh you gave me :)
timotimo BooK: potentially we were trying to make Version more efficient and neglected the possibility of subclassing it 00:04
so it's assuming something is one thing (or type) in all instances, where you replace it with a different thing in your subclass
like, returning a List or Array in a place where it used to be a nqp::list or nqp::hash or something
BooK timotimo: actually, lizmat knows that I'm trying to subclass it 00:08
timotimo oh 00:13
did you get a --ll-exception of the thing? that could hopefully tell us where it's trying to iterate a P6opaque directly 00:14
it sounds like something's calling nqp::iter on a thing that's a class containing an iterable, rather than using its .iterator or having a directly-iterable object there
m: use nqp; nqp::iter([1, 2, 3, 4])
camelia rakudo-moar 2126ed: OUTPUT«===SORRY!===␤No registered operation handler for 'iter'␤»
timotimo m: use nqp; nqp::iterator([1, 2, 3, 4])
camelia rakudo-moar 2126ed: OUTPUT«Cannot iterate object with P6opaque representation␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: use nqp; nqp::iterator(nqp::list(1, 2, 3, 4)) 00:15
camelia ( no output )
timotimo m: use nqp; nqp::iterator([1, 2, 3, 4].FLATTENABLE_LIST)
camelia ( no output )
timotimo like that
BooK my code is using this to create the new instances:
multi method new(Version: @parts, Str:D $string, Int() $plus = 0) {
that's the definition from Version.pm
sortiz Book, in particular the standard Version cmp expects that $!parts can be uses by the low level nqp::iterator
timotimo well, i'm expecting the problem isn't in your code :)
BooK github.com/rakudo/rakudo/blob/nom/...pm#L21-L23 00:16
sortiz s/uses/used/
Yep, but see: github.com/rakudo/rakudo/blob/781c...on.pm#L134 00:17
timotimo ah, in SET-SELF it directly grabs the $!reified out of the List you pass
BooK so what should I pass it?
BooK right now I'm handing stuff like: Array @v = [0, 99, 0, 0, 0, 0] 00:18
timotimo hm, Array derives from List, right?
m: say List.^mro
camelia rakudo-moar 2126ed: OUTPUT«((List) (Cool) (Any) (Mu))␤»
timotimo right ...
could you output the value of nqp::getattr(nqp::decont(a),Version,'$!parts'), or its .WHAT? 00:21
doesn't have to be in cmp, maybe just after you create an instance of your thing 00:23
sortiz or nqp::getattr(self,Version,'$!parts') after creation.
BooK ok 00:24
BooK if I want to run that in my code, how do I write it ? 00:26
AlexDaniel this is pretty cool: github.com/perl6/doc/issues/114
timotimo also, there's things to consider like can you reach SET-SELF from a subclass? because all the derived "new" candidates will just nqp::create(Version) and there's no version of bless you will get for free by running ".new" 00:27
BooK: all you need is a "use nqp" at the beginning
i should go to bed about now 00:28
BooK is there a preferred paste site? 00:30
timotimo i often use github's gist, but anything is fine 00:31
BooK paste.scsys.co.uk/523600
MasterDuke_ m: my $*TOLERANCE = .1; say .9 =~= 1
camelia rakudo-moar 2126ed: OUTPUT«False␤»
MasterDuke_ m: my $*TOLERANCE = .1; say 1.1 =~= 1
camelia rakudo-moar 2126ed: OUTPUT«True␤»
MasterDuke_ is ^^^^ expected behavior? 00:32
BooK the code that fails is using the second new
AlexDaniel m: my $*TOLERANCE = .1; say .90001 =~= 1
camelia rakudo-moar 2126ed: OUTPUT«True␤»
sortiz BooK, yep, as timotimo says, that bless worries me 00:33
AlexDaniel m: my $*TOLERANCE = .1; say .90000 =~= 1
camelia rakudo-moar 2126ed: OUTPUT«False␤»
timotimo yeah, when you run that bless, it won't do the necessary setup for the rest of the Version object at all
AlexDaniel MasterDuke_: I'd be interested to see somebody who expected that
timotimo because you're not giving it anything for those values
sortiz So $!parts is Mu. 00:33
BooK so it should do something like the one above 00:34
MasterDuke_ yeah, it doesn't like what i'd expect
timotimo also, i thought in a recent-ish moarvm version i added a piece of extra output for the "with p6opaque representation" thing 00:34
looks like i missed that one
AlexDaniel bisect: my $*TOLERANCE = 0.1; say .9 =~= 1
bisectable AlexDaniel: on both starting points the exit code is 0 and the output is identical as well
BooK so, dropping that broken new runs 12000+ tests instead of 500 :-) 00:35
MasterDuke_ the implementation of =~= has only changed once
timotimo found it, added it.
MasterDuke_ TimToady created it, and then modified it shortly after
timotimo Cannot iterate object with P6opaque representation (Mu) 00:36
^- this would probably have helped immediately
BooK not sure why there's this Str $s is there, I'll just put $v
MasterDuke_ also, why do i have an '_' after my name? pretty sure i didn't type that
timotimo it often happens that you disconnect from your internets, and your old connection stays until it ping-timeouts and blocks the nick you had 00:37
BooK so your client picked it up 00:37
timotimo then, when the server tells your client "that nick is already in use" it'll fallback, usually by adding a number or _ to the name
AlexDaniel MasterDuke_: please do something about it
Zoffix MasterDuke_, it picks max, which is why there's a difference. 00:38
MasterDuke_ yeah, i see why it's doing that, don't know how intentional it is though
Zoffix I'd bet on intentional: en.wikipedia.org/wiki/Relative_cha...difference 00:39
MasterDuke_ seems like changing 'abs($a - $b) < ($a max $b) * $tolerance' to 'abs($a - $b) <= ($a max $b) * $tolerance' would "fix" it
Zoffix m: use Test; is-approx .9, 1, :rel-tol<.1> 00:40
camelia rakudo-moar 2126ed: OUTPUT«ok 1 - ␤»
MasterDuke_ nice, i was googling for all sorts of things but never came up with relative change
Zoffix MasterDuke_, you may be right 00:40
Unless I'm really bad at math, I've used the same algo in is-approx 00:41
hmmm
AlexDaniel but this tolerance is not absolute, hmm
Zoffix m: say 2 ≅ -2 00:42
camelia rakudo-moar 2126ed: OUTPUT«True␤»
Zoffix bug \o/
MasterDuke_ for absolute it's 'abs(a.Num - b.Num) < $tolerance'
AlexDaniel Zoffix: /o\
Zoffix missing abs
m: say -∞ ≅∞ 00:43
camelia rakudo-moar 2126ed: OUTPUT«False␤»
Zoffix m: say -1e100 ≅ 1e100
camelia rakudo-moar 2126ed: OUTPUT«True␤»
Zoffix giggles
I'll submit a PR
AlexDaniel m: my $*TOLERANCE = 0.1; say 95 =~= 100
camelia rakudo-moar 2126ed: OUTPUT«True␤»
AlexDaniel I'm not sure if I understand it
BooK thanks timotimo, sortiz and AlexDaniel 00:44
Zoffix m: say 100*.1 < 5
camelia rakudo-moar 2126ed: OUTPUT«False␤»
Zoffix m: say 100*.1
camelia rakudo-moar 2126ed: OUTPUT«10␤»
AlexDaniel so 0.1 is basically 10% 00:45
Zoffix Ah, the >
AlexDaniel, right, 10% of max, which is 10, they can differ by 10, so 90 ^..^ 110 will give True
AlexDaniel Zoffix: um 00:46
Zoffix ?
AlexDaniel 10% of 110 is something different
BooK so $*TOLERANCE is multiplicative and the initial issue was that .9 + .9*.1 == .99
AlexDaniel which is why this works 00:47
m: my $*TOLERANCE = 0.1; say 111 =~= 100
camelia rakudo-moar 2126ed: OUTPUT«True␤»
Zoffix AlexDaniel, right, when RHS is 100, left one can be 90 ^..^ 110
BooK m: my $*TOLERANCE = 0.1; say .9 =~= 1, 1 =~= .9;
camelia rakudo-moar 2126ed: OUTPUT«FalseFalse␤»
Zoffix AlexDaniel, oh, I see what you mean
Yeah, it'd pick the bigger one
BooK ok, so I misunderstood too :-)
MasterDuke_ m: say (90 ^..^ 110).map( {my $*TOLERANCE = .1; $_ =~= 100} ) 00:48
camelia rakudo-moar 2126ed: OUTPUT«(True True True True True True True True True True True True True True True True True True True)␤»
Zoffix m: say (90 ^..^ 120).map( {my $*TOLERANCE = .1; $_ =~= 100} )
camelia rakudo-moar 2126ed: OUTPUT«(True True True True True True True True True True True True True True True True True True True True True False False False False False False False False)␤»
Zoffix It uses $*TOLERANCE * 100 percent of the largest value 00:49
AlexDaniel m: my $*TOLERANCE = 0.1; say 111.1111111 =~= 100
camelia rakudo-moar 2126ed: OUTPUT«True␤»
AlexDaniel m: my $*TOLERANCE = 0.1; say 111.1111112 =~= 100
camelia rakudo-moar 2126ed: OUTPUT«False␤»
AlexDaniel ok, so =~= compares the numbers magically. You can't tell what's going to happen off the top of your head 00:50
timotimo yup 00:51
That's A Feature™
Zoffix It compares relative diff. ¯\_(ツ)_/¯ 00:53
MasterDuke_ but it's currently not very well documented
sortiz m: 00:54
AlexDaniel MasterDuke_: by “not very well documented” you mean not documented at all?
MasterDuke_ =~= and ≅ are in the unicode <-> texas table, but that's it 00:55
sortiz dinner&
MasterDuke_ not in the operator docs
i've thought about writing something up, but wanted to clarify the expected behavior first 00:57
AlexDaniel github.com/perl6/doc/issues/601
MasterDuke_ i also have some more tests written in my repo, but again, wanted to make sure i tested the "right" behavior 00:59
Zoffix m: "&[wat]" 01:04
camelia rakudo-moar 2126ed: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing infix inside []␤at <tmp>:1␤------> 3"&[7⏏5wat]"␤ expecting any of:␤ double quotes␤ infix␤ infix noun␤ infix stopper␤ term␤»
Zoffix Was it it doing?
AlexDaniel m: say "&[-](5, 2)" 01:06
camelia rakudo-moar 2126ed: OUTPUT«3␤»
AlexDaniel dunno
Zoffix m: "&say('meow')"
camelia rakudo-moar 2126ed: OUTPUT«meow␤»
Zoffix I see
Hotkeys is there a way to create a regex from a string? 01:07
Zoffix m: my $str = '\w+'; my $regex = rx/<$str>/; say 'foo bar ber' ~~ $regex 01:08
camelia rakudo-moar 2126ed: OUTPUT«True␤»
Zoffix .o( True? Where's the match :/ )
m: my $str = '\w+'; my $regex = rx/<$str>/; my $m = 'foo bar ber' ~~ $regex; say $m
camelia rakudo-moar 2126ed: OUTPUT«True␤»
Zoffix m: my $str = '\w+'; my $regex = rx/<$str>/; my $m = 'foo bar ber' ~~ /$regex/; say $m
camelia rakudo-moar 2126ed: OUTPUT«「foo」␤»
Zoffix There we go 01:09
m: my $str = '\w+'; say 'foo bar ber' ~~ m:g/<$str>/
camelia rakudo-moar 2126ed: OUTPUT«(「foo」 「bar」 「ber」)␤»
Hotkeys ah cool
m: my @foo = ["foo", "bar", "baz"]; my $pattern = @foo.join("|"); say "bar" ~~ rx/<$pattern>/ 01:10
camelia rakudo-moar 2126ed: OUTPUT«「bar」␤» 01:11
Hotkeys m: my @foo = ["foo", "bar", "baz"]; my $pattern = @foo.join("|"); say "bam" ~~ rx/<$pattern>/
camelia rakudo-moar 2126ed: OUTPUT«Nil␤»
Hotkeys neato
ty Zoffix
Zoffix m: my @foo = ["foo", "bar", "baz"]; say "bam" ~~ /@foo/
camelia rakudo-moar 2126ed: OUTPUT«Nil␤»
Zoffix m: my @foo = ["foo", "bar", "baz"]; say "baz" ~~ /@foo/
camelia rakudo-moar 2126ed: OUTPUT«「baz」␤»
Zoffix Hotkeys, ^
Hotkeys oh
Zoffix (note that in my version, the contents of @foo are evaluated as strings, without any regex meta chars 01:12
)
Hotkeys m: my @foo = ["foo", "bar", "baz", "bazz"]; say "bazz" ~~ /@foo/
camelia rakudo-moar 2126ed: OUTPUT«「bazz」␤»
AlexDaniel 95 \o/ 01:14
timotimo windows 95?
AlexDaniel no, 95 doc issues 01:15
Zoffix I got 99 problems but a doc ain't one. 01:16
johnjohn101 is the perl 6 project for .net dead? 02:10
AlexDaniel johnjohn101: you mean niecza? Yeah 02:17
dalek c: 6b0b678 | (Zoffix Znet)++ | doc/Language/testing.pod:
Make it clearer cmp-ok can take a Callable
02:50
lizmat . 02:59
yoleaux 16 Jun 2016 14:32Z <FROGGS> lizmat: this describes ac0dcdd very well: github.com/rakudo/rakudo/blob/nom/...angeLog#L9
lizmat FROGGS: thanks
dalek c: 9307750 | (Zoffix Znet)++ | doc/Language/testing.pod:
Expand/Clarify/Reword cmp-ok section
03:02
dalek c: 71c3efb | (Zoffix Znet)++ | doc/Language/testing.pod:
Minor clarifification of Str form of throws-like
03:49
buharin hi :-) 04:49
nine ugexe: why did you close PR 729? 06:49
buharin hey I find bug in documentation 07:24
grondilu tell us 07:25
buharin I was trying to figure what sign // mean
I looked for // infix 07:26
and here it is
doc.perl6.org/routine/%2F%2F
masak or "and here it isn't" :) 07:27
grondilu I'm not too surprised
buharin if I am trying to find something which is not exist I see error 404 no exist yet or something
but it looks like bugged url 07:28
grondilu using literal slashes in an url is probably a bad idea anyway
doc.perl6.org/language/5to6-perlop...Defined-Or
^here's what you were looking for 07:29
buharin anyway what does infix // mean is it somekind of or
buharin m: say "HELLO" 07:30
camelia rakudo-moar 70c19d: OUTPUT«HELLO␤»
buharin m: $*FOO // 'foo'
camelia ( no output )
grondilu m: say $foo // "bar"
camelia rakudo-moar 70c19d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$foo' is not declared␤at <tmp>:1␤------> 3say 7⏏5$foo // "bar"␤»
grondilu oops
buharin m: say "$*FOO // 'foo'"
camelia rakudo-moar 70c19d: OUTPUT«Dynamic variable $*FOO not found␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
grondilu m: say my $ // "bar"
camelia rakudo-moar 70c19d: OUTPUT«bar␤»
buharin m: my $*FOO = 'suck'; say "$*FOO // 'foo'" 07:31
camelia rakudo-moar 70c19d: OUTPUT«suck // 'foo'␤»
grondilu notice that it's "defined or" not "declared or"
buharin ya I see 07:32
but I don't know why we need // not just or
m: my $*FOO = 'suck'; say "$*FOO || 'foo'"
camelia rakudo-moar 70c19d: OUTPUT«suck || 'foo'␤»
buharin m: say "$*FOO || 'foo'"
camelia rakudo-moar 70c19d: OUTPUT«Dynamic variable $*FOO not found␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
grondilu // is most often used with =
sub f { state $ //= do-stuff } 07:33
^very common idiom for caching
buharin grondilu: oh okay it is the same as or but additionaly you can add =
grondilu $foo //= $bar means $foo = $foo // $bar 07:35
C-style combination of binary operator, as in +=, *= etc 07:36
buharin yaya I understand
buharin m: @a = 1 ... 4 07:47
camelia rakudo-moar 70c19d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@a' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5@a = 1 ... 4␤»
masak random poll: if Python had a `my`-like keyword, how would it be spelled?
buharin m: my @a = 1 ... 4
camelia ( no output )
buharin m: my @a = 1 ... 4; say @a 07:48
camelia rakudo-moar 70c19d: OUTPUT«[1 2 3 4]␤»
buharin m: my @a = 1 ... *; say @a
camelia rakudo-moar 70c19d: OUTPUT«[...]␤»
masak buharin: you can also privmsg with camelia, to avoid noising the channel with partial results
buharin m: my @a = 1 ... *; say @a[3]
camelia rakudo-moar 70c19d: OUTPUT«4␤»
buharin m: my @a = 1 ... *; say @a[100]
camelia rakudo-moar 70c19d: OUTPUT«101␤»
buharin masak: okay :) 07:49
I got a deal to you masak
masak a deal? are you a Nigerian prince with lots of gold that needs to be transferred internationally? 07:50
buharin masak: unfortunately no :( 07:51
masak: just want to ask if it is good method, to copy API but provide own implementation while transfering Python lib to Perl 07:52
masak depends, I guess
have you considered working test-first?
buharin masak: ye, testing small parts of code is obligatory 07:53
DrForr What I did with Dancer2 was to just take the test files, add :from<Perl5> to the package names and then convert the perl5 tests to perl6.
I don't know if Inline::Python works similarly, but it'd be worth a look. 07:54
buharin no I don't want to use Inline Python 07:56
andreoss m: my @fs = find(dir => '/'); for @fs -> $f { say $f ; last }
camelia rakudo-moar 70c19d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ find used at line 1␤␤»
andreoss m: use File::Find; my @fs = find(dir => '/'); for @fs -> $f { say $f ; last }
camelia rakudo-moar 70c19d: OUTPUT«===SORRY!===␤Could not find File::Find at line 1 in:␤ /home/camelia/.perl6␤ /home/camelia/rakudo-m-inst-1/share/perl6/site␤ /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤ /home/camelia/rakudo-m-inst-1/share/perl6␤ CompUnit::Re…»
buharin I want to rewrite something 07:56
with saving actual API
I think also that Inline Python will be slow as fuck 07:57
DrForr It may be, but at least you wouldn't have to rewrite the entire Flask (or whatever) stack at once. 07:58
buharin DrForr: I should try first I think 08:00
andreoss is File::Find supposed to be lazy?
DrForr Good luck eating that elephant.
andreoss why is it so slow? 08:01
andreoss how to make IO::Handle.lines to work like cat rather than tail? 09:11
andreoss *like tail rather than cat 09:15
andreoss > my $h = "uni.txt".IO.open; $h.seek(10); $h.lines.elems 09:23
Malformed UTF-8
nine I think .seek works in terms of bytes, not characters 09:27
andreoss what should i use in this case? 09:29
DrForr .seek(0); .readchars(10); # ? 09:31
Though a .seekchars analogous to .readchars would be nice. 09:32
andreoss .readchars would read the file
DrForr In UTF-8 you can't advance the file pointer by 10 characters without knowing what each character is. 09:33
DrForr Remember that UTF-8 isn't fixed-width. 09:33
DrForr Characters can be anything up to 4 bytes, and when you consider combining characters they can be practically any length. 09:35
dalek c: 1ad7597 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod:
improve capture parameters
09:36
andreoss > loop { try { $h.getc(); last ; CATCH { default { $h.seek(1, SeekFromCurrent) } } }} 09:39
will this even work? 09:40
seems not 09:42
dalek c: 79b198d | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod:
add coercion types to signature
10:07
c: 85c37a8 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod:
add long names to signature
10:30
c: ae72862 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod:
signatures can be smart matched against a list
gfldex i am confident we will have complete docs shortly after Christmas 10:32
RabidGravy does anyone else get this kind of stuff ? github.com/jonathanstowe/TermReadKey/issues/11 10:49
gfldex m: my %h = left => 1, right => 2; say %h ~~ :(Hash $top ($left, $right) ); 10:50
camelia rakudo-moar 70c19d: OUTPUT«False␤»
gfldex m: my %h = left => 1, right => 2; say %h ~~ :(%top ($left, $right) );
camelia rakudo-moar 70c19d: OUTPUT«False␤»
RabidGravy I have written/maintained/distributed quite a lot of software over the years and Term::ReadKey is almost unique in that I spend more time addressing the license than actively working on the software
gfldex m: my %h = left => 1, right => 2; say %h ~~ :(Any:D $top ($left, $right) ); 10:52
camelia rakudo-moar 70c19d: OUTPUT«False␤»
gfldex jnthn: should that match?
AlexDaniel gfldex: the graph here is amazing github.com/perl6/doc/graphs/contributors 10:54
gfldex #3 is in reach :) 10:54
gfldex m: my %h = left => 1, right => 2; say %h ~~ :(Any:D $top (:$left, :$right) ); 10:56
camelia rakudo-moar 70c19d: OUTPUT«False␤»
gfldex m: my %h = left => 1, right => 2; say %h ~~ :(%top (:$left, :$right) );
camelia rakudo-moar 70c19d: OUTPUT«False␤»
psch m: my %h = left => 1, right => 2; say \(%h) ~~ :(%top (:$left, :$right) ); 10:57
camelia rakudo-moar 70c19d: OUTPUT«True␤»
psch hm 10:57
gfldex ACCEPT for Signature seams to be lacking, unless there are nasty side effects 10:58
psch m: my %h = left => 1, right => 2; say \(%h) eqv %h.Capture 10:59
camelia rakudo-moar 70c19d: OUTPUT«False␤»
psch so, Signature.ACCEPTS(%topic) calls %topic.Capture
but %topic.Capture isn't eqv to \(%topic)
m: my %h = left => 1, right => 2; say \(%h).perl; say %h.Capture.perl
camelia rakudo-moar 70c19d: OUTPUT«\({:left(1), :right(2)})␤\(:left(1), :right(2))␤»
psch aha
it's slipping 11:00
jnthn gfldex: A Hash, when coerced to a Capture, is a capture of named arguments
psch m: my %h = left => 1, right => 2; say %h ~~ :(:$left, :$right); 11:00
jnthn gfldex: So m: my %h = left => 1, right => 2; say %h ~~ :(:$left, :$right)
m: my %h = left => 1, right => 2; say %h ~~ :(:$left, :$right) 11:01
camelia rakudo-moar 70c19d: OUTPUT«True␤» 11:01
jnthn So, that matches
Ah, psch beat me to it
That's the correct behavior, anyways.
m: my %h = left => 1, right => 2; say \(%h) ~~ :($top (:$left, :$right))
camelia rakudo-moar 70c19d: OUTPUT«True␤»
jnthn That is a Capture with a single positional arg which is a Hash, and it is then coerced to a Capture for unpacking by the nested signature 11:02
dalek c: 3c254d7 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod:
signatures do smartmatch against Hash
11:04
AlexDaniel OK guys, if you have Microsoft Edge installed, please go to doc.perl6.org/type/Proxy#Methods 11:12
and try to reproduce this bug: github.com/perl6/doc/issues/252
AlexDaniel basically if nobody can, then it is probably not an issue on our side 11:15
Woodi why Captures and Signatures are different thing ? any prior art in other language for that ? 11:18
psch Woodi: Captures consist of arguments, Signatures consist of Parameters 11:19
well, Signatures also can consist of Signatures...
gfldex m: my $is-signature(Str $s when * ~~ "Woodi"); # a where clause would not make sense in a capture
camelia rakudo-moar 70c19d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3my $is-signature(Str $s7⏏5 when * ~~ "Woodi"); # a where clause wo␤ expecting any of:␤ constraint␤»
gfldex m: my $is-signature(Str $s where * ~~ "Woodi"); # a where clause would not make sense in a capture 11:20
camelia rakudo-moar 70c19d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤The () shape syntax in variable declarations is reserved␤at <tmp>:1␤------> 3 $is-signature(Str $s where * ~~ "Woodi"7⏏5); # a where clause would not make sense␤ expecting any of:␤ co…»
gfldex m: my $is-signature = :(Str $s where * ~~ "Woodi"); # a where clause would not make sense in a capture
camelia ( no output )
Woodi to me just same thing named differently on two sides of routine...
psch but they clearly are not 11:21
psch i mean, the fact they exist on different sides of the routine already is a difference, isn't it? 11:21
Woodi "where" makes new type or subtype, so can be just: my Int $x where < 0; so on Capture side...
psch that's a declaration, which is closer to a Parameter than an Argument 11:22
Woodi psch: but it's just memcpy(struct)...
psch Woodi: and .map(&sub) is just goto..?
Woodi psch: no, it is for :)
psch ah, but for is while is goto 11:23
Woodi ok, then it's goto :)
psch that kind of thinking doesn't help, fwiw
like, a class can be translated to a struct with function pointers 11:24
but conceptionally they are not the same
Woodi I just don't see (so far) difference in Sig and Capture
psch Woodi: well, one is declarative, the other is a collection of values 11:24
m: say :($foo, :$bar) # no "Variable ... is not declared" 11:25
camelia rakudo-moar 70c19d: OUTPUT«($foo, :$bar)␤»
psch m: say \($foo, :$bar) # yes "Variable ... is not declared"
camelia rakudo-moar 70c19d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$foo' is not declared␤at <tmp>:1␤------> 3say \(7⏏5$foo, :$bar) # yes "Variable ... is not ␤»
psch or "collection of known symbols", probably
Woodi hmm... looks VERY similiar... 11:26
psch "uint8 x" and "int8 x" also look VERY similar vOv
eh, "int8* x" is probably the better second example :) 11:27
AlexDaniel ok, Edge bug was reproduced 11:28
Woodi psch: here you clearly have two different things just looking similiar. Captures and Signatures *are* same thing to me, just used a bit different...
psch Woodi: they are not the same thing, you just don't want to recognize the difference 11:29
Woodi: they just look similar to you and thus you decide they must be the same
Woodi psch: ok, I'm convinced to read some more docs :)
BrokenRobot the bug is using Edge :p 11:30
nine Woodi: the relation is a bit like Class and Object
AlexDaniel BrokenRobot: please take a look at this: github.com/perl6/doc/issues/229
Woodi nine: ah, maybe "reusability" part make me to thinking wrongly...
AlexDaniel BrokenRobot: is it still relevant? 11:31
BrokenRobot Closed. Thanks. The current docs are accurate (updated last night) 11:32
AlexDaniel good.
BrokenRobot (and the mentioned bug also fixed last night)
AlexDaniel Zoffix++ 11:33
psch probably got a bit too heated there :| 11:34
Woodi one more thing, CPU have interrupts for hardware and traps/exceptions for errors in program... maybe exceptions in high level languages should use that CPU exceptions ? I wonder if current "exceptions" wasn't initially planned to use CPU traps... 11:51
buharin hello my friends :) 11:54
Woodi czesc :) 11:56
buharin Woodi: polish? 12:03
Woodi yhy :) 12:08
buharin me too 12:12
how do you know that I am from Poland? 12:13
;d
Woodi buharin: I remember you saying that #here :) 12:16
masak .oO( how do you know that I have some polish? ) 12:35
Woodi yesterday's XKCD: option -R - run recursively on * ;)
Xliff Woodi: Option -y Yikes! 12:44
dalek c: db08a29 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod:
more index entries for Signature
12:46
c: af3764b | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod:
change word for consistency
c: 8ac1521 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod:
more index entries for Signature
geekosaur [17 11:51] <Woodi> one more thing, CPU have interrupts for hardware and traps/exceptions for errors in program... maybe exceptions in high level languages should use that CPU exceptions ? I wonder if current "exceptions" wasn't initially planned to use CPU traps... 13:42
geekosaur on the one hand yes, on the other this is the thinking that got older Windows GPFs 13:42
geekosaur on the gripping hand there are languages (python, tcl, perl 6, ...) where exceptions have turned into "normal" flow control. and this is one reason you find older programmers who aren't comfortable with those languages 13:47
hahainternet is that really an accurate summary of 'exceptions as flow control'? 13:48
geekosaur I'm not quite certain how to answer that 13:52
it sounds backwards from the intent
hahainternet geekosaur: my point is, what is there in common between python and tcl with regard to flow control? the existence of try/catch? 13:53
geekosaur take a look at return(n)
hahainternet what about it? 13:54
that would suggest a closer comparison with C, rather than Python
in fact TCL sets a number of global variables when an error occurs, reminiscent of errno
timotimo errno was a big mistake :) 13:55
geekosaur you may be being confused by the fact that tcl kinda reduces everything to the tiniest possible footprint, so all control exceptions are variations of `return`
timotimo ("error: success")
jast given the alternatives, errno wasn't so bad 13:55
hahainternet geekosaur: how is TCL_ERROR any different than returning -1 from C functions? 13:56
geekosaur it's not. but that's not the comparison
hahainternet well that's what i'm asking, i'm a little confused by your comparison
geekosaur the comparison is to raise() / longjmp() / signals
which are modeled after, and often directly mapped to, hardware traps 13:57
hahainternet ok, but tcl doesn't have 'raise', it won't jump outside of the return or called function
but both python and perl6 will
meh, i don't want to argue :)
just wanted to understand your position a little more
i'm still a big fan of Go's error handling tbqh, i enjoy it
geekosaur right, but that means that like any other system that uses exceptions as normal flow control, it needs to do stack unwinding and it lives or dies by how efficient that is 13:58
geekosaur it seems to me you have focused on the wrong part of my point 13:59
if you want a better idea of what I'm getting at, go look at the history of perl 5's signal handling --- which is in many ways a history of trying to make a hardware trap-oriented system behave like control exceptions 14:00
hahainternet i quite like the Mill's concept of exceptions 14:01
hahainternet but that's neither here nor there 14:01
geekosaur the two concepts are actually quite different and you will always have an impedance mismatch somewhere when trying to conflate them
hahainternet and not really valuable for #perl6 :) 14:02
geekosaur and Woodi's musing sounds to me like someone from the world of control exceptions noticing the "odd parallel" between exceptions and hardware traps 14:05
Woodi geekosaur: about perl5 part: I think traps should go straight into threads :) 14:06
timotimo unix signals are already exposed as a Supply 14:07
Woodi but looks GPF is still used in Windowses... thing look like we don't use half of the CPU but also signals+threads are... FUN :) 14:09
also I have impression that signals in C are somewhat/somehow limited&obscure...
geekosaur that is how they look if you are oriented toward exceptions being flow control, yes 14:10
Woodi geekosaur: exactly, I was just sniffing for parallels :)
geekosaur but in C exceptions are explicitly analogous to hardware traps because Unix signals are hardware traps reflected to user code 14:11
timotimo waaaait a minute, you consider that flow control? 14:12
geekosaur ...
I think you just proved my point
which is that it is NOT flow control 14:13
Woodi btw. epolls probably use signals and that makes them faster... so I am thinking about general usage
geekosaur: hardware -> interrupts; signals/traps -> fast communication (maybe) 14:14
geekosaur but the "modern" concept of exceptions thinks exceptions are naturally flow control and this leads to breakage when interacting with older exceptions, which are explicitly not flow control but modeled after hardware traps
no
...
mnever mindf
the wall remains up
maybe grows even taller
Woodi geekosaur: however you are probably right I think you are thinking in single threaded style... 14:15
geekosaur you still sound like someone trying to fit the older system into their tidy modern conceptions that do everything they can to hide the nasty ugly realities of hardware 14:16
geekosaur Woodi, hardware doesn't know about threads either 14:16
Woodi ok, OS know
geekosaur and again this same impedance mismatch between the hardware view and the software view, where from the standpoinr of hardware modern software goes through insane gyrations to cover up the asynchronous reality and make it all look pretty 14:17
the problem being that, in the end, the pretty has to run on hardware 14:18
Woodi geekosaur: oki, need to think/read a bit on that. but I have some other theory to be potentially shooted down :) 14:20
what if CPU manage objects ? some malloc evolution ? :) 14:21
jnthn Woodi: I think some of the Java bytecode hardware implementations might have gone in that direction...but it's been a long time since I read anything on that. 14:22
geekosaur arguably jvm / clr / moar style virtualization has as a large point trying to produce "hardware" exceptions that behave like software flow control.. .which means the impedance mismatch is pushed down to the level where *you're* the one fighting with it :) 14:24
b2gills The problem is interrupts can interrupt a VM in the middle of running a single opcode
Woodi I just thinking what Alan Kay said: software is generalized and then should go into hardware... from that point we have very tragic computers stagnation...
b2gills I would love to see hardware that can handle String{*start,length} as a native type 14:26
jnthn It feels to me that trying to push complex operations into hardware hasn't really worked out so well... Even x86/x64 with relatively complex instructions is actually translated into simpler microcode in hardware for efficient execution.
geekosaur yep 14:27
jnthn Arguably it may be possible to say it's worth the trade-off 'cus you get smaller machine code by avoiding repeated sequences.
b2gills Some of the complex instructions were added to make it easier for assembly writers, and then never removed like the BCD instructions
jnthn But I've no idea if that argument holds any water whatsoever :)
geekosaur you sometimes see the claim that the battle between CISC and RISC hardware architecture was won by CISC, but the reality is both won; modern CISC is built on top of RISC 14:28
jnthn heh, I've been more exposed to the claim it was won by RISC :P
johnjohn101 is rakudo perl the only way to get perl 6 on linux?
b2gills Rakudo Perl 6 is the only way to get Perl 6 anywhere currently 14:29
Except for some out of date implementations 14:30
johnjohn101 so i have to install from source right now?
b2gills I use rakudobrew which makes it simple
hahainternet johnjohn101: yah just use rakudobrew, it is the easiest option
geekosaur you can find it in some package managersm but rakudo's been moving fast enough that most such are out of date at best
hahainternet surprisingly quick to compile on my old-ass machine too
El_Che or a docker image
johnjohn101 i was watching larry wall's presentation, wow, perl 6 is neato 14:31
hahainternet johnjohn101: which one?
El_Che johnjohn101: or maybe Larry is just a good speaker :)
johnjohn101 let me get the link
hahainternet El_Che: it can be both!
johnjohn101 was interesting that he did his whole presentation in vi
www.youtube.com/watch?v=kwxHXgiLsFE this is the presentation 14:32
b2gills perl6.org/downloads/
hahainternet johnjohn101: ah yes i remember this one :) 14:33
johnjohn101 b2gills: what is the executable called? p6? i have a perl 5 enviroment i dont' want mucked with
hahainternet johnjohn101: perl6 14:34
johnjohn101 hahainternet: larry wall is really really good at explaining why things are the way they are
b2gills we keep them separate because they are both active projects
hahainternet johnjohn101: i'm sure he'll be pleased to hear you say that
geekosaur jnthn, and from that level I would say that RISC only won at the lowest level; the problem, the same one missed by the IA64 folks, is that everyone working at higher levels wants the dirty stuff hidden as much as possible, so you end up with CISC wrappers around the RISC implementations.
Woodi jnthn: eg. AMD vs Intel: on one calculational benchmark AMD was much better; then Intel made AES in hardware and won benchmark :) so hardware is worth it. and I think objects can be treated as some protected memory part...
hahainternet Woodi: it's a lot more complicated than that 14:35
'protected memory part' sounds nice and simple
but if you look at the costs involved compared with more 'traditional' methods
johnjohn101 hahainternet: i'm sure the moarvm is getting more optimized all the time?
b2gills The main reason for CISC on X86 is for complete backwards compatibility, it still starts up in 16bit mode for example
hahainternet you'll see why CPU design is in a bind
johnjohn101: indeed, jnthn blogs quite regularly with impressive details
geekosaur (Which is almost exactly the same principle going on as hardware trap exceptions vs. software flow control exceptions. Hide/abstract away the ugly parts that have to deal with reality so higher levels can pretend it doesn't exist)
Woodi hahainternet: but CPU are so _bored_ in last decades ! :) 14:36
geekosaur Intel has CPUs that don't start in 16 bit mode now
this is why they're pushing UEFI so hard
hahainternet Woodi: I really like the ideas behind Mill, but a lot of people who know facts about real implementations seem to think it's vapourware. I don't know enough to make a positive judgement
geekosaur BIOS *must* start in 16 bit. UEFI lets them start in native mode
hahainternet geekosaur: you know, that's a funny thing, that if someone had thought to standardise an open bios 30 or 40 years ago, the whole computing world might be very different 14:37
but as it stands, every motherboard is full of a dodgy hacky version of some uefi monstrosity that barely functions and just about boots windows
geekosaur you might think, yes. but then that whole thing is a downright weird bit of history
b2gills Even more reason for me to keep old computers around
jnthn geekosaur: Yeah, I'd agree with that. I guess tthe place I studied compsci had ARM pretty close by, so... ;-)
hahainternet indeed, the clone wars is a good name :D 14:38
Woodi geekosaur: killing BIOS would be such bad if only UEFI wasn't OS on its own :)
geekosaur ...
it doesn't have much choice in the matter
same impedance mismatch again
hahainternet: IBM never did quite understand how they managed to shape an entire industry that they neither understand nor particularly want to deal with 14:39
geekosaur the IBM PC was intended to keep Apple II and CP/M machines out of their customers' shops. instead it started a revolution which led pretty much led to the opposite of their intentions 14:40
Woodi geekosaur: so... PC are just too cheap ??? ;) 14:41
geekosaur ...a revolution which ended up being shaped very oddly because everyone followed IBM even though IBM was pushing the opposite direction, trying to prevent that revolution from disturbing their prize market
well, at lleast this is a *different* impedance mismatch :) IBM had one goal: keep their fortune 50 customers, which have always been their primary market where all the real money comes from, 100% IBM 14:43
from IBM's POV the small computer market standardizing on the IBM PC was an utter disaster 14:44
b2gills Which explains why they sold of the Thinkpad to Lenovo
jnthn Where those two events some decades apart? :) 14:45
hahainternet 8 mins 30 secs to do build moar, on an ancient overloaded core2duo
that's very respectable
Woodi b2gills: I don't think so... IMO they know tablets are coming... same for selling disks for Hitachi 14:46
jnthn hahainternet: clang or gcc? :)
hahainternet jnthn: gcc i expect unless clang is default now 14:47
jnthn hahainternet: oh wait, is that for all Rakudo/NQP/Moar?
hahainternet debian testing, nothing special passed
that's for all i believe
geekosaur ...and from the standpoint of "rational design" that standardization looks completely bizarre, because IBM was pushing in the direction of a closed, limited market and designing hardware toward that goal, and the small computer market then took that and built open structures around it. and IBM sticking to the older hardware compat, mostly to (a) try to get the new kids to go away and (b) to suit F50 companies actively avoiding change as disruptiv
e, caused the weirdly following small computer market to build newer stuff around that older core
jnthn Ah, OK. I thought you meant 8 mins 30 secs just for MoarVM. :)
And clang (or some versions of) take forever over interp.c
hahainternet jnthn: tbqh that would be perfectly reasonable too, under 10 minutes for compiling a compiler is excellent
i should try it on my fast machine but it's currently set for average speed, not single core performance 14:48
it's fast enough regardless
geekosaur you see this in other areas too, OS/2 was intended to keep Windows from getting into those all-IBM F50 shops and IBM had a collective heart attack when OS/2 v3 became popular. 14:49
jnthn hahainternet: Nice that something is! ;) 14:50
geekosaur (people from back then often blame Microsoft for the documented fact that OS/2 sales figures were not published for months after its introduction, despite it flying off the shelves. But it was IBM who refused to provide the sales figures, both because they had no interest in that market and because OS2 product support was initially managed by their mainframe division, which was absolutely *terrified* by OS/2 sales to non-mainframers.)
hahainternet jnthn: almost everyting about perl6 is so intensely satisfying, i only wish i could write more
johnjohn101 woohoo, perl6 on my machine!! 14:52
perlpilot johnjohn101: congratulations :) 14:59
geekosaur (so then IBM went the other direction with Smalltalk and *again* lost the bet; having successfully removed it from non-IBM shops, they couldn't find anyone who could program in it any more)
(which is why they're so big into Java now) 15:00
dalek c: 2776b19 | (Steve Mynott)++ | doc/Language/faq.pod:
import Patrick Michaud's suggested answer as-is
c: 33e9753 | (Steve Mynott)++ | doc/Language/faq.pod:
simplify answers
c: 8ebe4d4 | (Steve Mynott)++ | doc/Language/faq.pod:
add another question
dalek c: 00fb6d4 | (Brad Gilbert)++ | doc/Language/faq.pod:
s/Haskall/Haskell/
15:12
stmuk oops 15:19
BrokenRobot oops? :) 15:20
geekosaur the typo, presumably :p 15:22
dalek line-Perl5: 92ba648 | jnthn++ | lib/Inline/Perl5.pm6:
Not all control exceptions are warnings.

This was potentially a problem before, and is certainly one now that return is done as a control exception too.
15:25
line-Perl5: 081597d | lizmat++ | lib/Inline/Perl5.pm6:
Merge pull request #64 from jnthn/master

Not all control exceptions are warnings.
BooK ok, I'm stupid: given @a and @b, how do I do the perl6 equivalent of push @a, @b 15:54
moritz @a.append(@b) 15:55
perlpilot @a.append: @b
BooK I end up with [ 1,2, (3,4) ] when I really want [1,2,3,4]
BrokenRobot my @a = ^2; my @b = ^4; @a.append: @b; say @a; @a.push: @b; say @a 15:56
m: my @a = ^2; my @b = ^4; @a.append: @b; say @a; @a.push: @b; say @a
camelia rakudo-moar 5ca43c: OUTPUT«[0 1 0 1 2 3]␤[0 1 0 1 2 3 [0 1 2 3]]␤»
perlpilot BooK: you could also do. @a.push: |@b
BrokenRobot BooK: ^ .push adds single-item
perlpilot BooK: or "append @a, @b" or "push @a,|@b" if you like that syntax. 15:58
perlpilot overheard in conversation at $work just now: A: What we need to do is re-write <thing> in Perl 6. B: I would be so happy with that! 16:04
BrokenRobot :o 16:05
perlpilot the only thing preventing that from happening seems to be that Rakudo isn't quite fast enough.
BrokenRobot Was person B you? :)
perlpilot no, I was not in this conversation.
(But I would be happy if we rewrote stuff in Perl 6)
mst perlpilot: if it's currently perl5, throw Moops at it to get as much shiny as is safe on the old VM 16:09
Xliff I wanna work at the same $work as perlpilot. 16:10
perlpilot mst: We're already using Moops and it's Moops weirdness that's causing problems.
mst ah
personally, I've been sticking with Moo+Type::Tiny+(maybe)Function::paramaters 16:11
perlpilot: also, I don't recall anybody asking on any of the relevant IRC channels about this
perlpilot: maybe you should teach your coworkers that irc.perl.org exists
perlpilot they know, they just don't IRC much
mst so you're having problems with weirdness in a module and ignoring the support channels in favour of rewriting it in a different language 16:12
perlpilot practically every chance I get I mention to them that IRC is an excellent resource though
mst the fact that it might end up as perl6 is the only part of this story that isn't stupid :P
BooK oh |
so, I managed to fix my code, but it does not look good yet 16:13
at least the 12000 test pass \o/
dalek c: adf23cb | (Steve Mynott)++ | doc/Language/glossary.pod:
another definition for MoarVM
16:27
BrokenRobot m: say 1+\\i 16:37
camelia rakudo-moar 5ca43c: OUTPUT«2␤»
AlexDaniel perlpilot: I don't think that |@b is a good idea 16:49
BrokenRobot How come? 16:50
timotimo if @b is big, you might run into trouble
AlexDaniel ↑ that
BrokenRobot Ah
timotimo m: my @a = 1 xx 1024; my @b; @b.append: |@a
camelia ( no output )
timotimo m: my @a = 1 xx 1024; my @b; @b.append: |@a; say @b.elems
camelia rakudo-moar 5ca43c: OUTPUT«1024␤»
timotimo m: my @a = 1 xx 9999; my @b; @b.append: |@a; say @b.elems
camelia rakudo-moar 5ca43c: OUTPUT«9999␤»
timotimo m: my @a = 1 xx 999999; my @b; @b.append: |@a; say @b.elems
camelia rakudo-moar 5ca43c: OUTPUT«Too many arguments in flattening array.␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: my @a = 1 xx 99999; my @b; @b.append: |@a; say @b.elems
camelia rakudo-moar 5ca43c: OUTPUT«Too many arguments in flattening array.␤ in block <unit> at <tmp> line 1␤␤»
AlexDaniel /o\ ↑ that
BrokenRobot 0.o
timotimo oh, sorry, you meant @b.push: |@a 16:51
but it's the same deal
AlexDaniel github.com/perl6/doc/issues/602 16:53
perlpilot AlexDaniel: For this specific case, it may not be a good idea :) But it's good for people to know about the tool/technique so that they will use it and we (as a community) can figure out "best practices" or if the code can/should be improved, etc. 17:07
perlpilot AlexDaniel++ that was a very good point though 17:08
perlpilot AlexDaniel: btw, it looks like any number bigger than 65534 will cause that message 17:13
BrokenRobot m: say |(1 xx 65555) 17:16
camelia rakudo-moar 5ca43c: OUTPUT«Too many arguments in flattening array.␤ in block <unit> at <tmp> line 1␤␤»
BrokenRobot m: say (1 xx 65555).Slip
camelia rakudo-moar 5ca43c: OUTPUT«(1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...)␤»
BrokenRobot I though | and .Slip were the same? 17:17
s/though/thought/;
timotimo not in argument lists 17:39
RubioTerra Someone: Is there a shorter way to write 'flat @a Z @b'? 17:54
BrokenRobot looks pretty short as it is :P 17:55
RubioTerra yes... but you know, tmtowtdi 17:56
I imagined something like '@a |Z @b' could exist 17:57
BrokenRobot my @a = ^4; my @b = ^6; say @a Z&[prefix:<|>] @b 17:58
m: my @a = ^4; my @b = ^6; say @a Z&[prefix:<|>] @b
camelia rakudo-moar 5ca43c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3 = ^4; my @b = ^6; say @a Z&[prefix:<|>]7⏏5 @b␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ …»
nine jnthn: how's the atmosphere in Chechia now? :)
BrokenRobot m: sub m($a) { say $a.WHAT }; my @a = ^10; m @a.Slip; m |@a 18:01
camelia rakudo-moar 5ca43c: OUTPUT«(Slip)␤Too many positionals passed; expected 1 argument but got 10␤ in sub m at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
BrokenRobot I see 18:02
BrokenRobot m: my @a = ^4; my @b = ^6; say {|@_}(@a Z @b) 18:05
camelia rakudo-moar 5ca43c: OUTPUT«(0 0 1 1 2 2 3 3)␤»
BrokenRobot RubioTerra: that's the shortest I could think of and it's not shorter and certainly not clearer than flat :P
There's Z|, but it makes junctions 18:06
RubioTerra BrokenRobot: thanks 18:07
flat is the way to go, then
AlexDaniel m: my @a = <a b c>; my @b = <1 2 3>; .say for (@a Z@b).map(*.Slip) 18:09
camelia rakudo-moar 5ca43c: OUTPUT«a␤1␤b␤2␤c␤3␤»
AlexDaniel look ma
no flat
BrokenRobot But it's not shorter :) 18:10
Also, how come hyper instead of .map doesn't work? 18:11
m: my @a = ^4; my @b = ^6; say (@a Z @b)».Slip
camelia rakudo-moar 5ca43c: OUTPUT«((0 0) (1 1) (2 2) (3 3))␤»
BrokenRobot m: my @a = ^4; my @b = ^6; say (@a Z @b)».Slip[0].WHAT 18:12
camelia rakudo-moar 5ca43c: OUTPUT«(Slip)␤»
BrokenRobot :S
m: my @a = ^4; my @b = ^6; say @ = (@a Z @b)».Slip
camelia rakudo-moar 5ca43c: OUTPUT«[(0 0) (1 1) (2 2) (3 3)]␤»
BrokenRobot bisect: my @a = ^4; my @b = ^6; (@a Z @b)».Slip[0].^name eq 'Slip' or die 18:18
bisectable BrokenRobot: on both starting points the exit code is 0 and the output is identical as well
BrokenRobot
.oO( how the hell does it check so fast... )
18:19
m: my @a = ^3; @a[1] = slip 2, 3; say @a 18:21
camelia rakudo-moar 5ca43c: OUTPUT«[0 (2 3) 2]␤»
BrokenRobot Oh well. I guess it makes sense
jnthn nine: It got unexpectedly better ;-) 18:25
BrokenRobot m: my @a[4]; @a = (2, 3,4); @a[3] = slip(2, 3); say @a
camelia rakudo-moar 5ca43c: OUTPUT«This type cannot unbox to a native integer: P6opaque, Array␤ in block <unit> at <tmp> line 1␤␤»
[Coke] BrokenRobot: in that case, it only had to run 2 copies, both of which are already compiled.
AlexDaniel yes 18:29
BrokenRobot Well, the two checks on my box take .9s to run, add network latency, and it's kinda creepy that bot replies like... instantly :P 18:30
AlexDaniel 0.172s to run each 18:31
BrokenRobot show off :P 18:32
AlexDaniel I'm also thinking about making it run some code for each commit
that would take like 30s for the latest 1000 commits or so 18:33
AlexDaniel BrokenRobot: actually, it is possible to make it twice faster if I run these checks in parallel :D 18:35
if it was written in perl 6 then it would have been a very easy change… 18:36
BrokenRobot: by the way, how is your IRC::Client module going? 18:37
BrokenRobot heh
AlexDaniel: I think I'm at a point where I need to figure out how to reconnect when one of the servers got disconnected without the client specifically .quit()ting 18:38
And once that's solved, the rest is easy.
Other than tests... tests are annoying
So maybe after the longweekend it'll be done 18:42
(Jul 3)
AlexDaniel BrokenRobot: well, just get the goddamn API stable and I'll be your travis
:) 18:43
hoelzro a peculiarity with sets bit me the other day, and I thought I'd share it with the channel to see if we could have a warning or error or even just educational material to avoid it 18:44
hoelzro I was tracking bad nodes in a grid in a set (my %bad-nodes = Set.new([3, 7], [4, 10])) 18:45
when I wanted to know if a node was bad, I did this: say 'bad' if %bad-nodes{[$x, $y]}:exists;
which did not DWIM
it asked the set if $x or $y was in the set, but since it returns a non-empty list of (False, False), that's always truthy, so *every* node looked bad 18:46
I corrected it to %bad-nodes{$[$x, $y]}:exists, but I'm wondering if there's something we could do to make things easier if users run across this
BrokenRobot Well, it's a slice. There's probably no way to know whether $user wanted a slice or they're checking for a key that's an array 19:18
m: my %bad-nodes = Set.new(3, 7, [4, 10]); dd %bad-nodes<3 7>:exists; 19:19
camelia rakudo-moar 5ca43c: OUTPUT«(Bool::True, Bool::True)␤»
BrokenRobot m: my %bad-nodes = Set.new(3, 7, [4, 10]); my @wat = 3, 7; dd %bad-nodes{@wat}:exists;
camelia rakudo-moar 5ca43c: OUTPUT«(Bool::True, Bool::True)␤»
hoelzro it's odd to me that looking for the existence of a slice is always truthy 19:42
hoelzro I'm wondering if something like (%h{$k_a}:exists, %h{$k_b}:exists) but any(%h{$k_a}:exists, %h{$k_b}:exists) would be a better result for slice existence checks 19:43
BrokenRobot m: my $res = (False, False) but any(False, False); "cool".say if $res 19:47
camelia rakudo-moar 5ca43c: OUTPUT«Unexpected named parameter 'value' passed␤ in block <unit> at <tmp> line 1␤␤»
BrokenRobot interesting
m: my $x = 1 but Junction 19:48
camelia rakudo-moar 5ca43c: OUTPUT«Cannot mix in non-composable type Junction into object of type Int␤ in block <unit> at <tmp> line 1␤␤»
geekosaur doesn't even know what that would mean... 19:49
hoelzro huh, that's...neat. 19:53
b2gills m: my $res = (False, False) but role { method Bool {so self.any} }; say $res; say so $res 19:54
camelia rakudo-moar 5ca43c: OUTPUT«(False False)␤False␤»
Hotkeys m: say "a̩".uninames
camelia rakudo-moar 5ca43c: OUTPUT«(LATIN SMALL LETTER A COMBINING VERTICAL LINE BELOW)␤»
Hotkeys is there a way to split this not by chars but by codes ^ 19:55
Hotkeys m: say "a̩".comb.elems 19:55
camelia rakudo-moar 5ca43c: OUTPUT«1␤»
b2gills m: say "a̩".NFC
camelia rakudo-moar 5ca43c: OUTPUT«NFC:0x<0061 0329>␤»
b2gills m: say "a̩".NFC».chr
camelia rakudo-moar 5ca43c: OUTPUT«(a ̩)␤»
dha So, install tools. would it be safe to say panda is the main install tool (somewhat similar to P5's cpan) while zef and redpanda are somewhat like cpanminus, but not as far along as panda? 19:56
stmuk dha: not quite 19:57
dha ok. How should I revise that? 19:57
dha will be mentioning these things briefly in a talk at YAPC::NA 19:58
stmuk well I'd say panda was the main install tool and zef was the newcomer with a number of better features and more system support
zef for example allows modules to be uninstalled whereas panda doesn't 19:59
conversely, or at least last time I tried, panda had a better search 20:00
dha I do note that zef's description is "It's like [cpanm] wearing high heels with a tracksuit" :-)
stmuk I think zef tends to work better on windows as well 20:01
dha Ah. good to know.
stmuk panda comes with star
[Coke] panda was first to market; I don't think we as a community have really revisited things since. 20:02
I tend to mainly use panda (because star), but zef seems good.
stmuk zef is perhaps more agressively developed and marketed
I don't know anything about redpanda 20:05
dha Ok, so panda - original install tool, included int R*. zef - up and coming competitor, may work better on windows.
redpanda - who knows? 20:06
s/int/in/
Hotkeys I've got a file with a bunch of lone combining characters and the grapheme stuff makes it a pain to split 20:07
jeepers
stmuk redpanda seems a new very small module installer
Hotkeys (because they combine with spaces)
AlexDaniel where's huggable again
dha ok, so... redpanda - lightweight installer
AlexDaniel m: say “p􏿽xCC􏿽x86􏿽xCC􏿽x84􏿽xCD􏿽x92􏿽xCD􏿽x9B􏿽xCC􏿽x81􏿽xCD􏿽x8A􏿽xCC􏿽x8B􏿽xCD􏿽xA3􏿽xCC􏿽xA2􏿽xCD􏿽xA2􏿽xCC􏿽xB7􏿽xCC􏿽x96􏿽xCD􏿽x85􏿽xCC􏿽xA4􏿽xCC􏿽x99􏿽xCC􏿽xAC􏿽xCC􏿽x9E􏿽xCC􏿽x99􏿽xCD􏿽x89􏿽xCD􏿽x95􏿽xCC􏿽xB2􏿽xCC􏿽xBA􏿽xCC􏿽xAE􏿽xCD􏿽x8E􏿽xCD􏿽x96e􏿽xCD􏿽x8C􏿽xCD􏿽x9B􏿽xCC􏿽x90􏿽xCD􏿽xA8􏿽xCC􏿽x8D􏿽xCD􏿽xAC􏿽xCD􏿽xAE􏿽xCC􏿽x91􏿽xCC􏿽x8A􏿽xCD􏿽x9F􏿽xCC􏿽x95􏿽xCD􏿽x99􏿽xCD􏿽x95􏿽xCC􏿽x96􏿽xE2􏿽x80􏿽x8B􏿽xCC􏿽xA5􏿽xCC􏿽x9C􏿽xCD􏿽x9A􏿽xCD􏿽x95􏿽xCC􏿽xA5􏿽xCC􏿽xAE􏿽xCC􏿽xB9􏿽xCD􏿽x93􏿽xCC􏿽xA5􏿽xCD􏿽x87􏿽xCC􏿽xAF􏿽xCC􏿽xAB􏿽xCC􏿽xBA􏿽xCC􏿽xAF􏿽xCC􏿽xB9r􏿽xCC􏿽x85􏿽xCD􏿽xAA􏿽xCC􏿽x8C􏿽xCC􏿽x91􏿽xCC􏿽xBE􏿽xCC􏿽x84􏿽xCD􏿽xAC􏿽xCC􏿽x88􏿽xD2􏿽x89􏿽xCC􏿽xA8􏿽xCD􏿽x9C􏿽xCD􏿽xA2􏿽xCC􏿽xA9􏿽xCC􏿽xAC􏿽xCC􏿽xA4􏿽xCC􏿽xAD􏿽xCC􏿽xB0􏿽xCC􏿽xAE􏿽xCD􏿽x8E􏿽xCC􏿽xB9􏿽xCC􏿽xA6􏿽xCC􏿽xA9􏿽xCC􏿽xAE􏿽xCC􏿽x9E􏿽xCC􏿽x98􏿽xCC􏿽xB3􏿽xE2􏿽x80􏿽x8B􏿽xCD􏿽x88􏿽xCC􏿽xA9􏿽xCC􏿽xA0􏿽xCD􏿽x89l􏿽xCC􏿽xBF􏿽xCD􏿽x8C􏿽xCD􏿽xA8􏿽xCC􏿽xBD􏿽xCC􏿽x82􏿽xCD􏿽x81􏿽xCC􏿽xA1􏿽xCC􏿽xA3􏿽xCC􏿽xA6􏿽xCC􏿽xB3􏿽xCC􏿽xB9􏿽xCC􏿽xBB􏿽xCC􏿽xAA􏿽xCD􏿽x87􏿽xCD􏿽x88􏿽xCD􏿽x95􏿽xCC􏿽xBC􏿽xCC􏿽x99􏿽xCC􏿽xA6􏿽xCC􏿽x9E􏿽xCC􏿽x9D􏿽xCC􏿽xAC􏿽xCD􏿽x8E􏿽xCD􏿽x9A􏿽xCC􏿽x996􏿽xCC􏿽x8A􏿽xCD􏿽xA3􏿽xCD􏿽x8C􏿽xCD􏿽x8B􏿽xCD􏿽xA6􏿽xCD􏿽xA3􏿽xD2􏿽x89􏿽xCD􏿽x98􏿽xCC􏿽x9B􏿽xCD􏿽x93􏿽xCD􏿽x94􏿽xE2􏿽x80􏿽x8B􏿽xCC􏿽xA4􏿽xCC􏿽x9E􏿽xCC􏿽xA4􏿽xCD􏿽x87􏿽xCD􏿽x87􏿽xCC􏿽x97􏿽xCC􏿽xA3􏿽xCC􏿽x96􏿽xCD􏿽x94􏿽xCD􏿽x93􏿽xCC􏿽x97􏿽xCC􏿽x97􏿽xCD􏿽x93􏿽xE2􏿽x80􏿽x9D.comb.map(*.NFD[0].chr).join 20:08
camelia rakudo-moar 5ca43c: OUTPUT«pe​̥r​͈l6​̤␤»
dha I'm now wondering if I need to bother with this much detail.
AlexDaniel bisect: say “p􏿽xCC􏿽x86􏿽xCC􏿽x84􏿽xCD􏿽x92􏿽xCD􏿽x9B􏿽xCC􏿽x81􏿽xCD􏿽x8A􏿽xCC􏿽x8B􏿽xCD􏿽xA3􏿽xCC􏿽xA2􏿽xCD􏿽xA2􏿽xCC􏿽xB7􏿽xCC􏿽x96􏿽xCD􏿽x85􏿽xCC􏿽xA4􏿽xCC􏿽x99􏿽xCC􏿽xAC􏿽xCC􏿽x9E􏿽xCC􏿽x99􏿽xCD􏿽x89􏿽xCD􏿽x95􏿽xCC􏿽xB2􏿽xCC􏿽xBA􏿽xCC􏿽xAE􏿽xCD􏿽x8E􏿽xCD􏿽x96e􏿽xCD􏿽x8C􏿽xCD􏿽x9B􏿽xCC􏿽x90􏿽xCD􏿽xA8􏿽xCC􏿽x8D􏿽xCD􏿽xAC􏿽xCD􏿽xAE􏿽xCC􏿽x91􏿽xCC􏿽x8A􏿽xCD􏿽x9F􏿽xCC􏿽x95􏿽xCD􏿽x99􏿽xCD􏿽x95􏿽xCC􏿽x96􏿽xE2􏿽x80􏿽x8B􏿽xCC􏿽xA5􏿽xCC􏿽x9C􏿽xCD􏿽x9A􏿽xCD􏿽x95􏿽xCC􏿽xA5􏿽xCC􏿽xAE􏿽xCC􏿽xB9􏿽xCD􏿽x93􏿽xCC􏿽xA5􏿽xCD􏿽x87􏿽xCC􏿽xAF􏿽xCC􏿽xAB􏿽xCC􏿽xBA􏿽xCC􏿽xAF􏿽xCC􏿽xB9r􏿽xCC􏿽x85􏿽xCD􏿽xAA􏿽xCC􏿽x8C􏿽xCC􏿽x91􏿽xCC􏿽xBE􏿽xCC􏿽x84􏿽xCD􏿽xAC􏿽xCC􏿽x88􏿽xD2􏿽x89􏿽xCC􏿽xA8􏿽xCD􏿽x9C􏿽xCD􏿽xA2􏿽xCC􏿽xA9􏿽xCC􏿽xAC􏿽xCC􏿽xA4􏿽xCC􏿽xAD􏿽xCC􏿽xB0􏿽xCC􏿽xAE􏿽xCD􏿽x8E􏿽xCC􏿽xB9􏿽xCC􏿽xA6􏿽xCC􏿽xA9􏿽xCC􏿽xAE􏿽xCC􏿽x9E􏿽xCC􏿽x98􏿽xCC􏿽xB3􏿽xE2􏿽x80􏿽x8B􏿽xCD􏿽x88􏿽xCC􏿽xA9􏿽xCC􏿽xA0􏿽xCD􏿽x89l􏿽xCC􏿽xBF􏿽xCD􏿽x8C􏿽xCD􏿽xA8􏿽xCC􏿽xBD􏿽xCC􏿽x82􏿽xCD􏿽x81􏿽xCC􏿽xA1􏿽xCC􏿽xA3􏿽xCC􏿽xA6􏿽xCC􏿽xB3􏿽xCC􏿽xB9􏿽xCC􏿽xBB􏿽xCC􏿽xAA􏿽xCD􏿽x87􏿽xCD􏿽x88􏿽xCD􏿽x95􏿽xCC􏿽xBC􏿽xCC􏿽x99􏿽xCC􏿽xA6􏿽xCC􏿽x9E􏿽xCC􏿽x9D􏿽xCC􏿽xAC􏿽xCD􏿽x8E􏿽xCD􏿽x9A􏿽xCC􏿽x996􏿽xCC􏿽x8A􏿽xCD􏿽xA3􏿽xCD􏿽x8C􏿽xCD􏿽x8B􏿽xCD􏿽xA6􏿽xCD􏿽xA3􏿽xD2􏿽x89􏿽xCD􏿽x98􏿽xCC􏿽x9B􏿽xCD􏿽x93􏿽xCD􏿽x94􏿽xE2􏿽x80􏿽x8B􏿽xCC􏿽xA4􏿽xCC􏿽x9E􏿽xCC􏿽xA4􏿽xCD􏿽x87􏿽xCD􏿽x87􏿽xCC􏿽x97􏿽xCC􏿽xA3􏿽xCC􏿽x96􏿽xCD􏿽x94􏿽xCD􏿽x93􏿽xCC􏿽x97􏿽xCC􏿽x97􏿽xCD􏿽x93􏿽xE2􏿽x80􏿽x9D.comb.map(*.NFD[0].chr).join 20:09
bisectable AlexDaniel: on both starting points the exit code is 0 and the output is identical as well
AlexDaniel okay
then I'm pasting the wrong thing
stmuk I like the comment in github.com/tadzik/Module-Toolkit/b...staller.pm 20:10
which is used in redpanda
BrokenRobot huggable, there 20:11
huggable BrokenRobot, nothing found
BrokenRobot I like zef over panda. feel more solid 20:12
AlexDaniel, u mad bro? m.imgur.com/twvA3Qs 20:15
tadzik :)
dha Oh good that random crap isn't showing up *just* in my client... 20:16
AlexDaniel well, I was trying to do this: irclog.perlgeek.de/perl6/2015-11-12#i_11522549
but it does not seem to work as nicely nowadays 20:17
dha Anyway, I don't need to really get into details on the install options. It's not actually a P6 talk, per se.
Hotkeys is there an easy way to join non-whitespace chars in an array into strings? 20:20
Hotkeys like if I have ['a', 'b', ' ', '\t', 'c', 'd' ...] 20:21
BrokenRobot map with two vars? 20:22
I'd write but coding on a phone keyboard is night mare :p
Hotkeys I want ["ab", "cd" ...]
btw
not "abcd"
BrokenRobot: fair :p
BrokenRobot rotor + map 20:23
Hotkeys the number of non-whitespace characters is arbitrary though 20:24
it could be ['a', 'b', 'c', ' ', 'd', '\t', '\t', ' ', 'e', 'f']
BrokenRobot join, split on \s+ 20:25
Hotkeys I have lone combining characters in there otherwise I would
hence the previous question about splitting those up :p
BrokenRobot :p 20:26
Hotkeys that was my initial plan
but then p6 has to make everything use graphemes
so
AlexDaniel maybe you want bufs instead?
Hotkeys can you split those like a string?
AlexDaniel huggable: dunno 20:27
huggable AlexDaniel, ¯\_(ツ)_/¯
AlexDaniel Bufs are Stringy but that does not give you .split, I believe
BrokenRobot I'd likely just use a loop and concatente into a temp var that I'd pusb into a rresult array every time I get to whitespace
AlexDaniel BrokenRobot: ewww! 20:28
but yes
BrokenRobot huggable, dunno 20:29
huggable BrokenRobot, ¯\_(ツ)_/¯
BrokenRobot :)
Hotkeys That was my other idea BrokenRobot but I was just wondering if there was a better way 20:30
I guess I'll go with that
b2gills bisect: exit “p􏿽xCC􏿽x86􏿽xCC􏿽x84􏿽xCD􏿽x92􏿽xCD􏿽x9B􏿽xCC􏿽x81􏿽xCD􏿽x8A􏿽xCC􏿽x8B􏿽xCD􏿽xA3􏿽xCC􏿽xA2􏿽xCD􏿽xA2􏿽xCC􏿽xB7􏿽xCC􏿽x96􏿽xCD􏿽x85􏿽xCC􏿽xA4􏿽xCC􏿽x99􏿽xCC􏿽xAC􏿽xCC􏿽x9E􏿽xCC􏿽x99􏿽xCD􏿽x89􏿽xCD􏿽x95􏿽xCC􏿽xB2􏿽xCC􏿽xBA􏿽xCC􏿽xAE􏿽xCD􏿽x8E􏿽xCD􏿽x96e􏿽xCD􏿽x8C􏿽xCD􏿽x9B􏿽xCC􏿽x90􏿽xCD􏿽xA8􏿽xCC􏿽x8D􏿽xCD􏿽xAC􏿽xCD􏿽xAE􏿽xCC􏿽x91􏿽xCC􏿽x8A􏿽xCD􏿽x9F􏿽xCC􏿽x95􏿽xCD􏿽x99􏿽xCD􏿽x95􏿽xCC􏿽x96􏿽xE2􏿽x80􏿽x8B􏿽xCC􏿽xA5􏿽xCC􏿽x9C􏿽xCD􏿽x9A􏿽xCD􏿽x95􏿽xCC􏿽xA5􏿽xCC􏿽xAE􏿽xCC􏿽xB9􏿽xCD􏿽x93􏿽xCC􏿽xA5􏿽xCD􏿽x87􏿽xCC􏿽xAF􏿽xCC􏿽xAB􏿽xCC􏿽xBA􏿽xCC􏿽xAF􏿽xCC􏿽xB9r􏿽xCC􏿽x85􏿽xCD􏿽xAA􏿽xCC􏿽x8C􏿽xCC􏿽x91􏿽xCC􏿽xBE􏿽xCC􏿽x84􏿽xCD􏿽xAC􏿽xCC􏿽x88􏿽xD2􏿽x89􏿽xCC􏿽xA8􏿽xCD􏿽x9C􏿽xCD􏿽xA2􏿽xCC􏿽xA9􏿽xCC􏿽xAC􏿽xCC􏿽xA4􏿽xCC􏿽xAD􏿽xCC􏿽xB0􏿽xCC􏿽xAE􏿽xCD􏿽x8E􏿽xCC􏿽xB9􏿽xCC􏿽xA6􏿽xCC􏿽xA9􏿽xCC􏿽xAE􏿽xCC􏿽x9E􏿽xCC􏿽x98􏿽xCC􏿽xB3􏿽xE2􏿽x80􏿽x8B􏿽xCD􏿽x88􏿽xCC􏿽xA9􏿽xCC􏿽xA0􏿽xCD􏿽x89l􏿽xCC􏿽xBF􏿽xCD􏿽x8C􏿽xCD􏿽xA8􏿽xCC􏿽xBD􏿽xCC􏿽x82􏿽xCD􏿽x81􏿽xCC􏿽xA1􏿽xCC􏿽xA3􏿽xCC􏿽xA6􏿽xCC􏿽xB3􏿽xCC􏿽xB9􏿽xCC􏿽xBB􏿽xCC􏿽xAA􏿽xCD􏿽x87􏿽xCD􏿽x88􏿽xCD􏿽x95􏿽xCC􏿽xBC􏿽xCC􏿽x99􏿽xCC􏿽xA6􏿽xCC􏿽x9E􏿽xCC􏿽x9D􏿽xCC􏿽xAC􏿽xCD􏿽x8E􏿽xCD􏿽x9A􏿽xCC􏿽x996􏿽xCC􏿽x8A􏿽xCD􏿽xA3􏿽xCD􏿽x8C􏿽xCD􏿽x8B􏿽xCD􏿽xA6􏿽xCD􏿽xA3􏿽xD2􏿽x89􏿽xCD􏿽x98􏿽xCC􏿽x9B􏿽xCD􏿽x93􏿽xCD􏿽x94􏿽xE2􏿽x80􏿽x8B􏿽xCC􏿽xA4􏿽xCC􏿽x9E􏿽xCC􏿽xA4􏿽xCD􏿽x87􏿽xCD􏿽x87􏿽xCC􏿽x97􏿽xCC􏿽xA3􏿽xCC􏿽x96􏿽xCD􏿽x94􏿽xCD􏿽x93􏿽xCC􏿽x97􏿽xCC􏿽x97􏿽xCD􏿽x93􏿽xE2􏿽x80􏿽x9D.comb.map(*.NFD[0].chr).join eq 'perl6' 20:31
bisectable b2gills: on both starting points the exit code is 0 and the output is identical as well
b2gills m: say “p􏿽xCC􏿽x86􏿽xCC􏿽x84􏿽xCD􏿽x92􏿽xCD􏿽x9B􏿽xCC􏿽x81􏿽xCD􏿽x8A􏿽xCC􏿽x8B􏿽xCD􏿽xA3􏿽xCC􏿽xA2􏿽xCD􏿽xA2􏿽xCC􏿽xB7􏿽xCC􏿽x96􏿽xCD􏿽x85􏿽xCC􏿽xA4􏿽xCC􏿽x99􏿽xCC􏿽xAC􏿽xCC􏿽x9E􏿽xCC􏿽x99􏿽xCD􏿽x89􏿽xCD􏿽x95􏿽xCC􏿽xB2􏿽xCC􏿽xBA􏿽xCC􏿽xAE􏿽xCD􏿽x8E􏿽xCD􏿽x96e􏿽xCD􏿽x8C􏿽xCD􏿽x9B􏿽xCC􏿽x90􏿽xCD􏿽xA8􏿽xCC􏿽x8D􏿽xCD􏿽xAC􏿽xCD􏿽xAE􏿽xCC􏿽x91􏿽xCC􏿽x8A􏿽xCD􏿽x9F􏿽xCC􏿽x95􏿽xCD􏿽x99􏿽xCD􏿽x95􏿽xCC􏿽x96􏿽xE2􏿽x80􏿽x8B􏿽xCC􏿽xA5􏿽xCC􏿽x9C􏿽xCD􏿽x9A􏿽xCD􏿽x95􏿽xCC􏿽xA5􏿽xCC􏿽xAE􏿽xCC􏿽xB9􏿽xCD􏿽x93􏿽xCC􏿽xA5􏿽xCD􏿽x87􏿽xCC􏿽xAF􏿽xCC􏿽xAB􏿽xCC􏿽xBA􏿽xCC􏿽xAF􏿽xCC􏿽xB9r􏿽xCC􏿽x85􏿽xCD􏿽xAA􏿽xCC􏿽x8C􏿽xCC􏿽x91􏿽xCC􏿽xBE􏿽xCC􏿽x84􏿽xCD􏿽xAC􏿽xCC􏿽x88􏿽xD2􏿽x89􏿽xCC􏿽xA8􏿽xCD􏿽x9C􏿽xCD􏿽xA2􏿽xCC􏿽xA9􏿽xCC􏿽xAC􏿽xCC􏿽xA4􏿽xCC􏿽xAD􏿽xCC􏿽xB0􏿽xCC􏿽xAE􏿽xCD􏿽x8E􏿽xCC􏿽xB9􏿽xCC􏿽xA6􏿽xCC􏿽xA9􏿽xCC􏿽xAE􏿽xCC􏿽x9E􏿽xCC􏿽x98􏿽xCC􏿽xB3􏿽xE2􏿽x80􏿽x8B􏿽xCD􏿽x88􏿽xCC􏿽xA9􏿽xCC􏿽xA0􏿽xCD􏿽x89l􏿽xCC􏿽xBF􏿽xCD􏿽x8C􏿽xCD􏿽xA8􏿽xCC􏿽xBD􏿽xCC􏿽x82􏿽xCD􏿽x81􏿽xCC􏿽xA1􏿽xCC􏿽xA3􏿽xCC􏿽xA6􏿽xCC􏿽xB3􏿽xCC􏿽xB9􏿽xCC􏿽xBB􏿽xCC􏿽xAA􏿽xCD􏿽x87􏿽xCD􏿽x88􏿽xCD􏿽x95􏿽xCC􏿽xBC􏿽xCC􏿽x99􏿽xCC􏿽xA6􏿽xCC􏿽x9E􏿽xCC􏿽x9D􏿽xCC􏿽xAC􏿽xCD􏿽x8E􏿽xCD􏿽x9A􏿽xCC􏿽x996􏿽xCC􏿽x8A􏿽xCD􏿽xA3􏿽xCD􏿽x8C􏿽xCD􏿽x8B􏿽xCD􏿽xA6􏿽xCD􏿽xA3􏿽xD2􏿽x89􏿽xCD􏿽x98􏿽xCC􏿽x9B􏿽xCD􏿽x93􏿽xCD􏿽x94􏿽xE2􏿽x80􏿽x8B􏿽xCC􏿽xA4􏿽xCC􏿽x9E􏿽xCC􏿽xA4􏿽xCD􏿽x87􏿽xCD􏿽x87􏿽xCC􏿽x97􏿽xCC􏿽xA3􏿽xCC􏿽x96􏿽xCD􏿽x94􏿽xCD􏿽x93􏿽xCC􏿽x97􏿽xCC􏿽x97􏿽xCD􏿽x93􏿽xE2􏿽x80􏿽x9D.chars 20:32
camelia rakudo-moar 5ca43c: OUTPUT«11␤»
BrokenRobot Hotkeys, there's probably a way with ritor + map, but it's hard for me to visualize it in my head :)
AlexDaniel m: my @a = [‘a’, ‘b’, ‘c’, ‘ ’, ‘d’, “\t”, “\t”, ‘ ’, ‘e’, ‘f’]; say @a.categorize: { state $w = 0; if /\w/ { $w } else { $w++; Empty } } 20:33
camelia rakudo-moar 5ca43c: OUTPUT«{0 => [a b c], 1 => [d], 4 => [e f]}␤»
AlexDaniel what about this? ↑ 20:34
BrokenRobot :o
AlexDaniel stupid, I know, but…
masak .categorize *and* state !? 20:35
AlexDaniel :P
michiamodiego Hello, it has been a while since I used irc last time... To make everything more complicated and harder I am using windows phone 20:38
dha We admire your self-abuse of spartan proportions. :-)
michiamodiego Anyway my question is what is the command to show all the user in the room
Argghhh
masak michiamodiego: /names 20:40
michiamodiego Thanks ;) 20:42
jnthn ...apparently Windows phone can't handle that many names :P 20:59
masak ETOOMANYNAMES 21:00
MadcapJake How do you pass NULL for a native sub's callback argument? 21:05
jnthn Just pass a type object 21:06
Callable perhaps
MadcapJake is it possible to represent variadic functions with NativeCall? 21:12
jnthn Not yet, I'm afraid. 21:13
dyncall supports it, but nobody took it upon themselves to wire it up to a slurpy sig yet
MadcapJake jnthn: what about va_list? 21:16
jnthn MadcapJake: Ummm.... :) I really don't know, I mean, technically I guess you can make that up somehow. But I'm not convinced it's going to be very portable. 21:18
*fake that up
(In fact, I'm fairly convinced it won't be. :)) 21:21
MadcapJake bummer 21:22
MadcapJake never realized dyncall was how NativeCall worked 21:24
jnthn Under the hood. 21:24
MadcapJake right! cool stuff! 21:25
jnthn I just glanced the ABI docs for va_list and, well, tbh, I suspect anyone who can get that to work is probably at least as capable of getting the real varargs stuff wired up anyway. :P 21:26
MadcapJake hehe yeah see I barely even understand how va_list/va_arg works :S 21:26
MadcapJake is planning on taking mooc.fi/courses/2016/aalto-c/en/ to improve his C-fu
jnthn Cool!
I've never tried to use something like NativeCall without knowing C (by the time I ever used such a thing I was already comfortable programming C)...but I can imagine it's kinda confusing. 21:27
MadcapJake see my only exposure to C has been through writing NativeCall wrappers :D 21:29
jnthn :D 21:30
MadcapJake the things that confuse me the most are macros and typedefs
oh and typecasts :)
AND function types (or whatever those are called) 21:31
basically the whole "C lets you pretend anything is anything" philosophy :D
jnthn Yeah, that's why C is totally awesome and totally awful
I mean, if you're writing a garbage collector you're in luck. 21:32
But the rest of the time... :-)
Macros *are* confusing 'cus they're a preprocessing step and so "don't exist" by runtime, meaning they're a nightmare to deal with in anything like NativeCall 21:33
MadcapJake yeah and C code makes you jump around so much just to figure out a line 4+ jumps ago
kmwallio works with C daily and has no clue what he's doing
MadcapJake lol 21:34
jnthn Function types just have syntax that I find near impossible to remember, and I'm not sure I'm alone in finding them that way. :)
MadcapJake yeah I think C overuses parentheses e.g., type casts, function type names, order of ops, arg lists, probably more that I don't even know about 21:35
geekosaur so C's parentheses are perl6's colons :p 21:37
jnthn :P 21:38
I quite enjoy writing C, though.
Reminds me sorta-ish how computers work (or at least, better than anything else I work in). :) 21:39
MadcapJake yeah I'm thinking I will enjoy it more once I'm more comfortable. I think the biggest difficulty for me is that I've learned all these languages that have C-like syntax but basically share nothing of what makes C so unique 21:41
jnthn Yeah, having to manage memory yourself - and having such a raw view of it - is quite a difference. 21:42
Xliff I don't know why, but I've spent most of my perl6 career (if you can call it that) dealing with NativeCall 21:45
MadcapJake well right, I've got it in my head (from all these c-like syntax languages) that a string is a string, but in C, there's really no such thing iiuc, you have to think about all data from the perspective of memory rather than what you the data *is* (not sure if I'm getting across what I'm thinking)
Xliff coz.... XML::LibXML <- current project
I don't know how I got roped into that, but lassoed, I did! 21:46
I think MadcapJake called me insane.
Tjat'
Xliff er... That's probably not far from the truth. 21:46
jnthn I certainly find C makes me think my data structures through a good bit. 21:47
Though the brain melt only gets really bad for me when I start doing lock-free concurrent ones. 21:48
MadcapJake jnthn: see in some ways I think many languages (dynamic/scripting langauges esp.) let you get away with thinking about data structure barely at all (and if you do need to, you can just import a library that does the heavy thinking for you) 21:49
but that's the nature of abstraction, I suppose
jnthn I think data structures still matter, but yeah, I'm certainly more inclined to gradually evolve them through use-cases in a dynlang than sit down and carefully up-front design them. 21:51
I think that's as much a function of refactoring efficiency than anything else, though.
MadcapJake I guess my problem is that, being self-taught, I've never really learned data structures. So I've just had to grasp at the little bits that show up in other materials 21:53
MadcapJake wishes he could go back and get a programming degree :\ 21:56
MadcapJake is off to dinner
jnthn Enjoy dinner :) 21:57
stmuk RabidGravy: that Coding Academy 2016 UK magazine article is from www.mtsoukalos.eu/Perl-6-LXF-206 21:59
RabidGravy cool 22:01
stmuk it appears to be legally available for free at ia601303.us.archive.org/7/items/Li...y_2016.pdf 22:05
stmuk page 84 .. I could have saved myself 13 quid :/ 22:06
stmuk oh its 2013.12/parrot he is using 22:19
sortiz \o #perl6 22:51
stevieb m: (1).WHAT.perl 23:14
camelia ( no output )
stevieb m: (1).WHAT.perl.say 23:15
camelia rakudo-moar 5ca43c: OUTPUT«Int␤»
stevieb m: (1,2,3).WHAT.perl.say
camelia rakudo-moar 5ca43c: OUTPUT«List␤»
stevieb so, a one-element list becomes an Int?
kmwallio m: (1,).WHAT.perl.say 23:17
camelia rakudo-moar 5ca43c: OUTPUT«List␤»
stevieb kmwallio: thanks, just found that 23:18
m: (1).List.perl.say
camelia rakudo-moar 5ca43c: OUTPUT«(1,)␤»
stevieb m: <a>.perl.say 23:19
camelia rakudo-moar 5ca43c: OUTPUT«"a"␤»
stevieb m:<a>.List.perl.say 23:20
m: <a>.List.perl.say
camelia rakudo-moar 5ca43c: OUTPUT«("a",)␤»
stevieb m: ('a',).WHAT.perl.say
camelia rakudo-moar 5ca43c: OUTPUT«List␤»
kmwallio m: ((1) == 1).say 23:27
camelia rakudo-moar 5ca43c: OUTPUT«True␤»
kmwallio m: ((1,) == 1).say
camelia rakudo-moar 5ca43c: OUTPUT«True␤»
kmwallio m: ((1,2) == 1).say
camelia rakudo-moar 5ca43c: OUTPUT«False␤»
stevieb m: ((1,).elems == 1)).say 23:29
camelia rakudo-moar 5ca43c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unexpected closing bracket␤at <tmp>:1␤------> 3((1,).elems == 1)7⏏5).say␤»
stevieb m: ((1,).elems == 1).say 23:30
camelia rakudo-moar 5ca43c: OUTPUT«True␤»
stevieb m: ((1,).so == 1).say
camelia rakudo-moar 5ca43c: OUTPUT«True␤»
timotimo m: use NativeCall; say short 23:51
camelia rakudo-moar 5ca43c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ short used at line 1. Did you mean 'sort', 'spurt', 'shift'?␤␤»
timotimo how the F do i figure out how big a short is >_> 23:52
big sigh ...
ooooh, dwarfdump has it!
that's fantastic <3