Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-09-16

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:11 mcmillhj joined #perl6
00:29 tushar joined #perl6
00:30 tushar just curious, how can i define type for array of arrays?
00:30 mcmillhj joined #perl6
00:30 tushar in other words I would like to make my own type for array of array data structure. How can I do that?
00:34 MasterDuke tushar: my Array[Array] @a
00:34 Pierre_ joined #perl6
00:35 tushar @MasterDuke -- thanks.
00:35 itaipu joined #perl6
00:36 tushar can i do "has Array|Array[Array] @.data is rw"?
00:37 MasterDuke i don't know enough to say yes or no
00:38 tushar no problem.. Does anybody else have any idea about that?
00:44 AlexDaniel tushar: what should it mean?
00:45 tushar I would like to have either array or array of arrays as type of an attribute. Does that make sense?
00:46 mcmillhj joined #perl6
00:47 AlexDaniel but array of arrays is array and array of arrays at the same time, so why?
00:49 leego joined #perl6
00:50 AlexDaniel MasterDuke: oh wow (re #129279)
00:50 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=129279
00:50 AlexDaniel MasterDuke: I've never thought one could expect $١ to work
00:50 tushar wow.. I didn't know that.. Thanks.. Just to be clarify (for myself - lay man) Array type represents array and array of arrays both.
00:50 AlexDaniel m: my $١ = 42; say $١
00:50 camelia rakudo-moar ad5336: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot declare a numeric variable␤at <tmp>:1␤------> 3my $١7⏏5 = 42; say $١␤»
00:51 MasterDuke the $1, $2, etc are just sugar for $/[1], $/[2], etc
00:51 MasterDuke so they only work to retrieve matches
00:52 AlexDaniel wait, isn't 「my Array @something」 already an array of arrays? And Array[Array] @d is array of arrays of arrays?
00:52 * AlexDaniel confused
00:52 MasterDuke so it gets the above right, but fails when trying to get a match (until my PR is merged, then it will work)
00:53 AlexDaniel MasterDuke: after all my $١ is not allowed, so it perfectly makes sense
00:53 AlexDaniel MasterDuke: I am amazed that I've never thought about it
00:53 AlexDaniel MasterDuke++
00:54 MasterDuke there could be more things that don't work, but i fixed the ones i found on my first search
00:55 AlexDaniel m: my Array @data = 42, 50; say @data
00:55 camelia rakudo-moar ad5336: OUTPUT«Type check failed in assignment to @data; expected Array but got Int (42)␤  in block <unit> at <tmp> line 1␤␤»
00:55 AlexDaniel m: my Array @data = [42, 50]; say @data
00:55 camelia rakudo-moar ad5336: OUTPUT«Type check failed in assignment to @data; expected Array but got Int (42)␤  in block <unit> at <tmp> line 1␤␤»
00:56 AlexDaniel m: my Array @data = [[42, 50]]; say @data
00:56 camelia rakudo-moar ad5336: OUTPUT«Type check failed in assignment to @data; expected Array but got Int (42)␤  in block <unit> at <tmp> line 1␤␤»
00:56 AlexDaniel m: my Array @data = [[42, 50],]; say @data
00:56 camelia rakudo-moar ad5336: OUTPUT«[[42 50]]␤»
00:56 AlexDaniel right…
00:56 AlexDaniel m: my Array[Array] @data = [[[42,], [50,]],]; say @data
00:56 camelia rakudo-moar ad5336: OUTPUT«Type check failed in assignment to @data; expected Array[Array] but got Array ($[[42], [50]])␤  in block <unit> at <tmp> line 1␤␤»
00:56 MasterDuke AlexDaniel++ you're right, my Array[Array] answer was one Array too many
00:56 AlexDaniel m: my Array[Array] @data = [[[42,], [50],],]; say @data
00:56 camelia rakudo-moar ad5336: OUTPUT«Type check failed in assignment to @data; expected Array[Array] but got Array ($[[42], [50]])␤  in block <unit> at <tmp> line 1␤␤»
00:57 tushar @AlexDaniel -- yes, I just check it on REPL and it gave me the same error. So you are absolutely, right that my Array @data is expecting array of arrays
00:57 tushar > @a = [1,2,3]; Type check failed in assignment to @a; expected Array but got Int (1)   in block <unit> at <unknown file> line 1
00:57 tushar @a = [[1,2,3],[4,5,6]]; [[1 2 3] [4 5 6]]
00:58 AlexDaniel well my @… is already an array, so it kinda makes sense :)
00:58 mcmillhj joined #perl6
00:58 tushar yes that makes perfect sense now..
00:58 AlexDaniel MasterDuke: I can't get my Array[Array] to work with any data, do you have any idea?
00:58 tushar what if I am expecting array or array of arrays? How can I handle that
01:00 AlexDaniel tushar: are you sure that you don't want a multidimensional array in this case?
01:00 MasterDuke m: my Array @data = [[42, 50],]; my Array[Array] @b; @b.push: @data; dd @b
01:00 camelia rakudo-moar ad5336: OUTPUT«Array[Array[Array]] @b = Array[Array[Array]].new(Array[Array].new($[42, 50]))␤»
01:00 AlexDaniel MasterDuke: what about without pushing?
01:01 MasterDuke m: my Array @data = [[42, 50],]; my Array[Array] @b; @b[0] = @data; dd @b
01:01 camelia rakudo-moar ad5336: OUTPUT«Array[Array[Array]] @b = Array[Array[Array]].new(Array[Array].new($[42, 50]))␤»
01:01 AlexDaniel tushar: like, you know ↓
01:01 AlexDaniel m: my @data[2;2;2]; say @data
01:01 camelia rakudo-moar ad5336: OUTPUT«[[[(Any) (Any)] [(Any) (Any)]] [[(Any) (Any)] [(Any) (Any)]]]␤»
01:01 AlexDaniel MasterDuke: cheater…
01:04 itaipu joined #perl6
01:07 tushar @AlexDeniel -- no I don't want multidimensional array..
01:10 tushar @MasterDuke and @AlexDaniel -- Thanks guys for your input
01:11 mcmillhj joined #perl6
01:14 tushar I got another question about type assignment. How can I assign multiple type constraints on an array? I have tried so far this -- my Str|Int @h; But got compiling error. Do I have to make my own type to accommodate two types?
01:16 _slade_ joined #perl6
01:16 BenGoldberg m: my @IntStr @h;
01:16 camelia rakudo-moar ad5336: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3my @IntStr7⏏5 @h;␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤        statement mod…»
01:17 BenGoldberg m: my IntStr @h;
01:17 camelia rakudo-moar ad5336: ( no output )
01:17 BenGoldberg m: my IntStr @h = (1, 2, "abc"); push @h, {};
01:17 camelia rakudo-moar ad5336: OUTPUT«Type check failed in assignment to @h; expected IntStr but got Int (1)␤  in block <unit> at <tmp> line 1␤␤»
01:17 BenGoldberg m: my (IntStr) @h = (1, 2, "abc"); push @h, {};
01:17 camelia rakudo-moar ad5336: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3my (IntStr)7⏏5 @h = (1, 2, "abc"); push @h, {};␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement mo…»
01:17 BenGoldberg m: my IntStr() @h = (1, 2, "abc"); push @h, {};
01:17 camelia rakudo-moar ad5336: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Coercion IntStr(Any) is insufficiently type-like to qualify a variable␤at <tmp>:1␤------> 3my IntStr() @h7⏏5 = (1, 2, "abc"); push @h, {};␤    expecting any of:␤        constraint␤»
01:21 BenGoldberg m: subset int-or-str of Int|Str;
01:21 camelia rakudo-moar ad5336: OUTPUT«WARNINGS for <tmp>:␤Useless use of "|" in expression "subset int-or-str of Int|Str" in sink context (line 1)␤»
01:21 BenGoldberg m: subset int-or-str of Int|Str; my int-or-str @h = (1, "2");
01:21 camelia rakudo-moar ad5336: OUTPUT«WARNINGS for <tmp>:␤Useless use of "|" in expression "subset int-or-str of Int|Str" in sink context (line 1)␤Type check failed in assignment to @h; expected int-or-str but got Str ("2")␤  in block <unit> at <tmp> line 1␤␤»
01:22 mcmillhj joined #perl6
01:23 BenGoldberg m: subset int-or-str of Cool where Int|Str; my int-or-str @h = (1, "2");
01:23 camelia rakudo-moar ad5336: ( no output )
01:23 BenGoldberg m: subset int-or-str of Cool where Int|Str; my int-or-str @h = (1, "2", {});
01:23 camelia rakudo-moar ad5336: OUTPUT«Type check failed in assignment to @h; expected int-or-str but got Hash (${})␤  in block <unit> at <tmp> line 1␤␤»
01:23 MasterDuke m: subset int-or-str where Int|Str; my int-or-str @h = (1, "2");
01:23 camelia rakudo-moar ad5336: ( no output )
01:23 MasterDuke m: subset int-or-str where Int|Str; my int-or-str @h = (1, "2"); dd @h
01:23 camelia rakudo-moar ad5336: OUTPUT«Array[int-or-str] @h = Array[int-or-str].new(1, "2")␤»
01:23 BenGoldberg tushar, What do you think of the above?
01:23 BenGoldberg m: subset int-or-str of Cool where Int|Str; my int-or-str @h = (1, "2"); push @h, 1.4;
01:23 camelia rakudo-moar ad5336: OUTPUT«Type check failed in assignment to @h; expected int-or-str but got Rat (1.4)␤  in block <unit> at <tmp> line 1␤␤»
01:24 BenGoldberg m: subset int-or-str of Cool where Int|Str; my int-or-str @h = (1, "2"); push @h, 23, "skidoo";
01:24 camelia rakudo-moar ad5336: ( no output )
01:24 BenGoldberg m: subset int-or-str of Cool where Int|Str; my int-or-str @h = (1, "2"); push @h, Mu.new; say @h
01:24 camelia rakudo-moar ad5336: OUTPUT«X::TypeCheck::Assignment exception produced no message␤  in block <unit> at <tmp> line 1␤␤»
01:25 tushar @Ben -- Thanks bud for your examples.. Still digesting them
01:25 BenGoldberg m: subset int-or-str of Cool where Int|Str; my int-or-str @h = (1, "2"); push @h, Any.new; say @h
01:25 camelia rakudo-moar ad5336: OUTPUT«Type check failed in assignment to @h; expected int-or-str but got Any (Any.new)␤  in block <unit> at <tmp> line 1␤␤»
01:26 Juerd m: my $x where Str|Int = 4.2;
01:26 camelia rakudo-moar ad5336: OUTPUT«Type check failed in assignment to $x; expected <anon> but got Rat (4.2)␤  in block <unit> at <tmp> line 1␤␤»
01:26 Juerd I've thought about trying to get a more descriptive thing instead of <anon> but it was *hard*.
01:27 Juerd Is there anything like deparse yet? :)
01:27 tushar @Ben -- it seems like I have to create new type 'int-or-str' as you did.
01:27 BenGoldberg m: { subset foo of Cool }; my foo @h;
01:27 camelia rakudo-moar ad5336: ( no output )
01:29 BenGoldberg m: { my subset foo of Cool }; my foo @h;
01:29 camelia rakudo-moar ad5336: OUTPUT«5===SORRY!5===␤Type 'foo' is not declared␤at <tmp>:1␤------> 3{ my subset foo of Cool }; my foo7⏏5 @h;␤Malformed my␤at <tmp>:1␤------> 3{ my subset foo of Cool }; my7⏏5 foo @h;␤␤»
01:29 BenGoldberg m: { our subset foo of Cool }; my foo @h;
01:29 camelia rakudo-moar ad5336: ( no output )
01:30 BenGoldberg tushar, If you use 'my', you can limit the scope of where the new type is visible.
01:30 poohman joined #perl6
01:30 tushar Ben, yes it will have the lexical scope.
01:31 tushar Ben, thanks a lot for your time and efforts.
01:32 zacts joined #perl6
01:33 mcmillhj joined #perl6
01:41 Actualeyes joined #perl6
01:46 mcmillhj joined #perl6
01:51 TimToady note that [[1,2,3],[4,5,6]] is not, in fact Array[Array], but merely an Array[Any] that happens to contain arrays
01:52 TimToady you can't expect structural typing to magically turn into nominal typing
01:52 TimToady not in Perl, anyway
01:56 tushar TimToday, thanks for your explanation.
01:56 TimToady m: constant AoA = Array[Array]; say AoA([[1,2,3],[4,5,6]]).WHAT
01:56 camelia rakudo-moar ad5336: OUTPUT«(Array[Array])␤»
01:56 TimToady you can, however, apparently cast to the nominal type
01:57 TimToady m: say Array[Array]([[1,2,3],[4,5,6]])
01:57 camelia rakudo-moar ad5336: OUTPUT«[[1 2 3] [4 5 6]]␤»
01:57 TimToady m: say Array[Array]([[1,2,3],[4,5,6],42])
01:57 camelia rakudo-moar ad5336: OUTPUT«Type check failed in assignment to ; expected Array but got Int (42)␤  in block <unit> at <tmp> line 1␤␤»
01:59 tushar TimToday, thanks.
01:59 TimToady m: say Array[Array]([[1,2,3],[4,5,6],(7,8,9)])
01:59 camelia rakudo-moar ad5336: OUTPUT«Type check failed in assignment to ; expected Array but got List ($(7, 8, 9))␤  in block <unit> at <tmp> line 1␤␤»
01:59 TimToady m: say Array[Array()]([[1,2,3],[4,5,6],(7,8,9)])
01:59 camelia rakudo-moar ad5336: OUTPUT«Type check failed in assignment to ; expected Array(Any) but got Array ($[1, 2, 3])␤  in block <unit> at <tmp> line 1␤␤»
01:59 TimToady ah well
02:00 TimToady m: say Array[Array]([[1,2,3],[4,5,6],(7,8,9).Array])
02:00 camelia rakudo-moar ad5336: OUTPUT«[[1 2 3] [4 5 6] [7 8 9]]␤»
02:00 TimToady eventually we'll get more of those coercion types working
02:01 mcmillhj joined #perl6
02:03 BenGoldberg m: my Array @a = [1..3], [4..6]; say @a.WHAT;
02:03 camelia rakudo-moar ad5336: OUTPUT«(Array[Array])␤»
02:03 labster joined #perl6
02:07 woolfy joined #perl6
02:21 TimToady note, however, that array assignment works item by item, so it can do one level for free like that; binding, not so much
02:21 TimToady m: my Array @a := [1..3], [4..6];
02:21 camelia rakudo-moar 78393d: OUTPUT«Type check failed in binding; expected Positional[Array] but got List ($([1, 2, 3], [4, 5, 6]))␤  in block <unit> at <tmp> line 1␤␤»
02:22 TimToady m: my Array @a := Array[Array]( [ [1..3], [4..6] ] );
02:22 camelia rakudo-moar 78393d: ( no output )
02:22 noganex_ joined #perl6
02:22 TimToady m: my Array @a := Array[Array]( [1..3], [4..6] );
02:22 camelia rakudo-moar 78393d: ( no output )
02:33 rgrinberg joined #perl6
02:33 sjn joined #perl6
02:36 _slade_ joined #perl6
02:36 wamba joined #perl6
02:37 mcmillhj joined #perl6
02:44 rgrinberg joined #perl6
03:00 SmokeMachine____ MasterDuke: Do you think this way is better? https://github.com/FCO/Heap/commit/455​41db8da7b1bbe4d7fe50eb1591342dfb1bbea
03:09 mcmillhj joined #perl6
03:19 stanrifkin joined #perl6
03:24 MasterDuke SmokeMachine____: it's a little late to be thinking clearly, but nothing jumps out at me
03:24 SmokeMachine____ MasterDuke: :) thanks
03:26 poohman joined #perl6
03:26 dalek ecosystem: e190a7c | (Fernando Correa de Oliveira)++ | META.list:
03:26 dalek ecosystem: Adding Heap module
03:26 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/e190a7c10f
03:26 dalek ecosystem: a076169 | MasterDuke17++ | META.list:
03:26 dalek ecosystem: Merge pull request #249 from FCO/patch-2
03:26 dalek ecosystem:
03:26 dalek ecosystem: Adding Heap module
03:26 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/a0761690c7
03:26 SmokeMachine____ :)
03:27 MasterDuke and with that i'm off...
03:31 poohman joined #perl6
03:33 Pierre_ joined #perl6
03:59 mcmillhj joined #perl6
04:11 Pierre_ joined #perl6
04:29 mcmillhj joined #perl6
04:36 cpage_ joined #perl6
04:38 perigrin joined #perl6
04:38 Sgeo joined #perl6
04:43 cgfbee joined #perl6
04:53 Actualeyes joined #perl6
04:57 mcmillhj joined #perl6
04:59 Cabanossi joined #perl6
05:05 canopus joined #perl6
05:09 ufobat joined #perl6
05:16 labster joined #perl6
05:53 domidumont joined #perl6
05:57 domidumont joined #perl6
06:00 bob777 joined #perl6
06:06 Woodi hi today :)
06:07 mcmillhj joined #perl6
06:08 hobbs joined #perl6
06:08 Woodi nice link :)  a) "featureless release"; b) fork needs to be reforked to be secure; c) yet another security category qmail was immune since qmail birthday (90s) :)  https://www.poolp.org/tech/posts/20​16/09/12/opensmtpd-6-0-0-released/
06:12 Woodi also: (XML haters)++ few days ago make me thinking about configs and qmail config-dir is very nice format :)  just eg. /var/qmail directory have files, one per config option like 'ip', 'allowedhosts' - no parsing, just simple checking required
06:16 itaipu joined #perl6
06:18 mcmillhj joined #perl6
06:23 hobbs joined #perl6
06:23 hobbs joined #perl6
06:24 nine Woodi: well it is kinda easy to be secure when you have so few features to be practically useless
06:27 firstdayonthejob joined #perl6
06:29 Woodi nine: you mean qmail was/is useless or opensmtpd ?
06:30 nine qmail
06:30 Woodi heh
06:30 Woodi what features mail sending app should additionally have ? :)
06:35 nine It's not so much the sending as the receiving side. Though of course even sending of emails has moved forward with e.g. TLS being state of the art.
06:41 Woodi nine: http://inoa.net/qmail-tls/  also you just advocating dark side of the "do one thing and do it good". also messing centuries of IT history :)
06:41 nine Oh, you're not talking about qmail then.
06:42 nine You're talking about what everyone actually runs: qmail + some giant patch set which may or may not share the secruity characteristics of qmail.
06:42 Woodi nine: that's is qmail development style :)
06:43 nine Patches which have seen far less scrutiny and testing when combined while for example with postfix every single user tests exactly the same code base.
06:45 Actualeyes joined #perl6
06:46 Woodi nine: it just literaly contradicts "so few features" part :)  also: http://archive.debian.org/debian/pool/​non-free/q/qmail/qmail_1.03-47.diff.gz ; you can grep for TLS patch from 2004 there :)
06:46 nine Talking about qmail's superiority is like claiming that 'int main(void) { }' is the most secure smtp server ever with guaranteed 0 bugs. Of course it's gonna need some patches to be actually useful.
06:47 nine Woodi: if you claim that qmail is so super secure, you'd have to back that claim up for every qmail + random patches combination out there. Otherwise you're talking about qmail itself which is really useless.
06:47 Woodi nine: I dident claim superiority, it's your asumption. I am just amazed by qmail quality :)
06:47 nine Like I said: it's easy to produce quality when you don't have to deliver all that much.
06:48 Woodi nine: ! you know that qmail started in 1995 or erlier ??
06:48 nine I do.
06:49 Woodi so looks you want djb implemented whitelisting back then :)
06:50 nine No. But you're comparing the quality of code implementing the tiny 1995 feature set with 2016 smtp servers.
06:52 Woodi No. I just compare 2016 feature to 1995 codebase :)
06:53 nine I don't think, I understood that sentence
06:53 Woodi btw. check sendmail from 1995 and compare it to qmail from that year: feature minimalism you dislike was and still is state of art
06:56 Woodi nine: but I must say that just after posting that first link I realized that qmail just do a lot of forking but I'm not sure it is equivalent to what opensmtpd just implemented :)  but I bet 5$ on qmail :)
06:57 nine Compare qmail to postfix. The latter is pretty much as secure but also actually useful
06:58 Woodi nine: it's just developed in standard way and we trust postfix codebase :)  do it have bugs now ? we can't now know :)
06:59 nine neither can we with qmail
07:00 Woodi I remember djb stated that qmail have 4 bugs he knows about :)
07:00 nadim joined #perl6
07:00 nine So? Unless he's got superhuman powers he cannot know if that's all.
07:01 Woodi nine: yes. but best we can do is have as simple code as we can, without unnecesary features...
07:01 Woodi like with optimisations: best rule is: do less
07:02 nine The whole point is that qmail doesn't even have the necessary features!
07:03 Woodi nine: disagree on that. you just pointing to vanilla qmail 1.03
07:03 nine Which cannot even do TLS so I could _legally_ not even use it to send mail to our customers.
07:04 nine And if you start with the patches again, then please show how they are just as secure as qmail 1.03.
07:04 Woodi nine: how postfix shows security ? :)
07:06 Woodi 3rd. TLS link:  http://www.qmail.org/netqmail/  :)
07:06 Woodi oops, yhis one not work :)
07:07 * konobi sticks with nullmailer
07:08 nine netqmail is not qmail! qmail is useless, netqmail is not as secure. Please pick which one you're talking about and stick with it
07:14 Woodi nine: netqmail or qmail + selected patches as in debian pkg is the only qmail you should use
07:15 nine And does it have qmail's security guarantee? Nope.
07:15 wamba joined #perl6
07:15 nine Also why should I use a Debian package on openSUSE?
07:16 moritz Woodi, nine: I think you're derailing #perl6 a bit here
07:16 moritz not that there is a huge swath of perl 6 discussion that's being derailed though... :-)
07:16 darutoko joined #perl6
07:17 Woodi moritz: right, EOS
07:18 mcmillhj joined #perl6
07:20 zakharyas joined #perl6
07:20 zengargoyle darn, i was waiting to see which email thingy i should install :P
07:21 moritz zengargoyle: exim!
07:21 * moritz runs away
07:24 rudolfochrist joined #perl6
07:25 zengargoyle moritz: how often is https://github.com/moritz/perl6-all-modules.git updated?
07:28 zengargoyle went looking for a module and found it on modules.perl6.org but not in that repo.
07:30 mcmillhj joined #perl6
07:31 rindolf joined #perl6
07:32 itaipu joined #perl6
07:38 moritz zengargoyle: irregularly, but I've already done it this week
07:39 moritz zengargoyle: you can look into _tools/populate.p6 in that repo, which does the updating. Maybe it fails to extract some source URLs from the meta files
07:40 zengargoyle https://github.com/Altai-man/p6-Texas-To-Uni  -- what i remembered from a blog post somewhere and on modules.perl6.org but not in repo fetched today and seemingly up-to-date.
07:41 zengargoyle might poke around it later and try and figure out what's up.
07:43 * zengargoyle watching end of Farscape now. :P
07:45 stmuk postfix!
07:45 stmuk sorry :)
07:49 itaipu joined #perl6
07:49 mcmillhj joined #perl6
07:50 brrt joined #perl6
07:50 brrt .tell jnthn I can still repeat the hanging IO-Socket-Async.t test
07:50 yoleaux brrt: I'll pass your message to jnthn.
07:50 brrt this on fresh install
08:01 itaipu joined #perl6
08:07 araujo joined #perl6
08:11 araujo joined #perl6
08:14 arnsholt OpenSSL is super-weird. For example there's a macro X509_name_cmp(a,b)
08:15 arnsholt It expands to "X509_NAME_cmp((a), (b))", X509_NAME_cmp being a function
08:15 Pierre_ joined #perl6
08:20 Pierre_ joined #perl6
08:22 bjz joined #perl6
08:27 DrForr Given how the code has been exposed to be ... somewhat underwhelming.. this shouldn't come as surprising :)
08:30 arnsholt True that
08:30 arnsholt I still am though
08:31 arnsholt There's a pretty clever type-checked stack implementation though, the approach is kinda similar to Java's type erasure generics
08:37 bob777 joined #perl6
08:43 mcmillhj joined #perl6
08:46 poohman joined #perl6
08:52 user9 joined #perl6
08:54 bjz joined #perl6
08:56 poohman joined #perl6
09:10 Pierre_ joined #perl6
09:17 wamba joined #perl6
09:18 mcmillhj joined #perl6
09:24 RabidGravy joined #perl6
09:35 bjz_ joined #perl6
09:37 bjz joined #perl6
09:48 araujo joined #perl6
09:49 araujo joined #perl6
09:56 Pierre_ joined #perl6
10:11 ab6tract joined #perl6
10:11 eliasr joined #perl6
10:14 Pierre_ joined #perl6
10:23 kaare__ joined #perl6
10:24 TestNinja joined #perl6
10:24 wamba joined #perl6
10:25 TestNinja Someone messaged me on reddit... in case anyone was dying to make YouTube tutorials and wanted to know what's missing (/me certainly won't have time for any of that) https://gist.github.com/zoffixznet​/7f7f06b078c60901de753ef53e6fa3f1
10:36 Actualeyes1 joined #perl6
10:36 buggable joined #perl6
10:36 wamba joined #perl6
10:37 huggable joined #perl6
10:37 NeuralAnomaly joined #perl6
10:42 TestNinja Your regular reminder that we're looking for volunteers to fix bugs: http://perl6.fail/
10:42 TestNinja RT#129275 sounds like it might be easy enough, if you follow along with what it's trying to call that lands it in a loop
10:43 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=129275
10:46 TestNinja s: &infix:<==>
10:46 SourceBaby TestNinja, Sauce is at https://github.com/rakudo/rakudo/bl​ob/78393dd/src/core/Numeric.pm#L248
10:47 itaipu joined #perl6
10:47 TestNinja s: &infix:<==>, \(Numeric, Numeric)
10:47 SourceBaby TestNinja, Sauce is at https://github.com/rakudo/rakudo/bl​ob/78393dd/src/core/Numeric.pm#L250
10:50 TestNinja s: &infix:<==>, \(4.4, 4343)
10:50 SourceBaby TestNinja, Sauce is at https://github.com/rakudo/rakudo/​blob/78393dd/src/core/Rat.pm#L227
10:51 timotimo TestNinja: i wonder if we want to have a bot that looks at the body of an RT's OP to see if there's like an irclog with m: code and paste that code into the channel for camelia to execute?
10:51 TestNinja So the fix is very likely to be just adding multi sub infix:<==>(Numeric \a, Numeric \b)   { a == b }  candidate in https://github.com/rakudo/rakudo/bl​ob/78393dd/src/core/Numeric.pm#L250
10:51 TestNinja C'mon... step right up :)
10:53 TestNinja timotimo ¯\_(ツ)_/¯ might be misleading. Consider a ticket with several m: evals in the body, then someone comments and says "oh it should be this, but it's still buggy" and offers several more m: evals. What do you paste in the channel.
10:53 timotimo hm, right.
10:53 TestNinja m: "42.5".Numeric.^name.say
10:53 camelia rakudo-moar 78393d: OUTPUT«Rat␤»
10:54 jeek left #perl6
10:54 TestNinja The above fix suggested won't work for  class :: does Numeric {} == class :: does Numeric {}
10:54 * TestNinja & work :(
10:55 ab6tract anyone know if there is an RT already related to whatever underlying issue is causing all the pure perl http libraries to fail at concurrent requests?
10:55 ab6tract https://gist.github.com/ab5tract/​ce9b7045dcb5e0c2c215883d2688b479
10:55 ab6tract s/fail/eventually fail/
10:57 user9 joined #perl6
11:01 brrt ab5tract: platform?
11:01 brrt ab6tract
11:02 iH2O joined #perl6
11:03 iH2O can one give me an example of something that would have been done differently if the design had not been frozen in December last year
11:04 iH2O s/would/could/
11:04 stmuk you could probaby work that out from seeing what extra tests are in roast over the 6.c version of roast
11:05 bjz_ joined #perl6
11:06 iH2O is the design really frozen, with the possible exception of design bugs
11:08 brrt i think your question answers itself :-)
11:08 iH2O thx for this introdirective answer brrr
11:09 brrt hehehe
11:09 brrt if you want the exact nitty-gritty detail, i think there is a document somewhere that explains it
11:09 brrt but the short version is:
11:10 brrt future rakudo compilers are commited to ship a '6.c' compatible compiler, where 'compatible' is defined as 'passes the 6.c spec test suite''
11:11 brrt so what's actually frozen is the test suite, and what is promised is that compilers that claim to be perl6 ought to pass that suite
11:11 iH2O how comprehensive/exhaustive is the 6.c spec test suite
11:12 brrt https://github.com/perl6/roast/ see for yourself
11:12 lizmat Files=1138, Tests=52912, 269 wallclock secs (15.09 usr  4.40 sys + 1612.72 cusr 148.52 csys = 1780.73 CPU)
11:12 brrt it is fairly large :-)
11:13 ZoffixMobile joined #perl6
11:13 brrt iirc there are also some promises about deprecation cycles
11:13 ZoffixMobile That's just half of it. The full stresstest is about 129,000 tests
11:14 iH2O omg
11:14 iH2O were each of those test hand crafted
11:15 iH2O tests
11:15 ZoffixMobile More or less. Some a run via a loop several times or the input values are generated via a loop
11:15 rindolf joined #perl6
11:15 ZoffixMobile And there's a ton of untested stuff, so it'll grow more
11:15 lizmat no, many tests of numerics are actually generated  :-)
11:16 lizmat even some of the core settings code is generated  :-)
11:16 ZoffixMobile Oh
11:16 ZoffixMobile :)
11:16 jnthn The stress tests also include a bunch of Unicode conformance tests that were derived from the Unicode test sutie.
11:16 yoleaux 07:50Z <brrt> jnthn: I can still repeat the hanging IO-Socket-Async.t test
11:18 ZoffixMobile jnthn, should Supplier::Preserving be tested/documented?
11:21 jnthn ZoffixMobile: Don't see why not :)
11:21 jnthn I think it is tested indirectly since it's used by a few other things
11:22 ZoffixMobile Cool.
11:30 iH2O left #perl6
11:36 Possum joined #perl6
11:41 user9 joined #perl6
11:43 ab6tract brrt: OS X
11:43 ab6tract ugexe was seeing the same issues, not sure which platform he was testing on
11:44 lizmat Files=1185, Tests=129306, 386 wallclock secs (26.28 usr  5.27 sys + 2417.33 cusr 157.20 csys = 2606.08 CPU)  # stresstest
11:44 timotimo ZoffixMobile: i'd maybe make some youtube introductory videos if i wasn't so prone to starting a thing and not going through with it :(
11:44 ab6tract brrt: if it behaves sanely for you, i would be very curious to hear about it
11:49 ZoffixMobile timotimo, I don't really understand people's obsession with wanting Perl 6 YouTube videos to learn Perl 6 code. Can't copy paste code. Hard to go back up a bit to make sure you understood right. etc. etc.
11:49 brrt i haven't actually tried yet
11:49 brrt for some reason i never get to the 'lets implement something in perl6' stage
11:49 timotimo ZoffixMobile: yeah. still, there seems to be demand. and by posting "the slides" or a transscript you can alleviate the issues with video-based formats and still give video-needers what they want
11:49 brrt (unfortunately, but that is life)
11:50 ab6tract implementation? i've already written the script for you ;P
11:51 ZoffixMobile And I think all of these people who keep saying we don't have beginner tutorials should start writing some code rather than watching YouTube and doing tutorials.Albert Einstein said something along those lines.... about reading books
11:51 brrt true enough
11:51 brrt ZoffixMobile: i think a lot of that is 'we don't have beginners tutorials to do $some-web-task'
11:51 brrt which is true
11:51 brrt mostly
11:52 timotimo they mostly come at night
11:52 timotimo mostly ...
11:54 dylanwh joined #perl6
11:57 newbie1 joined #perl6
12:01 bioduds hi guys
12:01 bioduds Gonna try to increase min tier aws swap to test perl6 install there
12:01 bioduds ubuntu 1GB RAM
12:01 bioduds anyone knows an easy way?
12:04 brrt left #perl6
12:04 brrt joined #perl6
12:05 bioduds think i got it lets give it a try
12:08 andreoss joined #perl6
12:09 ab6tract could someone on linux give this script a try? https://gist.github.com/ab5tract/​ce9b7045dcb5e0c2c215883d2688b479
12:09 ab6tract i'm sorry but i find the fact that the only reliable option for http requests is shelling out to curl to be a highly distressing fact
12:11 andrzejku joined #perl6
12:12 bioduds its common usage today
12:12 bioduds like the installing script
12:12 ab6tract bioduds: sorry?
12:12 geekosaur bioduds, not that
12:12 bioduds i wrote
12:12 bioduds oh
12:12 bioduds sorry then
12:12 bioduds another issue, ok
12:12 bioduds sorry for the noise
12:13 geekosaur bioduds is talking about curl|sh installation, not doing http requests from perl
12:13 ab6tract got it :)
12:13 bioduds :)
12:13 bioduds by the way, testing it now on 1GB 1024 swap ubuntu
12:13 geekosaur and, you are running into concurrency bugs as I understand it. many such have been resolved recently but there still remain some and apparently at least one has stuff being routed to the wrong thread?
12:14 bioduds script seems fair now that guys have made improvements in it
12:14 geekosaur or to a black hole...
12:14 timotimo the combination of "linux", "script", "shelling out", and "curl" led - unsurprisingly - to a mis-identification
12:14 timotimo m: use NothingThatExists
12:14 camelia rakudo-moar 78393d: OUTPUT«===SORRY!===␤Could not find NothingThatExists at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-2/share/perl6␤    CompU…»
12:14 timotimo ^- a clue why it has a line number but not a filename?
12:15 ab6tract geekosaur: black hole is more like what i am seeing
12:15 ab6tract geekosaur: were you able to give it a try?
12:15 geekosaur no, I'm just going by scrollback
12:15 ab6tract i'd like to confirm whether it is os x only or a generic issue
12:16 timotimo ab6tract: i get a face full of   in block  at ua-tester.p6 line 48
12:16 timotimo 0Use of uninitialized value $url of type Any in string context.
12:16 ab6tract timotimo: provide a url :P
12:16 * geekosaur did not sleep and is not really up to much but wanted to point out that concurrency issues are known to exist still and are being actively worked on
12:16 ab6tract (sorry, i should have put a default in the sub signature)
12:16 timotimo yeah, you should have :)
12:16 timotimo or made it required
12:17 ab6tract timotimo: gist updated :)
12:17 wamba joined #perl6
12:17 timotimo what do those numbers mean?
12:18 ab6tract it prints the thread "index" that made the request
12:18 ab6tract (index meaning which of the 10 threads that were spawned)
12:18 timotimo ah
12:19 andreoss from where the usage of traits as abstract classes was borrowed?
12:20 bioduds it failed
12:21 andreoss also from where the method/submethod division was borrowed?
12:23 bioduds weird
12:24 timotimo 0000000000000000000...
12:24 ab6tract timotimo: yup. it seems like the first thread becomes the only one running after a short while
12:24 timotimo from the very start maybe
12:24 poohman joined #perl6
12:25 ab6tract timotimo: well, other threads are working here
12:25 ab6tract but the pure perl ones do always seem to end up with only 0 surviving after a while
12:26 timotimo before that i got "0 arrived", but it was just silently erroring out because i didn't have IO::Socket::SSL installed
12:26 ab6tract slightly off-topic: anyone know how to redirect $*ERR to /dev/null ?
12:26 bioduds it failed only on the path export
12:28 bioduds weird, the problem seem to be . ~/rakudo/setpath.sh on .bashrc when I changed to source ~/rakudo/setpath.sh it works
12:28 timotimo it doesn't even get into further start blocks
12:28 timotimo oh
12:28 timotimo haha
12:29 timotimo i turned the amount of fetchers down to 100
12:29 timotimo so it only tried to start a single thread
12:29 bioduds anyway, it is great cause now i can edit on cloud ides
12:29 ab6tract $*ERR = open '/dev/null', :w; # seems to work
12:29 ab6tract timotimo: :D
12:29 timotimo right. the other threads all crash and burn. sometimes a segfault happens
12:31 andreoss `submethod` does the same as `my method`?
12:31 timotimo i suspect nativecall's setup thingie isn't thread-safe
12:31 timotimo and that could cause some serious trouble
12:31 ab6tract timotimo: most of those options are PP, no?
12:31 ab6tract iiuc, only libcurl (Net::Curl) uses NativeCall
12:32 timotimo IO::Socket::SSL
12:32 andreoss no
12:32 timotimo all the backtraces i get come from the setup method from NativeCall
12:32 ab6tract timotimo: but that's because you are testing an https site :)
12:33 timotimo ... well. it's an additional problem :)
12:33 ab6tract so that is maybe a second issue
12:33 ab6tract or perhaps related
12:33 ab6tract andreoss: submethods (IIUC) are used to avoid getting called by sub-classes
12:34 timotimo submethods don't get derived, but you can directly name them by prefixing the method name with the class it's from
12:34 andreoss what `my method` does?
12:35 bjz joined #perl6
12:35 timotimo i don't think 'my method' makes that much sense
12:36 andreoss m: class Foo {  my method m { say "hi" } ; method z { self.m } }; class Bar is Foo {}; Bar.new.z
12:36 camelia rakudo-moar 78393d: OUTPUT«Method 'm' not found for invocant of class 'Bar'␤  in method z at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
12:36 andreoss m: class Foo {  my method m { say "hi" } ; method z { m(self) } }; class Bar is Foo {}; Bar.new.z
12:36 camelia rakudo-moar 78393d: OUTPUT«hi␤»
12:36 timotimo ah, cute
12:37 andreoss m: class Foo {  my method m { say "hi" } ; method z { self.&m } }; class Bar is Foo {}; Bar.new.z
12:37 camelia rakudo-moar 78393d: OUTPUT«hi␤»
12:38 timotimo i need an url that doesn't yet have https set up for it :P
12:38 timotimo maybe i'll start a server locally
12:38 andreoss seems that `my method` is not a method (cannot be called by .)
12:38 timotimo okay, that gets me "server returned no data" multiple times
12:40 ab6tract timotimo: http://fys.wtf
12:41 ab6tract that's my testing url, anyway
12:42 LeCamarade joined #perl6
12:42 zakharyas joined #perl6
12:43 jnthn andreoss: It produces a Method object, but doesn't install it in the method table.
12:43 jnthn (The default scope being `has method`)
12:45 andreoss m: my method x { 1 }; say &x.perl;
12:45 camelia rakudo-moar 78393d: OUTPUT«method x (Mu $: *%_) { #`(Method|54790464) ... }␤»
12:54 _slade_ joined #perl6
12:54 prammer joined #perl6
12:58 bioduds sometimes I'm feeling like I need to re-learn how to program in order to work with Perl6. you have to unlearn what you have learned, said Yoda
12:59 wamba joined #perl6
13:01 brrt left #perl6
13:01 ab6tract bioduds: its not wrong :)
13:02 ab6tract *it's
13:02 bioduds it is not :) truth seems is our brains are damaged by twisted programming techniques
13:04 bioduds going to declarative programming seems like a leap of faith
13:04 bioduds something in the back of my head keeps saying "oh, wait, should I trust this?"
13:05 perlpilot bioduds: you mistrust regex?
13:06 cdg joined #perl6
13:06 bioduds :) i didn't dive into new regex in P6 but I may
13:07 DrForr https://theperlfisher.blogspot.ro/ # has an article series on them from a while back.
13:07 bioduds tx DrForr
13:11 perlpilot bioduds: even P5 regex are very declarative.  Do you have faith in them?  Do you trust P5 regex?  :)
13:12 mst how did we suddenrly get to mistrusting regexps?
13:12 AlexDaniel joined #perl6
13:12 mst did one sleep with your sister?
13:12 AlexDaniel what
13:12 AlexDaniel that was a really weird moment to join…
13:13 huf well, reginald is a weird name...
13:13 bioduds yes, yes. I do. It's a malicious voice on the back of the head is what I mean. lol. Caused by years of suffering with that line of code you wrote that just didn't predict some crashing scenario. lol. you know what I mean?
13:13 perlpilot AlexDaniel: All #perl* are ... "interesting"  ;-)
13:13 AlexDaniel perlpilot: because of mst? :)
13:14 mst AlexDaniel: you're welcome
13:14 perlpilot AlexDaniel: he's one instrument in the #perl orchestra
13:14 huf bioduds: as long as you trust psychiatrists, there is help out there.
13:15 bioduds genau :)
13:15 mcmillhj joined #perl6
13:17 AlexDaniel committable6: releases use Foo
13:17 committable6 AlexDaniel, https://gist.github.com/9731​f91e7237a300765485e0ae62e6f3
13:19 bioduds I need an IDE that allows to add symbols like Word
13:19 rgrinberg joined #perl6
13:19 bioduds unicode
13:20 DrForr bioduds: XCompose and friemds?
13:20 timotimo vim has a set of digraphs
13:20 LeCamarade Yes.
13:20 timotimo we do have a document about inputting unicode symbols and stuff
13:20 timotimo on the docs site
13:20 AlexDaniel bisectable6: use MONKEY-SEE-NO-EVAL; try { EVAL "use Foo"; CATCH { default { exit ($_ ~~ ‘at line’ ?? 1 !! 0) } } }
13:21 AlexDaniel dammit
13:21 Pierre__ joined #perl6
13:21 avar joined #perl6
13:21 bisectable6 joined #perl6
13:21 AlexDaniel bisectable6: use MONKEY-SEE-NO-EVAL; try { EVAL "use Foo"; CATCH { default { exit ($_ ~~ ‘at line’ ?? 1 !! 0) } } }
13:21 bisectable6 AlexDaniel, On both starting points (good=2015.12 bad=b771f1e) the exit code is 0 and the output is identical as well
13:21 bisectable6 AlexDaniel, Output on both points:
13:21 AlexDaniel bisectable6: use MONKEY-SEE-NO-EVAL; try { EVAL "use Foo"; CATCH { default { exit ($_ ~~ ‘at line’ ?? 1 !! 0) } } }
13:22 bisectable6 AlexDaniel, On both starting points (good=2015.12 bad=b771f1e) the exit code is 0 and the output is identical as well
13:22 bisectable6 AlexDaniel, Output on both points:
13:23 AlexDaniel bisectable6: use MONKEY-SEE-NO-EVAL; try { EVAL "use Foo"; CATCH { default { exit ($_ ~~ /‘at line’/ ?? 1 !! 0) } } }
13:24 bisectable6 joined #perl6
13:24 AlexDaniel bisectable6: use MONKEY-SEE-NO-EVAL; try { EVAL "use Foo"; CATCH { default { exit ($_ ~~ /‘at line’/ ?? 1 !! 0) } } }
13:24 AlexDaniel MasterDuke: :(
13:24 bisectable6 joined #perl6
13:24 avar joined #perl6
13:25 bisectable6 joined #perl6
13:25 timotimo :o
13:25 bisectable6_ joined #perl6
13:25 MetaZoffix joined #perl6
13:26 bisectable6 joined #perl6
13:26 rgrinberg joined #perl6
13:28 skids joined #perl6
13:30 jkramer Ahoy
13:31 timotimo ohai
13:32 gfldex joined #perl6
13:32 bisectable6 joined #perl6
13:32 jkramer m: my Str %h{Int}; %h{1} = 'foo'; my $i = IntStr.new(1, '1'); %h{$i}.defined.say;
13:32 camelia rakudo-moar 78393d: OUTPUT«False␤»
13:32 jkramer Is this a bug or wanted behavior?
13:32 telex joined #perl6
13:33 timotimo hm. well, you're getting an object hash and its WHICH will probably give a very different value than the int itself ...
13:34 jkramer So the WHICH is used for the keys in hashes?
13:35 timotimo in object hashes, at least
13:35 timotimo and a hash keyed on Int is an object hash
13:35 jkramer Hmm ok
13:35 timotimo though in theory we could create something special for that
13:35 timotimo in general, this is a problematic case :(
13:36 MetaZoffix jkramer: the same issue exists with Sets/Bags/Mixes. You parametarize by Int, of which IntStr is one, but an Int object is not the same as an IntStr object, which is why the key doesn't match
13:36 jkramer Yeah, I would've thought that since the key type is Int and IntStr is an Int, it would do something smart such as using $key.Int as $key or something, no idea :)
13:36 MetaZoffix not-a-bug
13:36 jkramer Alright
13:36 MetaZoffix There's a module for this stuff in eco
13:37 MetaZoffix Quantum something
13:37 jkramer Just stumbled over it and couldn't figure out why it wouldn't find my int key until I figured out it was an IntStr
13:37 MetaZoffix http://modules.perl6.org/dist/Quantum::Collapse
13:39 mst oh, neat
13:39 MilkmanDan joined #perl6
13:42 gfldex joined #perl6
13:42 gfldex
13:50 bioduds hey guys, is it already possible to have https://install.perl6.org pointing to https://raw.githubusercontent.com/bio​duds/perl6-oneliner/master/install.sh ?
13:50 bioduds would you be so kind as to evaluate it? tx :)
13:51 MetaZoffix I don't think it's a good idea to point it to GitHub TBH
13:52 moritz more like, have it clone the repo and serve the file directly
13:52 MetaZoffix Yeah
13:52 moritz and maybe fork the repo into the perl6/ org, to give the community a bit more control
13:53 MetaZoffix +1
13:53 moritz I'll try to remember doing that tonight
13:53 sftp joined #perl6
13:53 bioduds great :)
13:53 jkramer Is there a reason why I can't use the colon syntax for method arguments together with $.method instead of self.method?
13:53 bioduds its a main orientation for perl6 installation
13:53 bioduds specially for beginners
13:53 jkramer Eg self.foo: 123; works, but $.foo: 123 doesn't
13:53 bioduds it worked on all 2Gb linux tested so far
13:53 timotimo $.method really is a shortcut for when that's just an accessor
13:54 bioduds DrForr did on OpenBSD
13:54 bioduds and Debian Jessie
13:54 bioduds MacOX worked too
13:54 bioduds :)
13:54 bioduds ubuntu and centos ok
13:54 timotimo so it's a tiny bit expected that it doesn't make it sugary to add arguments
13:54 timotimo but it's still a surprising omission maybe
13:55 jkramer Yeah, especially since in the docs it says: Within methods, something like $.origin is the same thing as self.origin.
13:56 gfldex joined #perl6
13:56 moritz I might be a bit braindead right now, but wouldn't that change the semantics of indirect method calls when the argument is such an access?
13:56 MetaZoffix joined #perl6
13:56 moritz jkramer: the first step should be to adjust the documentation to make the limitations clearer. Would you please do that?
13:57 FROGGS joined #perl6
13:58 moritz some of us are hit with the curse of not having the perspective of the unknowing
13:58 timotimo oh, that's a good point, moritz
14:01 jmark joined #perl6
14:05 jkramer moritz: https://github.com/perl6/doc/pull/909
14:06 wamba joined #perl6
14:07 prammer joined #perl6
14:07 andrzejku joined #perl6
14:08 dalek doc: 3965a9c | (Jonas Kramer)++ | doc/Language/objects.pod6:
14:08 dalek doc: Clarify that "$.method:" syntax is not supported.
14:08 dalek doc: review: https://github.com/perl6/doc/commit/3965a9cf4a
14:08 dalek doc: 1b67130 | moritz++ | doc/Language/objects.pod6:
14:08 dalek doc: Merge pull request #909 from jkramer/patch-1
14:08 dalek doc:
14:08 dalek doc: Clarify that "$.method:" syntax is not supported.
14:08 dalek doc: review: https://github.com/perl6/doc/commit/1b67130b92
14:08 timotimo cool, github rolled out some sort of reviewing process stuff
14:08 perigrin joined #perl6
14:09 _slade_ joined #perl6
14:09 moritz jkramer: thanks!
14:10 jkramer np :)
14:10 perigrin joined #perl6
14:10 perlawhirl joined #perl6
14:11 perlawhirl ahoy hoy
14:12 timotimo heyo
14:12 MilkmanDan joined #perl6
14:14 perlawhirl bioduds: While I am one of those who wouldn't 'curl | sh', I was looking at your install script last week and... well, a cleanup turned into a rewrite.
14:14 perlawhirl https://gist.github.com/0racle/3​d157c4ff7777cbeb2cce74dcdcee130
14:14 user9 joined #perl6
14:14 perlawhirl I've only tested it on ubuntu thus far, but it makes less assumptions about what shell you're running
14:14 perlawhirl and it usese pretty colours! So, umm... steal from it if you wish... or not.
14:17 rgrinberg joined #perl6
14:25 araujo_ joined #perl6
14:27 perlawhirl joined #perl6
14:27 Woodi perlawhirl: Oh noes! "command not found: curl", can it be switched to wget ? btw. I'm big fan of wget... ;)  perlawhirl++
14:27 canopus joined #perl6
14:27 perlawhirl It's already on my brain
14:27 araujo_ joined #perl6
14:28 perlawhirl I am ammending it to failover to wget if curl is unavailble
14:28 perlawhirl really it should probably check for the existence of either command before commencing
14:28 khw joined #perl6
14:32 Woodi do using ~/.profile make it needs relog ? anyway *not adding* things into login would be better. user always can source ~/rakudo/setpath.sh himself
14:34 perlawhirl Woodi: yes, you would need to re-login to run .profile, but on the positive, it's shell agnostic, and only runs once (ie, not every time a new session is created)
14:36 El_Che Woodi: fan of wget? you're old like me :)
14:36 perlawhirl additionally... if i recall, bioduds was advocating for the one liner to be 'curl foo | sh ; . ~/rakudo/setpath.sh
14:36 perlawhirl so the export would happen at install... and path would only get set once per login session from then on
14:37 Upasaka joined #perl6
14:39 perlawhirl yah, if it's a straight file download i tend to reach for wget out of habit.
14:39 perlawhirl but curl is what the kids are using these days
14:41 perlawhirl i'm not really old school, i just sound old :D only started using linux ~5 years ago
14:49 El_Che :)
14:55 Woodi so, kid install rakudo into ~/rakudo; what kid should do next ? :)
14:56 rindolf joined #perl6
15:01 perlpilot Woodi: play
15:02 ugexe ab6tract: interestingly using pure perl6 (creating, writing, and reading the socket inside a single thread) makes all 1000 requests https://gist.github.com/ugexe/3​64c3cf3e58873fbbb989616b4591fb5
15:02 Woodi perlpilot: so MS is only allowed to have education path ? and also you could graduate into Novell Network Sprcialist :)
15:03 Woodi in 90s ;)
15:06 pmurias joined #perl6
15:17 rgrinberg joined #perl6
15:17 perlpilot El_Che: The difference in age between curl and wget is less than 2 years, so I'm not sure how being a fan of one or the other equates to "being old"  :)
15:18 zakharyas joined #perl6
15:18 timotimo i heard curl is better than wget
15:18 perlawhirl yeah... i feel like it's the more actively developed one
15:19 timotimo also it has libcurl, i'm not sure wget has something like that?
15:19 gfldex curl was able to talk ssl when wget doesn't. That's where the curl-is-better-then-wget-myth comes from.
15:19 perlawhirl anyways...
15:19 perlawhirl Woodi: script has been updated now
15:19 perlawhirl will check for the existence of curl or wget and use whichever is available
15:19 perlawhirl or die with a error
15:20 perlpilot gfldex: curl also understands a butt load more protocols than wget
15:21 perlawhirl I'm sure it was probably mst who said it, but since we require perl 5.10.1 to build, the install script may as well be in perl.
15:22 perlawhirl takes care of a whole host of gotcha's you gotta look out for writing shell scripts
15:24 LeCamarade Yes.
15:26 LeCamarade I almost can't understand Perl things, especially Perl 6 things, looking any lower down the spectrum than Perl 5.
15:28 harmil_wk TimToady: Thanks for the input, I updated the exception info on Rosetta Code
15:29 lostinfog joined #perl6
15:29 perlpilot LeCamarade: Perl things are like other programming language things, but not all from the same language.  :-)
15:29 LeCamarade I am about to re-write a Perl 6 app (the first re-write on this scale in the language), mostly to clean out earlier OOP naiveties. I am not yet over the initial excitement about all this. I waited ten years.
15:31 LeCamarade perlpilot Well, before there was a proper and well-done break with, say, bash-syntax, you could justify writing your Perl in bash. But if it is Perl 6 ...
15:31 harmil_wk Generally speaking things meant to install cleanly on Unix/Linux systems take advantage of the portability that comes from tools like install, autoconf, etc.
15:32 LeCamarade Oh, I forget you are Perl 6 _developers_.
15:32 LeCamarade As in, the guys making Perl 6 available. Okay ... maybe.
15:32 grondilu joined #perl6
15:32 Woodi wget (probably) always was point&download tool but curl was library first so wasn't a first choice when you just wanted to get thing into disk. wget is also spider :)
15:33 LeCamarade Still, I only script in Perl 6 now. I only code in two languages now, the other one being Haskell, which I discovered from the time of the Pugs implementation.
15:33 timotimo i tried to mirror the SDL2 wiki for reference on the train ... i got thrown out of the website relatively soon, but not after i mirrored the main page in like 20 different languages i can't read ...
15:33 perlawhirl LeCamarade: This is a general perl6 channel... for developer and users alike.
15:34 perlpilot LeCamarade: those 2 languages are quite the pair.  Add a little C and you can do anything.
15:34 harmil_wk perlawhirl: wait, we let *developers* in here? When did we lower our standards?! ;)
15:35 perlawhirl HA!
15:35 LeCamarade perlpilot Exactly. The way I work, I need a "100-year language".
15:36 ka joined #perl6
15:37 ab6tract ugexe: :O
15:37 ab6tract can't tell if that makes me feel better.. or worse
15:38 ugexe i think that just makes it some extension of the 'cant read a handle that was created in another thread', although the fact there is no error output says otherwise
15:39 timotimo don't we throw an exception when we notice something is trying to use a foreign-thread socket?
15:39 ugexe yep
15:40 ugexe but there is no error output period even though the threads quickly die off. so its possible its getting swallowed up somewhere
15:40 LeCamarade perlpilot I hope for a Perl 6 implementation that is not written in C. If it comes to it, I will resurrect Pugs. I do not want C included in the list, although it is how I earn bread these days ...
15:41 timotimo ugexe: did you put a CATCH inside the start to .say the exception? rather than just letting the thread end silently?
15:41 mst LeCamarade: well, you'd only need ro replace MoarVM
15:41 perlpilot LeCamarade: That is an odd thing to want IMHO, but a P6 implementation in Haskell would be quite awesome.
15:41 LeCamarade So, my ideal world has Perl 6 for lower-register work, which is most work, and Haskell for either what we want to prove things about or what we extract from provers.
15:41 timotimo is there a JVM that's not written in C? well, i suspect the oracle jvm is written in cpp perhaps?
15:42 perlawhirl .tell bioduds a cleanup of your script turned into a rewrite. Feel free to steal any ideas from here: https://gist.github.com/0racle/3​d157c4ff7777cbeb2cce74dcdcee130
15:42 yoleaux perlawhirl: I'll pass your message to bioduds.
15:42 ugexe timotimo: ah there we go!
15:42 ugexe http useragent instantly dies with segmentation fault now (no requests are sent either)
15:43 ab6tract ugexe: ... yay? ;)
15:43 ugexe net-http sends a few requests before barfing up subbuf out of range errors
15:43 ab6tract ugexe: did you see my floppy one liner for crashing net-http last night?
15:43 ab6tract s/floppy/flappy/
15:44 timotimo i expect those modules have some over-sharing going on that shouldn't be happening
15:44 timotimo and thus their data structures change from under their feet and they get confused
15:44 ab6tract well
15:44 ab6tract i don't know if this extends into library code
15:44 LeCamarade But I would also probably structure the processor differently in that ideal World; I would probably run on something like the GreenArrays chips and generate Forth, which would be a tolerable alternative to having any C "down there."
15:44 ugexe ab6tract: yeah, ive hit that before but never figured it out
15:44 ab6tract but even constructing a hash inside of threads can cause segfaults
15:44 timotimo some ways to segfault moarvm with concurrent access is 1) to grow a list from multiple threads or one thread and access from another (due for a fix maybe before next month's release)
15:45 timotimo and 2) to write to hashes, causing resizes
15:45 timotimo those are probably the simplest way to make your code explode
15:45 ab6tract but my script goes to lengths to make sure that there is a unique agent per thread
15:46 ab6tract and each agent should be doing one operation per iteration
15:46 timotimo yeah
15:46 timotimo so there must be over-sharing happening that's not supposed to be there
15:47 LeCamarade mst I am honestly tired of the whole computing backlog we have right now. I want to take the Perl 6 clean-break all the way even to the processor. Second System Done Right. Seriously.
15:47 ugexe `From argument to subbuf out of range. Is: { ... }` # this is what net::http eventually dies with (`last if $buf.subbuf(*-$CRLF-BYTES) eq $CRLF;`)
15:48 LeCamarade mst, So I just want the Perl 6 spec, and I really want to leave everything else behind. Spec and tests. Good thing is, I acn use MoarVM now to start building pieces of that ideal World, and I am currently rewriting one such piece.
15:48 ab6tract ugexe++
15:49 mst LeCamarade: why leave behind rakudo and nqp?
15:49 mst LeCamarade: NQP is designed to have alternative implementations
15:50 rindolf joined #perl6
15:50 newbie1 joined #perl6
15:50 LeCamarade mst, Okay, but I may be programming this computer in Forth from the beginning. Can I still use more than just the spec?
15:50 LeCamarade
15:50 LeCamarade http://www.greenarraychips.com/​home/documents/index.html#GA144
15:51 perlpilot .oO( I want to build on the shoulders of giants ... after I've cut the legs out from under them and installed some new ones )
15:51 mst LeCamarade: yes
15:51 LeCamarade I am no pro in the implementation we have now, which I am using. I just know the language is perfect. Now to fix everything else. Mostly in Perl 6.,
15:52 mst LeCamarade: and yet your first proposed step is to throw away lots of perl6 code
15:52 mst LeCamarade: which is why I'm confused by your ideas
15:52 mst LeCamarade: I see no reason you couldn't write a forth implementation of NQP
15:52 LeCamarade Oh, you mean the Perl 6 bits. I get to keep those, thank you.
15:53 LeCamarade And even the C parts, until I have to leave them, or can leave them.
15:53 mst LeCamarade: my point is that rakudo mostly is perl6 and nqp code, and then nqp abstracts stuff like MoarVM/JVM/etc.
15:53 mst so starting with 'just the spec' implies throwing away rakudo
15:53 mst rather than just writing a new nqp backend
15:54 domidumont joined #perl6
15:54 melezhik_ joined #perl6
15:54 pmurias a new QAST backend
15:55 pmurias nqp is used to refer both to the NQP language itself and the QAST + runtime
15:56 LeCamarade Okay, so I would compile Rakudo with something like --gen-ga144vm-backend?
15:56 LeCamarade Hmm.
15:57 pmurias LeCamarade: Rakudo compiles Perl 6 to an AST called QAST
15:57 perlpilot LeCamarade: Do you know about https://github.com/edumentab/r​akudo-and-nqp-internals-course ?
15:57 LeCamarade mst, Okay the other problem now is that I intend to kick out Unix, for sure.
15:57 mst LeCamarade: perl6 expects surprisingly little unix
15:57 mst LeCamarade: it doesn't even have fork()
15:58 LeCamarade perlpilot No, I hadn't. Thanks; good to have this one.
16:01 andrzejku joined #perl6
16:03 LeCamarade mst, What I mean is: how much of Rakudo can I use if the "kernel" is ... a Forth machine?
16:04 japhb LeCamarade: That depends on how big your Forth's memory space is.  You won't fit it in a 16-bit Forth.
16:05 japhb At the moment, you couldn't even fit Rakudo in something with a 24-bit address space.  (I dunno about NQP, that might fit.)
16:06 pmurias LeCamarade: you want to compile and write programs on a Forth machine or just run then on it?
16:06 LeCamarade japhb So you see my problem now? However, I know that I will not stop writing Perl 6 code, and the computer may change from the Intel X1000 I am trying to compile Rakudo to, to that GA144.
16:09 mcmillhj joined #perl6
16:09 cibs joined #perl6
16:09 LeCamarade pmurias Good question. Here is the background: I expect three levels of "DevOps" (for lack of a better term) maintenance of these computers. The important consideration now, or here, there is the language, on each of these levels.
16:09 japhb LeCamarade: The problem is that Perl 6 *itself* is large enough, I don't know that there's any encoding of it that would fit into an 18-bit address space.
16:10 japhb I suppose if you designed your own virtual memory and paged it ...
16:11 LeCamarade japhb Well, Chuck Moore has a lousy "solution" that he demo'd in one of his fireside chats, but I was not moved. It is a problem with that chip's design. But consider an alternative Forth machine.
16:12 mst LeCamarade: given a sufficiently powerful forth machine, I would presume ... quite a bit?
16:12 rgrinberg joined #perl6
16:13 japhb LeCamarade: If you had a 32-bit Forth, you could do it no problem, I suspect -- and then it would be exactly the right thing to create an nqp-forth backend.  The biggest issue I think is just that Perl 6 is a large language, so if you start going small, you start having to invent pretty nifty methods of packing it all in and not completely losing every last bit of performance.
16:13 mst are you trying to use this example to scare people because it's not x86? because I am aware things that aren't x86 exist without that :)
16:13 LeCamarade So, Forth machine, with virtual memory if necessary, scripted in Perl 6, and everything else (in this case, if I am justified, including the Perl 6 compiler, or bits of it) in Haskell.
16:13 japhb So Perl 6 on (possibly NQP on) Haskell on Forth?
16:14 LeCamarade Yes.
16:14 japhb Woah.  That is ... going to stretch your time commitments.
16:15 LeCamarade Or my wallet? :-D But seriously, thank God I have Perl 6, eh? More-seriously, that is why I have started writing some of the Perl 6 stuff. I have no time.
16:15 LeCamarade ... to waste. :-D
16:16 ugexe m: say Buf.new(1,2,3,4,5).subbuf(0..10)
16:16 camelia rakudo-moar 4a954d: OUTPUT«Buf:0x<01 02 03 04 05 00 00 00 00 00 00>␤»
16:16 ugexe m: say Buf.new(1,2,3,4,5).subbuf(*-10)
16:16 camelia rakudo-moar 4a954d: OUTPUT«From argument to subbuf out of range. Is: { ... }, should be in 0..5; use *-5 if you want to index relative to the end␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
16:16 japhb I see a lot of Forths written on Haskell, but Google isn't showing me much of the converse
16:16 ugexe should be in 0..5, yet the previous example is 0..10
16:16 prammer joined #perl6
16:17 japhb Ooh, though I did find a reference to a Haskell written in Lisp: https://plus.google.com/+Jos​ieAltzman/posts/hnnhraDx212
16:18 Xliff joined #perl6
16:20 Woodi tinkering++ :)
16:20 MetaZoffix joined #perl6
16:21 LeCamarade japhb One alternative has been to do ForthOS on this X1000 and start there. But I still think Chuck Moore may deliver a final exegesis to his disciples, of whom I am one, as indeed TimToady did with Perl 6. So I am not yet decided on the computer itself.
16:24 pmurias LeCamarade: what would be the point of developing on a machine that's not even 32bit?
16:24 mcmillhj joined #perl6
16:25 pmurias LeCamarade: or is it meant to be a self imposed challenge?
16:25 japhb pmurias: Chuck Moore disciple.  It is a powerful muse.
16:25 japhb *He's a
16:27 Woodi v6 on Forth is probably fastest way to have Perl6 in space :)
16:27 rgrinberg joined #perl6
16:28 pmurias Making Rakudo compile Perl 6 to forth by adding a backends seems like a feasible project
16:28 pmurias reimplementing Rakudo on a 18bit machine much less so
16:28 DrForr It gives you a chance to use UTF-9 :)
16:30 LeCamarade pmurias Well, I am convinced that the chips that willbe strategic victors in the turbulent times coming ahead, especially once EMP weapons really come of age, will be like these chips.
16:31 pmurias LeCamarade: for developer workstations?
16:31 TimToady joined #perl6
16:31 LeCamarade japhb Hey! :-D I also have class (Haskell) and religion (Perl 6). But I just think Chuck Moore's approaches are the "survivors" in the future, so I have sat at his feet.
16:32 Woodi LeCamarade: Forth is stack based ?
16:32 LeCamarade pmurias Portable e-Bibles. Home computers.
16:32 Xliff m: Buf.^methods.say
16:32 camelia rakudo-moar 915470: OUTPUT«(reallocate)␤»
16:32 LeCamarade Woodi, Yes, it is.
16:32 Xliff m: Buf.new.^methods.say
16:33 camelia rakudo-moar 915470: OUTPUT«(COMPARE unpack allocate of join Int encoding subbuf Numeric reverse chars bytes contents SAME decode reallocate WHICH Method+{<anon|74835536>}.new Method+{<anon|74835536>}.new Method+{<anon|74835536>}.new pop shift splice Method+{<anon|74835536>}.new Meth…»
16:34 Xliff That took a long time.
16:35 LeCamarade pmurias Then later, if it is interesting, desktop computers. And then "computers" as we have understood them since the 1990s.
16:36 mcmillhj joined #perl6
16:40 buggable joined #perl6
16:41 LeCamarade Even the calendar is changing on this system. Au revoir, Gregoire. So, as it happens, an implementation of this calendar is, for the second time, the "first" thing I write in Perl 6:
16:41 LeCamarade https://www.wikiwand.com/en/H​anke-Henry_Permanent_Calendar
16:43 prammer joined #perl6
16:48 domidumont joined #perl6
16:50 mcmillhj joined #perl6
17:00 araujo__ joined #perl6
17:00 moritz .u ١
17:00 yoleaux U+0661 ARABIC-INDIC DIGIT ONE [Nd] (١)
17:02 mst LeCamarade: also Swatch Beat Time, or a 2^N based variant
17:02 araujo__ joined #perl6
17:04 LeCamarade mst, Very interesting. I had no idea about this one.
17:05 araujo__ joined #perl6
17:07 mst 65536 ticks per day might work out nicely, that makes them ~1.3s
17:07 canopus joined #perl6
17:08 araujo__ joined #perl6
17:08 mst and then a kilotick becomes ~22m
17:09 mst and a megatick 15.25 days etc.
17:18 ugexe ab5tract_: I've sorta narrowed it down to `$sock.recv` not always returning any data. for Net::HTTP I changed the recv for byte 1 inside a loop that only ends once it gives a true value for $data.?bytes. I'm getting 950-1000 requests through this way
17:19 ugexe those other 50ish requests die from a strange error `Method 'has-phasers' not found for invocant of class 'Buf[uint8]'`
17:19 ugexe see: https://gist.github.com/ugexe/c​7a14c1e78b19c26ede328220fa225e6
17:20 itaipu joined #perl6
17:32 ugexe if I run it enough times I occasionally get this:
17:32 ugexe *** Error in `/home/nickl/.rakudobrew/moar​-blead-nom/install/bin/moar': double free or corruption (fasttop): 0x000000000cf388b0 ***
17:33 ab6tract joined #perl6
17:42 gfldex ugexe: do you got more then 1 thread?
17:42 ugexe yes
17:44 gfldex ugexe: i get the same (and segfaults) with more then 1 thread
17:47 ugexe with the change in the gist its able to keep 9/10 threads running until the end sending 950 http requests. without the change all the threads die before hitting 150
17:50 zakharyas joined #perl6
17:50 ab6tract ugexe: thanks again for your pure perl 6 version!
17:50 ab6tract it's about 3 seconds faster than shelling out
17:51 ab6tract which was some good news, at least
17:51 ugexe ab6tract: well its also not parsing the request. its just getting the first `line` which may or may not even be valid
17:51 timotimo ugexe, cant look necause phone, what changes did that for you?
17:52 ab6tract ugexe: fair enough :)
17:52 timotimo oh
17:52 ugexe timotimo: $buf = $sock.recv(1) to $buf = { loop until $sock.recv(1) actually gives a byte }
17:53 timotimo well tjose errors you pasted do hint at memory corruption that can come fromconxurrent access to some things that dont support it
17:54 El_Che Fresh rakudo rpm's/debs for rakudo users: https://github.com/nxadm/rakudo-pkg/releases/
17:54 ab6tract i wonder if $sock.recv should be returning a promise ..
17:56 moritz on IO::Socket::INET or on the async socket stuff?
17:56 ab6tract ugexe: actually the pp6 version seems to have the same output as the shell out
17:56 ab6tract moritz: ah, right. i forgot about IO::Socket::Async
17:57 ugexe ab6tract: the difference is a single character when it happens
17:58 ugexe that throws off subbuf for net-http, http-useragent, etc
17:58 ab6tract moritz: my first thought was actually that maybe the higher level agent libraries should be returning promises
17:58 ab6tract ugexe: ouch :(
18:00 ab6tract ugexe: and that's what is breaking out of the threads early?
18:00 ab6tract *breaking them out
18:01 ugexe ab6tract: it seems that way. there are still segfaults but they happen way less
18:03 rgrinberg joined #perl6
18:03 ugexe fwiw net-http uses a mix of promises and supply, but because of accessing data from handles outside the originating thread it still ends up needing to block
18:06 rindolf joined #perl6
18:07 ugexe i can't figure out where this "Method 'has-phasers' not found for invocant of class 'Buf[uint8]'" is coming from
18:10 ab6tract maybe it's coming from a scope that has suddenly gone missing?
18:10 ab6tract s: method has-phasers
18:10 SourceBaby ab6tract, Something's wrong: â�¤ERR: [31m===[0mSORRY![31m===[0m Error while compiling -eâ�¤Missing blockâ�¤at -e:6â�¤------> [32m    put sourcery( method has-phasers [33mâ��[31m)[1];[0mâ�¤
18:10 ab6tract (my first time trying that)
18:12 geekosaur s: Buf, "has-phasers", \()
18:12 SourceBaby geekosaur, Something's wrong: ␤ERR: Too many positionals passed; expected 2 arguments but got 3␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-​Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 25␤  in block <unit> at -e line 6␤␤
18:13 geekosaur whoops
18:13 ab6tract s: Block, "has-phasers"
18:13 SourceBaby ab6tract, Sauce is at https://github.com/rakudo/rakudo/b​lob/e406758/src/core/Block.pm#L36
18:14 ab6tract pretty darn neat. Zoffix++ ++ ++
18:15 trnh joined #perl6
18:17 ab6tract s: Any, "has-phasers"
18:17 SourceBaby ab6tract, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Nil (Nil)␤  in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-​Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-​Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤  in block <unit> at -e line 6␤␤
18:17 ab6tract s: Any-iterable, "has-phasers"
18:17 SourceBaby ab6tract, Something's wrong: â�¤ERR: [31m===[0mSORRY![31m===[0m Error while compiling -eâ�¤Undeclared name:â�¤    Any-iterable used at line 6â�¤â�¤
18:18 ab6tract nope, they seem to only be on the block
18:19 ab6tract so it seems like there is a bug somewhere that causes a buf to be put in a container where a block should be (according to core, presumably?)
18:20 itaipu joined #perl6
18:20 firstdayonthejob joined #perl6
18:23 labster joined #perl6
18:27 MetaZoffix joined #perl6
18:28 ab6tract there are two calls to has-phasers Any-iterable-methods.pm, one is guarded by Callable:D in the signature and the other by nqp::istype(&block, Block)
18:28 ab6tract *in Any-iterable-methods.pm
18:29 ab6tract so yeah, that is pretty darn mysterious, ugexe :S
18:31 lizmat this smells more like memory corruption
18:31 ab6tract lizmat: indeed
18:31 lizmat and the type of error I get when running "HARNESS_TYPE=6 make spectest"
18:32 lizmat about 50% of the time, it stops somewhere with having a method called on something it cannot handle
18:32 * lizmat starts a few runs
18:34 ab6tract "mysterious" here being an operative word for "beyond my scope of capability and understanding with regard tp addressing the issue" :)
18:34 ab6tract it's not that the Buf is in the wrong container, but rather that the wrong container has shown up in the wrong place
18:35 ab6tract and sometimes not a full container, which explains some of the more low level crashing i have seen
18:37 lizmat typical error message with TEST_HARNESS=6: Method 'end-entries' not found for invocant of class 'Match'
18:40 lizmat another one: Method 'made' not found for invocant of class 'TAP::Runner::State'
18:40 lizmat so yes, this type of error is more common  :-(
18:40 ab6tract :(
18:40 lizmat and one shudders at the thought for the cases it *does* find the method, but simply does the wrong thing...
18:47 ka joined #perl6
18:47 ab6tract well, i *am* heartened that i've so far had a 100% success rate with the IO::Socket::INET version of the http stress test
18:51 itaipu joined #perl6
18:53 avar What's the inverse of $num.base($x)
18:53 avar i.e. I have a string in base $x and want $num
18:53 MetaZoffix I don't think there is one, other than the nqp op
18:54 MetaZoffix m: :16('FF').say # but you can't use the variable for base
18:54 camelia rakudo-moar d63f98: OUTPUT«255␤»
18:55 MetaZoffix m: use MONKEY-GUTS; my $radix = 16; my $n = "FF"; say nqp::radix($radix, $n, 0, 0)[0]
18:55 camelia rakudo-moar d63f98: OUTPUT«255␤»
18:55 avar yay, thanks :)
18:58 melezhik_ joined #perl6
18:58 melezhik_ Hi Perl6 gurus!
18:58 MetaZoffix \o
18:59 prammer joined #perl6
18:59 melezhik_ sorry if repeat my question , probably I asked before, but not sure if remember the answer ...
18:59 MetaZoffix The captures again? :)
18:59 melezhik_ how to create a regexp expression from given string?
19:00 MetaZoffix m: my $re = '\d' ~ '\d+'; say 'Bond 007' ~~ /<$re>/
19:00 rgrinberg joined #perl6
19:00 camelia rakudo-moar d63f98: OUTPUT«「007」␤»
19:00 melezhik_ Zoffix, Hi! captures are fine now, it was usefull discussion and your paper about comb, I have read it, it's cool, I guess I am going to use comb to handle captures ...
19:01 melezhik_ Thanks, Zoffix!
19:03 melezhik_ my $pattern = '(\w+)';  my @foo = 'foo=bar foo=bar foo=baz'.comb(/<$pattern>/,:match)>>.Slip.>>.Str; say @foo.join('|');
19:03 melezhik_ the result is empty, though ...
19:03 MetaZoffix m: my $pattern = '(\w+)';  my @foo = 'foo=bar foo=bar foo=baz'.comb(/<$pattern>/,:match)>>.Slip.>>.Str; say @foo.join('|');
19:03 camelia rakudo-moar d63f98: OUTPUT«␤»
19:04 MetaZoffix s: 'x', 'comb', \(/^/, :match)
19:04 SourceBaby MetaZoffix, Sauce is at https://github.com/rakudo/rakudo/​blob/e406758/src/core/Str.pm#L396
19:04 melezhik_ compared to:
19:04 melezhik_ my @foo = 'foo=bar foo=bar foo=baz'.comb(/(\w+)/,:match)>>.Slip.>>.Str; say @foo.join('|');
19:05 melezhik_ foo|bar|foo|bar|foo|baz
19:05 melezhik_ probably something I did wrong?
19:06 MetaZoffix m: my $pattern = '(\w+)';  my @foo = 'foo=bar foo=bar foo=baz'.comb(/<$pattern>/,:match).join('|').say
19:06 camelia rakudo-moar d63f98: OUTPUT«foo|bar|foo|bar|foo|baz␤»
19:06 MetaZoffix m: my $pattern = '(\w+)';  my @foo = 'foo=bar foo=bar foo=baz'.comb(/<$pattern>/,:match); @foo.join('|').say
19:06 camelia rakudo-moar d63f98: OUTPUT«foo|bar|foo|bar|foo|baz␤»
19:07 melezhik_ so, Zoffix:, no need to have a >>.Slip.>>.Str ?
19:08 MetaZoffix melezhik_: not in this case. /<$pattern>/ is non-capturing and you get the full match. /(\w+)/ is capturing. So when you .Slip you get the captures, which are present in the latter but not in the former
19:08 MetaZoffix melezhik_: eventhough you have '(\w+)' in your string, that capture doesn't get captured in the regex itself
19:09 MetaZoffix m: my $pattern = '\w+';  'foo=bar foo=bar foo=baz'.comb(/<$pattern>/).join('|').say
19:09 camelia rakudo-moar d63f98: OUTPUT«foo|bar|foo|bar|foo|baz␤»
19:10 prammer joined #perl6
19:10 melezhik_ can't still get the difference, b/w w+ and (\w+)
19:10 MetaZoffix What's "b/w"?
19:11 mcmillhj joined #perl6
19:11 MetaZoffix m: my $pattern = '\w+';  'foo=bar foo=bar foo=baz'.split(/<!$pattern>+/).join('|').say; # weeeeeeeeeeeeeeeeeeeeeeeeee
19:11 melezhik_ between
19:11 camelia rakudo-moar d63f98: OUTPUT«(timeout)»
19:12 firstdayonthejob joined #perl6
19:12 MetaZoffix melezhik_: "w+" is 1 or more letters 'w'. \w+ is one or more "letters". \w doesn't capture anything. (\w) creates a capture. When you do a regex match, you get the Match object. One of its attributes is what it matched. Another one also provides all of the captures it has. If you want ALL of the text your regex matches, you don't need to capture it, you can just use the attribute that gives you what matched
19:13 MetaZoffix m: say 'foo=bar' ~~ /(\w+) '=' (\w+)/
19:13 harmil_wk Oooh, I'd not thought of using named parameters with defaults in a for loop before, but I sort of accidentally jumped into it.
19:13 camelia rakudo-moar d63f98: OUTPUT«「foo=bar」␤ 0 => 「foo」␤ 1 => 「bar」␤»
19:13 harmil_wk m: for ^10 -> $i, :$j=$i.base(3) { say "$i, $j" }
19:13 camelia rakudo-moar d63f98: OUTPUT«0, 0␤1, 1␤2, 2␤3, 10␤4, 11␤5, 12␤6, 20␤7, 21␤8, 22␤9, 100␤»
19:13 MetaZoffix melezhik_: ^ above, the first output is what matched, followed by the two captures
19:13 MetaZoffix m: say 'foo=bar' ~~ /\w+ '=' \w+/
19:13 camelia rakudo-moar d63f98: OUTPUT«「foo=bar」␤»
19:14 ab6tract harmil_wk: nice one :D
19:14 MetaZoffix And now the captures are not there, but you still get the string containing what matched
19:14 MetaZoffix harmil_wk++ neat :)
19:14 melezhik_ Zoffix, sorry, let me think abit on all your recent words, I am abit confused though ...
19:15 harmil_wk It works because it doesn't change the arity from 1. If you use a positional it gets overwritten.
19:16 ab6tract harmil_wk: yeah, that's an awesome trick! hadn't thought of that before
19:16 harmil_wk I may never use .map in trivial cases like "for (^10).map: */2 -> $i ..." again
19:18 MetaZoffix melezhik_: if you want to grab some apples and your friend asked you to get them 10 apples too. You put 10 in a bag (capture) for your friend, then toss the bag and another 20 apples into the box (matched string). If you dump (print) your box, you get all the apples (match) and you can also get a separate bag (capture) of 10 apples. But if all you're taking is 10 apples, you may forgo putting them in a bag (capture) first, since th
19:18 MetaZoffix n
19:19 moritz harmil_wk: for (1..10) >>/>> -> $i { ... }
19:19 moritz harmil_wk: or even   for 1..10 X/ 2 -> $i { ... }
19:19 moritz for (1..10) >>/>> 2 -> $i { ... }
19:19 harmil_wk moritz: yeah, if there's an operator for it that's actually cleaner
19:20 harmil_wk Also counting lists:
19:20 harmil_wk m: for <a b c> -> $i, :$j = (state $n = 0)++ { say "$i, $j" }
19:20 camelia rakudo-moar d63f98: OUTPUT«a, 0␤b, 1␤c, 2␤»
19:20 MetaZoffix m: for <a b c>.kv -> $j, $i { say "$i, $j" }
19:20 camelia rakudo-moar d63f98: OUTPUT«a, 0␤b, 1␤c, 2␤»
19:21 harmil_wk MetaZoffix: does that always work, or is it just a property of the arrays? Can i do that on an iterator or whatever?
19:21 melezhik_ Ok, Zoffix, let me reshape my question, reading your post on comb I thought that I need to have a >>.Slip>>.Str at then end of comb construction, like you have there - my %things = 'moo=meow ping=pong'.comb(/(\w+) '=' (\w+)/, :match)».Slip».Str;
19:22 melezhik_ now I see that sometimes it works, like in your example, and sometimes it does not work like in mine
19:22 MetaZoffix melezhik_: right, but look at the regex. It has captures. Yours doesn't
19:22 MetaZoffix adding () into the string you're trying to use doesn't count, because in the regex itself there's nothing capturing the Match that would provide it
19:23 MetaZoffix m: <a b c>, 'kv', \()
19:23 camelia rakudo-moar d63f98: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant string "kv" in sink context (lines 1, 1)␤Useless use of constant value a b c in sink context (lines 1, 1, 1, 1, 1, 1)␤»
19:23 MetaZoffix s: <a b c>, 'kv', \()
19:23 SourceBaby MetaZoffix, Sauce is at https://github.com/rakudo/rakudo/b​lob/d63f983/src/core/List.pm#L811
19:23 MetaZoffix harmil_wk: ^ seems to be provided by List
19:23 MetaZoffix oh
19:23 melezhik_ Zoffix, ok, let me recal my example to be accurate, maybe we are talking about different things ...
19:23 melezhik_ mine example is ...
19:23 harmil_wk MetaZoffix: I tried it on a lazy gather and it worked. Good enough for me.
19:24 MetaZoffix harmil_wk: well... it's a method that produces those results on lists. I'm unsure what you mean by "always work".
19:24 ab6tract this is an important distinction of regexes in perl 6, iiuc
19:24 MetaZoffix On hashes it gives keys/values
19:24 ab6tract interpreted strings do not get to be treated as regexes
19:24 ab6tract *interpolated
19:24 melezhik_ so mine example is:
19:24 melezhik_ my $pattern = '(\w+)';  my @foo = 'foo=bar foo=bar foo=baz'.comb(/<$pattern>/,:match)».Slip».Str;  say @foo.join('|');
19:24 harmil_wk MetaZoffix: yeah, that would be a problem I guess... generally not my problem right now.
19:24 MetaZoffix ab6tract: we're talking about those that do
19:25 harmil_wk Nifty
19:25 ab6tract gotcha
19:25 melezhik_ it does have a captures?
19:25 MetaZoffix melezhik_: no.
19:25 melezhik_ does not it?
19:25 MetaZoffix melezhik_: well.. it does if you use (\w+) directly in the regex
19:25 melezhik_ is my $pattern = '(\w+)' not a captures>;
19:25 melezhik_ ?
19:25 melezhik_ but this is well, "comipiled" regexp
19:26 melezhik_ becase later on I have a .comb(/<$pattern>/ ...
19:26 melezhik_ so is it different?
19:26 MetaZoffix Yeah
19:27 melezhik_ sorry for typo, I meant compiled
19:27 MetaZoffix Because <...> is non-capturing
19:27 MetaZoffix 1 sec. Lemme find a ticket where I first thought this was a bug
19:27 melezhik_ ahh, ok I see now!
19:27 melezhik_ now it makes a sence ...
19:28 MetaZoffix melezhik_: here's pmichaud++'s explanation: https://rt.perl.org/Ticket/Disp​lay.html?id=129271#txn-1423368
19:28 ab6tract this is what i meant about interpolated strings not "speaking regex"
19:28 perlpilot eh?
19:28 MetaZoffix But they are "treated like regexes"
19:28 MetaZoffix m: my $re = '\w+'; say 'foo' ~~ /<$re>/
19:28 camelia rakudo-moar d63f98: OUTPUT«「foo」␤»
19:28 ab6tract yeah
19:29 perlpilot <...> only captures if the first character is alphabetic IIRC
19:29 MetaZoffix ah
19:29 perlpilot For <$str> the first char is $, so no capture
19:29 melezhik_ ahh, ok, so what do you suggest ?
19:29 mcmillhj joined #perl6
19:30 perlpilot <foo=$bar> usually does the trick
19:30 moritz <name=$str>
19:30 MetaZoffix m: my $re = '(\w+) (\w+)'; say 'foobar' ~~ /<foo=$re>/
19:30 camelia rakudo-moar d63f98: OUTPUT«「foobar」␤ foo => 「foobar」␤  0 => 「fooba」␤  1 => 「r」␤»
19:30 TimToady m: my Str %h{Int()}; %h{1} = 'foo'; my $i = IntStr.new(1, '1'); %h{$i}.defined.say;  # this will work someday
19:30 camelia rakudo-moar d63f98: OUTPUT«Type check failed in binding to key; expected Int(Any) but got Int (1)␤  in block <unit> at <tmp> line 1␤␤»
19:30 ab6tract i was wrong about that part, i hadn't thought about it being a constraint of the interpolation "operator" (so to speak.. not sure what the angle brackets are called in regex-land)
19:30 TimToady jkramer: ^^^
19:31 adrusi joined #perl6
19:31 melezhik_ I have an input sting, with a "capture" blocks  '(' ')'  and I want to compile a regexp upon this string and I want to access to captured data, and this one is a not named captures ...
19:32 MetaZoffix m: my $pattern = '(\w+)';  my @foo = 'foo=bar foo=bar foo=baz'.comb(/<mymatch=$pattern>​/,:match)».<mymatch>».Slip.».Str; say @foo.join('|');
19:32 camelia rakudo-moar d63f98: OUTPUT«foo|bar|foo|bar|foo|baz␤»
19:32 MetaZoffix mabby something like that
19:33 adrusi joined #perl6
19:33 hankache joined #perl6
19:33 MetaZoffix m: my $pattern = '(\w+"="\w+)';  my @foo = 'foo=bar foo=bar foo=baz'.comb(/<mymatch=$pattern>​/,:match)».<mymatch>».Slip.».Str; say @foo.join('|');
19:33 camelia rakudo-moar d63f98: OUTPUT«foo=bar|foo=bar|foo=baz␤»
19:33 MetaZoffix m: my $pattern = '(\w+"=")(\w+)';  my @foo = 'foo=bar foo=bar foo=baz'.comb(/<mymatch=$pattern>​/,:match)».<mymatch>».Slip.».Str; say @foo.join('|');
19:33 camelia rakudo-moar d63f98: OUTPUT«foo=|bar|foo=|bar|foo=|baz␤»
19:34 hankache evening #perl6
19:34 MetaZoffix \o
19:34 ab6tract can't you do  /(<$my-matcher>)/ ?
19:34 melezhik_ Zoffix: this works, thanks
19:34 MetaZoffix It seems to just capture that one capture:
19:34 MetaZoffix m: my $re = '(\w+) (\w+)'; say 'foo' ~~ /(<$re>)/
19:34 camelia rakudo-moar d63f98: OUTPUT«「foo」␤ 0 => 「foo」␤»
19:35 MetaZoffix m: my $re = '(\w) (\w+)'; say 'foo' ~~ /(<$re>)/
19:35 camelia rakudo-moar d63f98: OUTPUT«「foo」␤ 0 => 「foo」␤»
19:35 TimToady .tell andreoss traits are from Smalltalk, but we renamed them roles because we also use them for interfaces and for generics; otoh if by 'traits' you mean 'is foo()' and such, we borrowed those mostly from English
19:35 yoleaux TimToady: I'll pass your message to andreoss.
19:36 vcv m: my $pattern = '(\w+)';  my @foo = 'foo=bar foo=bar foo=baz'.comb(/<$pattern>/,:match)>>.Str; @foo.join('|').say;
19:36 camelia rakudo-moar d63f98: OUTPUT«foo|bar|foo|bar|foo|baz␤»
19:36 MetaZoffix "we borrowed those mostly from English" :D Awesome
19:36 MetaZoffix vcv: that doesn't work
19:36 MetaZoffix m: my $pattern = '(\w+"=")(\w+)';  my @foo = 'foo=bar foo=bar foo=baz'.comb(/<$pattern>/,:match)>>.Str; @foo.join('|').say;
19:36 camelia rakudo-moar d63f98: OUTPUT«foo=bar|foo=bar|foo=baz␤»
19:36 MetaZoffix ^ it uses the entire match, rather than captures
19:37 vcv ah
19:37 TimToady .tell andreoss as for method/submethod, we just made that up ourselves because we wanted to be able to isolate the initialization work for each part of an object, class by class, so we needed methods that aren't inherited
19:37 yoleaux TimToady: I'll pass your message to andreoss.
19:37 ab6tract m: my $go = 'gogogogogo'; my $match = '\w.'; my $r = ($go ~~ / (<$match>)* /); dd $r
19:37 camelia rakudo-moar d63f98: OUTPUT«Match $r = Match.new(ast => Any, list => ([Match.new(ast => Any, list => (), hash => Map.new(()), orig => "gogogogogo", to => 2, from => 0), Match.new(ast => Any, list => (), hash => Map.new(()), orig => "gogogogogo", to => 4, from => 2), Match.new(ast => …»
19:38 melezhik_ yeah, look like a final "comb" variant is >>.Str , not >>.Slip>>.Str ?
19:38 ab6tract but i really should stay quiet on the topic, i haven't done enough regexes and might end up confusing more than helping
19:38 melezhik_ and it works with captures?
19:39 MetaZoffix melezhik_: >>.Slip>>.Str gives you Match-object captures from a match and coerces all of them to Str...   >>.Str coerses the match to Str
19:39 itaipu joined #perl6
19:39 ab6tract m: my $go = 'gogogogogo'; my $match = '\w.'; my $r = ($go ~~ / (<$match>)* /); say $r>>.Slip>>.Str
19:39 MetaZoffix If you don't have any captures, >>.Slip will give you empty
19:39 camelia rakudo-moar d63f98: OUTPUT«(go go go go go)␤»
19:39 TimToady m: my $re = '(\w) (\w+)'; say 'foo' ~~ /(<re=$re>)/
19:39 camelia rakudo-moar d63f98: OUTPUT«「foo」␤ 0 => 「foo」␤  re => 「foo」␤   0 => 「f」␤   1 => 「oo」␤»
19:39 MetaZoffix m: my $re = '(\w) (\w+)'; say 'foo' ~~ /<re=$re>/
19:39 camelia rakudo-moar d63f98: OUTPUT«「foo」␤ re => 「foo」␤  0 => 「f」␤  1 => 「oo」␤»
19:40 mcmillhj joined #perl6
19:41 melezhik_ Zoffix: sure, looks like >>.Str coerses the captures to Str? (If we have any ... )
19:43 melezhik_ my $pattern = '(\d+)';  my @foo = 'one for 1 two for 2'.comb(/<$pattern>/,:match)>>.Str; @foo.join('|').say;
19:43 melezhik_ 1|2
19:44 melezhik_ ahh, I was wrong
19:44 melezhik_ it does coerses matches, not captures
19:44 melezhik_ my $pattern = 'for\s(\d+)';  my @foo = 'one for 1 two for 2'.comb(/<$pattern>/,:match)>>.Str; @foo.join('|').say;
19:45 melezhik_ for 1|for 2
19:45 melezhik_ yeah, not it's clear for me ...
19:45 melezhik_ now it's clear for me
19:49 labster joined #perl6
19:50 melezhik_ so as far as I got the only way is to use named cpatures ?
19:55 melezhik_ or iterate over match objects and extract caprured parts from them ...
19:56 melezhik_ ah, but it does not help me beacause of mentioned - https://rt.perl.org/Ticket/Disp​lay.html?id=129271#txn-1423368 ):
19:57 melezhik_ as captures are not preserved during interpolation ...
19:57 mcmillhj joined #perl6
20:03 mcmillhj joined #perl6
20:03 perlpilot Is there some idiom for reading in paragraph mode other than $fh.nl-in = "\n\n"?
20:04 perlpilot I kinda want something like   for line(:paragraph) -> $p { ... }
20:04 perlpilot s/line/lines/
20:06 melezhik_ joined #perl6
20:10 vike joined #perl6
20:12 espadrine joined #perl6
20:15 sena_kun joined #perl6
20:18 riatre joined #perl6
20:18 vcv s: 'foo', 'match'
20:18 SourceBaby vcv, Sauce is at https://github.com/rakudo/rakudo/​blob/d63f983/src/core/Str.pm#L420
20:22 sivoais joined #perl6
20:22 committable6 joined #perl6
20:23 harmil_wk perlpilot: we'll call that linens...
20:23 melezhik_ Ok, Zoffix:  thanks alot. I guess named capture for interpolated regexp string works for me:
20:23 melezhik_ m: my $pattern = '\W(\w+)';  my @foo = 'foo=bar foo=bar foo=baz'.comb(/<mymatch=$pattern>/​,:match)>>.<mymatch>».Slip.».Str; say @foo.join('|');
20:23 camelia rakudo-moar ab68f8: OUTPUT«bar|foo|bar|foo|baz␤»
20:25 melezhik_ should carefully test it anyway on my side and in case issues let you know, thanks again!
20:32 avar $ perl6 -MMONKEY-SEE-NO-EVAL -e 'say EVAL ":{@*ARGS[0]}(qq[{@*ARGS[1]}])"' 36 D18
20:32 avar 16892
20:32 avar shortest way to find out what D18 in base36 is, with dynamic base?
20:33 avar Quite annoying that it needs that MONKEY-SEE-NO-EVAL for a oneliner
20:33 MasterDuke m: use nqp; my $b = 36; say nqp::radix($b, 'D18', 0, 0)[0]
20:33 camelia rakudo-moar ab68f8: OUTPUT«16892␤»
20:33 samcv joined #perl6
20:44 AlexDaniel joined #perl6
20:46 hoelzro m: say :36('D18')
20:46 camelia rakudo-moar ab68f8: OUTPUT«16892␤»
20:46 hoelzro oh, *dynamic* base
20:47 moritz m: say UNBASE 36, 'D18'
20:47 camelia rakudo-moar ab68f8: OUTPUT«16892␤»
20:47 moritz ok, I cheated
20:47 moritz we could just expose this as a public library method on Str
20:50 vcv s: UNBASE
20:50 SourceBaby vcv, Something's wrong: â�¤ERR: [31m===[0mSORRY![31m===[0m Error while compiling -eâ�¤Calling UNBASE() will never work with any of these multi signatures:â�¤    (Int:D $base, Any:D $num) â�¤    (Int:D $base, Str:D $str)â�¤at -e:6â�¤------> [32m    put sourcery( [33mâ��[31mUNBASE )[1];[0mâ�¤
20:50 vcv s: 'UNBASE'
20:50 SourceBaby vcv, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Str); none of these signatures match:␤    ($thing, Str:D $method, Capture $c)␤    ($thing, Str:D $method)␤    (&code)␤    (&code, Capture $c)␤  in block <unit> at -e line 6␤␤
20:51 TestNinja SourceBaby, help
20:51 SourceBaby TestNinja, Use s: trigger with args to give to sourcery sub. e.g. s: Int, 'base'. See http://modules.perl6.org/d​ist/CoreHackers::Sourcery
20:51 TestNinja vcv, ^
20:51 TestNinja s: &UNBASE
20:51 SourceBaby TestNinja, Sauce is at https://github.com/rakudo/rakudo/b​lob/ab68f82/src/core/Str.pm#L2213
20:52 TestNinja left #perl6
20:52 mcmillhj joined #perl6
20:53 skids What nobody liked "debase"? :-)
20:54 ka joined #perl6
20:57 itaipu joined #perl6
21:03 geekosaur base-ist...
21:03 mcmillhj joined #perl6
21:07 cyphase joined #perl6
21:08 bisectable6 joined #perl6
21:10 bisectable6 joined #perl6
21:11 trnh joined #perl6
21:12 raydiak probably slow, but fwiw...
21:12 raydiak m: my ($val, $base) = "D18", 36; say +val ":$base\<$val>"
21:12 camelia rakudo-moar ab68f8: OUTPUT«16892␤»
21:13 sjoshi joined #perl6
21:13 raydiak also, g'day #perl6 o/
21:14 committable6 joined #perl6
21:15 mcmillhj joined #perl6
21:17 TEttinger joined #perl6
21:21 TeamBlast joined #perl6
21:25 ft joined #perl6
21:27 Ven_ joined #perl6
21:32 mcmillhj joined #perl6
21:32 sivoais joined #perl6
21:33 frew joined #perl6
21:34 committable6 joined #perl6
21:35 benchable6 joined #perl6
21:35 bisectable6 joined #perl6
21:36 eythian joined #perl6
21:41 avar raydiak: cool
21:43 samcv so i'm thinking about learning perl 6, already know C, shell scripting and perl 5, what is the best guide to learning it, considering my background?
21:44 mcmillhj joined #perl6
21:46 TestNinja joined #perl6
21:47 avuserow samcv, maybe start with https://learnxinyminutes.com/docs/perl6/ and then move onto doc.perl6.org and especially https://docs.perl6.org/language/5to6-nutshell as needed?
21:47 TestNinja samcv, forget everything. Then, maybe try starting with https://learnxinyminutes.com/docs/perl6/  (more on http://perl6.org/documentation/ ; in particular the "For New Comers")
21:47 samcv forget everything you say :P
21:48 gfldex http://perl6intro.com/
21:48 TestNinja samcv, from personal experience, I advise you to forget about how you did things in Perl 5. I found that a major roadblock in my learning. Especially when it came to working with lists and passing args to thinmgs
21:48 gfldex there are quite a few videos with introductions under https://www.youtube.com/playlist?lis​t=PLRuESFRW2Fa77XObvk7-BYVFwobZHdXdK
21:49 TestNinja m: my $list = (1, 2, 3); say $list; # case in point
21:49 camelia rakudo-moar ab68f8: OUTPUT«(1 2 3)␤»
21:49 TestNinja :)
21:49 samcv yeah. perl is the most recent language i've been using, but like. i really like it. but feel it could be so much better
21:49 samcv so i'm thinking about looking into perl6
21:49 TestNinja Yeah, Perl 6 is definitely better.
21:50 TestNinja The learnxinyminutes.com/docs/perl6/ is pretty good if you already know programming
21:51 b2gills m: say ( 0, 1, &[+] ... * )[^100] # first 100 elements of the Fibonacci sequence
21:51 camelia rakudo-moar ab68f8: OUTPUT«(0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 1346269 2178309 3524578 5702887 9227465 14930352 24157817 39088169 63245986 102334155 165580141 267914296 433494437 70140…»
21:52 samcv i am a list comprehension
21:52 TestNinja samcv, out of curiosity, how did you hear about Perl 6 and what made you think to try it out?
21:52 samcv uhm
21:53 samcv idk i don't know where i heard about it, but i knew of it. and recently needed text processing capabilities and such so starting using perl, because shell scripting and C wasn't going to cut it there
21:53 TestNinja Ah
21:53 samcv so have written many perl scripts for getting software versions and a irc bot in perl, though perl is nice, i felt it could be a lot nicer
21:53 samcv and perl 6 is a thing so thought i'd check it out
21:53 TestNinja Cool.
21:54 TestNinja Well, welcome! Hope you enjoy your stay :)
21:54 samcv also the camel and onion logos are ugly :P
21:54 rgrinberg joined #perl6
21:55 TestNinja There's an article for a Perl 6 IRC module, if it strikes your fancy: http://perl6.party/post/IRC-Clien​t-Perl-6-Multi-Server-IRC-Module
21:55 * TestNinja waves
21:55 TestNinja left #perl6
21:55 b2gills samcv: An example of what is possible with Perl 6's grammars: https://github.com/moritz/json/blo​b/master/lib/JSON/Tiny/Grammar.pm
21:57 Ven_ joined #perl6
21:58 mcmillhj joined #perl6
22:06 wamba joined #perl6
22:12 raydiak is there a runtime performance penalty for MONKEY-TYPING? or can anyone suggest a less "strongly discouraged" way to group rules and actions by term instead of having the full definiton of each term split up in the source between the grammar and the action class (and the tree node class instantiated by the action)?
22:14 gfldex raydiak: right now there should not be any runtime penalty for monkey-typing. That may change in the future.
22:15 Ven_ joined #perl6
22:19 jnthn raydiak: Write the various pieces in roles and then compose those in the final grammar/action class, perhaps?
22:20 ab6tract joined #perl6
22:20 raydiak oh, hm...
22:21 raydiak so 2 roles per term? that sounds fairly reasonable
22:21 raydiak thank you gfldex++ and jnthn++
22:22 jnthn If you're breaking it up that way you might also consider writing the actions in line with the rules
22:22 jnthn (Just as a code block in the rule that does "make")
22:24 raydiak something about that feels...less than sanitary, but maybe just because it's not my usual style. any actual drawbacks to it?
22:24 skids joined #perl6
22:25 raydiak I would like to avoid having to maintain a list of all those roles in the grammar and actions declarations, which that would solve
22:29 Ven_ joined #perl6
22:30 benchable6 joined #perl6
22:32 mcmillhj joined #perl6
22:40 _slade_ joined #perl6
22:41 Ven_ joined #perl6
22:49 telex joined #perl6
22:49 mcmillhj joined #perl6
22:50 raydiak btw, just curious, if augment is a compile-time declaration, why might it see a runtime penalty in the future?
22:53 gfldex what should happen when you stick the augment into an EVAL?
22:53 Ven_ joined #perl6
22:54 gfldex also, we may at some point have precompiled modules with pre-JITed stuff
22:54 gfldex or cached JIT output of sorts
22:55 gfldex compiled does not mean static
22:56 raydiak ah ha. I'd want something like a "too late to redefine this class" error (unless the EVAL is in a BEGIN), at least in this case, but I see what you mean
22:56 raydiak on the JIT point, I don't really know much about how that works tbh
22:59 raydiak also does the discouragement in the docs even apply to this case? seems like modifying the global state is precisely what I'm trying to do. in fact is what any our-scoped declaration does. not sure I even 100% understand the stated objection to this pattern, except for modifying stock/built-in classes
23:01 MilkmanDan joined #perl6
23:07 mcmillhj joined #perl6
23:08 raydiak I mean, you could say the same about many things like "what happens if you EVAL a normal class definition," couldn't you? not arguing, just trying to understand more thoroughly
23:08 timotimo you don't need to go through eval to declare classes
23:09 timotimo i.m late to this discussion
23:09 timotimo i was meant to head to bed :S
23:09 raydiak you don't need to eval an augment, either...that's what we're talking about :)
23:09 raydiak but hi timo! :)
23:10 timotimo ah
23:15 Pierre_ joined #perl6
23:17 bjz joined #perl6
23:21 raydiak timotimo: if your fatigued brain has enough remaining capacity (and inclination) to backlog and respond, I'm interested in your feedback as well
23:21 mcmillhj joined #perl6
23:22 Pierre_ joined #perl6
23:23 ka joined #perl6
23:26 MilkmanDan joined #perl6
23:27 Ven_ joined #perl6
23:27 Pierre_ joined #perl6
23:31 nadim joined #perl6
23:35 mcmillhj joined #perl6
23:45 BenGoldberg joined #perl6
23:49 mcmillhj joined #perl6

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

Perl 6 | Reference Documentation | Rakudo