»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:00
AlexDaniel joined
|
|||
Juerd | Reading 5to6-nutshell, and it reminds me how much Perl 5's $arrayref->@* makes me feel like jumping ship :) | 00:00 | |
00:01
Actualeyes joined
|
|||
Juerd | $foo->$#* with its 5 non-alphanumerics after the variable is so much uglier than $foo.end | 00:01 | |
00:06
benchable6 joined,
ChanServ sets mode: +v benchable6
00:07
petercom1and is now known as petercommand,
petercommand left,
petercommand joined
|
|||
ugexe | if there was something like a $*WHAT-CUR-LOADED-ME then we could have `$*WHAT-CUR-LOADED-ME.need("MyLib")` | 00:08 | |
where CUR can then handle any remapping of paths to source | 00:09 | ||
er, or `use lib "My::Lib"` even | 00:13 | ||
00:15
troys is now known as troys_
00:25
AlexDaniel left
00:42
Cabanossi left
00:44
Cabanossi joined
00:49
Actualeyes left
00:51
cdg left
00:54
lookatme joined
|
|||
lookatme | morning ヽ(•̀ω•́ )ゝ | 00:55 | |
01:02
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:17
raschipi joined
01:22
astj left
01:23
astj joined
01:39
raschipi left
01:41
Cabanossi left
01:44
Cabanossi joined
01:46
ilbot3 left
01:48
ilbot3 joined,
ChanServ sets mode: +v ilbot3
02:10
bioduds left
02:12
pilne left,
Cabanossi left
02:14
Cabanossi joined
02:16
Actualeyes joined
02:29
raiph joined
02:37
mcmillhj joined
02:40
xinming_ joined
02:41
noganex_ joined,
BenGoldberg joined
02:43
troys_ is now known as troys,
xinming left
02:44
noganex left
02:49
mcmillhj left
|
|||
samcv | morning lookatme | 03:15 | |
lookatme | samcv, It's almost noon now. (≖ ‿ ≖)✧ | 03:17 | |
samcv | it's 8pm for me here | 03:18 | |
working more on moarvm's unicode normalizer :) have 4 more GraphemeBreakTest.t tests passing | |||
ones with the Prepend property introduced in unicode 9.0 | 03:19 | ||
really happy about that | |||
before 9.0 there were only Extend. so the combining charater always came after the base character | |||
with prepend, the combiing character comes before the base character | |||
03:22
cdg joined
|
|||
lookatme | samcv++, sounds great. | 03:23 | |
samcv | i'm pretty confident we should be passing 100% of tests by the end of the week (fingers crossed) | 03:24 | |
at least unless there are any unforseen issues | |||
03:24
finanalyst joined
|
|||
lookatme | (^.^)y (fingers crossed) | 03:27 | |
I have to review my c/c++ knowledge, and find a new job in the next months. | 03:34 | ||
03:52
astj_ joined,
astj left
03:55
khw left
03:56
Cabanossi left
03:57
Cabanossi joined
|
|||
samcv | j: say "\0".uniname; # <control-0000> | 04:01 | |
camelia | NULL | ||
samcv | there's a bunch of RT's actually i need to go through and close now | 04:03 | |
j: say uniname("\x[80]") | 04:04 | ||
camelia | LATIN 1 SUPPLEMENT 80 | ||
samcv | m: say uniname("\x[80]") | ||
camelia | <control-0080> | ||
samcv | ok that is still a bug on jvm | ||
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 | ||
samcv, bisect log: gist.github.com/da75432d7785e4bdc0...4e6084b49c | |||
samcv, (2015-12-25) github.com/rakudo/rakudo/commit/07...dc61f84053 | |||
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:14
troys is now known as troys_
04:17
skids left
|
|||
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
|
|||
bioduds | hey friends | 04:21 | |
would IO::Socket::Async be the way to go in order to build TCP P2P communication? | |||
04:37
aborazmeh left
|
|||
lookatme | Yeah, IO::Socket::INET or IO::Socket::Async | 04:38 | |
04:41
curan joined
04:52
hythm left
04:55
drrho left,
kyan joined
05:04
cdg left
05:07
xtreak joined,
xtreak left,
xtreak joined
|
|||
samcv | nice. now down to only 6 perl6 tests (3 graphemeclusterbreak.txt tests) failing | 05:11 | |
excellent | 05:12 | ||
05:12
drrho joined
|
|||
samcv | so close | 05:12 | |
05:12
xtreak left
05:25
szabgab joined
05:26
Cabanossi left
|
|||
szabgab | hi there | 05:26 | |
p6: my @x = 2, 3; say @x.^name | |||
camelia | Array | ||
05:27
BenGoldberg left
|
|||
szabgab | In which case would @something.^name return anything else than "Array" ? | 05:27 | |
05:28
Cabanossi joined
|
|||
szabgab | (or Array[type]) | 05:28 | |
05:31
mr-foobar left
|
|||
Xliff | What would be the best way to check the repo chain for a specific file? | 05:32 | |
05:33
xtreak joined
|
|||
Xliff | szabgab: Given that you are using the @ symbol, why do you expect it would say anything else? | 05:33 | |
Alternatively, what are you trying to do? | |||
szabgab | Trying to understand Perl 6 :) | 05:34 | |
Xliff | m: my Array[Str] @b = <one two three>; say @b.^name | ||
camelia | Type check failed in assignment to @b; expected Array[Str] but got Str ("one") in block <unit> at <tmp> line 1 |
||
Xliff | m: my Str @b = <one two three>; say @b.^name | ||
camelia | Array[Str] | ||
05:35
mr-foobar joined
|
|||
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" | ||
m: my Str @b = <one two three>; say @b[0]; say @b[0].^name; | |||
camelia | one Str |
||
Xliff | ^^ Like this? | ||
szabgab | m: my Str @b = <one two three>; say @b.^name | 05:36 | |
camelia | Array[Str] | ||
szabgab | that's still an Array | ||
bioduds | thanks, lookatme | ||
szabgab | so if I understand correctly a @-variable allways holds an array | ||
Xliff | I'm a little confuesed, then. | ||
Yes, but an @ variable with an index [] returns the item in that position. | 05:37 | ||
szabgab | that's ok | ||
05:37
bpmedley left
|
|||
szabgab | But you don't call it a @-variable normally right? You call them arrays? | 05:37 | |
05:38
xtreak left,
xtreak joined
|
|||
Xliff | As a whole, the @ denotes an Array, yes. | 05:39 | |
But arrays imply a collection of elements. | |||
szabgab | ok, so how do we call a variable that has a $ sigil? | ||
Xliff | m: my $a = 3; say $a; | 05:40 | |
camelia | 3 | ||
Xliff | The diffence between perl5 and perl6 is that you don't switch sigils when you are accessing something from an array. | ||
szabgab | I mean what's its name? Do you call them "$ variables" ? "Scalar variables?" | ||
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. | ||
Xliff | Perl6 -- my @a = (1, 2, 3); say @a[2] == 3 | ||
% == Hash, @ = Array, $ = Scalar | |||
05:42
xtreak left
|
|||
szabgab | So you call $qqrq a Scalar variable even though in an hold any container type | 05:42 | |
It can hold an Array, a List, and yes also a Scalar type | 05:43 | ||
05:43
cpage_ left
|
|||
szabgab | I wonder if that's not confusing. | 05:44 | |
05:44
troys_ is now known as troys
|
|||
Xliff | Some folks refer to $ as "typeless" | 05:45 | |
I disagree. Maybe it's the perl5 coder in me that has already gone through the work and can understand things. | |||
Things that new people might balk at. | |||
But in Perl6.... everything is a reference. | 05:46 | ||
So for a $ variable to contain a literal, or a reference to an object or a % or a @ is just natural. | |||
For new people, maybe "typeless" would be easier to understand. | 05:47 | ||
But that will trip people up in the long run. | |||
m: class A { }; my A $a = A.new; say $a.^type; | |||
camelia | 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 |
||
Xliff | m: class A { }; my A $a = A.new; say $a.WHAT; | ||
camelia | (A) | ||
Xliff | So the type of $a in this case.... is A | 05:48 | |
m: say 1.WHAT; say "a".WHAT; | |||
camelia | (Int) (Str) |
||
szabgab | m: class A { }; my A $a = A.new; say $a.^name | ||
camelia | A | ||
szabgab | So you say you are ok using the same name "scalar" for both the variable type and the data type. | 05:50 | |
05:51
domidumont joined
|
|||
szabgab | (That was a question actually :) | 05:53 | |
05:53
hythm joined,
parv joined
|
|||
Xliff | Scalar for the variable type. And the actual type for the data type. | 05:54 | |
If we are going to be exact. | |||
szabgab | Hmm I did not see the difference between your phrasing and mine. | 05:55 | |
05:55
wamba joined
|
|||
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:56
domidumont left
|
|||
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 | |
I am making a distinction between "variable" type and "data" type. | |||
05:57
domidumont joined
|
|||
Xliff | Since there are actual types AND type checking in P6, that is something that must be considered. | 05:58 | |
szabgab | Xliff: I think we are saying the same thing here :) | 06:02 | |
06:14
xtreak joined
06:18
troys left,
xtreak left
06:20
wamba left
06:25
wamba joined,
szabgab left
06:29
lowbro joined,
lowbro left,
lowbro joined
06:38
espadrine_ joined
06:44
xtreak joined
06:51
xtreak left
06:52
xtreak joined,
rindolf joined
06:53
xtreak left,
xtreak joined
07:07
dustinm`_ left
07:09
wamba left
07:14
dustinm` joined
07:20
kyan left
07:30
domidumont left,
domidumont joined
07:38
cpage_ joined
07:41
Cabanossi left
07:43
Cabanossi joined
|
|||
moritz | hi all, totally off-topic question question coming up | 07:44 | |
masak | :) | ||
moritz | I have some software that I want to instrument; in particular, I want an easy way to add some feature counters | ||
(and I want to instrument more than one software) | |||
masak | what's a "feature counter"? | ||
moritz | masak: I want to track how often a feature is used | 07:45 | |
masak | ah. | ||
like... logging? | |||
moritz | so the idea is I send a UDP packet or something to a server whenever a certain feature is used | ||
and then I get some kind of time-resolved statistics per feature | 07:46 | ||
parv | as, home calling. | ||
masak .oO( the UDP packet contained a joke but I'm not sure the server got it ) | |||
07:46
wamba joined
|
|||
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 | ||
masak: since it's server-side software, it's enough if it's reachable from our local network | 07:47 | ||
masak | ah; good | ||
moritz | so, the question is: what kind of software can I use for that? | ||
I'm pretty sure others have the same needs | |||
but I'm not sure what to google for | 07:48 | ||
07:50
wamba left,
wamba joined
|
|||
Xliff | What would be the best way to check the repo chain for a specific file? | 07:59 | |
Or directory, rather | |||
08:00
raiph left,
raiph joined
08:05
MARTIMM joined
|
|||
masak | moritz: I have no idea -- if your need has a well-known name, I do not know it | 08:05 | |
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? | |||
moritz | masak: not for the sending; for storing the time-series DB on the server, and showing graphs for that etc. | 08:07 | |
masak | still sounds quite close to a logging solution to me -- with some requirements on how to display the log afterwards | 08:08 | |
lookatme | real-time display ? | 08:10 | |
tadzik | moritz: maybe statsd? | 08:11 | |
I recall using that at $work, with (I think) graphite (?) for later analysis? | 08:12 | ||
nine | Xliff: your question doesn't make a lot of sense to me. What directory are you looking for? | 08:15 | |
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 | ||
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:18 | ||
nine | why the hell did I write "a chance" instead of "sense"?? | 08:26 | |
08:27
Cabanossi left
|
|||
zengargoyle | m: | 08:27 | |
m: > my Array[Str] @x = Array[Str].new(<a b c>), Array[Str].new(<d e f>); say @x.^name; dd @x; | |||
camelia | 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 |
||
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 | 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
08:29
maettu joined
|
|||
hobbs | nine: you have no chance to survive make your time? | 08:34 | |
moritz | hobbs, tadzik: thanks, I'll look at statsd | 08:36 | |
08:38
geekosaur left
08:39
geekosaur joined,
robertle joined
08:42
salv0 joined
08:46
parv left
08:51
espadrine_ left
08:52
geekosaur left
08:53
geekosaur joined
08:56
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
Cabanossi left
08:58
Cabanossi joined
09:05
aborazmeh left
|
|||
avar | Discussion (at a distance) about what the unification plan for p5 and p6 is, on p5p: rt.perl.org/Public/Bug/Display.htm...xn-1464910 | 09:14 | |
09:19
raiph left
09:20
raiph joined
09:27
xtreak left
09:30
xtreak joined
09:32
greatflamingfoo left
09:33
domidumont left
09:35
domidumont joined
09:39
lookatme left
09:42
TEttinger left
|
|||
rindolf | Hi all! Why is the third say printing "True" here - paste.debian.net/970739/ ? | 09:51 | |
jnthn | == is numeric equality | ||
yoleaux | 01:34Z <japhb> jnthn: Why does a968d2759c9c16e76e57718063f968a7152795a5 specify a non-power-of-two buffer size? | ||
01:34Z <japhb> jnthn: (Or to be more specific, not a power of 2 and not a power of two minus 1 either) | |||
rindolf | jnthn: ah | 09:52 | |
jnthn | And an array in numeric context is its number of elements | ||
rindolf | jnthn: ah | ||
jnthn: perl6maven.com/arrays-in-perl6 - so this is misleading | |||
llfourn | rindolf: yes that's incorrect | 09:53 | |
~~ would check they have the same content | |||
rightfold | Use eqv | ||
llfourn | (or that) | 09:54 | |
09:55
Cabanossi left
09:57
Cabanossi joined
09:58
salv0 left
|
|||
rindolf | llfourn: would ~~ check that in the same order? | 09:59 | |
llfourn | yep | ||
10:03
mr-foobar left
10:04
mr-foobar joined
10:05
raiph left
|
|||
rindolf | llfourn: i see - thanks | 10:06 | |
10:07
salv0 joined
10:14
jeek left
10:23
lizmat_ joined
10:24
finanalyst left
10:25
lizmat left
10:33
g4 joined,
g4 left,
g4 joined
10:35
lizmat_ left
10:38
lizmat joined
10:41
Cabanossi left
10:42
Cabanossi joined
11:03
mr-foobar left
11:05
mr-foobar joined
11:06
cdg joined
11:18
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
timotimo | imgur.com/gallery/XOT47 - beautiful | 11:21 | |
11:22
finanalyst_ joined
11:23
aborazmeh left
11:25
Cabanossi left
11:27
CacoS joined
11:28
Cabanossi joined
|
|||
CacoS | Hello, everyone! | 11:28 | |
11:28
wamba left
|
|||
CacoS | Is there a pdf version of this page: perl6intro.com/? | 11:29 | |
11:29
xtreak left
|
|||
timotimo | github.com/rakudo/star/tree/master/docs - this has one. not sure if an up-to-date version is made available regularly | 11:30 | |
11:31
araraloren joined,
jeek joined
|
|||
CacoS | timotimo: thanks :), I used www.printfriendly.com/ on it. | 11:32 | |
araraloren | evening .o/ | 11:33 | |
timotimo | github.com/hankache/perl6intro - this tells you how to .pdf it | 11:35 | |
CacoS | Thank you. See you later, bye ! | 11:39 | |
11:39
CacoS left,
AlexDaniel joined
11:55
tyil is now known as mieko
12:01
mr-fooba_ joined
12:03
imcsk8 left,
mr-foobar left
12:04
aborazmeh joined,
aborazmeh left,
aborazmeh joined
12:07
zakharyas joined
12:10
lizmat left
12:11
imcsk8 joined,
lizmat joined
12:24
lizmat left
12:25
Cabanossi left
12:26
lizmat joined
12:28
Cabanossi joined
12:30
lizmat left
12:31
lizmat joined
|
|||
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 | |
12:36
mcmillhj joined
12:37
xtreak joined
12:38
wamba joined
|
|||
jnthn | Trying to serialize an I/O handle, most probably. | 12:40 | |
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:42
curan left
|
|||
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 | |
If this is a regression, then we probably would want to go back to doing that | |||
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:48 | |
jnthn | Ah, I was talking about the serialization that happens when a module is compiled | 12:49 | |
We have to preserve stuff that comes to exist at BEGIN time | |||
It sounds like an I/O handle is ending up in that set of things, probably unintentionally | 12:50 | ||
MARTIMM | jnthn: ok. aren't the handles closed then. could close them and reopen in the BEGIN phase? | 12:51 | |
12:51
wamba left
|
|||
MARTIMM | jnthn: in a new() the handle $*OUT is used from an INIT phase | 12:52 | |
12:54
lizmat left
12:55
xzhao joined,
xzhao left
12:57
Cabanossi left,
lizmat joined
12:58
Cabanossi joined
12:59
xzhao joined
13:01
salv0 left
|
|||
bioduds | hey guys | 13:02 | |
can you help me out with something? | 13:03 | ||
I'm posting the gist | |||
gist.github.com/bioduds/f4acfdc129...205c7413b5 here | 13:04 | ||
please, how can I actually get the IPs as a list, in an array, for instance? | 13:05 | ||
interesting, I found the answer, changing from token to rule | 13:08 | ||
thanks mans | |||
solved here | |||
colomon | bioduds: that makes it seem like a problem with your grammar? | 13:10 | |
araraloren | :) | 13:11 | |
13:11
MARTIMM left
13:12
bioduds_ joined
|
|||
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
|
|||
colomon | m: say “100.1.2.45” ~~ m:s/ \d+ \. \d+ \. \d+ \. \d+ / | 13:13 | |
camelia | 「100.1.2.45」 | ||
colomon | guess that’s how | ||
13:15
bioduds left
|
|||
colomon | m: say “100.1.2. 45” ~~ m:s/ \d+ \. \d+ \. \d+ \. \d+ / | 13:16 | |
camelia | 「100.1.2. 45」 | ||
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 | |
(can / MUST have spaces between them) | |||
13:18
AlexDaniel left
|
|||
colomon | that might be as simple as adding a space between <ADDRESS> and + | 13:18 | |
bioduds_ | thanks colomon | 13:19 | |
actually I only needed to change token to rule in ADDRESS | |||
colomon | bioduds_: that doesn’t work righjt | ||
bioduds_ | still getting the hang of this great thing called grammars | 13:20 | |
no, it works | |||
colomon | please see above | ||
bioduds_ | thanks for looking after it | ||
colomon | it changes your grammar so an address can have spaces in it | ||
bioduds_ | let me see | ||
colomon | and spaces after it, which is why it helps the problem you are looking at | ||
13:21
zakharyas left
|
|||
Geth | doc: 9729894c3a | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Failure.pod6 Remove duplicate word; closes #1371 |
13:22 | |
13:23
khw joined
13:26
Cabanossi left
|
|||
lucasb | good morning | 13:26 | |
araraloren | :) | ||
13:28
Cabanossi joined,
xtreak left
|
|||
bioduds_ | great, thanks :D | 13:31 | |
Geth | doc: 8ee169b496 | (Jan-Olof Hendig)++ | doc/Type/UInt.pod6 A couple of code related fixes. eveo++ More can be done here |
13:32 | |
lucasb | re discussion in the mailing list about what to call $var | 13:34 | |
I think I call them a scalar variable, even if that is not entirely accurate | 13:35 | ||
but maybe P6 prefer to simply call them "dollar-sigiled" variable? | |||
*P6 folks | |||
zengargoyle | m: say '192.168.1.1' ~~ token { ^ [ \d ** 1..3 ] ** 4 % '.' $ } | 13:38 | |
camelia | 「192.168.1.1」 | ||
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:40 | |
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 | |
IMHO of course | |||
13:44
skids joined
|
|||
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 | ||
mspo | u: U+E630 | ||
unicodable6 | mspo, U+E630 <Private Use> [Co] () | ||
lucasb | perlpilot: agreed, thanks | ||
mspo | u: U+E635 | ||
unicodable6 | mspo, U+E635 <Private Use> [Co] () | ||
mspo | bummer I see a webpage saying those are dr seuss characters | ||
13:45
xzhao left
|
|||
mspo | 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. | ||
mspo | that's a lot of credit to cisco | 13:46 | |
zengargoyle | hehe. | ||
13:48
xzhao joined
|
|||
[Coke] | docs/xt/duplicates.t found its first docubug (after the initial run). whee. | 13:48 | |
zengargoyle is just coming off of a 16 year stint as network engineer/programmer. oh, the horror's i've seen.... | 13:49 | ||
13:50
kaare_ left
|
|||
perlpilot | bioduds_: I just saw the TPC schedule and noticed a tutorial by Damian Conway-- www.perlconference.us/tpc-2017-dc/t...d_grammars Made me think of your recent attempts at parsing dig output. | 13:52 | |
bioduds_: if you're going to TPC, you might want to spend the extra $150 and attend Damian's tutorial | |||
bioduds_ | oh, perlpilot that is awesome, I'm a great fan of Dr. Conway | ||
I'm definitely looking into it, thanks man :) | 13:54 | ||
13:54
skids left
|
|||
perlpilot | sure | 13:54 | |
bioduds_ | this here A little less line noise, please: Perl6 Regexen. also looks promissing to my current stage | 13:56 | |
Let me just say I'm baffled with Grammars | |||
zengargoyle | m: say '192.168.1.9' ~~ token { ^ [ \d ** 1..3 ] ** 4 % '.' $ } | ||
camelia | 「192.168.1.9」 | ||
bioduds_ | I mean, I knew it was bringing something quite remarkable but I am experiencing it now | ||
13:57
lizmat left
|
|||
[Coke] | well, we'll try to help where we can. | 13:57 | |
bioduds_ | this conference will be in DC? That means Washington? | ||
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
13:58
st_elmo joined
|
|||
colomon | zengargoyle: presumably the “right” way to do it is to have a “decimal byte” token or somesuch | 13:58 | |
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 :) | ||
great, thanks :) | 14:00 | ||
colomon | bioduds_: you needed somthing like <ADDRESS> + instead of <ADDRESS>+ | ||
bioduds_ | yep, I did change to rule ADDRESS and it did the trick | ||
I mean, I'm trying to build a com system that will actually look like a talk between P2P nodes | 14:01 | ||
so messages though very english-ish must comply to format | |||
Geth | doc: 6a196550fd | (Jan-Olof Hendig)++ | doc/Type/Thread.pod6 Added docs for Thread.Numeric |
||
zengargoyle | then again, just a plain 32bit int or hex is sometimes used for non-canonical IP representation. | 14:02 | |
bioduds_ | in TCP/IP it would right? | 14:05 | |
14:06
kaare_ joined
14:12
travis-ci joined
|
|||
travis-ci | Doc build errored. Zoffix Znet 'Remove duplicate word; closes #1371' | 14:12 | |
travis-ci.org/perl6/doc/builds/241190217 github.com/perl6/doc/compare/a037a...29894c3aad | |||
14:12
travis-ci left
|
|||
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:13 | |
14:13
movl left
|
|||
bioduds_ | I didn't understand yet how the layers work | 14:14 | |
they are serial? | |||
header layers then TCP layers in a row? | |||
[Coke] | m: my $set = SetHash.new(); $set<a>=True; sub visit(:$set is copy) { $set<b> = True }; visit(:$set); say $set<b>; | ||
camelia | True | 14:15 | |
[Coke] | Does "is copy" not work on containers? | ||
[Coke] switches this over to an array, maybe. | |||
jnthn | It's only one level deep; here its the Scalar that is the container | 14:16 | |
14:16
AlexDaniel joined
|
|||
[Coke] | I would say that maybe should go under doc traps, if it's not there already. | 14:17 | |
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:18 | |
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:19 | ||
Geth | doc: e327a96a23 | (Jan-Olof Hendig)++ | doc/Type/Tap.pod6 Removed methods which are no longer present. jnthn++ |
14:20 | |
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:21 | |
(\S+) will match an IP from a computer just fine. on the bonus side, it also matches a hostname (example.com). | 14:23 | ||
14:23
wamba joined
|
|||
[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:23 | |
14:24
bbkr_ left
|
|||
[Coke] | (is copy) yay, fixed a bug in a one-off p6 script for Dayjob there. | 14:24 | |
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:25 | |
[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:28 | ||
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:32 | ||
it's like checking that a string is hex when you know it was printed with %x | 14:33 | ||
or testing that 2 + 2 == 4 | 14:34 | ||
m: say '192.168.1.9' ~~ token { ^ ( \d ** 1..3 ) <?{ +$/ <= 255 }> ** 4 % '.' $ } | 14:35 | ||
camelia | 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 $ } |
||
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:36 | ||
it seems to not like asserts in the middle of the ** ** % sort of thing. | 14:38 | ||
jnthn | You're quantifying a zero-width assertion there | 14:39 | |
The ** applies to the last atom | |||
Maybe you wanted [ ( \d ** 1..3 ) <?{ $/ <= 255 }> ] ** 4 % '.' | 14:40 | ||
zengargoyle | m: say '192.168.1.9' ~~ token { ^ [ \d <?{ $/ <= 255 }> ** 1..3 ] ** 4 % '.' $ } | 14:41 | |
camelia | 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:42
cdg left
|
|||
zengargoyle | i was trying to avoid the captures.... | 14:43 | |
works, but i don't quite get it. :) guess i'll have to think on it for a while. thanks. | 14:45 | ||
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? | ||
jnthn | It was the wrong precedence I was trying to point out | ||
zengargoyle | is there some reasong that it has to be () around that bit instead of [] | ||
jnthn | Yes, so $/ contains the right thing :) | ||
Otherwise $/ is the whole thing matched so far | |||
ctilmes | zengargoyle: never mind I see the <= now | ||
zengargoyle | ctilmes: i'm also just assuming that \d is >= 0 :P | 14:48 | |
m: '192.168.1.9' ~~ token { ^ [ (\d ** 1..3 <?{ ~$0 <= 255 }>) ] ** 4 % '.' $ } | 14:49 | ||
camelia | 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 |
||
zengargoyle | m: '192.168.1.9' ~~ token { ^ [ (\d ** 1..3 ) <?{ ~$0 <= 255 }> ] ** 4 % '.' $ } | 14:50 | |
camelia | Cannot convert string to number: trailing characters after number in '03192⏏5 168' (indicated by ⏏) in regex at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
14:52
bisectable6 left,
finanalyst_ left,
bisectable6 joined,
ChanServ sets mode: +v bisectable6
|
|||
moritz | m: '192.168.1.9' ~~ token { ^ [ (\d ** 1..3 ) <?{ ~$0[*-1] <= 255 }> ] ** 4 % '.' $ } | 14:53 | |
camelia | ( no output ) | ||
moritz | m: say so '192.168.1.9' ~~ token { ^ [ (\d ** 1..3 ) <?{ ~$0[*-1] <= 255 }> ] ** 4 % '.' $ } | ||
camelia | True | ||
14:53
g4 left
|
|||
moritz | explanation: the () is quantified, so $0 becomes an array | 14:54 | |
m: say so '192.168.1.955' ~~ token { ^ [ (\d ** 1..3 ) <?{ ~$0[*-1] <= 255 }> ] ** 4 % '.' $ } | |||
camelia | False | ||
zengargoyle | yay! moritz++ | 14:56 | |
14:57
robertle left
14:58
lucasb left
|
|||
zengargoyle | i guess you suffer the capture for the sake of the assert and probably fix it up at the end with make. | 14:59 | |
zengargoyle idly wonders if Regexp::Common* would port with :P5 | 15:07 | ||
15:08
wamba left
15:11
kaare_ left,
aborazmeh left
15:13
travis-ci joined
|
|||
travis-ci | Doc build errored. Jan-Olof Hendig 'Removed methods which are no longer present. jnthn++' | 15:13 | |
travis-ci.org/perl6/doc/builds/241212941 github.com/perl6/doc/compare/6a196...27a96a23a3 | |||
15:13
travis-ci left
15:14
as_ joined
|
|||
as_ | rakudo: say 1 if 3 !≠ 3 | 15:15 | |
camelia | 1 | ||
as_ | is this correct that !≠ also exists? :-) | ||
15:17
Sgeo left
15:19
lowbro left,
xzhao left
|
|||
[Coke] | ! (anything) exists, aye. | 15:23 | |
it's the same magic that makes != work | |||
zengargoyle | and makes ²² == 4 work. :P | 15:24 | |
colomon | r: say 3 !> 3 | ||
camelia | True | ||
zengargoyle | magic is so weird. | ||
colomon | r: say 3 !!> 3 | ||
camelia | 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… |
||
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… |
|||
[Coke] | zengargoyle: no, that's different. | ||
colomon | r: say 3 !?!> 3 | 15:25 | |
camelia | 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 |
||
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 |
|||
colomon | not enough magic. :) | ||
[Coke] | colomon: are you meaning to also be testing JVM? | ||
(if not, m: works) | |||
colomon | [Coke]++ # out of practice colomon | ||
zengargoyle it's a kind of magic....... One dream one soul one prize one goal… | 15:26 | ||
colomon one golden glimpse | |||
15:27
lizmat left
|
|||
colomon consults ancient lyrics files from pre-web days. “glance” not “glimpse" | 15:28 | ||
15:28
lizmat joined,
robertle joined,
as_ left
15:29
Sgeo joined
15:30
skids joined
15:32
Sgeo_ joined
15:33
Sgeo left
15:35
domidumont left
15:36
incredible left
15:41
Cabanossi left,
kaare_ joined,
lizmat left,
incredible joined
15:43
Cabanossi joined,
lizmat joined,
st_elmo left
15:48
st_elmo joined
15:56
lichtkind left,
AlexDaniel left
|
|||
zengargoyle | m: say 2⁼⁼2 | 15:57 | |
camelia | 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:57
lizmat left
15:58
lizmat joined
|
|||
zengargoyle | m: my \n = 2; say 2ⁿ; | 16:03 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Confused at <tmp>:1 ------> 3my \n = 2; say 27⏏5ⁿ; |
||
16:03
cdg joined
|
|||
zengargoyle | m: my \ⁿ = 2; say 2ⁿ; | 16:08 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Confused at <tmp>:1 ------> 3my \ⁿ = 2; say 27⏏5ⁿ; |
||
16:09
lichtkind joined
|
|||
zengargoyle | m: my \ⁿ = 2; say ⁿ | 16:09 | |
camelia | 2 | ||
16:12
st_elmo left
16:24
araraloren left
16:27
Cabanossi left,
lizmat left
16:28
Cabanossi joined
16:29
ChoHag left,
lizmat joined
16:39
st_elmo joined,
lucasb joined
|
|||
lucasb | m: say 2 ![![![![==]]]] 2 | 16:40 | |
camelia | True | ||
16:48
devmikey joined
16:51
xzhao joined
|
|||
[Coke] | well, it's not not not not NOT wrong. | 16:54 | |
16:58
lizmat left
|
|||
lucs | How to perl6ishly iterate over two arrays in parallel? | 16:59 | |
16:59
lizmat joined
|
|||
colomon | lucs: for @a Z @b -> $a, $b | 17:00 | |
lucs | Ah man, that is so cool :) | ||
colomon hopes he got the syntax right, but that is the idea | |||
lucs | Thanks | ||
[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” } | ||
camelia | a,e b,f c,g |
||
1 4 is less than 2 5 Too few positionals passed; expected 2 arguments but got 1 in block <unit> at <tmp> line 1 |
|||
[Coke] | if they won't match up, use $b? | ||
17:01
lucasb left
|
|||
[Coke] | colomon: also, use ()s | 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:02 | |
[Coke] | (or flatten, or...) | ||
TimToady | note that it stops on the shorter list, if they can be different lengths | ||
[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 | a,e b,f c,g |
||
[Coke] | ah, probably need the flattening there, and not () | 17:04 | |
colomon | () with no flattening worked on my local p6 build a second ago | ||
m: my @a = 1..3; my @b = 4..6; for @a Z @b -> ($a, $b) { say “$a is less than $b” } | |||
camelia | 1 is less than 4 2 is less than 5 3 is less than 6 |
||
Geth | doc: 8fc44c4428 | (Jan-Olof Hendig)++ | doc/Type/Tap.pod6 Fixed broken example code. jnthn++, ugexe++ |
17:06 | |
17:08
st_elmo left
17:10
Cabanossi left
17:12
Cabanossi joined
17:14
mcmillhj left,
mcmillhj joined
17:16
st_elmo joined
17:17
domidumont joined
17:28
lizmat left,
pilne joined
17:29
eveo joined
17:30
lizmat joined
|
|||
Geth | doc: e6c3b65958 | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6 No closing argument here. Was removed in 2015 |
17:32 | |
17:32
eveo left,
eveo joined
17:39
zakharyas joined
|
|||
bioduds_ | amazingly, grammars are letting me build a P2P communication as if the two nodes were talking to each other | 17:39 | |
17:41
Cabanossi left
|
|||
bioduds_ | I'm about to post it so you may see if it interests you guys | 17:42 | |
17:42
Cabanossi joined
|
|||
timotimo | intriguing | 17:43 | |
eveo | lucs: along with Z there's also roundrobin that doesn't stop when one list gets exhausted: docs.perl6.org/routine/roundrobin | 17:47 | |
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 | a,e b,f c,g d,X |
||
17:48
travis-ci joined
|
|||
travis-ci | Doc build errored. Jan-Olof Hendig 'Fixed broken example code. jnthn++, ugexe++' | 17:48 | |
travis-ci.org/perl6/doc/builds/241274748 github.com/perl6/doc/compare/e327a...c44c442843 | |||
17:48
travis-ci left
17:50
eveo left
|
|||
bioduds_ | steemit.com/blockchain/@bitworkers...ng-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"} | ||
camelia | a,e b,f c,g a,h |
||
bioduds_ | there you go, unimplemented, only sketched out | ||
zengargoyle | bioduds_: did you catch the end of the IP matching chatter? | 17:52 | |
bioduds_ | yes zengargoyle, perfectly :D I'm finding this so nice because, from start, my messaging system is injection protected, you know? | 17:53 | |
Because it won't backtrack, right? | |||
17:54
ponbiki left
|
|||
bioduds_ | If it comes with scrambled information, then it simply does not execute | 17:54 | |
or with injection attempts | |||
it will simply fail :D | |||
zengargoyle | yeah, Klingon programing. better to die. | 17:56 | |
17:56
ponbiki joined
|
|||
zengargoyle thinks that was a mst talk but can't remember a quotable quote. | 17:57 | ||
bioduds_ | lol | ||
with honor | |||
zengargoyle | but the \d needs to be something else to restrict to actual 0..9 | 17:58 | |
\d will match weird unicode digit things. | |||
bioduds_ | I'm subseting it afterwards | ||
zengargoyle | sweet! | ||
bioduds_ | yep :D P6 is SWEET!! | ||
17:59
lizmat left
|
|||
bioduds_ | join me in this "First Perl6 Blockchain" quest!! :D all help is hugely appreciated!! | 18:00 | |
18:00
lizmat joined
|
|||
bioduds_ | Decentralized Justice! :D | 18:00 | |
zengargoyle | www.youtube.com/watch?v=KWIl9pP2BF8 -- Paul Fenwick, my bad. | 18:01 | |
sorta different, but sorta the same. | |||
it is better to die() in the attempt then to return() in failure. | 18:03 | ||
18:05
st_elmo left
|
|||
zengargoyle | en.wikipedia.org/wiki/Robustness_principle | 18:10 | |
Be conservative in what you do, be liberal in what you accept from others | 18:12 | ||
such a mismatch. | 18:13 | ||
perlpilot | I've always called that that Postel Principle (after the RFC editor Jon Postel) | 18:16 | |
oh, the wikipedia article says as much :) | |||
zengargoyle | heh, | 18:18 | |
18:20
zakharyas left
|
|||
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. | ||
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++ | ||
you are totally right, is like being stuck in pre-history | |||
question: can I type a token? | 18:24 | ||
token Int TOKEN { ... } for instance | |||
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:26 | |
"that's not a valid IP" vs "can't connect to 'whatever-bad-thing-you-gave-me'" | 18:27 | ||
totally may not apply to your particular case. :) | |||
18:29
lizmat left
18:31
lizmat joined
|
|||
bioduds_ | you mean I should handle the errors in this case? | 18:33 | |
how would I do that? It simply fails. I actually tried using with $.attribute else shout out error but it never executes | |||
is there a way to catch these non-executing rules? | 18:34 | ||
one other thing: method new {} is like a constructor? | 18:35 | ||
zengargoyle | i think we went off in different directions. :) | 18:36 | |
bioduds_ | no, sorry, my mistake | 18:38 | |
I wen't a completely different question | |||
surely got you confused | |||
let's go back on the first issue | |||
zengargoyle | nah, i just missed it while typing or thinking. :) | 18:39 | |
bioduds_ | the data input treatment | ||
you was saying you rather go loose with \S+ instead of trying to go precisely with the input data, right? | |||
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. | ||
bioduds_ | I'll check on that possibility | 18:41 | |
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. | ||
bioduds_ | ok, got it | ||
like assume it is right | |||
if it is not, it simply won't connect | |||
ok | |||
makes sense | |||
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 | ||
there are some seriously weird network configs out there | 18:43 | ||
zengargoyle | it has to be right to actually connect. | ||
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 | ||
until it fills in his max-node connections | |||
zengargoyle | it will fail fast. | ||
bioduds_ | great, one other question | 18:45 | |
zengargoyle | connect to 999.999.999.999 will return fail immediatly because it's not actually valid. | ||
bioduds_ | should I go with IO::Socket::Async or IO:Socket::INet ? | ||
zengargoyle no clue... | 18:46 | ||
bioduds_ | I'm assuming INet is synchronous | 18:48 | |
zengargoyle thinks jnth just did some work on async stuff related to IO::Socket::Async and ...::Inet | 18:49 | ||
but it's deep magic and MoarVM and libuv stuff that i don't fully understand. :{ | 18:50 | ||
6guts.wordpress.com/2017/06/08/sor...ronous-io/ | 18:52 | ||
18:52
wamba joined
|
|||
bioduds_ | reading it ... | 18:58 | |
tx man, I need to stay sharp on everything about P6 if I want this project to succeed | |||
zengargoyle | you might have to wait around and try asking again when the people who know are awake. :P | ||
18:59
devmikey left
19:00
lizmat left
19:02
lizmat joined
19:03
AlexDaniel joined
|
|||
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:06 | |
bioduds_ | ok | 19:07 | |
you taught me the export PERL6LIB | 19:08 | ||
do I need to put every folder in my project in it? | |||
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
|
|||
zengargoyle | you probably want ugexe. :) i think you could just `zef --to=home install .` and not worry about it that much. | 19:11 | |
19:12
cygx joined
|
|||
cygx | m: sub foo { my $x = 0; say("a $x") andthen say("b $x") andthen $x = 1 }; foo; foo | 19:13 | |
camelia | a 0 b 0 a 0 b 1 |
||
cygx | ^ bug? | ||
mspo | gate.schedar.uberspace.de/vslides/2...ptr.html#0 | 19:15 | |
nice | |||
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:16 | |
19:18
TEttinger joined
|
|||
zengargoyle | if you do a `perl6 -B` you can see the repo::chain that's being used. -- repo::chain=inst#/home/zen/.perl6 ... -- | 19:18 | |
and if you do a `PERL6LIB=lib perl6 -V` you'll see -- file#/home/zen/p6/p6-Algorithm-Trie-libdatrie/lib | 19:19 | ||
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:22 | ||
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:24 | ||
19:31
lizmat left
19:32
lizmat joined
|
|||
lucasb | m: for ^7 { my $x = 10; 1 andthen print "$x " andthen $x = 20 andthen $x = 30 andthen $x = 40 } | 19:33 | |
camelia | 10 40 30 30 30 30 30 | ||
19:34
AlexDaniel left
|
|||
lucasb | cygx: strange, indeed | 19:34 | |
but then, I have no idea what andthen does :) | 19:35 | ||
perlpilot | cygx: looks like a bug to me | ||
lucasb | it seems like the print statement is caching some wrong values from past iterations | ||
cygx | lucasb: andthen checks the LHS for definedness and conditionally executes the RHS, setting $_ | 19:36 | |
lucasb | cygx: ah, thanks. | 19:37 | |
cygx | and somehow, it creates a closure over the wrong $x | ||
perlpilot | cygx: lucasb's example is even more bizarre | ||
lucasb | would you say andthen is like a topicalizer "and" ? | ||
cygx | lucasb: almost - definedness vs truthiness | 19:38 | |
lucasb | ah, got it | ||
perlpilot idly wonders if orelse has a similar problem. | 19:41 | ||
19:41
Cabanossi left
|
|||
perlpilot | I guess not since the short circuit flips | 19:42 | |
19:43
Cabanossi joined,
raschipi joined
|
|||
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 | a 0 b 0 a 1 b 1 |
||
perlpilot | yeah, something isn't scoping right | ||
cygx | rakudobugged as RT#131548 | 19:51 | |
synopsebot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=131548 | ||
20:01
lizmat left
20:02
lizmat joined
20:11
Cabanossi left,
ChoHag joined
20:13
Cabanossi joined
|
|||
Xliff | nine: Still here? | 20:18 | |
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) | |||
Previously, I could do this: for @($*REPO.repo-chain).grep({$_ ~~ CompUnit::Repository::FileSystem || $_ ~~ CompUnit::Repository::Installation }) -> $c { ... } | 20:20 | ||
20:21
Celelibi left
|
|||
Xliff | And do naughty things to $c.path-spec to accomplish what I need. Would that still work? | 20:21 | |
20:24
Celelibi joined
20:31
domidumont left,
lizmat left
20:33
lizmat joined
20:41
Cabanossi left
20:43
Cabanossi joined
|
|||
bioduds_ | thanks | 20:44 | |
I had to leave after I asked | |||
thanks for the answers zen | |||
20:55
PerlJam left
20:56
dalek left
20:57
user3 joined
21:00
mcmillhj left
21:02
lizmat left
|
|||
user3 | How can I store a reference to variable $x in variable $z This doesn't work: | 21:02 | |
m: my $x=5; my $y := $x; my $z = $y; $x=8; say $z; # 5 | |||
camelia | 5 | ||
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; | ||
camelia | 8 | ||
21:04
lizmat joined
|
|||
user3 | ok, but what if want to store the reference into the variable $z rather than create a new alias? | 21:05 | |
21:06
lostinfog joined
|
|||
user3 | can that be done at all? | 21:06 | |
jnthn | Could do it with a Capture or a List | 21:08 | |
Capture probably is the more natural fit, I guess | |||
m: my $x=5; my $y := $x; my $z = \$y; $x=8; say $z[0]; | 21:09 | ||
camelia | 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… |
||
jnthn | heh | ||
It's so unidiomatic to do it in Perl 6 it's a warning :P | |||
m: my $x=5; my $y := $x; my $z = \($y); $x=8; say $z[0]; | |||
camelia | 8 | ||
user3 | wow | ||
jnthn | This probably means | 21:10 | |
oops | |||
This probably means it's a case of "there's a different, better, way to do what you're trying to do" | |||
21:10
Cabanossi left
|
|||
cygx | jnthn: we had some fun with andthen/orelse in the backlog | 21:11 | |
m: for ^7 { my $x = 10; 1 andthen print "$x " andthen $x = 20 andthen $x = 30 andthen $x = 40 } | |||
camelia | 10 40 30 30 30 30 30 | ||
cygx | something ain't closureing right... | 21:12 | |
jnthn | Yeah, I saw. | ||
Indeed. | |||
21:12
raschipi left
|
|||
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:12 | |
21:13
Cabanossi joined,
skids left
21:18
user3 left
|
|||
sammers | hi #perl6 | 21:21 | |
21:23
zakharyas joined
21:33
lizmat left
21:43
lizmat joined
21:47
lizmat left
21:48
cdg left
21:50
geekosaur left,
lostinfog left
21:52
geekosaur joined
21:59
lizmat joined
22:02
lizmat left
22:05
rindolf left
22:06
lizmat joined,
zakharyas left
22:15
kyclark joined
22:17
cygx left
22:30
mcmillhj joined
22:34
kyclark left
22:35
mcmillhj left,
kyclark joined
22:40
bpmedley joined
22:44
MasterDuke joined
22:55
raschipi joined
22:57
kyclark left
22:58
mcmillhj joined
23:00
mcmillhj left
23:05
lucasb left
23:11
skids joined
23:23
roguelazer left
23:24
roguelazer joined
23:28
beginner joined
|
|||
beginner | is there a finally block for exceptions in perl6? | 23:29 | |
geekosaur | I think you want LEAVE | ||
beginner | geekosaur : thank you...will try it | 23:31 | |
geekosaur | something along the lines of: { code... ; CATCH { #`{ catch exceptions } ... }; LEAVE { #`{ run when done } ... } } | ||
23:36
aindilis` joined,
robertle_ joined,
jeek_ joined
23:37
ChoHag_ joined
23:38
beginner left
23:39
wamba left,
robertle left,
jeek left,
aindilis left,
ChoHag left
|