Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-06-09

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:00 AlexDaniel joined #perl6
00:00 Juerd Reading 5to6-nutshell, and it reminds me how much Perl 5's $arrayref->@* makes me feel like jumping ship :)
00:01 Actualeyes joined #perl6
00:01 Juerd $foo->$#* with its 5 non-alphanumerics after the variable is so much uglier than $foo.end
00:06 benchable6 joined #perl6
00:07 petercommand joined #perl6
00:08 ugexe if there was something like a $*WHAT-CUR-LOADED-ME then we could have `$*WHAT-CUR-LOADED-ME.need("MyLib")`
00:09 ugexe where CUR can then handle any remapping of paths to source
00:13 ugexe er, or `use lib "My::Lib"` even
00:44 Cabanossi joined #perl6
00:54 lookatme joined #perl6
00:55 lookatme morning ヽ(•̀ω•́ )ゝ
01:02 aborazmeh joined #perl6
01:02 aborazmeh joined #perl6
01:17 raschipi joined #perl6
01:23 astj joined #perl6
01:46 Cabanossi joined #perl6
01:48 ilbot3 joined #perl6
01:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:14 Cabanossi joined #perl6
02:16 Actualeyes joined #perl6
02:29 raiph joined #perl6
02:37 mcmillhj joined #perl6
02:40 xinming_ joined #perl6
02:41 noganex_ joined #perl6
02:41 BenGoldberg joined #perl6
03:15 samcv morning lookatme
03:17 lookatme samcv, It's almost noon now. (≖ ‿ ≖)✧
03:18 samcv it's 8pm for me here
03:18 samcv working more on moarvm's unicode normalizer :) have 4 more GraphemeBreakTest.t tests passing
03:19 samcv ones with the Prepend property introduced in unicode 9.0
03:19 samcv really happy about that
03:19 samcv before 9.0 there were only Extend. so the combining charater always came after the base character
03:19 samcv with prepend, the combiing character comes before the base character
03:22 cdg joined #perl6
03:23 lookatme samcv++, sounds great.
03:24 samcv i'm pretty confident we should be passing 100% of tests by the end of the week (fingers crossed)
03:24 samcv at least unless there are any unforseen issues
03:24 finanalyst joined #perl6
03:27 lookatme (^.^)y (fingers crossed)
03:34 lookatme I have to review my c/c++ knowledge, and find a new job in the next months.
03:52 astj_ joined #perl6
03:57 Cabanossi joined #perl6
04:01 samcv j: say "\0".uniname; # <control-0000>
04:01 camelia rakudo-jvm f0c3bf: OUTPUT: «NULL␤»
04:03 samcv there's a bunch of RT's actually i need to go through and close now
04:04 samcv j: say uniname("\x[80]")
04:04 camelia rakudo-jvm f0c3bf: OUTPUT: «LATIN 1 SUPPLEMENT 80␤»
04:04 samcv m: say uniname("\x[80]")
04:04 camelia rakudo-moar f0c3bf: OUTPUT: «<control-0080>␤»
04:04 samcv ok that is still a bug on jvm
04:09 samcv bisectable6, say ('a' x 10000).IO.open;
04:09 bisectable6 samcv, Bisecting by output (old=2015.12 new=f0c3bf7) because on both starting points the exit code is 1
04:09 bisectable6 samcv, bisect log: https://gist.github.com/da75432d7785e4bdc0c0a74e6084b49c
04:09 bisectable6 samcv, (2015-12-25) https://github.com/rakudo/rakudo/commit/07fecb52eb1fd07397659f19a5cf36dc61f84053
04:09 bisectable6 samcv, The result looks a bit unrealistic, doesn't it? Most probably the output is different on every commit (e.g. 「bisect: say rand」)
04:19 geekosaur think the bot needs to be taught to ignore the filenames
04:19 samcv yea
04:20 geekosaur or munge the commit hashes
04:20 bioduds joined #perl6
04:21 bioduds hey friends
04:21 bioduds would IO::Socket::Async be the way to go in order to build TCP P2P communication?
04:38 lookatme Yeah, IO::Socket::INET or IO::Socket::Async
04:41 curan joined #perl6
04:55 kyan joined #perl6
05:07 xtreak joined #perl6
05:07 xtreak joined #perl6
05:11 samcv nice. now down to only 6 perl6 tests (3 graphemeclusterbreak.txt tests) failing
05:12 samcv excellent
05:12 drrho joined #perl6
05:12 samcv so close
05:25 szabgab joined #perl6
05:26 szabgab hi there
05:26 szabgab p6: my @x = 2, 3; say @x.^name
05:26 camelia rakudo-moar 3ff29d: OUTPUT: «Array␤»
05:27 szabgab In which case would @something.^name return anything else than "Array" ?
05:28 Cabanossi joined #perl6
05:28 szabgab (or Array[type])
05:32 Xliff What would be the best way to check the repo chain for a specific file?
05:33 xtreak joined #perl6
05:33 Xliff szabgab: Given that you are using the @ symbol, why do you expect it would say anything else?
05:33 Xliff Alternatively, what are you trying to do?
05:34 szabgab Trying to understand Perl 6 :)
05:34 Xliff m: my Array[Str] @b = <one two three>; say @b.^name
05:34 camelia rakudo-moar 3ff29d: OUTPUT: «Type check failed in assignment to @b; expected Array[Str] but got Str ("one")␤  in block <unit> at <tmp> line 1␤␤»
05:34 Xliff m: my Str @b = <one two three>; say @b.^name
05:34 camelia rakudo-moar 3ff29d: OUTPUT: «Array[Str]␤»
05:35 mr-foobar joined #perl6
05:35 szabgab But more specifically I am trying to figure out how to call the variables?
05:35 Xliff So yes, if you specify a type, then you would get something different than "Array"
05:35 Xliff m: my Str @b = <one two three>; say @b[0]; say @b[0].^name;
05:35 camelia rakudo-moar 3ff29d: OUTPUT: «one␤Str␤»
05:35 Xliff ^^ Like this?
05:36 szabgab m: my Str @b = <one two three>; say @b.^name
05:36 camelia rakudo-moar 3ff29d: OUTPUT: «Array[Str]␤»
05:36 szabgab that's still an Array
05:36 bioduds thanks, lookatme
05:36 szabgab so if I understand correctly a @-variable allways holds an array
05:36 Xliff I'm a little confuesed, then.
05:37 Xliff Yes, but an @ variable with an index [] returns the item in that position.
05:37 szabgab that's ok
05:37 szabgab But you don't call it a @-variable normally right?   You call them arrays?
05:38 xtreak joined #perl6
05:39 Xliff As a whole, the @ denotes an Array, yes.
05:39 Xliff But arrays imply a collection of elements.
05:39 szabgab ok, so how do we call a variable that has a $ sigil?
05:40 Xliff m: my $a = 3; say $a;
05:40 camelia rakudo-moar 3ff29d: OUTPUT: «3␤»
05:40 Xliff The diffence between perl5 and perl6 is that you don't switch sigils when you are accessing something from an array.
05:40 szabgab I mean what's its name?  Do you call them "$ variables" ? "Scalar variables?"
05:41 Xliff Perl5 -- my @a = (1, 2, 3); say $a[2] == 3;
05:41 szabgab I think I understand that part. What I don't know is the name I should use when discussing them.
05:41 Xliff Perl6 -- my @a = (1, 2, 3); say @a[2] == 3
05:41 Xliff % == Hash, @ = Array, $ = Scalar
05:42 szabgab So you call $qqrq a Scalar variable even though in an hold any container type
05:43 szabgab It can hold an Array, a List, and yes also a Scalar type
05:44 szabgab I wonder if that's not confusing.
05:45 Xliff Some folks refer to $ as "typeless"
05:45 Xliff I disagree. Maybe it's the perl5 coder in me that has already gone through the work and can understand things.
05:45 Xliff Things that new people might balk at.
05:46 Xliff But in Perl6.... everything is a reference.
05:46 Xliff So for a $ variable to contain a literal, or a reference to an object or a % or a @ is just natural.
05:47 Xliff For new people, maybe "typeless" would be easier to understand.
05:47 Xliff But that will trip people up in the long run.
05:47 Xliff m: class A { }; my A $a = A.new; say $a.^type;
05:47 camelia rakudo-moar 3ff29d: OUTPUT: «No such method 'type' for invocant of type 'Perl6::Metamodel::ClassHOW'. Did you mean any of these?␤    take␤    tree␤␤  in block <unit> at <tmp> line 1␤␤»
05:47 Xliff m: class A { }; my A $a = A.new; say $a.WHAT;
05:47 camelia rakudo-moar 3ff29d: OUTPUT: «(A)␤»
05:48 Xliff So the type of $a in this case.... is A
05:48 Xliff m: say 1.WHAT; say "a".WHAT;
05:48 camelia rakudo-moar 3ff29d: OUTPUT: «(Int)␤(Str)␤»
05:48 szabgab m: class A { }; my A $a = A.new; say $a.^name
05:48 camelia rakudo-moar 3ff29d: OUTPUT: «A␤»
05:50 szabgab So you say you are ok using the same name "scalar" for both the variable type and the data type.
05:51 domidumont joined #perl6
05:53 szabgab (That was a question actually :)
05:53 hythm joined #perl6
05:53 parv joined #perl6
05:54 Xliff Scalar for the variable type. And the actual type for the data type.
05:54 Xliff If we are going to be exact.
05:55 szabgab Hmm I did not see the difference between your phrasing and mine.
05:55 wamba joined #perl6
05:56 parv thanks eveo for the correction re .signature (via log of the day past)
05:56 yoleaux 8 Jun 2017 12:14Z <eveo> parv: that's entirely incorrect tho, which is why it's best not to guess. &{Str.NFC}.signature gives you a block that calls Str.NFC and you're calling signature on that block. You could stick anything into that block and still get the same signature. The correct way is Str.^lookup('NFC').candidates».signature. You should use .candidates bit for subs too, otherwise you only get the sig of the proto
05:57 Xliff You said: "So you say you are ok using the same name "scalar" for both the variable type and the data type."
05:57 Xliff I am making a distinction between "variable" type and "data" type.
05:57 domidumont joined #perl6
05:58 Xliff Since there are actual types AND type checking in P6, that is something that must be considered.
06:02 szabgab Xliff: I think we are saying the same thing here :)
06:14 xtreak joined #perl6
06:25 wamba joined #perl6
06:29 lowbro joined #perl6
06:29 lowbro joined #perl6
06:38 espadrine_ joined #perl6
06:44 xtreak joined #perl6
06:52 xtreak joined #perl6
06:52 rindolf joined #perl6
06:53 xtreak joined #perl6
07:14 dustinm` joined #perl6
07:30 domidumont joined #perl6
07:38 cpage_ joined #perl6
07:43 Cabanossi joined #perl6
07:44 moritz hi all, totally off-topic question question coming up
07:44 masak :)
07:44 moritz I have some software that I want to instrument; in particular, I want an easy way to add some feature counters
07:44 moritz (and I want to instrument more than one software)
07:44 masak what's a "feature counter"?
07:45 moritz masak: I want to track how often a feature is used
07:45 masak ah.
07:45 masak like... logging?
07:45 moritz so the idea is I send a UDP packet or something to a server whenever a certain feature is used
07:46 moritz and then I get some kind of time-resolved statistics per feature
07:46 parv as, home calling.
07:46 * masak .oO( the UDP packet contained a joke but I'm not sure the server got it )
07:46 wamba joined #perl6
07:46 masak moritz: would the server getting the UDP packets need to be world-reachable?
07:46 moritz masak: with logging, I have to store quite some data; I just want it to increment a counter per feature, maybe with a resolution of a day or so
07:47 moritz masak: since it's server-side software, it's enough if it's reachable from our local network
07:47 masak ah; good
07:47 moritz so, the question is: what kind of software can I use for that?
07:47 moritz I'm pretty sure others have the same needs
07:48 moritz but I'm not sure what to google for
07:50 wamba joined #perl6
07:59 Xliff What would be the best way to check the repo chain for a specific file?
07:59 Xliff Or directory, rather
08:00 raiph joined #perl6
08:05 MARTIMM joined #perl6
08:05 masak moritz: I have no idea -- if your need has a well-known name, I do not know it
08:05 masak moritz: if it comes down to sending a UDP packet to a certain IP/port, do you need a pre-packaged software solution for that?
08:07 moritz masak: not for the sending; for storing the time-series DB on the server, and showing graphs for that etc.
08:08 masak still sounds quite close to a logging solution to me -- with some requirements on how to display the log afterwards
08:10 lookatme real-time display ?
08:11 tadzik moritz: maybe statsd?
08:12 tadzik I recall using that at $work, with (I think) graphite (?) for later analysis?
08:15 nine Xliff: your question doesn't make a lot of sense to me. What directory are you looking for?
08:16 nine Xliff: to elaborate. Your question doesn't make a chance, because the repo chain is a linked list of objects that do the CompUnit::Repsoitory role. It has nothing to do with the file system.
08:16 hobbs moritz: yeah, statsd is a common way to go about that. It takes UDP input in a simple format, aggregates, and sends to one of several things, but graphite is the most common
08:18 hobbs moritz: and for graphite servers I recommend go-carbon (the new version w/embedded carbonserver) + carbonapi, and then grafana as frontend. Sounds slightly intimidating, but it's miles easier to set up than the old stuff :)
08:26 nine why the hell did I write "a chance" instead of "sense"??
08:27 zengargoyle m:
08:27 zengargoyle m: > my Array[Str] @x = Array[Str].new(<a b c>), Array[Str].new(<d e f>); say @x.^name; dd @x;
08:27 camelia rakudo-moar 3ff29d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix > instead␤at <tmp>:1␤------> 3>7⏏5 my Array[Str] @x = Array[Str].new(<a b ␤»
08:28 zengargoyle m: my Array[Str] @x = Array[Str].new(<a b c>), Array[Str].new(<d e f>); say @x.^name; dd @x;
08:28 camelia rakudo-moar 3ff29d: OUTPUT: «Array[Array[Str]]␤Array[Array[Str]] @x = Array[Array[Str]].new(Array[Str].new("a", "b", "c"), Array[Str].new("d", "e", "f"))␤»
08:28 Cabanossi joined #perl6
08:29 maettu joined #perl6
08:34 hobbs nine: you have no chance to survive make your time?
08:36 moritz hobbs, tadzik: thanks, I'll look at statsd
08:39 geekosaur joined #perl6
08:39 robertle joined #perl6
08:42 salv0 joined #perl6
08:53 geekosaur joined #perl6
08:56 aborazmeh joined #perl6
08:56 aborazmeh joined #perl6
08:58 Cabanossi joined #perl6
09:14 avar Discussion (at a distance) about what the unification plan for p5 and p6 is, on p5p: https://rt.perl.org/Public/Bug/Display.html?id=131538#txn-1464910
09:20 raiph joined #perl6
09:30 xtreak joined #perl6
09:35 domidumont joined #perl6
09:51 rindolf Hi all! Why is the third say printing "True" here - http://paste.debian.net/970739/ ?
09:51 jnthn == is numeric equality
09:51 yoleaux 01:34Z <japhb> jnthn: Why does a968d2759c9c16e76e57718063f968a7152795a5 specify a non-power-of-two buffer size?
09:51 yoleaux 01:34Z <japhb> jnthn: (Or to be more specific, not a power of 2 and not a power of two minus 1 either)
09:52 rindolf jnthn: ah
09:52 jnthn And an array in numeric context is its number of elements
09:52 rindolf jnthn: ah
09:52 rindolf jnthn: http://perl6maven.com/arrays-in-perl6 - so this is misleading
09:53 llfourn rindolf: yes that's incorrect
09:53 llfourn ~~ would check they have the same content
09:53 rightfold Use eqv
09:54 llfourn (or that)
09:57 Cabanossi joined #perl6
09:59 rindolf llfourn: would ~~ check that in the same order?
09:59 llfourn yep
10:04 mr-foobar joined #perl6
10:06 rindolf llfourn: i see - thanks
10:07 salv0 joined #perl6
10:23 lizmat_ joined #perl6
10:33 g4 joined #perl6
10:33 g4 joined #perl6
10:38 lizmat joined #perl6
10:42 Cabanossi joined #perl6
11:05 mr-foobar joined #perl6
11:06 cdg joined #perl6
11:18 aborazmeh joined #perl6
11:18 aborazmeh joined #perl6
11:21 timotimo https://imgur.com/gallery/XOT47 - beautiful
11:22 finanalyst_ joined #perl6
11:27 CacoS joined #perl6
11:27 Cabanossi joined #perl6
11:28 CacoS Hello, everyone!
11:29 CacoS Is there a pdf version of this page: http://perl6intro.com/?
11:30 timotimo https://github.com/rakudo/star/tree/master/docs - this has one. not sure if an up-to-date version is made available regularly
11:31 araraloren joined #perl6
11:31 jeek joined #perl6
11:32 CacoS timotimo: thanks :), I used https://www.printfriendly.com/ on it.
11:32 araraloren evening .o/
11:35 timotimo https://github.com/hankache/perl6intro - this tells you how to .pdf it
11:38 CacoS Thank you. See you later, bye !
11:39 AlexDaniel joined #perl6
12:01 mr-fooba_ joined #perl6
12:04 aborazmeh joined #perl6
12:04 aborazmeh joined #perl6
12:07 zakharyas joined #perl6
12:11 imcsk8 joined #perl6
12:11 lizmat joined #perl6
12:26 lizmat joined #perl6
12:28 Cabanossi joined #perl6
12:31 lizmat joined #perl6
12:36 MARTIMM what can cause 'Missing serialize REPR function for REPR Decoder (Rakudo::Internals::VMBackedDecoder)'. it is thrown without a linenumber. It think while parsing but I am not sure.
12:36 mcmillhj joined #perl6
12:37 xtreak joined #perl6
12:38 wamba joined #perl6
12:40 jnthn Trying to serialize an I/O handle, most probably.
12:40 jnthn So, most probably something happening in a BEGIN or constant or similar
12:41 MARTIMM jnthn: That might be possible. It pops up in Log::Async and there is a lot of I/O and some phasers
12:43 jnthn It's possible that in the past we silently allowed I/O handles to be serialized, on the understanding that they'd only explode if you ever tried to use them in the future
12:43 jnthn If this is a regression, then we probably would want to go back to doing that
12:48 MARTIMM jnthn: I'm afraid I don't understand this. I understood that it is serialized by default to utf-8, does it explode when wrong characters are sent?
12:49 jnthn Ah, I was talking about the serialization that happens when a module is compiled
12:49 jnthn We have to preserve stuff that comes to exist at BEGIN time
12:50 jnthn It sounds like an I/O handle is ending up in that set of things, probably unintentionally
12:51 MARTIMM jnthn: ok. aren't the handles closed then. could  close them and reopen in the BEGIN phase?
12:52 MARTIMM jnthn: in a new() the handle $*OUT is used from an INIT phase
12:55 xzhao joined #perl6
12:57 lizmat joined #perl6
12:58 Cabanossi joined #perl6
12:59 xzhao joined #perl6
13:02 bioduds hey guys
13:02 bioduds can you help me out with something?
13:03 bioduds I'm posting the gist
13:04 bioduds https://gist.github.com/bioduds/f4acfdc1294684243976a4205c7413b5 here
13:05 bioduds please, how can I actually get the IPs as a list, in an array, for instance?
13:08 bioduds interesting, I found the answer, changing from token to rule
13:08 bioduds thanks mans
13:08 bioduds solved here
13:10 colomon bioduds: that makes it seem like a problem with your grammar?
13:11 araraloren :)
13:12 bioduds_ joined #perl6
13:12 bioduds_ disconnected
13:12 * colomon is scratching his head in puzzlement at how { d+ . d+ . d+ . d+ } could work as a rule
13:13 lucasb joined #perl6
13:13 colomon m: say “100.1.2.45” ~~ m:s/ \d+ \. \d+ \. \d+ \. \d+ /
13:13 camelia rakudo-moar 3ff29d: OUTPUT: «「100.1.2.45」␤»
13:13 colomon guess that’s how
13:16 colomon m: say “100.1.2.  45” ~~ m:s/ \d+ \. \d+ \. \d+ \. \d+ /
13:16 camelia rakudo-moar 3ff29d: OUTPUT: «「100.1.2.  45」␤»
13:17 colomon bioduds_: I think maybe you should be leaving ADDRESS as a token and changing TOP so the list of ADDRESSs can have spaces between them
13:17 colomon (can / MUST have spaces between them)
13:18 colomon that might be as simple as adding a space between <ADDRESS> and +
13:19 bioduds_ thanks colomon
13:19 bioduds_ actually I only needed to change token to rule in ADDRESS
13:19 colomon bioduds_: that doesn’t work righjt
13:20 bioduds_ still getting the hang of this great thing called grammars
13:20 bioduds_ no, it works
13:20 colomon please see above
13:20 bioduds_ thanks for looking after it
13:20 colomon it changes your grammar so an address can have spaces in it
13:20 bioduds_ let me see
13:20 colomon and spaces after it, which is why it helps the problem you are looking at
13:22 Geth ¦ doc: 9729894c3a | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Failure.pod6
13:22 Geth ¦ doc: Remove duplicate word; closes  #1371
13:22 Geth ¦ doc: review: https://github.com/perl6/doc/commit/9729894c3a
13:23 khw joined #perl6
13:26 lucasb good morning
13:26 araraloren :)
13:28 Cabanossi joined #perl6
13:31 bioduds_ great, thanks :D
13:32 Geth ¦ doc: 8ee169b496 | (Jan-Olof Hendig)++ | doc/Type/UInt.pod6
13:32 Geth ¦ doc: A couple of code related fixes. eveo++
13:32 Geth ¦ doc:
13:32 Geth ¦ doc: More can be done here
13:32 Geth ¦ doc: review: https://github.com/perl6/doc/commit/8ee169b496
13:34 lucasb re discussion in the mailing list about what to call $var
13:35 lucasb I think I call them a scalar variable, even if that is not entirely accurate
13:35 lucasb but maybe P6 prefer to simply call them "dollar-sigiled" variable?
13:35 lucasb *P6 folks
13:38 zengargoyle m: say '192.168.1.1' ~~ token { ^ [ \d ** 1..3 ] ** 4 % '.' $ }
13:38 camelia rakudo-moar 3ff29d: OUTPUT: «「192.168.1.1」␤»
13:40 zengargoyle though when parsing machine generated output.... /\S+/   those things are dumping 32bit integers to ntoa() or something and the chances of something going wrong are exceedingly nil.
13:42 colomon zengargoyle: if you want to get paranoid, you also want to make sure the numbers are less than 256, no?
13:42 perlpilot lucasb: "scalar" works.  as does "item"
13:43 perlpilot IMHO of course
13:44 skids joined #perl6
13:44 mspo what's the unicode bot again:
13:44 zengargoyle if a program (`dig` in this case) then internally it's a 32bit number or an IP structure using common IP->String conversions... it can't generate a false IP from a 32bit number
13:44 mspo u: U+E630
13:44 unicodable6 mspo, U+E630 <Private Use> [Co] ()
13:44 lucasb perlpilot: agreed, thanks
13:44 mspo u: U+E635
13:44 unicodable6 mspo, U+E635 <Private Use> [Co] ()
13:44 mspo bummer I see a webpage saying those are dr seuss characters
13:45 mspo http://www.evertype.com/standards/csur/seuss.html
13:45 zengargoyle sure, do extreme checking if it's input from a user...  but it's like you're not going to see a malformed IP in a Cisco router log.
13:46 mspo that's a lot of credit to cisco
13:46 zengargoyle hehe.
13:48 xzhao joined #perl6
13:48 [Coke] docs/xt/duplicates.t found its first docubug (after the initial run). whee.
13:49 * zengargoyle is just coming off of a 16 year stint as network engineer/programmer.  oh, the horror's i've seen....
13:52 perlpilot bioduds_: I just saw the TPC schedule and noticed a tutorial by Damian Conway-- http://www.perlconference.us/tpc-2017-dc/talks/#parsing_with_perl_6_regexes_and_grammars    Made me think of your recent attempts at parsing dig output.
13:52 perlpilot bioduds_: if you're going to TPC, you might want to spend the extra $150 and attend Damian's tutorial
13:52 bioduds_ oh, perlpilot that is awesome, I'm a great fan of Dr. Conway
13:54 bioduds_ I'm definitely looking into it, thanks man :)
13:54 perlpilot sure
13:56 bioduds_ this here A little less line noise, please: Perl6 Regexen. also looks promissing to my current stage
13:56 bioduds_ Let me just say I'm baffled with Grammars
13:56 zengargoyle m: say '192.168.1.9' ~~ token { ^ [ \d ** 1..3 ] ** 4 % '.' $ }
13:56 camelia rakudo-moar 3ff29d: OUTPUT: «「192.168.1.9」␤»
13:56 bioduds_ I mean, I knew it was bringing something quite remarkable but I am experiencing it now
13:57 [Coke] well, we'll try to help where we can.
13:57 bioduds_ this conference will be in DC? That means Washington?
13:57 * zengargoyle wonders where to even put the <=255 check in there, and now thinks d is to broad, if we're going for human input. :)
13:57 lizmat joined #perl6
13:58 st_elmo joined #perl6
13:58 colomon zengargoyle: presumably the “right” way to do it is to have a “decimal byte” token or somesuch
13:59 colomon bioduds_: the problem with your original gist was that you didn’t allow anything to separate <ADDRESS> tokens
13:59 bioduds_ yep, I can see that now :)
14:00 bioduds_ great, thanks :)
14:00 colomon bioduds_: you needed somthing like <ADDRESS> + instead of <ADDRESS>+
14:00 bioduds_ yep, I did change to rule ADDRESS and it did the trick
14:01 bioduds_ I mean, I'm trying to build a com system that will actually look like a talk between P2P nodes
14:01 bioduds_ so messages though very english-ish must comply to format
14:01 Geth ¦ doc: 6a196550fd | (Jan-Olof Hendig)++ | doc/Type/Thread.pod6
14:01 Geth ¦ doc: Added docs for Thread.Numeric
14:01 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6a196550fd
14:02 zengargoyle then again, just a plain 32bit int or hex is sometimes used for non-canonical IP representation.
14:05 bioduds_ in TCP/IP it would right?
14:06 kaare_ joined #perl6
14:12 travis-ci joined #perl6
14:12 travis-ci Doc build errored. Zoffix Znet 'Remove duplicate word; closes  #1371'
14:12 travis-ci https://travis-ci.org/perl6/doc/builds/241190217 https://github.com/perl6/doc/compare/a037abf45db6...9729894c3aad
14:12 travis-ci left #perl6
14:13 zengargoyle bioduds_: in the actual IP layer, and IP address is just a chunk of 32bits (4bytes).  the dotted quad is just a convential representation.
14:14 bioduds_ I didn't understand yet how the layers work
14:14 bioduds_ they are serial?
14:14 bioduds_ header layers then TCP layers in a row?
14:14 [Coke] m: my $set = SetHash.new(); $set<a>=True; sub visit(:$set is copy) { $set<b> = True }; visit(:$set); say $set<b>;
14:14 camelia rakudo-moar 3ff29d: OUTPUT: «True␤»
14:15 [Coke] Does "is copy" not work on containers?
14:15 * [Coke] switches this over to an array, maybe.
14:16 jnthn It's only one level deep; here its the Scalar that is the container
14:16 AlexDaniel joined #perl6
14:17 [Coke] I would say that maybe should go under doc traps, if it's not there already.
14:18 zengargoyle not quite, but it's hard to know where to start.  wikipedia on the OSI 7 layer model or the TCP/IP layer model.  i'm just saying that the dotted-quad (192.168.1.1) form for an IP address is just a thing for humans to read/write.  the 'real' IP address is just 32bits of ones and zeros.
14:19 zengargoyle and if the output comes from a program, (especially a network oriented program) the IPs are probably really stored as the 32bit numbers and just converted to the dotted-quad on output.
14:20 Geth ¦ doc: e327a96a23 | (Jan-Olof Hendig)++ | doc/Type/Tap.pod6
14:20 Geth ¦ doc: Removed methods which are no longer present. jnthn++
14:20 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e327a96a23
14:21 zengargoyle there are standard library functions to do this.  if it comes out of a network tool, there's no need to check the formatting because it will always be correct.
14:23 zengargoyle (\S+) will match an IP from a computer just fine.  on the bonus side, it also matches a hostname (example.com).
14:23 wamba joined #perl6
14:23 [Coke] zengargoyle: another way to say that is you're not necessarily mapping IP addresses, you're mapping the-things-that-this-tool-generates-that-look-like-IPs.
14:24 [Coke] (is copy) yay, fixed a bug in a one-off p6 script for Dayjob there.
14:25 zengargoyle it's only if you're matching input from humans that you need to do the \d ** 1..3 ] ** 4 % ','  thing which still isn't good enough to actually check human input.
14:28 zengargoyle [Coke]: i try not to think that deeply about it.  just years of doing just this sort of stuff and learning that for the most part,  it's easier to catch it on failure to bind.  then you can accept IP or DNS hostname and it doesn't matter.  and a simple aton() tells you if it's valid or not.
14:32 zengargoyle but yeah the-things-that-this-tool-generates-that-look-like-IPs are just \S+ and there's an almost certainty that they're validly formatted because you can't toss a 32bit number into ntoa() and get a badly formatted IP.
14:33 zengargoyle it's like checking that a string is hex when you know it was printed with %x
14:34 zengargoyle or testing that 2 + 2 == 4
14:35 zengargoyle m: say '192.168.1.9' ~~ token { ^ ( \d ** 1..3 ) <?{ +$/ <= 255 }> ** 4 % '.' $ }
14:35 camelia rakudo-moar 3ff29d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Can only quantify a construct that produces a match␤at <tmp>:1␤------> 3d ** 1..3 ) <?{ +$/ <= 255 }> ** 4 % '.'7⏏5 $ }␤»
14:36 * zengargoyle still can't figure this out, think you may have to break it down to a subrule for the byte or use captures or something.
14:38 zengargoyle it seems to not like asserts in the middle of the ** ** % sort of thing.
14:39 jnthn You're quantifying a zero-width assertion there
14:39 jnthn The ** applies to the last atom
14:40 jnthn Maybe you wanted [ ( \d ** 1..3 ) <?{ $/ <= 255 }> ] ** 4 % '.'
14:41 zengargoyle m: say '192.168.1.9' ~~ token { ^ [ \d <?{ $/ <= 255 }> ** 1..3 ] ** 4 % '.' $ }
14:41 camelia rakudo-moar 3ff29d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Can only quantify a construct that produces a match␤at <tmp>:1␤------> 3token { ^ [ \d <?{ $/ <= 255 }> ** 1..3 7⏏5] ** 4 % '.' $ }␤»
14:43 zengargoyle i was trying to avoid the captures....
14:45 zengargoyle works, but i don't quite get it. :)   guess i'll have to think on it for a while.  thanks.
14:47 jnthn Yeah, $/ isn't quite right, would need to be ~$0 or so
14:47 ctilmes zengargoyle: does it determine that 292.168.1.9 is a bad IP address?
14:47 jnthn It was the wrong precedence I was trying to point out
14:47 zengargoyle is there some reasong that it has to be () around that bit instead of []
14:47 jnthn Yes, so $/ contains the right thing :)
14:47 jnthn Otherwise $/ is the whole thing matched so far
14:47 ctilmes zengargoyle: never mind I see the <= now
14:48 zengargoyle ctilmes: i'm also just assuming that \d is >= 0 :P
14:49 zengargoyle m: '192.168.1.9' ~~ token { ^ [ (\d ** 1..3 <?{ ~$0 <= 255 }>) ] ** 4 % '.' $ }
14:49 camelia rakudo-moar 3ff29d: OUTPUT: «Use of Nil in string context␤  in block  at <tmp> line 1␤Use of Nil in string context␤  in block  at <tmp> line 1␤Use of Nil in string context␤  in block  at <tmp> line 1␤Use of Nil in string context␤  in block  at <tmp> line 1␤»
14:50 zengargoyle m: '192.168.1.9' ~~ token { ^ [ (\d ** 1..3 ) <?{ ~$0 <= 255 }> ] ** 4 % '.' $ }
14:50 camelia rakudo-moar 3ff29d: OUTPUT: «Cannot convert string to number: trailing characters after number in '192⏏5 168' (indicated by ⏏)␤  in regex  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:52 bisectable6 joined #perl6
14:53 moritz m: '192.168.1.9' ~~ token { ^ [ (\d ** 1..3 ) <?{ ~$0[*-1] <= 255 }> ] ** 4 % '.' $ }
14:53 camelia rakudo-moar 9151eb: ( no output )
14:53 moritz m: say so '192.168.1.9' ~~ token { ^ [ (\d ** 1..3 ) <?{ ~$0[*-1] <= 255 }> ] ** 4 % '.' $ }
14:53 camelia rakudo-moar 9151eb: OUTPUT: «True␤»
14:54 moritz explanation: the () is quantified, so $0 becomes an array
14:54 moritz m: say so '192.168.1.955' ~~ token { ^ [ (\d ** 1..3 ) <?{ ~$0[*-1] <= 255 }> ] ** 4 % '.' $ }
14:54 camelia rakudo-moar 9151eb: OUTPUT: «False␤»
14:56 zengargoyle yay! moritz++
14:59 zengargoyle i guess you suffer the capture for the sake of the assert and probably fix it up at the end with make.
15:07 * zengargoyle idly wonders if Regexp::Common* would port with :P5
15:13 travis-ci joined #perl6
15:13 travis-ci Doc build errored. Jan-Olof Hendig 'Removed methods which are no longer present. jnthn++'
15:13 travis-ci https://travis-ci.org/perl6/doc/builds/241212941 https://github.com/perl6/doc/compare/6a196550fd25...e327a96a23a3
15:13 travis-ci left #perl6
15:14 as_ joined #perl6
15:15 as_ rakudo: say 1 if 3 !≠ 3
15:15 camelia rakudo-moar 326fae: OUTPUT: «1␤»
15:15 as_ is this correct that !≠  also exists? :-)
15:23 [Coke] ! (anything) exists, aye.
15:23 [Coke] it's the same magic that makes != work
15:24 zengargoyle and makes ²² == 4 work. :P
15:24 colomon r: say 3 !> 3
15:24 camelia rakudo-moar 326fae, rakudo-jvm 3ff29d: OUTPUT: «True␤»
15:24 zengargoyle magic is so weird.
15:24 colomon r: say 3 !!> 3
15:24 camelia rakudo-jvm 3ff29d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3say 37⏏5 !!> 3␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier␤        stateme…»
15:24 camelia ..rakudo-moar 326fae: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3say 37⏏5 !!> 3␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier␤        statem…»
15:24 [Coke] zengargoyle: no, that's different.
15:25 colomon r: say 3 !?!> 3
15:25 camelia rakudo-jvm 3ff29d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Negation metaoperator not followed by valid infix␤at <tmp>:1␤------> 3say 3 !7⏏5?!> 3␤    expecting any of:␤        infix␤        infix stopper␤»
15:25 camelia ..rakudo-moar 326fae: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Negation metaoperator not followed by valid infix␤at <tmp>:1␤------> 3say 3 !7⏏5?!> 3␤    expecting any of:␤        infix␤        infix stopper␤»
15:25 colomon not enough magic.  :)
15:25 [Coke] colomon: are you meaning to also be testing JVM?
15:25 [Coke] (if not, m: works)
15:25 colomon [Coke]++ # out of practice colomon
15:26 * zengargoyle it's a kind of magic....... One dream one soul one prize one goal…
15:26 * colomon one golden glimpse
15:28 * colomon consults ancient lyrics files from pre-web days.  “glance” not “glimpse"
15:28 lizmat joined #perl6
15:28 robertle joined #perl6
15:29 Sgeo joined #perl6
15:30 skids joined #perl6
15:32 Sgeo_ joined #perl6
15:41 kaare_ joined #perl6
15:41 incredible joined #perl6
15:43 Cabanossi joined #perl6
15:43 lizmat joined #perl6
15:48 st_elmo joined #perl6
15:57 zengargoyle m: say 2⁼⁼2
15:57 camelia rakudo-moar 326fae: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Bogus postfix␤at <tmp>:1␤------> 3say 27⏏5⁼⁼2␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier␤        …»
15:58 lizmat joined #perl6
16:03 zengargoyle m: my \n = 2; say 2ⁿ;
16:03 camelia rakudo-moar 326fae: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3my \n = 2; say 27⏏5ⁿ;␤»
16:03 cdg joined #perl6
16:08 zengargoyle m: my \ⁿ = 2; say 2ⁿ;
16:08 camelia rakudo-moar 326fae: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3my \ⁿ = 2; say 27⏏5ⁿ;␤»
16:09 lichtkind joined #perl6
16:09 zengargoyle m: my \ⁿ = 2; say ⁿ
16:09 camelia rakudo-moar 326fae: OUTPUT: «2␤»
16:28 Cabanossi joined #perl6
16:29 lizmat joined #perl6
16:39 st_elmo joined #perl6
16:39 lucasb joined #perl6
16:40 lucasb m: say 2 ![![![![==]]]] 2
16:40 camelia rakudo-moar 326fae: OUTPUT: «True␤»
16:48 devmikey joined #perl6
16:51 xzhao joined #perl6
16:54 [Coke] well, it's not not not not NOT wrong.
16:59 lucs How to perl6ishly iterate over two arrays in parallel?
16:59 lizmat joined #perl6
17:00 colomon lucs: for @a Z @b -> $a, $b
17:00 lucs Ah man, that is so cool :)
17:00 * colomon hopes he got the syntax right, but that is the idea
17:00 lucs Thanks
17:01 [Coke] m: my @a = <a b c>; my @b = <e f g>; for @a Z @b -> ($a, $b) { say "$a,$b"} #yup, you did
17:01 colomon m: my @a = 1..3; my @b = 4..6; for @a Z @b -> $a, $b { say “$a is less than $b” }
17:01 camelia rakudo-moar 326fae: OUTPUT: «a,e␤b,f␤c,g␤»
17:01 camelia rakudo-moar 326fae: OUTPUT: «1 4 is less than 2 5␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at <tmp> line 1␤␤»
17:01 [Coke] if they won't match up, use $b?
17:01 [Coke] colomon: also, use ()s
17:02 colomon m: my @a = 1..3; my @b = 4..6; for @a Z @b -> ($a, $b) { say “$a is less than $b” }
17:02 [Coke] (or flatten, or...)
17:02 TimToady note that it stops on the shorter list, if they can be different lengths
17:03 [Coke] m: my @a = <a b c d>; my @b = <e f g>; for @a Z @b -> ($a, $b?) { say "$a,$b"} #yup, you did
17:03 camelia rakudo-moar 326fae: OUTPUT: «a,e␤b,f␤c,g␤»
17:04 [Coke] ah, probably need the flattening there, and not ()
17:04 colomon () with no flattening worked on my local p6 build a second ago
17:04 colomon m: my @a = 1..3; my @b = 4..6; for @a Z @b -> ($a, $b) { say “$a is less than $b” }
17:04 camelia rakudo-moar 326fae: OUTPUT: «1 is less than 4␤2 is less than 5␤3 is less than 6␤»
17:06 Geth ¦ doc: 8fc44c4428 | (Jan-Olof Hendig)++ | doc/Type/Tap.pod6
17:06 Geth ¦ doc: Fixed broken example code. jnthn++, ugexe++
17:06 Geth ¦ doc: review: https://github.com/perl6/doc/commit/8fc44c4428
17:12 Cabanossi joined #perl6
17:14 mcmillhj joined #perl6
17:16 st_elmo joined #perl6
17:17 domidumont joined #perl6
17:28 pilne joined #perl6
17:29 eveo joined #perl6
17:29 lizmat joined #perl6
17:32 Geth ¦ doc: e6c3b65958 | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6
17:32 Geth ¦ doc: No closing argument here. Was removed in 2015
17:32 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e6c3b65958
17:32 eveo joined #perl6
17:39 zakharyas joined #perl6
17:39 bioduds_ amazingly, grammars are letting me build a P2P communication as if the two nodes were talking to each other
17:42 bioduds_ I'm about to post it so you may see if it interests you guys
17:42 Cabanossi joined #perl6
17:43 timotimo intriguing
17:47 eveo lucs: along with Z there's also roundrobin that doesn't stop when one list gets exhausted: https://docs.perl6.org/routine/roundrobin
17:48 eveo m: my @a = <a b c d>; my @b = <e f g>; for roundrobin @a, @b -> ($a, $b = "X") { say "$a,$b"}
17:48 camelia rakudo-moar 326fae: OUTPUT: «a,e␤b,f␤c,g␤d,X␤»
17:48 travis-ci joined #perl6
17:48 travis-ci Doc build errored. Jan-Olof Hendig 'Fixed broken example code. jnthn++, ugexe++'
17:48 travis-ci https://travis-ci.org/perl6/doc/builds/241274748 https://github.com/perl6/doc/compare/e327a96a23a3...8fc44c442843
17:48 travis-ci left #perl6
17:50 eveo left #perl6
17:51 bioduds_ https://steemit.com/blockchain/@bitworkers/bitcoin-deep-study-perl6-hon-p2p-networking-building-a-node-to-node-communication-system-as-if-the-nodes-were-talking-to-each
17:51 zengargoyle m: my @a = <a b c>; my @b = <e f g h>; for @a <<,>> @b -> ($a, $b) { say "$a,$b"}
17:51 camelia rakudo-moar 326fae: OUTPUT: «a,e␤b,f␤c,g␤a,h␤»
17:51 bioduds_ there you go, unimplemented, only sketched out
17:52 zengargoyle bioduds_: did you catch the end of the IP matching chatter?
17:53 bioduds_ yes zengargoyle, perfectly :D I'm finding this so nice because, from start, my messaging system is injection protected, you know?
17:53 bioduds_ Because it won't backtrack, right?
17:54 bioduds_ If it comes with scrambled information, then it simply does not execute
17:54 bioduds_ or with injection attempts
17:54 bioduds_ it will simply fail :D
17:56 zengargoyle yeah, Klingon programing.  better to die.
17:56 ponbiki joined #perl6
17:57 * zengargoyle thinks that was a mst talk but can't remember a quotable quote.
17:57 bioduds_ lol
17:57 bioduds_ with honor
17:58 zengargoyle but the \d needs to be something else to restrict to actual 0..9
17:58 zengargoyle \d will match weird unicode digit things.
17:58 bioduds_ I'm subseting it afterwards
17:58 zengargoyle sweet!
17:58 bioduds_ yep :D P6 is SWEET!!
18:00 bioduds_ join me in this "First Perl6 Blockchain" quest!! :D all help is hugely appreciated!!
18:00 lizmat joined #perl6
18:00 bioduds_ Decentralized Justice! :D
18:01 zengargoyle https://www.youtube.com/watch?v=KWIl9pP2BF8  -- Paul Fenwick, my bad.
18:01 zengargoyle sorta different, but sorta the same.
18:03 zengargoyle it is better to die() in the attempt then to return() in failure.
18:10 zengargoyle https://en.wikipedia.org/wiki/Robustness_principle
18:12 zengargoyle Be conservative in what you do, be liberal in what you accept from others
18:12 zengargoyle such a mismatch.
18:16 perlpilot I've always called that that Postel Principle (after the RFC editor Jon Postel)
18:16 perlpilot oh, the wikipedia article says as much  :)
18:18 zengargoyle heh,
18:21 geekosaur yes, noble idea but also led to a lot of broken implementations that ignored 'be conservative' because all the 'be liberal' impls let them get away with it
18:21 zengargoyle bioduds_: i'd also humbly ask that you think about treating IP as IP and not as IPv4.  v4 is the dotted-quad thingy, but there's v6 which is 128bits usually in a crazy dead:beaf::dead:beaf format.
18:21 zengargoyle not supporting v6 as well as v4 is a bane to all existance. :P
18:22 bioduds_ yes, zengargoyle. This was noticed before by me. You see, I am using bitcoin protocol as a model and it does allows ipv6 communication. Thank you very much for pointing out zengargoyle++
18:22 bioduds_ you are totally right, is like being stuck in pre-history
18:24 bioduds_ question: can I type a token?
18:24 bioduds_ token Int TOKEN { ... } for instance
18:26 zengargoyle that's like the second reason i usuall just use \S+ and let it fail in the later in the networking bits.  input (dotted-quad, IPv6, hostname) output IP connection.  the lower levels won't take bad input.  it just moves the errors into different levels of your code.
18:27 zengargoyle "that's not a valid IP" vs "can't connect to 'whatever-bad-thing-you-gave-me'"
18:27 zengargoyle totally may not apply to your particular case. :)
18:31 lizmat joined #perl6
18:33 bioduds_ you mean I should handle the errors in this case?
18:33 bioduds_ how would I do that? It simply fails. I actually tried using with $.attribute else shout out error but it never executes
18:34 bioduds_ is there a way to catch these non-executing rules?
18:35 bioduds_ one other thing: method new {} is like a constructor?
18:36 zengargoyle i think we went off in different directions. :)
18:38 bioduds_ no, sorry, my mistake
18:38 bioduds_ I wen't a completely different question
18:38 bioduds_ surely got you confused
18:38 bioduds_ let's go back on the first issue
18:38 zengargoyle nah, i just missed it while typing or thinking. :)
18:38 bioduds_ the data input treatment
18:39 bioduds_ you was saying you rather go loose with \S+ instead of trying to go precisely with the input data, right?
18:40 bioduds_ thing is I need some stringency here due to the fact I'm building a sort of a com protocol
18:40 zengargoyle myself, i would only validate an IP if i was putting it into a database or file as a text string.  and would still probably do validation some other way.
18:41 bioduds_ I'll check on that possibility
18:42 bioduds_ since these are P2P nodes I must be carefull not to save too much info not to flood the node
18:42 zengargoyle an IP as 'a thing you connect to another machine' if you validate the actual token, it doesn't matter.  if you pass a bad IP to the connect it will fail.  catch the error when connecting.
18:42 bioduds_ ok, got it
18:42 bioduds_ like assume it is right
18:42 bioduds_ if it is not, it simply won't connect
18:42 bioduds_ ok
18:42 bioduds_ makes sense
18:42 geekosaur if it's a comm protocol you migth want to just punt and use the raw value (u32 for ipv4, u128 for ipv6) and not try to validate because you can't really
18:43 geekosaur there are some seriously weird network configs out there
18:43 zengargoyle it has to be right to actually connect.
18:44 zengargoyle anything you catch as 'wrong' wouldn't actually even make it to the 'try to connect' phase.
18:44 bioduds_ it does, otherwise it will fail which is no major issue since the node will pass to the next trial
18:44 bioduds_ until it fills in his max-node connections
18:44 zengargoyle it will fail fast.
18:45 bioduds_ great, one other question
18:45 zengargoyle connect to 999.999.999.999 will return fail immediatly because it's not actually valid.
18:45 bioduds_ should I go with IO::Socket::Async or IO:Socket::INet ?
18:46 * zengargoyle no clue...
18:48 bioduds_ I'm assuming INet is synchronous
18:49 * zengargoyle thinks jnth just did some work on async stuff related to IO::Socket::Async and ...::Inet
18:50 zengargoyle but it's deep magic and MoarVM and libuv stuff that i don't fully understand. :{
18:52 zengargoyle https://6guts.wordpress.com/2017/06/08/sorting-out-synchronous-io/
18:52 wamba joined #perl6
18:58 bioduds_ reading it ...
18:58 bioduds_ tx man, I need to stay sharp on everything about P6 if I want this project to succeed
18:58 zengargoyle you might have to wait around and try asking again when the people who know are awake. :P
19:02 lizmat joined #perl6
19:03 AlexDaniel joined #perl6
19:06 zengargoyle i *think* they want to make IO::Socket::INet work exactly like you would expect it to and the ...::Async was a temporary measure to work around INET not quite working as expected yet.  but i might be totally wrong.
19:07 bioduds_ ok
19:08 bioduds_ you taught me the export PERL6LIB
19:08 bioduds_ do I need to put every folder in my project in it?
19:08 bioduds_ like so: =/home/bioduds/bitworkers/EscrowChain/dev/lib,/home/bioduds/bitworkers/EscrowChain/dev/lib/core,/home/bioduds/bitworkers/EscrowChain/dev/lib/network,/home/bioduds/bitworkers/EscrowChain/dev/lib/grammars
19:11 lucasb joined #perl6
19:11 zengargoyle you probably want ugexe. :)  i think you could just `zef --to=home install .` and not worry about it that much.
19:12 cygx joined #perl6
19:12 cygx m: sub foo { my $x = 0; say("a $x") andthen say("b $x") andthen $x = 1 }; foo; foo
19:12 camelia rakudo-moar 326fae: OUTPUT: «a 0␤b 0␤a 0␤b 1␤»
19:13 cygx ^ bug?
19:15 mspo http://gate.schedar.uberspace.de/vslides/2016/yapc-eu-cluj/lfptr.html#0
19:15 mspo nice
19:16 zengargoyle i'd think you just need /home/bioduds/bitworkers/EscrowChain/dev/lib  -- but i don't know enough about your setup.  i don't know that much beyond the simple adding `PERL6LIB=lib` to replace the `-Ilib` sort of usage.
19:18 TEttinger joined #perl6
19:18 zengargoyle if you do a `perl6 -B` you can see the repo::chain that's being used.  -- repo::chain=inst#/home/zen/.perl6 ... --
19:19 zengargoyle and if you do a `PERL6LIB=lib perl6 -V` you'll see -- file#/home/zen/p6/p6-Algorithm-Trie-libdatrie/lib
19:22 zengargoyle you can think around the 'inst#' vs 'file#' bits and play around with PERL6LIB until it works. :)  and use those same sort of strings in the '--to' option of `zef` to install things into a special location.  it all sorta depends
19:24 zengargoyle and it's my bedtime so i'm calling it a night because it's too hard to think.  :)  but it's been a nice back and forth.
19:32 lizmat joined #perl6
19:33 lucasb m: for ^7 { my $x = 10; 1 andthen print "$x " andthen $x = 20 andthen $x = 30 andthen $x = 40 }
19:33 camelia rakudo-moar 326fae: OUTPUT: «10 40 30 30 30 30 30 »
19:34 lucasb cygx: strange, indeed
19:35 lucasb but then, I have no idea what andthen does :)
19:35 perlpilot cygx: looks like a bug to me
19:35 lucasb it seems like the print statement is caching some wrong values from past iterations
19:36 cygx lucasb: andthen checks the LHS for definedness and conditionally executes the RHS, setting $_
19:37 lucasb cygx: ah, thanks.
19:37 cygx and somehow, it creates a closure over the wrong $x
19:37 perlpilot cygx: lucasb's example is even more bizarre
19:37 lucasb would you say andthen is like a topicalizer "and" ?
19:38 cygx lucasb: almost  - definedness vs truthiness
19:38 lucasb ah, got it
19:41 * perlpilot idly wonders if orelse has a similar problem.
19:41 perlpilot I guess not since the short circuit flips
19:43 Cabanossi joined #perl6
19:43 raschipi joined #perl6
19:45 perlpilot m: sub foo { my $x = 0; do { say("a $x");  Any } orelse do { say("b $x"); Any }  orelse do { $x = 1; Any } };  foo; foo;
19:45 camelia rakudo-moar 326fae: OUTPUT: «a 0␤b 0␤a 1␤b 1␤»
19:45 perlpilot yeah, something isn't scoping right
19:51 cygx rakudobugged as RT#131548
19:51 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131548
20:02 lizmat joined #perl6
20:11 ChoHag joined #perl6
20:13 Cabanossi joined #perl6
20:18 Xliff nine: Still here?
20:18 Xliff OK, I am trying to search through the P6 equivalent of @INC to see if there are files installed in a specific directory (ie namespace)
20:20 Xliff Previously, I could do this: for @($*REPO.repo-chain).grep({$_ ~~ CompUnit::Repository::FileSystem || $_ ~~ CompUnit::Repository::Installation }) -> $c { ... }
20:21 Xliff And do naughty things to $c.path-spec to accomplish what I need. Would that still work?
20:24 Celelibi joined #perl6
20:33 lizmat joined #perl6
20:43 Cabanossi joined #perl6
20:44 bioduds_ thanks
20:44 bioduds_ I had to leave after I asked
20:44 bioduds_ thanks for the answers zen
20:57 user3 joined #perl6
21:02 user3 How can I store a reference to variable $x in variable $z This doesn't work:
21:02 user3 m:       my $x=5; my $y := $x; my $z = $y; $x=8; say $z; # 5
21:02 camelia rakudo-moar 326fae: OUTPUT: «5␤»
21:02 user3 this should be 8 if that worked
21:03 jnthn m: my $x=5; my $y := $x; my $z := $y; $x=8; say $z;
21:03 camelia rakudo-moar 326fae: OUTPUT: «8␤»
21:04 lizmat joined #perl6
21:05 user3 ok, but what if want to store the reference into the variable $z rather than create a new alias?
21:06 lostinfog joined #perl6
21:06 user3 can that be done at all?
21:08 jnthn Could do it with a Capture or a List
21:08 jnthn Capture probably is the more natural fit, I guess
21:09 jnthn m: my $x=5; my $y := $x; my $z = \$y; $x=8; say $z[0];
21:09 camelia rakudo-moar 326fae: OUTPUT: «Potential difficulties:␤    To pass an array, hash or sub to a function in Perl 6, just pass it as is.␤    For other uses of Perl 5's ref operator consider binding with ::= instead.␤    Parenthesize as \(...) if you intended a capture of a single v…»
21:09 jnthn heh
21:09 jnthn It's so unidiomatic to do it in Perl 6 it's a warning :P
21:09 jnthn m: my $x=5; my $y := $x; my $z = \($y); $x=8; say $z[0];
21:09 camelia rakudo-moar 326fae: OUTPUT: «8␤»
21:09 user3 wow
21:10 jnthn This probably means
21:10 jnthn oops
21:10 jnthn This probably means it's a case of "there's a different, better, way to do what you're trying to do"
21:11 cygx jnthn: we had some fun with andthen/orelse in the backlog
21:11 cygx m: for ^7 { my $x = 10; 1 andthen print "$x " andthen $x = 20 andthen $x = 30 andthen $x = 40 }
21:11 camelia rakudo-moar 326fae: OUTPUT: «10 40 30 30 30 30 30 »
21:12 cygx something ain't closureing right...
21:12 jnthn Yeah, I saw.
21:12 jnthn Indeed.
21:12 jnthn I've no idea what the impl of those two look like, alas. But I can guess they're missing a clone or a capturelex in the code-gen or some such
21:13 Cabanossi joined #perl6
21:18 user3 left #perl6
21:21 sammers hi #perl6
21:23 zakharyas joined #perl6
21:43 lizmat joined #perl6
21:52 geekosaur joined #perl6
21:59 lizmat joined #perl6
22:06 lizmat joined #perl6
22:15 kyclark joined #perl6
22:30 mcmillhj joined #perl6
22:35 kyclark joined #perl6
22:40 bpmedley joined #perl6
22:44 MasterDuke joined #perl6
22:55 raschipi joined #perl6
22:58 mcmillhj joined #perl6
23:11 skids joined #perl6
23:24 roguelazer joined #perl6
23:28 beginner joined #perl6
23:29 beginner is there a finally block for exceptions in perl6?
23:29 geekosaur I think you want LEAVE
23:31 beginner geekosaur : thank you...will try it
23:31 geekosaur something along the lines of: { code... ; CATCH { #`{ catch exceptions } ... }; LEAVE { #`{ run when done } ... } }
23:37 aindilis` joined #perl6
23:37 robertle_ joined #perl6
23:37 jeek_ joined #perl6
23:37 ChoHag_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo