»ö« 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:02 pmurias left
BooK mmm, same error with the commit before that, it seems 00:02
timotimo masak: thanks for the fantastic laugh you gave me :)
00:03 ptolemarch left, labster left
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
00:05 cdg joined 00:07 labster joined
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?
00:17 cdg left
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
00:26 MasterDuke_ joined
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
00:30 TimToady joined
BooK is there a preferred paste site? 00:30
00:30 BenGoldberg joined
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
00:33 ssotka left
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
00:34 ssotka joined
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
00:37 Zoffix joined
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
00:39 kerframil joined
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
00:40 silug joined
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
01:01 ssotka left 01:02 sortiz left
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
01:11 molaf left
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」␤»
01:13 aborazmeh joined, aborazmeh left, aborazmeh joined
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
01:20 kurahaupo left, yqt left 01:24 molaf joined 01:31 FROGGS_ joined 01:35 FROGGS left 01:38 jack_rabbit joined 01:45 ilbot3 left 01:46 bjz left 01:47 kid51 left, ilbot3 joined 01:48 bjz joined 01:56 sufrostico left 01:57 Zero_Dogg left, Zero_Dogg joined, Zero_Dogg left, Zero_Dogg joined 02:00 user9 left 02:05 Hor|zon joined
johnjohn101 is the perl 6 project for .net dead? 02:10
AlexDaniel johnjohn101: you mean niecza? Yeah 02:17
02:26 noganex_ joined 02:29 noganex left 02:43 AlexDaniel left
dalek c: 6b0b678 | (Zoffix Znet)++ | doc/Language/testing.pod:
Make it clearer cmp-ok can take a Callable
02:50
02:56 Actualeyes left 02:57 skids left
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
03:04 rgrinberg joined 03:10 Actualeyes joined 03:26 Ben_Goldberg joined, Ben_Goldberg left 03:30 lizmat left 03:33 BenGoldberg left 03:42 bjz_ joined 03:43 bjz left, huggable joined 03:46 BenGoldberg joined
dalek c: 71c3efb | (Zoffix Znet)++ | doc/Language/testing.pod:
Minor clarifification of Str form of throws-like
03:49
03:55 diakopter joined 03:58 kerframil left 04:01 rgrinberg left, aborazmeh left 04:08 Cabanossi left 04:11 Cabanossi joined 04:19 cooper joined 04:22 telex joined 04:23 kerframil joined 04:37 cooper_ joined 04:39 cooper left 04:42 khw left 04:47 ssotka joined
buharin hi :-) 04:49
04:53 llfourn_ joined, llfourn left 05:05 llfourn_ left 05:07 llfourn joined 05:13 fhorck joined 05:16 BenGoldberg left 05:20 cooper_ left, cooper joined, cooper left, cooper joined 05:28 lol joined 05:30 japhb joined 05:31 jrusso joined 05:34 MadcapJake left, fhorck left 05:38 teatime joined 05:43 mr-foobar left 05:44 lol left 05:54 FROGGS_ left 06:00 lizmat joined, wamba joined 06:08 ssotka left 06:26 jrusso is now known as MadcapJake 06:30 lizmat left 06:34 vendethiel left 06:42 firstdayonthejob left 06:49 pdcawley joined
nine ugexe: why did you close PR 729? 06:49
06:51 stmuk joined 06:52 stmuk left 06:53 domidumont joined 06:55 domidumont left, stmuk joined 06:56 domidumont joined 06:58 stmuk left, stmuk joined 06:59 CIAvash joined 07:08 _mg_ joined 07:10 rkr joined 07:12 abraxxa joined 07:18 patrickz joined, rurban_ joined 07:19 rurban joined 07:22 darutoko joined
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
07:29 Lucas_One__ is now known as Lucas_One
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 =
07:33 patrickz left
grondilu $foo //= $bar means $foo = $foo // $bar 07:35
C-style combination of binary operator, as in +=, *= etc 07:36
buharin yaya I understand
07:37 _mg_ left 07:41 finanalyst joined 07:43 huggable left 07:44 zakharyas joined
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
07:55 andreoss joined
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…»
07:56 Peter_R joined
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
07:58 flok420 joined 07:59 flok420 left
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
08:03 pecastro joined 08:07 rindolf joined 08:09 jack_rabbit left 08:10 vytas joined 08:11 ocbtec joined, finanalyst left 08:16 iH2O joined 08:17 iH2O left 08:20 baest joined 08:21 wtw_ joined, vytas left 08:22 vytas joined, a3r0 left 08:23 stmuk left 08:24 stmuk joined, arnsholt joined 08:29 a3r0 joined 08:31 melezhik joined 08:33 pdcawley_ joined 08:34 a3r0 left 08:35 pdcawley left, a3r0_ joined 08:37 tinita_ joined, yx_ joined, esh_ joined, mls_ joined 08:38 Amnez777- joined 08:39 cpage_ joined, m0ltar_ left, araujo joined, araujo left, m0ltar joined 08:40 xinming left, ZeroDogg joined, xinming joined 08:41 emdashcomma_ left 08:42 TakinOver left, a3r0 joined, araujo joined, araujo left, araujo joined, yubimusubi joined 08:43 emdashcomma joined, Zero_Dogg left, yx_ is now known as xnrand, ZeroDogg is now known as Zero_Dogg, a3r0_ left, TakinOver joined, k-man joined 08:45 gnull joined 08:46 gabiruh left 08:52 TEttinger left 08:53 gabiruh joined 08:59 g4 joined 09:04 labster left 09:07 mls_ is now known as mls
andreoss how to make IO::Handle.lines to work like cat rather than tail? 09:11
09:13 rkr left
andreoss *like tail rather than cat 09:15
09:15 finanalyst joined 09:20 _mg_ joined, rurban1 joined, rurban left
andreoss > my $h = "uni.txt".IO.open; $h.seek(10); $h.lines.elems 09:23
Malformed UTF-8
09:26 CIAvash left
nine I think .seek works in terms of bytes, not characters 09:27
andreoss what should i use in this case? 09:29
09:31 finanalyst left
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
09:33 rurban1 left, xinming left
DrForr Remember that UTF-8 isn't fixed-width. 09:33
09:34 xinming joined 09:35 RabidGravy joined
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
09:39 _mg_ left
andreoss > loop { try { $h.getc(); last ; CATCH { default { $h.seek(1, SeekFromCurrent) } } }} 09:39
will this even work? 09:40
seems not 09:42
09:51 ChoHag joined 09:54 vibha joined 09:59 AlexDaniel joined 10:06 user9 joined
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
10:35 tinita_ is now known as tinita 10:43 darutoko left 10:48 kaare_ joined
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
10:51 user9 left
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?
10:52 user9 joined
AlexDaniel gfldex: the graph here is amazing github.com/perl6/doc/graphs/contributors 10:54
10:54 _mg_ joined
gfldex #3 is in reach :) 10:54
10:56 _mg_ left
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␤»
10:57 aries_liuxueyang joined
psch hm 10:57
10:57 jameslenz left
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
11:00 jameslenz joined, user9 left
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
11:01 user9 joined
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
11:11 pdcawley_ left
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
11:13 Emeric joined 11:14 _mg_ joined
AlexDaniel basically if nobody can, then it is probably not an issue on our side 11:15
11:16 kid51 joined
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
11:21 darutoko joined
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
11:24 bhm_ is now known as bhm
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
11:26 wamba left
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
11:28 rkr joined
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
11:38 stevieb left 11:40 breinbaas left, breinbaas joined 11:43 avalenn joined 11:48 kid51 left
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
11:58 _mg_ left, abraxxa left 12:00 wamba joined 12:01 araujo_ joined, rkr left 12:02 araujo_ left
buharin Woodi: polish? 12:03
12:03 araujo_ joined 12:04 araujo left 12:05 _mg_ joined 12:07 araujo__ joined
Woodi yhy :) 12:08
12:09 araujo__ left, araujo__ joined 12:10 sortiz joined, sortiz left, araujo_ left 12:11 araujo__ left 12:12 araujo__ joined, rgrinberg joined
buharin me too 12:12
how do you know that I am from Poland? 12:13
;d
12:13 araujo_ joined
Woodi buharin: I remember you saying that #here :) 12:16
12:17 araujo__ left 12:20 kerframil left, _mg_ left 12:22 domidumont left
masak .oO( how do you know that I have some polish? ) 12:35
Woodi yesterday's XKCD: option -R - run recursively on * ;)
12:42 yqt joined
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
12:46 skids joined 12:48 lizmat joined, aries_liuxueyang left 12:49 Sgeo left 12:50 aries_liuxueyang joined 12:51 rgrinberg left 12:52 sufrostico joined 13:01 cgfbee left 13:02 mr-foobar joined 13:03 pierrot joined 13:07 hoelzro joined 13:10 cgfbee joined 13:14 araujo__ joined 13:15 _mg_ joined 13:16 araujo_ left 13:17 domidumont joined 13:19 abruanese left 13:24 avenj joined, avenj left, avenj joined 13:27 _mg_ left 13:28 g4 left 13:29 _mg_ joined 13:36 melezhik left, _mg_ left
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
13:42 buharin left
geekosaur on the one hand yes, on the other this is the thinking that got older Windows GPFs 13:42
13:46 patrickz joined, Sgeo joined
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
13:48 sufrostico left 13:51 _mg_ joined
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")
13:55 _mg_ left
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
13:59 acrussell joined
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
14:01 sufrostico joined
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
14:06 rubio joined, rubio is now known as RubioTerra 14:07 avenj left
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
14:15 acrussell left
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
14:16 acrussell joined, johnjohn101 left
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
14:22 avenj joined
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
14:23 johnjohn101 joined
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
14:40 cdg joined
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
14:40 dalek joined, ChanServ sets mode: +v dalek
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
14:52 wamba left
johnjohn101 woohoo, perl6 on my machine!! 14:52
14:56 vibha left
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
15:09 girafe joined
dalek c: 00fb6d4 | (Brad Gilbert)++ | doc/Language/faq.pod:
s/Haskall/Haskell/
15:12
15:12 eroux joined
stmuk oops 15:19
BrokenRobot oops? :) 15:20
15:21 ssotka joined
geekosaur the typo, presumably :p 15:22
15:22 girafe left
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.
15:43 huggable joined 15:44 wnh_ joined 15:46 donaldh joined 15:47 domidumont left 15:50 wamba joined 15:51 AlexDaniel left
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]
15:55 revdiablo joined 15:56 setty1 joined
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
16:00 zakharyas left 16:01 yqt left
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)
16:06 khw joined 16:09 yqt joined
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/
16:15 domidumont joined 16:19 Emeric1 joined 16:21 Emeric left, Emeric1 is now known as Emeric 16:23 eroux left
dalek c: adf23cb | (Steve Mynott)++ | doc/Language/glossary.pod:
another definition for MoarVM
16:27
16:28 rkr joined 16:36 AlexDaniel joined, Emeric1 joined
BrokenRobot m: say 1+\\i 16:37
camelia rakudo-moar 5ca43c: OUTPUT«2␤»
16:39 Emeric left, Emeric1 is now known as Emeric, Emeric left 16:42 donaldh left 16:47 araujo__ left
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
16:54 donaldh joined 16:57 buharin joined
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
17:08 firstdayonthejob joined
perlpilot AlexDaniel++ that was a very good point though 17:08
17:10 girafe joined
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/;
17:17 rurban_ left 17:20 andreoss left, donaldh left 17:22 Actualeyes left 17:25 mr-foobar left, BrokenRobot joined 17:29 rindolf left 17:34 rindolf joined 17:36 rkr left 17:38 yqt left
timotimo not in argument lists 17:39
17:45 acrussell left 17:47 sufrostico left 17:52 domidumont left
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? :)
17:59 fhorck joined
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
18:04 buharin left
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
18:06 cdg left
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
18:10 cpage_ left
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)]␤»
18:13 buharin joined
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
18:30 domidumont joined
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
18:33 cpage_ joined 18:35 cdg joined
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
18:45 avenj left
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
18:57 cdg left 18:58 avenj joined 19:01 kid51 joined 19:04 avenj left 19:07 yqt joined 19:09 domidumont left 19:18 RubioTerra left
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)␤»
19:19 avenj joined 19:25 TEttinger joined 19:33 darutoko left 19:36 domidumont joined
hoelzro it's odd to me that looking for the existence of a slice is always truthy 19:42
19:43 huggable left
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
19:44 domidumont left
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
19:52 rurban_ joined
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
19:55 dha joined
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 ̩)␤»
19:56 jjido joined
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
19:57 ufobat left
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
20:11 huggable joined
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
20:21 rurban_ left
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
20:22 kaare_ left
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
20:36 michiamodiego joined 20:37 buharin left
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
20:41 pecastro left
michiamodiego Thanks ;) 20:42
20:42 juikuen joined, juikuen left 20:43 michiamodiego left 20:44 pecastro joined 20:46 michiamodiego joined, michiamodiego left 20:54 wamba left
jnthn ...apparently Windows phone can't handle that many names :P 20:59
20:59 michiamodiego joined, michiamodiego left
masak ETOOMANYNAMES 21:00
21:00 skids left 21:04 rindolf left
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
21:09 cpage_ left, pdcawley joined 21:10 cpage_ joined
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
21:14 AlexDaniel left
MadcapJake jnthn: what about va_list? 21:16
21:17 cdg joined
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
21:24 donaldh joined
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
21:26 jjido left
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
21:29 donaldh left
MadcapJake see my only exposure to C has been through writing NativeCall wrappers :D 21:29
21:30 donaldh joined, donaldh left
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
21:36 Zoffix left
geekosaur so C's parentheses are perl6's colons :p 21:37
21:38 trnh joined
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
21:39 jjido joined 21:40 pdcawley left
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
21:41 AlexDaniel joined 21:42 michiamodiego joined, michiamodiego left
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'
21:46 jjido left
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.
21:52 patrickz left
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
21:59 jack_rabbit joined 22:00 setty1 left
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
22:05 girafe left
stmuk page 84 .. I could have saved myself 13 quid :/ 22:06
22:08 stevieb joined 22:09 fhorck_ joined 22:10 fhorck_ left, fhorck left
stmuk oh its 2013.12/parrot he is using 22:19
22:21 addison joined 22:40 hankache joined 22:46 TEttinger left 22:51 sortiz joined
sortiz \o #perl6 22:51
22:58 hankache left 23:07 firstdayonthejob left 23:08 trnh left 23:10 dha left
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␤»
23:24 cdg left 23:26 RabidGravy left
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␤»
23:39 stevieb left 23:46 stevieb joined
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
23:58 AlexDaniel left