»ö« | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by moritz_ on 25 June 2010.
ingy I have to say that p6grammars is the AMAZING part of p6. The other stuff is curious... 00:00
ingy speaks on behalf of Guido and the entire Python community... Thank you for your grammars! 00:01
ingy ducks
lue I think you'd only have to duck on #python :) 00:05
now S03-operators/binding-closures.t and binding-ro.t pass unfudged because of ::= \o/ 00:06
s/closures/closure/
jnthn -> sleep, night all 00:07
ash_ i saw something kinda interesting in python the other day ingy
lue goodnight jnthn o/ 00:08
I need to figure out what the test output means when it gives me numbers for failed tests, considering they aren't exactly number in the test files :)
ash_ ingy: its not grammars, but it is kinda cool, it was called 'yapps' (yet another python parser system) and you can define rules for processing text, somewhat like a grammar, but a bit more limited, just because of the syntax that you end up having to use for it is a bit odd 00:10
lue tomorrow/later I'll have discuss some of the test failures I get and see if it's the code's fault (aka 'bug') or outdated tests. 00:11
afk 00:13
pmichaud news.perlfoundation.org/2010/07/hag...lists.html 00:15
comments welcomed.
00:16 lest_away is now known as lestrrat
ash_ is that at all related to the changing of rakudo to use more primitive parrot objects? so method invocation won't require multiple hash lookups? (probably not, right?) 00:17
lue pmichaud: nice! Looking forward to the results :) 00:20
pmichaud ash_: no. 00:27
ash_: it's just that we spent several years trying to understand lists and iterators in Perl 6, and now that we have a working implementation we need to document the results. :)
(and flesh out the implementation some more)
ash_ got ya 00:28
thats all of the @a = 1, 2 (the lhs and rhs complexities)? does that include any changes to gather/take for writing an iterator? 00:29
00:29 meppl left
ash_ i assume most end users will use gather/take to make iterators, right? 00:30
00:31 PZt left 00:39 rgrau__ joined 00:40 rgrau_ left 00:48 bjarneh left 00:49 bjarneh joined
cognominal rakudo: say 'ok' if 0 but True 00:50
p6eval rakudo 22d0c3: ( no output )
cognominal hum 00:51
ash_ i don't think 'but' is working as expected... 00:57
01:02 rurban left
cognominal it is defined in src/core/operators.pm 01:02
I forgot what the backslashed parameters mean. 01:03
Jun 30 22:55:34 <jnthn>It means "apply no context whatsoever to this" 01:09
ingy ash_: are you ashleydev? 01:18
01:25 lkk- joined
lichtkind ingy: congrat to wiki update 01:36
ingy: can be the same done for perl 6 wiki?
cognominal backslash defined indeed in S06:2120 as a equivalent to C<Is parcel> 01:37
01:53 supernovus joined 01:56 Transformer joined
pmichaud perl6: my $x; say $x ~~ /nothing/; 01:58
p6eval rakudo 22d0c3: OUTPUT«Method 'match' not found for invocant of class ''␤ in 'Regex::ACCEPTS' at line 5213:CORE.setting␤ in 'infix:<~~>' at line 428:CORE.setting␤ in main program body at line 11:/tmp/HfdqO7E2dq␤»
..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤ unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.14/blib6/pugs/perl5/lib';␤ eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped by operat…
..elf 31554: OUTPUT«Use of uninitialized value $a in pattern match (m//) at ./elf_h line 5803.␤␤»
01:58 Transformer left
pmichaud rakudo: my $x; say $x ~~ /nothing/; 01:59
p6eval rakudo 22d0c3: OUTPUT«Method 'match' not found for invocant of class ''␤ in 'Regex::ACCEPTS' at line 5213:CORE.setting␤ in 'infix:<~~>' at line 428:CORE.setting␤ in main program body at line 11:/tmp/_TE6MVuzw8␤»
pmichaud anyone have an idea what should happen there?
(1) define .match on Any (instead of just on Cool) 02:00
(2) initialize $x to Cool instead of Any
(3) accept this result as correct
(4) other?
02:08 bjarneh left 02:10 agentzh joined 02:16 lichtkind left 02:18 orafu left 02:25 supernovus left 02:29 alester joined 02:30 justatheory joined 02:32 patspam left 02:33 duzy joined 02:43 duzy` joined 02:46 duzy left 02:52 PZt joined 03:09 ashleydev joined
spinclad pmichaud: i would think (1) 03:36
sorear I am starting th think I'm using the wrong low-level object model
pmichaud spinclad: aha! an answer!
sorear doesn't get Cool 03:37
03:38 sorear sets mode: +voo dalek szabgab lue
spinclad pmichaud: re hague grant: don't know if it's too late for updates, but two wordings looked awkward to me: 03:38
(1) 'either in the standard repository for each component' ('in either of the standard repositories for the components', maybe) 03:39
(2) 'experience and background for archiving the crucial deliverables' ('achieving', i expect? _archiving_ doesn't seem a critical task here.) 03:41
pmichaud oops, yes, supposed to be 'achieving' 03:43
I'll see if Karen can fix it.
heh 03:47
my original text apparently had "achiving"
so some spell checker apparently switched it for "archiving"
anyway, I left a comment on the proposal explaining the fix. :-) 03:49
locally: 03:55
> my $x; $x[3]<hello>[1] = 'world'; say $x.perl;
[Any, Any, Any, {"hello" => [Any, "world"]}]
spinclad that'll account for it. 'ambiguous prototype, candidates are: :(Ing[Achie?ve]), :(Ing[Ar?chive])'
sorear What MRO does Perl 6 use?
03:56 justatheory left
spinclad C3, as i understand it 03:57
04:00 ashleydev left, ashleydev joined
TimToady sorear: in irclog.perlgeek.de/perl6/2010-07-04#i_2515113 you still seem to be thinking that augment is a BEGIN; in irclog.perlgeek.de/perl6/2010-07-03#i_2510057 I said it's not a BEGIN, but a package, really 04:05
though not well expressed because I was very tired at the time 04:06
it's only the declarations in the augment that are run at compile time 04:07
lue ohai o/
any interesting conversations while I was gone?
TimToady I have a hard enough time backlogging for myself 04:08
lue we had a lovely discussion about ::=, did you notice? ::=) 04:09
TimToady ::= is supposed to be just like parameter binding; if they're different, one or the other is probably wrong :) 04:10
in either case, the readonly-ness is supposed to give the optimizer something to work with
lue well, for now, it just removes the rw property (in what I've done). 04:11
TimToady removes it from what?
lue from the target
(after binding of course)
rakudo: my @a = <a b c>; @a.delete(1); say ~@a 04:12
p6eval rakudo 22d0c3: OUTPUT«a Any() c␤»
lue according to the test I have here for binding, that should be 'a c', not 'a Any() c'. 04:13
TimToady ~ is supposed to turn an undef into '' (with a warning). Str is supposed to make Any() 04:14
but I think rakudo doesn't have Str vs Stringy yet
lue my @a = <a b c>; my $b = 'e'; @a[1] := $b; @a.delete(1);
there, the test output says it should stay 'e', not turn into Any() like it does.
(it being $b) 04:15
ash_ TimToady: pmichaud seemed to think that ::= and parameters were different in that parameters were re-bindable, is ::= supposed to be re-bindable?
TimToady that seems right--the delete should only delete from the array
is probably parrot PMC damage
for the optimizer's sake, we could prohibit rebinding of anything we know has had ::= used on it, likewise for parameters 04:16
alternately, pessimize any routine that rebinds 04:17
lue but then you get the my ($a is rw) ::= $b situation...
TimToady but rebinding of existing variables is *way* down there on my list of things I feel need to be supported
04:18 Guest77623 left
TimToady the compiler already treats assignment to a declarator as special; treating ::= as also special is trivial 04:18
for instance, in state $x = 42; or has $.x = rand; the = is far from a simple assignment 04:19
for now I'm inclined to say that ::= may be only be applied to a declarator until we understand it better
but the whole point of both ro parameter binding and ::= is to let the compiler know we intend to pretend a value is constant over some scope 04:20
I'm not inclined to break that promise for the dubious gain of rebinding 04:21
lue I think if you want to have a readonly binding you'd be more inclined to to my ($a is readonly) := $b than look up ::= (unless the two are completely different)
TimToady ::= is syntactic sugar for 'is readonly'
04:22 meppl joined
TimToady which is the default for params 04:22
if you use ::= on an 'is rw' you're just screwed up in the head
spinclad constant pi ::= 22/7 is nicely compact
TimToady it's erroneous at best
lue
.oO(that's a quote to save for the hall of fame)
04:23
TimToady and we can certainly warn that the either the 'is rw' or the ::= is useless
constant pi = 22/7 is fine, no need for ::=
::= is a *run-time* constant 04:24
the constant declarator measn it's a compile time constant that can never change no how no way
also, I remember some confusion in the backlog over the syntactic slot that 'constant' fills 04:25
ash_ in S03 ::= says "This does the same as :=, then marks any destination parameters as readonly (unless the individual parameter overrides this with either the rw trait or the copy trait)." does that need to be revised?
TimToady it uses to be 'my', but now it's the same as 'sub' or 'subset'
so you can have 'my constant'
04:25 Schwern left
TimToady but not 'constant Int pi = 3' 04:25
it would have to be 'my Int constant pi = 3' or 'constant pi of Int = 3' 04:26
std: constant pi of Int = 3
p6eval std 31554: OUTPUT«ok 00:01 112m␤»
lue rakudo: constant Int pi = 3 04:27
ash_ i think i made that mistaken once, i thought constant could replace the use of 'my'
p6eval rakudo 22d0c3: OUTPUT«===SORRY!===␤Confused at line 11, near "constant I"␤»
ash_ i didn't realize they were supposed to be used together
spinclad std: my Int volatile constant pi = 3
p6eval std 31554: OUTPUT«===SORRY!===␤Multiple prefix constraints not yet supported at /tmp/XeTVQgGcAw line 1:␤------> my Int ⏏volatile constant pi = 3␤Malformed my at /tmp/XeTVQgGcAw line 1:␤------> my Int ⏏volatile constant pi = 3␤ expecting any
..…
TimToady ash_: it used to be in the 'my' slot 04:28
ash_: yes, S03 is less that adequate on the meaning of ::=
spinclad: what in the world is volatile?
spinclad std: my Int volatile constant pi = (3 today, 4 tomorrow)
p6eval std 31554: OUTPUT«===SORRY!===␤Multiple prefix constraints not yet supported at /tmp/eEgw94nE9T line 1:␤------> my Int ⏏volatile constant pi = (3 today, 4 tomor␤Malformed my at /tmp/eEgw94nE9T line 1:␤------> my Int ⏏volatile constant pi = (3
..today…
TimToady std: volatile 04:29
p6eval std 31554: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'volatile' used at line 1␤Check failed␤FAILED 00:01 107m␤»
TimToady STD has no clue what you mean
lue std: my Int Volatile constant pi = 3; # methinks the V is capitalized
p6eval std 31554: OUTPUT«===SORRY!===␤Multiple prefix constraints not yet supported at /tmp/1vXaQjcpjE line 1:␤------> my Int ⏏Volatile constant pi = 3; # methinks the␤Malformed my at /tmp/1vXaQjcpjE line 1:␤------> my Int ⏏Volatile constant pi = 3; #
..met…
TimToady std: Volatile
p6eval std 31554: OUTPUT«===SORRY!===␤Undeclared name:␤ 'Volatile' used at line 1␤Check failed␤FAILED 00:01 107m␤»
ash_ is there such thing as volatile in perl6?
lue [it changes from a routine to a name in one Shift!]
TimToady yes, it's guessing 04:30
lue rakudo: my Int constant pi = (3|4)
p6eval rakudo 22d0c3: OUTPUT«===SORRY!===␤In "my" declaration, typename Int must be predeclared (or marked as declarative with :: prefix) at line 11, near " constant "␤»
TimToady o_O
ash_ rakudo: my Int $pi = (3|4); 04:31
spinclad volatile: a Cism saying you have to consult the location every time; the 'other end' may count your references, or feed you a different value of the constant, or whatever. used for accessing i/o registers sometimes.
p6eval rakudo 22d0c3: OUTPUT«Type check failed for assignment␤ in '&infix:<=>' at line 1␤ in main program body at line 11:/tmp/iAVS6OS6Y_␤»
TimToady I know what volatile means in C, but STD is not implementing C :P
ash_ spinclad: i know what volatile means in C, but it doesn't exist in perl6...
lue rakudo: say ((3|4) ~~ Int)
p6eval rakudo 22d0c3: OUTPUT«0␤»
sorear it doesn't exist in any other version of Perl, either 04:32
ash_ rakudo: subset F where 3|4; my F $pi = 3;
p6eval rakudo 22d0c3: ( no output )
lue rakudo: say ((3|4) ~~ 3)
p6eval rakudo 22d0c3: OUTPUT«any(Bool::True, Bool::False)␤»
lue well, why didn't it say any(Bool::True, Bool::True) when I compared it to Int? 04:33
TimToady bug, maybe
lue rakudo: say 3 ~~ Int
p6eval rakudo 22d0c3: OUTPUT«1␤»
TimToady or the parameter to .ACCEPTS is declared as Mu type
rakudo: say 3|4 ~~ Junction 04:34
p6eval rakudo 22d0c3: OUTPUT«1␤»
TimToady yeah
lue well, ~~ didn't DWIM for (3|4) ~~ Int …
sorear it DWIMs for me 04:35
TimToady I can see it both ways, but generally I'd rather optimize it what normal folks will expect, and sorear++ isn't exactly normal
lue
.oO(apparently WPM differs...)
04:36
sorear Pm?
TimToady there's always (3|4).does(Junction) for the other
lue What People Mean
WIM would imply I'm unstable :) 04:37
TimToady rakudo: say (3|4).does(Junction)
p6eval rakudo 22d0c3: OUTPUT«any(0)␤»
sorear TimToady: Is the stuff in S12 about multiple dispatch and single dispatch being different a fossil now?
TimToady heh, other way around :)
lue rakudo: my $a = (3|4); my @a = (3,4); say $a ~~ @a; 04:38
p6eval rakudo 22d0c3: OUTPUT«any(Bool::False)␤»
lue I broek it :)
sorear What is the standard Perl 6 MRO? 04:40
04:42 kst joined
pmichaud back 04:44
hejki sorear: C3? 04:47
pmichaud rakudo: my $x; $x ~~ /nothing/; 04:48
p6eval rakudo 22d0c3: OUTPUT«Method 'match' not found for invocant of class ''␤ in 'Regex::ACCEPTS' at line 5213:CORE.setting␤ in 'infix:<~~>' at line 428:CORE.setting␤ in main program body at line 11:/tmp/w28gkzETs6␤»
pmichaud TimToady: any thoughts on ^^^ ? Should .match be defined on Any?
04:51 ashleydev left 04:58 sftp_ joined 04:59 tedv left, sftp left
TimToady we did think about making my $x default to Cool at one point 04:59
pmichaud that feels weird to me for some reason 05:00
certainly it would be Cool only in initialization, not in constraint
TimToady sorear: I'm not sure what you're referring to in S12.
sorear What exactly is Cool?
pmichaud Cool is the base type for classes that tend to know how to morph into other Cool objects 05:01
so it's where we put common methods like .abs, .sin, etc.
thus "3".abs will work, without throwing .abs into Any
TimToady sorear: but it is still the case that single dispatch and multiple dispatch have nothing to do with each other 05:03
sorear S06:736-757
TimToady that's not in S12 :0
lue wonders if he should paste his ::= patch
sorear don't paste anything longer than 3 lines 05:04
lue well, I meant nopaste. 05:05
TimToady that passage in S06 still seems operative to me 05:06
however, the terminology is a bit old-fashioned 05:07
the distinction is not between single dispatch and multi dispatch, but between object dispatch and lexical dispatch
in either case, we may end up doing multiple dispatch if the target we find is a proto 05:08
sorear what's the difference between an invocant parameter and any other parameter, and why should my implementation care?
TimToady you mean argument?
argument what we call the actual, and reserve "parameter" for the formals 05:09
function calls are foo($a,$b,$c) and look out the lexical scopes
method calls are foo($a: $b,$c) and look up the inheritance chain of $a 05:10
really early binding vs late binding
but there's still a lot of verbiage in the synopses that calls function dispatch "multiple dispatch", and that's inaccurate 05:11
we only recently clarified that, in the case of both functions and methods, a 'proto' is really just an 'only' that knows how to gather its multi candidates and redispatch 05:12
so nothing dispatches directly to multis 05:13
lue afk
05:14 cotto joined
TimToady from the standpoint of the method or sub itself on the called end, it doesn't generally care which dispatcher found them, since they're all just Calleables that can be invoked, and expect self as the first arg 05:14
so the : form in a singature is really sugar that lets you leave out the first parameter
well, other way around, the : says you aren't leaving it out of the signature... 05:15
there are likely some optimizations involved in knowing it's the invocant, if you can rely on the fact that a particular dispatcher enforces the type of the invocant, you don't have to recheck it 05:16
(same is true for a multiple dispatch)
sorear so what that text is really saying is that my $c = \($foo: $bar); cow(|$c) === $foo.cow($bar) 05:17
?
TimToady yes
it seems the most parsimonious way to allow captures to be fed to both methods and subs 05:18
otherwise you'd have to go to a lot of work to pull out the invocant and call it differently
and it seems the implementation can figure out how to do that itself once and not make the user figure it out 05:19
pugssvn r31555 | pmichaud++ | [t/spec]: Fudge and fix some tests after autoviv changes.
TimToady and as soon as you've interpolated |$c into an argument list you've disabled most of your optimizer knowledge anyway 05:20
so checking the first arg for "I'm an invocant" is not much more overhead
dalek kudo: 08e5b03 | pmichaud++ | src/core/ (2 files):
Move postcircumfix:<[ ]> into Any.
05:21
kudo: 577a146 | pmichaud++ | src/core/Any-list.pm:
Add first version of Any.at-pos, handling the defined case.
kudo: 06f2d7c | pmichaud++ | src/ (2 files):
Add array autovivification.
kudo: f07a656 | pmichaud++ | src/core/Array.pm:
Add WHENCE-based autoviv to Array.
kudo: 04a918d | pmichaud++ | src/core/ (3 files):
Move postcircumfix:<{ }> into Any. Add hash autovivification.
05:30 cls_bsd left
pmichaud rakudo: say 1; 05:30
p6eval rakudo 22d0c3: OUTPUT«1␤»
pmichaud waits for p6eval to update. 05:31
TimToady jnthn, pmichaud: re irclog.perlgeek.de/perl6/2010-07-04#i_2515564, the spec discusses nested dispatchers at S12:933 05:33
pmichaud TimToady: thanks 05:34
I suspect we both need to re-read it :-) 05:35
TimToady and under the new proto model, the proto never looks for more outer or superer methods, since it thinks it's the "right" method already
well, unless you used .*method of course
pmichaud right. That was my (limited) understanding of the new proto 05:36
it's like protoregexes in that respect
TimToady yes
one thing our current protos don't do is limit the candidate list on both ends
at least, STD's doesn't
it just collects all the protos from the actual type on up, but the proto is also supposed to limit how high up it looks, by current spec 05:37
so it's the set of methods between the current proto's type and the object's actual type, that are "visible" to both of them
pmichaud right 05:38
TimToady so take the current of methods from the parents of self.WHAT, and then weed out the ones that don't 'isa' the type of the proto, basically
s/of/set of/
the current semantics of protoregexes is like putting a proto only in the supermost class; while the current semantics of normal multi methods is like having a proto in every class 05:40
with the new semantics we can support both extremes as well as anything in the middle 05:41
same goes for proto subs
also, for now, I'm inclined to say that we infer no protos automatically 05:42
and maybe even that it's illegal to declare a multi outside of the scope of a multi
well, we can't know that for the methods, of course...
or maybe we can 05:43
I guess the isa's are relatively static
pmichaud yeah, it makes initial sense to me 05:44
I'll need a couple of days to let it all sink in
plus it's been a bit of a march getting closures and autoviv working :-)
TimToady on the subject of when you execute package-like blocks, I think that instead of making different blocks run at different times, it's more consistent to say that the all run like packages, and you can COMPOSE or whatever to get things running at special times
pmichaud agreed.
consistency would be really good to have here. 05:45
05:45 TiMBuS joined
pugssvn r31556 | pmichaud++ | [t/spec]: Fix pair.t syntax error from previous commit. 05:46
pmichaud rakudo: say 2; # still checking
p6eval rakudo 22d0c3: OUTPUT«2␤»
TimToady the declarations, of course, always evaluate asap; I mean the normal code in the block
pmichaud right.
TimToady this consistency will also make it easier to write other similar block forms with predictable semantics
myroles, and myclasses, and mywhateverwehaven'tthoughtofyet 05:47
I could, of course, be deluding myself, and then I will change my mind, and make the implementors unhappy again... :) 05:48
05:49 sawyer_ left
pmichaud for all of our grumbling (or at least mine), I have to say that nearly all such changes have been correct. 05:49
TimToady I should really take a cleanup pass on the specs wrt dispatcher nomenclature; I knew when I hacked in the proto change that there was still a lot of fossils there that I was neglecting 05:50
I'd have felt worse about the dispatcher change if it didn't feel like I was moving anonymous dispatcher code into the protos, and it wasn't really that big a rewrite 05:51
pmichaud I'm hoping/expecting to work on spec rewrites (list/iterator) this next week as well.
TimToady that'd be good 05:52
has anyone tested the old double-gather bug to see if the closure change fixed it?
pmichaud tbh, I don't recall the bug. :) 05:53
but it should be fixed, yes. :-)
TimToady like, didn't the double map of a Schwartzian transform trigger it?
or something like that
using the same construct twice in the same pipeline 05:54
or maybe it actually has to use the same block
pmichaud I think it needed to be the same block. that's far more likely. 05:55
rakudo: sub xyz($x) { -> { say $x } }; my $b = xyz(3); my $c = xyz(5); $b();
p6eval rakudo 22d0c3: OUTPUT«3␤»
pmichaud that used to fail. 05:56
TimToady \o/
pmichaud because it wouldn't properly capture the closure. now it works :)
and all of the other closure-related bugs I could find seem to work now.
anyway, I'm quite comfortable that the new implementation is fundamentally correct :)
TimToady well, I'm sure we'll exercise closures heavily in the future, so I'm not too concerned that something will slip by
05:57 plobsing joined
TimToady certainly, if I ever had any doubts about the solidity of P5's closures, it was erased by all the abusive ways I used them in STD/Cursor 05:57
pmichaud I suspect we'll have a few bugs crop up, but I'm comfortable that the underlying model is now sound. 05:58
TimToady yayness
06:01 sawyer_ joined 06:04 cls_bsd joined 06:05 ashleydev joined 06:07 eternaleye left
TimToady bedness & 06:09
pmichaud rakudo: say 1; 06:11
p6eval rakudo 22d0c3: OUTPUT«1␤»
06:11 uniejo joined 06:37 araujo left 06:42 rgrau__ left
pugssvn r31557 | moritz++ | [t/spec] fudge a failing test for rakudo in rat.t 06:50
moritz_ rt is not very responsive right now 06:51
pmichaud rakudo: say 2; 06:52
p6eval rakudo 04a918: OUTPUT«2␤»
pmichaud rakudo: my $a; $a[2]<abc>[1] = 'hello'; say $a.perl; 06:53
p6eval rakudo 04a918: OUTPUT«[Any, Any, {"abc" => [Any, "hello"]}]␤»
pmichaud \o/
moritz_ impressed 06:58
rakudo: my $a; $a<foo>.push: 3; say $a.perl
p6eval rakudo 04a918: OUTPUT«Method 'push' not found for invocant of class ''␤ in main program body at line 11:/tmp/7LjM_iEoKP␤»
moritz_ rakudo: my $a; push $a<foo>, 3; say $a.perl 06:59
p6eval rakudo 04a918: OUTPUT«Method '!fill' not found for invocant of class ''␤ in 'List::push' at line 2517:CORE.setting␤ in main program body at line 11:/tmp/IbyLjTvJ4S␤»
pmichaud I'm not sure that Any:U should have a .push yet. 07:01
we can certainly add one.
moritz_ is
pmichaud in the case of push $a<foo>, 3
I think that will fail to bind.
unless we define a special push(Any:U, ...) variant. 07:02
moritz_ we probably need to 07:03
pmichaud ...and we don't have :U and :D implemented, afaik. 07:04
moritz_ right
07:30 tylercurtis joined
pmichaud time for sleep here -- bbiaw 07:31
m6locks g'night 07:32
07:33 simcop2387 joined 07:41 ashleydev left 07:43 Sanitoeter left 07:45 Ross joined
mathw Good morning 07:46
sorear TimToady: I thought methods /were/ subs 08:00
oh, bedness. 08:02
08:05 Sanitoeter joined 08:13 Ross left 08:21 sftp joined, tylercurtis left, sftp_ left
pugssvn r31558 | moritz++ | [t/spec] fudge can.t for rakudo 08:26
moritz_ rakudo: say 'ab34d5z'.split(/<.before \d>/).perl 08:35
08:35 Ross joined
p6eval rakudo 04a918: OUTPUT«("ab", "", "", "d", "", "z")␤» 08:35
moritz_ rakudo: say ''.split('')
rakudo: say ''.split('').perl
p6eval rakudo 04a918: OUTPUT«␤»
rakudo 04a918: OUTPUT«("")␤»
moritz_ rakudo: say split('', '').perl 08:36
p6eval rakudo 04a918: OUTPUT«("")␤»
08:43 dakkar joined, fridim_ joined 08:50 lkk- left 08:51 sawyer_ left, sawyer_ joined 08:57 _mpu joined 09:02 pmurias joined, plobsing left
sorear pmurias: I got the OK from TimToady to move ahead with my STD plans :> 09:02
09:03 clintongormley joined 09:07 masak joined
masak oh hai, #perl6! 09:07
phenny masak: 05 Jul 23:58Z <ingy> tell masak Please register github.com/ingydotnet/testml-pm6
sorear HELLO MASAK! 09:08
masak :)
moritz_ good late morning masak :-)
sorear (I swore long ago to never use the word "lol". I have to make it up in other ways.) 09:09
moritz_ sorear: you just lost.
masak moritz_: good late morning. I'm now caught up to sleep after the Lund hackathon. :)
mathw \o/ 09:10
it's masak!!!!
all my problems are now solved!
masak sorear: but we use "lol" ironically here, that's different.
mathw: happy to see you too. :)
mathw I can haz reprodoosibbul bugz?
moritz_ masak: I've just read an article that summarized a scientific article saying that sending children to school later in the morning (8:30am instead of 8:00) improved their performance, and made them happier 09:11
masak I've heard that too, in a BBC documentary.
moritz_ "I've always known and felt it!" 09:12
masak "The Secret Life of Your Body Clock", it was called.
mathw we went to school for 9am and we were still grumpy
masak I had a nice-ish arrangement during junior high; the bus trip was fairly long, so one could "sleep in" on the bus. 09:13
moritz_ has to use some local government web site to obtain some documents... page load times > 3 minutes... 09:15
09:15 eiro joined
pmurias sorear: great 09:16
sorear: want me to help with any part of the plans? 09:17
sorear I haven't really been following with the plans 09:18
09:19 lestrrat is now known as lest_away
sorear other than "Google/TPF want you to put Mildew/SMOP on CPAN", "Mildew uses STD", ergo, "Google/TPF wants STD on CPAN" 09:19
masak \o/ 09:21
pmurias so as i understand the plan to get STD on CPAN is to rename the STD modules, install the unicode database as a data file and ...?
masak syllogisms for the win!
moritz_ masak: buf.t has a passing TODO on master... should I unfudge it? 09:22
masak probably. which test is it?
moritz_ Buf ~~ Positional, iirc 09:23
masak oh, certainly.
that must have simply slipped my mind.
pmurias sorear: i want to help with getting STD on CPAN as you seems to be also interested it that i'm asking if you want help with any part of that
sorear oh, sorry, I read that completely backward 09:25
as "do you want to help me with..."
pmurias: rename STD output modules, use better methods for initializing PERL6LIB, look for the compiled setting in PERL6LIB, profit 09:26
pmurias mildew will have it's own setting 09:27
how do we want to initialize PERL6LIB? 09:28
sorear File::ShareDir + . 09:29
+ ./lib
pmurias lib6 instead of lib?
sorear I don't think so 09:31
the current trend is to segregate p6 by extension
pmurias ok
if we segregate by extension wouldn't using PERL5LIB be fine
?
sorear maybe, but $PERL6LIB is before my time 09:32
pmurias PERL6LIB is from before we were using special perl6 extensions 09:33
PERL6LIB = PERL5LIB + what's defined in the PERL6LIB env var should work 09:34
09:34 JimmyZ joined 09:35 envi^home joined
pmurias maybe with a defined PERL6LIB env var overridding instead of adding 09:36
masak phenny: tell pmichaud that I suppose Rakudo master 2010.06-112-g28762fd is post-closures-merge, yes? well, if I remove the pir::clone workarounds, the tests that failed prior to those workarounds start failing again. :-/ 09:37
phenny masak: I'll pass that on when pmichaud is around.
jnthn morning
pmurias sorear: that's a minor thing and we can always tweak that later
dalek ecza: 9dffd3e | sorear++ | Kernel.cs:
Push more class system functionality down into the kernel

trivial. MRO implementation started.
09:38
masak jnthn: \o
09:39 lest_away is now known as lestrrat
sorear hehehehe. 09:43
sorear realizes niecza is currently powerful enough for loops - but only over Church numerals
pmurias found and STD bug 09:47
sorear reason ++n why I don't like 0 but True : it will blow up in your face unless somebody - perhaps a completely unrelated module? had done use open 'Int';
er
use nonfine
nonfinal
arnsholt Something like it is needed though 09:48
Sometimes a value that is numerically 0 but booleanly true is what you really want
pmurias if somebody messes with your Int class 1) he is an idiot 2) you have a problem
sorear pmurias: not if. unless. 09:49
somebody NEEDS to mess with your Int class for 0 but True to work
jnthn It doesn't touch the original Int class.
sorear or you can do it yourself, but forgetting to do it yourself is an easily masked bug
jnthn: post-CHECK-time subclassability is opt-in 09:50
pmurias checks that
jnthn Classes are open and non-final by default, but may easily be closed 09:51
or finalized not by themselves but by the entire application
So closing is an application wide decision
(first 2 lines from S12)
pmurias sorear: what should canonicalize_name return for CALLER:<$foo>? 09:54
sorear CALLER:<$foo> 09:56
note that CALLER in this context is a syntactic category and has nothing to do with the package 09:57
CALLER:<$foo> is the same form of name as infix:<+>
and is not at all related to CALLER::<$foo>
(which, incidentally, is not a name at all)
pmurias sorear: it returns a list, should the first element be CALLER:: or CALLER 10:02
i should have asked about CALLER:: :/ 10:03
10:03 masonkramer left, masonkramer joined 10:04 thepler left 10:05 thepler joined
masak sorear: what jnthn said. one doesn't have to explicitly open the Int class. 10:05
sorear pmurias: canonicalize_name should *never* see CALLER::<$foo> 10:08
CALLER::<$foo> is an expression, not a name
the only name there is CALLER
pugssvn r31559 | pmurias++ | [STD] fix bug
sorear ($package):: is a term representing the pacage hash
($hash)<$key> is a postcircumfx 10:09
pmurias sorear: se above bug
* see above bugfix
sorear I said should never see 10:10
which should never be taken as 'never sees'
code has a habit of not working
sorear out. 10:17
moritz_ \o/ I just got a mail that my belatly submitted talk to YAPC::EU has been accepted after all 10:19
dalek ecza: 4281ff6 | sorear++ | (5 files):
Implement method addition metamethods
10:20
pmurias moritz_: i understand from that that you'll be at YAPC::EU 10:25
moritz_ pmurias: yes. You too? 10:26
pmurias yes
moritz_ \o/
finally we meet in person
I'll be there from Aug 1 to 6th (have to leave at noon on the 6th)
10:34 agentzh left 10:38 Mowah left 10:42 Mowah joined, lestrrat is now known as lest_away 10:59 thepler left, sawyer_ left, fridim_ left, thebird left
mathw moritz_: what's your talk about? 11:01
11:01 fridim_ joined
masak Damian Conway won't attend YAPC::EU due to a death in his family. conferences.yapceurope.org/ye2010/news/589 11:02
11:02 thepler joined, sawyer_ joined, thebird joined
jnthn masak: Yes, just saw that. Poor Damian. :-( 11:04
11:05 thepler left, sawyer_ left, thebird left
masak TimToady: lines($filename.IO) -- +1 11:07
11:08 pnu left
jnthn Cannot decrement constant 11:08
;-)
masak jnthn: TimToady isn't an evalbot :P
jnthn rakudo: -- +1 # I hope... ;-) 11:09
p6eval rakudo 04a918: OUTPUT«Cannot assign to readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 11:/tmp/MSGZBJUnrr␤»
jnthn Phew :-)
masak 'assign to' should really be 'decrement', though.
jnthn That's probably a pain to do
But yes, it would be more awesome.
masak pity.
11:10 thebird joined
jnthn Well, we could check for the flag in the -- op 11:10
But then we'd end up re-chekcing it in infix:<=>
Which is a bit wasteful
masak should only need to check it when an error actually occurs, at which point waste isn't an issue. 11:14
11:15 Backglass joined, sawyer_ joined, thepler joined
Backglass anyone can help me with a script? please I've been here is 3h and I can not make it work 11:16
masak Backglass: we'll gladly help you with your Perl 6 script.
Backglass: 3h? you just arrived.
masak and Backglass privmsg a bit 11:17
11:21 pnu joined
moritz_ mathw: "Perl 6 and the real world" (physical modelling) 11:31
jnthn \o/
masak [backlog] wait, so you're saing that `3 < any(1, 7) < 5` should be false, because the junction evaluates first both comparisons with 1, and then both with 7? 11:33
I must say that makes a whole lot of intuitive sense.
moritz_ somehow the non-zero exit statusses have returned
masak were they ever gone?
moritz_ mostly 11:34
masak rakudo: say [+] [1,2,3] # bug courtesy of TimToady++ 11:35
p6eval rakudo 04a918: OUTPUT«6␤»
masak submits rakudobug
<TimToady> [] should never flatten in a listop
jnthn masak: I was a bit surprised by it too. It seems there is a sane way to impleemnt it also. Well, sane-ish. 11:36
masak jnthn: somehow it rings similar to the recent thing with != and junctions.
junctions sort of always evaluate outermost. 11:37
jnthn masak: Kinda-ish. :)
masak even when the syntactical layering indicates otherwise.
jnthn masak: Basically you promote the whole chained expression to a parameterized block.
masak oh!
nice.
jnthn And pass in the operands as arguments.
And make sure that the default parameter type is set to Any 11:38
And then let the dispatcher handle the rest.
11:38 JimmyZ left
jnthn Yeah, that approach hadn't occurred to me. :-) 11:38
moritz_ masak: the [+] [1, 2, 3] bug might be related to rt.perl.org/rt3/Ticket/Display.html?id=76110 11:39
masak looks
the final question seems to indicate it is. 11:40
but I don't immediately see the connection.
moritz_ the connection is that [...] around the inner expression make it work
masak right. 11:41
I'll put this issue in that bug, then.
s/bug/ticket/
11:49 Backglass left
masak turned out Backglass was a Spanish-speaking programmer who thought he needed regex assistance, but who really needed to be told about HTML::Query. :) 11:51
hejki parsing html manually.. aww 11:52
11:54 duzy` left
takadonet morning all 11:57
masak I had to ask him to stop filtering his Spanish through a translating service. it was easier for me to read in original. :)
takadonet: \o
12:13 bluescreen joined 12:14 bluescreen is now known as Guest51578
masak rakudo: my $t = 0; sub foo { my @a; my &bar = { say +@a }; unless $t++ { foo; push @a, "OH HAI"; say +@a; bar; } }; foo 12:20
p6eval rakudo 04a918: OUTPUT«1␤1␤»
masak hm. maybe I do have a too-old rakudo after all.
12:20 Maddingue joined
masak pulls 12:20
ah, I was on the buf branch. :) 12:22
phenny: tell pmichaud belay that, it's fixed, and I'm just confused. pmichaud++
phenny masak: I'll pass that on when pmichaud is around.
12:23 Ross left, Ross joined
jnthn can also remove hacks from Zavolaj and Test::Mock thanks to pmichaud++'s fixes, probably :-) 12:25
12:29 ruoso joined 12:35 araujo joined 12:39 araujo left, araujo joined
mathw puts up a big sign that says 'always check which branch you're on when things go weird' 12:41
moritz_ not only which branch, but also which host :-) 12:42
mathw that too :) 12:44
I've done it at work so many times
'hang on a sec I wrote a function here yesterday...'
moritz_ can't find it 12:45
mathw inevitably turns out that I'm looking at a release branch when I should be looking at trunk, or something like that
moritz_ in the days before I knew about version control I'd keep several copies of the same project in various stages of completeness 12:46
masak SCM branches are against basic human nature. we should forbid them.
moritz_ with telling names such as 'old', 'new', 'new1', 'even_newer', 'working' etc.
masak been there, done that. 12:47
jnthn
.oO( They should do way instain branches who confuse their masak who cannot git checkout master )
moritz_ I guess you need to go through such a phase to really appreciate SCMs 12:48
masak .oO( a masak in arrrrh )
12:48 skangas joined
mathw I still don't grok git's idea of branching 12:49
but I'll get there eventually
probably when I use it more regularly
jnthn moritz_: Seeing a codebase where there were years of commented out code marked "old" with the code below it marked "ny" is also a good way to make one appreciate it...
s/ny/new/
moritz_ re s/ny/new/, are you starting to mix up English and Swedish? :-) 12:50
masak mathw: branches are more of an emergent phenomenon in git than an actual "thing". this text might help. tom.preston-werner.com/2009/05/19/t...rable.html
jnthn It was a Swedish codebase. All the comments were in Swedish...which made deciphering the mess even more fun. :-)
(The same one where they'd marked the end of lots of sections of the code with a comment saying "end"...in Swedish. :-D) 12:51
masak the Broken Window fallacy implies that if code contains one bad thing, it will eventually contain many bad things. so, not too surprising that it was the same codebase. :) 12:54
jnthn Oh, it contained...many many many other bad things too. 12:55
13:10 gbacon joined
mathw masak: That article is awesome! Why didn't I read it before? Why doesn't everybody know about it? 13:10
[Coke] phenn - tell masak - i have a bash prompt hack that shows me the git branch I'm on. want it?
13:10 skids left
masak [Coke]: I'm right here. 13:10
[Coke] masak - well, i was in backscroll until a second ago. =-) 13:11
coke@slurpee ~/sandbox/rakudo (git:master) $
masak [Coke]: wouldn't help me; I have a bash alias that pulls-and-builds Rakudo for me, independent of the folder I'm in.
[Coke] coke@slurpee ~/sandbox/parrot (svn:^/branches/html_cleanup) $
masak [Coke]: I should probably make that alias refuse to build anything but master, though.
[Coke] masak: hokay. 13:12
masak but thanks.
[Coke] I did the bash prompt thing for pretty much the same reason, one too many times working on the wrong branch.
arnsholt [Coke]: I'm interested though =) 13:14
13:15 gbacon left
masak I seldom find myself working on the wrong branch. this is more a question of a leaky abstraction packaged into my bash alias. 13:15
13:15 gbacon joined
moritz_ I'm usually only in the wrong branch when somebody sends me a pull request, and thus interrupts my regular workflow 13:19
[Coke] nopaste.snit.ch/21831 has the relevant snippets.
13:21 perlygatekeeper joined
jnthn afk for a bit 13:22
13:27 tadzik joined, plainhao joined 13:29 lest_away is now known as lestrrat 13:31 gbacon left 13:37 slavik joined
pmichaud good morning, #perl6 13:37
phenny pmichaud: 09:37Z <masak> tell pmichaud that I suppose Rakudo master 2010.06-112-g28762fd is post-closures-merge, yes? well, if I remove the pir::clone workarounds, the tests that failed prior to those workarounds start failing again. :-/
pmichaud: 12:22Z <masak> tell pmichaud belay that, it's fixed, and I'm just confused. pmichaud++
masak morning, pm!
hm, I do have some new failures in GGE. don't know their cause yet, though. 13:38
moritz_ maybe GGE assumes a broken lexicals model? :-) 13:39
masak could be.
that's not wholly impossible when developing something with TDD. 13:40
TimToady: classes A and B each have a 'proto foo'. class C is A is B has a 'multi foo'. which proto manages the multi? 13:42
I want to express my dissatisfaction about 'an empty body C<{}> is equivalent to C<{nextsame;}>' for proto routines. I see the rationale, but it feels Wrong. 13:45
moritz_ agreed 13:46
adding a noop like Nil; shouldn't change the semantics of a routine
masak nod 13:47
mathw but you're not, you're replacing an invisible op... :P 13:52
(I agre)
s/e/ee/ 13:53
jnthn back 13:55
hi pmichaud!
Nice work on auto-viv. \o/
13:58 tadzik left, lestrrat is now known as lest_away
masak there's been work on auto-viv? 14:02
I really should finish backlogging...
pmichaud rakudo: my $a; $a[5] = 'hello'; say $a.perl;
p6eval rakudo 04a918: OUTPUT«[Any, Any, Any, Any, Any, "hello"]␤»
masak \o/
pmichaud rakudo: my $a; $a[2]<yay>[1] = 'world'; say $a.perl;
masak pmichaud++
p6eval rakudo 04a918: OUTPUT«[Any, Any, {"yay" => [Any, "world"]}]␤» 14:03
masak wow.
this changes everything! :)
moritz_: was there a weekly challenge last week? will there be one this week?
moritz_ masak: last week was $*ARGFILES 14:04
masak oh, right.
moritz_ masak: this week: Match.new, if I get around to it (and nobody has better ideas)
masak ok.
frettled So you're essentially into match-making now?
moritz_ :-)
pmichaud right now I'm working on Stringy 14:05
frettled pmichaud++: nice going on autovivification, that looks very nice.
moritz_ still is confused how say() is supposed to work 14:06
my initial thought was that it calls prefix:~ or .Stringy on the argument
slavik moritz_: just like print but adds "\n" to the end of the output?
or ... way too advanced for me
14:06 lest_away is now known as lestrrat
moritz_ and if a Str is returned, it calls .encode 14:06
and if a Buf is returned, it's printed binary 14:07
but recently TimToady mentioned that say() calls .Str
which I find confusing, because it requires a Str roundtrip for buffers
14:08 uniejo left 14:09 IllvilJa joined 14:11 uniejo joined 14:13 uniejo left
pmichaud say calls .Str on each of its arguments. 14:18
moritz_ so how does it work on buffers? 14:19
pmichaud I don't understand the question.
moritz_ say(Buf.new(123, 0, 255))
pmichaud wouldn't that just call .Str on the Buf? 14:20
moritz_ yes, and that's a problem
because Buf.Str might not be defined
pmichaud then I'd say "you can't do that"
moritz_ that seems very unintuitive
pmichaud what *should* happen there?
moritz_ it should just write the byes 123, 0 and 255 to STDOUT, followed by a newline 14:21
why should it be any harder to do IO with binary data?
pmichaud then why wouldn't Buf.Str return something that can make that happen?
or perhaps print(Buf) is overloaded
moritz_ it doesn't rountrip 14:22
due to possible ambiguous encodings, NFG and the likes
and it's just *WRONG* to convert a blob to Str just to do IO with it
it should be the other way round
pmichaud so, perhaps say invokes some other method that defaults to Str for most objects but does something differently on Buf 14:23
moritz_ ...which would be .Stringy, because that's what unifies Str and Buf
pmichaud okay, that would totally go against my understanding of what Larry has been saying about >str 14:24
.Str
moritz_ there's also the possibilty that it calls .encode on the string
which defaults to .Str in Any, but in Buf it's a no-op 14:25
pmichaud that seems far more likely, since the IO object has to deal with encoding anyway
14:25 fridim_ left
pmichaud (I presume you mean .encode on the argument) 14:25
moritz_ yes 14:26
14:26 plobsing joined
slavik what's the diff between .Str and .Stringy? 14:26
moritz_ that's what we're discussing
slavik shouldn't .Str do any encoding/decoding? 14:27
moritz_ .Str should return a Str
which is an encoding independent (and unaware) text string
one difference is that on type object, .Str returns TypeName(), and .Stringy returns '' 14:28
pmichaud a bigger difference is junctions 14:29
(1|2).Str returns "any(1,2)" while (1|2).Stringy returns "1"|"2" 14:30
slavik pmichaud: I am confused ... 14:31
(1|2) produces either 1 or 2, right?
rakudo: say (1|2)
p6eval rakudo 04a918: OUTPUT«any(1, 2)␤»
moritz_ (1|2) produces a junction of 1 and 2
pmichaud (rakudo doesn't have it right yet, which is why I'm working on it :-)
slavik I need to read about junctions :-\ 14:32
I don't have it in my right, either :P
masak on S06:89 -- "When you call any routine (or method, or rule)" -- I thought methods and rules were routines. should that be s/routine/subroutine/ ? 14:33
slavik I think I get junctions 14:34
basically junctions are like lists with a map wrapper when performing operations
am I sort of getting it?
masak yes.
pmichaud I think "or method or rule" is simply there to remind the reader that they are also routines.
slavik sweet
this is awesome for search engines 14:35
moritz_ slavik: yes. And they do something special in boolean context
that is, they collapse
slavik can junctions be used for regex/grammar?
masak they're a kind of container, which makes itself transparent in some cases of operators and sub calls.
pmichaud rakudo: if "abc" ~~ ( /ABC/ | /abc/ ) { say 'yes' }
p6eval rakudo 04a918: OUTPUT«yes␤»
pmichaud rakudo: if "abc" ~~ ( /a/ & /b/ ) { say 'yes' } 14:36
p6eval rakudo 04a918: OUTPUT«yes␤»
slavik moritz_: right, as in: if ($article ~~ /junction(keyword1|keyword2/)
yes, that ...
pmichaud rakudo: if "acd" ~~ ( /a/ & /b/ ) { say 'yes' }
slavik awesomes!
p6eval rakudo 04a918: ( no output )
pmichaud rakudo: if "acd" ~~ ( /a/ | /b/ ) { say 'yes' }
slavik basically these will replace maps and for loops on a list of things
p6eval rakudo 04a918: OUTPUT«yes␤»
pmichaud slavik: ...but only if at the end you're interested in a boolean result.
slavik pmichaud: right 14:37
pmichaud: also if I am modifying all of tem
them*
moritz_ another thing that often replaces map is >>. parallel dispatch
slavik such as: all(1,2,3,4) * 5
or something
moritz_ rakudo: say ('a', 'b', 'c')>>.uc.join(", ")
slavik but wouldn't a junction that doesn't collapse imply parallelization?
p6eval rakudo 04a918: OUTPUT«A, B, C␤»
slavik that's neat 14:38
so, once there is production ready Perl6, why would people use any other language?
moritz_ because they still need to learn it
slavik that's a given
moritz_ and because there's legacy code
slavik also given 14:39
jnthn and because the first production ready Perl 6 won't run in every environment :-)
moritz_ and because other languages might still be a better choice in some circumstances
or be faster
or have more libraries
slavik moritz_: that needs to be fixed ;)
14:39 skids joined
hejki hehe.. i hope production ready perl6 will be vastly faster than current rakudo :) 14:40
slavik if perl6 can seamlessly use perl5 cpan libraries, I doubt there is a language with significantly more libraries than Perl
and auto-parallel :D
would be nice to be able to make rakudo run transparently on a cluster (MPI, hadoop, etc.)
moritz_ hejki: I hope so too
slavik parallel dispatch across a cluster :D 14:41
14:49 patspam joined
TimToady おはよ、皆様! 14:53
slavik TimToady: Доброе утро! 14:54
I assume the two kanji is 'gazai masu'
I can read hiragana :)
moritz_ so that's a greeting?
slavik yes
wait, which one? what TimToady said or what I said? 14:55
TimToady actually, /ohayo, minasama/ "morning, everyone"
slavik ahh
sama? that's ranking us highly ...
TimToady greetings tend to be politer than usual
slavik I never knew that 14:56
I should've done linguistics ...
maybe even be smart enough to write my own programming language
TimToady if you're leaving your family for the day, you say "ittekimasu" even though the masu is polite, and the rest of the time you use the familiar forms
14:57 pmurias left
masak Google Translate had it as "I you, everyone!". seems it tries to go by sound for the hiragana. 14:59
slavik that's def 'o-ha-yo' ...
TimToady I misspelled it
slavik maybe google was expecting kanji? 15:00
TimToady it should have been あはよう
slavik oh, long o
masak ah.
TimToady or お早う
15:01 rgrau_ joined
masak one of the better pictographic logograms, if you ask me. :) 15:02
it's a sun over a horizon.
"morning"
TimToady though I'm not sure why the sun has a line across it... 15:03
moritz_ that's the horizon? :-)
TimToady seems like mouth could use the line more than sun could...
masak TimToady: that line used to be a central spot in a circle.
TimToady I think we should refactor all the chinese characters 15:04
masak TimToady: and the moon had a vertical line, which stylized as two lines.
er, two horizontal lines.
TimToady: we could call it Hanzi 6. :)
15:05 Backglass joined
masak Backglass: hi again. 15:05
masak and Backglass privmsg
slavik the nice part of japanese is that the kanji for forest is 2 trees together 15:06
or 3
same for neighborhood
TimToady when the trees are thinner, they are bigger 15:07
slavik ?
that's a first
TimToady 林 has big trees, and 森 has small trees 15:08
so "forest" vs "woods"
slavik lol
masak slavik: Mandarin has it as 林木, so three trees, but spread over two chars. :)
slavik I see
masak Chinese words seem to converge to being bisyllabic. 15:10
TimToady huffmanization 15:11
15:11 plobsing left
diakopter backlog fail 15:11
rakudo closures, FTW, again 15:12
moritz_ indeed
passes the man-or-boy test again
diakopter cool 15:13
masak std: { say "OH HAI" for 5..10 } if my $foo == 42 # working around the arbitrary "no loops in conditionals" restriction for statement modifiers :) 15:14
p6eval std 31559: OUTPUT«ok 00:01 114m␤»
masak so easy!
diakopter Japanese for "thicket"?
moritz_ should that actually invoke the closure? or do you need a 'do' for that? 15:15
TimToady it should work, but might be clearer with parens instead 15:16
masak moritz_: pmichaud changed a few spectests the other day that claimed it shouldn't invoke the closure, to saying that they should. 15:17
moritz_ how convenient :-)
diakopter rakudo: ( say "OH HAI" for 5..10 ) if my $foo <= 42 15:18
p6eval rakudo 04a918: OUTPUT«Use of uninitialized value in numeric context␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤»
TimToady std: (((say "hi") if 42) when *) unless /foo/ for lines 15:19
p6eval std 31559: OUTPUT«ok 00:01 111m␤»
jnthn rakudo: (((say "hi") if 42) when *) unless /and/ for lines
p6eval rakudo 04a918: OUTPUT«hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤»
masak innermost parens unnecessary, no?
jnthn rakudo: (((say $_) if 42) when *) unless /and/ for lines
p6eval rakudo 04a918: OUTPUT«Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmitten,␤einem starken Herzen gleich.␤Hast seit frühen Ahnentagen␤hoher Sendung Last getragen,␤vielgeprüftes 15:20
..Österr…
jnthn \o/
TimToady no, necessary, since 'when' is conditional
diakopter rakudo: (((say "hi") if 42) when *) unless /./ for lines
p6eval rakudo 04a918: OUTPUT«hi␤hi␤»
15:20 isBEKaml joined
diakopter 2 empty lines 15:20
jnthn rakudo: (((say $_) if 42) when *) unless /z/ for lines 15:21
p6eval rakudo 04a918: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmitten,␤Hast seit frühen Ahnentagen␤hoher
..Sendung L…
TimToady most anthems have plenty of empty lines
jnthn Lots of z's :-)
oh wait
moritz_ lots of non-z's
jnthn rakudo: (((say $_) if 42) when *) if /z/ for lines
:P
p6eval rakudo 04a918: OUTPUT«Land der Hämmer, zukunftsreich!␤einem starken Herzen gleich.␤»
isBEKaml :O What is `lines` ? 15:22
jnthn isBEKaml: It's a Perl 6 built-in that returns the lines of the Austrian national anthem.
isBEKaml easter egg? :P
TimToady actually, no
it's what p6eval hooks up $*IN to 15:23
jnthn :P
TimToady rakudo: say $*IN.slurp
p6eval rakudo 04a918: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmitten,␤einem
..stark…
isBEKaml I see... :D
15:26 ashleydev joined
masak isBEKaml! \o/ 15:27
isBEKaml masak! :) 15:28
masak isBEKaml: did you catch my notes for a SIC refactor?
15:28 Backglass left
isBEKaml masak: yes, I'm now trying to factor in those as to how I would approach yapsi best. :) 15:29
masak: however, one thing immediately popped out. What of nested-nested-nested-blocks?
diakopter rakudo: say $*IN.^methods
p6eval rakudo 04a918:
..OUTPUT«insprintsayopenprintftcloseslurpeofautoflushlinesgetgetctranssinfliplcp5chopsubstto-radiansabsacotanacosechchompindexceilingcotanhcombunpolartrim-trailingatanordacosevalchoptanhatanhcoseccharsrootsucucfirstsubstrtanlog10from-radianscosfmtbytespredacosecsinhasinhNumericcosechtrimase…
masak isBEKaml: my plan is this: (1) create a new runtime that runs the example in gist.github.com/464349 (2) make the new runtime work with Yapsi's compiler. 15:30
isBEKaml: what of them? they're just a chain of lexpads, each with a .parent pointing to the previous one.
rakudo: say <a b c>
p6eval rakudo 04a918: OUTPUT«abc␤» 15:31
masak rakudo: say [<a b c>]
p6eval rakudo 04a918: OUTPUT«a b c␤»
masak ah; of course. lists don't get the prettifying space arrays get, because a list is what you send in when you want to print several things. 15:32
isBEKaml masak: sorry, I was thinking we would expand the list but did not see that it's just chained together.
TimToady masak: I try to reserve the word "parent" for packages, and use "outer" for lexpads
masak TimToady: oops. thanks. fixing.
TimToady rakudo: -- +1
p6eval rakudo 04a918: OUTPUT«Cannot assign to readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 11:/tmp/1TDSUycS64␤»
TimToady s/assign to/modify/ and it stays accurate
jnthn: ^^^ 15:33
masak isBEKaml: and fetching a variable from the great-great-grandouter block just means it does `fetch [-4, $n]`
jnthn TimToady: ooh, good point
isBEKaml masak: yes, blame my reading skills. 15:35
masak isBEKaml: 's ok. I'm happy you're interested.
isBEKaml masak: "at compile time/run time, and (2) following the .parent" It's still .parent? 15:36
masak it's .outer now :)
isBEKaml under changes in the Runtime.
masak: "I only have my selfish interests! " :P 15:37
TimToady <masak> TimToady: classes A and B each have a 'proto foo'. class C is A is B has a 'multi foo'. which proto manages the multi? 15:40
the foo it would find if the protos were onlys after a C3 dispatch
jnthn TimToady: Are multi methods essentially "invisible" to the method dispatcher? 15:41
TimToady remember protos are really just onlys with extra goodies
yes
jnthn TimToady: That is, it only cares about onlys and protos?
OK
masak TimToady: ok. that (C3) was my guess.
TimToady only protos know how to dispatch to multis
masak jnthn: I was going to tell you that this was my conclusion too. :)
TimToady well, and direct invocation
masak how does one "directly invoke" a multi? 15:42
TimToady by get a reference to it any way you like
15:42 yves__ left
TimToady sig qualification, running down a candidate list yourself, etc 15:42
spinclad masak: i'm surprised by the negative indexing for outer level (but that's just push v unshift, or [*-n] )
jnthn TimToady: On your answer to the duplicate visits question - I get how we avoid them in that nextcame won't throw you up a level. Would .* maybe result in the dupes though?
TimToady s/get/getting/
masak what happens if one refers to something by signature, and more than one variant matches the signature? 15:43
TimToady then you get a candidate list, I expect
jnthn TimToady: oh, I guess not
TimToady: Since we go up the tree until we find the controlling proto
TimToady I think the lower proto blocks downward propagation of the upper set
jnthn And then delegate to its dispatcher
Right
OK I start to see how this might not be insane. 15:44
masak spinclad: no, the negative indexing comes from the fact that we take a number of steps "back" from the current block by following .outer links.
TimToady I think we can define all the candidate sets to be disjoint
jnthn We're going to break a lot of code by requring people to write "proto"s whenever they want to write a multi.
TimToady ja
masak rather that than implicit protos. 15:45
jnthn I figure most protos are going to end up with signatures that are essentially slurpy though 15:46
Well
TimToady 'use autoproto' :)
jnthn Depends how a proto's signature and a candidate's signature relate to each other
TimToady: Do they?
TimToady: That is, if I declare a proto's signature as having, say, two positional args, do all the candidates also have to have two positional args? 15:47
TimToady probably, given how we want to use the proto to remap nameds to positionals 15:48
but maybe it's just erroneous if you do something silly
masak "Perl 6: just erroneous if you do something silly" 15:49
isBEKaml This might be a silly question - are arguments in protos strictly typed ? (characters and integers are freely interconvertible, how do other types relate to each other? )
TimToady if you have proto foo ($a,$b) and pass it :a(1), :b(2), then the proto should probably rewrite the capture to (1,2)
masak isBEKaml: if things are typed, not even strings and integers are interconvertible. 15:50
jnthn Maybe we should require nextwith($a, $b) explicitly in that case?
Hmm, maybe not
TimToady: The problem that occured to me is that we can't actually write a proto infix:<+>($a, $b) { nextsmae; }
15:51 pyrimidine joined
TimToady we want the position of the proto to be explicit, but most of the time we want to write the body of the proto implicitly 15:51
jnthn TimToady: Because we have arity-0 and arity-1 versions of the infixes.
isBEKaml masak: yes, Strings and Integers were never interconvertible. that was just how strictly we're classifying types.
TimToady $a?,$b? maybe
jnthn TimToady: I guess the .ocunt gives you the corect answer
.cout, correct
...count! 15:52
jnthn gives his keyboard a disappointed glare
spinclad .coun't
isBEKaml .count.drop('n')
TimToady isn't the count - n always 0? 15:53
spinclad there's that n't key again
TimToady sometimes it worksn't 15:54
oopsn't
n'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn'tn't^C
it's sticky today 15:55
masak dohn't!
TimToady where's my acetone?
oh wait, I used it to make my coffee... 15:56
masak yuck!
isBEKaml wait, what? coffee - acetone?
:O
spinclad cleans his tea with alcohol instead
15:59 macdaddy joined, macdaddy is now known as Guest23936
masak can you ask a package about its 'our' subs? 16:02
is there a metamodel for packages?
er, metaobject. 16:03
TimToady std: say GLOBAL::.keys.grep(/^'&'/)
p6eval std 31559: OUTPUT«ok 00:01 113m␤»
masak ok. 16:04
so... no metaobject? :)
TimToady std: say $pkg::.keys.grep(/^'&'/)
p6eval std 31559: OUTPUT«ok 00:01 111m␤»
TimToady I didn't expect that to work :) 16:05
masak std bug.
TimToady bug
I'm not entirely sure how it parsed... 16:07
16:09 justatheory joined 16:10 Mowah left
TimToady oh, morename allows a final :: component, but that's not quite what you want here 16:10
std: ($foo):: # probably fails 16:11
p6eval std 31559: OUTPUT«===SORRY!===␤Variable $foo is not predeclared at /tmp/8fHNUxWaAO line 1:␤------> ($foo⏏):: # probably fails␤Confused at /tmp/8fHNUxWaAO line 1:␤------> ($foo):⏏: # probably fails␤ expecting any of:␤ coloncircumfix␤
..signat…
TimToady std: $defeat-the-name-checker:: 16:12
p6eval std 31559: OUTPUT«ok 00:01 108m␤»
masak phenny: tell ingy testml-pm6 added; you're now a proto contributor, so the next one you'll be able to add yourself. :) 16:13
phenny masak: I'll pass that on when ingy is around.
masak rakudo: $foo::
p6eval rakudo 04a918: ( no output )
masak rakudo: $foo::; say "alive"
p6eval rakudo 04a918: OUTPUT«alive␤»
masak submits rakudobug
TimToady rakudo: $foo:: = 42; say $foo::; 16:14
16:14 patspam left
p6eval rakudo 04a918: OUTPUT«Null PMC access in getprop()␤ in '&infix:<=>' at line 1␤ in main program body at line 11:/tmp/BJHujVYpHX␤» 16:14
masak ok, that goes in the same ticket :) 16:15
TimToady rakudo: $foo::('') = 42; say $foo::('');
p6eval rakudo 04a918: OUTPUT«===SORRY!===␤Indirect name lookups not yet implemented at line 11, near " = 42; say"␤»
16:15 Khisanth joined
masak upgrades the ticket to a Null PMC access 16:15
pmichaud 15:22 <isBEKaml> :O What is `lines` ? 16:16
15:22 <jnthn> isBEKaml: It's a Perl 6 built-in that returns the lines of the Austrian national anthem.
HAHAHAHAHAHAHAHAHAHAHAHAHA
masak well, it is. :P
rakudo: say $foo:: 16:18
p6eval rakudo 04a918: OUTPUT«Null PMC access in type()␤ in main program body at line 11:/tmp/JQb_fi5YTT␤»
isBEKaml $:: is global package?
TimToady will experiment with adding a postfix :: that translates a Mu:U to a Hash
:: doesn't imply global in P6 16:19
isBEKaml rakudo: say $::foo
p6eval rakudo 04a918: OUTPUT«===SORRY!===␤Symbol '$foo' not predeclared in <anonymous> (/tmp/Dg9f306d3_:11)␤»
isBEKaml anonymous? I see, no global package. 16:21
isn't GLOBAL meant for explicitly specifying it? or, how do we do that? 16:22
TimToady yes, GLOBAL:: means the global package
we try to discourage its use by dehuffmanizing it 16:23
isBEKaml yes, I'd rather not use it. Just wanted to know. (I hate global variables too)
TimToady though it is your current package at the start of a file
16:24 IllvilJa left, cdarroch joined, cdarroch left, cdarroch joined, ashleydev_ joined 16:26 ashleydev left
isBEKaml danke 16:28
16:29 Khisanth left, ashleydev_ left
TimToady errands & 16:31
isBEKaml finds Google Translate hilariously comical at translation from Hindi to English when translating old hindi songs... 16:37
but then poetry was never a machine's stronghold.... :D 16:38
ash_ isBEKaml: in a lot of cases where you might want to use a global variable, a dynamic variable is acceptable (those are the $*foo kind) 16:39
isBEKaml ash_: I thought $*foo kind of variables are implicit ones, aren't they? 16:40
ash_ no, $^foo are
isBEKaml ash_: as in $*IN, $*OUT and so on..
ash_ $*foo is dynamic, as in it looks up scopes till it finds one that matches the name 16:41
16:41 ashleydev joined
ash_ rakudo: sub f { say $*foo }; my $*foo = 5; f; { my $*foo = 6; f; } 16:41
p6eval rakudo 04a918: OUTPUT«5␤6␤»
ash_ $*IN, $*OUT, etc. are dynamic variables 16:42
isBEKaml I could just define them without $*...?
[Coke] sub f { say $foo } ; my $foo = 5; f ; {my $foo = 6; f};
rakudo: sub f { say $foo } ; my $foo = 5; f ; {my $foo = 6; f};
p6eval rakudo 04a918: OUTPUT«5␤5␤»
ash_ see the difference from how [Coke]++ did it? 16:43
isBEKaml yes, I was just typing it out when I hit on the sub f and it dawned on me... :S
ash_ in a lot of cases, when you think you want global, you really want dynamic, but thats not always true, just asying
saying*
masak what [Coke] did shouldn't compile.
std: sub f { say $foo } ; my $foo = 5; f ; {my $foo = 6; f}; 16:44
p6eval std 31559: OUTPUT«===SORRY!===␤Variable $foo is not predeclared at /tmp/f3cd1gPBp7 line 1:␤------> sub f { say $foo⏏ } ; my $foo = 5; f ; {my $foo = 6; f};␤Check failed␤FAILED 00:01 111m␤»
ash_ yeah, my $foo should be before sub f
masak known rakudobug.
ash_ std: my $foo = 5; sub f { say $foo } ; f ; {my $foo = 6; f}; 16:45
p6eval std 31559: OUTPUT«ok 00:01 111m␤»
ash_ rakudo: my $foo = 5; sub f { say $foo } ; f ; {my $foo = 6; f};
p6eval rakudo 04a918: OUTPUT«5␤5␤»
16:47 ashleydev_ joined
isBEKaml ash_: right. Given that global variables can be difficult to track, how exactly do dynamic variables resolve this? 16:48
the compiler tries to track the block where this was defined and use them according to the scope. But isn't it actually like global in that sense? 16:49
rakudo: sub f { say $*foo }; my $*foo = 5; f; { my $*foo = 6; f; } f;
p6eval rakudo 04a918: OUTPUT«===SORRY!===␤Confused at line 11, near "{ my $*foo"␤»
isBEKaml rakudo: sub f { say $*foo }; my $*foo = 5; f; { my $*foo = 6; f; }; f;
p6eval rakudo 04a918: OUTPUT«5␤6␤5␤»
ash_ dynamic variables are based on scope, its looks up the stack frames till it finds a matching variable with that name or a GLOBAL 16:50
isBEKaml right... I get this now..
16:50 ashleydev left
ash_ so, if you change a variable in an inner scope, like $*IN to point to something new and call a function, everyone that tries to write to $*IN gets directed to the new $$*IN 16:50
instead of the global $*IN
s/$$/$/ 16:52
isBEKaml TIL about dynamic variables and the difference between global and dynamic variables! :)
ash_ TIL?
isBEKaml I had never heard of dynamic variables attaching themselves to scopes/blocks until now. 16:53
masak wow, I just realized I have no idea how the 'state' declarator would be implemented. perhaps someone would like to enlighten me?
isBEKaml Today I Learned (/me looks at reddit)
jnthn masak: I did an implementation of that once...
16:53 ashleydev_ left
masak jnthn: :) 16:53
ash_ ah got ya, perl5 has dynamic variables too 16:54
jnthn Wonder if I can remember how I did it. ;-)
arnsholt isBEKaml: Some Lisps have only dynamic variables. They're a very powerful tool in cases like globals
masak isBEKaml: the middle third of this post contains a revelation I had about dynamic variables (also known as "contextuals"): use.perl.org/~masak/journal/40333
ash_ isBEKaml: in perl5 'local $f' makes $f a dynamic variable
masak jnthn: ok, so here's my problem. there's the lexpad and the static lexpad.
jnthn: a 'state' variable needs to survive between invocations of a function, for example. 16:55
jnthn Right, but it doesn't want to live in the static lexpad either really
masak because you can't change it!
jnthn That too
isBEKaml arnsholt: Can you elaborate? I'm learning about FP too and would like more info. :)
jnthn Also because it's get clozhures rong.
masak isBEKaml: Perl 1 only had dynamic variables. 16:56
jnthn: so, how *is* it done? :)
jnthn I did it by attaching an extra table on-demand to store the state variables in.
iirc attaching to Parrot sub
isBEKaml ash_: ah, local $foo. I didn't think of them as dynamic variables, just as named variables specific to _this_ block and forget later.
arnsholt isBEKaml: The important concepts here are lexical and dynamic scope (see en.wikipedia.org/wiki/Lexical_scope...c_scoping)
jnthn And cloning it lost it. 16:57
Or something like that.
Essentially you don't want it to survive over a closure being taken.
arnsholt Lexical scope is stuff that belongs "textually" with the use of something (variables in this case), while dynamic is resolved via the call chain whenever it's used
isBEKaml masak: Perl 1 ?
jnthn Anyway, I then had a call (or op or something) that was emitted at the start of things with state variables that would restore them from this extra table. 16:58
ash_ Common Lips does both static variables and dynamic variables, scheme does only static variables (no dynamic's anymore)
arnsholt Dynamic scope is a lot easier to deal with, since you can just walk up your call stack to find stuff, while lexical scope is usually more useful
Emacs Lisp is probably the most common language that only has dynamic variables today 16:59
17:00 thebird left
masak isBEKaml: sorry, I don't understand the question. :) 17:00
isBEKaml <masak> isBEKaml: Perl 1 only had dynamic variables.
17:00 dakkar left
masak <isBEKaml> masak: Perl 1 ? 17:00
what is it you're asking?
arnsholt isBEKaml: Perl 1 is simply the first version of Perl TimToady released, way back when
masak arnsholt++ # understanding the question :) 17:01
isBEKaml Perl 1 *only* had dynamic variables...
?
17:01 TiMBuS left
masak isBEKaml: as opposed to both dynamic and lexical ones. 17:01
isBEKaml: the my/local separation came later.
isBEKaml ah, okay.. I got on perl only since 5.8.8. :)
moritz_ 'my' only was introduced in perl 5, iirc
slavik ooh, speaking of 'my' will types also be allowed as optional? 17:02
moritz_ rakudo: my $x = 3; say $x # no typing necessary 17:03
isBEKaml arnsholt: in all the languages that I dealt with (except perl as we know now :) ), I only had seen lexical and global variables. Thinking of some variables as dynamic is new to me.
p6eval rakudo 04a918: OUTPUT«3␤»
isBEKaml slavik: I guess, here the type is inferred by the compiler. 17:04
rakudo: my $x = 5; say $x.WHAT; my Int $y = 50; say $y.WHAT;
p6eval rakudo 04a918: OUTPUT«Int()␤Int()␤»
slavik :D
rakudo: my Number $a=5; say $a.WHAT
p6eval rakudo 04a918: OUTPUT«===SORRY!===␤In "my" declaration, typename Number must be predeclared (or marked as declarative with :: prefix) at line 11, near " $a=5; say"␤»
ash_ Num 17:05
isBEKaml Num, I htink
slavik rakudo: my Num $a=5; say $a.WHAT
p6eval rakudo 04a918: OUTPUT«Int()␤»
17:05 ashleydev joined
slavik is that supposed to happen? 17:05
ash_ rakudo: say 5.^parents
p6eval rakudo 04a918: OUTPUT«Cool()Any()Mu()␤»
isBEKaml All Nums are cool! :D
slavik parents?! ooh
ash_ slavik: yeah, thats fine, an Int fits in a Num 17:06
slavik perl6 is getting close to * ;)
moritz_ no, Int ~~ Num is a fossile
slavik ash_: but I requested a Num ...
ash_ oh, it is?
slavik wait, huh?
masak isBEKaml: I think I'm about to blow your mind, then. :)
isBEKaml slavik: Int <: Num
masak alpha: sub foo { state $a = 5; say $a++ }; foo; foo; foo
slavik moritz_: I lost you there
p6eval alpha 30e0ed: OUTPUT«5␤6␤7␤»
masak isBEKaml: what about that? :)
isBEKaml masak: sure, yeah! 17:07
no, don't tell me yapsi. I just noticed it. :)
ash_ masak: also known as static variables in C :P
masak ash_: except that Perl 6 also does cloning :)
ash_ i like the name state though, it fits better
rakudo: say 12.0.^parents 17:08
p6eval rakudo 04a918: OUTPUT«Cool()Any()Mu()␤»
isBEKaml masak: cloning? Shallow or deep ? :P
masak isBEKaml: shallow, I guess. cloning of the closures.
17:09 tylercurtis joined
isBEKaml rakudo: my @arr=<a b c d>; @arr.^methods.sort.join(",").say 17:13
p6eval rakudo 04a918:
..OUTPUT«,ACCEPTS,ACCEPTS,BUILD,BUILDALL,Bool,Bool,CREATE,Capture,Capture,Int,Num,Num,Numeric,Numeric,PARROT,REJECTS,Seq,Str,Str,Str,WALK,WHENCE,WHERE,WHICH,abs,acos,acosec,acosech,acosh,acotan,acotanh,all,any,asec,asech,asin,asinh,at_key,at_pos,at_pos,at_pos,atan,atan2,atanh,batch,bless,by…
ash_ alpha: my &a = -> $b { state $a = 3; $a += $b; say $a }; my &b = &a.clone; a 4; b 3; a 4; b 5;
p6eval alpha 30e0ed: OUTPUT«7␤6␤11␤11␤»
ash_ wow, that works
nifty
isBEKaml methods repeated. is that supposed to happen?
pmichaud those are multimethods
(so yes) 17:14
ash_ cloning the closure copied the state variable
rakudo: my @arr = <a b c>; say ~@arr.^methods(:local).sort
p6eval rakudo 04a918: OUTPUT«at_pos delete new perl splice␤»
isBEKaml what does ~prefix do? 17:15
I think I see that one as ~ concat...
and I didn't know about :local. P6 blows my mind everyday! :) 17:16
ash_: that was pretty nifty. Closures are cloned as masak++ said.. :) 17:18
jnthn pmichaud: multis flatten?
ash_ isBEKaml: prefix:<~> will stringy whatever its prefixing 17:19
jnthn pmichaud: I think it's more just that the methods are multiple times in the inheritance hierarchy.
isBEKaml pmichaud: notice the "," starting the output..
17:19 dalek left
ash_ rakudo: say ~31.123 17:19
pmichaud jnthn: could be that also.
isBEKaml a blank method? :D
p6eval rakudo 04a918: OUTPUT«31.123␤»
17:19 dalek joined
ash_ well, that was a silly example 17:19
jnthn pmichaud: I've never had multis flattening, fwiw.
pmichaud right
jnthn pmichaud: That may have changed when you re-did lists.
ash_ rakudo: my $a = ~1; say $a.WHAT, $a;
pmichaud my point was simply that there's more than one method of the same name in the set.
p6eval rakudo 04a918: OUTPUT«Str()1␤»
sorear good morning #perl6
jnthn ah, OK
pmichaud probably shouldn't have said "multi"
jnthn Then I agree
Yes, that's what confused me. :-)
o/ sorear 17:20
ash_ prefix:<+> converts something to a number
isBEKaml ash_: yes, I was aware of + for numifying things..
17:20 Khisanth joined
isBEKaml no, I'm still aware of infix:<+>! 17:21
17:21 gbacon joined
isBEKaml :P 17:21
ash_ ~ on an array will do .join(' ')
prefix:<~> that is
rakudo: sub postfix:<!> (Int $b) { [*] 1..$b }; say 5!;
p6eval rakudo 04a918: OUTPUT«120␤»
isBEKaml ash_: yes, audreyt++ (I think I saw that in a presentation she gave) 17:22
masak jnthn: thinking about it, it seems to me that the 'state' information has to be stored on the Code object.
ash_ isBEKaml: i think its easier to think of variables as prefix:<sym> instead of simply '+' because they can be used in so many different ways. its important to distinguish the differences 17:23
pmichaud (the dynamic Code object) 17:24
masak aye.
isBEKaml ash_: right. context is important.
masak gosh, I could really talk about variables all day!
isBEKaml .OUTPUT«,ACCEPTS,ACCEPTS 17:26
ash_ my %a = 'a' => 4, '4' => 2; say +%a; # prefix:<+> on arrays and hashes gives you the length
isBEKaml the "," before first ACCEPTS - is that right?
pmichaud "number of elements"
(there is no 'length' in Perl 6 :-)
ash_ okay, yeah, bad wording there, # of elements
17:28 patspam joined, Mowah joined
isBEKaml okay, so that explains the +@arr -1 idiom. :) 17:28
sorear masak: I'm planning to implement state variables in niecza as anonymous lexicals in OUTER:: 17:29
masak sorear: hm, interesting.
ash_ isBEKaml: *-1 is easier to write 17:30
rakudo: my @a = <a b c>; say 'last element is ' ~ @a[*-a];
p6eval rakudo 04a918: OUTPUT«Could not find sub &a␤ in <anon> at line 11:/tmp/fhoMD4mbZq␤ in 'Any::postcircumfix:<[ ]>' at line 1564:CORE.setting␤ in main program body at line 1␤»
ash_ rakudo: my @a = <a b c>; say 'last element is ' ~ @a[*-1]; # oops
p6eval rakudo 04a918: OUTPUT«last element is c␤» 17:31
isBEKaml rakudo: my @a = <a b c d>; for 0 .. +@a -1 -> $i { say @a[$i] }; ## Saw this kind of usage in old pugs code examples. 17:32
p6eval rakudo 04a918: OUTPUT«a␤b␤c␤d␤»
pmichaud ick. 17:33
ash_ rakudo: my @a = <a b c>; for @a.keys -> $i { say @a[$i] }
pmichaud new way of doing that:
p6eval rakudo 04a918: OUTPUT«a␤b␤c␤»
ash_ #is how i'd do it...
moritz_ only if you actually need $i somewhere else
pmichaud rakudo: my @a = <a b c d>; for ^@a -> $i { say @a[$i] }
moritz_ otherwise you can just iterate @a directly
p6eval rakudo 04a918: OUTPUT«a␤b␤c␤d␤»
lue ohai o/
pmichaud rakudo: my @a = <a b c d>; for @a.kv -> $i, $v { say "$i: $v" }
17:33 masak left
ash_ pmichaud++ for being even more awesome in his example 17:33
p6eval rakudo 04a918: OUTPUT«0: a␤1: b␤2: c␤3: d␤» 17:34
moritz_ pmichaud: I actually prefer @a.keys, in case it's a specially shaped array
pmichaud moritz_: in which case, .kv might be nicer :-)
but yes, TMTOWTDI
isBEKaml lue: your photo was released today. :P
lue no it wasn't.
17:34 cinch joined
isBEKaml Life.U.Everything! 17:35
www.nzherald.co.nz/space/news/artic...d=10657065 ## gee..
moritz_ rakudo: say 'abc'.list.WHAT
p6eval rakudo 04a918: OUTPUT«List()␤» 17:36
isBEKaml coming back to that icky example I gave, in that particular file the $i was really needed. moritz_ was right on that. 17:37
17:38 Ross left
isBEKaml rakudo: my $iter = 0 ... 5; say $iter.WHAT; 17:38
p6eval rakudo 04a918: OUTPUT«Int()␤»
isBEKaml really?
pmichaud that's weird. 17:39
rakudo: say (0 ... 5).WHAT;
p6eval rakudo 04a918: OUTPUT«List()␤»
pmichaud rakudo: say (0...5).item.WHAT
isBEKaml rakudo: my $iter = 0 ... 5; for ^$iter -> $i { say $i; }
p6eval rakudo 04a918: ( no output )
rakudo 04a918: OUTPUT«List()␤»
isBEKaml rakudo: my $iter = (0 ... 5); for ^$iter -> $i { say $i; } 17:40
p6eval rakudo 04a918: OUTPUT«0␤1␤2␤3␤4␤5␤»
pmichaud isBEKaml: I'm not sure what you're expecting there.
rakudo: my $iter = (10 ... 15); for ^$iter -> $i { say $i; }
p6eval rakudo 04a918: OUTPUT«0␤1␤2␤3␤4␤5␤»
pmichaud rakudo: my $iter = (10 ... 15); say $iter;
p6eval rakudo 04a918: OUTPUT«10 11 12 13 14 15␤» 17:41
pmichaud rakudo: my $iter = (10 ... 15); say $iter.WHAT;
p6eval rakudo 04a918: OUTPUT«List()␤»
pmichaud ohhhh!
okay
I understand.
isBEKaml Oh...
pmichaud my $iter = 10 ... 15
parses as
(my $iter = 10) ... 15
jnthn That's...surprising. 17:42
rakudo: my $r = 10 .. 15; say $r.WHAT 17:43
isBEKaml I'm not quite sure I understand ^$iter. It just spews out indexes ?
pmichaud Yes. I'm still not a fan of the item-assignment form of '='
p6eval rakudo 04a918: OUTPUT«Range()␤»
17:43 cdarroch left
jnthn I thought .. and ... would have same precedence? 17:43
pmichaud isBEKaml: ^$value is the same as 0..^$value
jnthn: .. is much higher precedence
isBEKaml: which means "0 up to $value"
lue is ... higher than = though?
isBEKaml lue: = seems higher than ... 17:44
pmichaud ... is lower than item assignment, but higher than list assignment
jnthn pmichaud: Any idea why?
Yeah, I can see it in the grammar now.
pmichaud my @a = 1...5; # same as my @a = (1...5);
my $a = 1...5; # same as (my $a = 1) ... 5;
jnthn I was more after rationale for them being different.
pmichaud jnthn: could be fossil 17:45
17:45 cdarroch joined, cdarroch left, cdarroch joined
pmichaud could be so that my $range = 1..5; dtrt 17:45
jnthn It feels a bit like a violation of the principle of least surprise. But maybe ... being same as .. would be surprising in other ways...
lue hrm, feels inconsistent.
jnthn Oh
pmichaud yes, having ... higher would be very strange
jnthn maybe it's that
isBEKaml I have often seen people interchange ... and .. in p5 code.
jnthn 1,2,3 ... *
Would it need to be (1,2,3) ... * if it had same prec as .. ? 17:46
pmichaud no
comma is lower
but
jnthn OK, then I'm out of guesses. :-)
pmichaud $a // 3 ... *
lue rakudo: say (1..5).WHAT; say (1...5).WHAT
p6eval rakudo 04a918: OUTPUT«Range()␤List()␤»
pugssvn r31560 | moritz++ | [t/spec] switch split-simple.t to planless testing
pmichaud $a ?? 3 !! 5 ... *
isBEKaml so it feels like a nasty surprise.. :(
pmichaud it's an interesting question about precedence there. I wonder how TimToady++ will respond. :-) 17:47
jnthn pmichaud: on $a // 3 ... * I'm not sure how i'd most naturally read that tbh.
pmichaud jnthn: me either :-)
jnthn If I was writing it I'd probably write parens for making either meaning lcear. 17:48
*clear
lue is // integer division?
jnthn defined or
like || but checks definedness rather than truth
pmichaud jnthn: only if you recognized it could be unclear, though. :-)
moritz_ lue: it's defined-or
jnthn pmichaud: true ;)
lue (I see it as ($a // 3) ... *)
pmichaud lue: what about 17:49
my @x = $a // 3 ... *
...now how would you see it?
or even better:
my @x = $a.list // 3 ... *
(although I guess .list would always be defined)
lue --brain > /usr/include/null
pmichaud or how about: 17:50
my @a = @b || 3,5,7 ... *
lue I think you'd be in a very interesting position to try that w/o parens. 17:51
17:51 Ross joined
lue rakudo: multi sub postcircumfix:<( )>($a, $b) { $a * $b }; say 3(5); 17:52
p6eval rakudo 04a918: OUTPUT«invoke() not implemented in class 'Integer'␤ in main program body at line 11:/tmp/FEN2f9aoHd␤»
isBEKaml rakudo: my @b; my @a = @b || 3,5,7 ... *; @a.perl.say;
p6eval rakudo 04a918: ( no output )
isBEKaml rakudo: my @b; my @a = @b // 3,5,7 ... *; @a.perl.say; 17:53
p6eval rakudo 04a918: ( no output )
isBEKaml I guess I'm wrong about defined-or... @b.defined?
rakudo: my @b; @b.defined.perl.say; 17:54
p6eval rakudo 04a918: OUTPUT«Bool::True␤»
isBEKaml slaps head..
lue should I give my patch for the beginnings of ::= ? I'm waiting to resolve some failed tests first, though... 17:56
in S03-operators/binding-arrays.t, the last test compares to a specific wording in an Exception. I feel that needs to be changed to a simple die_ok 17:58
moritz_ lue: most of those tests have a very good reason to check that the exception has something to do with the actual error 17:59
lue: often it's OK to change the regex, but a simple dies_ok often is not enough
ingy greetings 18:00
phenny ingy: 16:13Z <masak> tell ingy testml-pm6 added; you're now a proto contributor, so the next one you'll be able to add yourself. :)
lue The problem I have with checking for the exact wording is that the exact error is usually implementation-dependent.
ingy phenny: tell masak \o/
phenny ingy: I'll pass that on when masak is around.
lue moritz_: what regex? here's the line: ok $! ~~ Exception, "Can't bind Int to array";
18:00 whiteknight joined
moritz_ lue: yes, it's something that needs to be addressed by standardizing error messages... which the tests do 18:00
lue: that just checks that $! is an Exception, nothing more 18:01
ingy phenny: tell lichtkind I'll look into it.
phenny ingy: I'll pass that on when lichtkind is around.
moritz_ lue: the string is a just the test lable passed to ok()
lue durrh.
.oO(me thtupid) then I'll have to see why it comes out not ok
well, here's why it failed: 18:04
> my @a := 1; print @a ~ " "; say @a.WHAT
1 Int()
18:05 whiteknight left
lue that ain't good. 18:05
moritz_ or in other words, your binding implementation doesn't properly type check
jnthn It may fwiw also be that my @a; doesn't tag @a with a Positional constraint.
lue rakudo: my @a; say @a.WHAT 18:06
moritz_ lue: what does my Positional $a; $a := Int; say $a.WHAT; prodcue?
p6eval rakudo 04a918: OUTPUT«Array()␤»
moritz_ default type != type constraint
lue > my Positional $a; $a := Int; say $a.WHAT; 18:07
You cannot bind a variable of type Int() to a variable of type Positional().
moritz_ that's good 18:08
if that's the biggest problem, I think the patch is still worth submitting
18:08 eternaleye joined
lue yeah, I just wanted to make more tests run to make the patch 75.4% more effective :) 18:09
moritz_ is "".split('').elems, 0, q/"".split()/; 18:10
18:10 charsbar_ left
moritz_ is "".split(':').elems, 1, q/"".split(':')/; 18:11
"huh"
18:11 charsbar joined
moritz_ that's from split.t 18:11
both blessed by larry, but the first somewhat recent-ish (2009 or so), the second 2006 18:12
18:14 dakkar joined
ash_ the second one seems odd... 18:17
"".split('') makes almost sense that it would be 0
moritz_ I'm gald I'm not the only one thinking that :-)
*glad
ash_ "".split(':').elems, 1 baffles me
moritz_ the test assumes the result is an string
just like "foo".split("bar") returns "foo", ie a one-item list 18:18
lue gist.github.com/465734 there is ::=. enjoy! ::=)
pmichaud lue: needs to return $target 18:19
(easiest way is to change that __vPs to __0Ps
moritz_ rakudo: my $x := 3; say $x
pmichaud afk, fetching lunch
p6eval rakudo 04a918: OUTPUT«:= binding of variables not yet implemented␤ in 'infix:<:=>' at line 671:CORE.setting␤ in main program body at line 11:/tmp/ixGOhHBraq␤»
lue alright (stupid signatures...)
moritz_ uhm
pmichaud didn't review/apply the := patch yet. I'll do that when I get back.
moritz_ ah 18:20
pmichaud (please don't apply to master before I review it)
moritz_ didn't know ther was a previous patch
no worry, wasn't my plan
18:20 envi^home left
lue gah, repasting. ignore the link above. 18:22
18:23 ashleydev_ joined 18:25 ashleydev left, ashleydev_ is now known as ashleydev
lue I also have some binding tests to push, but that'll be after the patches have been applied (of course) 18:27
gist.github.com/465750 there's ::=, with the change suggested by pmichaud 18:32
18:35 christine left 18:37 pyrimidine left 18:39 ruoso left, Trashlord left, ive joined 18:43 ashleydev_ joined 18:44 ive left, Mowah left 18:45 ashleydev left, ashleydev_ is now known as ashleydev, supernovus joined 18:46 Chillance joined
arnsholt nqp: my @a := (1,2,3); my @b; @b.push: $_ for @a; say(@b); 18:52
p6eval nqp: OUTPUT«3␤»
arnsholt Huh.
Oh, my NQP is olded. right 18:54
18:55 ruoso joined, Mowah joined
pmichaud #phasers today? 18:56
lue phasers? 18:59
pmichaud weekly rakudo meeting 19:00
every tuesday (although I forget the exact time)
lue ah, it's been renamed
pmichaud it might be delayed today due to world cup :) 19:01
lue Netherlands are winning!
for me, it's noon. (so now) 19:03
19:04 cono left 19:05 Mowah left
isBEKaml lue: too early. It's only 30 mins into play. :) 19:05
19:05 cono joined 19:06 pjcj_ left, ciphertext left 19:07 pjcj joined
dalek kudo: e2f3019 | pmichaud++ | src/builtins/assign.pir:
Change "Cannot assign to ..." to "Cannot modify ...". TimToady++
19:11
kudo: 2b2f69c | pmichaud++ | docs/ROADMAP:
Update ROADMAP with completed closures/autoviv items.
19:16 Mowah joined
dalek kudo: 24e05c2 | moritz++ | src/core/Cool-str.pm:
avoid type constraints in sub form of split()
19:17
kudo: 8aff115 | moritz++ | (2 files):
fix split() with zero-width matches; also run two more test files
pugssvn r31561 | pmichaud++ | Unfudge some passing autoviv tests.
jnthn pmichaud: It's half time 19:18
:-)
[particle] and what a game!
moritz_ not so impressed
pmichaud from t/spec/S32-scalar/undef.t 19:19
lue The first goal of the Netherlands was impressive.
pmichaud #?rakudo 2 skip 'todo: lists, defined, truthness'
is ?(@(Mu,)), Bool::False, '?(@(Mu,)) is false';
is ?(list(Mu,)), Bool::False, '?(@(Mu,)) is false';
jnthn lue: Aye
arnsholt I only saw the last 15 minutes of the half, but that last goal was epic
pmichaud shouldn't those be true?
jnthn hopes Netherlands win it
isBEKaml guesses moritz_ is waiting for Germany's game to start... :)
moritz_ pmichaud: I agree
jnthn pmichaud: I'd hope so
lue Netherlands v. Germany would be exciting :)
moritz_ jnthn: mee too
TimToady looks like someone was confusing Mu with Nil
pmichaud should I change it to Nil, or change the result to True? 19:20
moritz_ isBEKaml: if the Netherlands continue to play like it does now, and Germany continues to play as they did on Saturday, .nl doesn't stand a chance
TimToady do it both ways, and we get more tests :)
pmichaud ah, there's a url
moritz_ pmichaud: both :-)
lue
.oO(Being half-German, I of course wish Germany to win)
isBEKaml moritz_: I'm okay either way as long as it's a good contest! 19:21
moritz_ same here too
jnthn
.oO( Netherlands have stroopwafels and a speical somebody. Germany has awesome beer and currywurst. Hard choices! )
19:22
pmichaud also, should it be testing flat() instead of list()?
jnthn pmichaud: #phasers if it happens on time would be in 8 mins or so :-)
pmichaud Seems to me that list(Nil,) might be non-null (re-reading spec) 19:23
lue jnthn: we also haz pretzels and other great bread product!
pmichaud rakudo: say list(Nil,).elems
lue
.oO(real pretzels, not the stupid cracker-thing they sell in stores)
p6eval rakudo 04a918: OUTPUT«1␤»
pmichaud rakudo: say flat(Nil,).elems 19:24
jnthn lue: That too
p6eval rakudo 04a918: OUTPUT«0␤»
19:24 buubot left
jnthn lue: And mountains. :-) 19:24
19:24 buu left
pmichaud lue: do you have a url or ticket # for your := patch? 19:24
tylercurtis lue: Are the real ones the soft kind?
lue yes. 19:25
tylercurtis can now pretend to dislike the other kind because they're inauthentic. :)
19:26 clochette joined
[particle] the kind you can make a ham and cheese sandwich with 19:26
19:27 patspam left
lue := binding (2nd patch there to replace Q:PIR block): gist.github.com/463775 19:27
19:27 clochette left
lue the hard little ones are still OK, but nothing like a _real_ pretzel. 19:28
19:29 Mowah left, plainhao left
TimToady .^methods should probably be returning the longnames of multi methods 19:30
pmichaud lue: why does the patch have "cannot bind to a readonly variable?"
19:31 Guest23936 left
lue rakudo: my ($a is readonly) = 3; $a = 2; 19:31
19:31 f00li5h left
p6eval rakudo 04a918: OUTPUT«Cannot assign to readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 1␤» 19:31
lue something like that. I could be wrong of course.
pmichaud assignment isn't the same as binding
TimToady rakudo: my $a is readonly = 3; 19:32
moritz_ #phasers?
p6eval rakudo 04a918: OUTPUT«Cannot assign to readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 11:/tmp/sMk6BXr42m␤»
lue yeah, I thought if the variable was set readonly, then it can't be modified anymore.
TimToady that should work
pmichaud lue: I think it can still be rebound.
TimToady assignment to a declarator is not assignment :)
pmichaud pir::copy__vvpp($target, pir::new__ppp('ObjectRef', $source)); 19:33
has to be wrong.
should be pir::copy__vPP(...)
lue (well, I coded := before that talk about ::=, so I of course might have done it differently now) 19:34
19:34 rv2733 joined
lue it works, though. 19:34
19:34 Mowah joined
lue
.oO(although maybe that could be the cause of some test failures?)
19:34
ash_ some people in here are really good with git, right? I am having a weird issue when i try to merge upstream.... i thought you could do "git remote update; git merge remotename/remotebranch" to update your current branch to an upstream branch, but that's acting like a noop.. 19:36
19:37 christine joined
moritz_ ash_: if it's a noop, then remotename/remotebranch has the same commits as the current branch 19:37
19:38 ashleydev_ joined
ash_ bit doing "git checkout remotename/remotebranch; git log" gives a different set of commits than the current' branches log 19:38
19:38 macdaddy joined 19:39 macdaddy is now known as Guest99304 19:40 rhr left
moritz_ ash_: just in different order, maybe? 19:40
19:40 ashleydev left, ashleydev_ is now known as ashleydev
isBEKaml maybe in a different order or perhaps you didn't do git fetch ? 19:40
19:40 kensanata joined
ash_ moritz_: no, its like the merge didn't work 19:41
moritz_ what does 'git status' say?
ash_ current, on branch 'gsoc_nci' 19:42
19:42 tri1 joined
isBEKaml then it looks like there's either nothing to commit or the commit/push worked. 19:42
ash_ when i checkout 'upstream' which is leto/upstream (leto being leto's parrot mirror on github) it says" Your branch is ahead of 'leto/upstream' by 847 commits." 19:44
19:45 ashleydev_ joined
moritz_ if it were also behind, it would say it diverged 19:46
so upstream leto/upstream doesn't have any commits that your local branch doesn't have 19:47
ash_ hmm, i am confused by this... where did my commits go? :-( 19:48
[particle] check your git log
moritz_ ash_: in your local branch 19:49
19:49 ashleydev left, ashleydev_ is now known as ashleydev
ash_ git log has my most recent commits 19:50
but i don't see any of the merge's or commits from leto/upstream
isBEKaml I think that's because you worked on your own local branch. try git pull or git fetch 19:51
19:52 rhr joined
ash_ i have done both, actually i did git remote update which fetch's all remote's 19:53
[particle] should i expect spectest failures from earlier today?
i see a number of S02 and S03 test files with non-zero exit codes
19:58 rokoteko joined 19:59 Mowah left
lue > my @a = 1,2,3; @a[3] := @a[0]; say @a.perl 20:01
[1, 2, 3]
any suggestions as to why this isn't working like it should?
pmichaud because your := doesn't know about WHENCE. :-) 20:02
supernovus I never seem to be able to sync my visits with masak. I was thinking of making an updated version of my DateTime/Date modifications based on the feedback from the patch review. My one question is, how should I proceed with the spectest updates? I have a commit bit on the repo, but am not sure what should be comitted first, the test changes or the library changes?
20:03 Mowah joined
lue how can I learn my code, then? 20:03
moritz_ supernovus: first of all nothing stops you from adding new files to the repo
supernovus: rakudo doesn't run them by default, so you're on the safe side 20:04
20:04 ashleydev left, hercynium joined, ashleydev joined
pmichaud lue: after := has determined that it's safe to perform the binding, it needs to check the target value to see if there's a 'WHENCE' property set. If so, execute the code store there before performing the copy. 20:06
see assign.pir for an example. :)
(&infix:<=>, that is)
20:07 ive joined, Kodi joined
supernovus moritz_: Okay. I want to add a few more tests to them before I commit. As for the patch, I'll submit a new version of it once I've cleaned it up. 20:07
moritz_ supernovus++
ash_ ah, moritz_ it seems leto/parrot hasn't been updated since june 20, which was why i didn't see the commits as they are all older than mine, so, yes, i am up to date, i am just silly
moritz_ ash_: just ping dukeleto to update it 20:08
lue So I must peruse the equalitie, then, to tell my own code to ponder the WHENCE. So be it, m'lud. </oldenglish>
supernovus I guess the only other question was, the name of the role. It seemed DateLike wasn't exactly liked, and Dateish or something similar was being thrown around as a replacement.
lue rakudo: my $a = 1; my @b = 2,3; say $a.WHENCE; say @b.WHENCE 20:10
p6eval rakudo 04a918: OUTPUT«␤␤»
Kodi I suggest Calendrical. 20:13
moritz_ Temporal 20:14
[particle] SpaceTimey 20:15
Kodi Question, though. I've been working on DateTime.pm over the past few days and I just learned of this patch. Would it be less work for you guys if I (a) merged it into what I've done or (b) wait until it's been applied to master to submit my own patch?
supernovus moritz_: If I go with Temporal, should I rename the current Temporal.pm to DateTime.pm and move the role Temporal into a new Temporal.pm ? 20:16
moritz_ supernovus: yes 20:17
the rename should occur anyway
lue
.oO(TimeyWimey)
supernovus Kodi: In case we have conflicting modifications, one of us should get a patch committed first, then the other should merge with that and submit the second patch. I have no real preference who should go first. 20:18
Kodi supernovus: Okay, you go first. I'm not done, nor very near to being done. 20:19
supernovus: I have written some tests of date validation which you might find useful—I guess I'll push those to pugs soon. 20:20
lue pmichaud: that's wizard. I don't have it, and my git is up-to-date!
20:21 tadzik joined, Mowah left
supernovus Kodi: Okay, well, I'm going to rename Temporal.pm to DateTime.pm and change the Role name to Temporal. Oh, date validation tests! Those were what I was going to add to test the validation code! Great minds and all that. :) 20:21
Kodi supernovus: :) 20:22
pmichaud lue: are you in a branch?
lue well, now, it would help if I refreshed the buffer :)
20:22 eternaleye_ joined
lue [it's always the simple things that catch me] 20:22
20:22 eternaleye left
Kodi supernovus: Are you sure about the name "Temporal"? It's doesn't convey the sense of being about dates (as opposed to times) specifically. 20:22
pmichaud heh
> say [+] [1,2,3] 20:23
1 2 3
moritz_ wtf?
TimToady yay
pmichaud a reduce of one element returns that element.
which in this case, is an array. :-)
so &infix:<+> never gets applied to it.
moritz_ I kinda thought it would do 0 + [1, 2, 3]
but that was a fallacy
20:23 Mowah joined
pmichaud TimToady: is that the result you want/expect? 20:23
ash_ how would you get it to do 1 + 2 + 3? [+] |[1,2,3]? 20:24
TimToady well, it's better than the old result :)
pmichaud ENOTMYQUESTION
:)
yes, it's better. :-)
supernovus Kodi: I'm not sure about Temporal. It was just a suggestion from moritz_. Calendrical may be a better choice for naming.
lue rakudo: say [+] 1,2,3
TimToady if there is a 1-ary version of the infix, it should call it
p6eval rakudo 04a918: OUTPUT«6␤»
pmichaud should there be a 1-ary version of the infix? 20:25
moritz_ supernovus: I would also be fine with doing the date validation as class methods in Date
pmichaud (in this case)
moritz_ supernovus: and call those from DateTime
supernovus: which would mean we don't have to dome up with a new role name :-)
pmichaud should the default case be both 0-ary and 1-ary?
TimToady I think we could expect 1-ary + to have the same effect as unary +, and likewise for ~
supernovus moritz_: I had tried that first, and for some reason it didn't work.
pmichaud i.e., instead of sub infix:<+>() { 0 } should we have sub infix:<+>($x = 0) { $x }
TimToady +$x 20:26
moritz_ supernovus: then it might be worth investigating why it didn't work
supernovus Oh wait, never mind, I was still working with it when those were subs!
pmichaud right, +$x
or should it really be two separate multi subs?
(and "multi')
TimToady well, it needs to be a multi anyway
pmichaud right
I forgot "multi" above.
TimToady or you can't handle $x,$y
supernovus moritz_: I will try your suggestion and get rid of the Role altogether. 20:27
TimToady whatever's faster, if either
I think it's kinda cute to write it as a default
pmichaud the second form, then?
supernovus It will also solve the augment issue with DateTime::strftime so the whole runtime role composition stuff can go bye-bye.
pmichaud i.e., multi sub infix:<+>($x = 0) { +$x }
I like that.
perhaps all of the defaults should be written that way...? 20:28
TimToady mebbe
pmichaud it certainly makes reduce easier, because we don't have to do a bindability check.
tylercurtis Does that mean "[+] [1, 2, 3]" will be "3"? 20:29
pmichaud tylercurtis: yes.
TimToady yes
20:29 alester left
lue whence() on L66 (assign.pir) implies that whence recieves something callable. 20:29
pmichaud lue: it does. 20:30
20:30 alester joined
pmichaud lue: it receives the closure that describes how to vivify the target. 20:30
lue ah, so I call whence, and then store like normal (if it applies of course)?
pmichaud you call whence, and then do what you would've done otherwise.
tylercurtis If I have an array and want to sum it with this change, what would I do? [+] list([1,2,3])
? 20:31
pmichaud tylercurtis: [+] [1,2,3].list
or
TimToady if you have an array, you probably are naming it with @
pmichaud [+] @([1,2,3])
or
[+] @a
tylercurtis Oh. So, [+] @a will still work? Great. 20:32
pmichaud right
[particle] and if my list contains only one item, [1,2,3]
moritz_ for [1,2,3].flat
pmichaud @a interpolates, $a and [1,2,3] don't.
moritz_ s/for/or/ 20:33
20:33 patspam joined
pmichaud note that list([1,2,3]) still has only one element :-) 20:33
pugssvn r31562 | Kodi++ | [t/spec/S32-temporal/DateTime] Corrected and extended. Rakudo should pass all of these once supernovus++'s patch is applied and mine is completed. 20:34
20:35 pragma_ left, rv2733 left
pmichaud TimToady: how about something like: [==] 1 ? still Bool::True? 20:36
lue is it setup so any operator can function in [] ? 20:37
pmichaud mainly infix operators
TimToady chain operator imply AND so less than one comparison is always true
pmichaud okay.
TimToady since none of the comparisons falsify it
lue what are those operators called? It's not hyper, or meta....
pmichaud lue: reduce
or "reduction" 20:38
moritz_ and reduction operators are a form of meta operators
pmichaud TimToady: [%] 1 ?
TimToady lue: this is all explained in S03...
pmichaud "no 1-arg meaning for infix:<%>" ?
or return the result? 20:39
rakudo: say [%] 1; # curious
p6eval rakudo 04a918: OUTPUT«1␤»
pmichaud oh, yeah.
20:39 tadzik left
pmichaud rakudo: say &infix:<%>(1) 20:39
p6eval rakudo 04a918: OUTPUT«No applicable candidates found to dispatch to for 'infix:<%>'. Available candidates are:␤:()␤:(Int $a, Int $b)␤:(Real $a, Real $b)␤:(Any $a, Any $b)␤␤ in main program body at line 11:/tmp/dUhjHJGu0m␤»
20:40 Kodi left
sorear non associative operators shouldn't have no-arg meanings... 20:40
TimToady well, [%]() is defined as fail, but by S03:4311 it should probably just return the value in question
sorear now, %% should be a chaining comparative, and have the normal meaning for chainings 20:41
pmichaud same for [/]
?
20:41 tri1 left
TimToady I'm not sure %% should be chaining 20:42
lue for the comparision, I can't just say if $target.WHENCE, right?
pmichaud lue: you cannot. it's a property, not a method.
(in rakudo's current impl)
lue but $target.WHENCE on its own line calls WHENCE, correct? 20:43
pmichaud lue: no.
lue that would explain the Null PMC...
pmichaud it's a PMC property, not a method.
TimToady in fact, %% isn't chaining currently, but multiplicative
20:44 pragma_ joined
pmichaud eventually when it's really implemented as a role, you might be able to do ($target.WHENCE).?() 20:44
but we're not there yet.
20:44 pragma_ is now known as Guest7606
lue so how to call it like assign.pir does... 20:44
moritz_ like assign.pir does.
with getprop
pmichaud heh
pir::getprop('WHENCE', $tgt).() 20:45
lue ah, dankon.
dalek kudo: bbacb74 | util++ | docs/announce/2010.07:
Add release announcement for 2010-07; preliminary version
lue Wait, I don't need the signatures?
(the __PsP stuff)
pmichaud for some you do.
but PAST knows about getprop, and there's only one sig. 20:46
(it never hurts to put the sig, so we tend to do that now)
also, note that lower-case 'p' is never valid in a signature.
(it may still work, but that's by luck and not by design)
[Coke] nqp: pir::hcf() 20:47
p6eval nqp: OUTPUT«error:imcc:syntax error, unexpected '\n', expecting '('␤ in file 'EVAL_1' line 10␤syntax error ... somewhere␤current instr.: 'parrot;PCT;HLLCompiler;evalpmc' pc 1047 (compilers/pct/src/PCT/HLLCompiler.pir:554)␤»
lue (the signatures (when I come across a new PIR op I want) always mess me up)
[particle] misses parrot's hcf op
[Coke] . o O (yes, I know.)
[Coke] does not.
pmichaud I hope to eliminate the signatures someday. But it will be nice to know what signatures we actually need. :-)
lue well, why not adopt P6's methods of multi subs? I've heard of them, they seem quite nice... :) 20:49
(methods in a non-programming sense)
supernovus gah, make: *** No rule to make target `src/builtins/Abstraction.pir', needed by `src/gen/builtins.pir'. Stop.
pmichaud ....and they totally don't map to the underlying virtual machine.
supernovus: re-configure, likely. 20:50
moritz_ bah, nqp-rx doesn't build with latest parrot
/home/moritz/src/nqp-rx/parrot_install/bin/parrot -o nqp-setting.pbc src/gen/nqp-setting.pir
error:imcc:The opcode 'delete_p_i' (delete<2>) was not found. Check the type and number of the arguments in file 'src/gen/nqp-setting.pir' line 86
or maybe it's latest NQP-rx that doesn't build
not related to parrot at all 20:51
supernovus pmichaud: I did a realclean and re-ran configure, it's compiling now :-)
20:51 rhr left
moritz_ pir::delete__vQi(self, $pos); 20:52
what is Q?
pmichaud keyed PMC
looks like it's a not-up-to-date parrot.
i.e., it appears to be using an outdated version of PCT
moritz_ ./parrot_install/bin/parrot_config revision
47426
oh indeed 20:53
that's too old
moritz_ wonders what went wrong in the rebuild process
lue > my @a = 1,2,3; @a[3] := @a[0]; say @a.perl
[1, 2, 3]
I can (no)paste the new bit of code, if you like. 20:54
pmichaud sure, I'll look. 20:56
lue it's only three lines, so I could paste it right here.
pmichaud that works too. 20:57
20:57 kensanata left, kensanata joined
lue if !pir::isnull(pir::getprop__PsP('WHENCE', $target)) { 20:57
pir::getprop__PsP('WHENCE', $target).();
}
pmichaud note that you have to descalarref $target 20:58
dalek p-rx: 60e0c27 | moritz++ | src/Regex/P6Regex/Actions.pm:
make subrule_alias a method, so that subclasses can reuse it easily
pmichaud otherwise it's getting the WHENCE property of the container, not of the value.
lue so pir::descalarref ?
pmichaud pir::descalarref__PP
lue ah, and just stick it in place of $target both times? [pir::descalarref__PP($target)] 20:59
pmichaud yes.
[Coke] btw, I'm pretty sure the goto NEXT() at the end of the op is the default. 21:00
[Coke] will double check that later.
pmichaud [Coke]: you're likely correct -- I'm not sure we ever updated when Parrot made that change. 21:01
lue ( hopefully, at some point I can stop asking so many questions :) ) 21:02
[Coke] pmichaud: I'd like some verbiage for Rakudo * in the compiler release this month. 21:03
If no one beats me to it, I'll commit something you can fix =-)
pmichaud [Coke]: I'll make sure to have some there.
dalek p-rx: 04f7885 | moritz++ | src/stage0/ (3 files):
update bootstrap files to get latest setting and subrule_alias updates
21:05 pmurias joined
[Coke] even something like "This is /not/ Rakudo *; see www.rakudo.org" would be minimally required, I think. 21:05
pmurias is it possible to add new lexicals my modifing MY:: at BEGIN time?
moritz_ I thought we had a "this not Rakudo *" in the previous release announcements too 21:06
sorear pmurias: maybe. the spec is unclear
[Coke] moritz_: not that I see in the release announces.
s/see/ack/
pmurias sorear: MY.declare_stub_symbols can add new lexicals 21:07
moritz_ [Coke]: right, I don't see it either
sorear pmurias: that doesn't look very much like standard Perl 6 to me 21:08
moritz_ wasn't that in a S11 document at some point?
21:08 ive left
pmurias it's there still 21:08
moritz_ right
lue > my @a = 1,2,3; @a[3] := @a[0]; say @a.perl ~ ' \o/ \o/ :D'
[1, 2, 3, 1] \o/ \o/ :D
pmurias updates his repo to make sure 21:09
moritz_ pmurias: you're right
21:09 Mowah left
pmurias but it doesn't seem something intended for everyday use 21:09
sorear pmurias: um, that's pseudocode.
moritz_ I don't think it was intentend to be pseudo code 21:10
-> bed 21:12
lue goodnight o/
21:13 kensanata left
lue should I generate Yet Another Patch for my changes to := ? 21:18
21:23 rhr joined
lue in any case, it's here: gist.github.com/465939 21:24
21:25 Guest51578 left
pmurias YOU_ARE_HERE in the setting creates a snapshot of the lexical scope, how deep is that? 21:26
21:27 masak joined
masak \ӝ/ 21:27
phenny masak: 18:00Z <ingy> tell masak \o/
pmurias do the variables get cloned
masak dang, missed #phasers. :/
pmurias ?
and how should YOU_ARE_HERE be tested
?
pmichaud (note that Rakudo's implementation is almost certainly wrong.) 21:28
lue ӝ
pmichaud (of YOU_ARE_HERE)
lue .u ӝ
phenny U+04DD CYRILLIC SMALL LETTER ZHE WITH DIAERESIS (ӝ)
pugssvn r31563 | novus++ | Preparation for my new patch, and Kodi's upcoming patch. 21:29
jnthn masak: You're fired!
;-)
masak :)
sorear: been thinking about the 'state vars as anon lexicals in OUTER::' thing. can't really make it fit together in my head. at the very least, youd need a special case for the outermost scope. (though what a 'state' declaration outside of a routine means, I don't really know.)
lue afk # and then helping out on slices :) 21:30
21:30 skids left
masak wow, some days I don't like Twitter. the meme going around today is "Is Java 7 the new Perl 6?" :( 21:30
supernovus masak: Well, on the new match there is no more role, and because of that DateTime::strftime is much simpler. Just 'use DateTime::strftime' adds the strftime() method to the DateTime class. 21:31
s/match/patch/ 21:32
jnthn masak: I manage to use Twitter without noticing these. I wonder what we're doing differently. :-)
masak supernovus: waitwait, how does it do that? MONKEY_PATCHING?
21:32 meppl left
masak er, _TYPING 21:32
jnthn: it could be my live filters for "Perl 6" and "Rakudo"... 21:33
supernovus masak: Currently, yeah. If you know of a better way, I'll use it :-)
21:33 lichtkind joined
lichtkind masak: hello 21:33
phenny lichtkind: 18:01Z <ingy> tell lichtkind I'll look into it.
masak supernovus: I'm not 100% comfortable with using that in src/core/...
lichtkind: greetings, child of the light.
lichtkind ingy: thanks 21:34
pmichaud > say [+] [1,2,3]
3
> say [-] [1,2,3]
3
lichtkind grtz :)
pmichaud \o/
masak supernovus: did you see moritz_++'s idea about using a lexical role?
jnthn masak: Given I don't know what live filters are, that probably explains it. ;-)
supernovus masak: Which is why DateTime::strftime isn't in src/core anymore ;-)
jnthn "use" to import a...method?!
masak jnthn: exactly.
jnthn With the exceptation that method will be added to something? 21:35
masak jnthn: they don't exist on the webpage. :)
jnthn Other than a lexpad?
lichtkind hai jnthn
jnthn lichtkind: oh hai
lichtkind: Ako sa mas? :-)
supernovus How do lexical roles work?
masak rakudo: { role R { method foo { say "OH HAI" } }; class A does R {}; class B does R {} }; A.new.foo; B.new.foo 21:36
p6eval rakudo 8aff11: OUTPUT«Could not find sub &say␤ in 'foo' at line 11:/tmp/vSEPbe8F7o␤ in main program body at line 11:/tmp/vSEPbe8F7o␤»
masak rakudo: my &_say = &say; { role R { method foo { _say "OH HAI" } }; class A does R {}; class B does R {} }; A.new.foo; B.new.foo
p6eval rakudo 8aff11: OUTPUT«Could not find sub &_say␤ in 'foo' at line 11:/tmp/H7_Vo02FCK␤ in main program body at line 11:/tmp/H7_Vo02FCK␤»
masak huh.
rakudo: { my &_say = &say; role R { method foo { _say "OH HAI" } }; class A does R {}; class B does R {} }; A.new.foo; B.new.foo
p6eval rakudo 8aff11: OUTPUT«Could not find sub &_say␤ in 'foo' at line 11:/tmp/XwDKDxh9Hr␤ in main program body at line 11:/tmp/XwDKDxh9Hr␤»
masak gives up
pmichaud the problem has to do with when roles get initialized
the methods defined in a role get captured extremely early 21:37
masak supernovus: anyway, they work like that.
jnthn pmichaud: I hate that problem.
pmichaud i.e., before &say is initialized.
masak oh, right!
rakudo: our &_say = &say; { role R { method foo { _say "OH HAI" } }; class A does R {}; class B does R {} }; A.new.foo; B.new.foo
p6eval rakudo 8aff11: OUTPUT«OH HAI␤OH HAI␤»
21:37 hghgd joined
masak there we go. 21:37
jnthn pmichaud: I'm still pondering how on earth to fix it though.
pmichaud jnthn: actually, I'm just thinking about that now. 21:38
jnthn pmichaud: And my best answer still involves doing away with :load :init... :-/
And doing everything with phasers.
supernovus masak: how would that work with an external module being called from a core setting library?
masak supernovus: no, it was pertaining to the 'DateLike' role.
pmichaud jnthn: actually, I'm thinking we just need to set_outer on mainline. 21:39
masak supernovus: to avoid sharing it with the outside world.
supernovus: it's a good idea; it was just a bit too visible.
pmichaud and to do the set_outer when it's being *compiled*, which we currently likely don't do.
supernovus masak: Ah, well, moritz_ suggested calling the assert-valid-time method as a class method, so there is no more role.
jnthn pmichaud: hm
pmichaud: ah, maybe that could do it.
pmichaud since I'm going to be looking at that code later tonight anyway, that might be the right fix.
I'll keep it in mind.
jnthn OK
supernovus My new patch renames Temporal.pm to DateTime.pm, and just uses the ::Date.assert-valid-date method instead of requiring that hackish role. I still need to work on the DateTime::strftime library to make it more 'right'. 21:41
21:41 ashleydev_ joined 21:42 _mpu left
masak supernovus: one way to avoid the MONKEY_TYPING would be to make the strftime method into a sub. 21:42
sorear masak: state outside a function is completely equivalent to a my, since the anonymous mainline closure is only cloned once 21:43
supernovus masak: I could do that, change DateTime.strftime() into strftime(DateTime $datetime, Str $format) 21:44
masak sorear: ok, so I have 'state $a' in my sub &foo. how does the lexical stored in OUTER:: look?
21:45 ashleydev left, ashleydev_ is now known as ashleydev
sorear masak: my $a_UNIQUEID; my sub foo { ... use $a_UNIQUEID instead of $a ... } 21:45
masak supernovus: yes. one thing: all the formatting subs I can think of have the $format parameter first :)
supernovus masak: No problem.
masak sorear: and this takes cloning into account how? 21:46
sorear masak: my sub foo is cloned exactly once for every time the outer scope is entered, which is the same times when new $a_UNIQUEIDs are created
sub acc { sub { ++(state $i) } } == sub acc { my $i_0; sub { ++$i_0 } } 21:47
masak sorear: I was thinking about `my &bar = &foo.clone`
supernovus masak: Okay, strftime() is now an exported sub instead of a method. 21:54
masak supernovus++
re #phasers and GSoC reporting: I was meaning to blog about my slight weekend progress on binary IO and Bufs, but 've been distracted by work and sleep since leaving Lund. things are progressing, and I have a course plotted out for how to read/write binary files.
jnthn \o/ 21:55
pugssvn r31564 | novus++ | Changed test, as strftime is now a sub
ash_ alpha: my &f = -> $a { state $b = 0; $b += $a }; my &g = &f.clone; f 3; say f 4; f 6; say g 0; # g is a clone of f so they have two different state val's
p6eval alpha 30e0ed: OUTPUT«7␤0␤»
masak I got a spec change in this weekend; thought it'd be controversial, but have had zero response to it. maybe it didn't hit the repo? :P
jnthn Yeah, people don't sleep in Lund. Just hacking. :-)
masak: Well, I thought it was sane rather than controversial... :-) 21:56
masak yay
jnthn Though I do remember being tired when I was looking at it, and somehow I mis-read octets as octopus
masak jnthn: no, it says "octopus". :P 21:57
told you it was controversial :P
masak secretly changed the fundamentals of file I/O
21:58 Ross left
lichtkind masak: what did you do? 21:58
jnthn Well, I guess if each arm had teeth than an octopus would be 8-bite ;-)
masak jnthn: that'd be one scary octopus.
jnthn: "Jaws VIII". :P
22:00 ruoso left
masak lichtkind: I changed the API of 'read' and 'write'. when future generations send their children to school, they'll be thinking about me. 22:00
lichtkind masak: :) 22:01
masak basically, the API wasn't OO enough. it suffered from latent C poisoning.
pmurias masak: which commit was that? 22:03
masak the latest, it seems.
22:03 masonkramer left 22:04 masonkramer joined
masak r31543 22:04
the spec change was basically a consequence of starting to implement IO.read and IO.write, and then going "eew, no!". :) 22:08
supernovus Well, I'm out for the day. I have attached a new patch replacing the old one. Much simpler, and far less evil hackery going on. :-) 22:11
masak \o/
supernovus++
supernovus Note that some spec tests for DateTime are currently failing as Kodi is also working on DateTime, and hasn't submitted his patch yet. He was waiting for my patch to be merged so that he can merge his changes in. 22:14
pmurias masak: seems sane
masak pmurias: thanks. 22:15
supernovus Later all!
22:16 supernovus left, gbacon left 22:19 lichtkind left
masak with the new 'proto' spec change, multi dispatch is looking a little bit more like I remember it from Clojure. 22:19
Clojure also has a... thing which sits in the middle and determines how to dispatch to multis. 22:20
pmichaud TimToady (or others who might know): why does token infix:sym<!=> have a <?before \s> in it?
is that perhaps left over from the prefix:sym<=> days?
sorear What was prefix:<=>? 22:21
pmichaud that used to be the "iterate" prefix.
(which thankfully we got rid of about 16 months ago)
pmurias masak: the new multi dispatch is luckilly what mildew was implementing from the start :) 22:22
22:22 dakkar left, ashleydev left
masak pmurias: how incredibly fortunate! :P 22:22
22:24 szabgab left
pmurias how is YOU_ARE_HERE implemented in rakudo? 22:28
pmichaud pmurias: wrongly.
(it was added while I was out, so I can't say much more than when I last looked at it, it wasn't really right) 22:29
it was a good guess, though :)
pmurias so is taking a .clone of the current lexical scope, putting it somewhere and then when a file is loaded the outermost scope is that lexical scope 22:30
a ok way to implement that
TimToady pmichaud: it looks more like a micro-optimization or fossil to me; != is actually recognized at STD.pm6:3403
pmichaud TimToady: I just tried it locally, my parser tends to get confused with !=:= 22:31
TimToady if there's a space, we don't have to look for any metops
pmichaud (which might not be an issue with true LTM)
TimToady yes, =:= beats = under LTM
but ! doesn't participate
pmichaud unless != matches first, though
TimToady which it can only do if there's a space after the = 22:32
pmichaud oh, you're saying that !=:= gets seen as ! + =:= before ever looking at !=
pmurias TimToady: remember the infinite looping i found when trying to use a custom setting, it turned out it's a bug in YAML::XS
TimToady !=\s never match under LTM
*es
pmichaud right, understood. thanks. 22:33
TimToady unless there really is a space
but it's redundant with the check in <!>
pmichaud the problem I'm having is that [!=] ends up being reduce[]+meta!+infix:<=>
and so it doesn't correctly find &infix:<!=>()
and so it doesn't correctly find &infix:<!=>($a)
22:34 lichtkind joined
pmichaud because it tries to generate a !+= 22:34
anyway, it's a rakudo issue.
22:34 jferrero joined
pmichaud put another way, with != defined as it is, the inside of [!=] gets treated as not ($a = $b) 22:35
instead of being the !== operator.
lichtkind pmichaud++
pmichaud (does what I'm saying make any sense?) 22:36
TimToady yes, the '=' inside '!' has to force itself to mean !== instea of not assign
pmichaud okay.
22:36 vin joined
TimToady when that works we can entirely get rid of the <!=> rule, really 22:36
pmichaud okay.
that tells me what I need to know. :-)
22:37 patspam left
pmichaud although part of me feels like we should be keeping the != rule instead of trying to figure out how to make ! + = mean !== . But I need to think about that some more. 22:38
22:44 pjcj left
vin Is there a releasedate for perl 6? 22:45
masak punts this time
TimToady vin: define perl 6 22:47
vin that installing perl will get you perl6 22:48
masak whoa.
TimToady as in replace perl 5?
vin yeah
tylercurtis Probably sometime after installing Python will get you Python 3, if ever. 22:49
TimToady oh, 'bout 25 years from now
vin lol
I have to see it as a different branch then?
TimToady they're currently viewed as sister languages
masak the little sister is cuter! 22:50
22:50 tylercurtis left
TimToady the younger sister is interested in outcompeting her older sister someday, but the older sister is rather more, er, developed 22:51
in any case, it's a friendly competition 22:52
vin If I may ask, is there a list of differences between the two? Currently I am developing in perl5 and I would like to make it work in both, if possible
pmichaud the list of differences is currently several hundred pages long.
(but it's more than just a list -- it's a list plus explanations) 22:53
masak vin: unless you're a master of tricks, you won't get the same mid-sized-to-long piece of code run in both.
vin too bad...
TimToady too good... :)
masak vin: Perl 6 is sideways incompatible with Perl 5.
vin Why? It won't help the integration of perl6 22:54
masak it will help the evolution of Perl 6, though.
TimToady pretty much everywhere Perl 6 is different from Perl 5, it can be viewed as an improvement
masak just don't tell the Perl 5 people that... :P
TimToady you'll eventually be able to intermix p5 and p6 in the same program though 22:55
pmichaud it was decided that we needed some backwards incompatibility in order to get the language right. That turned out to be quite a bit more backwards incompatibility than we original expected, though.
sorear vin: perl 6's reason for existing is a compatibility reset
TimToady masak: btw, the mugs were the day before
sorear perl 5 is stagnating due to the weight of eternal compatibility + design decisions that made sense in 1988
jnthn mugs? I thought it was just one mug!
22:55 masonkramer left
masak jnthn: five. 22:55
jnthn: only one broke, though. 22:56
TimToady: thanks. still time to prepare for an anniversary blog post, then.
22:56 john__ joined
jnthn masak: Smashing. 22:56
pmichaud are we going to have a mug collector's edition or something? ;-)
we could put sayings on them that deserve to be broken.
"Perl is dead."
TimToady I wish I'd collected the broken mug
masak "Perl 6: breaking mugs and backwards compat since 2000"
pmichaud lol 22:57
yes!
pmichaud fires up photoshop, looks to cafepress
masak pmichaud: "Quick, hide me! A Perl 6 designer!"
pmichaud: "Perl 6: the greatest language ever to emerge out of the shards of a mug." 23:00
23:00 pmurias left
Tene Should we include a free mug with every copy of parrot, to help budding language developers get started off right? 23:01
jnthn "If you break this mug, people will spend over 10 years designing a new language. Please take care of it." 23:02
sbp the mug, or the new language?
masak pmichaud: "Just another smug Perl 6 developer." the 's' in 'smug' crossed out.
jnthn sbp: Either. ;-)
sbp the mug could be viewed like the fire alarm points. "break mug to activate"
pmichaud "Break mug in case of language stagnation." 23:03
masak "Perl 6: break mug in case of community fra..." dang, pmichaud faster.
jnthn "Perl 6. It's Perl 5 with a cupple of improvements."
masak jnthn: :P
"Does your language come with a cup holder? Perl 6 does." 23:04
jnthn "Don't be a mug! use v6;"
masak "class Mug { method throw { break; } }" 23:05
TimToady "The best time to have a lucky break is ten years ago."
masak dang, we got rid of break a couple of iterations ago :P
"class Mug { method throw { succeed; } }" 23:06
pmichaud "Perl 6 mugs -- another lucky break!"
jnthn "Perl 6. Mugging other languages for features, and cuppling them neatly." 23:08
masak "if $mug === all @shards { say 'We need a break from all the mug puns!' }" 23:09
jnthn I promise not to break the silence with another one.
masak that's be "I don't promise not to..." :P 23:10
s/s/d/
23:10 jferrero left
jnthn Oh, you can handle it. :P 23:10
masak shatters from laughter 23:11
TimToady "Why's Jon throwing donuts?" --topologist
masak :P 23:12
TimToady "This is a broken mug. <mug> This is your brane on broken mugs. <camelia> Any questions?"
masak after hanging around enough on this channel, I might forget the generally accepted spelling of 'brain'... 23:15
23:16 lafille joined, lafille left
masak "Perl 6: seeking the holy grail after accidentally smashing it ten years ago." 23:16
jnthn "How is mug re-formed?" 23:17
masak They need to do way instain Jon Orwant.
jnthn Who harms 5 mugs that cannot frigt back! 23:18
pugssvn r31565 | pmichaud++ | [t/spec]: Fudge a test for [!==]. 23:19
masak My pary are with the cleaner.
jnthn
.oO( Perl 6: A language with RRRRRRRRRRRRRRRRRRRRRRRRRRRRR* )
pmichaud <camelia> "I was ready for my mug shot 10 years ago." 23:20
jnthn rakudo: 2 RRRRRRRRRRRRRRRRRRRRRRRRRRRRR* 3
p6eval rakudo bbacb7: ( no output )
jnthn rakudo: say 2 RRRRRRRRRRRRRRRRRRRRRRRRRRRRR* 3
p6eval rakudo bbacb7: OUTPUT«6␤»
masak jnthn: your mugs are way too wide.
"Perl 6: poculum iacta est." 23:24
TimToady .öÖ(mugsy would be a good name for a Perl 6 implementation)
23:24 sftp left 23:25 sftp joined, alester left
masak TimToady: what, there's too few of them? :P 23:25
23:25 vin left
masak vin: ...come back anytime! :) 23:26
23:27 alester joined, alester left, szabgab joined
sorear decides: sub foo($x) { class { method foo { $x }; }; }; foo(1).HOW === foo(2).HOW 23:30
23:31 rgrau_ left 23:32 clintongormley left
TimToady rakudo: sub foo($x) { class { method foo { $x }; }; }; say foo(1).HOW === foo(2).HOW 23:35
p6eval rakudo bbacb7: OUTPUT«1␤»
lue ohai
diakopter iaho
TimToady rakudo: sub foo($x) { class { method foo { $x }; }; }; say foo(1).WHAT === foo(2).WHAT
p6eval rakudo bbacb7: OUTPUT«0␤»
TimToady rakudo++
pmichaud rakudo: say [+] [1,2,3]; 23:36
p6eval rakudo bbacb7: OUTPUT«6␤»
pmichaud apprently not updated yet.
ahhh, I forgot to push.
TimToady I hate it when that happensn't.
23:36 cinch left 23:37 s1n joined, cdarroch left
lue TimToady: when it comes to 日本語, do I have to pay much attention to text direction? Some of the phrases I've seen have me worried. 23:38
masak .oO( where is all this heading? ) 23:39
dalek kudo: 55acd1d | pmichaud++ | src/ (2 files):
Fix [op] reduction for single argument lists. While we're at it, perform the
23:40
TimToady headings are exactly the problem
or rather, the signs on stores
lue (just a question. Maybe a DCC would've been more appropriate)
masak what about the signs on fetches?
TimToady many of those are written in "vertical" form with one character per column, which ends up reading right to left
the sign on a fetch will be on its bow, so you can tell which way it's going 23:41
lue OK. The 'of' phrases (like 時のオカリナ) make me wonder if it was originally RTL (considering you can read it Time's Ocarina LTR and Ocarina of Time RTL) 23:42
diakopter o/ --- ... ---
lue [I obviously haven't studied much japanese :)] 23:43
masak diakopter: here, grab this mug! oh wait.
diakopter yeah I got it backwards
23:44 jennyf joined
masak heh, spelling SOS backwards. hate when that happens. 23:44
lue
.oO(it's a palindrome, just like Bolton) :)
pugssvn r31566 | Kodi++ | [t/spec/S32-temporal/DateTime] Braino.
23:45 skangas left 23:47 jennyf left
lue rakudo: my @a = 1,2,3; @a[3..5] = @a[0..2]; say @a.perl 23:47
p6eval rakudo bbacb7: OUTPUT«[1, 2, 3, 1, 2, 3]␤»
masak rakudo: my @a = 42; @a[1..3] = @a[0..2]; say @a.perl
p6eval rakudo bbacb7: OUTPUT«[42, 42, Any, Any]␤»
masak \o/ 23:48
lue rakudo: my $a = 1; my $b := $a;
p6eval rakudo bbacb7: OUTPUT«:= binding of variables not yet implemented␤ in 'infix:<:=>' at line 671:CORE.setting␤ in main program body at line 11:/tmp/kY_JzbDqGz␤»
lue (If only I had a commit byte...) 23:50
masak what do you need eight commit bits for? :P
lue sorry, a commit nybble.
masak pmichaud++ seems to get by being very productive lately with just one commit bit. 23:51
lue (And if I can't have that, then fine, I'll take a commit byt.)
sorear lue: japanese is very flexible about character orientation, you can basically write it however you want as long as the characters are right side up 23:52
lue (How about a commit qword?)
masak lue: in my experience, commit bits are happily handed out to people who have accumulated a list of helpful patches.
lue: so keep up the good work. :) 23:53
pmichaud (and in Rakudo's case, to people who have submitted a CLA)
I had a question come in via email just now; need advice.
lue well, I've given... 4, about, in the last t2o days.
pmichaud (more)
I did a presentation at yapc::na, which I'm reprising at yapc::eu, that explains Rakudo Star to the Perl community.
sorear pmichaud: how did the na version go? 23:54
pmichaud excellent.
at least, I thought it went great.
however, that presentation is really focused to a Perl audience
it focuses on ways in which Rakudo Star is meant to change the concept of "a Perl release".
lue (CLA = Commit Lending Application?)
pmichaud the question that came into email now was from someone who wants to give a presentation about "why the Rakudo Star release is important"
23:55 Psyche^ joined
pmichaud i.e., why would a non-Perl person care about Rakudo Star? 23:55
and.... I could use some ideas for answers. :-)
and I think we want to have something coherent to say before the 29th. :-)
(and my brane is a bit of tapioca after this past week's commit-fest, so I'm not firing on all cylinders in this respect) 23:56
masak Rakudo Perl will be a good time to jump on the Perl 6 train, for Perl people as well as non-Perl people.
Perl 6 in general makes sense even if you're not a Perl programmer already.
pmichaud to which the response would likely be "and what's so great about Perl 6?"
TimToady well, that's obvious. :) 23:57
Tene While we've had regular releases and made the code available, it's largely been difficult to get started with and determine the status of anything. Perl 6 has been a very confusing subject for an outsider, and we haven't had any real message for outsiders before now.
pmichaud I know we've enumerated it a bit before... I'd like to put it into a short synopsis
(synopsis in the "short text" sense, not the "Perl 6 spec" sense)
diakopter the synopses need synopses 23:58
masak Perl 6 is a brain-shaped programming language.
Tene Rakudo Star is that message. "Here's what we've been hoping to say and communicate to the world. Here's an accessible, coherent presentation of what we're working on. Come see."
pmichaud Tene: I like that approach
lue Well, AFAIK, it's one of the easiest languages to define new operators and grammar.
It just like any spoken language, in that sense.
masak Tene: +1
"Rakudo Star. Come and see."
23:59 Patterner left, Psyche^ is now known as Patterner