Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-06-27

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:02 whiteknight joined #perl6
00:06 benabik_ joined #perl6
00:57 * TimToady wonders if the chunk() routine from http://rosettacode.org/wiki​/Floyd%27s_triangle#Perl_6 should be a built-in
00:59 TimToady also, the formatter map would be improved if we had a fmt infix that we could say Zfmt with
01:01 TimToady dinner &
01:02 pmichaud Zfmt -- interesting!
01:05 scott_ joined #perl6
01:07 xinming joined #perl6
01:14 colomon TimToady: seems to me chunk ought to go in List::Utils.  ;)
01:17 sorear Z[&sprintf] ?
01:26 colomon sorear: are you proposing that any sub which can take two arguments ought to be usable as an "
01:27 colomon "operator" for a metaoperator?
01:27 * colomon kind of likes that idea....
01:27 * colomon likes that idea much better than making a fmt operator
01:28 sorear colomon: https://github.com/perl6/std/commit/bd9fad832c
01:28 benabik It works well for Haskell...  x `func` y  == fund x y
01:30 sorear someday I'm going to do something about the backlog of STD changes that haven't made it into niecza yet :/
01:41 TimToady you're supposed to be able to say [&fmt] as an infix, which I guess is already specced
01:41 TimToady er, wait, fmt is a method
01:42 colomon sorear, TimToady: That's awesome
01:43 sorear I am not sure that ever made it into the synopses proper
01:43 sorear fwiw
01:44 TimToady doesn't look like it
01:44 TimToady std: 42 [&atan2] 1
01:44 p6eval std 30385f8: OUTPUT«ok 00:00 44m␤»
01:44 TimToady I guess it was just added to STD
01:45 TimToady n: 42 [&atan2] 1
01:45 p6eval niecza v19-1-gbd1bd16: OUTPUT«[31m===[0mSORRY![31m===[0m��Unable to parse bracketed infix at /tmp/dmhgZx_Zhk line 1:�------> [32m42 [[33m�[31m&atan2] 1[0m�Couldn't find final ']'; gave up at /tmp/dmhgZx_Zhk line 1:�------> [32m42 [&[33m�[31matan2] 1[0m��Parse failed��»…
01:45 colomon sorear: how hard / disruptive would it be for, say me, to just start importing changes from STD to niecza?
01:46 sorear colomon: the hardest part is keeping track of which changes need to be imported. :)
01:46 TimToady or exported :)
01:46 colomon sorear: I was figuring on starting with a diff...
01:46 sorear colomon: importing that particular change should be quite trivial.
01:46 pmichaud ...deported?
01:47 sorear colomon: i'll just say that on the actions side you want to create an $OperatorFunction with arity 2
01:47 sorear and no preargs/postargs
01:48 sorear hmm, apparently '$' is silent to me
01:54 TimToady std: "%3s" [&sprintf] 42
01:54 p6eval std 30385f8: OUTPUT«ok 00:00 44m␤»
01:54 pmichaud btw, typos on STD.pm6:4967-4970?
01:54 pmichaud token metachar:sym<(?= )> { '(?:' <.obs("(?= ... ) for lookahead", "<?before ... >")> }
01:55 pmichaud should be
01:55 pmichaud '(?:' -> '(?='
01:55 pmichaud (before the <.obs)
01:56 pmichaud std:  / (?:xyz) /
01:56 p6eval std 30385f8: OUTPUT«Use of uninitialized value $x in pattern match (m//) at STD.pm line 66584.�Use of uninitialized value $x in concatenation (.) or string at STD.pm line 66623.�[31m===[0mSORRY![31m===[0m�Unsupported use of (?: ... ) for grouping; in Perl 6 please use [ ... ] at /tm…
01:56 pmichaud std:  / (?=xyz) /
01:56 p6eval std 30385f8: OUTPUT«[31m===[0mSORRY![31m===[0m�Quantifier quantifies nothing at /tmp/jwa8BBOJT5 line 1:�------> [32m/ (?[33m�[31m=xyz) /[0m�Unrecognized regex metacharacter = (must be quoted to match literally) at /tmp/jwa8BBOJT5 line 1:�------> [32m/ (?=[33m�[31mxyz) /[0m�U…
01:56 TimToady I guess so
01:56 * pmichaud fixes
01:57 dalek std: fd2647b | pmichaud++ | STD.pm6:
01:57 dalek std: Typo fixes in obsolete P5 regex syntax detectors.
01:57 dalek std: review: https://github.com/perl6/std/commit/fd2647be53
02:01 [Coke] is there any way to introspect a character for unicode properties?
02:01 pmichaud in a regex, or otherwise?
02:01 pmichaud I guess introspect implies "otherwise".  I'm not aware of one.
02:03 [Coke] what about charname?
02:03 pmichaud don't find 'charname' in the synopses
02:04 pmichaud *I don't
02:05 tomaw_ joined #perl6
02:05 pmichaud and I don't think Parrot exposes a charname interface.  We could add one to NQP, though.
02:06 sorear n: use Unicode::UCD; say getprop('x', 'na')
02:06 p6eval niecza v19-1-gbd1bd16: OUTPUT«Unhandled exception: Unable to locate module Unicode::UCD in @path␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1402 (die @ 5) ␤  at /home/p6eval/niecza/src/NieczaPathSearch.pm6 line 23 (NieczaPathSearch.load_module @ 17) ␤  at /home/p6eval/niecza/sr…
02:06 sorear n: use Niecza::UCD; say getprop('x', 'na')
02:06 p6eval niecza v19-1-gbd1bd16: OUTPUT«[31m===[0mSORRY![31m===[0m��Q:CgOp not allowed in safe mode at /home/p6eval/niecza/lib/Niecza/UCD.pm6 line 4:�------> [32m { (ucd_get_ranges {$table} {$matcher}) [33m�[31m}[0m��Q:CgOp not allowed in safe mode at /home/p6eval/niecza/lib/Niecza/UCD.pm…
02:08 pmichaud ...sigh, and then we have to ask "which name"?  ;-)
02:09 sorear 'na', not 'na1'
02:11 sorear evalbot control restart
02:11 p6eval joined #perl6
02:11 sorear n: use Niecza::UCD; say getprop('x', 'na')
02:12 p6eval niecza v19-1-gbd1bd16: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤      'getprop' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1402 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) â�¤  at /h…
02:13 ajs_home joined #perl6
02:14 sorear n: use Niecza::UCD; say value('na', "\x03BB")
02:14 p6eval niecza v19-1-gbd1bd16: OUTPUT«GREEK SMALL LETTER LAMDA␤»
02:14 sorear n: use Niecza::UCD; say value('na1', "\x03BB")
02:14 p6eval niecza v19-1-gbd1bd16: OUTPUT«GREEK SMALL LETTER LAMBDA␤»
02:14 sorear pmichaud: what did you mean by "which name"?
02:15 pmichaud ICU offers several choices:  UNICODE_CHAR_NAME, UNICODE_10_CHAR_NAME (obviously not this one), EXTENDED_CHAR_NAME, CHAR_NAME_ALIAS
02:15 pmichaud so, for example, CHAR_NAME_ALIAS is the one that is corrected from NameAliases.txt
02:15 sorear n: use Niecza::UCD; say value('NameAlias', "\x03BB")
02:16 p6eval niecza v19-1-gbd1bd16: OUTPUT«Unhandled exception: NAMEALIAS does not exist as a UCD table␤  at /home/p6eval/niecza/lib/Niecza/UCD.pm6 line 8 (get_value_num @ 5) ␤  at /home/p6eval/niecza/lib/Niecza/UCD.pm6 line 20 (value @ 5) ␤  at /tmp/Je6PjubW9D line 1 (mainline @ 4) ␤  at /home/p6ev…
02:16 sorear n: use Niecza::UCD; say value('Name_Alias', "\x03BB")
02:16 p6eval niecza v19-1-gbd1bd16: OUTPUT«Unhandled exception: NAMEALIAS does not exist as a UCD table␤  at /home/p6eval/niecza/lib/Niecza/UCD.pm6 line 8 (get_value_num @ 5) ␤  at /home/p6eval/niecza/lib/Niecza/UCD.pm6 line 20 (value @ 5) ␤  at /tmp/GaBmuA5lBf line 1 (mainline @ 4) ␤  at /home/p6ev…
02:16 sorear I think NameAliases.txt might only be supported in the reverse direction
02:17 pmichaud could be
02:17 pmichaud u_charName() returns the "modern" name of a Unicode character; or the name that was defined in Unicode version 1.0, before the Unicode standard merged with ISO-10646; or an "extended" name that gives each Unicode code point a unique name.
02:17 pmichaud so yes, it looks like the corrected name isn't available (through this function)
02:17 pmichaud but we can get either the "modern" name or the "extended" one
02:20 orafu joined #perl6
02:24 tyatpi joined #perl6
02:31 awwaiid joined #perl6
02:42 colomon sorear: hate to admit it, but I've got no idea how to add the action for [&function].  NieczaActions.pm6 method infixish?  I'm off to bed in a moment, but any hints would be welcome.  (Porting the grammar bit from STD seemed completely straightforward, on the other hand.)
02:44 sorear yes, in infixish
02:44 colomon I'm guessing $Operator.funop will be involved?
02:44 sorear yes
02:45 sorear check if $<infix> is actually a variable, then do_variable_reference and check_variable it
02:45 colomon would that part be as simple as $Operator.funop($/, function-name, 2);
02:48 colomon like this bit?
02:48 colomon        make $Operator_Function.new(function =>
02:48 colomon            self.do_variable_reference($/, $<variable>.ast));
02:48 colomon        self.check_variable($<variable>);
02:48 sorear Yes.
02:48 sorear well, $<infix>
02:49 sorear because the parser fragment is <infix=.variable>
02:49 colomon instead of $<variable>
02:49 sorear Yes
02:50 colomon sigh.  sorry for asking you to basically write it, but how do you check if $<infix> is a variable?
02:52 sorear $<infix>.reduced eq 'variable'
02:52 sorear or $<infix>.ast !~~ $Operator
02:55 colomon my first stab gave me this:
02:55 colomon Excess arguments to Cursor.O, used 1 of 2 positionals
02:55 colomon I presume that's something to do with $¢.O(%additive)
02:59 * colomon should have gone to bed fifteen minutes ago...
03:02 sorear yeah, should be <O(|%additive)>
03:05 colomon bother, different problem now.  Will try to sort it out in the morning.
03:05 colomon sorear++
03:05 sorear does that ++ mean you got it working
03:29 jaldhar_ joined #perl6
04:18 moritz \o
04:22 kaleem joined #perl6
04:23 telex joined #perl6
04:39 telex joined #perl6
04:59 fhelmberger joined #perl6
05:40 birdwindupbird joined #perl6
05:42 dukeleto joined #perl6
05:44 cog_ joined #perl6
05:54 wtw joined #perl6
06:00 simcop2387 joined #perl6
06:13 dukeleto joined #perl6
06:14 tyatpi joined #perl6
06:20 pupoque joined #perl6
07:06 alvis` joined #perl6
07:06 bruges_ joined #perl6
07:06 driador joined #perl6
07:09 apejens joined #perl6
07:09 revdiablo joined #perl6
07:10 brrt joined #perl6
07:11 rsimoes joined #perl6
07:11 Tene joined #perl6
07:17 birdwindupbird joined #perl6
07:20 yves_ joined #perl6
07:22 dalek rakudo/nom: ed46bdb | pmichaud++ | src/ (2 files):
07:22 dalek rakudo/nom: METAOP_REDUCE -> METAOP_REDUCE_LEFT
07:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ed46bdbf4c
07:22 dalek rakudo/nom: 46dacb9 | pmichaud++ | src/Perl6/Actions.pm:
07:22 dalek rakudo/nom: Refactor determination of reduction type for base operator.
07:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/46dacb9537
07:22 dalek rakudo/nom: 433956d | pmichaud++ | src/ (2 files):
07:22 dalek rakudo/nom: Refactor to pass reduction type to CROSS and ZIP metaoperators.
07:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/433956df60
07:22 dalek rakudo/nom: b639af6 | pmichaud++ | src/core/metaops.pm:
07:22 dalek rakudo/nom: Update METAOP_ZIP to honor associativity of the base operator.
07:22 dalek rakudo/nom: Fixes Z, (RT #113800) and some other issues.
07:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b639af6bcd
07:22 dalek rakudo/nom: 5e3dfe9 | pmichaud++ | src/core/metaops.pm:
07:22 dalek rakudo/nom: Update METAOP_CROSS to honor associativity of the base operator.
07:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5e3dfe96f0
07:24 kresike joined #perl6
07:25 kresike good morning all you happy perl6 people
07:25 [particle]1 joined #perl6
07:25 moritz \o kresike
07:26 kresike moritz, o/
07:26 larks joined #perl6
07:30 brrt kresike: i like your greeting
07:32 kresike brrt, then you must be a happy perl6 person :)
07:32 brrt i'm a happy parrot person  at the moment, but close enough :-)
07:33 moritz :-)
07:33 kresike the most important thing is that one's happy about something, the reason is secondary.
07:35 kresike to be honest, I borrowed that greeting from Droopy :)
07:35 jnthn good morning o/
07:35 kresike hello jnthn o/
07:35 dylanwu left #perl6
07:35 jnthn ooh, pmichaud++ has been apatchin'
07:37 kresike jnthn, what does the Q stand for in QAST, QRegex ... ?
07:37 jnthn P++
07:37 jnthn ;)
07:37 moritz Quantum!
07:37 jnthn r: say "P"++
07:37 p6eval rakudo 1ffd6c: OUTPUT«Cannot assign to a non-container␤  in sub postfix:<++> at src/gen/CORE.setting:1344␤  in block <anon> at /tmp/Kea0XOGr6c:1␤␤»
07:37 jnthn oops
07:37 moritz r: say 'P'.succ
07:37 p6eval rakudo 1ffd6c: OUTPUT«Q␤»
07:37 jnthn r: say "P".succ
07:37 p6eval rakudo 1ffd6c: OUTPUT«Q␤»
07:37 jnthn kresike: You can see it as a prefix to let you know "this is fairly new" :)
07:39 kresike jnthn, I figured as much, but does it involve some new idea or algorithm, or it's just a new and better implementation ?
07:39 moritz there are lots of new ideas that make it a new and better implementation :-)
07:39 kresike hmmm, that came out redundant ...
07:39 moritz it's not a whole new paradigm
07:40 moritz it's mostly a rework to incorporate stuff that was missing in the previous model, and hard to add later on
07:40 moritz and it takes advantage of 6model, our newish object storage system
07:40 pochi joined #perl6
07:40 moritz which, we hope, will reduce memory usage
07:40 jnthn kresike: PAST (which QAST is replacing) is one of the oldest pieces of our compiler toolchain. It's served us pretty well, but we've learned a lot in those years, and have some things we simply didn't know would exist back then.
07:41 jnthn Also PAST is written in PIR. Maintaining complex stuff in an assembly language is not so productive.
07:41 jnthn So it's a port to NQP plus improvements plus making it better integrate with 6model and bounded serialization.
07:41 kresike I see
07:42 jnthn hmm...open doesn't take :$enc for what encoding to read the file in...
07:42 moritz jnthn: shouldn't be too hard to change
07:42 moritz there's already a call to $!PIO.encoding
07:43 moritz jnthn: we have a sub PARROT_ENCODING that maps from normal names to parrot encoding name
07:43 moritz s
07:45 moritz trying a patch now
07:45 moritz jnthn++ # dddx blog post
07:46 moritz http://blog.edument.se/2012/06/26​/insights-from-dddx-2012-part-1/ for those who don't twitter. (Not Perl 6 related, just general software engineering practise)
07:47 moritz jnthn: the part about delaying decisions kinda parallels the reasons for bottom-up building -- it delays the higher level design decisions
07:50 jnthn Curious to see my other life leaking into #perl6 ;)
07:50 jnthn My reason for asking about $encoding is I'm faced with a bunch of latin-1 files here at $dayjob...
07:51 moritz well, there's another leak :-)
07:52 moritz phenny: en nb "a year"?
07:52 phenny moritz: "et år" (en to nb, translate.google.com)
07:52 moritz now I have a test case for writing latin-1 stuff :-)
07:52 * moritz on a system without a compose key :/
07:52 brrt left #perl6
07:53 brrt joined #perl6
07:54 moritz gah, I only patched the method form of open(), not the sub :/
07:58 jnthn moritz++
07:58 jnthn meeting &
08:02 moritz phenny: U+00E5
08:02 moritz .u U+00E5
08:02 phenny moritz: Sorry, no results
08:02 moritz .u E5
08:02 phenny moritz: Sorry, no results for 'E5'.
08:06 dalek rakudo/nom: 88a9d69 | moritz++ | / (2 files):
08:06 dalek rakudo/nom: add :enc/:encoding support to &open
08:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/88a9d69d6c
08:06 moritz jnthn: there you go; my initial test was succesful
08:07 moritz to all the lurkers that have feature requests: voice them. Tell us. Some of them are easy to do
08:16 kresike we would, but we're afraid :)
08:16 moritz don't be. I promise we won't eat you.
08:16 jnthn omnomnom users
08:18 * moritz feeds jnthn with patches instead
08:18 jnthn another meeting... will try it in a moment
08:19 moritz no hurry
08:40 dakkar joined #perl6
08:59 dalek roast: 5d689e8 | moritz++ | S06-signature/slurpy-and-interpolation.t:
08:59 dalek roast: test arglist interpolation of ranges, RT #113804
08:59 dalek roast: review: https://github.com/perl6/roast/commit/5d689e89d8
09:05 dalek roast: c8b1ef4 | moritz++ | S04-declarations/constant.t:
09:05 dalek roast: RT #112116, constant, hashes and map
09:05 dalek roast: review: https://github.com/perl6/roast/commit/c8b1ef46ea
09:10 dukeleto joined #perl6
09:14 jnthn eek, I was using dir...
09:14 jnthn though
09:14 jnthn for dir($path) -> $name {
09:14 jnthn given "$path/$name" {
09:14 jnthn when :f {
09:14 jnthn I wonder if that gets simpler now...
09:15 moritz for dir($path) -> $io { when .f { ... } }
09:17 dalek roast: d1355fd | moritz++ | S06-operator-overloading/sub.t:
09:17 dalek roast: fix two operator overloading tests, unfudge one for rakudo
09:17 dalek roast: review: https://github.com/perl6/roast/commit/d1355fddc4
09:18 masak so it does get simpler. that's a relief.
09:20 jnthn No
09:20 jnthn Everythign else gets worse :(
09:20 jnthn I actually only want the unqualified path part of the name in a bunch of plaes
09:20 jnthn And to do regex matches and .index on it and so on
09:21 jnthn And guess what? IO ain't Cool.
09:21 jnthn So I have to .Str everywhere.
09:21 jnthn So for my use case, dir returning IO is vastly worse.
09:21 moritz that's ugly
09:21 jnthn Having looked at a real word use of dir, my only feeling is, "revert please".
09:21 jnthn It's theoretically righter.
09:21 jnthn But practically wronger.
09:22 jnthn *real world
09:22 moritz but for other use cases (like file handles) it would be wrong to make IO Cool
09:22 jnthn Right.
09:22 moritz ok, let's revert
09:22 jnthn Well, I'm happy to hear countr-arguments.
09:22 jnthn But my gut feeling is, "ouch"
09:24 jnthn hmm, though one place gets a bit nicer
09:24 jnthn Hmm
09:27 jnthn Hre's a before/after example on one snippet
09:27 jnthn https://gist.github.com/4870f14c5f384e663daa
09:28 daxim joined #perl6
09:28 jnthn And really ugly
09:28 jnthn my $fh = open($dir_item.Str, :enc('latin-1'), :r);
09:28 jnthn I have to .Str it there
09:28 jnthn .O
09:28 jnthn o.O even
09:29 moritz hm, we could make the filename optional in IO.open
09:29 jnthn $dir_item.open(:enc...) didn't work
09:29 moritz yes, but could be made to work
09:30 jnthn .oO( I don't get to be a whiney user very often...this is fun! :P )
09:31 moritz now if we had a   class IO::File is IO is Cool { }  returned from &dir, and you could call .file on it to get the file name only (not full path), and which also .Str's to that, and you could call .open on it...
09:31 jnthn Right.
09:32 erkan joined #perl6
09:32 jnthn It feels quite clear to me now that we need to separate out these two concepts.
09:32 jnthn Actual file handles being Cool feels wrong. But whatever dir returns really wants to be.
09:32 moritz http://moritz.faui2k3.org/tmp/0001-Revert-c​ore-IO.pm-return-IO-objects-from-dir.patch  # if we don't come up with something better
09:33 moritz right, maybe it shouldn't inherit from IO at all
09:33 jnthn Or that.
09:34 moritz otoh it feels very convenient to be able to call .f, .s etc. on it
09:34 moritz so, common role?
09:34 moritz IO::FileTests, and both IO and IO::File do that role?
09:35 jnthn That's starting to feel better
09:35 moritz r: say $*IN.f
09:35 p6eval rakudo 88a9d6: OUTPUT«False␤»
09:35 moritz r: say $*IN.s
09:35 p6eval rakudo 88a9d6: OUTPUT«False␤»
09:35 moritz r: say ".gitignore".IO.s
09:35 p6eval rakudo 88a9d6: OUTPUT«True␤»
09:35 moritz erm
09:36 moritz r: say ".gitignore".IO.size
09:36 p6eval rakudo 88a9d6: OUTPUT«No such method 'size' for invocant of type 'IO'␤  in block <anon> at /tmp/mdPL7aDefK:1␤␤»
09:36 moritz r: say ".gitignore".IO.bytes
09:36 p6eval rakudo 88a9d6: OUTPUT«No such method 'bytes' for invocant of type 'IO'␤  in block <anon> at /tmp/oUM5s7D5xp:1␤␤»
09:37 moritz thing is
09:37 moritz whatever objects &dir returns, we should think hard about what its .lines method should return
09:37 moritz if it's Cool, people will expect it to do the same as Str.lines
09:38 moritz so we shouldn't allow reading from it directly
09:38 moritz but allow an .open(*%opts) which returns an IO from which you can read
09:43 jnthn moritz: :$enc helped lots, btw. \o/
09:46 moritz jnthn: good to hear
09:49 jnthn Well, just updated the big script with it and dir now...let's see how that works out
09:51 odoacre joined #perl6
09:56 mucker joined #perl6
10:05 cognominal joined #perl6
10:09 sergot joined #perl6
10:09 sergot hi o/ !
10:11 kresike hello sergot o/
10:13 masak sergot! \o/
10:13 masak jnthn++ moritz++ # I like where this is going
10:30 JimmyZ_ joined #perl6
10:50 tyatpi joined #perl6
10:56 tadzik \o/
10:56 jnthn Yeah, le other more complex script is working out far better now too.
10:56 jnthn Oh, apart from I did a silly bug that makes the analysis useless...
10:56 moritz l'other or l'autre please :-)
10:57 jnthn :P
10:57 snearch joined #perl6
10:58 * jnthn corrects it and sets it off again
11:01 cog_ joined #perl6
11:03 moritz jnthn: do paths like ./foo/bar.txt work under windows?
11:03 moritz ie if I feed them to open()
11:03 moritz parrot's open, that is :-)
11:22 dalek rakudo/io: cc780c2 | moritz++ | src/core/IO.pm:
11:22 dalek rakudo/io: move file tests to IO::FileTestable
11:22 dalek rakudo/io: review: https://github.com/rakudo/rakudo/commit/cc780c2c39
11:23 moritz l'experiment avec &dir based on this branch: https://gist.github.com/3003456
11:23 moritz jnthn, masak, pmichaud: ^^ see above, feedback welcome
11:23 masak (l'other)++ # :P
11:24 moritz it tries to to DWIM without exaggerating
11:24 * masak looks, interested
11:24 moritz maybe I should add an .IO coercion method
11:24 masak "IO::File<$.path>" # nice
11:25 moritz r: say Buf.new(1, 2, 244)
11:25 p6eval rakudo 88a9d6: OUTPUT«Buf:0x<01 02 f4>␤»
11:25 moritz same idea
11:25 masak waitwait, so then we would have IO and IO::File?
11:25 moritz yes
11:25 masak hmmmrm.
11:25 masak that might be the only detail I dislike slightly.
11:25 kresike moritz, while you're at it maybe it would be nice to have an IO::Dir class too
11:26 kresike this way masak can have two things to dislike
11:26 moritz kresike: maybe
11:26 moritz kresike: i'll probably experiment with it
11:26 moritz masak: maybe we should rename IO to IO::Handle or so
11:26 kresike it makes sense because files can be opened while dirs cannot.
11:27 kresike among other things
11:27 moritz kresike: one could also just add an .opendir or .dir method to IO::File
11:27 masak moritz: +1
11:27 moritz kresike: note that IO::File has an .open method even thought it could be a directory right now
11:27 moritz *though
11:28 kresike moritz, yes, I think that's wrong
11:29 kresike unless you think of a directory like vim does, and when you open it, gives you a list of files contained within as content
11:29 moritz kresike: I agree that it's wrong from a theoretical point of view
11:29 moritz kresike: but in practise we often have methods that cause an error when used
11:29 moritz compare (-2).sqrt for example
11:30 moritz so, the question is, does it make sense from a user's perspective?
11:30 moritz I could further imagine that we have an  IO::Path does IO::FileTestable
11:30 kresike moritz, the question is, are files and directories different enough to create a new class for each of them ?
11:31 moritz and then IO::File and IO::Dir, which both do IO::Path
11:31 moritz kresike: correct
11:31 moritz I guess I'll experiment with it
11:32 moritz bikeshedding didn't get us very far until now; I think experiments and use cases are the best approach
11:32 kresike IO::Path feels a little overkill to me, I'd add IO::File.basename, IO::File.path and IO::File.name
11:33 moritz well, /if/ we separate file and dir into separate types, then we should also have a common type for path handling, which IO::Path would be
11:33 moritz if you think that having all three of Path, File and Dir is too much, we should probably just have one of them
11:33 moritz kresike: IO::File.file is what you would call basename
11:34 moritz maybe it's better to rename file to basename though
11:34 kresike well to me basename means the file name because I'm a *nix user, doesn't mean I'm right about it
11:35 moritz on a different tangent, one reason for having 'IO' instead of 'IO::Handle' was to have short file tests a la  $str.IO ~~ :e
11:35 kresike you are right about the Path, File and Dir, Path should be an ancestor of the previous two
11:35 kresike s/previous/other/
11:35 moritz if we rename it to IO::Handle, then we have to think of another way to do that
11:36 moritz kresike: agreed (though I'm currently inclined to do with roles instead of classes; not sure if/how much that matters)
11:37 kresike iiuc roles are a kind of abstract class
11:38 moritz not quite
11:38 moritz roles and classes are much alike, except that role composition forces you to resolve method name conflicts
11:38 moritz whereas with classes and inheritance, one of them just wins
11:39 eiro masak, jnthn did you sent me the price of your flight ?
11:39 kresike I see
11:39 eiro (i'm afraid i lost the info)
11:39 moritz kresike: you *can* get role semantics similar to Java's interfaces, but that's not how I mean to use them
11:39 kresike then I don't think it makes sense to use roles, since the Path of a File is very similar to that of a Dir
11:40 moritz a more interesting question is: will you ever instantiate an IO::Path without making it a File or a Dir?
11:41 moritz the answer is probably "yes", because you might want to create path names without looking at the file system to see if it's a plain file or a directory
11:41 moritz that means it should probably a class
11:42 arnsholt We'll definitely want to be able to represent a file path without considering the existence or type of that file, I think
11:42 kresike moritz, think of a filesystem as a cloud, that backs up making Path a class too
11:44 frettled Sounds nebulous to me.  ;)
11:47 * kresike needs to look up the differences between roles and classes in p6
11:52 k0ala joined #perl6
12:04 moritz https://gist.github.com/3003456#file_dir_split_up.pl # another version
12:11 k0ala joined #perl6
12:15 moritz that feels a bit more "engineered", I'm having trouble to decide whether that's a plus or a minus
12:17 pmichaud good morning, #perl6
12:18 kresike moritz, on second thought is there a use case when either File or Dir would override any of Path's methods ?
12:19 moritz kresike: well, IO::Dir might override method d { True }
12:19 moritz kresike: or some such
12:19 kresike but that's Filetestable's job
12:20 masak eiro: we're going by train, at least on the way there. jnthn has the details.
12:20 kresike I mean Dir is in fact overriding a method of Filetestable
12:20 not_gerd joined #perl6
12:20 kresike oh wait, Filetestable is a role
12:20 not_gerd hello, #perl6
12:20 moritz kresike: currently I'm not aware of any overriding, but I wouldn't trust it to stay that way
12:20 moritz \o not_gerd
12:21 kresike my bad :)
12:21 moritz kresike: but that doesn't matter too much; the role is alreday flattened out in IO::Path
12:21 moritz good am, pm
12:21 not_gerd moritz: S32/IO already specs things like File, Directory, Path
12:22 not_gerd I take it the draft is obsolete?
12:22 moritz pmichaud: you might be interested in https://gist.github.com/3003456 (two different approaches to &dir that both dwim, with varying degrees of engineering behind it; needs the 'io' branch of Rakudo for IO::FileTestable)
12:22 moritz not_gerd: I should read S32/IO again, but I usually mistrust that synopsis
12:23 eiro masak, train ? from sweden ?
12:24 moritz not_gerd: it's not a coherent picture. People have added their favorite parts to some roles/classes without considering the big picture, and others have split up classes in multiple classes and roles without thinking through how it all works out
12:24 eiro train+boat then ?
12:24 masak eiro: aye.
12:24 masak no, not boat.
12:24 masak we have a bridge.
12:24 moritz isn't there a bridge (over troubled water)?
12:24 kresike moritz, my point is, I can't think of a reason why Path cannot be a role, since it has to do the same things for File and for Dir too
12:24 masak the water ain't so troubled.
12:24 eiro OMFG! it must be a giant one
12:25 pmichaud moritz: looking
12:25 moritz kresike: the class/role distinction is really minor at this point, and easily changable the other way if we get it wrong now. I'd rather not spent too much time on this point right now
12:25 kresike moritz, right
12:26 eiro masak, jnthn are your at Strasbourg Sunday? i'm planning a "flamekuche party" at hope
12:26 not_gerd moritz: it's not all bad, but indeed there are some rough edges (Readable.read returns a new Buf on each read oO)
12:26 eiro home
12:27 not_gerd it lies as well: C89 does not specify integer file descriptors
12:28 moritz also it uses camelCase method names, which no other part of Perl 6 does
12:28 * arnsholt wonders how floating point fds would work
12:28 moritz arnsholt: fractionally
12:29 arnsholt Random selection of bytes from the integer numbered files, weighted by the position between the two perhaps ^_^
12:30 moritz not_gerd: more to the point, it misses some crucial bits of information
12:30 moritz not_gerd: like, what kind of object does open() return?
12:31 not_gerd moritz: IO?
12:31 moritz =head2 IO
12:31 moritz The base role only tags that this is an C<IO> object for more generic
12:31 moritz purposes. It doesn't specify any methods or attributes.
12:31 moritz sounds like not specific enough for me
12:32 moritz if it returns an IO in the sense of S32/IO, you can do *nothing* with it
12:32 not_gerd I'm confused... - what about all the methods under that heading?
12:32 moritz they are in IO::Redable, IO::Writable etc.
12:32 not_gerd moritz: not according to what I'm reading
12:33 moritz and that's the real problem: there are scattered bits and pieces, but they don't fit together
12:33 pmichaud I'll have to catch up on the &dir and IO discussion in a little while; still doing morning household chores here
12:33 moritz not_gerd: then maybe we're reading different documents?
12:34 moritz anyway, decommute now, will be available for discussion later
12:34 moritz &
12:35 pmichaud r say (1,2,3 Z, 4,5,6 Z, 7,8,9).perl   # testing RT #113800
12:35 pmichaud r: say (1,2,3 Z, 4,5,6 Z, 7,8,9).perl   # testing RT #113800
12:35 p6eval rakudo 88a9d6: OUTPUT«((1, 4, 7), (2, 5, 8), (3, 6, 9)).list␤»
12:35 pmichaud \o/
12:35 pmichaud afk, errands
12:42 Pleiades` joined #perl6
12:43 kaleem joined #perl6
12:48 dukeleto joined #perl6
12:57 PacoAir joined #perl6
12:58 JimmyZ joined #perl6
13:07 cognominal joined #perl6
13:10 Psyche^ joined #perl6
13:12 tyatpi_ joined #perl6
13:15 [particle] joined #perl6
13:17 bluescreen10 joined #perl6
13:18 kaleem joined #perl6
13:24 driador joined #perl6
13:33 eiro masak, jnthn i have to know for sunday: i'll go buy the stuff in a hour
13:35 atrodo joined #perl6
13:45 masak that's a bit of a short notice. I'd give you the details but I don't have them.
13:46 masak I know we'll be going home on the Sunday but I don't know when.
13:46 masak probably early-ish.
13:46 masak hope that's enough.
13:48 not_gerd bye, #perl6
13:48 not_gerd left #perl6
13:55 thilp joined #perl6
13:55 eiro masak, ok i'll buy enought for you, hope you'll be there
14:00 JimmyZ joined #perl6
14:02 masak I hope so to, but I think it might be too time-constrained.
14:07 eiro i understand
14:22 fgomez joined #perl6
14:27 arlinius joined #perl6
14:29 hoelzro joined #perl6
14:30 fglock joined #perl6
14:30 jnthn I don't have the times to hand for our train, but I know we'll be heading of relatively early on Sunday.
14:33 mikemol joined #perl6
14:36 * TimToady dislikes camelCase
14:36 Slacky joined #perl6
14:37 thilp joined #perl6
14:41 vmspb joined #perl6
14:44 jnthn masak: The boat bit is true. Our train drives onto a boat, and then is transported from Denmark to Germany. They're gonna build a tunnel there by 2017 or something...
14:47 arnsholt Laziness truly is a virtue: http://thecodelesscode.com/case/29
14:49 thou joined #perl6
14:57 jnthn decommute &
15:13 szabgab joined #perl6
15:13 szabgab hi
15:13 moritz \o szabgab
15:13 Slacky hi szabgab
15:13 moritz jnthn: I remember that boat trip. Train on a ferry is quite a nice thing IMHO :-)
15:13 szabgab I am trying to get away from most of IRC but it is quite hard with perl 6 :)
15:14 sisar arnsholt: the whole series is fun to read :)
15:14 moritz iirc Puttgarden is one of the endpoints
15:14 szabgab I wonder if it would be ok with you guys if I started to post question on the mailing list ?
15:14 szabgab and if it is ok, which one should I use?
15:14 moritz szabgab: sure, and I'll try to answer them
15:14 arnsholt sisar: Yeah, I just read the whole thing
15:14 szabgab perl6-users@perl.org  ?
15:14 arnsholt The testing one especially struck me as Perlish
15:15 moritz szabgab: depends on your questions, but perl6-users@perl.org if you don't know for sure
15:15 sisar arnsholt: thanks for bringing it to my notice.
15:15 moritz perl6-compilers when asking about rakudo or niecza
15:16 szabgab ok, I'll start with perl6-users as that's my POV and let me know if some question would be better discussed on the other perl6-complers list, I think I am on both
15:17 moritz szabgab: ok; both are pretty low volume, so it doesn't matter too much
15:19 szabgab Let's hope that generating some volume there is good for perl6 :)
15:20 szabgab bye&
15:26 alester joined #perl6
15:29 mikemol_ joined #perl6
15:36 * jnthn home
15:36 jnthn moritz: Yes, Lubeck to Puttgarden :)
15:40 dalek rakudo/parrot-iocleanup1: d0dc2d3 | moritz++ | src/core/IO/Socket/INET.pm:
15:40 dalek rakudo/parrot-iocleanup1: explicitly set encoding on sockets
15:40 dalek rakudo/parrot-iocleanup1: review: https://github.com/rakudo/rakudo/commit/d0dc2d33d0
15:45 dukeleto joined #perl6
15:49 cog_ joined #perl6
15:49 spider-mario joined #perl6
15:50 dalek specs: 10d772f | larry++ | S03-operators.pod:
15:50 dalek specs: Document [&func] form of infix
15:50 dalek specs: review: https://github.com/perl6/specs/commit/10d772fdfd
15:51 vmspb Hello
15:51 vmspb prn: say [-](); say [-](1)
15:51 p6eval rakudo 88a9d6, niecza v19-1-gbd1bd16, pugs: OUTPUT«0␤1␤»
15:51 vmspb [-](i) should be equal to (i) or (0 - i)? It falls out of the system.
15:51 vmspb prn: say [~]() == ''; say [*]() == 1; say [+]() == 0; say [-]() == 0;
15:51 p6eval rakudo 88a9d6, niecza v19-1-gbd1bd16: OUTPUT«True␤True␤True␤True␤»
15:51 p6eval ..pugs: OUTPUT«1␤1␤1␤1␤»
15:51 vmspb prn: say [~](1) == '' ~ 1; say [*](2) == 1 * 2; say [+](3) == 0 + 3; say [-](4) == 0 - 4;
15:51 p6eval rakudo 88a9d6, niecza v19-1-gbd1bd16: OUTPUT«True␤True␤True␤False␤»
15:51 p6eval ..pugs: OUTPUT«1␤1␤1␤␤»
15:53 TimToady while an argument could be made for such behavior, reduction on non-commutative ops is rather non-sensical to begin with
15:54 TimToady and you can always add the 0 explicitly if you want the other behavior
15:54 dalek star: 5138e08 | moritz++ | skel/docs/announce/2012.06:
15:54 dalek star: fiddle a bit with the release announcement
15:54 dalek star: review: https://github.com/rakudo/star/commit/5138e0888b
15:55 moritz ok, if nobody objects I'll release star tomorrow
15:55 TimToady plus returning the first arg when there's only one works for reductions on operators that have no meaningful identity value
15:56 fgomez joined #perl6
16:00 kresike bye all
16:04 brrt left #perl6
16:11 sergot joined #perl6
16:13 MayDaniel joined #perl6
16:18 sorear good * #perl6
16:20 TimToady o/
16:20 TimToady sorear: is there any way to get a list of available UCD tables?
16:21 TimToady unidata is kinda opaque...
16:26 sorear TimToady: not at the moment from within niecza; you may have better luck with https://github.com/sorear/multi-langu​age-ucd/blob/master/digest-ucd-xml.pl
16:26 TimToady thanks
16:28 cxreg as someone who never really learned BNF in depth, is there a post any where that compares it to perl 6 grammars?
16:28 diakopter what's a domirrror
16:29 cxreg if not, i may have to learn enough to write one, because i think that would be useful
16:33 dalek roast: 9ab47bb | pmichaud++ | S03-metaops/zip.t:
16:33 dalek roast: Add tests for proper list associativity with Z, (RT #113800).
16:33 dalek roast: review: https://github.com/perl6/roast/commit/9ab47bb5a1
16:33 moritz r: say (<a b c> Z <d e f> Z <g h i>).perl
16:33 p6eval rakudo 88a9d6: OUTPUT«(("a", "d", "g"), ("b", "e", "h"), ("c", "f", "i")).list␤»
16:33 sirrobert Do perl6 modules need to end true?  (1;)
16:34 moritz no
16:34 masak sirrobert: no.
16:34 sirrobert great =)
16:34 moritz it was even an anachronism in p5, IMHO
16:34 masak "was"? :)
16:34 moritz if you wanted the compilation to fail, you simply die()d
16:34 moritz well, it was 10 years ago
16:34 moritz and stil is :-)
16:34 moritz so, "has been rather"
16:35 sirrobert btw, someone (moritz?) requested I blog about adopting perl6 for my business.  You can see it (in it's 1-post glory) at http://6ing.wordpress.com/
16:35 masak what's the use case for wanting the compilation to fail?
16:35 masak sirrobert++
16:35 moritz masak: I dunno, maybe if you want to load a data file at compile time, and it can't find that file, die?
16:35 moritz but then it dies anyway
16:36 moritz sirrobert++
16:39 masak "design for semantic compression at the cost of syntactic compression" # nice!
16:40 sirrobert =)
16:40 moritz sirrobert: thank you for that blog post, it's really nice
16:40 sirrobert you're welcome =)
16:41 * moritz subscribes to the RSS feed
16:41 sirrobert What's the irc command to do that?
16:41 sirrobert * sirrobert whatever.
16:42 benabik It's `/me whatever.`
16:42 * benabik whatever.
16:42 sirrobert ok:
16:42 * sirrobert is curious how his CTO will respond when he comes back from vacation =)
16:43 moritz sirrobert: to you blogging, or to you chosing p6? :-)
16:43 sirrobert p6
16:43 masak sirrobert: really curious about hearing more about your adventures in Perl 6 land.
16:43 sirrobert me too.  I posted a bug report the other day
16:43 sirrobert a problem parsing grammars.
16:44 mucker joined #perl6
16:44 masak nice.
16:44 moritz ah, the one about implicit <.ws> mishandling?
16:44 sirrobert apparently:  rule { ^ <foo> $ }    parses differently than:    rule {^ <foo> $}
16:44 sirrobert yeah
16:44 masak yeah, that's wrong.
16:44 jnthn That used to be how it was spec'd to.
16:44 jnthn Until fairly recently.
16:44 sirrobert huh
16:45 pmichaud fixing that one is on my todo list :)
16:45 * jnthn totally agrees with the spec change though :)
16:45 * moritz wonders if it's as easy adding an s* somewhere
16:45 jnthn No :)
16:46 moritz :(
16:46 jnthn Well, maybe, but they you discover that NQP's and Rakudo's grammars rely on the current semantics.
16:46 sirrobert I tried a lot of variations of \s*
16:46 moritz sirrobert: I mean, insides the regex parser
16:47 moritz which is, I might add, surprisingly short
16:47 sirrobert oh
16:47 pmichaud I can work on that one now, a bit.
16:48 sirrobert thanks =)
16:48 TimToady r: constant @t = [\+] 1..5; say (0,@t Z^.. @t).perl;
16:48 p6eval rakudo 88a9d6: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).list␤»
16:48 TimToady that one still doesn't produce sub-parcels
16:48 TimToady pmichaud: ^^
16:48 jnthn r: my @t = [\+] 1..5; say (0,@t Z^.. @t).perl;
16:48 p6eval rakudo 88a9d6: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).list␤»
16:49 jnthn OK, and constant ain't to blame this time :)
16:49 * masak submits rakudobug
16:49 pmichaud TimToady: okay, looking.
16:49 TimToady probably Range behaving insufficiently like a Parcel somewhere
16:50 kaare_ joined #perl6
16:50 pmichaud r: my @t = [\+] 1..5;  say @t.perl
16:50 p6eval rakudo 88a9d6: OUTPUT«Array.new(1, 3, 6, 10, 15)␤»
16:50 pmichaud r: my @t = [\+] 1..5;  say (0,@t Z~ @t).perl
16:50 p6eval rakudo 88a9d6: OUTPUT«("01", "13", "36", "610", "1015").list␤»
16:51 pmichaud r: my @t = [\+] 1..5;  say (0,@t Z, @t).perl
16:51 p6eval rakudo 88a9d6: OUTPUT«((0, 1), (1, 3), (3, 6), (6, 10), (10, 15)).list␤»
16:51 pmichaud r: my @t = [\+] 1..5;  say (0,@t Z.. @t).perl
16:51 p6eval rakudo 88a9d6: OUTPUT«(0, 1, 1, 2, 3, 3, 4, 5, 6, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15).list␤»
16:51 pmichaud okay, I can look at it.
16:52 thilp joined #perl6
16:53 TimToady n: constant @t = [\+] 1..5; say (0,@t Z^.. @t).perl;
16:53 p6eval niecza v19-1-gbd1bd16: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).list␤»
16:53 TimToady n: constant @t = [\+] 1..5; say (0,@t Z^.. @t)[3].perl;
16:53 p6eval niecza v19-1-gbd1bd16: OUTPUT«6^..10␤»
16:54 TimToady niecza has a similar difficulty somewhere
16:54 TimToady also, doesn't have .lol yet
16:54 sudokode joined #perl6
16:56 TimToady r: constant @t = [\+] 1..5; say (0,@t Z^.. @t).lol[3].perl;
16:56 p6eval rakudo 88a9d6: OUTPUT«Any␤»
16:56 TimToady and rakudo's .lol doesn't lol it right either
16:57 pmichaud it looks like some premature flattening in the Z metaop, to me.
16:57 GlitchMr joined #perl6
16:57 sirrobert lunch
16:57 pmichaud r:  say ((1,2) Z.. (3,4)).perl
16:57 p6eval rakudo 88a9d6: OUTPUT«(1, 2, 3, 2, 3, 4).list␤»
16:57 TimToady but then why would lol return Any?
16:58 aloha joined #perl6
16:58 pmichaud not sure
16:58 TimToady r: constant @t = [\+] 1..5; say (0,@t Z^.. @t).lol[0].perl;
16:58 p6eval rakudo 88a9d6: OUTPUT«ListIter.new()␤»
16:59 * TimToady hates it just about every time he sees ListIter.new()...
16:59 pmichaud agreed; I haven't figured that one out yet either.
16:59 TimToady eager doesn't seem to help with that either
16:59 pmichaud basically, ListIter.new() is saying "something lazy here"
16:59 pmichaud also, I think when it shows up it's been itemized
16:59 TimToady r: constant @t = [\+] 1..5; say (0,@t Z^.. @t).lol[0].eager.perl;
16:59 p6eval rakudo 88a9d6: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).list␤»
16:59 TimToady well, that time it helped
17:00 pmichaud I can at least get ListIter.perl to show when it's an item
17:00 TimToady but .perl should probably consider itself eager, unless it can reproduce the ..* ish ness
17:00 masak +1
17:01 pmichaud I haven't figured out what ListIter.perl should look like in that case, though.
17:02 pmichaud I suppose I could get ListIter to perlify it's generator
17:02 pmichaud *its
17:08 sisar r: say $::;
17:08 p6eval rakudo 88a9d6: OUTPUT«===SORRY!===␤ResizablePMCArray: index out of bounds!␤»
17:08 sisar oops :)
17:08 sisar n: say $::;
17:08 p6eval niecza v19-1-gbd1bd16: OUTPUT«Any()␤»
17:09 sisar std: say $::;
17:09 p6eval std fd2647b: OUTPUT«ok 00:00 40m␤»
17:12 jnthn Hmm, I thought I fixed that issue once...
17:13 jnthn I've no idea what it actually means :)
17:13 * sisar too :)
17:13 masak jnthn: "index out of bounds" means the index was either larger than the last index of the array, or negative. now you know. :P
17:13 jnthn .oO( You can't just type shit and expect it to do something sensible! )
17:13 sisar lol
17:13 jnthn masak: :P
17:14 * masak is so helpful
17:14 jnthn Some things never change. :)
17:14 immortal joined #perl6
17:14 immortal joined #perl6
17:19 pmichaud Looks like the Z^.. is an issue with gather/take
17:19 sisar can someone add sirrobert++'s blog to planetsix.perl.org ?
17:20 sisar or teach me how to do that ?
17:20 pmichaud https://gist.github.com/3005502   # take is flattening the range
17:21 erkan joined #perl6
17:21 pmichaud either that or the list managing the gather is flattening it.
17:22 pmichaud https://gist.github.com/3005523  # more detailed example
17:24 jnthn Hmm...gather/take and flattening sounds familiar...
17:24 jnthn (As in, I think we've had issues in this space before.)
17:25 pmichaud TimToady: ping
17:25 jnthn hmm... https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=106986
17:25 jnthn But it's marked resolved.
17:25 pmichaud jnthn: that one involves scalar arrays
17:25 pmichaud the scalar part wasn't being preserved.
17:26 jnthn *nod*
17:32 TimToady pmichaud: pong
17:32 pmichaud okay, I see where the problem with Z^.. is, and I'm not quite sure how to address it.
17:33 pmichaud Here's the fundamental issue:
17:33 pmichaud r: my @a = <x y>;  my @l := gather { take @a; take @a; };  say @l.perl
17:33 p6eval rakudo 88a9d6: OUTPUT«("x", "y", "x", "y").list␤»
17:33 pmichaud the results of the take's are being flattened
17:34 TimToady yes, each take should result in a parcel, methinks
17:35 TimToady p: my @a = <x y>;  my @l := gather { take @a; take @a; };  say @l.perl
17:35 p6eval pugs: OUTPUT«\("x", "y", "x", "y")␤»
17:35 TimToady n: my @a = <x y>;  my @l := gather { take @a; take @a; };  say @l.perl
17:35 p6eval niecza v19-1-gbd1bd16: OUTPUT«("x", "y", "x", "y").list␤»
17:35 TimToady everyone else has the same problem
17:35 pmichaud if we do that, then    take 1;  take 1;    would result in a list like      ((1,), (1,))
17:35 pmichaud I don't know that this would be a problem... but it would seem... weird.
17:36 TimToady well, scalars are allowed to be their own parcel in general
17:36 pmichaud it's actually not an issue of scalarness (more)
17:36 pmichaud because   1..5  is a scalar
17:36 pmichaud unless you mean "scalar" as "non-interpolating"
17:36 TimToady but something is treating it slurpily and flattening it
17:37 pmichaud sure, because Arrays and Ranges are Iterable, thus they interpolate in lists
17:37 TimToady 1..5 works as a single arg when binding to a non-slurpy, so what's different here?
17:37 TimToady npr: sub foo($x) { $x.say }; foo(1..5)
17:38 p6eval pugs: OUTPUT«12345␤»
17:38 p6eval ..rakudo 88a9d6, niecza v19-1-gbd1bd16: OUTPUT«1..5␤»
17:38 pmichaud as a single arg we're referring to its Positional nature (which doesn't have anything to do with flattening)
17:38 pmichaud (if binding to a positional)
17:39 pmichaud I'll put it another way -- slurpiness isn't entering into it at all.
17:39 TimToady r: my @a = <x y>;  my @l := gather { take @a; take @a; };  say @l.DUMP
17:39 p6eval rakudo 88a9d6: OUTPUT«List<1956749320>(:items(▶Mu), :nextiter(ListIter<1956749344>(:reified(▶Mu), :rest(RPA<1956749364>(GatherIter.new())), :list(List<1956749320>))))␤»
17:39 pmichaud add an 'eager' @l first
17:39 pmichaud to flatten out the GatherIter
17:39 TimToady r: my @a = <x y>;  my @l := gather { take @a; take @a; };  say @l.eager.DUMP
17:39 p6eval rakudo 88a9d6: OUTPUT«List<-1931207599>(:i​tems(RPA<-1931174844>(▶"x", ▶"y", ▶"x", ▶"y")), :nextiter(▶Mu))␤»
17:40 pmichaud r: my @a = <x y>;  my @l := gather { take @a; take @a; };  @l.eager; say @l.DUMP
17:40 p6eval rakudo 88a9d6: OUTPUT«List<-135657117>(:i​tems(RPA<-135607960>(▶"x", ▶"y", ▶"x", ▶"y")), :nextiter(▶Mu))␤»
17:40 pmichaud the list resulting from the gather ends up looking like   (@a, @a)
17:41 pmichaud when then interpolates the @a's whenever you start doing anything with them
17:41 pmichaud (because they're iterable)
17:41 pmichaud same thing for ranges -- the List resulting from the gather ends up being  (1..4, 1..4)
17:41 pmichaud and since Range is iterable, it interpolates.
17:42 TimToady which is why the old version of S07 distinguished get from getarg
17:42 pmichaud just to make sure we're on the same page, note that "interpolate" ne "flattens"
17:43 TimToady it needs to be possible to iterate a lol without flattening things like these
17:43 pmichaud oh!
17:43 TimToady okay, interpolating
17:43 pmichaud so, gather needs to return a LoL, then?
17:43 pmichaud that doesn't feel right either
17:43 pmichaud because it won't flatten.
17:43 TimToady a parcel of parcels/things that can behave like parcels
17:43 TimToady what we used to call "arguments"
17:44 pmichaud flattening is what happens (or doesn't happen) to parcels
17:44 pmichaud Parcel !~~ Iterable, thus it doesn't interpolate by default, interpolation of a Parcel is "flattening"
17:44 TimToady how does the binder avoid this problem?
17:45 pmichaud the binder never has this problem -- it doesn't ever involve interpolation or flattening except when doing slurpies
17:45 TimToady it still has to "iterate" the argument list somehow
17:45 TimToady what that is doing is what we need to do for take and return values when fed to things like .lol or .perl
17:46 TimToady "getarg" in the old-fashioned terms
17:46 pmichaud I think it's the gather that is interpolating, not the take
17:47 pmichaud the take is correctly returning things
17:47 pmichaud basically, each take is like a "getarg"
17:47 aj7504 joined #perl6
17:47 pmichaud if I say    "take 1..5"   it gives me a single range
17:47 pmichaud (unflattened, uninterpolate)
17:47 pmichaud gather then has to put that into a structure
17:48 TimToady so maybe gather is not being quite primitive enough
17:48 pmichaud and that structure is what ends up interpolating
17:48 TimToady r: say (1..5, 2..7).perl
17:48 p6eval rakudo 88a9d6: OUTPUT«(1..5, 2..7)␤»
17:49 pmichaud r: say (1..5, 2..7).list.perl
17:49 p6eval rakudo 88a9d6: OUTPUT«(1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 7).list␤»
17:49 pmichaud that's the difference.  :-)
17:49 pmichaud the fact that the return from gather is a List means it interpolates.
17:49 TimToady yes, so gather needs to de-listify itself somehow, I suppose
17:49 pmichaud ...but it can't really be a Parcel, unless we start adding laziness to Parcels.
17:50 dukeleto joined #perl6
17:50 TimToady well, we just need a kind of list that doesn't flatten subparcels then
17:50 pmichaud ....no
17:50 pmichaud we need a list that doesn't flatten Iterables
17:50 pmichaud we already have a list that doesn't flatten subparcels
17:51 pmichaud r:  say ((1..5,), (2..7,)).list.perl
17:51 p6eval rakudo 88a9d6: OUTPUT«((1..5,), (2..7,)).list␤»
17:51 pmichaud I have to leave in 2 mins to pick up kid, but will be back in 15
17:51 TimToady so maybe the real problem is better described as Iterables don't properly behave as subparcels?
17:51 pmichaud if we make Iterables behave as subparcels, we lose all sorts of flattening behavior that we currently expect
17:52 pmichaud e.g.,   (1..5, 2..7).list.elems   would end up being 2
17:52 pmichaud as would  (@a, @b).list.elems
17:52 pmichaud afk for 15
17:52 TimToady only if list is the same as parcel-list
17:52 TimToady later
17:55 TimToady or maybe we've confused .list with .flat (yet again)
18:02 mikemol joined #perl6
18:02 TimToady in any case we seem to have de-lazified interpolation too much such that the recipient of the whatever-it-is is not able to make the decision
18:03 thilp joined #perl6
18:03 TimToady if we have to make .elems flattening by default, and add a .args to get the other value, we could do that
18:05 skids joined #perl6
18:08 TimToady or a .rawelems, or whatever
18:11 sisar r: print 1..10;
18:11 p6eval rakudo 88a9d6: OUTPUT«12345678910»
18:11 sisar r: print (1..10).list;
18:11 p6eval rakudo 88a9d6: OUTPUT«12345678910»
18:11 sisar r: print (1..10).WHAT;
18:11 p6eval rakudo 88a9d6: OUTPUT«use of uninitialized variable $v of type Range in string context  in block <anon> at /tmp/kISW4FfZ3Q:1␤␤»
18:12 sisar huh ?
18:12 sisar r: print (1..10).WHAT.gist;
18:12 p6eval rakudo 88a9d6: OUTPUT«Range()»
18:12 sisar r: print (1..10).WHAT.perl;
18:12 p6eval rakudo 88a9d6: OUTPUT«Range»
18:15 pmichaud back again
18:16 Je joined #perl6
18:16 sisar nr: say (1, 2, 3, 4, 5).Range;  #ooc, can the compiler figure out a Rnage which will generate this list? Expected output here would be "1..5" ;-)
18:16 p6eval niecza v19-1-gbd1bd16: OUTPUT«Unhandled exception: Unable to resolve method Range in type Parcel␤  at /tmp/QtmVnXOV6_ line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3917 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3918 (module-CORE @ 562) ␤  at /hom…
18:16 p6eval ..rakudo 88a9d6: OUTPUT«No such method 'Range' for invocant of type 'Parcel'␤  in block <anon> at /tmp/zxXEIY5Hlx:1␤␤»
18:16 pmichaud well, it seems to me that .list has to interpolate, in order for  @(1..5) to do what we want.
18:17 pmichaud as things stand now,  .list interpolates Iterables, while .flat interpolates Iterables and Parcels
18:17 cognominal joined #perl6
18:18 pmichaud what we really might want is something between .list and LoL, or (equally likely) that LoL needs a redefinition
18:18 pmichaud then we'd have
18:19 pmichaud we'd want potentially four levels, then:
18:19 pmichaud .flat -- interpolate Iterables and Parcels
18:19 pmichaud .list -- interpolate Iterables (but not Parcels)
18:19 pmichaud .xyz   -- don't do any interpolation
18:20 pmichaud .uvw  --  itemize everything
18:20 pmichaud .uvw is what we currently do for .lol and LoL
18:20 pmichaud i.e.,   (1..5, 6..10).lol  results in a list where the ranges have been put into scalars
18:20 pmichaud (so they can't be interpolated any further by any subsequent operator)
18:21 pmichaud r: say (1..5,6..10).lol.perl
18:21 p6eval rakudo 88a9d6: OUTPUT«LoL.new(1..5, 6..10)␤»
18:21 pmichaud r: say (1..5,6..10).lol.list.perl
18:21 p6eval rakudo 88a9d6: OUTPUT«LoL.new(1..5, 6..10)␤»
18:21 pmichaud hmmm
18:22 pmichaud r: my @a = 1,2;  say (@a, @a).lol.[0]
18:22 p6eval rakudo 88a9d6: OUTPUT«1 2␤»
18:22 colomon phenny: tell sorear I don't have [&atan2] working, just wanted to thank you for your help (and if you're patient enough, the help that I still require).
18:22 phenny colomon: I'll pass that on when sorear is around.
18:22 pmichaud r: my @a = 1,2;  say (@a, @a).lol.[0].perl
18:23 p6eval rakudo 88a9d6: OUTPUT«[1, 2]␤»
18:23 pmichaud (note non-flattening)
18:23 TimToady what is the use case for interpolating Iterables but not Parcels?
18:24 pmichaud ummmm
18:24 pmichaud "that's what distinguishes .flat from .list"   (yes, I know that's not a good answer here... still thinking)
18:27 pmichaud I'm certain there was a case at one time -- that's how we ended up with .flat and .list.  Let me review the core and see if I can recall which case it's handling.
18:27 * TimToady has to run errands now...
18:27 snearch joined #perl6
18:28 pmichaud the distinction may have had to do with with flattening/non-flattening versions of .map
18:28 pmichaud which .map always flattens now, so might not be relevant anymore
18:29 arlinius joined #perl6
18:30 sorear o/ colomon
18:30 phenny sorear: 18:22Z <colomon> tell sorear I don't have [&atan2] working, just wanted to thank you for your help (and if you're patient enough, the help that I still require).
18:30 colomon \o
18:31 pmichaud I guess I can turn .list into .flat and see what breaks :-)
18:31 thilp joined #perl6
18:32 adu joined #perl6
18:32 colomon sorear: https://gist.github.com/3005906  is what I have at the moment
18:33 pmichaud mainly I think that .list versus .flat is what makes Parcel do what it does -- a Parcel is something where the interpolating decision is postponed.
18:33 colomon when I try it, I get "Cannot use hash access on an object of type Str"
18:33 colomon sorear: that's after infixish returns, as far as I can tell
18:35 sergot joined #perl6
18:38 sorear colomon: which line do you get that error on?
18:39 colomon sorear: I'm getting it from the REPL when I try 3 [&atan2] 4
18:40 sorear colomon: might be more useful to try from -e so that you have a stack trace.  also, NIECZA_FAIL_FAST=1 to get stack traces from sorries
18:41 colomon sorear: https://gist.github.com/3005936
18:42 colomon hmmm...             my $inprec = $inO<prec>;
18:42 colomon looks like it is the problem.
18:44 sorear colomon: $O = $<infix><O> // <O(|%additive)>;  # spot the problem here
18:44 sorear I think // %additive; would work
18:46 colomon hmmm.... we're creating a precedence level for the new operator, I get that.  but I don't particularly get what's wrong with <O(|%additive)> ... but then, I don't understand what it means, either.
18:46 pmichaud r:  say (gather { take 1,2,3; take 4,5,6 }).elems
18:46 p6eval rakudo 88a9d6: OUTPUT«2␤»
18:46 pmichaud r:  say (gather { take 1,2,3; take 4,5,6 }).flat.elems
18:46 p6eval rakudo 88a9d6: OUTPUT«6␤»
18:46 pmichaud that's one difference between .flat and .list
18:47 flussence rn: regex { <[a b c #]> }
18:47 p6eval rakudo 88a9d6:  ( no output )
18:47 p6eval ..niecza v19-1-gbd1bd16: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unrecognized regex metacharacter < (must be quoted to match literally) at /tmp/hE1bMAVFBP line 1:â�¤------> [32mregex { <[33mâ��[31m[a b c #]> }[0mâ�¤â�¤Unhandled exception: Unable to resolve method ast in type Anyâ�¤  at /home/p6e…
18:50 colomon sorear: errr, that worked!
18:50 pmichaud but I guess that difference is exactly the error we've been dealing with.
18:50 colomon Wynne:niecza colomon$ NIECZA_FAIL_FAST=1 mono run/Niecza.exe -e "say 3 [&atan2] 4"
18:50 pmichaud s/error/problem/
18:50 colomon 0.64350110879328437
18:50 sorear colomon: <O(|%additive)> is a string literal.
18:50 sorear colomon: that's what's wrong with it.
18:50 colomon what is %additive?
18:51 sorear %additive is the precedence level of + and -
18:51 sorear the default precedence level for newly defined infixes
18:51 colomon sorear: I understand that, but I don't understand why it's a hash variable
18:52 pmichaud colomon: the hash variable defines precedence, associativity, and other things for operators at that level
18:52 pmichaud constant %additive        = (:dba('additive')        , :prec<t=>, :assoc<left>, :pure);
18:52 pmichaud which says that operators at the %additive level are precedence "t=", left associative, and "pure"
18:52 colomon oh! so it's like a simple old-style p5 class.
18:53 colomon pmichaud++, sorear++
18:54 colomon I'm assuming we don't have any tests for [&func] in roast?
18:54 colomon btw, Wynne:niecza colomon$ NIECZA_FAIL_FAST=1 mono run/Niecza.exe -e "say 3 R[&atan2] 4"
18:54 colomon 0.92729521800161219
18:54 pmichaud probably not; especially if it hasn't been put into the synopses
18:57 sisar joined #perl6
18:58 sisar pmichaud: TimToady++ just specced it ([&func]) today https://github.com/perl6/specs/commit/10d772fdfd
18:59 pmichaud sisar++  # thanks
18:59 * pmichaud takes a walk to think more about .flat and .list
19:02 brrt joined #perl6
19:04 eric left #perl6
19:14 sirrobert joined #perl6
19:16 felher sirrobert++ #nice blogpost and using perl6 :)
19:16 sirrobert =) thanks
19:17 sirrobert What's the bit of code that installs perl6 modules (such as prerequisites that ufo finds)?
19:18 sirrobert Or, rather, I mean:  How can I specify where perl6 modules are installed to?
19:20 pmichaud r: my @a = 1..10;   say ((1,2,3), @a).elems;
19:20 p6eval rakudo 88a9d6: OUTPUT«13␤»
19:20 colomon sorear: ye gads, we're failing spectests left and right today.  (nothing to do with my code, I stashed my changes to check on things.)
19:21 pmichaud r: my @a = 1..10;   say ((1,2,3), @a).list.elems;
19:21 p6eval rakudo 88a9d6: OUTPUT«11␤»
19:22 sorear colomon: when I tested before the release I saw about a dozen failures, all seemingly new test
19:22 mikemol joined #perl6
19:22 brrt good afternoon #perl6
19:23 pmichaud TimToady: I'm still playing with things a bit... but what would be the expected answer of...:   my @a = 1,2,3;  say (gather { take @a; take @a; }).elems
19:23 brrt i was warned that there would be some magic involved in getting nqp and the rest of parrot to interopterate
19:23 benabik joined #perl6
19:24 brrt so i'm here with full curiosity as to what that magic entails
19:24 pmichaud Rakudo doesn't like dealing with bare Parrot PMCs, because they don't fit into Rakudo's type hierarchy or dispatch system.
19:25 brrt thats fair enough
19:25 brrt but i do need to run a script with rakudo as the compiler
19:25 colomon sorear: yeah, I do suspect that's it.  I just hate checking in with a lot of failing spectests
19:25 brrt or nqp, that will be a start
19:27 pmichaud I don't understand "run a script with rakudo as the compiler".
19:27 pmichaud (at least not in this context.)
19:27 brrt yes, that is vague
19:28 brrt long story short, what happens is that i get a request, i determine based on configuration which compiler should compile the file that is requested, i compile the file, and return the results
19:29 brrt rakudo (should be) one of those compilers
19:29 brrt as winxed is now
19:29 brrt and nqp-rx probably works, too
19:29 rodent_ joined #perl6
19:30 pmichaud so, you want Rakudo to be able to work with load_language, yes?
19:30 brrt yes
19:30 brrt and compreg() and the like
19:30 pmichaud I'm pretty sure it already participates with compreg()
19:30 brrt :yes:
19:31 jnthn r: pir::compreg__Ps('perl6').eval('say 42')
19:31 p6eval rakudo 88a9d6: OUTPUT«42␤»
19:31 brrt oh, nice
19:32 pmichaud and "make install" already installs Rakudo into languages/perl6
19:32 pmichaud so you should just be able to do "load_language 'perl6'", and compreg and have everything "work".
19:32 * pmichaud tests
19:32 bluescreen10 joined #perl6
19:32 brrt i'm going to try that out
19:32 brrt however, embarassingly, i do not have p6 installed right now
19:33 colomon n: say [max] Any, Any, 2
19:33 p6eval niecza v19-1-gbd1bd16: OUTPUT«-Inf␤»
19:34 colomon r: say [max] Any, Any, 2
19:34 p6eval rakudo 88a9d6: OUTPUT«2␤»
19:34 colomon rn: say Any cmp 2
19:34 p6eval niecza v19-1-gbd1bd16: OUTPUT«Increase␤»
19:34 p6eval ..rakudo 88a9d6: OUTPUT«use of uninitialized value of type Any in string context  in block <anon> at /tmp/aQDVVXrGdU:1␤␤Increase␤»
19:34 pmichaud colomon: I think the problem is that 'max' in niecza treats a list with an undefined first element as being empty
19:35 pmichaud n:  say [max] 3, Any, 4
19:35 colomon rn: say Any max 2
19:35 p6eval niecza v19-1-gbd1bd16: OUTPUT«4␤»
19:35 p6eval rakudo 88a9d6: OUTPUT«2␤»
19:35 p6eval ..niecza v19-1-gbd1bd16: OUTPUT«-Inf␤»
19:35 pmichaud max in niecza treats a list with an undefined first value as being empty, and thus returns '-Inf'
19:35 pmichaud (without checking any other elements)
19:36 colomon pmichaud++ # think that's it
19:38 * colomon was surprised to learn that infix:<max> takes a list!
19:39 * colomon is scared to check blame and see if he actually wrote it that way...
19:39 pmichaud infix:<max> takes a list -- yes -- it has %tight_or precedence, which has :assoc<list>
19:40 pmichaud constant %tight_or        = (:dba('tight or')        , :prec<k=>, :assoc<list>);
19:40 colomon is Any cmp 2 actually well-defined by the spec?
19:40 * brrt is cooling his computer for the next few minites, bye &
19:40 brrt left #perl6
19:40 [Coke] sirrobert++ sirrobert++
19:40 pmichaud since the two are of differing types, it defaults down to string context (or at least did at the time that Rakudo's implementation of cmp was last worked on :)
19:44 birdwindupbird joined #perl6
19:45 colomon I don't see any hint of that in the Comparison semantics portion of the spec.  But then, I don't see any support for the Niecza implementation, and I did heavy hacking on that one.  Gack, I regret the fact that everything I did all winter is just a blur now....
19:46 dalek roast: 3bddd1b | (Solomon Foster)++ | / (3 files):
19:46 dalek roast: Fudge for niecza.
19:46 dalek roast: review: https://github.com/perl6/roast/commit/3bddd1b79b
19:46 pmichaud brrt / jnthn:  It appears that "load_language 'perl6'" is not sufficient; I suspect that perl6.pir's mainline Sub never gets executed.
19:48 cognominal joined #perl6
19:49 pmichaud it may be possible to fix that more easily now if Parrot has added the new sub tagging features (i.e., better introspection on whatever the Eval PMC has now morphed to :-)
19:49 szabgab joined #perl6
19:49 pmichaud afk for a bit
19:50 szabgab and I just wanted to ask pmichaud about a compilation failure :)
19:50 szabgab after Stage post it is getting    killed  :   make: *** [CORE.setting.pbc] Error 137
19:51 szabgab it is an ubuntu 12.04 32 bit
19:51 szabgab anyone maybe knows what to do?
19:54 sirrobert What does this mean (trying to use panda):  Missing or wrong version of dependency 'src/gen/Metamodel.pm'
19:55 sirrobert besides the obvious ;)  Any ideas how to fix it?
19:55 szabgab sirrobert: I think I installed panda again
19:55 sirrobert I tried that, but got the same error ;)
19:57 sirrobert ahh, because the script uses "panda install panda"
19:57 sirrobert heh
20:00 fridim_ joined #perl6
20:03 szabgab hmm, it seem I ran out of memory and swap space
20:04 brrt joined #perl6
20:05 sirrobert szabgab:  I hit that before...  needed to use more than the RAM I had available on my server
20:05 sirrobert (VPS with 1GB RAM running Ubuntu server)
20:05 szabgab sirrobert: and di you have any solution?
20:05 szabgab was 1Gb enough?
20:05 sirrobert nope
20:05 szabgab oh
20:05 sirrobert temporary solution: develop locally =)
20:06 szabgab yes, I can build Rakudo at home and upload to the server
20:06 sirrobert Since I have a VPS I might take a disk image, boot it up on my computer to compile, then pass it back
20:08 colomon pugs: say 2 max Any
20:08 p6eval pugs: OUTPUT«*** ␤    Unexpected "max"␤    expecting operator, ":" or ","␤    at /tmp/ZfygxIXHhk line 1, column 7␤»
20:12 szabgab I'll try to build at home
20:14 brrt joined #perl6
20:16 dalek roast: 677362a | (Solomon Foster)++ | S03-operators/minmax.t:
20:16 dalek roast: Fudge for niecza, add note doubting the correctness of the tests.
20:16 dalek roast: review: https://github.com/perl6/roast/commit/677362a71d
20:17 dalek roast: 518ae1d | (Solomon Foster)++ | S06-signature/slurpy-and-interpolation.t:
20:17 dalek roast: Fudge for niecza.
20:17 dalek roast: review: https://github.com/perl6/roast/commit/518ae1d85c
20:17 dalek niecza: b5cc8a1 | (Solomon Foster)++ | t/spectest.data:
20:17 dalek niecza: Turn off dir.t test.
20:17 dalek niecza: review: https://github.com/sorear/niecza/commit/b5cc8a13e3
20:18 pmichaud colomon: I can't find it in the docs, but I'm pretty sure that min and max are to ignore undefined values in their computation
20:19 pmichaud thus  my $x;  my $y;   $x min $y min 2   returns 2
20:20 pmichaud which is entirely unrelated to the result of Any cmp 2
20:20 colomon pmichaud: that certainly sounds reasonable-ish.
20:21 pmichaud similarly:
20:21 pmichaud r: my @a;  @a[2] = 20;  say [max] @a
20:21 p6eval rakudo 88a9d6: OUTPUT«20␤»
20:21 tadzik good evening
20:21 pmichaud r: my @a;  @a[2] = 20;  say [mi] @a
20:21 p6eval rakudo 88a9d6: OUTPUT«===SORRY!===␤Confused␤at /tmp/p0UOjBvlq0:1␤»
20:21 pmichaud r: my @a;  @a[2] = 20;  say [min] @a
20:21 p6eval rakudo 88a9d6: OUTPUT«20␤»
20:22 brrt1 joined #perl6
20:23 colomon pmichaud: though I don't see it anywhere in the spec either, and it seems like it interacts a bit strangely with the min and max methods.
20:23 pmichaud colomon: ?
20:23 pmichaud how so
20:24 pmichaud ?
20:24 colomon (to be more precise... if there is a user defined ordering, do we do still skip undefineds?)
20:24 pmichaud rakudo does that, yes.
20:27 bluescreen10 joined #perl6
20:28 larks joined #perl6
20:29 pmichaud although it wouldn't bother me if   Any cmp 2  returned "Mu" or some other value to indicate "I don't know the ordering"
20:30 pmichaud then min/max could simply skip elements where the comparison came back as "Mu"
20:31 pmichaud that would enable someone to write a custom comparator that handled undefined elements
20:31 diakopter 15:21 < pmichaud> r: my @a;  @a[2] = 20;  say [mi] @a
20:31 sirrobert Has anyone else encountered the panda problem ("missing or wrong version of Metamodel.pm") and know how to fix it?
20:32 pmichaud sirrobert: whenever I've gotten that error message, it's either because I didn't install perl6 or because my PERL6LIB environment variable isn't set.
20:32 sirrobert I just reinstalled perl6, so it's not that...
20:32 tadzik sirrobert: yes
20:32 jnthn Generally it means there's a pre-compiled module hanging around compiled for a previous Rakudo build.
20:32 PerlJam sirrobert: and I've gotten it when the perl6 I'm running isn't the one I thought it was.
20:32 sirrobert looks like it might be $PERL6LIB
20:32 tadzik sirrobert: if you've reinstalled perl6, you need to reinstall panda as well
20:33 adam7504 joined #perl6
20:33 * sirrobert is in another terminal a min...
20:36 pmichaud also, it would be really helpful if that error message could be split up to tell us which case has occurred; i.e.  "missing Metamodel.pm" versus "wrong version of Metamodel.pm"
20:36 pmichaud and if it got the wrong version, it would be helpful to let us know which version it got and which one it was looking for :)
20:37 tadzik I don't think anything is missing, it's just precompiled against another version of Metamodel.pir
20:38 PerlJam Seems like that could easily become a FAQ in the future.
20:38 tadzik it's been a FAQ in the past too :)
20:38 pmichaud which is why I'm saying the error message can help to avoid the FAQ :)
20:38 tadzik and in the present
20:38 jnthn Which is why I keep saying that Rakudo should manage the pre-compilation cache.
20:38 tadzik +1
20:38 sirrobert $PERL6LIB was unset.  I set it to ~/.perl6/lib and got a different error for panda:
20:39 sirrobert Missing or wrong version of dependency 'src/stage2/QRegex.nqp'
20:39 tadzik fun
20:39 moritz sirrobert: that always means that you're loading a .pir file that was compiled with an older rakudo
20:39 tadzik anyway, I'm quite convinced the reason is the same
20:39 sirrobert Ok... so a resolution would be
20:39 jnthn tadzik: Does panda have a rebuild-all-the-things option yet?
20:39 tadzik jnthn: nope
20:40 sirrobert remove ~/.perl6 and re-install everything?
20:40 moritz sirrobert: try RAKUDO_MODULE_DEBUG=1 perl6 yourscript.pl
20:40 tadzik the bootstraping problems :)
20:40 moritz sirrobert: yes
20:40 sirrobert ok =)
20:40 tadzik maybe one could implement that in BEGIN, hmm
20:40 tadzik before module loading
20:40 * jnthn figures that we should have all the needed people on hand at YAPC::EU to try and hammer out a good solution for all of this.
20:41 PerlJam sirrobert: Just remove all of the .pir files (they'll be made anew from the .pm files)
20:41 tadzik I see a way, and it's going to be SOO dirty hack :)
20:41 tadzik PerlJam: they won't, no :(
20:41 tadzik but things will work
20:41 sirrobert What's .pir, btw?
20:41 PerlJam tadzik: oh, they're only made on install?
20:41 tadzik on build, to be exact
20:42 pmichaud I'm still quite uncomfortable with the "rakudo manages the cache" approach; it gives me that tension in my shoulders that says "wrong wrong wrong".
20:42 PerlJam sirrobert: Parrot Intermediate Representation or somesuch.  It's the language of the underlying Parrot VM.
20:42 pmichaud certainly I have trouble with "the" cache :)
20:42 sirrobert ah, got it
20:42 jnthn pmichaud: Caches :P
20:42 jnthn pmichaud: I don't love it either, fwiw.
20:42 pmichaud but yes, I think yapc::eu is a good place to explore it.
20:42 diakopter BOOTArray->st is null
20:42 diakopter ww
20:43 pmichaud tadzik: are you perchance going to make it to yapc::eu ?
20:43 * pmichaud hopes "yes"
20:43 tadzik pmichaud: absolutely
20:43 pmichaud \o/
20:43 jnthn \o/
20:43 tadzik \o/
20:43 pmichaud would you be able to attend a workshop/summit a couple of days before yapc::eu ?
20:43 tadzik (and I hope I can make it out without giving a talk, so I would be able to slack off all the time :P)
20:44 pmichaud ...no talk?!?  are you kidding me?!  :-)
20:44 tadzik pmichaud: possibly. Anything in particular that you have in mind?
20:44 * tadzik checks the dates
20:44 tadzik well, maybe something :)
20:44 tadzik talks still make me a lot nervous
20:45 pmichaud tadzik: that's why you should do more, then.  :)
20:45 tadzik and to get rid of... exactly :)
20:45 sorear it is at this point looking highly likely I will be at yapc::eu
20:46 sorear i'd love to talk about the kinds of talks people want to hear from me
20:46 sorear i think there is overlap here with the concept of 'what would I use a blog for'
20:46 bluescreen10 joined #perl6
20:48 PerlJam sorear: you need to figure out how to recruit more devs  :)
20:48 pmichaud sorear: tbh, any talk you give will likely be well received.  (more)
20:48 PerlJam sorear: so ... whatever talk makes people go "I want to do that!"  :)
20:48 moritz sorear: make a talk "how to make Perl 6 fast"
20:48 pmichaud Lots of people know about Rakudo, I suspect many are unaware of Niecza or what it is/can do
20:48 PerlJam moritz++
20:49 pmichaud so if nothing else, a talk about niecza, how it works, how it compares to rakudo, etc would likely be very well received
20:49 moritz sorear: and talk about your experiences about what worked well for niecza (speed-wise), and what not
20:49 pmichaud if you don't want to talk about niecza itself (or solely about that) -- well... any topic dealing with Perl 6 is likely of interest to all o fus :)
20:49 pmichaud *of us
20:50 pmichaud for that matter -- anyone have a specific talk they'd like to see me give?
20:50 pmichaud I can certainly do part 2 of my lists/iterators talk (that I didn't give last year at yapc::eu, and that I gave at yapc::na this year).
20:50 PerlJam pmichaud: how to make Perl 6 fast  :-)
20:50 pmichaud PerlJam: that's jnthn++'s talk :)
20:51 sorear mmh.  Later when I have more time I'd like to elaborate on this.  maybe start coming up with notes that we can refine
20:51 sorear i have never given a tech talk.
20:51 PerlJam Will YAPC::EU be videoed as well as YAPC::NA?
20:51 PerlJam (or at all?)
20:52 pmichaud sorear: I'll be happy to help any way that I can.  I might also be able to forward you a copy of Damian Conway's "Presentation Aikido" notes that describe ways to give good talks :)
20:52 brrt1 hi all, whom can i pester about nqp & load_language in relation to winxed
20:52 brrt1 and a segfault to boot :-)
20:52 pmichaud PerlJam: although, I suppose I could give a lightning talk on "how to make Perl 6 fast", which basically consists of a slide saying "recruit jnthn++ and stay out of his way"  :-)
20:53 jnthn ;)
20:53 pmichaud oh, and "make sure he's supplied with beer"
20:53 jnthn YAPC is in Germany this year.
20:53 jnthn Beer.
20:53 tadzik :P
20:53 jnthn :)
20:53 jnthn Not that the place in Riga that served 30 different types of beer on tap will be easy to beat :P
20:53 PerlJam "How to turn beer into Perl 6"
20:54 pmichaud PerlJam: lol
20:54 * brrt1 would like to go to YAPC::EU
20:54 jnthn I suspect my main problem in the coming months will actually be to make sure I do enough $dayjob than it will be to make sure I do enough Perl 6. :)
20:54 sorear jnthn: I will need mentoring on that too, I am also a complete beer novice :p
20:55 jnthn Oh!
20:55 jnthn Well, Germany is a good first place :)
20:55 brrt1 land of the reinheitsgebot ;-)
20:57 pmichaud sorear: if you apply for a talk at yapc::eu (+1) you could also request that it be on the 2nd or 3rd day.  That would give you time to see what other presenters do and what it looks like.
20:57 * jnthn needs to get around to submitting.
20:58 jnthn I'm planning a talk on roles.
20:58 pmichaud although you've likely already seen some of the videos from yapc::na.  Generally, talks are low-key, not terribly formal (but you still want to have good preparation), and if you're interested in your topic then the audience almost certainly will be as well.
20:58 pmichaud roles +1.  Very timely for yapc::eu, for a number of reasons.
20:58 jnthn And maybe a Rakudo "Achievements and Plans" talk
20:58 tadzik Plans Unlocked!
20:58 jnthn :D
20:59 Je joined #perl6
20:59 jnthn I may start out by going back to my "plans" slides at the end of my Rakudo talk last YAPC::EU and pointing out how we did All The Things, pretty much. :)
20:59 sorear watching the videos from yapc::na is on my agenda :D
21:00 pmichaud jnthn: you could do that as a lightning talk, perhaps.  Although "All the Things" is hard to fit in five minutes.
21:00 sorear whatever I decide to do, I'm probably going to use sandiego.pm as a guinea pig
21:00 jnthn pmichaud: Well, one doesn't preclude the other. :)
21:00 pmichaud Although I did cover "Most of the Things" in my lightning talk at yapc::na.  Only took me about 3 seconds.  :-)
21:01 PerlJam Someone could do a "state of IO" talk.
21:01 pmichaud PerlJam: only if we get a "state of Europa" to go with it :-P
21:01 PerlJam :-P
21:01 jnthn lol
21:01 tadzik I don't get it
21:01 PerlJam tadzik: moons of jupiter
21:01 pmichaud tadzik: moons of Jupiter
21:01 jnthn PerlJam: That's just trolling somebody into doing conference driven development on IO :P
21:01 tadzik oh :)
21:02 pmichaud plus, the state of Europ(e|a)  is a little unsettled at the moment.
21:02 pmichaud s/unsettled/interesting/
21:02 jnthn Last I noticed, so was the state of IO :P
21:03 pmichaud _exactly_
21:03 PerlJam jnthn: Do the fish bite even if you tell them it's bait?
21:03 jnthn PerlJam: Only if it's really tasty bait.
21:03 jnthn The state of &dir made me grrrr at $dayjob today.
21:04 jnthn Curiously, that's the first thing I ran into as problematic while actually using Rakudo to Get Stuff Done.
21:04 tadzik heh, a lightning talk: "&dir makes me $grrr"
21:05 PerlJam sounds Dr. Seussian
21:06 pmichaud "I do not like Perl and CPAN, I do not like them, Tim I am."
21:06 pmichaud (Mark Keating)++
21:07 PerlJam mdk++ indeed.   Of all the YAPC talks I've seen so far, that one is my favorite.
21:07 pmichaud (http://www.youtube.com/watch?v=NUAOns_WAXA in case you haven't seen it yet)
21:07 * pmichaud sadfaces at the pause in video uploads to youtube.com/yapcna
21:08 sirrobert removed everything and re-installed rakudo, panda, etc. from scratch.  Now Panda is working again =)
21:08 sirrobert gotta go to a meeting.  thanks all =)
21:09 jnthn pmichaud: A PAUSE is pretty common in uploading related things in the Perl world...
21:09 pmichaud *ouch*
21:11 pmichaud nterpolation of Parcel differently from Iterable.  I think I would be happy to s
21:11 pmichaud erggg
21:11 pmichaud ee those unify.  We still need to flesh out .list versus .flat a bit (working on that)
21:12 pmichaud phenny tell TimToady I can't recall or find the use cases that led me to treat interpolation of Parcel differently from Iterable.  I think I would be happy to see those unify.  We still need to flesh out .list versus .flat a bit (working on that)
21:12 pmichaud phenny: tell TimToady I can't recall or find the use cases that led me to treat interpolation of Parcel differently from Iterable.  I think I would be happy to see those unify.  We still need to flesh out .list versus .flat a bit (working on that)
21:12 phenny pmichaud: I'll pass that on when TimToady is around.
21:12 pmichaud obviously I need help with the irc interface today :-/
21:12 pmichaud "How does one spell 'IRC', anyway?"
21:13 * pmichaud goes back to scribbling ideas for List and Parcel
21:13 atrodo pmichaud: I was curious, at YAPC::NA, I heard you talk about getting rakudo to run on other vm's and not just parrot. I wondered, if m0/lorito was implemented and ran on jvm/clr/etc, would that be a desirable? Would you still want rakudo to be able to target them directly?
21:14 pmichaud I think being able to run in more environments is always a plus  (more)
21:14 brrt joined #perl6
21:15 sorear pmichaud: why did uploads pause?
21:15 pmichaud Whether Rakudo would still target other machines directly would depend almost entirely on the cost/benefit of doing so.  If there's little additional benefit to be gained, we probably wouldn't do it.
21:15 pmichaud sorear: I don't know.  I just know that it's been a day or two since any new yapc::na videos have been uploaded.
21:16 sorear have you asked anyone?
21:16 pmichaud sorear: no; I know that it can take some time.  The blog post on the yapcna blog says they expect to have them all "by the end of the week", though.
21:17 sorear pmichaud: ah, ok.
21:18 masak good night, brave and glorious #perl6
21:18 pmichaud masak: what about the rest of us?  ;-)
21:18 PerlJam Why can't they dub mithaldu's videos official?
21:19 pmichaud PerlJam: well, I'm kind of hoping they don't do that, if only because the video of my talk has blackouts in it and I'm hoping the copy they have doesn't have the blackouts.
21:19 masak pmichaud: there's no escaping bravery and glory :)
21:19 tadzik they have blanks :(
21:19 masak 'n
21:19 tadzik 'n
21:19 PerlJam pmichaud: make his official but only as a first approximation then?
21:19 jnthn atrodo: Given project velocities at the moment, my guess would be that Rakudo will get to targeting other things before m0/lorito is ready to support that use case. I could be wrong.
21:20 atrodo pmichaud: So, in theory, using m0 as a compatibility shim on top of other environments would be a good thing?
21:20 atrodo jnthn: I'm talking in much more curiosity terms than reality. I would tend to agree.
21:20 pmichaud atrodo: s/would/could/.  There's sometimes a long distance between theory and reality.  :)
21:20 tadzik hmm, szabgab's mail seem to indicate that HTML::Template is alive and well
21:20 PerlJam jnthn: I don't know ... whenever I do pay attention to #parrot, there seems to be lots happening on the m0 and m1 fronts
21:20 sorear pmichaud: Why are there blackouts?
21:21 pmichaud sorear: I don't know.  Something happened either in the recording or transmission of the video
21:21 tadzik they seem to be deliberate
21:21 atrodo pmichaud: Gotcha.  That makes sense. Thatnks
21:21 pmichaud I'm hoping it was in transmission (in which case there's a chance they're not blacked out in the archival copies)
21:22 pmichaud it's also possible there was a signal mismatch between my system and whatever was handling the video feed
21:22 pmichaud it might not have liked the smaller black text on all-white screen
21:22 tadzik that rings a bell
21:23 pmichaud but... I didn't find out about the blackouts until I saw the mithaldu videos myself.
21:23 pmichaud (i.e., well after the conference)
21:23 sorear pmichaud: ah.  in San Diego English blackout usually refers to a deliberate contract thing "we aren't authorized to share the video from 4:30 to 5:10, so we didn't"
21:24 pmichaud oh, I mean blackout in the sense of "power dropped for some technical reason beyond our control" :-)
21:24 pmichaud what would be the San Diego English for the type of blackout where signal is lost unexpectedly?  ;-)
21:24 ggoebel sorear: good advice on presentations, even when it isn't a keynote: http://thenextweb.com/lifehacks/2012​/05/13/how-to-give-a-great-keynote/
21:25 tadzik did we get to know what happened to mpo?
21:26 pmichaud oops, have to run home quickly -- bbiaw
21:26 tadzik (modules.perl6.org)
21:26 * PerlJam doesn't remember any blackouts while watching pmichaud's lists talk on the live streaming.
21:27 PerlJam (I don't know how they captured the video, but if it was the same source as the streaming, this might bode well for complete videos)
21:28 PerlJam tadzik: isn't it still broken?
21:28 tadzik PerlJam: it is
21:29 PerlJam I would think that if somoene figured out what happened, they'd fix it :)
21:29 tadzik luck and tuits given, we may be able to build something awesome with sergot which might be able to steal some of its glory :)
21:30 sergot \o/
21:35 stephenlb joined #perl6
21:45 pmichaud PerlJam: yeah, that's why I'm hoping it was some sort of transmission issue and not a recording one.
21:46 pmichaud I know that my wife said she kept getting blackouts during the live stream of my talk
21:52 jnthn Time for some rest...train leaves kinda early tomorrow
21:52 jnthn (Heading to FPW)
21:53 tadzik heh, I still have an exam before the flight tomorrow
21:53 PerlJam pmichaud: I was doing work while watching, so I may have just missed the blackout times.
21:53 jnthn tadzik: Good luck!
21:53 tadzik thanks :)
21:53 jnthn tadzik: What time do you arrive?
21:54 tadzik jnthn: 23-ish
21:54 jnthn tadzik: Ah, ok
21:54 jnthn tadzik: I guess I see you on the Friday then
21:54 tadzik when do you arrive?
21:54 jnthn (There's a pre-workshop beer)
21:54 jnthn 20:15
21:54 tadzik hmm, huh
21:54 tadzik workshop is saturday?
21:54 jnthn Friday and Saturday
21:55 tadzik and beer both friday and pre-workshop?
21:55 jnthn I guess there's beer every night
21:55 jnthn I was asking when you arrived in case you would be at the pre-workshop beer meetup
21:55 tadzik that doesn't surprise me
21:55 tadzik oh
21:56 tadzik I see, ok
21:56 jnthn But given your arrival time I guess, "no"
21:56 tadzik well, if you overstay at the bar... :)
21:56 jnthn masak and I should make it...by some stroke of luck our hotel is exactly half way between the train station and the meet.
21:56 jnthn Me? Overstay at a bar? ;-)
21:56 tadzik and I'll manage to semi-prepare my talk by then... ;)
21:56 jnthn ;-)
21:57 jnthn I'm cheating and giving the same one I did at GPW :)
21:57 jnthn Apart from thanks to recent improvements I could make the code cuter. :)
21:57 tadzik okay, guess it's time for me to get some sleeps
21:59 jnthn Yup, me too
21:59 jnthn 'night all o/
21:59 tadzik \oo
22:03 adam7504 joined #perl6
22:07 moukeddar joined #perl6
22:07 moukeddar left #perl6
22:13 sergot good night !
22:34 dorlamm joined #perl6
22:55 cognominal joined #perl6
23:07 TimToady pmichaud: I think I'm okay with .elems saying 6 there as long as we have something like .objects that says 2
23:07 phenny TimToady: 21:12Z <pmichaud> tell TimToady I can't recall or find the use cases that led me to treat interpolation of Parcel differently from Iterable.  I think I would be happy to see those unify.  We still need to flesh out .list versus .flat a bit (working on that)
23:08 TimToady that is, .elems migh thave an implicit .flat like .map and friends
23:10 flussence r: say [+] 1..500000
23:11 p6eval rakudo 88a9d6: OUTPUT«(timeout)»
23:11 flussence r: say [+] 500000..1
23:11 p6eval rakudo 88a9d6: OUTPUT«0␤»
23:22 flussence r: https://gist.github.com/3007551
23:22 p6eval rakudo 88a9d6: OUTPUT«125000250000␤»

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

Perl 6 | Reference Documentation | Rakudo