»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by masak on 12 May 2015. |
|||
00:00
pierrot left
|
|||
_itz_ | m: my @s = 1,2,3,4; my $foo = @s[0..1, 2..3].join; warn $foo.perl; | 00:04 | |
GLRelia | rakudo-moar 7f8a19: OUTPUT«"1 23 4" in block <unit> at /tmp/k4K4FZAEj1:1» | ||
camelia | rakudo-moar edffe0: OUTPUT«"1234" in block <unit> at /tmp/uwwM3j7RRX:1» | ||
TimToady | hmm, I thought slice lists flattened | 00:16 | |
yoleaux | 22 Aug 2015 14:12Z <nine> TimToady: should the single arg rule really extend to Hashes just because they do Iterable? my @a = {:a(1), :b(2)}; gives [:a(1), :b(2)] and the same happens for sub calls. for %hash {...} and %hash.map iterating over the pairs does asolutely make sense, but when passing a hash to a sub or method, one really expects it to stay a hash. | ||
00:16
AlexDani` left
|
|||
cwDYKARN | hmm nudles greencurry flavor, with choccolate, and BBQ-sticks.... thoughts? ^.- | 00:16 | |
TimToady | .tell nine I don't think the case of initializing an array with a single hash will arise all that often, so I'm willing to leave it as a DIHWIDT for simplicity | 00:18 | |
yoleaux | TimToady: I'll pass your message to nine. | ||
00:25
aborazmeh joined,
aborazmeh left,
aborazmeh joined
00:26
geekosaur left,
virtualsue joined
00:27
slavik joined
00:29
geekosaur joined
00:40
virtualsue left
00:46
llfourn joined
00:51
llfourn left
|
|||
lizmat | m: say (start 42) == (start 42) | 01:14 | |
GLRelia | rakudo-moar 7f8a19: OUTPUT«Cannot call Numeric(Promise: ); none of these signatures match: (Mu:U \v: *%_) in block <unit> at /tmp/iKIQTilqUz:1» | ||
camelia | rakudo-moar edffe0: OUTPUT«Cannot call Numeric(Promise: ); none of these signatures match: (Mu:U \v: *%_) in block <unit> at /tmp/158FSYl4qJ:1» | ||
01:15
llfourn joined
|
|||
lizmat | I wonder whether Promises should coerce to .result.Numeric, so that the above *would* DWIM | 01:15 | |
m: say (start 42).result == (start 42).result | |||
GLRelia | rakudo-moar 7f8a19: OUTPUT«True» | ||
camelia | rakudo-moar edffe0: OUTPUT«True» | ||
01:17
colomon left
01:19
llfourn left
|
|||
ugexe | from-json() gives error 'method ast not found for invocant Str' on glr now when trying to read the ecosystem projects.json | 01:34 | |
from-json("projects.json".IO.slurp) | |||
01:45
BenGoldberg joined
01:46
colomon joined
01:49
vendethiel joined
|
|||
ugexe | m: my $json = q|[{"depends":["a"]}]|; say from-json($json) | 01:49 | |
GLRelia | rakudo-moar 7f8a19: OUTPUT«Method 'ast' not found for invocant of class 'Array' in block <unit> at /tmp/7BmKUjYQ81:1» | ||
camelia | rakudo-moar edffe0: OUTPUT«depends => a» | ||
01:50
skids joined
|
|||
dalek | kudo/nom: ac34880 | lizmat++ | src/core/Promise.pm: Make == eq eqv DWIM on Promises With the emphasis on "I" :-) Inspired by the first Promises slide in jnthn++ last presentation: jnthn.net/papers/2015-yapcasia-concurrency.pdf It occurred to me that the whole slide could be reduced to: sub MAIN($file1, $file2) { say (start from-json(slurp($file1)) eqv (start from-json(slurp($file2))) ?? 'Files contain identical JSON' !! 'Files contain different JSON'; } with these changes. |
01:52 | |
ugexe | m: say from-json(q|{"a": 1}|); say from-json(q|[{"a": 1}]|); | 02:08 | |
camelia | rakudo-moar edffe0: OUTPUT«a => 1a => 1» | ||
GLRelia | rakudo-moar 7f8a19: OUTPUT«a => 1Method 'ast' not found for invocant of class 'Int' in block <unit> at /tmp/3CyHckx9GH:1» | ||
02:08
llfourn joined
02:13
yqt left
02:23
noganex_ joined
02:26
noganex left
02:29
mjgardner left
02:35
mjgardner joined
02:44
amurf joined
02:49
amurf left
03:08
aborazmeh left
03:37
aborazmeh joined,
aborazmeh left,
aborazmeh joined
03:42
abaugher is now known as CailCorishev
03:50
mjgardner left
03:52
MadcapJake left
04:10
mjgardner joined
|
|||
dalek | ast/glr: d507a7d | (David Warring [email@hidden.address] | integration/advent2012-day1 (2 files): further GLR mods for 2012 advent days 13 & 14 |
04:20 | |
04:27
CailCorishev is now known as Cail
|
|||
dalek | kudo/glr: a959024 | moritz++ | src/core/JSON/Pretty.pm: Fix from-json(q|[{"a": 1}]|) |
04:32 | |
rangerprice | Goodbye, a go to sleep | 04:44 | |
i go* | |||
04:44
rangerprice left
04:45
khw left
04:47
aborazmeh left
|
|||
dalek | ast/glr: ee49119 | skids++ | S (7 files): GLR/non-fatal adjustments to some tests. GLRify parts of tests which are not relevant to tested feature. In some cases the test still fails, but now for right reasons. Place code inside try statements which was causing whole-file aborts. Add an XXX GLR note to write specific tests for a known issue. |
04:47 | |
moritz | m: multi f($x) { uc $x }; say <a b c>.map(&f)' │ | 04:55 | |
GLRelia | rakudo-moar a95902: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gBSB0r4N92Two terms in a rowat /tmp/gBSB0r4N92:1------> 3lti f($x) { uc $x }; say <a b c>.map(&f)7⏏5' │ expecting any of: infix infix stopper postfix …» | ||
camelia | rakudo-moar ac3488: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FHQDFdQfw2Two terms in a rowat /tmp/FHQDFdQfw2:1------> 3lti f($x) { uc $x }; say <a b c>.map(&f)7⏏5' │ expecting any of: infix infix stopper postfix …» | ||
moritz | m: multi f($x) { uc $x }; say <a b c>.map(&f)' | ||
GLRelia | rakudo-moar a95902: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8a3iH3J1VcTwo terms in a rowat /tmp/8a3iH3J1Vc:1------> 3lti f($x) { uc $x }; say <a b c>.map(&f)7⏏5' expecting any of: infix infix stopper postfix s…» | ||
camelia | rakudo-moar ac3488: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Dk2D9zsMAETwo terms in a rowat /tmp/Dk2D9zsMAE:1------> 3lti f($x) { uc $x }; say <a b c>.map(&f)7⏏5' expecting any of: infix infix stopper postfix s…» | ||
moritz | m: multi f($x) { uc $x }; say <a b c>.map(&f) | ||
GLRelia | rakudo-moar a95902: OUTPUT«Cannot call f(...); none of these signatures match: ($x) in block <unit> at /tmp/XfwB0_61hS:1» | ||
camelia | rakudo-moar ac3488: OUTPUT«A B C» | ||
JimmyZ | post GLR? so, we must write [[]] as [[],]? | 05:00 | |
dalek | kudo/glr: 212d8f4 | moritz++ | src/core/Any-iterable-methods.pm: map: make it work for multis applies that same heuristic as nom: $count = 1 if $count == Inf || $count == 0; |
05:01 | |
skids | moritz: That sould do the trick. I wonder if any of the other listy functions are n-ary but not just calling .map. | 05:03 | |
JimmyZ: seems to be the case. | 05:05 | ||
ShimmerFairy | JimmyZ: as of now, yes (think of Parcels in pre-GLR, where (1,) made a one-elem Parcel), but I haven't heard from jnthn or anyone if that's the intention | 05:08 | |
05:09
BenGoldberg left
|
|||
JimmyZ | I dont know why [[]] is OK pre-GRL, but know has to be [[],] | 05:11 | |
*now | |||
skids | Both for technical reasons, and because the theory is that the single-item-rule will move some ugliness away from common cases to less common cases. | 05:12 | |
ShimmerFairy | skids: do you know if single-arg is supposed to be applied recursively? (that is, [[[...]]] -> [[...]] -> [...] -> ...) | 05:14 | |
skids | yes, as far as I can tell. | ||
JimmyZ | I think it is no, since we want less flatten | 05:15 | |
skids | I'm pretty sure it is yes -- that is not considered "flattenning" but more like item collapse. | 05:16 | |
flattenning is when inner parens are removed from ((),())-like constructs. | |||
And $ protects against flattenning, but not against collapse. | 05:17 | ||
The only thing that protects against collapse is a listy thing made by a comma (and if you do not supply a brace type for that, () is implied) | 05:18 | ||
ShimmerFairy | I can kinda see the rationale for recursive single-arg; single-arg basically goes for the first thing that can definitely be a list, going into a 1-elem list when there's a chance you didn't mean for it to be wrapped in a list | 05:21 | |
skids | right and anything inside braces itself is an ergument, to the braces. | ||
*argument | |||
05:23
jack_rabbit joined
|
|||
ShimmerFairy | skids: so if I have this right, the thinking is that [[1,2],[3,4]] is clearly an array of arrays, while [[1,2]] could be a one-elem aoa _or_ just one array that's in an extra [] by quirk of execution. Single-arg prefers to think the extra [] is a quirk in that case, if I got it right. | 05:24 | |
I imagine that problem could more likely come up with a 1-elem (stuff), since () is used both for Lists and for grouping parts of expressions. | 05:25 | ||
skids | ShimmerFairy: I think on one level that is considered a possible advantage, but its one candidate of a multi-reason :-) | 05:28 | |
ShimmerFairy | I bet recursive one-arg would probably be best demo'd with something like @a = (gen-a-List()) ; is that surrounding pair of () meant to group the call (perhaps it used to be needed in that statement), or is it meant to make a 1-elem List? Perl 6 thinks you probably didn't mean an outer List there. | 05:30 | |
05:30
kaare_ joined
|
|||
skids greps perl6-all-modules for [[[^[]*]] -- 100 lines almost all of which are not perl6 syntax, in test files, [something[[something]something]], or in rx. | 05:32 | ||
ShimmerFairy | _another_ way to phrase it would be that P6 assumes you were using list brackets just for grouping purposes unless it's got a literal list inside :P | 05:33 | |
m: say [5 + 6] * 2 # I wonder... | 05:34 | ||
GLRelia | rakudo-moar 212d8f: OUTPUT«2» | ||
camelia | rakudo-moar ac3488: OUTPUT«2» | ||
05:35
mjgardner left
|
|||
jdv79 | m: say .uniname for "(", ")", "[", "]", "\{", "}" | 05:45 | |
GLRelia | rakudo-moar 212d8f: OUTPUT«LEFT PARENTHESISRIGHT PARENTHESISLEFT SQUARE BRACKETRIGHT SQUARE BRACKETLEFT CURLY BRACKETRIGHT CURLY BRACKET» | ||
camelia | rakudo-moar ac3488: OUTPUT«LEFT PARENTHESISRIGHT PARENTHESISLEFT SQUARE BRACKETRIGHT SQUARE BRACKETLEFT CURLY BRACKETRIGHT CURLY BRACKET» | ||
jdv79 | do you guys mean parenthesis when you say list bracket or brace? | 05:46 | |
05:49
xinming_ is now known as xinming
|
|||
ShimmerFairy | yeah, I'm using "bracket" in the general sense unless I specify "square bracket" | 05:51 | |
jdv79 | wonder why they aren't just called parenthesis, bracket, and brace? guess unicode doesn't believe is terseness. | 05:53 | |
ShimmerFairy | m: say "<".uniname | 05:56 | |
GLRelia | rakudo-moar 212d8f: OUTPUT«LESS-THAN SIGN» | ||
camelia | rakudo-moar ac3488: OUTPUT«LESS-THAN SIGN» | ||
05:58
xfix joined
|
|||
ShimmerFairy | m: say "〈".uniname | 05:58 | |
GLRelia | rakudo-moar 212d8f: OUTPUT«LEFT ANGLE BRACKET» | ||
camelia | rakudo-moar ac3488: OUTPUT«LEFT ANGLE BRACKET» | ||
ShimmerFairy | jdv79: there are lots of BRACKETs in unicode, it's just by chance that () can be called parens and that {} can be called braces, and that most programmers mean [] when they say "brackets" :) | 05:59 | |
jdv79 | ^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^Hoh right | 06:01 | |
06:22
amurf joined
|
|||
dalek | ast/glr: 000d49b | jdv79++ | S04-statements/if.t: Un-todos for if return - went from Empty to () post-glr. Fixes RT #124577. |
06:26 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=124577 | ||
06:27
amurf left
|
|||
moritz | m: my @a = 1, 2, 3; @a»++ | 06:29 | |
GLRelia | ( no output ) | ||
camelia | ( no output ) | ||
moritz | m: my @a = 1, 2, 3; @a»++; say @a | ||
GLRelia | rakudo-moar 212d8f: OUTPUT«1 2 3» | ||
camelia | rakudo-moar ac3488: OUTPUT«2 3 4» | ||
moritz | nine: ^^ another hyper thingy you might want to investigate | ||
nine: makes S02-lexical-conventions/unspace.t fail | 06:30 | ||
skids | Also has discrete tests in S03-metaops/hyper.t already, good. | 06:33 | |
moritz will be travelling most of the day, without Rakudo access :/ | 06:42 | ||
06:55
xinming left
07:03
leont joined
|
|||
nine | .tell TimToady @a = %h is a mere nuisance. This is the real issue: sub foo(*@a) { say @a.perl }; foo({:a(1), :b(2)}); prints: [:a(1), :b(2)]. This is hurting in real code, e.g. Inline::Perl5. | 07:17 | |
yoleaux | 00:18Z <TimToady> nine: I don't think the case of initializing an array with a single hash will arise all that often, so I'm willing to leave it as a DIHWIDT for simplicity | ||
nine: I'll pass your message to TimToady. | |||
07:18
laben joined
|
|||
ShimmerFairy | doesn't **@a prevent flattening? | 07:19 | |
laben | hello p6'ers | ||
ShimmerFairy | m: sub foo(**@a) { say @a.perl }; foo({a=>1, b=>2}) | 07:21 | |
GLRelia | rakudo-moar 212d8f: OUTPUT«[${:a(1), :b(2)}]» | ||
camelia | rakudo-moar ac3488: OUTPUT«(:a(1), :b(2))» | ||
ShimmerFairy | nine: ^ that would work, if {} ends up still flattening because it's Iterable | ||
laben | m: sub foo(**%a) { %a }; dd foo({ 'a' => 1, 'b' => 2}) | 07:23 | |
GLRelia | rakudo-moar 212d8f: OUTPUT«% = {:a(1), :b(2)}» | ||
camelia | rakudo-moar ac3488: OUTPUT«% = {:a(1), :b(2)}<>» | ||
laben | m: sub foo(*%a) { %a }; dd foo({ 'a' => 1, 'b' => 2}) | ||
GLRelia | rakudo-moar 212d8f: OUTPUT«Too many positionals passed; expected 0 arguments but got 1 in sub foo at /tmp/HKxiH2wT3q:1 in block <unit> at /tmp/HKxiH2wT3q:1» | ||
camelia | rakudo-moar ac3488: OUTPUT«Too many positionals passed; expected 0 arguments but got 1 in sub foo at /tmp/RZ2qRG0x3z:1 in block <unit> at /tmp/RZ2qRG0x3z:1» | ||
moritz | travel& | ||
laben | wait, why doesnt *% work there? | 07:24 | |
ShimmerFairy | *% is for named arguments, not positionals | 07:25 | |
laben | m: sub foo(*%a) { %a }; dd foo('a' => 1, 'b' => 2) | ||
GLRelia | rakudo-moar 212d8f: OUTPUT«Too many positionals passed; expected 0 arguments but got 2 in sub foo at /tmp/qfSlzgGbx_:1 in block <unit> at /tmp/qfSlzgGbx_:1» | ||
camelia | rakudo-moar ac3488: OUTPUT«Too many positionals passed; expected 0 arguments but got 2 in sub foo at /tmp/kzmWHleGOd:1 in block <unit> at /tmp/kzmWHleGOd:1» | ||
laben | m: sub foo(*%a) { %a }; dd foo(:a(1), :b(2)) | 07:26 | |
GLRelia | rakudo-moar 212d8f: OUTPUT«{:a(1), :b(2)}» | ||
camelia | rakudo-moar ac3488: OUTPUT«{:a(1), :b(2)}<>» | ||
masak | morning, #perl6 | 07:28 | |
07:29
bin_005 left,
bin_005 joined
|
|||
skids | just in time for me to say goodnight, masak :-) | 07:32 | |
07:35
skids left
|
|||
masak | goodnight, skids :) | 07:35 | |
07:36
xinming joined
|
|||
ShimmerFairy | masak: I was wondering, could a macro like macro startup { quasi { my $*ABC; my @*DEF; } } ever be used to 'install' variables in a certain location? The idea is that a role or module or something could install the appropriate contextuals (in this example) for the user. (e.g. a role providing extra functions for a grammar could provide <.startup> instead of requiring the user to do :my $*ABC; etc.) | 07:37 | |
07:38
darutoko joined
|
|||
masak | it's a good question. | 07:39 | |
let's pretend you asked it with ordinary lexicals instead of contextuals; it's easier :) | |||
nine | ShimmerFairy: oh, yes, **@a could work for me. Still I'd say it's highly surprising to silently get a hash converted to an array | ||
ShimmerFairy | nine: sure, but in case it doesn't get changed that workaround wouldn't be too annoying (just an extra *) :) | 07:40 | |
masak | the answer is something like "yes, you can install things. but if you do it by name, you have to accept the consequences of being unhygienic." | ||
nine | Amazing work people! While I slept we went down to 132 :) | ||
ShimmerFairy | masak: I specifically ran into this by way of writing my own "role STD" for Perl 6 grammars, that is the worry/sorry/panic stuff. It'd be nice if the person doing my role didn't need to declare @*WORRIES and so on. | 07:41 | |
07:41
kanl left
07:42
kanl joined
|
|||
ShimmerFairy | of course, the role could (or even should?) use role attributes instead of dynamics, but for now I'm fine with just having a kinda-copy of STD's stuff since it's not the main project I'm working on :) | 07:42 | |
masak | ShimmerFairy: if the quasi leaves its own block behind in the mainline (as it currently does), then contextuals are going to be a bit meaningless, because they'll be scoped to that block. | 07:43 | |
nine | m: my @a = 1, 2, 3; @a.map(*++); say @a; | 07:44 | |
GLRelia | rakudo-moar 212d8f: OUTPUT«2 3 4» | ||
camelia | rakudo-moar ac3488: OUTPUT«2 3 4» | ||
nine | m: my @a = 1, 2, 3; @a.map({$_++}); say @a; | ||
GLRelia | rakudo-moar 212d8f: OUTPUT«2 3 4» | ||
camelia | rakudo-moar ac3488: OUTPUT«2 3 4» | ||
nine | m: my @a = 1, 2, 3; @a.map(++*); say @a; | ||
GLRelia | rakudo-moar 212d8f: OUTPUT«2 3 4» | ||
camelia | rakudo-moar ac3488: OUTPUT«2 3 4» | ||
ShimmerFairy | masak: that's specifically why I tried seeing if macros could do it, since I know a more typical sub/method won't cut it :) | ||
masak | ShimmerFairy: I'm not 100% clear yet how we'll do unhygiene. the answer to your question will be part of figuring that out. | 07:46 | |
ShimmerFairy | masak: yeah, it's admittedly not a very common case. I wonder how often there will be extra roles/classes for a grammar+actions setup that would be best served with grammar-level contextuals anyhow :P | 07:48 | |
masak | we'll see :) | ||
you ought to be able to do unconventional stuff with macros. that's the idea. | |||
ShimmerFairy | masak: in a way, my example is asking for specific globals in the user's code, and then also offering a macro that declares them for the user :P | 07:49 | |
masak | aye | 07:51 | |
08:09
rindolf joined
08:10
RabidGravy joined
08:11
amurf joined
08:12
domidumont joined
08:13
virtualsue joined
|
|||
masak | I know of CPAN modules for `slurp`, but is there one for `spurt`? | 08:15 | |
(Perl 5 modules, that is.) | 08:16 | ||
nine | masak: File::Slurp has a write_file function | ||
08:16
amurf left
|
|||
laben | blogs.perl.org/users/leon_timmerman...wrong.html | 08:16 | |
nine | its slurp may be spelled read_file (which is what I use) | ||
08:17
domidumont left
|
|||
masak | oki | 08:18 | |
08:18
domidumont joined
|
|||
nine | laben: thanks! I immediately forwarded this to my team | 08:19 | |
laben | you should thank leont++ | ||
labster | "If your needs are average (which is the case for most people), I'd recommend Path::Tiny." heh. | ||
nine | leont++ # indeed! | ||
leont | :-) | ||
08:20
espadrine joined
|
|||
laben | i found myself satisfied with leont's File::Sluper, but IO::All is amazing when needed | 08:20 | |
dalek | kudo/glr: 93ade89 | (Stefan Seifert)++ | src/core/metaops.pm: Fix my @a = 1, 2, 3; @a>>++; say @a; We need to make unary hyper operators eager. Otherwise code with side effects (like increment or decrement operators) may never actually execute if the resulting List is not further processed. Thanks to moritz++ for golfing this bug! |
08:23 | |
nine | 130/1047 spec test files failing | ||
vendethiel | .oO( nine++ will overflow at this rate ) |
08:24 | |
nine | Well, that's probably my whole contribution for the day. Since I didn't actually go flying yesterday, I really have to take my chance today. May be the last for this year :/ | 08:25 | |
laben | nine: good work! Happy flying and be safe :) | ||
nine | laben: thanks :) | ||
labster | m: Date.new('15555-05-05').say | 08:26 | |
GLRelia | rakudo-moar 212d8f: OUTPUT«Invalid Date string '15555-05-05'; use yyyy-mm-dd instead in block <unit> at /tmp/7VlBQxJ4D5:1» | ||
camelia | rakudo-moar ac3488: OUTPUT«Invalid Date string '15555-05-05'; use yyyy-mm-dd instead in block <unit> at /tmp/ynwvif7aJK:1» | ||
labster | m: Date.new('5555-05-05').later(years => 10000).say | ||
GLRelia | rakudo-moar 212d8f: OUTPUT«15555-05-05» | ||
camelia | rakudo-moar ac3488: OUTPUT«15555-05-05» | ||
labster | I'm somewhat unimpressed with this. | 08:27 | |
nine | laben: may be, but let's face it: this will catch a whole lot of bugs while very few people are going to need to input dates 10000 years hence | 08:28 | |
laben | ? | ||
08:29
KCL_ joined
|
|||
laben | from wiki page of ISO 8601: To represent years before 0000 or after 9999, the standard also permits the expansion of the year representation but only by prior agreement between the sender and the receiver. | 08:29 | |
vendethiel | .oO( Perl 6 received your date and isn't happy with it ) |
||
nine | Well the receiver doesn't agree in this case :) | ||
Because in most cases, such dates are the results of bugs | |||
laben | labster: i dont think it would be a problem to reject > 9999 years in the constructor, given that there is still a way to construct them afterwards | 08:30 | |
nine | laben: oh, sorry for the confusion, tab completion error. I meant labster :) | 08:31 | |
laben | maybe we could say that the error is LTA and it could make a reference to ISO 8601 in that case | ||
ShimmerFairy | Well, the error tells you exactly how to fix the problem (they 'yyyy-mm-dd' part) :) | ||
laben | nine: no problem :) | 08:32 | |
08:32
KCL left
|
|||
laben | ShimmerFairy: yes but we could say why it is invalid | 08:32 | |
labster | m: Date.new(15555, 5, 5).say | 08:33 | |
GLRelia | rakudo-moar 93ade8: OUTPUT«15555-05-05» | ||
camelia | rakudo-moar ac3488: OUTPUT«15555-05-05» | ||
laben | O.o could it be there is no checking... oh well | ||
labster | I think it's the output the bothers me more than the input. | ||
laben | you mean you would like formatted output by default? | 08:34 | |
labster | The input there isn't an ISO 8601 string, so it should be valid (depending on if we have a day of leap seconds or not by then) | ||
ShimmerFairy | labster: ? the last example you ran wasn't an ISO 8601 string and was gladly accepted | ||
08:35
domidumont left
|
|||
labster | m: Date.new(15555, 5, 5).print | 08:35 | |
GLRelia | rakudo-moar 93ade8: OUTPUT«15555-05-05» | ||
camelia | rakudo-moar ac3488: OUTPUT«15555-05-05» | ||
labster | Well, the output looks 8601, but isn't necessarily. | ||
ShimmerFairy | the output still counts under 8601, under the "permits expansion of the year representation" | 08:37 | |
labster | No it doesn't. No sign. | ||
ShimmerFairy | What sign? | ||
labster | Exactly! | ||
An expanded year representation [±YYYYY] must ... be prefixed with a + or − sign | 08:38 | ||
ShimmerFairy | Ah, so the output should be a bit better in that regard. Though by that rule your string-input with the expanded year was rightfully unaccepted :) | 08:39 | |
laben | still, it's quite a nuisance that i cannot freely read that standard. i almost prefer IETF RFC 3339 just for that reason | 08:47 | |
ShimmerFairy | laben: agreed, it's one of my biggest gripes with certain standards bodies. Haven't heard of 3339 though, I'll check it out. | 08:53 | |
labster | That is the nice thing about standards, so many to choose from. | ||
nine | m: my @a = (1, 2, 3); my @b = map { hash("v" => $_, "d" => $_ * 2) }, @a; say @b.perl; | 08:54 | |
GLRelia | rakudo-moar 93ade8: OUTPUT«[${:d(2), :v(1)}, ${:d(4), :v(2)}, ${:d(6), :v(3)}]» | ||
camelia | rakudo-moar ac3488: OUTPUT«[:d(2), :v(1), :d(4), :v(2), :d(6), :v(3)]<>» | ||
laben | it's basically the equivalent but from IETF and free to read | ||
08:54
cognominal left
|
|||
nine | m: my @a = (1, 2, 3); my @b = map { {"v" => $_, "d" => $_ * 2} }, @a; say @b.perl; | 08:55 | |
GLRelia | rakudo-moar 93ade8: OUTPUT«[$(:v(1), :d(2)), $(:v(2), :d(4)), $(:v(3), :d(6))]» | ||
camelia | rakudo-moar ac3488: OUTPUT«[:v(1), :d(2), :v(2), :d(4), :v(3), :d(6)]<>» | ||
ShimmerFairy | laben: yeah, I'll look over RFC 3339 and might consider having Perl 6 officially follow that instead of ISO 8601, on the basis of not letting private standards get precedence :P | 08:56 | |
laben | m: my @a = (1, 2, 3); my @b = map { %("v" => $_, "d" => $_ * 2) }, @a; say @b.perl; | ||
camelia | rakudo-moar ac3488: OUTPUT«[:d(2), :v(1), :d(4), :v(2), :d(6), :v(3)]<>» | ||
GLRelia | rakudo-moar 93ade8: OUTPUT«[${:d(2), :v(1)}, ${:d(4), :v(2)}, ${:d(6), :v(3)}]» | ||
ShimmerFairy | .oO(If a standards body produces a standard, but no-one's allowed to view it, does it make a standard?) |
||
laben | ShimmerFairy: you're allowed, but need to pay | ||
ShimmerFairy | s/view/freely view/ would've been clearer :) | 08:57 | |
labster | I'm not sure why ISO 8601 isn't on the Pirate Bay, everything is supposed to be there :P | ||
ShimmerFairy | (but would've messed with the meter of the original saying) | ||
nine | For many ISO standards one can find drafts online for free. Helped me tremendously when I wrote my master's thesis :) | ||
ShimmerFairy | labster: I recall poking around and finding the floating point standard somewhere once :) | 08:58 | |
laben | whatevs is needed to get out of the annoying imperial mm/dd/yyyy date format | ||
labster | ah yes, we American imperialists want to take over your dates. | 08:59 | |
ShimmerFairy | I use 23 August 2015 myself :) | ||
laben | O.o is it not called imperial while the other is metric? | ||
ShimmerFairy | laben: yes, the opposite of the metric system is imperial, but datetime formats don't count for that :) | 09:00 | |
Just "US" and "European" and so on :) | |||
laben | ShimmerFairy: oh, ok. i thought it was somehow linked to the inch/pound system | 09:01 | |
i did not mean to offend anyone, forgive me | |||
ShimmerFairy | nah, it's just formatting when it comes to datetimes :) | ||
labster | I give laben an inch, and laben takes the whole meter stick. | 09:03 | |
laben | o.o that came out a bit... wrong | 09:04 | |
labster | Anyway, according to RFC 3339, one can use lowercase t and z in ISO 8601. Interesting, didn't know that, and now apparently a bug we have. | 09:05 | |
jdv79 | theres no need for those variances | 09:07 | |
is T and Z a hardship? | |||
TimToady | ugly and visually hard to spot | 09:08 | |
yoleaux | 07:17Z <nine> TimToady: @a = %h is a mere nuisance. This is the real issue: sub foo(*@a) { say @a.perl }; foo({:a(1), :b(2)}); prints: [:a(1), :b(2)]. This is hurting in real code, e.g. Inline::Perl5. | ||
labster didn't write the standard. | |||
TimToady | t would help since it's a shorter letter | ||
jdv79 | i find uppercase more visually attention grabbing since morst text is not butok | 09:10 | |
*most | |||
09:12
telex left
09:14
telex joined
|
|||
labster | Anyway, I'm starting to think that Perl 6 should just make a "prior agreement" with the programmer to accept >4 digit dates and represent everything on the proleptic Gregorian calendar, because it makes no sense to be liberal in what we emit and conservative in what we accept. (Do we have a EULA?) | 09:14 | |
with a sign required in that case | 09:15 | ||
ShimmerFairy | I can see why the RFC would allow for lowercase letters, since they would be easier to see amongst the "uppercase" digits we use :) | 09:17 | |
jdv79 | sure. but aren't most date acceptors in the world using 8601 | 09:18 | |
if we emit non-8601 by default that might cause unfortunate issues | 09:19 | ||
ShimmerFairy | I have a feeling most things accept varying subsets of 8601 by chance, but I'm not sure the percentage of things that specifically set out for 8601 :) | ||
(we don't even accept Duration strings, IIRC) | |||
jdv79 | i have written a few date handlers and they only accept T and Z | ||
labster | jdv79: Then you have only implemented a subset of ISO 8601. | 09:20 | |
masak | please submit a rakudobug about t and z | 09:23 | |
labster | Well, there's a reasonable solution on output, though. Just have a method that checks that the date can produce strict 8601 values (4 digit year, non-fractional time zones), maybe .as-iso-8601, where print and gist are more permissive. | 09:24 | |
09:24
araujo left
|
|||
ShimmerFairy | Note that you can give DateTime your own date formatter if needed :) | 09:24 | |
labster | masak: will do. | 09:25 | |
jdv79 | oh oww | 09:26 | |
09:26
araujo joined
|
|||
jdv79 | *wow | 09:26 | |
09:26
araujo left
09:27
araujo joined
|
|||
jdv79 | i like how the lowercase t and z are not indicated on the wikipedia page or the ISO8601 derived ABNF in rfc3339 | 09:27 | |
jdv79 also abhors non-free standards | |||
ShimmerFairy | I know it's a minor thing, but I think I'd prefer if Perl 6's default was a standard anyone can read (RFC 3339) instead of one you have to pay for or hope wikipedia's got it right (ISO 8601) | 09:28 | |
jdv79 | yeah yeah, that's fine | ||
i have very little love for 8601 in general. its too mushy and varied and doesn't cover some cases well. | 09:29 | ||
kinda like oauth 2. too many cooks in the kitchen; some lacking the wisdom to be allowed in the kitchen | 09:30 | ||
laben | you consider it minor just because date-time parsing is not an usual use-case. if you had the same situation in parsing a file or something like that, an army of pitchforks would be out | 09:31 | |
ShimmerFairy | taking a quick peek at the ABNF, I still say BNF syntax is ugly and hard to read, and that P6 regexes and grammars are much better :P | ||
labster | ShimmerFairy: I'm not opposed to RFC 3339, I just would like to support dates outside of 0000 .. 9999 | 09:32 | |
vendethiel | jnthn: isn't there a race condition in jnthn.net/papers/2015-yapcasia-concurrency.pdf slide 59 for the "unless"? | ||
ShimmerFairy | sure, I don't see why not (since you can pass years larger/smaller than that to the non-string-parsing versions) | ||
jdv79: note though that the ABNF in the RFC is specifically an attempt to create a grammar for 8601, not necessarily whatever extensions the RFC provides (e.g. 't' and 'z') :) | 09:33 | ||
labster | Actually it's the grammar providing the extensions. | 09:34 | |
jdv79 | huh | 09:35 | |
"Appendix A contains an attempt to translate the complete syntax of ISO 8601 into ABNF" | |||
i guess "attempt" gives a hint | 09:36 | ||
though complete is a rather specific word:) | |||
vendethiel | .ask jnthn isn't there a race condition in jnthn.net/papers/2015-yapcasia-concurrency.pdf slide 59 for the "unless"? | ||
yoleaux | vendethiel: I'll pass your message to jnthn. | ||
jdv79 | haha | ||
09:36
leont left
|
|||
jdv79 | lame all around | 09:36 | |
ShimmerFairy | jdv79: actually, it appears that ABNF grammars tend to prefer case insensitivity, so just imagine :i adverbs on all the rules :P | 09:37 | |
09:40
cognominal joined
|
|||
jdv79 | oh. look at that. that explains a few things i've noticed with them. | 09:41 | |
jdv79 should read the whole standard | 09:42 | ||
09:43
diana_olhovik_ joined
|
|||
ShimmerFairy | me too, then I'll be able to comment more effectively on whether we should use it :) | 09:43 | |
laben | how do we differentiate lazy-but-finite and lazy-and-infinite in Seq/List/Array etc? | ||
jdv79 | that's an unfortunate aspect though. when i see "asdf" in a doc i think "asdf" not "[aA][sS][dD][fF]" | 09:44 | |
ShimmerFairy | There's a value in making you specify :i :) | ||
jdv79 | laben: what does that even mean? | 09:45 | |
laben | jdv79: .map on a finite list produces a Seq, which is lazy but will be finite anyway | ||
ShimmerFairy | $file.lines() vs. 1..* , for example | ||
laben | jdv79: instead .map on a infinite list produces a Seq but it will be infinite | 09:46 | |
jdv79 | what i meant to ask was why is that distinction necessary. sorry. | ||
09:47
cognominal left
|
|||
laben | it is IMO for hypers which are eager -> cannot work well with infinites but still do work on lazy-finite | 09:47 | |
being eager, they pull everything, which is too much if Inf, but not too much if finite, wheter lazy or not | 09:48 | ||
09:49
bin_005 left
09:50
Begi joined
|
|||
labster | ok, good night everyone | 09:51 | |
Begi | Is the HTTP::Client module doesn't support the https protocol ? What can I use ? | 09:53 | |
laben | Begi: did you try LWP::Simple? | 09:54 | |
Begi | laben : not yet, I'll take a look | ||
09:54
domidumont joined
|
|||
jdv79 | HTTP::UserAgent may work | 09:55 | |
install IO::Socket::SSL too though | 09:56 | ||
09:57
bin_005 joined
09:58
cognominal joined
09:59
domidumont left
|
|||
Begi | jdv79: currently , it works with Lwp :: Simple | 10:02 | |
jdv79 | nice | ||
10:04
xinming left
10:05
xinming joined
10:27
salva joined
10:29
Begi left
10:37
bin_005 left
|
|||
jdv79 | m: my @a = 1, (if 0 {2}), 3;@a.perl.say; # seems legit on glr | 10:37 | |
GLRelia | rakudo-moar 93ade8: OUTPUT«[1, 3]» | ||
camelia | rakudo-moar ac3488: OUTPUT«[1, 3]<>» | ||
jdv79 | m: my @a = 1, (0 ?? 2 !! ()), 3;@a.perl.say; # what now? | 10:38 | |
GLRelia | rakudo-moar 93ade8: OUTPUT«[1, $(), 3]» | ||
camelia | rakudo-moar ac3488: OUTPUT«[1, 3]<>» | ||
jdv79 | shouldn't that be the same as the if example? | ||
ShimmerFairy | nope, you returned an empty List in the second one | 10:40 | |
jdv79 | so what is if returning then? | 10:41 | |
ShimmerFairy | m: say (if 0 {2}).perl | 10:42 | |
GLRelia | rakudo-moar 93ade8: OUTPUT«()» | ||
camelia | rakudo-moar ac3488: OUTPUT«Empty» | ||
10:42
diana_olhovik_ left
|
|||
laben | m: (if 0 {2}).WHAT.say | 10:42 | |
camelia | rakudo-moar ac3488: OUTPUT«Empty» | ||
GLRelia | rakudo-moar 93ade8: OUTPUT«(Slip)» | ||
jdv79 | is the () from the if or the visible () there? | ||
ah | 10:43 | ||
laben | m: (do if 0 {2}).WHAT.say | ||
GLRelia | rakudo-moar 93ade8: OUTPUT«(Slip)» | ||
camelia | rakudo-moar ac3488: OUTPUT«Empty» | ||
ShimmerFairy | m: say (0 ?? 2 !! ()).WHAT | 10:44 | |
GLRelia | rakudo-moar 93ade8: OUTPUT«(List)» | ||
camelia | rakudo-moar ac3488: OUTPUT«(Parcel)» | ||
ShimmerFairy | Slip could use a better .gist methinks :) | ||
laben | m: say (0 ?? 2).WHAT | ||
GLRelia | rakudo-moar 93ade8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/h8tux4t3Z7Unexpected closing bracketat /tmp/h8tux4t3Z7:1------> 3say (0 ?? 27⏏5).WHAT» | ||
camelia | rakudo-moar ac3488: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1YKCr1pGzEUnexpected closing bracketat /tmp/1YKCr1pGzE:1------> 3say (0 ?? 27⏏5).WHAT» | ||
jdv79 | so those are correct? if so i'll just fix up the relevant test files. | ||
laben | dumb me, that's the ternary op | ||
jdv79 | seems close enough | ||
laben | pre-glr the empty list got flattened away, now it doesnt | 10:45 | |
m: say (0 ?? 2 !! slip()).WHAT | |||
GLRelia | rakudo-moar 93ade8: OUTPUT«(Slip)» | ||
camelia | rakudo-moar ac3488: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rDpVj6hO7nUndeclared routine: slip used at line 1. Did you mean 'flip'?» | ||
ShimmerFairy | jdv79: for the ternary, you should write (0 ?? 2 !! ().Slip) (or |() ) to get the same behavior | 10:46 | |
laben | m: my @a = 1, (0 ?? 2 !! slip()), 3;@a.perl.say; # what now? | ||
jdv79 | cool | ||
GLRelia | rakudo-moar 93ade8: OUTPUT«[1, 3]» | ||
camelia | rakudo-moar ac3488: OUTPUT«5===SORRY!5=== Error while compiling /tmp/La8dmXeYgkUndeclared routine: slip used at line 1. Did you mean 'flip'?» | ||
dalek | ast/glr: 5b958fe | jdv79++ | S04-statement-modifiers/if.t: Adjust for glr by returning slip() instead of (). |
10:54 | |
jdv79 | ugh, pause is a rabbithole. i was hoping to catch a break. seems it'll be a slog. | 10:55 | |
but lunch& | |||
vendethiel | jnthn++ # nice talk | 11:11 | |
11:19
virtualsue left
11:25
brrt joined
11:32
BenGoldberg joined
11:33
[Sno] left
|
|||
brrt | yes, jnthn++ for an awesome and inspiring talk | 11:33 | |
11:38
FROGGS_ joined
11:40
[Sno] joined
11:41
cognominal left
11:42
FROGGS left,
rindolf left
11:49
amurf joined
11:50
Cail left,
Cail joined
11:52
[Sno] left
11:53
amurf left
12:07
rindolf joined
12:10
TEttinger left
|
|||
masak | vendethiel, brrt: waitwait, neither of you are in YAPC::Asia. is there a video somewhere? | 12:14 | |
brrt | slides | 12:15 | |
not sure if a video is online | |||
but the slides themselves are quite isnpiring :-) | |||
in the sense of 'wait, perl6 is *cool*' | |||
masak | jnthn.net/papers/2015-yapcasia-concurrency.pdf ? | 12:16 | |
brrt | aye | ||
masak | "You get one goto a month!" :P | 12:17 | |
brrt | we use them sparingly | 12:18 | |
actually, i get as many gotos as i like, but my case is special | 12:19 | ||
and they're generated goto's, not hand-written | |||
masak | can you `start` something in one thread and `await` it in another? | 12:20 | |
brrt: in a way, `if`s and `while`s are also generated `goto`s. | 12:21 | ||
brrt | masak: i think you can | ||
yeah, of course. it's just i'm doing the generating and seeing them in action | 12:22 | ||
12:25
liztormato joined
12:26
Cail left,
Cail joined
12:27
Cail left
|
|||
liztormato | m: say ( 0 ?? 42 !! |() ).WHAT | 12:27 | |
GLRelia | rakudo-moar 93ade8: OUTPUT«(Slip)» | ||
camelia | rakudo-moar ac3488: OUTPUT«5===SORRY!5=== Error while compiling /tmp/5dkdQwboQrArg-flattening | is only valid in an argument listat /tmp/5dkdQwboQr:1------> 3say ( 0 ?? 42 !! |7⏏5() ).WHAT» | ||
liztormato | 1m: say ( 0 ?? 42 !! |() ).perl | 12:28 | |
1m: say ( 0 ?? 42 !! |() ).perl | 12:29 | ||
ShimmerFairy | m: say "that you're both still alive" | 12:30 | |
GLRelia | rakudo-moar 93ade8: OUTPUT«that you're both still alive» | ||
camelia | rakudo-moar ac3488: OUTPUT«that you're both still alive» | ||
ShimmerFairy | weird | ||
laben | m: say (0?? 42 !! slip()).perl | 12:31 | |
GLRelia | rakudo-moar 93ade8: OUTPUT«()» | ||
camelia | rakudo-moar ac3488: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PBtQO5AZQIUndeclared routine: slip used at line 1. Did you mean 'flip'?» | ||
laben | m: say (0?? 42 !! |()).perl | ||
GLRelia | rakudo-moar 93ade8: OUTPUT«()» | ||
camelia | rakudo-moar ac3488: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CsgClx8c12Arg-flattening | is only valid in an argument listat /tmp/CsgClx8c12:1------> 3say (0?? 42 !! |7⏏5()).perl» | ||
vendethiel | masak: I'm sure you didn't mean me there ;-) | 12:32 | |
liztormato | masak: I have shot a video but it's currently HD and 5G | ||
vendethiel | masak: actually I misread. Well, I just found it in the clog (like you did) | ||
brrt | liztormato: if you can upload it somewhere, there's probably a volunteer ready to transcode it | 12:33 | |
liztormato | Need to post process to something downloadable | ||
brrt | ffmpeg? :-) | ||
liztormato | Yeah. | ||
Never used the ffmpeg CLI before, but I guess I can find out about arguments online | 12:34 | ||
ShimmerFairy | Interesting, I've only ever used ffmpeg on commandline :) | 12:35 | |
brrt | i'm quite familiar with the ffmpeg command line | 12:36 | |
if you have it installed i can guide you through | |||
masak | liztormato: 's ok. I'm currently enjoying the slides. :) | ||
12:38
Timbus joined
|
|||
vendethiel | ShimmerFairy: you never used VLC? :P | 12:39 | |
liztormato | Should be able to do it in 36 hours or so | 12:40 | |
laben | mpv for the win | ||
ShimmerFairy | vendethiel: when I say 'ffmpeg', I'm specifically referring to the converter, not ffplay or whatever uses FFMPEG to _play_ things :) | ||
vendethiel | *g* | ||
masak | how implemented is `whenever`? | 12:41 | |
m: supply { whenever {} } | |||
camelia | rakudo-moar ac3488: OUTPUT«5===SORRY!5===Expression needs parens to avoid gobbling blockat /tmp/uvg0IRJUMx:1------> 3supply { whenever {}7⏏5 }Missing block (apparently taken by expression)at /tmp/uvg0IRJUMx:1------> 3supply { whenever {} 7⏏5}» | ||
GLRelia | rakudo-moar 93ade8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yk37Wb0mBoUndeclared routines: supply used at line 1 whenever used at line 1» | ||
masak | aha. thought I had missed something big there :) | ||
jnthn doesn't show NYI stuff all that often, so I was willing to assume it had been implemented already :) | 12:42 | ||
BenGoldberg | m: (|()).perl.say | ||
GLRelia | rakudo-moar 93ade8: OUTPUT«()» | ||
camelia | rakudo-moar ac3488: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KI_B68xy1DArg-flattening | is only valid in an argument listat /tmp/KI_B68xy1D:1------> 3(|7⏏5()).perl.say» | ||
ShimmerFairy | masak: if a concurrency talk wasn't out-of-order with the implementation, I' | ||
d have some serious questions :P | |||
masak | "Passengers checking in for a flight at the same time must not be able to choose the same seat!" # jnthn and I have joked about trying this many times, but never really got around to it | 12:43 | |
ShimmerFairy: you know it's not *mandated* for a talk to confuse use and mention, right? :P | |||
jnthn++ # jnthn.net/papers/2015-yapcasia-concurrency.pdf | 12:45 | ||
liztormato | masak: whenever lives in nom afaik. . .race lives in glr | 12:49 | |
ShimmerFairy | m: use nqp; my @a := nqp::list() | ||
GLRelia | rakudo-moar 93ade8: OUTPUT«Type check failed in binding; expected 'Positional' but got 'List' in block <unit> at /tmp/6i_tBE3ilw:1» | ||
camelia | rakudo-moar ac3488: OUTPUT«Type check failed in binding; expected 'Positional' but got 'Parcel' in block <unit> at /tmp/gWryi2ag_v:1» | ||
ShimmerFairy | m: use nqp; my token T { :my @a := nqp::list(); } | ||
GLRelia | ( no output ) | ||
camelia | ( no output ) | ||
ShimmerFairy | I'm guessing it works in a grammar because the regex code lives in NQP? :) | ||
12:56
diana_olhovik_ joined
|
|||
masak | m: my @a = 1, 2, 3; my $s = supply { whenever @a -> $n { emit $n } }; $s.tap({ say "It's $^n!" }) | 12:56 | |
GLRelia | rakudo-moar 93ade8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/I5_lFX28RiUnexpected block in infix position (missing statement control word before the expression?)at /tmp/I5_lFX28Ri:1------> 3 = 1, 2, 3; my $s = supply { whenever @a7⏏5 -> $n { emit $n } }; $s…» | ||
camelia | rakudo-moar ac3488: OUTPUT«5===SORRY!5=== Error while compiling /tmp/V25ei2Od6nUndeclared routine: emit used at line 1. Did you mean 'exit'?» | ||
masak | hm. | 12:57 | |
m: my @a = 1, 2, 3; my $s = supply { whenever @a -> $n { say "It's $n!" } } | |||
GLRelia | rakudo-moar 93ade8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CIIKrBA9iTUnexpected block in infix position (missing statement control word before the expression?)at /tmp/CIIKrBA9iT:1------> 3 = 1, 2, 3; my $s = supply { whenever @a7⏏5 -> $n { say "It's $n!" …» | ||
camelia | ( no output ) | ||
13:09
khw joined
13:14
rmgk_ joined,
rmgk left,
rmgk_ is now known as rmgk
13:21
brrt left
13:23
yqt joined
13:25
liztormato left
13:31
aborazmeh joined,
aborazmeh left,
aborazmeh joined
13:48
Ven joined
13:54
zakharyas joined
|
|||
masak | m: say Date.new(2015, 1, 31).later(:1month) | 13:55 | |
GLRelia | rakudo-moar 93ade8: OUTPUT«day of 2015/2 out of range. Is: 31, should be in 1..28 in block <unit> at /tmp/3PKIjbTajg:1» | ||
camelia | rakudo-moar ac3488: OUTPUT«day of 2015/2 out of range. Is: 31, should be in 1..28 in block <unit> at /tmp/LVnRjh9E9X:1» | ||
masak | do we want this to work? | ||
laben | probably, but how do you define "a month later"? | 13:57 | |
masak | one possible definition is: start of next month + current number of days in. | ||
mostly asking: do we want that? | |||
m: say Date.new(2015, 2, 3).later(:1month) | 13:58 | ||
camelia | rakudo-moar ac3488: OUTPUT«2015-03-03» | ||
GLRelia | rakudo-moar 93ade8: OUTPUT«2015-03-03» | ||
Zoffix | The ambiguity on the definition would likely cause problems | ||
laben | maybe it's better for consistency to not provide a month option and only days | ||
masak | presumably, there'd be some overlap, and Date.new(2015, 1, 31).later(:1month) would come out to the same as the above. | ||
laben: I think a month option is quite nice (and natural) to have. | |||
laben: but the question is how we handle "month skew" | 13:59 | ||
what's Least Surprise here? and what's least likely to burn people and least likely to have them hate us? :) | |||
ShimmerFairy | masak: I could see your definition, but I also think "one month later" or "three months later" is not a granular phrase in English, so one might expect the day value be clamped as needed. | ||
*are not granular phrases | 14:00 | ||
masak | here's another possibility: if we ever overflow (like we did above), just place us on the 1st of the next month. | ||
laben | checking what other languages do? like python. let's see if it makes sense | ||
masak | remember, .later and .earlier are already a "fix" or improvement on CPAN's DateTime::Duration | 14:01 | |
ShimmerFairy | how so? | ||
masak | which has some bad failure modes. notably, it adds the components of the duration in an unexpected order. | ||
and there's not really a "right" order when one starts to think about it. | |||
and so .later and .earlier forces you to consider the order yourself, in your program. | |||
all you can do with them is add individual components. | 14:02 | ||
I think I don't like the current error, because "one month later" doesn't feel like an operation that should fail :/ | 14:03 | ||
ShimmerFairy | masak: I personally think the :month adverb on .later and .earlier should probably mimic the non-granularity of the equivalent phrases in English; that is, get the month right, fudge the day if needed :) | ||
masak | anyone against us making "one month later than Jan 31st" Mar 1st? | ||
ShimmerFairy: right, agree. | |||
ShimmerFairy: we basically "round up" until we get a valid date again. | 14:04 | ||
ShimmerFairy | masak: After all, even on my birthday I would probably mean February if I said "next month". And my birthday is 31 Jan :) | ||
masak | "next month" isn't exactly the same thing as "one month later". but point taken. :) | ||
let me run spectests and attempt the change. | |||
are people committing to nom currently? I know there's a glr thing going on... | 14:05 | ||
laben | as far as python goes, timedelta (the object they use for durations) goes up to weeks, but no months | ||
ShimmerFairy | masak: I would personally adjust the month appropriately, and then clamp the day value to the new month's range. Feels most natural to me. | ||
masak: I'm doing my work against nom, since I'm not doing GLR-related things. But there's definitely more activity on glr these days :) | |||
masak | laben: aw, they don't do years? | 14:06 | |
laben | masak: nope | ||
masak | ShimmerFairy: more activity, but no ban against committing on nom? | ||
laben | just checked for py2 and py3 | ||
ShimmerFairy | masak: To be fair, everything after weeks is, strictly speaking, irregular :P | ||
moritz back home after three weeks travel | |||
ShimmerFairy | No, certainly no policy against committing to nom | ||
masak | moritz! \o/ | ||
ShimmerFairy: years are irregular, but easlier to count with than months :) | 14:07 | ||
laben | bah, they could have added years just as easily. i think they didnt to not highlight the missing month option | ||
or maybe they have some trudgery going on with leap years | |||
masak | well, theirs is the "safe" option, for sure. | ||
laben | yeah, i guess you wouldnt really be faulted if the core Date object was as "safe" and maybe provide the rest with a module | 14:08 | |
either way, just need to mkae sure it's documented and understandable | 14:09 | ||
make* | |||
ShimmerFairy | masak: btw, in case you missed it, there was talk of making Perl 6 technically follow RFC 3339 as opposed to ISO 8601, for the sake of using a standard you don't need to pay money to read :) | 14:10 | |
moritz | how different are RFC 3339 and ISO 8601 | 14:14 | |
? | |||
14:15
FROGGS_ is now known as FROGGS
|
|||
FROGGS | o/ | 14:15 | |
moritz | FR\OGGS | ||
ShimmerFairy | Not very, AFAIK. You can use lowercase letters instead, for example (2015-12-25t00:00:00z for example) | ||
It also allows -00:00 as an offset meaning "timezone unknown/unimportant", where ISO 8601 forbids "-00:00" as an offset. | 14:16 | ||
link to rfc: tools.ietf.org/html/rfc3339 | 14:17 | ||
dalek | ast/glr: 3a4034c | moritz++ | rosettacode/sierpinski_triangle.t: Explicitly flatten in Sierpinski triangle |
14:19 | |
14:20
virtualsue joined
14:22
aborazmeh left
|
|||
laben | =.= in a way ietf is similar to w3c, they like recursion and eating dog food. they have an rfc (2026) to describe how to do rfc (and other docs) | 14:22 | |
dalek | ast/glr: 7516075 | moritz++ | integration/advent2012-day10.t: Avoid a test erroring out |
14:25 | |
14:26
virtualsue left
14:34
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
moritz | m: say map { $_ * 2 }, ^4 | 14:38 | |
GLRelia | rakudo-moar 93ade8: OUTPUT«0 2 4 6» | ||
camelia | rakudo-moar ac3488: OUTPUT«0 2 4 6» | ||
14:39
virtualsue joined,
virtualsue left
|
|||
moritz | m: my %r=(^8)>>.fmt("%03b") Z (0,1,1,1,1,0,0,0);; say %r.perl | 14:39 | |
GLRelia | rakudo-moar 93ade8: OUTPUT«{"000 0" => $("001", 1), "010 1" => $("011", 1), "100 1" => $("101", 0), "110 0" => $("111", 0)}» | ||
camelia | rakudo-moar ac3488: OUTPUT«{"000" => 0, "001" => 1, "010" => 1, "011" => 1, "100" => 1, "101" => 0, "110" => 0, "111" => 0}<>» | ||
FROGGS | m: say grep-index(Int, 2, [], 4, [], 5) | ||
GLRelia | rakudo-moar 93ade8: OUTPUT«0 1 2» | ||
camelia | rakudo-moar ac3488: OUTPUT«0 2 4» | ||
moritz | m: my %r=(^8)>>.fmt("%03b") Z=> (0,1,1,1,1,0,0,0);; say %r.perl | 14:40 | |
camelia | rakudo-moar ac3488: OUTPUT«{"000" => 0, "001" => 1, "010" => 1, "011" => 1, "100" => 1, "101" => 0, "110" => 0, "111" => 0}<>» | ||
GLRelia | rakudo-moar 93ade8: OUTPUT«{"000" => 0, "001" => 1, "010" => 1, "011" => 1, "100" => 1, "101" => 0, "110" => 0, "111" => 0}» | ||
FROGGS | m: sub foo(*@v) { say @v.perl }; foo(1, [], 2, []) | 14:41 | |
GLRelia | rakudo-moar 93ade8: OUTPUT«[1, 2]» | ||
camelia | rakudo-moar ac3488: OUTPUT«[1, [], 2, []]<>» | ||
FROGGS | m: sub foo(**@v) { say @v.perl }; foo(1, [], 2, []) | ||
GLRelia | rakudo-moar 93ade8: OUTPUT«[1, $[], 2, $[]]» | ||
camelia | rakudo-moar ac3488: OUTPUT«(1; ; 2; )» | ||
14:42
aborazmeh left
|
|||
dalek | ast/glr: bdb37bb | moritz++ | integration/advent2009-day23.t: Fix Christmas Tree |
14:42 | |
14:42
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
rindolf left
|
|||
laben | moritz: in the dwimmy hyper code, it checks if the last elem of a list is a Whatever. i couldnt find it in the S03, what does it mean? | 14:44 | |
moritz | laben: iirc it's for auto-extending that list somehow | ||
laben | but isn't that done with the dwimmy pointing of the hyper? | 14:45 | |
i mean, the difference between >>op<< and >>op>> | |||
moritz | S03 says "For any kind of zip or dwimmy hyper operator, any list ending with * is assumed to be infinitely extensible by taking its final element and replicating it:" | ||
14:45
Ven left,
rindolf joined
|
|||
laben | moritz: which line is it? couldn find it | 14:45 | |
moritz | laben: dunno, I used the website :-) | 14:46 | |
laben | ok i found it, thanks | ||
it was the last paragraph, which i unwittingly skipped | 14:47 | ||
FROGGS | m: say grep-index(Int, 2, [], 4, [], 5) # moritz: can you tell me which one is correct? | 14:49 | |
GLRelia | rakudo-moar 93ade8: OUTPUT«0 1 2» | ||
camelia | rakudo-moar ac3488: OUTPUT«0 2 4» | ||
FROGGS | I really dunno what to expect nowadays | ||
14:50
cwDYKARN left
|
|||
moritz | m: say [Int, 2, [], 4, [], 5].perl | 14:51 | |
camelia | rakudo-moar ac3488: OUTPUT«[Int, 2, [], 4, [], 5]» | ||
GLRelia | rakudo-moar 93ade8: OUTPUT«[Int, 2, $[], 4, $[], 5]» | ||
moritz | m: for Int, 2, [], 4, [], 5 { say .perl } | ||
GLRelia | rakudo-moar 93ade8: OUTPUT«Int2[]4[]5» | ||
camelia | rakudo-moar ac3488: OUTPUT«Int2[]4[]5» | ||
FROGGS | so the old code? | ||
moritz | FROGGS: looks like it to me | ||
FROGGS | kthx | ||
moritz | FROGGS: but I'm not entirely sure either :( | ||
14:55
aborazmeh left
14:56
colomon left
|
|||
dalek | kudo/glr: 59dc4ae | FROGGS++ | src/core/Any-iterable-methods.pm: make sub grep-index not swallow empty arrays |
14:58 | |
14:58
aborazmeh joined,
aborazmeh left,
aborazmeh joined
14:59
colomon joined
|
|||
lizmat | FROGGS: shouldn't that also be done for the other subs like first? | 15:02 | |
FROGGS++ by the way :-) | 15:03 | ||
anyway, I'll test that | |||
FROGGS | lizmat: well, I just look at the test fallout... | ||
15:04
colomon left
|
|||
b2gills | .tell jnthn I think there could be a way to ask a sequence generator how many items it would produce if fully iterated ( remove `.infinite` ) 「(1..1000).will-produce == 1000」 「(gather {...}).will-produce === Int | Mu」 「(gather {...} :will-produce(100)).will-produce == 100」 (that last one will work without a grammar change, as it already does work for :infinite ) There should be no guarantees that the value will always be accurat | 15:05 | |
yoleaux | b2gills: I'll pass your message to jnthn. | ||
JimmyZ | moritz: I think github.com/perl6/roast/commit/75160753eb is wrong | ||
moritz: lizmat++ it has another deep problem | 15:06 | ||
s/it/said/ | |||
*said it | |||
moritz: irclog.perlgeek.de/perl6/2015-08-20#i_11086121 | 15:08 | ||
b2gills | I think there is a problem here: github.com/rakudo/rakudo/commit/05e46f5774 「$!i <= $!e」 should probably use 「!after」 instead of 「<=」 because Range is used for strings as well as numbers ( just checked is still a problem on latest ) String ranges should be their own class really | 15:10 | |
lizmat | m: ("a".."z").slip.say | ||
GLRelia | rakudo-moar 59dc4a: OUTPUT«Method 'slip' not found for invocant of class 'Range' in block <unit> at /tmp/_YKluDFwe5:1» | ||
camelia | rakudo-moar ac3488: OUTPUT«Method 'slip' not found for invocant of class 'Range' in block <unit> at /tmp/csgO61TyQW:1» | ||
laben | m: dd 'a'..'c' | ||
GLRelia | rakudo-moar 59dc4a: OUTPUT«"a".."c"» | 15:11 | |
camelia | rakudo-moar ac3488: OUTPUT«"a".."c"» | ||
lizmat | m: ("a".."z").Slip.say | ||
camelia | rakudo-moar ac3488: OUTPUT«Method 'Slip' not found for invocant of class 'Range' in block <unit> at /tmp/PDVJ8wOSVn:1» | ||
GLRelia | rakudo-moar 59dc4a: OUTPUT«a b c d e f g h i j k l m n o p q r s t u v w x y z» | ||
laben | m: dd ['a'..'c'] | ||
camelia | rakudo-moar ac3488: OUTPUT«$ = ["a", "b", "c"]» | ||
GLRelia | rakudo-moar 59dc4a: OUTPUT«["a", "b", "c"]» | ||
lizmat | b2gills: yet it seems to work, or is another candidate taking care of this? | ||
laben | m: dd slip('a'..'d') | 15:12 | |
GLRelia | rakudo-moar 59dc4a: OUTPUT«("a".."d")» | ||
camelia | rakudo-moar ac3488: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Lftv8h0vZPUndeclared routine: slip used at line 1. Did you mean 'flip'?» | ||
laben | m: dd ('a'..'d').Slip | ||
GLRelia | rakudo-moar 59dc4a: OUTPUT«("a", "b", "c", "d")» | ||
camelia | rakudo-moar ac3488: OUTPUT«Method 'Slip' not found for invocant of class 'Range' in block <unit> at /tmp/xrLIlZbgHx:1» | ||
b2gills | I'm backlogging, I was helping my brother demolish a kitchen which he is renovating so I was definitely AFK. | 15:14 | |
moritz | lizmat, JimmyZ: I find .lines returning Seq very intuitive | 15:23 | |
FROGGS | should .FOR still exists? | 15:24 | |
JimmyZ | moritz: irclog.perlgeek.de/perl6/2015-08-20#i_11086136 | 15:25 | |
moritz | JimmyZ: I don't see how that relates to .lines returning a Seq | 15:26 | |
JimmyZ | moritz: split the $input and @result to two 'my' won't return a Seq | ||
moritz | JimmyZ: even then I *still* don't see what's wrong with my spectest patch | 15:27 | |
15:27
yqt left
|
|||
JimmyZ | moritz: gist.github.com/zhuomingliang/1129...e5a96306b4 # this patch make the test pass, but hide the problem | 15:28 | |
moritz | JimmyZ: let me get this straight... | 15:30 | |
masak | ShimmerFairy: I did miss that. thank you for bringing it to my attention. | ||
moritz | JimmyZ: you're saying neither your nor my patch should be needed; assigning a Seq to an @array variable should automatically coerce and thus memoize the sequence | ||
masak | ShimmerFairy: to the extent those two standards are not wildly different (e.g. upper-case vs lower-case is OK), I'm fine with it and think it could be a good idea. open standards FTW. | 15:31 | |
moritz | JimmyZ: and it works right now for direct assignment, but not for the my ($thing, @array) = ... case | ||
JimmyZ: correct? | |||
JimmyZ | moritz: yeah | ||
moritz | JimmyZ: ok. Then I think we should have a dedicated test for that with an appropriate description | ||
ShimmerFairy | masak: yeah, on a skim of the standard, the only thing the RFC _disallows_ is an hour of '24', limiting the range to 00..23 to avoid potential issues of confusion. | ||
moritz | JimmyZ: and I'll ad done later if I can remember, and have the mental capacity | 15:32 | |
*add | |||
laben | m: my \a = (1,2,3).map(*.Str); a.WHAT.say; my @b = a; @b.WHAT.say | ||
GLRelia | rakudo-moar 59dc4a: OUTPUT«(Seq)(Array)» | ||
camelia | rakudo-moar ac3488: OUTPUT«(List)(Array)» | ||
ShimmerFairy | masak: and for the :1month thing, there could always be a :precisely adverb that doesn't toss any overflow :) | ||
laben | m: my \a = (1,2,3).map(*.Str); a.WHAT.say; dd a; my @b = a; @b.WHAT.say; dd @b | ||
GLRelia | rakudo-moar 59dc4a: OUTPUT«(Seq)("1", "2", "3").iteratorThis Seq has already been iterated, and its values consumed in block <unit> at /tmp/iv6NUPGHma:1» | ||
camelia | rakudo-moar ac3488: OUTPUT«(List)("1", "2", "3")(Array)@b = ["1", "2", "3"]<>» | ||
15:33
[Sno] joined
|
|||
laben | oh, gosh. again with .perl consuming the Seq | 15:33 | |
JimmyZ | moritz: irclog.perlgeek.de/perl6/2015-08-20#i_11086139 #there was one , I just don't know where it should be | 15:34 | |
moritz | S32-list/seq.t | 15:37 | |
15:38
aborazmeh left
15:39
aborazmeh joined
15:40
aborazmeh left,
aborazmeh joined
|
|||
masak | ShimmerFairy: installing a named parameter there feels a bit like the let's-make-it-configurable trap. | 15:43 | |
ShimmerFairy: put differently, I don't really see a use case. people tend to usually mean "roughly one month later" and not think about the implications so much. | 15:44 | ||
spectesting a patch now. | |||
ShimmerFairy | fair enough. The only other place I can see that being useful would be February 29th with :year[s] :) | ||
15:47
aborazmeh left
15:49
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
masak | ShimmerFairy: February 29th either is a valid date in the year, or it isn't. no adverb will change that. :) | 15:50 | |
ShimmerFairy | masak: I mean (Feb 29).later(:1year) . Does that go precisely go 365 days later, or stay in February? :) | 15:51 | |
b2gills | (Feb 29).later(:400year) | 15:52 | |
15:52
ChoHag joined
|
|||
ChoHag | My brain's having a good old fart. How do you determine whether a class is or inherits from a class name held in a Str? | 15:54 | |
15:54
Psyche^ left
|
|||
ChoHag | Or consumes the Str as a role. | 15:54 | |
arnsholt | Isn't that the ::($name) syntax? | ||
moritz | ~~ ::($typename) | ||
yes | |||
b2gills | m: my $class = 'Int'; say 5 ~~ ::($class) | 15:55 | |
camelia | rakudo-moar ac3488: OUTPUT«True» | ||
GLRelia | rakudo-moar 59dc4a: OUTPUT«True» | ||
arnsholt | I remembered a thing. Yay! =) | ||
15:55
Psyche^ joined
|
|||
ChoHag | Hmm. I don't remember seeing that before. | 15:56 | |
Maybe it wasn't a fart after all. | |||
How's the GLR going btw? | |||
moritz | it's progressing. | 15:57 | |
dalek | ast/glr: 4345b0b | (Jimmy Zhuo)++ | S32-list/seq.t: new test seq.t |
||
moritz | ChoHag: down to ~140 or so failing test files | ||
ChoHag | <Management> How complete is it as a percentage? | ||
JimmyZ | moritz: it'd be nice to add seq.t to spectest.data :) | 15:58 | |
ChoHag | Cod I hate people asking me that... | ||
dalek | kudo/glr: ef66690 | moritz++ | t/spectest.data: Run new test file seq.t, JimmyZ++ |
15:59 | |
moritz | "we're well into the first 80%" | ||
16:00
aborazmeh left
16:01
aborazmeh joined
16:02
ggoebel left
16:03
aborazmeh left,
aborazmeh joined
|
|||
b2gills | Unfortunately the last 20% usually takes 80% of the time. | 16:05 | |
moritz | that's why they are called the second 80% | 16:06 | |
ChoHag | And that'n when it's handed over to ops for the 3rd 80%. | 16:08 | |
dalek | ast/glr: 87b55ac | (Jimmy Zhuo)++ | S32-list/seq.t: s/is/is-deeply/ |
16:10 | |
ChoHag | I want to be able to use a named regex in a when clause a la 'when Foo::Bar.thing { ... }', which I've achieved by having a method thing in class Foo::Bar which returns rx/.../. | 16:11 | |
Is there a more sensible way to do that? | |||
masak | I think so. | 16:12 | |
timotimo | m: class Foobar { regex Test is export { ... } }; say Foobar::Test.WHAT | ||
GLRelia | rakudo-moar ef6669: OUTPUT«Could not find symbol '&Test' in block <unit> at /tmp/NzmpTVinbT:1Actually thrown at: in block <unit> at /tmp/NzmpTVinbT:1» | ||
camelia | rakudo-moar ac3488: OUTPUT«Could not find symbol '&Test' in block <unit> at /tmp/RbvZpwPfEt:1Actually thrown at: in block <unit> at /tmp/RbvZpwPfEt:1» | ||
timotimo | oh, that's not what i meant | 16:13 | |
m: class Foobar { our regex Test { ... } }; say Foobar::Test.WHAT | |||
GLRelia | rakudo-moar ef6669: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in regex Test at /tmp/lUqMlCTXDy:1 in block <unit> at /tmp/lUqMlCTXDy:1» | ||
camelia | rakudo-moar ac3488: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in regex Test at /tmp/YU9N6ow8ZD:1 in block <unit> at /tmp/YU9N6ow8ZD:1» | ||
moritz | m: class My::Grammar { our regex number { ^ \d+ $ } }; sub f($x where My::Grammar::number) { say 42 } | ||
camelia | ( no output ) | ||
GLRelia | ( no output ) | ||
moritz | m: class My::Grammar { our regex number { ^ \d+ $ } }; sub f($x where My::Grammar::number) { say 42 }; f 42 | ||
GLRelia | rakudo-moar ef6669: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in regex number at /tmp/rlQ3vcxwGa:1 in sub f at /tmp/rlQ3vcxwGa:1 in block <unit> at /tmp/rlQ3vcxwGa:1» | ||
camelia | rakudo-moar ac3488: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in regex number at /tmp/Nek4dXjN8Y:1 in sub f at /tmp/Nek4dXjN8Y:1 in block <unit> at /tmp/Nek4dXjN8Y:1» | ||
timotimo | so that's a call, not a mention | ||
masak | m: class Foo::Bar { my $.thing = /HAI$/ }; given "OH HAI" { when Foo::Bar.thing { .say } } | ||
camelia | rakudo-moar ac3488: OUTPUT«OH HAI» | ||
GLRelia | rakudo-moar ef6669: OUTPUT«OH HAI» | ||
moritz | m: class My::Grammar { our regex number { ^ \d+ $ } }; sub f($x where &My::Grammar::number) { say 42 }; f 42 | ||
GLRelia | rakudo-moar ef6669: OUTPUT«42» | ||
camelia | rakudo-moar ac3488: OUTPUT«42» | ||
moritz | m: class My::Grammar { our regex number { ^ \d+ $ } }; sub f($x where &My::Grammar::number) { say 42 }; f 'not a number' | ||
GLRelia | rakudo-moar ef6669: OUTPUT«Constraint type check failed for parameter '$x' in sub f at /tmp/mGqtvI0sru:1 in block <unit> at /tmp/mGqtvI0sru:1» | ||
camelia | rakudo-moar ac3488: OUTPUT«Constraint type check failed for parameter '$x' in sub f at /tmp/ZtBmJ6bt5Q:1 in block <unit> at /tmp/ZtBmJ6bt5Q:1» | ||
masak | nice, I was the only one who went for `my $.thing` :) | 16:14 | |
moritz | ok, that works | ||
masak | adhering to ChoHag's dot requirement | ||
ChoHag | Meh it doesn't have to be a dot. | ||
masak | I agree that `::` and `our` might be more sixish. | ||
16:14
AlexDani` joined
|
|||
moritz | masak: I adhered to the "something like" requirement :-) | 16:14 | |
16:14
AlexDani` is now known as AlexDaniel
|
|||
masak | ChoHag: no, but I liked that I could make it work :> | 16:14 | |
ChoHag | :) | 16:15 | |
dalek | ast: 66a389d | (Carl Masak)++ | S32-temporal/Date (2 files): tests to not die a month from Jan 31st |
||
kudo/nom: 4288450 | (Carl Masak)++ | src/core/Temporal.pm: make .later not die on day-of-month overflow |
16:16 | ||
masak | spectested an everything. :) | ||
and* | |||
ShimmerFairy | masak: good, except I don't agree with clamping to the first of the next month (I'd rather clamp to the last day of the expected month) | 16:18 | |
AlexDaniel | Just 130 tests? Wow! nine++ | ||
yoleaux | 21 Aug 2015 08:14Z <FROGGS> AlexDaniel: the qx//|run|shell issue is not a very big one on my list btw... there are more important issues we need to address | ||
16:19
colomon joined
|
|||
ShimmerFairy | masak: aka 31 Jan + 1 month -> 28/29 Feb. Mar 1 feels like an off-by-one kind of error to me, in addition to not returning the expected month :) | 16:20 | |
16:22
diana_olhovik_ left
|
|||
ShimmerFairy | anyway, night #perl6 o/ :) | 16:23 | |
colomon | \o | ||
AlexDaniel | .tell FROGGS As far as I can see, qx// issue will require some deprecation, that's why I'd really like to see it being reworked before any major release. But I do understand that there are other issues. Thanks anyway. | ||
yoleaux | AlexDaniel: I'll pass your message to FROGGS. | ||
JimmyZ | ShimmerFairy: good night | ||
colomon is waiting at the airport, starting first leg of trip to Switzerland… | 16:24 | ||
16:26
xinming left
16:27
xinming joined
16:29
zakharyas left
|
|||
masak | ShimmerFairy: I could also accept clamping to the end of the month. IMO, it's all about where to introduce the discontinuity/overlap. | 16:30 | |
16:33
aborazmeh left
16:35
skids joined
16:37
mr-foobar left
|
|||
b2gills | .oO( I know there are MMX SSE or SIMD ops that don't overflow, instead they stick to the min or max value ) |
16:38 | |
16:38
census joined,
lichtkind joined
|
|||
census | since when is there a slap option? | 16:39 | |
i'd like to slap some #perl people | |||
masak | census: hey | 16:45 | |
census: don't slap anyone. come in here and cool off for a while :) | |||
census | hi masak! | ||
hahahahah | |||
yea i wasn't planning on it | |||
masak | ShimmerFairy: ok, you've convinced me. makes the logic simpler, too :) | ||
lizmat | ShimmerFairy masak : perhaps internally it *should* be 31 Feb, just in stringifying / looking at attributes it shojld say 28/29 Feb | 16:48 | |
then you can still move on another month on that object, and get a sane thing | |||
similar to when you're in an editor, the cursor remembers the column where you were when you're moving up or down past shorter lines | 16:49 | ||
lichtkind | is the pure sub trait gone? | ||
16:49
amirite joined
|
|||
lizmat | m: sub a() is pure {} | 16:49 | |
GLRelia | ( no output ) | ||
camelia | ( no output ) | ||
lizmat | looks like it is still there | ||
masak | lizmat: I don't like the idea of even being able to create dates that don't exist. | ||
lizmat: that's why we throw an exception on creating that kind of date. | |||
lichtkind | lizmat: thank but i currently could find in syn | 16:51 | |
lizmat | lichtkind: that's entirely possible | ||
masak: well, just throwing in my 2c | |||
ChoHag | Is the date class able to distinguish between 'the 31st of the month' and 'the last day of the month'? | ||
lizmat | good night, #perl6! | ||
skids | jdv79: (backlogging) strings in ABNF are case insensitive. You have to use hex rules to specify case. | 16:52 | |
ChoHag | Because if I did something with someone on Jan 31st and they said 'same time next month?' I'd be confused (ie. throw a tantrum^Wexception) and ask them to clarify *unless* we had done the thing on that day in January because there was already a last-day-of-the-month agreement in place. | 16:53 | |
Maybe it's happening on the 31st because it happens to be the last Thursday? | 16:57 | ||
16:58
MilkmanDan joined
|
|||
ChoHag | Then plus one month would be Feb 28 and plus two would be Mar 28 or 27 in a leap year. | 16:58 | |
To put it simply, you can't put it simply. If you've used the word simple in anything to do with date handling, you're wrong. | 16:59 | ||
16:59
zacts joined
|
|||
ChoHag | It's that simple. | 17:00 | |
laben | i may have a sorta kinda impl of (non) dwimmy hypers, how do i check the hypers tests? | 17:02 | |
17:04
araujo left,
colomon left
17:05
domidumont joined
|
|||
masak | ChoHag: I agree with everything you jsut said. | 17:09 | |
ChoHag: I would also like for .later not to throw an exception. | |||
lizmat: I wish I could explain my intuition there a bit better. part of the "responsibility" of Date/DateTime is delineating what's even a legal date. | 17:11 | ||
and choking at construction if the inputs are illegal. | |||
allowing chameleon dates which look like one thing but contain hidden information about another thing, and can be printed to look like an illegal date, eats into that responsibility and makes date/datetime worse at their job. | 17:12 | ||
zacts | hello | 17:14 | |
skids | o/ | ||
17:14
pink_mist joined
|
|||
ChoHag | What does the regex class 'ident' mean? | 17:17 | |
Specifically. | |||
masak | ChoHag: "identifier" (as defined by Perl 6) | 17:19 | |
dalek | kudo/nom: d6bf551 | (Carl Masak)++ | src/core/Temporal.pm: clip to end of month instead of overflow to next ShimmerFairy++ for the suggestion. This simplifies the logic a bit. |
||
17:19
census left
17:20
llfourn left
|
|||
ChoHag | Really? Code looks like it's the other way around. | 17:20 | |
token identifier { <.ident> [ <.apostrophe> <.ident> ]* } | |||
skids | Yeah ISTR that. ident is the peice of identifiers that's valid for things that don't take apostrophe names. | 17:22 | |
moritz | ident is a typical identifier in other programming languages | 17:25 | |
ChoHag | What would the p5 regex equivalent look like? | 17:26 | |
moritz | my $ident = qr/\pL\w*/; my $identifier = qr/$ident (?: ['-] $ident )* /x | 17:28 | |
17:32
cognominal joined
17:38
zakharyas joined,
mjgardner joined
17:42
mjgardner left
|
|||
dalek | kudo-star-daily: dfdacea | coke++ | log/ (10 files): today (automated commit) |
17:43 | |
rl6-roast-data: bc1df84 | coke++ | / (10 files): today (automated commit) |
|||
rl6-roast-data: e2fddff | coke++ | / (9 files): today (automated commit) |
|||
17:45
mjgardner joined
17:49
zakharyas left
|
|||
ChoHag | How can I use the tokens in Perl6::Grammar in my own regexen? | 17:49 | |
17:52
diana_olhovik joined
|
|||
masak | ChoHag: if you find out, let me know. :/ | 17:53 | |
ChoHag | Not the answer I was hoping for... | 17:54 | |
masak | I think someone did that recently. was it ShimmerFairy? | ||
ChoHag | ... Who's gone to bed. | ||
masak | ChoHag: it *is* a very reasonable/desirable use case. it's just traditionally been Hard To Do. | ||
I mean, if you hack your way down to the NQP level, sooner or later you're going to find Perl6::Grammar. | 17:55 | ||
but it should be super-easy to do, and it isn't, yet. | |||
ChoHag | I was a little surprised when I found that Perl6::Grammar was unknown. | ||
masak | aye. | ||
that's because it's defined in the substrate used by the compiler. | 17:56 | ||
you're in the runtime; that's a different process with different namespaces. | |||
ChoHag | ISTR reading about a means of matching 'something in brackets', ie. open-brackets, thing-except-close-brackets-unless-preceeded-by-open-brackets, close-same-type-of-brackets. | 18:03 | |
masak | are you thinking of `'(' ~ ')' <inside>` ? | ||
ChoHag | I don't know. | 18:04 | |
Am I? | |||
masak | think so. | ||
18:04
pmurias joined
|
|||
pmurias | hi | 18:05 | |
masak | don't expect too much from that construct. <inside> has to give back control to its callee for the ')' to match. and ')' can match in <inside>, no problem. | ||
pmurias: \o | |||
pmurias: happy to see you've picked up JS again :) | |||
ChoHag | Nothing is ever as simple as originally planned. | ||
masak | ChoHag: well, it's working as designed. | ||
ChoHag: it just takes a while to get used to. | |||
ChoHag | I mean what I'm doing. | 18:06 | |
"Match a thing followed optionally by its name in brackets" | |||
When I decided to do that, in my head it was just '\w+(\[\w+\])?'. When I get to actually writing the code, that's woefully inadequate. | 18:07 | ||
Every step is like that. It's a lesson I never seem to learn. | 18:08 | ||
"That'll be easy. Let's leave it for later and concentrate on the meat. ... Oh..." | |||
ugexe | $<some-identifier>=['{' | '[] .*? | 18:10 | |
$<some-identifier>=['{' | '['] .*? <before $<some-identifier>> something like this can work | |||
skids | really would be nice to have a ~-like regex op that automatically tends to nesting like everyone expects ~ to. | ||
ugexe | oh nm that doesnt work for brackets. just quotes | 18:11 | |
ChoHag | I rest my case. | ||
18:13
cognominal left
|
|||
ugexe | i would just write the 2 additional simple rules | 18:15 | |
token optional { '{' <whatever. '}' | '[' <whatever> ']' } | |||
ChoHag | Well honestly I have to rething the whole naming part anyway. | 18:16 | |
18:17
yqt joined
|
|||
jnthn made it home in one piece from YAPC::Asia | 18:18 | ||
yoleaux | 22 Aug 2015 16:46Z <japhb> jnthn: It's looking now like the limiting factor for the awesomeness of your parallelism/asynchrony/concurrency talks is *the length of the talk*. I think we need to get you longer speaking slots. ;-) | ||
09:36Z <vendethiel> jnthn: isn't there a race condition in jnthn.net/papers/2015-yapcasia-concurrency.pdf slide 59 for the "unless"? | |||
15:05Z <b2gills> jnthn: I think there could be a way to ask a sequence generator how many items it would produce if fully iterated ( remove `.infinite` ) 「(1..1000).will-produce == 1000」 「(gather {...}).will-produce === Int | Mu」 「(gather {...} :will-produce(100)).will-produce == 100」 (that last one will work without a grammar change, as it already does work for :infinite ) There should be no guarantees that the value will always be | |||
accurat | |||
jnthn | Darn that was not a fun journey at all... | ||
.tell vendethiel the text right above explains why it's not ;) We don't let any of the code in a given supply/react instance be running on multiple threads, so there can never be two threads racing to read/write any state enclosed in the supply/react block | 18:21 | ||
yoleaux | jnthn: I'll pass your message to vendethiel. | ||
vendethiel | computer? | 18:22 | |
yoleaux | 18:21Z <jnthn> vendethiel: the text right above explains why it's not ;) We don't let any of the code in a given supply/react instance be running on multiple threads, so there can never be two threads racing to read/write any state enclosed in the supply/react block | ||
vendethiel | jnthn: thanks. I didn't understand it that way :) | ||
jnthn | vendethiel: Yeah, the supply/react stuff deserves a talk of its own really, but making things like that example work correctly was one of my explicit goals with it from the start :) | 18:23 | |
18:23
cschwenz joined
|
|||
vendethiel | jnthn: yes, it feels like you want to explore more monitor and/or actor in the talk, but left it "for some later talk"(well, or previous!). but it's still great! | 18:23 | |
jnthn | .tell b2gills While I agree there could be such a thing, I'd like to see more concrete use cases :) | 18:24 | |
yoleaux | jnthn: I'll pass your message to b2gills. | ||
jnthn | vendethiel: Yeah, this talk is in part "I did a bunch of parallel/concurrent/async talks before, let me now try and show when the various pieces apply" :) | ||
.tell b2gills Not least because I was very glad to kill off the whole .infinite thing | 18:25 | ||
yoleaux | jnthn: I'll pass your message to b2gills. | ||
masak | jnthn! \o/ | 18:27 | |
timotimo | what the ... hell? my script causes an internal error in stage parse ... World::install_lexical_container tries to call .value on the $var and it says it can't find it ... | 18:28 | |
18:28
Ven joined
|
|||
jnthn | About [[1]] needing to be [[1],] in GLR - yes, I know. :) But if I understood the result of the grep-all-the-modules, it's not like it's common to do [[0]] style things for one. And for two, it's the same thing that makes [1..10] give you an array of 10 items. | 18:30 | |
It's one of those "you can't win" situations - at least, if you want to kill of the amount of auto-flattening we used to do. | |||
18:30
mjgardner left
|
|||
jnthn | (And I think we generally *do*) | 18:30 | |
Anyway, I chose not to win the [[0]] battle during the glr war. | 18:31 | ||
timotimo | failed to find a variable by the name of $_ in the block stack | ||
18:31
TEttinger joined
|
|||
timotimo | oh, block stack isn't actually right | 18:31 | |
potentially a swallowed error for redeclaring $_ | 18:32 | ||
m: my @test; while @test { my $_ = 1 } | |||
GLRelia | rakudo-moar ef6669: OUTPUT«===SORRY!===Cannot find method 'value'» | ||
camelia | rakudo-moar d6bf55: OUTPUT«===SORRY!===Cannot find method 'value'» | ||
pmurias | jnthn: are there docs on how subrule rxtype works? | ||
timotimo | m: my @test; while @test { $_ = 1 } | ||
GLRelia | ( no output ) | 18:33 | |
camelia | ( no output ) | ||
timotimo | so "my $_" is supposed to give a compile-time error there? | ||
jnthn | pmurias: Not that I know of | ||
timotimo: ooc, is that an error with --optimize=off or so? | |||
timotimo | it happens in stage parse | ||
so it can't make a difference | |||
pmurias | jnthn: I'm doing a bit of guessing on how the subtypes work, but it would be much better if I had a description of them instead of just hacking things till the tests pass ;) | 18:34 | |
jnthn | timotimo: ah, interesting | 18:35 | |
timotimo: But yeah, certainly a bug | |||
timotimo: I don't have the energy to look at it now | |||
pmurias: I already ported it twice that way successfully :P | |||
timotimo | no problem | ||
masak | timotimo: want me to rakudobug the `my $_` thing? | 18:39 | |
m: while 0 { my $_ } | |||
GLRelia | rakudo-moar ef6669: OUTPUT«===SORRY!===Cannot find method 'value'» | ||
camelia | rakudo-moar d6bf55: OUTPUT«===SORRY!===Cannot find method 'value'» | ||
timotimo | masak: sure, go ahead :) | ||
masak | m: { my $_ } | ||
GLRelia | rakudo-moar ef6669: OUTPUT«Potential difficulties: Redeclaration of symbol $_ at /tmp/_33E8YSEeR:1 ------> 3{ my $_ 7⏏5}» | ||
camelia | rakudo-moar d6bf55: OUTPUT«Potential difficulties: Redeclaration of symbol $_ at /tmp/fQEBMAwxS3:1 ------> 3{ my $_ 7⏏5}» | ||
timotimo | thank you | ||
masak submits rakudobug | |||
no problem. been a while since I submitted anything ;) | |||
18:41
Ven left
|
|||
masak | m: for 0 { my $_ } | 18:41 | |
GLRelia | rakudo-moar ef6669: OUTPUT«Potential difficulties: Redeclaration of symbol $_ at /tmp/lFFtgEOjYq:1 ------> 3for 0 { my $_ 7⏏5}» | ||
camelia | rakudo-moar d6bf55: OUTPUT«Potential difficulties: Redeclaration of symbol $_ at /tmp/e743xnFISm:1 ------> 3for 0 { my $_ 7⏏5}» | ||
masak | only while loops. innerestin'. | ||
timotimo | possibly some optimization (not in the optimizer) not being careful enough | 18:42 | |
jnthn | Should go rest...bodies are not designed to do long-haul travel on close to zero sleep... :/ | ||
o/ | |||
pmurias | jnthn: I'll mangage to do it that way too, would be great if it got documented at some point | 18:43 | |
masak | jnthn: rest well. | 18:44 | |
18:44
mjgardner joined
|
|||
FROGGS | . | 18:48 | |
yoleaux | 16:23Z <AlexDaniel> FROGGS: As far as I can see, qx// issue will require some deprecation, that's why I'd really like to see it being reworked before any major release. But I do understand that there are other issues. Thanks anyway. | ||
18:50
Ven joined
|
|||
Ven | I'm trying to look at the GLR stuff (trying to fix S02-names-vars/list_array_perl) but I don't understand the behavior. | 18:51 | |
m: my @foo = ([-1, -2], -3); say @foo.perl; # why the $[] ? | |||
GLRelia | rakudo-moar ef6669: OUTPUT«[$[-1, -2], -3]» | ||
camelia | rakudo-moar d6bf55: OUTPUT«[[-1, -2], -3]<>» | ||
Ven | I thought [] didn't itemize anymore? or is that there to prevnt @ = from flattening? | ||
masak | m: my @foo = [-1, -2]; say @foo.perl | 18:54 | |
GLRelia | rakudo-moar ef6669: OUTPUT«[-1, -2]» | ||
camelia | rakudo-moar d6bf55: OUTPUT«[[-1, -2]]<>» | ||
masak | ooh :) | ||
18:54
amirite left
|
|||
timotimo | [] doesn't itemize, but assigning to an array puts everything into a scalar container, does that seem right? | 18:55 | |
Ven | that's what I'm asking before doing anything to this test :) | ||
19:02
Ven left
|
|||
nine | .tell laben Of lists we know if they are lazy or not. Of lazy lists we may know that they are infinite or may be infinite. For example, what makes you think, that .lines is finite? It could be a stream of a webserver log that for all intents and purposes _is_ infinite. | 19:03 | |
yoleaux | nine: I'll pass your message to laben. | ||
19:05
diana_olhovik left,
Ven joined
19:06
ChoHag left
|
|||
dalek | ast: 7e0c2b0 | FROGGS++ | S02-types/declare.t: adjust expectation when assigning big bigint to native |
19:07 | |
19:11
Ven_ joined,
Ven left
19:12
domidumont left
|
|||
BenGoldberg ponders whether there are any currently-existing perl6 processes started by ineted. | 19:12 | ||
FROGGS | jnthn: what do you think about .int* methods on Cool? | 19:14 | |
Ven_ | FROGGS: that should probably be .tell :) | ||
FROGGS | good point :o) | 19:15 | |
Ven_ | m: my $i; $i++ for (1, 2, 3).item; say $i; # is that expected? if "for" is *just .map*, it should probably be 3 and I should fix the test | ||
GLRelia | rakudo-moar ef6669: OUTPUT«3» | ||
camelia | rakudo-moar d6bf55: OUTPUT«1» | ||
FROGGS | I'll do later if I donot come to a conclusion on my own | ||
19:16
brrt joined
|
|||
Ven_ would like ShimmerFairy or nine's opinion, which are far more knowledgeable wrt glr and might still be able :) | 19:16 | ||
19:16
llfourn joined
|
|||
Ven_ | I guess I should check RT#63350 and RT#78284 | 19:19 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...l?id=63350 | ||
Ven_ | this RT is from 2009, and I'm not sure moritz++ saw GLR coming then :) | 19:21 | |
19:21
llfourn left
19:25
brrt left
|
|||
masak | m: my $i; $i++ for (1, 2, 3); say $i | 19:27 | |
GLRelia | rakudo-moar ef6669: OUTPUT«3» | ||
camelia | rakudo-moar d6bf55: OUTPUT«3» | ||
masak | Ven_: so, you're saying the .item there makes no difference? | ||
19:27
brrt joined
|
|||
masak | (which may well be true -- I'm just trying to understand) | 19:27 | |
Ven_ | masak: yes. because in glr, "for" is literally just .map, as I've understood it | 19:28 | |
19:29
rindolf left
|
|||
FROGGS | m: my $i; $i++ for (1, 2, 3).item, 42; say $i; | 19:29 | |
GLRelia | rakudo-moar ef6669: OUTPUT«2» | ||
camelia | rakudo-moar d6bf55: OUTPUT«2» | ||
Ven_ | FROGGS: because then, you're calling .for on ($[1, 2, 3], 42) :P | ||
FROGGS | Ven_: I think that counts as the "One Element Rule™" | 19:30 | |
Ven_ | FROGGS: sorry? :) | ||
masak | Ven_: ok, I agree with that conclusion, then. | ||
FROGGS | Ven_: no, I'm not :o) | 19:31 | |
Ven_ | FROGGS: I mean -- what's the one element rule? | ||
19:31
rindolf joined
|
|||
FROGGS | if you are iterating over one element, and this is Positional or Iterable (I dunno), then you iterate over its elems | 19:32 | |
Ven_ | FROGGS: right. seems consistent to you? the discussion in the ticket is interesting, but glr changed a lot of things | 19:33 | |
19:33
cschwenz left
|
|||
FROGGS | Ven_: I am not sure if it is consistent or sane... really | 19:34 | |
I need to get used to it and play with more GLR aspects to get a feeling | 19:35 | ||
19:36
darutoko left
|
|||
rindolf | FROGGS: hi, sup? | 19:36 | |
FROGGS | hi rindolf | 19:37 | |
jdv79 | is it a one arg rule of a one arg exception to the rule? | ||
19:40
espadrine left
|
|||
Ven_ | jdv79: sorry? | 19:47 | |
Ven_ feels confused by all this :) | |||
it seems that "for 1 {}" working (iterating once) works because perl6 doesn't differentiate between "a" and "a," | |||
(which means a[0][0][0][0][0][0][0][0] =:= a, if a isn't Positional) | 19:48 | ||
19:50
ggoebel joined
19:55
Ven_ left
19:56
jack_rabbit left,
cognominal joined
20:03
Ven joined
|
|||
masak | I think Python for loops have something resembling a one element rule. | 20:04 | |
20:04
yqt left
|
|||
brrt | what kind of one-element rule do you mean? | 20:06 | |
20:06
zakharyas joined
|
|||
masak | m: for [1, 2, 3] { .say } | 20:08 | |
GLRelia | rakudo-moar ef6669: OUTPUT«123» | ||
camelia | rakudo-moar d6bf55: OUTPUT«1 2 3» | ||
20:08
Ven left
|
|||
masak | brrt: the one that holds in GLR but not cam. | 20:08 | |
brrt | i'm not super-familiar with all that has been done on GLR | ||
masak | no, but you can see the difference in the above eval :) | ||
brrt | although most things look really decent to me | ||
masak | brrt: more specifically, in Python you always pass a single thing to a for loop. so there has to be a one-element rule. | 20:09 | |
jdv79 | what's the fail count now? | ||
brrt | oh, right, there is a newline between each of the numbers | ||
20:09
Ven joined
|
|||
jdv79 | btw, does anyone else see a non-spec native call test failing? | 20:09 | |
vendethiel | what I used to do to explain is "imagine there are parentheses around the for's head": for 1, 2, 3 maps on (1, 2, 3), for @a maps on (@a) so @a) | ||
that's an oversimplification, obviously :) | 20:10 | ||
brrt | jdv79: i do, yes | ||
masak | vendethiel: I'm still not too clear on what parentheses mean in GLR :) | 20:11 | |
20:13
xfix left
20:15
brrt left
20:16
brrt joined,
llfourn joined
20:19
Ven left
|
|||
skids | masak: my take on it is parenthesis mean "don't change the default return type of infix[,] (which is List)" and also of course, to override the chaining , precedence. | 20:19 | |
20:20
zakharyas left
|
|||
masak | ok... I'll try to digest that. | 20:20 | |
it sounds like what someone who has understood more than I have about GLR might say :P | |||
20:21
llfourn left
|
|||
skids | :) | 20:23 | |
20:27
telex left
20:28
telex joined
20:29
KCL joined
20:32
KCL_ left
|
|||
moritz | m: say ().^name | 20:32 | |
GLRelia | rakudo-moar ef6669: OUTPUT«List» | ||
camelia | rakudo-moar d6bf55: OUTPUT«Parcel» | ||
moritz | there's always that special case | ||
otherwise the statement about () not changing the type returned by infix:<,> is true both pre and post GLR | 20:33 | ||
masak | m: say ().^name.substr(*-2) | 20:39 | |
GLRelia | rakudo-moar ef6669: OUTPUT«st» | ||
camelia | rakudo-moar d6bf55: OUTPUT«el» | ||
masak | I honestly don't know why I did that. | ||
FROGGS | *g* | ||
vendethiel | *g* | 20:46 | |
.oO( show me your true colors, substr ) |
|||
masak | m: say "Superman's birth name, Kal-", ().^name.substr(*-2) | 20:48 | |
GLRelia | rakudo-moar ef6669: OUTPUT«Superman's birth name, Kal-st» | ||
camelia | rakudo-moar d6bf55: OUTPUT«Superman's birth name, Kal-el» | ||
masak | obviously, cam is right on that one. | ||
dalek | kudo-star-daily: d8b1d48 | coke++ | log/ (8 files): today (automated commit) |
20:52 | |
20:52
kaare_ left
20:53
mjgardner left
|
|||
dalek | rl6-roast-data: fde07ab | coke++ | / (2 files): one more glr run today |
20:53 | |
[Coke] | jdv79: (test failures) coke/perl6-roast-data has daily runs on linux for all the backends (and glr0 | 20:54 | |
(on github) | |||
BenGoldberg | m: say [R,] 1..4; | 21:02 | |
GLRelia | rakudo-moar ef6669: OUTPUT«4 3 2 1» | ||
camelia | rakudo-moar d6bf55: OUTPUT«4 3 2 1» | ||
BenGoldberg | m: my @a = (1, 2, 3); @a.perl.say; | 21:04 | |
GLRelia | rakudo-moar ef6669: OUTPUT«[1, 2, 3]» | ||
camelia | rakudo-moar d6bf55: OUTPUT«[1, 2, 3]<>» | ||
BenGoldberg | m: my $goal = "Just another sorting hacker,"; my @b = 'a'..'z';push @b, 'A'..'Z'; my $a = @b[^ $goal.chars].join; srand 1; my $scram = $a.comb.pick(*).join; my $pre = $a.trans( $scram => $goal ); srand 1; $pre.comb.pick(*).join.say | 21:05 | |
camelia | rakudo-moar d6bf55: OUTPUT«Just another sorting hacker,» | ||
GLRelia | rakudo-moar ef6669: OUTPUT«Just another sorting hacker,» | ||
BenGoldberg | m: say( 1 R, 2 R, 3 R, 4 )l | 21:06 | |
GLRelia | rakudo-moar ef6669: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xJSvIFzPkYTwo terms in a rowat /tmp/xJSvIFzPkY:1------> 3say( 1 R, 2 R, 3 R, 4 )7⏏5l expecting any of: infix infix stopper statement end statement mo…» | ||
camelia | rakudo-moar d6bf55: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ewpuGzLo5ATwo terms in a rowat /tmp/ewpuGzLo5A:1------> 3say( 1 R, 2 R, 3 R, 4 )7⏏5l expecting any of: infix infix stopper statement end statement mo…» | ||
BenGoldberg | m: say( 1 R, 2 R, 3 R, 4 ); | ||
GLRelia | rakudo-moar ef6669: OUTPUT«2 1» | ||
camelia | rakudo-moar d6bf55: OUTPUT«2 1» | ||
BenGoldberg | m: my $pi = (pi*1e99).Int / (1e99.Int); say $pi; | 21:12 | |
GLRelia | rakudo-moar ef6669: OUTPUT«3.14159265358979295» | ||
camelia | rakudo-moar d6bf55: OUTPUT«3.14159265358979295» | ||
BenGoldberg | m: my $pi = (pi*1e99).Int / (1e99.Int); say $pi.base-repeating(10); | 21:13 | |
GLRelia | rakudo-moar ef6669: OUTPUT«(timeout)» | ||
camelia | rakudo-moar d6bf55: OUTPUT«(timeout)» | ||
masak | shameless plug: my YAPC::EU talk will be about code I have in production. some of that will be Perl 6 scripts I have in my ~/bin directory. I just pushed those to github.com/masak/tilde-bin -- feel free to have a look :) | 21:16 | |
and with that, I've only spoiled like 20% of my talk, so you should still come to the talk :> | 21:17 | ||
21:19
brrt left
|
|||
vendethiel | .oO( don't link your talk too much around) |
21:19 | |
21:19
brrt1 joined
|
|||
masak | don't worry, I won't link to the *talk*, as it's currently (hastily) being written. | 21:20 | |
brrt1 is also writing a talk | 21:22 | ||
masak | what an unlikely coincidence. | 21:24 | |
brrt1 | :-) | 21:25 | |
i'm trying not to ramble about arcane compilation details | 21:27 | ||
vendethiel hopes his next talk can be about macros :) | 21:29 | ||
..or a different language altogether | |||
masak | vendethiel: is that... a veiled threat? :P | 21:30 | |
vendethiel | no! I mean something like lisp or smalltalk "in context" :) | ||
masak | :P | ||
then I hope so too. | 21:31 | ||
let's make Perl 6 macros awesome. | |||
I know they're in there somewhere <3 | |||
21:32
philh left
21:34
yqt joined
|
|||
timotimo | m: my %test; say %test{"hello"} | 21:34 | |
GLRelia | rakudo-moar ef6669: OUTPUT«(Any)» | ||
camelia | rakudo-moar d6bf55: OUTPUT«(Any)» | ||
timotimo | m: my %test; say %test{"hello"} ~ "hi" | ||
GLRelia | rakudo-moar ef6669: OUTPUT«Use of uninitialized value %test of type Any in string context in block <unit> at /tmp/8iIr8NZ2q8:1hi» | ||
camelia | rakudo-moar d6bf55: OUTPUT«Use of uninitialized value %test of type Any in string context in block <unit> at /tmp/uEAacd1liA:1hi» | ||
timotimo | ^- the "value %test" is kinda anti-helpful here | ||
vendethiel | masak :github.com/masak/tilde-bin/blob/ma.../month#L15 can't get them from the lang? | ||
masak | vendethiel: (a) you'll notice that's Swedish. | 21:35 | |
vendethiel: (b) when we spec'd Temporal, I/we decided to make it language-agnostic. not even English. | 21:36 | ||
vendethiel: aka "let the module ecosystem handle that" | |||
as far as I know, there is no such module (yet). | |||
if/when there is, I'll happily use it. | |||
labster | m: Date.new('20150823') | 21:37 | |
GLRelia | rakudo-moar ef6669: OUTPUT«Invalid Date string '20150823'; use yyyy-mm-dd instead in block <unit> at /tmp/95J9q1FMQ3:1» | ||
camelia | rakudo-moar d6bf55: OUTPUT«Invalid Date string '20150823'; use yyyy-mm-dd instead in block <unit> at /tmp/DGfzFYs5eV:1» | ||
labster | apparently that's supposed to be valid ISO 8601 too. | ||
21:38
brrt1 left
|
|||
jdv79 | 860tried to make everyone happy, right? | 21:41 | |
vendethiel | masak: I noticed it was swedish :) | 21:42 | |
jdv79 | *8601 | ||
masak | labster: I... I think even as I read through ISO 8601 the first time, I made some judicious selections from it. :) | 21:44 | |
labster: no need to be ambiguous when there's a nicer form with dashes. | |||
er, hyphens. whatever. | |||
vendethiel | masak: I still write all my scripts in perl6, obviously :P github.com/vendethiel/deepgitstatu...pgitstatus | 21:45 | |
labster | masak: and that nicer form is standardized as RFC 3339. | ||
vendethiel | (yes, that's a global variable) | ||
masak | vendethiel: nice! :) | ||
vendethiel | masak: perl6 can look very awk-ish! github.com/vendethiel/psmemparse/b...emparse.p6 | 21:46 | |
(I stopped working on this script because "next if $*ARGFILES.line == 1;" didn't quite exist, and I couldn't think or a reliable way to get per-file line number, so... but yeah) | |||
masak: several people I "introduced" to perl6 told me they now do the same.. I should tell them to open-source it :) | 21:47 | ||
masak | :) | ||
vendethiel | well, it or them | ||
masak | it probably needs to start this way | ||
Perl 6 from the ground up. from scripts through programs to applications. | |||
I know people are writing applications already, but... | |||
only lately does it feel like Perl 6 is getting established in people's ~/bin directories, for some reason. | 21:48 | ||
maybe a reason called "stability". | |||
labster | and a reason named "speed" | ||
masak | aye | 21:49 | |
vendethiel | whichever it is..:) | ||
[Coke] | FROGGS: github.com/perl6/roast/commit/7e0c2b0c fails on os x. | ||
masak | one of the scripts in my ~/bin directory runs each time I open a new terminal session -- and it *doesn't make me drum my fingers against the table* | 21:50 | |
vendethiel | (who's next to write a blog engine in perl6? I already am.. :P) | ||
anyway -- good night, #perl6! | |||
masak | 'night, ven | 21:51 | |
labster | I remember drumming my fingers against the table after typing the first command in a REPL session. | ||
night | |||
21:56
stux|away joined
22:00
cognominal left
22:01
cschwenz joined
|
|||
timotimo | gist.github.com/timo/afb0413f1aead980a275 - a perl6 script automated converting a bunch of C code into an expression tree format for brrt's new jit | 22:01 | |
cschwenz | Is there a SQLite module for Perl6? | 22:02 | |
masak | cschwenz: DBIish supports SQLite. | 22:03 | |
timotimo | yup | ||
cschwenz | \o/ thanks! | ||
masak | github.com/perl6/DBIish/ | ||
cschwenz | *really* didn't want to go down the route of rolling my own. :-) | ||
[Coke] misses having a working repl by default. | |||
masak | by the way, can we remove the "Search" text box at the top of modules.perl6.org/ ? | ||
it's no significant improvement on Ctrl+F in the browser. | 22:04 | ||
jdv79 | its not the same | 22:08 | |
timotimo | what bothers me about ctrl-f is that i can't then just hit return to activate a link i've selected via the search | ||
or at least tab from the search result to the next visible link or somethign | 22:09 | ||
jdv79 | plus modules.perl6.org may be nearing EOL anyway, no? | ||
timotimo | maybe not as quickly as you think? | 22:10 | |
jdv79 | probably | ||
22:12
espadrine joined
22:13
cschwenz left,
vendethiel left
|
|||
masak | timotimo: either Esc followed by Return, or Ctrl-Return works in that situation. | 22:16 | |
timotimo | oh? | 22:17 | |
i didn't realize, i shall try that | |||
masak | the former takes you out of search mode | ||
22:17
llfourn joined
|
|||
masak | the latter follows the link despite you being in search mode :) # hat-tip to a tadzik++ tweet | 22:17 | |
I repeat my case. Ctrl+F is already quite powerful. we're not adding anything by having a search box in-page. | 22:18 | ||
'night, #perl6 | |||
timotimo | gnite masak! | 22:19 | |
22:20
rindolf left
22:21
jack_rabbit joined
22:22
llfourn left
|
|||
laben | getting late here, i'm off to bed. stay happy #perl6 | 22:24 | |
yoleaux | 19:03Z <nine> laben: Of lists we know if they are lazy or not. Of lazy lists we may know that they are infinite or may be infinite. For example, what makes you think, that .lines is finite? It could be a stream of a webserver log that for all intents and purposes _is_ infinite. | ||
22:24
laben left
22:26
espadrine left,
jack_rabbit left
22:35
RabidGravy left
22:37
geekosaur left
22:39
geekosaur joined
22:40
geekosaur left,
geekosaur joined
22:42
amurf joined
22:43
salva left
22:47
amurf left
|
|||
lizmat | packing and decommute& | 22:53 | |
skids | m: join("", $["a", "b", "c"]) | ||
GLRelia | ( no output ) | ||
camelia | rakudo-moar d6bf55: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏) in block <unit> at /tmp/TVzG6okBFY:1Actually thrown at: in block <unit> at /tmp/TVzG6okBFY:1» | ||
timotimo | m: say $["a", "b", "c"] | 22:55 | |
GLRelia | rakudo-moar ef6669: OUTPUT«a b c» | ||
camelia | rakudo-moar d6bf55: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏) in block <unit> at /tmp/GVopRPnZgm:1Actually thrown at: in block <unit> at /tmp/GVopRPnZgm:1» | ||
skids | I'm actually becoming less sure about whether $ is supposed to protect against single-item-rule or not. I'm supposed to be becoming more sure about things :-) | 22:57 | |
Also, whether join is supposed to be one of the "this flattens in sub form" ones. | 22:59 | ||
23:01
BenGoldberg left
|
|||
skids wonders if the camelia "problem" is someone turning on GC because those Failures are generated/caught in the num-stringifiction code. | 23:02 | ||
23:02
BenGoldberg joined
|
|||
skids | m: join("", $["a", "b", "c"]); END { "done".say }; | 23:02 | |
GLRelia | rakudo-moar ef6669: OUTPUT«done» | ||
camelia | rakudo-moar d6bf55: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏) in block <unit> at /tmp/5VNbQ4l8dP:1Actually thrown at: in block <unit> at /tmp/5VNbQ4l8dP:1done» | ||
skids | m: join("", $["a", "b", "c"]); "done".say; | 23:03 | |
GLRelia | rakudo-moar ef6669: OUTPUT«done» | ||
camelia | rakudo-moar d6bf55: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏) in block <unit> at /tmp/JK3Enb04jn:1Actually thrown at: in block <unit> at /tmp/JK3Enb04jn:1» | ||
skids | Though wait why would it even... | ||
jdv79 | FROGGS: what is b7035eb77588792e in pause all about? | 23:05 | |
seems like a bandaid or a misunderstanding maybe? | |||
23:06
lizmat left
23:10
colomon joined
|
|||
colomon | o/ | 23:11 | |
Anyone out there? | 23:15 | ||
23:16
amurf joined
|
|||
skids | o/ | 23:17 | |
23:18
pmurias left,
colomon left
|
|||
timotimo | i'm here | 23:24 | |
23:32
dayangkun joined
23:34
cbk1090 left
23:46
cbk1090 joined
|
|||
ugexe | CURLI bin wrappers are broke on GLR today | 23:48 | |
m: my @installations = @*INC.grep( { .starts-with("inst#") } ).map: { CompUnitRepo::Local::Installation.new(PARSE-INCLUDE-SPEC($_).[*-1]) }; say @installations>>.files("foo"); | |||
camelia | rakudo-moar d6bf55: OUTPUT« » | ||
GLRelia | rakudo-moar ef6669: OUTPUT«This Seq has already been iterated, and its values consumed in block <unit> at /tmp/y27osPy3Am:1» | ||
23:49
davercc left
|
|||
skids | ugexe: grep's slurpy was changed to **@. But I think that missed some necessary accompanyi changes. | 23:51 | |
ugexe | i figured, noticed some extra emptys ala [$[], $[], $[what i wanted]] that weren't there before. | 23:56 | |
skids | I'm working on seeing what happens if we change more slurpies, but am seeing conflicting ideas of what the single item rule does WRT containers. |