»ö« 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:03
cdg left
00:13
w_richard_w joined
00:15
dct left
00:17
pharv joined
00:33
pierre joined
00:40
reportable6 left,
reportable6 joined
|
|||
lookatme | m: my @a = 1; @a += 33; say @a; @a += 2; say @a; # why ? | 00:49 | |
camelia | [34] [3] |
||
geekosaur | that seems buggy. the first is because it treated a 1-element list as a scalar; the second looks like it kept the same container interpretation as before but its value became the length of @a | 00:53 | |
the first behavior is from Cool. the second smells like a bug | 00:54 | ||
lookatme | m: my @a = 3, 2; @a += 33; say @a; @a += 2; say @a; # why ? | ||
camelia | [35] [3] |
||
lookatme | yeah, seems like you are right | ||
geekosaur | I'd be interested in seeing if disabling spesh does anything, but I don't think you can do that with camelia. (evalable might have a way, I don't know offhand) | 00:55 | |
lookatme | oh, no, they all used length | ||
geekosaur | that seems really buggy... | ||
lookatme | yeah :) | 00:56 | |
I just found += is do append to list in python, and want see have Perl6 do | 00:57 | ||
how | |||
geekosaur | m: my @a = 3, 2; @a.append: 33; say @a | 00:58 | |
camelia | [3 2 33] | ||
geekosaur | + is always numeric, therefore so is += | ||
you could also write @a.append(33) | 00:59 | ||
lookatme | yeah, I know | 01:00 | |
and I have an idea I can add `<<` as an operator like it in ruby (maybe ?) | 01:01 | ||
cfa | hmm, is this really a bug? just seems unintuitive at first | ||
yoleaux | 19 Mar 2018 19:03Z <Zoffix> cfa: If you'd like to be credited by something other than "cfa" in release credits, add yourself to the CREDITS file: github.com/perl6/doc/blob/master/CREDITS | ||
lookatme | so @a << 3; append the 3 to @a | ||
cfa | but you have @a with n elements so += is assigning the result of the .elem + rhs back to @a; the second += does the same | 01:02 | |
er, .elems | |||
lookatme | very convenient :) | ||
cfa | so in both cases it's just cardinality + right hand side, put into the array container | ||
lookatme | sounds like stranger | ||
cfa | the 34 or 35 is kinda irrelevant to the second case | 01:03 | |
lookatme | hmm | 01:05 | |
cfa | m: ((1, 2, 3) + 33).say | 01:07 | |
camelia | 36 | ||
cfa | m: ((36) + 2).say | ||
camelia | 38 | ||
cfa | m: ([36] + 2).say | ||
camelia | 3 | ||
cfa | that's all that's going on, no? | ||
(ignore the second dumbo example with grouping parens | |||
01:07
AlexDaniel joined
|
|||
lookatme | m: say (32).WHAT; say [2].WHAT; say (3,).WHAT; | 01:11 | |
camelia | (Int) (Array) (List) |
||
cfa | m: ((36,) + 2).say | 01:12 | |
camelia | 3 | ||
cfa | to keep it consistent | ||
lookatme | yeah that's it | ||
cfa | sorry, i'm typo'ing all over the place so probably confusing matters further | ||
01:17
pharv left,
pharv joined
01:18
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
AlexDaniel | I wonder why ,= can't do it | 01:18 | |
I mean… it's weird anyway | 01:19 | ||
m: my %a = :25a, :42b; %a ,= :100x; dd %a | |||
camelia | Hash %a = {:a(25), :b(42), :x(100)} | ||
AlexDaniel | works on hashes, but not on arrays | ||
I think we had this discussion before, and IIRC the conclusion there was that I shouldn't be expecting this stuff to be consistent | 01:20 | ||
but actually I don't remember anymore | |||
01:21
ChoHag left
|
|||
AlexDaniel | m: my @a = <a b c>; @a |,= 42; dd @a | 01:21 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Preceding context expects a term, but found infix ,= instead. at <tmp>:1 ------> 3my @a = <a b c>; @a |,=7⏏5 42; dd @a |
||
AlexDaniel | m: my @a = <a b c>; @a ,= 42; dd @a | ||
camelia | Array @a = ((my @Array_74446016) = [@Array_74446016, 42]) | ||
AlexDaniel | ↑ so tha creates a self-referential array, which is cool also | ||
01:21
Zoffix joined,
pharv left
|
|||
Zoffix | m: my @a = 1; @a += 33; say @a; @a += 2; say @a; | 01:22 | |
camelia | [34] [3] |
||
Zoffix | m: my @a = 1; @a = @a + 33; say @a; @a = @a + 2; say @a; | ||
camelia | [34] [3] |
||
cfa | AlexDaniel: that's kinda curious because | ||
Zoffix | lookatme: ^ that's what you're asking it to do, and Arrays in Numeric context produce a number that's the number of their elements. | ||
cfa | m: my %h = :25a, :42b; (%h, c => 3).say | ||
camelia | ({a => 25, b => 42} c => 3) | ||
AlexDaniel | no, that's fine | 01:23 | |
Zoffix | The ,= thing is a DWIM, because %h = %h1, %h2 you more often want to combine, while @a = @a1, @a2, you want two separate arrays | ||
geekosaur | well, except there's the expectation that op= doesn't actually duplicat eit, so you wouldn;t wpect it to be a container in one and the length of its ocntents in the other | ||
cfa | ah yes | ||
AlexDaniel | = makes it do something completely different, and that's how it should be I guess | ||
geekosaur | you have some explaining to do if op= is going to behave differently from literally every other language that supports it | 01:24 | |
cfa | m: my %h = :25a, :42b; %(%h, :100c).say | ||
camelia | {a => 25, b => 42, c => 100} | ||
AlexDaniel | Zoffix: right, that was the conclusion back then | ||
cfa | m: my %h = :25a, :42b; (%h, :100c).say | ||
camelia | ({a => 25, b => 42} c => 100) | ||
cfa | there's the differenc without = | ||
01:26
pharv joined
|
|||
Zoffix | geekosaur: but it doesn't duplicate anything. It's it's fetch/store; same as fetch/store with $a += 42; You fetch a value (the contents of Array, numified) and store the result. | 01:26 | |
geekosaur | I assume that means "no, we don;t even have do codument that we're breaking everyone's expectations" | ||
Zoffix | geekosaur: what's your expectation? | 01:27 | |
geekosaur | ... | ||
AlexDaniel | although now I'm thinking about it… “while @a = @a1, @a2, you want two separate arrays” do I? Looks like an array of two arrays to me, and I'd totally expect |@a1, |@a2 there to do the “DWIM” | ||
cfa | `x op= y` as `x = x op y` is fairly consist in p6, no? | 01:28 | |
geekosaur | I guess because what I said was not the contents oif your brain, it was summarily rejected | ||
lookatme | yeah, as I think, they do the correctly behavior or they not working on Array(such as throw an exception) | ||
AlexDaniel | also, ,= is then practically useless because how often do you actually need a self-referential array | ||
cfa | so, `@a += 2` as `@a = @a + 2` etc. | ||
Zoffix | geekosaur: I'm trying to understand what you said. You said it's container in one case and contents in the other, I'm saying no, that's a single object in both cases. | 01:29 | |
geekosaur | yes, in you-think which is clearly all that matters | ||
lookatme | :) If it change the length of @a, that's fine. But they do nothing seems like | ||
geekosaur | "interpreted differently" is still not doing what poeple who have seen that idiom in every other language that sues it will expect | 01:30 | |
I understand that changing it will not happen' | |||
Zoffix | AlexDaniel: right, but the alternative is a million special cases that "dwim". And it's why Perl 5 sucks. | ||
geekosaur | you are convincing me that documenting it will also not happen. which will not help | ||
01:30
pharv left
|
|||
AlexDaniel | Zoffix: I guess you're right | 01:30 | |
geekosaur: sorry, what did Zoffix do to justify this aggression? :S | 01:31 | ||
Zoffix | geekosaur: I'm still at a point of trying to understand how you're expecting it to work. I'm not convincing you of anything. | ||
cfa | AlexDaniel: (and Zoffix) hey, thanks for that , clarification on hashes; don't think i'd come across it | ||
geekosaur | AlexDaniel, a long string of "the prerequisite of uing this language is downloading the developer's brain first" | ||
I keep running into things that violate expectations, and being told that is correct behavior | 01:32 | ||
and not even worth documenting] | |||
cfa | nobody said this wasn't worth documenting did they? | ||
AlexDaniel | who said that it's not worth documenting? | ||
cfa | i just mentioned that it's not a bug | ||
geekosaur | thts makes for a lnaguage made of roadblocks to understanding | ||
AlexDaniel | we have a whole page for that: docs.perl6.org/language/traps | ||
as in “I expecting X but oops! Here's why and what you can do” | |||
geekosaur | I have multiple times asked that yhis business of interpreting the @a differently be documented | ||
And gotten confusion and argument in response | 01:33 | ||
AlexDaniel | geekosaur: which doc ticket is that? | ||
geekosaur | I am assuming ti will not be documented, it will just lkeep getting lookatme's "why?: | ||
... | 01:34 | ||
we're not even speaking the same language, are we | |||
AlexDaniel | I'm serious. Can you file a ticket? | ||
and then we'll figure out what to do with it | |||
JJ is very active currently and I guess he'll be able to do something about it | |||
lookatme | anyway thanks :) | 01:35 | |
AlexDaniel | if the expectation is clearly defined, I can also document a trap | ||
Zoffix | m: my $x = [<a b c>]; $x += 42; say $x | ||
camelia | 45 | ||
Zoffix | m: my $x = 3; $x += 42; say $x | 01:36 | |
camelia | 45 | ||
Zoffix | ^ in that form, the QAST for `+=` is exactly the same. | ||
lookatme | hmm, I guess I know what you mean | 01:37 | |
Zoffix | With `@` sigil, the nqp::assign just becomes nqp::callmethod(:name<STORE>) | ||
(which is called on the Array; while with `$` sigil, you're assigning into a Scalar container) | 01:38 | ||
01:39
pharv joined
|
|||
Zoffix | I like this article to understand all the container business: perl6advent.wordpress.com/2017/12/02/ | 01:39 | |
cfa | if i understand geekosaur's issue correctly, it's that they expect op= to modify the lhs (here, an array) directly | 01:40 | |
Zoffix | Ah | 01:41 | |
01:41
TreyHarris joined
|
|||
cfa | rather than assigning the result of the op, +, back into the array | 01:41 | |
Zoffix | Yeah, now I get it. | ||
lookatme | yeah, That's what I mean | ||
geekosaur | no. I am saying that, if I see X op+ ... I expect the X to be treated the same way when ti's used. Which in this case either does not make sense or wants to be done differently. What actually happens is that in one case it's coerced and the other it's the original container. | ||
except I am sure that was just as incomprehensible as my previous statements, given that they all got :nbut it is the same" | 01:42 | ||
lookatme | geekosaur, agree ++ | ||
just looks same | |||
It just like two things just looks same, but actually one is A, another is B | 01:43 | ||
ok, we can call it overload haha | 01:44 | ||
01:45
pierre left
|
|||
lookatme | m: multi sub infix:<<'+='>>(@a, $i) { @a.push($i); }; my @a = 1; @a += 2; say @a; | 01:45 | |
camelia | [1 2] | ||
lookatme | I think I can publish as a module | ||
01:45
pierre joined
|
|||
cfa | so in pseudocode, you're expecting @a += 10 to be akin to @a.operator+=(10) ? | 01:45 | |
lookatme | It should be | 01:46 | |
cfa | geekosaur: is that accurate? | ||
Zoffix | lookatme: they're both A tho. The coersion stuff is what the op chooses to do. As your custom op shows, it doesn't have to coerce into anything and it can do whatever it wants with **A** | 01:47 | |
(my $x = 3; $x += 42) => "take contens of $x, call infix:<+> with them and number 42; save result to $x"; (my $x = <a b c>; $x += 42) => "take contens of $x, call infix:<+> with them and number 42; save result to $x" (my @x = <a b c>; @x += 42) => "take contens of @x, call infix:<+> with them and number 42; save result to @x" | 01:49 | ||
cfa | geekosaur: and since you used op+ above, you'd expect @a + 2 to be a method call on @a? | ||
01:50
athenot joined,
athenot_ left,
stmuk_ joined
|
|||
lookatme | I don't want it consistent in some deep way | 01:51 | |
cfa | like, part of this strikes me as expecting operators to behave as methods coupled to the lhs object | ||
lookatme | I don't think people want do that with += | ||
cfa | but again, i'm not sure if i'm interpreting the issue correctly | 01:52 | |
Zoffix | lookatme: consistency makes the language easy to remember and understand. Sure, people might not want to do @a += 42 or @a ,= @b, but there's a single rule undelying all of the permutations of the ops and variables and sigils: C op= E is the same as `my \t := C; t = t + 42;`. The there are infinite number of possible ops and expressions and they all fit that rule. But if you start inventing special rules for | 01:57 | |
each case. You make it harder to remember everything. | |||
01:58
pharv left
|
|||
AlexDaniel | if this confusion comes from looking at perl 6 through c++ glasses, then we should definitely document it as a trap | 01:58 | |
but yes, I'm not understanding the issue also | |||
01:58
pharv joined
|
|||
Zoffix | s/t +_42/t op 42/ | 01:59 | |
01:59
pierre left,
pierre joined
|
|||
Zoffix | s/t op_42/op(t, E)/ | 01:59 | |
lookatme | yeah, I know what you mean, anyway thanks all | 02:01 | |
Zoffix | I think I understand it sorta, like `@a += 42` would behave like `@a := @a + 42` | ||
m: my @a = < a b c>; @a := @a + 42 | |||
camelia | Type check failed in binding; expected Positional but got Int (45) in block <unit> at <tmp> line 1 |
||
02:02
Zoffix left
02:03
pharv left
|
|||
AlexDaniel | cfa: ok, I filed this ticket: github.com/perl6/doc/issues/1855 | 02:04 | |
cfa | AlexDaniel: thanks | 02:06 | |
lookatme | thanks AlexDaniel | 02:07 | |
AlexDaniel | it's a different issue though | ||
please file another ticket for the thing that caused this whole discussion | |||
lookatme: can you do it please? | 02:09 | ||
cfa | AlexDaniel: commented | 02:10 | |
lookatme | AlexDaniel, sorry, no, I am on working place now :) | 02:13 | |
AlexDaniel | geekosaur: please? | ||
02:19
Actualeyes joined
02:24
thowe left
02:25
thowe joined,
pharv joined
|
|||
thowe | Good people of #Perl6... I bid you hello. | 02:26 | |
timotimo | greetings | 02:28 | |
thowe | timotimo, Tell me good things of Perl6 and the world at large. | 02:29 | |
timotimo | are you already subscribed to the perl6 weekly? | ||
thowe | mmm, maybe not(?) | ||
how do I do this | |||
timotimo | p6weekly.wordpress.com/ | ||
lookatme | p6weekly.wordpress.com/ | 02:30 | |
thowe | Edument... Don't they have something to do with Cro? | ||
timotimo | yup | ||
i've worked with edument and i can say they're a fine bunch | 02:31 | ||
(disclaimer, i coded up the remote debugger thing that's described at the beginning; i didn't do the design, though) | 02:32 | ||
thowe | I was at YAPC/TPC in Orlando a couple years ago... It seems Perl6 people are a good bunch as a rule. | ||
I've been too busy to play with Perl since then, but I am trying to make time. I want to go to the next one. Perl6 is really rocking it lately, it seems. | 02:33 | ||
remote debugger thing.... Awesome | 02:36 | ||
Geth | doc: 23004a56e6 | cfa++ | doc/Language/traps.pod6 Attempt to document confusion around infix operator assignment. This was in #perl6 today; first pass at documenting a potential trap. |
02:37 | |
synopsebot | Link: doc.perl6.org/language/traps | ||
Geth | doc: de48b9de96 | cfa++ | doc/Language/traps.pod6 Tidy clunky language. |
02:40 | |
cfa | AlexDaniel: ^ | ||
timotimo | thowe: if you want you can play around with it a bit. and i really should write a readme for it :) | 02:42 | |
thowe | I don't think I would know what to do with it at this point. | 02:43 | |
timotimo | that's fair | ||
AlexDaniel | cfa: cool. I still don't understand what is the “expected” behavior | 02:44 | |
cfa: maybe it should be clarified? | |||
cfa | i honestly don't know what's expected here | 02:45 | |
an exception? | |||
thowe | I want to go to SLC again... | ||
AlexDaniel | Zoffix: ↑ maybe there's something you'd want to add here? | ||
to the traps page I mean | |||
cfa | caveat: it's pretty rough as is | 02:46 | |
but i figured it's better to have something | |||
02:46
ilbot3 left
|
|||
AlexDaniel | OK I'll try to get some sleep again… I hope successfully this time :) | 02:53 | |
02:55
Zoffix joined,
espadrine left
02:56
ilbot3 joined,
ChanServ sets mode: +v ilbot3
|
|||
Zoffix | cfa: AlexDaniel well, just the incorrect bit: "@a = (+@a) + 10;" <-- that doesn't happen but to me the current text suggests that it does, especially with the whole "into numeric context". | 02:57 | |
02:58
athenot left,
AlexDaniel left
|
|||
Zoffix | And is probably why the original confusion exists. There isn't any two values or two views of @a involved in any part of the process | 03:00 | |
m: my @a = <a b c>; my \t := @a; t = t + 3; say @a | |||
camelia | [6] | ||
Zoffix | ^ it's the same object in both cases and the construct doesn't concern itself with what the operator is doing. The whole thing about @a evaluating to the number of elements in "numeric context" is just the workings under the hood of infix:<+> op that's being used. | 03:01 | |
03:02
athenot joined
|
|||
cfa | Zoffix: that was meant to offer a different way of thinking about it | 03:02 | |
the (+@a) is just to explain where the 3 comes from | 03:03 | ||
03:03
aborazmeh left
|
|||
cfa | i'll remove it in the third line | 03:03 | |
Zoffix | m: my @a = <a b c>; sub infix:<♥> (\a, $) { a.reverse }; @a ♥= 42; say @a; | ||
camelia | [c b a] | ||
Zoffix | m: my @a = <a b c>; sub infix:<♥> (\a, $) { a.reverse }; my \t := @a; t = t ♥ 42; say @a; | 03:04 | |
camelia | [c b a] | ||
timotimo | how would you like to pass the --debug-port and --debug-suspend arguments to a hypothetical perl6-debugserver-m runner script? | ||
Zoffix | ^ same here; it's up to the op if it chooses to ignore the arg. There's no "heart context" involved. | ||
cfa | yeah | 03:05 | |
timotimo | i'm thinking an env var might be better than doing probably-fragile argument handling in a shell script | ||
cfa | but + is still asking for @a as a numeric, no? | ||
that's all i meant | |||
Zoffix | cfa: I think it's entirely irrelevant to the feature being showed, and in fact, trying to explain it while also explaining op= is maybe a mistake. | 03:06 | |
cfa | i think 'why 13' will come up | ||
so saying "here's where 3 comes from" helps? | 03:07 | ||
Zoffix | Exactly, so why involve it. | ||
cfa | why involve what? | ||
Zoffix | That arrays in numeric contexts numerate to their number of elements. What does that have to do with `op=` issue? | ||
cfa | because that whole issue (+ coercing, then assigning back) was the crux of the confusion | 03:08 | |
Zoffix | timotimo: the args sound safer. You leave an env var set accidentally and start some other program and now it's exposing it's data to anything that can connect and listen, don't it? | 03:09 | |
timotimo | hm, fair enough | ||
03:09
Zoffix left
|
|||
Geth | doc: c76643cfb1 | cfa++ | doc/Language/traps.pod6 Remove second instance of (+@a); clarify language. |
03:09 | |
synopsebot | Link: doc.perl6.org/language/traps | ||
cfa | clarified it a bit there; feel free to rewrite this | 03:10 | |
timotimo | who here can write good shell scripts? :) | ||
lookatme | do what ? | 03:13 | |
timotimo | actually, why not have the debugserver script just take positional arguments | 03:15 | |
first one for the port, second one "y" or "n" for suspend or not | 03:16 | ||
03:16
pharv left,
pharv joined
|
|||
llfourn | I'm pretty good a shell scripts since I wrote a shell script compiler in Perl 6 XD | 03:18 | |
to me env vars are preferable | |||
in bash at least when you do DEBUG_PORT=8888 perl6-debugserver-m it won't leak | 03:19 | ||
03:21
pharv left
|
|||
llfourn | to make that true on all patforms I think you can do env DEBUG_PORT=8888 perl6-debugserver-m | 03:21 | |
timotimo | yeah, but it'll leak to anything *that* calls | 03:22 | |
unless it's easy to throw out that variable before actually invoking the binary itself | |||
03:22
greppable6 left
03:23
greppable6 joined
|
|||
llfourn | I don't see what you mean :o | 03:23 | |
oh anything the script calls | 03:24 | ||
yeah | |||
03:26
athenot left
03:27
athenot joined
|
|||
cfa | .ask Zoffix see what you make of that? (not yet live on the docs site) | 03:29 | |
yoleaux | cfa: I'll pass your message to Zoffix. | ||
timotimo | there's surely a sh compatible "unset this env var" that's super simple | 03:30 | |
llfourn | timotimo: yeah isn't it just unset lol | 03:36 | |
it seems it's not part of POSIX shell -- but you could just set them to empty before you invoke the thing | 03:40 | ||
03:43
ufobat_ joined
|
|||
Geth | doc: e96a0d19a7 | cfa++ | doc/Language/traps.pod6 Remove (redundant) infix operator assignment example. Zoffix is right, it confuses matters. |
03:46 | |
synopsebot | Link: doc.perl6.org/language/traps | ||
03:46
ufobat left
03:54
wamba joined
|
|||
cfa | well, now that i've made a royal hash of that, dinner | 03:57 | |
Brock | Science depends on determinism | 04:11 | |
awwaiid | hmm. wrong channel :) | ||
04:16
itaipu joined
04:46
thowe left
05:11
skids left
05:12
eliasr left
05:15
rindolf joined,
unicodable6 left,
unicodable6 joined
05:33
wamba left
05:40
pierre left
05:41
pierre joined,
curan joined
05:42
pierre left
05:43
pierre joined
05:52
khw left
06:05
wamba joined
06:12
mudman joined
06:20
espadrine joined
06:27
darutoko joined
06:30
w_richard_w left,
w_richard_w joined
06:33
domidumont joined,
itaipu left
|
|||
Geth | doc: 1066bb3e8f | (JJ Merelo)++ | htmlify.p6 Apparently, problems with ? have been fixed So this closes #1851. |
06:35 | |
06:40
domidumont left
06:41
domidumont joined
06:43
domidumont left
06:47
pierre left
06:48
pierre joined
06:53
pierre left
|
|||
Geth | doc: ddc0c0ec6d | (JJ Merelo)++ | htmlify.p6 I'm not that fond of the no tabs rule |
06:57 | |
07:02
domidumont joined,
redhands joined
07:09
lowbro joined,
lowbro left,
lowbro joined
07:16
travis-ci joined
|
|||
travis-ci | Doc build failed. JJ Merelo 'I'm not that fond of the no tabs rule' | 07:16 | |
travis-ci.org/perl6/doc/builds/355720003 github.com/perl6/doc/compare/1066b...c0c0ec6d2b | |||
07:16
travis-ci left
|
|||
buggable | [travis build above] ☠ Did not recognize some failures. Check results manually. | 07:16 | |
bocaneri is discovering that using Supply can bog things down a bit | 07:22 | ||
07:30
mudman left
07:34
espadrine left
07:35
redhands left
07:37
salva joined
07:42
pierre_ joined
07:44
pierre_ left
07:45
pierre_ joined
07:56
aeruder joined
08:18
robertle joined
08:24
pierre_ left
08:26
pierre_ joined
08:29
dakkar joined
|
|||
lizmat clickbaits p6weekly.wordpress.com/2018/03/19/...y-edument/ | 08:31 | ||
08:31
scott joined
08:48
scimon joined
08:52
lookatme left
09:01
robertle left
09:09
amalia___ joined
09:19
pierre_ left,
pierre_ joined
09:23
pierre_ left
09:31
pierre_ joined
|
|||
moritz | lizmat++ | 09:31 | |
09:32
w_richard_w left
09:33
robertle joined
09:45
mcmillhj joined
09:50
mcmillhj left
09:55
aindilis left
|
|||
jkramer | Am I missing some documentation is or does Duration now have any duration-specific methods but is basically just a Rat? docs.perl6.org/type/Duration | 09:58 | |
yoleaux | 19 Mar 2018 02:28Z <perlawhirl> jkramer: Yes, I am in Australia | ||
jkramer | Oh | ||
:D | |||
s/now/not/ | 09:59 | ||
buggable | New CPAN upload: App-Assixt-0.2.0.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/...2.0.tar.gz | 10:21 | |
10:30
xinming_ joined
10:31
pmurias joined
10:33
xinming left
10:35
markong joined
10:48
mcmillhj joined
10:52
daxim joined,
mcmillhj left
11:12
Zoffix joined
|
|||
tbrowder_ | hi #perl6 | 11:12 | |
Zoffix | jkramer: it's literally just that. A Rat packed in a class to signify it was a result of subtracting two Instances. We discussed it just the other day: irclog.perlgeek.de/perl6/2018-03-18#i_15937102 | ||
(with consesus being: yeah, it could be better, but the betterment should be trialed in the ecosystem first) | 11:13 | ||
lizmat++ # good weekly; shocked by how many new modules we got | 11:14 | ||
tbrowder_ | ref: my comments yesterday about Toaster: i think i was waving the red flag a bit too early. i just had a good run without leaving orphans and i think (hope) the problem was being caused by using nohup instead of at for detaching a job from the login shell. | 11:16 | |
11:17
pierre_ left
11:18
Zoffix left
|
|||
jkramer | I'd like to have something like this in Duration: paste.pound-python.org/show/squF4h...HUFEbNAAb/ | 11:25 | |
11:25
pierre joined
|
|||
jkramer | Would this make sense as a module and what's the chance something like that would make it into core Duration at some point? | 11:26 | |
11:30
pierre left
11:56
phdphil joined
11:59
Zoffix joined
|
|||
Zoffix | eco: Number::Denominate | 11:59 | |
buggable | Zoffix, Number::Denominate 'Break up numbers into preset or arbitrary denominations': github.com/zoffixznet/perl6-Number-Denominate 1 other matching results: modules.perl6.org/s/ | ||
Zoffix | jkramer: you can already get that functionality with that module ^ | ||
jkramer: and there's precisely zero chance something like that would get in core, because it doesn't account for leap seconds\ | 12:00 | ||
12:00
curan left
12:01
kurahaupo_ is now known as kurahaupo
|
|||
Zoffix | It'd need a reference point in terms of an Instance/DateTime object and that'd also likely conflict with core Duration, so I'd expect that whatever gets into core would have lots of mileage as ecosystem module before it replaces the core type. | 12:02 | |
m: sub infix:<+> { class Dura { has $.ref; has $.offset; method in-years { $!ref.year R- $!ref.later(:seconds($!offset)).year } }.new :ref($^a) :offset($^b) }; say (DateTime.now + 365*24*60*60).in-years | 12:08 | ||
camelia | 1 | ||
Zoffix | m: sub infix:<+> { class Dura { has $.ref; has $.offset; method in-years { $!ref.year R- $!ref.later(:seconds($!offset)).year } }.new :ref($^a) :offset($^b) }; say (DateTime.now + 365*24*60).in-years | ||
camelia | 0 | ||
Zoffix | Something like that, but with correct math for everything | ||
Is how I picture it | |||
12:09
eliasr joined
|
|||
phdphil | Any suggestions on a use of $ which just alternates as a bool, i.e. True, False, True, False...? I've got ?($++%2) which just seems... long | 12:10 | |
Zoffix | m: multi infix:<-> (DateTime:D \a, DateTime:D \b) is default { class Dura { has $.ref; has $.offset; method in-years { $!ref.year R- $!ref.later(:seconds($!offset)).year } }.new :ref(a) :offset(b.Instant - a.Instant) }; say (DateTime.now - DateTime.now.later: :2years).in-years | 12:11 | |
camelia | 2 | ||
Zoffix | Or this | ||
phdphil: $++ %% 2 | |||
m: say (!0, !* … *).head: 100 | 12:12 | ||
camelia | (True False True False True False True False True False True False True False True False True False True False True False True False True False True False True False True False True False True False True False True False True False True False True Fal… | ||
Zoffix | looks like META_REVERSE is messed up with fake infix colonpairs | 12:13 | |
m: class {}.new :foo(42 - 3) | |||
camelia | ( no output ) | ||
Zoffix | m: class {}.new :foo(42 R- 3) | ||
camelia | Default constructor for '<anon|1>' only takes named arguments in block <unit> at <tmp> line 1 |
||
phdphil | Hmm %% seems good | 12:14 | |
Zoffix | m: for ^10 { say state Bool $++ } | ||
camelia | False True True True True True True True True True |
||
Zoffix | m: for ^10 { say state Bool $-- } | ||
camelia | False False False False False False False False False False |
||
Zoffix | Oh right. Nm. | ||
lizmat | m: say (|(True,False) xx *).head(10) | 12:16 | |
camelia | (True False True False True False True False True False) | ||
Zoffix | :) | ||
m: say (|?«<0 1> xx *).head(10) | 12:17 | ||
camelia | (False True False True False True False True False True) | ||
12:17
athenot left
12:18
athenot joined
|
|||
Zoffix | The `(!0,!*…*)` looks like a puffy kitten | 12:19 | |
12:24
wamba left
12:25
Zoffix left
|
|||
jkramer | Zoffix: That's why I deliberately only added units with fixed lenghts, not months/years. I only really wanted a way to format durations in a more human readable way. | 12:26 | |
How can I already get that functionality with Duration? | 12:28 | ||
12:28
Zoffix joined
|
|||
Zoffix | jkramer: well, I mentioned that module... | 12:28 | |
jkramer: but your units aren't fixed. A minute can be 59 or 60 seconds long and you need to know *when* you're measuring to know which it is | 12:29 | ||
m: DateTime.new("2016-12-31T23:59:59").later(:second).say | 12:30 | ||
camelia | 2016-12-31T23:59:60Z | ||
Zoffix | m: DateTime.new("2017-12-31T23:59:59").later(:second).say | ||
camelia | 2018-01-01T00:00:00Z | ||
Zoffix | Well, 60/61 seconds long; I meant the final second could be 59th or 60th | 12:31 | |
jkramer | Hmm I only see the need for taking that into account when measuring the duration between two known points. I think for the purpose of displaying an amount of seconds in minutes it's safe to assume that a minute has 60 seconds :) | ||
Zoffix | Maybe for your project. But if you're going to make it core, you can't assume all projects will be just as lax. | 12:32 | |
12:32
vcv joined
|
|||
jkramer | Yeah ok I can live with my implementation not getting into core. :) I was just wondering why Duration was not offering any time-related functionality :) | 12:33 | |
Zoffix | Dunno. The speculations mention duration, but only as a type that's returned from math on instants. Doesn't say anything about provided methods. | 12:39 | |
And it does say "Note that the Duration values are still just atomic time without any cultural deformations" | |||
"Authors: Larry Wall" | 12:40 | ||
You can ask TimToady about it when you see him next time :) | |||
That was from S02 btw | 12:42 | ||
synopsebot: S02 | |||
lazy robot | 12:43 | ||
S02:1441 | |||
synopsebot | Link: design.perl6.org/S02.html#line_1441 | ||
jkramer | Zoffix: Well it's not that important to me, I was just hacking a little script that tells how many work hours are left till my vacation starts :D | 12:46 | |
Zoffix | huggable: fc5 | 12:47 | |
huggable | Zoffix, nothing found | ||
Zoffix | buggable: fc5 | ||
buggable | Zoffix, Far Cry 5 will be released in 6 days, 11 hours, 12 minutes, and 13 seconds | ||
Zoffix | buggable: source | ||
buggable | Zoffix, See: github.com/zoffixznet/perl6-buggable | ||
jkramer | In case someone else is in urgent need of such a script: dpaste.com/262TN26 | 12:48 | |
Zoffix | ^ that one is done by just `use Number::Denominate; "Far Cry 5 will be released in " ~ denominate Date.new("2018-03-27").DateTime - DateTime.now` | ||
jkramer | Zoffix: Oh you were referring to that module - I thought you meant Duration :) | 12:50 | |
12:50
mcmillhj joined
12:51
kurahaupo left,
kurahaupo joined
13:00
Zoffix left
13:06
natrys joined
13:11
cdg joined
13:13
wamba joined
13:14
itaipu joined
|
|||
phdphil | m: say '(|?«<0 1> xx *)'.chars | 13:20 | |
camelia | 15 | ||
phdphil | m: say '$++ %% 2'.chars | 13:21 | |
camelia | 8 | ||
13:27
vcv left
13:28
vcv joined
13:40
cognominal joined
13:41
FROGGS joined
13:42
AlexDaniel joined
13:50
wamba left
13:52
skids joined,
pierre joined
13:54
stmuk joined
13:55
FROGGS left
13:56
pierre left
13:57
stmuk_ left
14:02
vcv left
14:05
vcv joined
|
|||
cfa wakes | 14:06 | ||
morning all | |||
masak | \o | ||
14:14
pierre_ joined
|
|||
AlexDaniel | 🙋 | 14:15 | |
cfa | 🌊 | ||
AlexDaniel | that's… not the right wave? :) | 14:16 | |
cfa | okay okay, 🖖 | 14:19 | |
14:22
Guest49 joined
|
|||
buggable | New CPAN upload: Config-1.3.3.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/...3.3.tar.gz | 14:31 | |
14:32
mahafyi joined
14:33
khw joined
|
|||
Geth | doc: fa847b22c3 | cfa++ | doc/Language/modules.pod6 Markup bare links on modules.pod6. Closes #1856. |
14:35 | |
synopsebot | Link: doc.perl6.org/language/modules | ||
14:40
FROGGS joined
14:53
travis-ci joined
|
|||
travis-ci | Doc build passed. cfa 'Markup bare links on modules.pod6. | 14:53 | |
travis-ci.org/perl6/doc/builds/355882238 github.com/perl6/doc/compare/ddc0c...847b22c3fc | |||
14:53
travis-ci left
|
|||
jkramer | Who's running the camelia instance here btw? | 15:08 | |
15:13
wamba joined
15:17
pierre_ left,
comborico1611 joined,
pierre joined
15:22
pierre left
15:23
aindilis joined
15:25
troys joined
15:29
lowbro left
15:34
vcv left
|
|||
moritz | me, kinda | 15:36 | |
though it mostly runs itself | |||
mspo | in soviet russia camelia runs you | 15:39 | |
jkramer | moritz: I found some kind of potential security flaw. Although it's probably a general rakudo thing I noticed it when setting up the bot in my own channel and you probably should know about it :) | 15:41 | |
El_Che | first zero day! | ||
moritz | jkramer: you can tell me through private message | 15:42 | |
masak | no no, we all want to know :> | ||
moritz | though there are known risks that we chose not to mitigate | ||
15:43
natrys left
15:45
natrys joined
15:50
comborico1611 left
|
|||
AlexDaniel | mspo: if it's about RESTRICTED setting, then it's known that it does nothing | 15:51 | |
jkramer | Yeah it was :) | ||
AlexDaniel | *ables don't even use it, because why bother if you can work around it so easily | ||
but then *ables at least don't let you write to the filesystem… | 15:52 | ||
still not secure at all though | |||
in some sense it's a tradeoff between security and usefulness, e.g. you can restrict network access but then you won't be able to bisect certain things | 15:53 | ||
mspo | the go playground seems like it would be an intense target | ||
jkramer | Yeah well I guess you can't really make it secure and at the same time allow random people on the internet to execute random code on your server :) | 15:54 | |
AlexDaniel | rkeval: say ‘Hello’ | 15:55 | |
perlbot | AlexDaniel: Hello | ||
AlexDaniel | ↑ this bot is more secure IIRC, but it's bad in other ways | ||
rkeval: say ‘Hello’; say ‘world’ | |||
perlbot | AlexDaniel: Hello world | ||
AlexDaniel | rkeval: $*PERL.compiler.version | 15:56 | |
perlbot | AlexDaniel: No output. | ||
AlexDaniel | rkeval: $*PERL.compiler.version.say | ||
perlbot | AlexDaniel: v2017.10 | ||
jkramer | rkeval: $*PROGRAM.say | 15:57 | |
perlbot | jkramer: "/tmp/e5ExbR5fL4".IO | ||
jkramer | rkeval: $*PROGRAM.slurp.say | 15:58 | |
perlbot | jkramer: $*PROGRAM.slurp.say | ||
15:58
athenot left
|
|||
jkramer | Looks like it has the same problems | 15:59 | |
15:59
athenot joined
|
|||
AlexDaniel | no? It just refused to do that | 15:59 | |
oh oops | |||
didn't read it right | |||
so it allowed you to slurp the contents of the program, so? | |||
you can probably even explore the filesystem a little bit, no problem | 16:00 | ||
jkramer | Probably also delete itself and other stuff, I don't wanna try ;) | ||
AlexDaniel | it's in chroot jail, who cares? | 16:01 | |
El_Che | wrap it in a container + vm | ||
ah jail | |||
Geth | doc: 7cee3c66a1 | cfa++ | doc/Language/haskell-to-p6.pod6 Markup another bare link on the Haskell page. As @AlexDaniel notes, we should create a test for this. |
16:04 | |
synopsebot | Link: doc.perl6.org/language/haskell-to-p6 | ||
AlexDaniel | IIRC it should be doing syscall whitelisting also with seccomp | ||
jkramer | AlexDaniel: Is that jail setup stuff somewhere online? I want to run camelia in another channel but right now I'm too lazy to do the setup myself :) | 16:05 | |
AlexDaniel | jkramer: github.com/perlbot/ | ||
“That's jumping too far with the conclusions. The charts only show people googling for it. For all we know they could be googling "what are my options if I hate perl 6"” | 16:10 | ||
:'D | |||
( www.reddit.com/r/perl6/comments/85..._in_china/ ) | |||
[Coke] | cfa: regarding the test mentioned in 7cee3c66a1 - there's no easy way to tell using 'perl6 --doc' if a url has a L<> on it; I think you'd have to parse the POD of each page and instrospect the pod data object. | ||
AlexDaniel | Maybe that's not a problem, just process raw pod files? | 16:11 | |
like, in text format | |||
cfa | [Coke]: yeah | ||
i mean, i caught the previous one with a naive grep | |||
[Coke] | AlexDaniel: also a possibility. | 16:12 | |
16:17
domidumont left,
ChoHag joined
|
|||
AlexDaniel | [Coke]: so what's the status of JJ currently? Did he start his grant work? | 16:17 | |
[Coke] | Ask him | 16:19 | |
His grant was approved, funded, and he's been assigned a grant manager. | |||
my expectation is that now we get monthly status reports. | |||
I am concerned that he's not on IRC. | |||
16:20
mcmillhj left
|
|||
[Coke] | (is he here?) | 16:20 | |
AlexDaniel | no | 16:21 | |
Guest49 | Hello, is there any difference between those regexes: | ||
\/ < a b > / | |||
rx/ <[a b]> / | 16:22 | ||
(it’s the first time I’ve used irc, got pranked by the formatting) | |||
[Coke] | the rx makes me think you're asking about p5. | ||
AlexDaniel | m: say rx/abc/ | ||
camelia | rx/abc/ | ||
[Coke] | m: rx # ah | 16:23 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> # not allowed as delimiter at <tmp>:1 ------> 3rx #7⏏5 ah |
||
[Coke] | m: rx ;# ah | ||
camelia | 5===SORRY!5=== Regex not terminated. at <tmp>:1 ------> 3rx ;# ah7⏏5<EOL> Regex not terminated. at <tmp>:1 ------> 3rx ;# ah7⏏5<EOL> Couldn't find terminator ; (corresponding ; was at line 1) at <tmp>:1 ------> 3rx ;… |
||
[Coke] | m: say rx | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: rx used at line 1 |
||
[Coke] | (there, that's the error you get in the REPL. :) | 16:24 | |
cfa | [Coke]: docs.perl6.org/language/regexes#in...onventions | ||
[Coke] | so, ignore me. :) | ||
yup, thanks. | |||
cfa | Guest49: are you asking about <a b> vs. <[a b]> or the rx? | 16:26 | |
it's not clear what was misformatted | |||
16:30
mcmillhj joined
|
|||
Guest49 | cfa < a b> vs <[a b]> | 16:32 | |
I’m not sure what the difference between the character class and the other thing is | 16:33 | ||
for single characters | |||
16:34
Zoffix joined
|
|||
Zoffix | jkramer: unless you plan on abusing the bot, you can just add your channel to this list and camelia will join it: github.com/perl6/evalbot/blob/mast...rg.conf#L2 | 16:35 | |
16:35
mcmillhj left
|
|||
Zoffix | [Coke]: BTW, do you know if TPF received my grant proposal? | 16:35 | |
I forget when I sent it... some time last week I think | 16:36 | ||
cfa | won't <a b> try and use a named rule 'a b' here? | ||
Guest49: a different w ay of saying /<[a b]>/ is /'a' | 'b'/ | 16:37 | ||
that <a b> syntax means something else entirely | |||
(or /a | b/) | |||
Zoffix | Guest49: first, spacing matters. <a b> and < a b> are different things. The first one is generally an error; `<a>` would call method "a" on the match object, which in Grammars would be some token <a>. `<a(1, 2, 3)>` would do the same but give some args; `<a b>` seems to parse as if "b" was an arg, but that might be just an uncaught error. The `< a b>` syntax, is a LTM (Longest token match) alternatives. | 16:40 | |
Similar to how you can do `my @a = <a b>; /@a/`. The alternatives will be tried and the longest one that matches will match. The `<[a b]>` is a character class. In this case, it'll match the same thing as <a b>, but, say <[a bc]> and < a bc> are different. The character class version would match either "a", or "b", or "c", while the LTM alternatives would match either "a" or "bc" | |||
m: grammar { token TOP { <a b> }; method a($_) { .perl.say; exit } }.parse: "" | 16:42 | ||
camelia | ForeignCode.new | ||
Zoffix | m: grammar { token TOP { <a foobarber> }; method a($_) { .perl.say; exit } }.parse: "" | ||
camelia | ForeignCode.new | ||
Zoffix | m: grammar { token TOP { <a foobarber zef> }; method a($_) { .perl.say; exit } }.parse: "" | ||
camelia | Potential difficulties: Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing) at <tmp>:1 ------> 3grammar { token TOP { <a foobarb… |
||
jkramer | Zoffix: That won't work, it's a private/password-protected channel and on a different server. I actually had to hack password support into Bot::BasicBot to make it work :) | 16:44 | |
16:44
mcmillhj joined
|
|||
Zoffix | eco: GlotIO | 16:44 | |
buggable | Zoffix, GlotIO 'Use glot.io API: pastebin allowing execution of code': github.com/zoffixznet/perl6-GlotIO | ||
Zoffix | Using ^ that API is also an option | 16:45 | |
Prolly 4 lines of code, with IRC::Client | |||
(though I forget if IRC::Client supports joining private channels) | |||
jkramer | Oh nice, didn't know that existed. | 16:46 | |
Zoffix | m: say grammar { token TOP { <a alpha> }; token a($_) { . { say $_(Match.^lookup("!cursor_init")(Match, "abc", :0c)) } } }.parse: "abc" | ||
camelia | #<failed match> Nil |
||
jkramer | Zoffix: It should, I vaguely remember requesting channels passwords as a feature 1-2 years ago and it was implemented promptly :) | 16:47 | |
16:48
vcv joined
|
|||
stmuk | Apropos "marketing" I see the most popular Amazon programming books are called "Learn $language in One Day and Learn It Well" | 16:48 | |
yoleaux | 18 Mar 2018 03:41Z <Zoffix> stmuk: I updated the Star release guide with the new way to publish announcements on rakudo.org. There's a script that does everything or you can just commit a markdown file to perl6/rakudo.org repo manually. Site will pull the repo and update itself in a cronjob that runs every 5m: github.com/rakudo/star/commit/86d2...090745f8da | ||
jkramer | github.com/zoffixznet/perl6-IRC-Cl.../issues/18 :) | ||
Zoffix | cool | 16:49 | |
Filed the regex thing as R#1634 | |||
synopsebot | R#1634 [open]: github.com/rakudo/rakudo/issues/1634 `/<a foo bar>/` parses, but is that a valid syntax? | ||
cfa | Zoffix: i don't think the ltm < a bc> case is on docs.perl6.org/language/regexes, unless i'm missing something? | 16:52 | |
16:53
domidumont joined
|
|||
cfa | its behaviour surprises me anyway | 16:53 | |
Zoffix | No idea, I'm not very familiar with the docs. | ||
Why? | |||
cfa | why does it surprise me? | 16:54 | |
Zoffix | Yes. | ||
< a b c > is a list in code. It makes sense that you can write it in regex to mean a list of things | |||
cfa | because i haven't seen it documented so i'd read < a bc> as <a bc> bu mistake | ||
bu => by | |||
Zoffix | m: say < a b c >.^name | ||
camelia | List | ||
Zoffix | And the extra pedantic space-sensitivity is a property of the <> construct | 16:55 | |
cfa | < a bc> vs. <a bc> is confusingly subtle | ||
Zoffix | m: say <1/2>.^name; say <1/2 >.^name | ||
camelia | Rat RatStr |
||
Geth | doc: 66ad010a6b | (JJ Merelo)++ | doc/Language/grammars.pod6 Eliminates empty pod generator, closes #1854 |
||
synopsebot | Link: doc.perl6.org/language/grammars | ||
cfa | i understand what's going on now but i didn't immediately read it as a list | ||
16:56
sergot joined
|
|||
[Coke] | Zoffix: Yes, the form was submitted successfully. round isn't open yet, though. (slow start this month, next few days) | 16:57 | |
Zoffix | [Coke]: cool. Thanks. | 16:58 | |
cfa | hmm, i don't tihnk there's an example of using < > lists in regexes documented, either | ||
Zoffix | cfa: what about / @foo /? Prolly should go to the same place | ||
cfa | good idea, looking | ||
Zoffix | m: say "food" ~~ /||< foo food >/ | 17:00 | |
camelia | 「food」 | ||
Zoffix | I would've expected that to match "foo", but looks like the `|`/`||` modifiers don't apply to the `< .... >` list thing? | ||
cfa | Zoffix: i think the confusion is the (visual) overloading of <>s | ||
Zoffix | m: say "food" ~~ /||<{qw/foo food/}>/ | ||
camelia | 「foo」 | ||
cfa | Zoffix: (to clarify where i'm coming from) | ||
Zoffix | m: my @a = <foo food>; say "food" ~~ /||@a/ | ||
camelia | 「foo」 | ||
Zoffix | cfa: yeah, I know. AlexDaniel says it shouldn't even exist :) | 17:01 | |
cfa | :) | ||
Zoffix | m: say <1.42+1.42i>.^name; #`(Complex); say <1/Inf+1/Inf\i>.^name; #`(ComplexStr) | 17:03 | |
camelia | Complex ComplexStr |
||
Zoffix | even though both should be Complex, based on the rules we managed to figure out: "if you have to use an operator to make that number without `< >`, and you didn't use any whitespace, then you get a normal Numeric, not an allomorph | 17:04 | |
m: .^name.say for <1.2>, <1.2*10>, <1.2*10**10> | 17:05 | ||
camelia | RatStr Str RatStr |
||
Zoffix | No wait | ||
m: .^name.say for <1/2>, <1/2*10>, <1/2*10**10> | |||
camelia | Rat Str RatStr |
||
Zoffix | Three different types :) | ||
17:06
darutoko left
|
|||
Zoffix | m: say <1/2×10¹⁰>.^name | 17:06 | |
camelia | Str | 17:07 | |
cfa | github.com/perl6/doc/issues/1857 | ||
(don't have time to get to this now) | |||
Zoffix | And that don't even work, even tho it's equivalent to the ASCII version | ||
m: say [1/2×10¹⁰, 1/2*10**10] | |||
camelia | [5000000000 5000000000] | ||
Zoffix | m: say <½>.^name | ||
camelia | Str | 17:08 | |
Zoffix | m: say ½ | ||
camelia | 0.5 | ||
Zoffix | Yeah, it's all over the place. I think one day I'll pick it apart and consistify everything :) | ||
cfa | :) | 17:09 | |
17:10
robertle left
|
|||
AlexDaniel | or, you know… just leave it out | 17:12 | |
:) | |||
17:12
wamba left
|
|||
Zoffix | :) | 17:13 | |
17:13
Zoffix left,
travis-ci joined
|
|||
travis-ci | Doc build failed. JJ Merelo 'Eliminates empty pod generator, closes #1854' | 17:13 | |
travis-ci.org/perl6/doc/builds/355950356 github.com/perl6/doc/compare/7cee3...ad010a6b4c | |||
17:13
travis-ci left
|
|||
buggable | [travis build above] ☠ Did not recognize some failures. Check results manually. | 17:13 | |
17:16
pharv joined
|
|||
Ulti | if I want to track down a segfault running on MoarVM is there a nice little set of instructions somewhere on getting all the right debug and logging going? | 17:17 | |
AlexDaniel | MasterDuke dogbert11 timotimo ↑ | 17:18 | |
cfa | AlexDaniel: sorry, should've just reopened that issue | 17:20 | |
(the commit closed the original, which was probably overkill) | |||
AlexDaniel | well, initially it didn't ask for tests | ||
so again, you did everything right | 17:21 | ||
but I really want to get this point across to JJ that you can't just close an issue with a hope that it will be handled by somebody else | |||
buggable | New CPAN upload: App-Assixt-0.2.1.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/...2.1.tar.gz | ||
AlexDaniel | not that he is wrong, that's how it works in some projects… just not here | 17:22 | |
or so I think | |||
cfa | ack | ||
17:32
dakkar left
17:35
scimon left
17:42
bwisti joined
|
|||
[Coke] | zoffix, thanks for the poke, posted the RFP | 17:45 | |
17:48
espadrine joined
17:57
cdg left
17:58
mr_ron joined,
Zoffix joined
|
|||
Zoffix | [Coke]: thanks. | 17:58 | |
Ulti: there's a convo that describes the process: irclog.perlgeek.de/perl6-dev/2018-...i_15843310 | 17:59 | ||
If you're using Z-Script, you can just run `z md` to re-build MoarVM with debug symbols and then you'd just run your segfaullting script with ./perl6-gdb-m | |||
huggable: zscript | 18:00 | ||
huggable | Zoffix, Helper script for Rakudo Perl 6 core development: github.com/zoffixznet/z | ||
Geth | whateverable: 557f0b59dd | (Aleks-Daniel Jakimenko-Aleksejev)++ | META6.json Fix license field in META6.json According to spdx.org/licenses/ “AGPL-3.0” identifier is deprecated, and for a good reason. Changed it to “AGPL-3.0-or-later”. Note that this is not relicensing, the code already comes with “or later” clause in a header of every source file. It is merely making META6.json file consistent with the reality. |
||
Zoffix | Or manually, in MaortVM checkout, run: perl Configure.pl --debug --no-optimize --prefix=../../install/ where prefix is where it's installing at (the ../../install is if you autobuilt it with rakudo's build step) | ||
18:01
Zoffix left
|
|||
mr_ron | r: gist.github.com/ronaldxs/748362a36...eca9187c30 | 18:01 | |
camelia | 1..3 ok 1 - not ok 2 - # Failed test at <tmp> line 20 ok 3 - # Looks like you failed 1 test of 3 |
18:02 | |
1..3 ok 1 - not ok 2 - # Failed test at <tmp> line 20 ok 3 - # Looks like you failed 1 test of 3 |
|||
mr_ron | Looks like bug - could someone please verify ... thx | ||
18:19
mahafyi left
18:22
khisanth__ left
18:23
wamba joined
|
|||
mr_ron | m: gist.github.com/ronaldxs/748362a36...eca9187c30 # more complete test code | 18:23 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Confused at <tmp>:1 ------> 3https:7⏏5//gist.github.com/ronaldxs/748362a36fd85 expecting any of: colon pair |
||
mr_ron | m: gist.github.com/ronaldxs/748362a36...eca9187c30 | 18:24 | |
camelia | 1..4 ok 1 - test with default ws not ok 2 - test with custom ws # Failed test 'test with custom ws' # at <tmp> line 21 not ok 3 - adding $ on top of <|w> should be same # Failed test 'adding $ on top of <|w> should be same' # at <tmp> li… |
||
18:31
phogg joined
18:32
mcmillhj left
18:36
khisanth__ joined,
Guest49 left
18:37
comborico1611 joined
18:40
kaare_ left
|
|||
Geth | doc: ca78a22663 | (JJ Merelo)++ | 3 files Closes #1845 by rearranging documentation a bit |
18:41 | |
18:41
kaare_ joined
18:43
mcmillhj joined
18:45
kaare_ left
18:47
kaare_ joined
18:48
FROGGS left
19:07
speedChicken joined
|
|||
buggable | New CPAN upload: App-Assixt-0.2.2.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/...2.2.tar.gz | 19:11 | |
New CPAN upload: Algorithm-Evolutionary-Simple-0.0.2.tar.gz by JMERELO cpan.metacpan.org/authors/id/J/JM/...0.2.tar.gz | |||
19:14
vike left
19:16
cog_ joined
19:18
cognominal left
19:24
vcv left
19:26
vcv joined
19:28
vike joined
|
|||
Geth | doc: 42165a4138 | (JJ Merelo)++ | doc/Language/traps.pod6 Added trap about the (ab)use of $/ Hope this closes #1853. If it does not, or it should be moved somewhere else, feel free to re-open or to suggest something. |
19:29 | |
synopsebot | Link: doc.perl6.org/language/traps | ||
19:33
mudman joined
19:36
domidumont left,
domidumont joined
19:38
domidumont left
19:39
daxim left
19:40
daxim joined
19:41
JMERELO joined
|
|||
JMERELO | Hi | 19:42 | |
El_Che | hi jj | ||
JMERELO | Hi, @El_Che | 19:43 | |
Just made a small, tiny even, change to doc pages... Check out here to see if you notice docs.perl6.org/routine/, | 19:44 | ||
;-) | |||
AlexDaniel | o/ | 19:45 | |
JMERELO | Hi, Alex! | ||
Spent a good amount of time this afternoon with the Grammar warning... | 19:47 | ||
AlexDaniel | JMERELO: I'm wondering, have you started the grant work already? (or are these just typical contributions) | ||
JMERELO: and also, who's your grant manager? | |||
Geth | doc: 21bca9870d | cfa++ | doc/Language/traps.pod6 Remove trailing whitespace; pass tabs.t. |
19:48 | |
synopsebot | Link: doc.perl6.org/language/traps | ||
19:48
travis-ci joined
|
|||
travis-ci | Doc build failed. JJ Merelo 'Added trap about the (ab)use of $/ | 19:48 | |
travis-ci.org/perl6/doc/builds/356021084 github.com/perl6/doc/compare/ca78a...165a4138c1 | |||
19:48
travis-ci left
|
|||
buggable | [travis build above] ☠ Did not recognize some failures. Check results manually. | 19:48 | |
JMERELO | I couldn't figure out why X<whatever|declarator,grammar> failed | ||
@AlexDaniel to tell you the truth, I don't know. | |||
Last thing I knew is Will Coleda was trying to find a manager for the grant | 19:49 | ||
mr_ron | last call on gist before filing RT ... | 19:50 | |
JMERELO | Maybe I'm just unmanageable :-) | ||
cfa | hey JMERELO | 19:51 | |
JMERELO | @AlexDaniel so I guess that answers your second question. | ||
hey @cfa! | |||
AlexDaniel | [Coke]: you said that the grant manager was assigned, maybe JJ should know about it? :) | ||
JMERELO | @cfa sorry about the tab stuff. I just got carried... I should have checked. | 19:52 | |
AlexDaniel | [Coke]: also, hey, he's here! | 19:53 | |
JMERELO | @AlexDaniel Yep, not too fond of IRC myself... Just installed weechat to do it a tiny bit more often | 19:54 | |
AlexDaniel | JMERELO: that'd be really nice, yes | ||
19:54
khw left
|
|||
JMERELO | @AlexDaniel definitely will do it when the grant starts officially. | 19:54 | |
AlexDaniel | thanks! | 19:55 | |
JMERELO | So, no problem with the small, tiny change? :-) docs.perl6.org/routine/, | 19:56 | |
Also, I couldn't figure out wy X<Whatever|declarator,grammar> caused htmlify to bail out. | 19:57 | ||
AlexDaniel | the change that it's now wrapped in <code>? Of course not a problem, how could it possibly be a problem? :) | 19:58 | |
that I don't know unfortunately | |||
JMERELO | @AlexDaniel also took out the comma. Before it said "documentation for infix ,,". I didn't like that :-) | 19:59 | |
AlexDaniel | right | ||
JMERELO | @AlexDaniel the problem was that it only worked if it said something like |class,Grammar;declarator,grammar>. | 20:00 | |
AlexDaniel | mr_ron: looks correct to me | ||
JMERELO | That was generating an empty "type/Grammar.html" page that was then wiped out when the real one was created. But if you didn't include that class declaration, it failed. | ||
that was the only instance, as far as I have been able to find out, of using `class` inside X. It apparently generates a type/whatever page. Problem is, Grammar was generated elsewhere. | 20:01 | ||
AlexDaniel | mr_ron: look: | 20:02 | |
m: grammar TestWithSemi { rule TOP {^<ps>$}; rule ps { ‘photo’ ‘shop;’}; }; grammar TestWithSemi_1 is TestWithSemi { token ws { \s+ || <|w> } }; say TestWithSemi_1.parse(‘photo shop;’); | |||
camelia | 「photo shop;」 ps => 「photo shop;」 |
||
AlexDaniel | m: grammar TestWithSemi { rule TOP {^<ps>$}; rule ps { ‘photo’ ‘shop;’ }; }; grammar TestWithSemi_1 is TestWithSemi { token ws { \s+ || <|w> } }; say TestWithSemi_1.parse(‘photo shop;’); | ||
camelia | Nil | ||
AlexDaniel | according to the docs: “When rule instead of token is used, any whitespace after an atom is turned into a non-capturing call to ws, written as <.ws> where . means non-capturing” | 20:03 | |
so you have ‘shop;’ and whitespace after it, so there's an implied <.ws> | |||
it's a bit weird I know :S but it does what the docs say | |||
mr_ron: maybe instead of filing a rakudobug you should file a doc ticket demanding to mention this little aspect in the docs | 20:04 | ||
maybe in traps even | |||
or, I don't know, FAQ? It's the first time I see this question though | 20:05 | ||
JMERELO | @AlexDaniel I just opened the Grammars section for traps | 20:06 | |
AlexDaniel | yeah I've seen that :) | ||
JMERELO | :-) | ||
20:07
travis-ci joined
|
|||
travis-ci | Doc build passed. cfa 'Remove trailing whitespace; pass tabs.t.' | 20:07 | |
travis-ci.org/perl6/doc/builds/356028974 github.com/perl6/doc/compare/42165...bca9870db6 | |||
20:07
travis-ci left
|
|||
JMERELO | so yes, that could go to the traps section | 20:07 | |
mr_ron | just got back ... | 20:08 | |
20:08
ChoHag left
20:09
khw joined
|
|||
AlexDaniel | m: grammar WsTest { rule TOP { ‘ink’ ‘scape;’ }; token ws { \s+ || <|w> } }; say WsTest.parse(‘ink scape;’); | 20:12 | |
camelia | Nil | ||
AlexDaniel | m: grammar WsTest { rule TOP { ‘ink’ ‘scape;’}; token ws { \s+ || <|w> } }; say WsTest.parse(‘ink scape;’); | ||
camelia | 「ink scape;」 | ||
AlexDaniel | golfed a little bit | ||
JMERELO | Leaving now | 20:14 | |
See you! | |||
AlexDaniel | 🙋 | ||
20:15
JMERELO left,
ChoHag joined
|
|||
mr_ron | AlexDaniel: how come it behaves differently with the default <ws>? | 20:18 | |
20:19
_jg_ joined
|
|||
_jg_ | perl manual, very basic tutorial? | 20:19 | |
moritz | _jg_: greenteapress.com/wp/think-perl-6/ | 20:20 | |
_jg_ | what is this, reddit? | ||
helloWorld.pl | |||
moritz | reddit looks different :-) | ||
El_Che | # Administrator account unlocked. Please type your command... | 20:21 | |
_jg_ | uglier | ||
AlexDaniel | m: grammar WsTest { rule TOP { ‘ink’ ‘scape;’ }; token ws { <!ww> } }; say WsTest.parse(‘ink scape;’); | ||
camelia | Nil | ||
_jg_ | reddit is uglier | ||
El_Che | # command not found! | ||
AlexDaniel | m: grammar WsTest { rule TOP { ‘ink’ ‘scape;’ }; token ws { <!ww> \s* } }; say WsTest.parse(‘ink scape;’); | ||
camelia | 「ink scape;」 | ||
AlexDaniel | mr_ron: well default ws is here I think: github.com/perl6/nqp/blob/a2f66567...qp#L59-L68 | 20:22 | |
or is it the other one? | |||
mr_ron | m: grammar WsTest { rule TOP { ‘ink’ ‘scape;’ }; say WsTest.parse(‘ink scape;’); | 20:23 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing block at <tmp>:1 ------> 3ape;’ }; say WsTest.parse(‘ink scape;’);7⏏5<EOL> |
||
mr_ron | m: grammar WsTest { rule TOP { ‘ink’ ‘scape;’ } }; say WsTest.parse(‘ink scape;’); | ||
camelia | 「ink scape;」 | ||
mr_ron | Perhaps the different behavior by the default might be worth documenting? | 20:24 | |
AlexDaniel | mr_ron: that's another doc issue – “what's the default <ws>?” | ||
mr_ron: basically yes, but it's not different, it's just that <ws> is defined differently | 20:26 | ||
like there's nothing special about the default ws, except that it's completely different from what you'd expect :) | |||
kinda | |||
mr_ron | perhaps add this as note to issue #1729 github.com/perl6/doc/issues/1729 | 20:27 | |
20:29
wamba left
|
|||
AlexDaniel | do it | 20:32 | |
mr_ron | m: grammar WsTest { regex TOP {:s ‘ink’ ‘scape;’}; token ws { \s+ || <|w> } }; say WsTest.parse(‘ink scape;’); | 20:33 | |
camelia | 「ink scape;」 | ||
mr_ron | m: grammar WsTest { regex TOP {:s ‘ink’ ‘scape;’ }; token ws { \s+ || <|w> } }; say WsTest.parse(‘ink scape;’); | ||
camelia | Nil | ||
mr_ron | I think the sigspace paragraph on this might be a bit clearer docs.perl6.org/language/regexes#Sigspace . I was probably thrown off by the examples in that section. | 20:38 | |
Perhaps some clarification about the second example in the paragraph "Where whitespace in a regex turns into <.ws> depends ... " | 20:39 | ||
20:43
athenot left,
athenot_ joined
|
|||
mr_ron | will add these ideas to doc issue #1729 if no objection | 20:44 | |
20:47
athenot joined,
athenot_ left
20:50
vcv left
20:53
_jg_ left
|
|||
mr_ron | m: say so "I used a photo shop " ~~ m:i:s/ photo shop /; | 20:57 | |
camelia | True | ||
21:06
skids left
21:07
khw left
21:10
mudman left
21:11
athenot left
21:12
athenot_ joined
21:15
cdg joined
21:20
cdg_ joined
21:21
mcmillhj left,
mcmillhj joined
21:23
cdg left
21:26
mcmillhj left
21:33
mcmillhj joined
21:37
mcmillhj left
21:38
g- left
21:44
mcmillhj joined
21:45
g- joined
21:46
athenot_ left
21:47
athenot joined
21:49
mcmillhj left
21:54
khw joined
21:55
ChoHag left,
rindolf left
22:00
ChoHag joined,
mcmillhj joined
22:03
dogbert2_ left
22:05
mcmillhj left
22:06
athenot left,
athenot_ joined
22:15
amalia___ left,
itaipu left
22:20
mcmillhj joined
22:25
mcmillhj left
22:32
itaipu joined
22:34
athenot_ left
22:36
mcmillhj joined
22:41
mcmillhj left
22:49
mcmillhj joined
22:52
kaare_ left
22:53
kaare_ joined
22:54
mudman joined,
mcmillhj left
22:56
espadrine left
22:57
natrys left
22:59
ghdke joined
|
|||
ghdke | m: class A { has $.x is rw; method ass ($x) { $!x = $x }; method pr { say $!x } }; my @b = (A.new xx 5); (@b.map: *.x) = (1, 2, 3, 4, 5); @b.map: *.pr; | 22:59 | |
camelia | Cannot modify an immutable Seq (((Any) (Any) (Any) (...) in block <unit> at <tmp> line 1 |
||
22:59
khw left
|
|||
ghdke | class A { has $.x is rw; method ass ($x) { $!x = $x }; method pr { say $!x } }; my @b = (A.new xx 5); (@b.map: *.x).List = (1, 2, 3, 4, 5); @b.map: *.pr; | 22:59 | |
evalable6 | 1 2 3 4 5 |
||
ghdke | m: class A { has $.x is rw; method ass ($x) { $!x = $x }; method pr { say $!x } }; my @b = (A.new xx 5); (@b.map: *.x).List = (1, 2, 3, 4, 5); @b.map: *.pr; | 23:00 | |
camelia | 1 2 3 4 5 |
||
ghdke | why a Seq cannot do the magic on the left hand side? | ||
23:01
mcmillhj joined
|
|||
ghdke | m: class A { has $.x is rw; method ass ($x) { $!x = $x }; method pr { say $!x } }; my @b = (A.new xx 5); (@b.map: *.x) = (1, 2, 3, 4, 5).Seq; @b.map: *.pr; | 23:04 | |
camelia | Cannot modify an immutable Seq (((Any) (Any) (Any) (...) in block <unit> at <tmp> line 1 |
||
ghdke | m: class A { has $.x is rw; }; my @b = (A.new xx 5); (@b.map: *.x).List = (1, 2, 3, 4, 5); @b.map: *.x.say; | ||
camelia | 1 2 3 4 5 |
||
ghdke | m: class A { has $.x is rw; }; my @b = (1, 2, 3, 4, 5).map: A.new(x => *); @b.map: *.x.say; | 23:06 | |
camelia | Cannot resolve caller map(List: A); none of these signatures match: ($: Hash \h, *%_) (\SELF: █; :$label, :$item, *%_) in block <unit> at <tmp> line 1 |
||
23:06
mcmillhj left
|
|||
ghdke | m: class A { has $.x is rw; }; my @b = (1, 2, 3, 4, 5).map: { A.new(x => $_) }; @b.map: *.x.say; | 23:06 | |
camelia | 1 2 3 4 5 |
||
23:08
itaipu left
23:11
khw joined
23:17
mcmillhj joined
23:18
comborico1611 left
23:20
vike left
23:22
mcmillhj left
23:33
mcmillhj joined
|
|||
mr_ron | m: ""~~/<ws>*/ # mwahaha | 23:36 | |
camelia | (timeout) | ||
23:37
pmurias left,
mcmillhj left
23:43
mcmillhj joined
|
|||
ghdke | m: class A { has $.x is rw; }; my @b = (A.new xx 5); (@b.map: *.x) = (1, 2, 3, 4, 5).Seq; @b.map: *.x.say; | 23:43 | |
camelia | Cannot modify an immutable Seq (((Any) (Any) (Any) (...) in block <unit> at <tmp> line 1 |
||
23:44
MasterDuke joined
23:48
mcmillhj left,
dct joined
23:51
MasterDuke left
|
|||
AlexDaniel | mr_ron: yeah, you can do that on any zero-width thingie | 23:51 | |
23:53
mcmillhj joined
23:57
ghdke left
23:58
mcmillhj left
|