Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-07-25

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:41 tokuhiro_ joined #perl6
00:53 Coleoid joined #perl6
00:53 scott__ joined #perl6
01:20 colomon joined #perl6
01:20 colomon o/ from northern ontario!
01:21 colomon rn: "hello".tclc
01:21 p6eval niecza v19-13-g442e075: OUTPUT«Unhandled exception: Unable to resolve method tclc in type Str␤  at /tmp/yneFmwJKmG line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3918 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3919 (module-CORE @ 562) ␤  at /home/p…
01:21 p6eval ..rakudo 4fe23e:  ( no output )
01:21 colomon rn: say "hello".tclc
01:21 p6eval niecza v19-13-g442e075: OUTPUT«Unhandled exception: Unable to resolve method tclc in type Str␤  at /tmp/JlgTEDPPry line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3918 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3919 (module-CORE @ 562) ␤  at /home/p…
01:21 p6eval ..rakudo 4fe23e: OUTPUT«Hello␤»
01:22 colomon phenny: tell sorear I'll tackle tc.* tonight.  Already seem to have basic code point to title case working. Probably will be able to check in for a few days, though.
01:22 phenny colomon: I'll pass that on when sorear is around.
01:44 drbean joined #perl6
02:02 crab2313 joined #perl6
02:07 tokuhiro_ joined #perl6
02:08 orafu joined #perl6
02:36 Psyche^ joined #perl6
02:37 quietfanatic joined #perl6
03:06 awwaiid joined #perl6
03:24 cognominal joined #perl6
04:10 crab2313 p: say q
04:10 p6eval pugs: OUTPUT«*** No such subroutine: "&q"␤    at /tmp/mBi09tIjjE line 1, column 5 - line 2, column 1␤»
04:10 crab2313 r: say q
04:10 p6eval rakudo 4fe23e: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&q' called (line 1)␤»
04:10 sorear n: say q
04:10 phenny sorear: 01:22Z <colomon> tell sorear I'll tackle tc.* tonight.  Already seem to have basic code point to title case working. Probably will be able to check in for a few days, though.
04:10 p6eval niecza v19-13-g442e075: OUTPUT«[31m===[0mSORRY![31m===[0m��No delimiter found at /tmp/ysCfo6qyXw line 1 (EOF):�------> [32msay q[33m�[31m<EOL>[0m��Parse failed��»
04:12 crab2313 toqast: q
04:12 p6eval toqast : OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&q' called (line 1)␤»
04:12 sorear crab2313: new here?
04:13 crab2313 sorear: yes, only servaral months
04:14 sorear heh.
04:14 sorear I guess you're newer than me :p
04:14 sorear I've just somehow failed to notice you before today
04:14 crab2313 sorear: sure
04:50 crab2313 sorear: sure. When the first time I join this channel, you have asked me the same question :)
04:50 sorear oops
04:58 TimToady pmichaud: the answer to http://irclog.perlgeek.de/perl6/2012-07-08#i_5797225 is pretty obvious if we're to move in the direction of the OKness proposal.  Such a match should return something that can be recognizably a final answer to a smartmatch, so that it doesn't try to rematch against the data
04:59 TimToady so I'd say Match of Match, unless we have some way of making a list OK
05:00 TimToady and I'm still thinking a failed match is just Nil, assumig Nil and Match are special to smartmatch in the way that True/False currently are
05:00 moritz \o
05:01 TimToady o/
05:03 TimToady and Failure
05:04 TimToady whether or not we go as far as to unify Nil and Failure as the OKness proposal proposes
05:10 moritz jnthn: fwiw the socket tests still fail in the toqast branch ("Unaligned end in utf8 string")
05:25 kaleem joined #perl6
05:34 birdwindupbird joined #perl6
05:49 odoacre joined #perl6
05:55 tadzik can has test results!
05:55 tadzik 56 modules ok, 50 not ok (106 total)
05:55 tadzik NativeCall still fails
05:56 tadzik MIME::Base64 blocks LWP::Simple
05:57 moritz does MIME::Base64 use NativeCall?
05:57 moritz or is that a separate failure?
05:58 tadzik separate, I think
05:58 tadzik Failed building lib/MIME/Base64.pm6
05:58 tadzik it's using Parroty stuff under the hood, iirc
06:02 moritz ah
06:02 moritz toqast is more picky about pir signatures
06:04 moritz a four-character patch fixes it
06:07 moritz https://github.com/snarkyboojum/Perl6-MIME-Base64/pull/1
06:13 SamuraiJack joined #perl6
06:18 quietfanatic Personally I'd rather have a failed Match act like Nil then have matching return Nil on failure.
06:18 quietfanatic especially if the failed Match object can convey information about why and where the match failed.
06:23 crab2313 joined #perl6
06:40 crab2313 joined #perl6
06:44 sergot joined #perl6
06:44 sergot hi o/
06:45 TimToady you shouldn't call it a Match if it didn't.  Carrying failure information is the province of the Failure type, where Nil is just the least informative form of failure (and won't throw in sink context)
06:51 quietfanatic In that case, I hope it'll at least return a specialized Failure subtype.  Returning Nil throws away information in a Premature Optimization.
06:52 diakopter std: $!
06:52 p6eval std d5bea92: OUTPUT«ok 00:00 40m␤»
06:53 TimToady well, I think the default should be not caring why it failed, since there may well not be a single reason, and most of the time the info would be thrown away anyway
06:54 TimToady might be reasonable to have an option for some kind of cockpit recorder though
06:54 diakopter highwater mark would be helpful
06:54 quietfanatic Hm.
06:54 quietfanatic It could be lazily-generated information.
06:54 diakopter first rule that hit the high water mark
06:54 quietfanatic well
06:54 TimToady and in most compilers, you're figuring out the reason explicitly anyway
06:54 quietfanatic that might be asking to much from the regex engine
06:55 TimToady STD actually uses a high-water mark to decide where to put the ⏏
06:56 quietfanatic Failures are false, right?
06:56 TimToady yes, and undefined
06:56 quietfanatic just making sure :)
06:56 TimToady otherwise the // die idiom wouldn't work
06:56 diakopter the 5-dimensional type system...
06:57 quietfanatic Falsehood would be for the archaic || die idion.
06:57 quietfanatic '//' works on undefinedness
06:57 quietfanatic (Meant to say those in the other order, but I forgot / is a metachar)
06:57 quietfanatic also, *idiom
06:58 diakopter idion. singular of idia.
06:58 * quietfanatic has been emitting too many idia recently
06:58 TimToady Failure is really an undefined wrapper for a defined Exception
06:59 TimToady kind of a ticking time bomb
06:59 TimToady or more like an impact fuse
06:59 quietfanatic Interesting.
06:59 quietfanatic I was working on the model that faliures and exceptions were the same objects, just with the former at rest and the latter in motion.
07:00 moritz in rakudo currently a Failure is a container for an Exception
07:00 moritz one that makes it blow up when used in most contextes
07:01 TimToady quick, call the // squad
07:01 quietfanatic I guess it kinda makes sense to abstract the fuse out of the payload
07:01 quietfanatic Just one more layer of indirection though
07:02 diakopter I'll see your Failure and raise you an Exception
07:02 TimToady the idea is to optimize the common path so that you only ever have to check for definedness of the result most of the time
07:03 diakopter Fold.
07:03 brrt joined #perl6
07:04 TimToady always assuming you want your Failures reported in-band; if not, there's 'use fatal';
07:04 quietfanatic I like the unthrown exceptions idea
07:04 quietfanatic I'm just not convinced the extra layer of indirection is worth the extra layer of indirection.
07:05 TimToady I like not introducing weird control flow eagerly
07:05 quietfanatic No, I mean
07:06 quietfanatic The Failure is thrown if you try to send it to a place that can't handle it or if you use it in void context.
07:06 quietfanatic It seems to me that the only reason to have it contain a seperate Exception object
07:06 quietfanatic is so that you don't have to handle it as carefully inside an exception handler.
07:07 quietfanatic and that part is what I'm not sure is worth the extra layer.
07:07 TimToady well, that seems important to me too; once you've thrown an exception, it's trying to succeed, not fail
07:08 TimToady succeed in being thrown/caught
07:08 imarcusthis joined #perl6
07:09 quietfanatic When even return is an exception, I can see how that would be.
07:09 TimToady well, control exceptions are special, insofar as they must be optimized much more than errors, which are supposed to be rare
07:10 quietfanatic The word 'exception' itself indicates it should be rare.
07:10 TimToady yes, 'control exceptions' is perhaps a bit of a hijacking of the term
07:11 TimToady but they are at least exceptional enough that they aren't as common as normal control flow
07:11 diakopter popcorn from the peanut gallery: can an error exception be lost in a Failure that never gets used? How many unthrown exceptions can build up?
07:11 quietfanatic They're all just various forms of goto :)
07:11 quietfanatic but are they supposed to create an Exception object?
07:11 TimToady well, depending on whether you're goto is smart enough to unwind the stack
07:11 moritz but not all forms of goto are created equal
07:12 quietfanatic Can you store a 'return' in a Failure?
07:12 TimToady control exceptions would hopefully be fairly static
07:13 quietfanatic I propose that they ought to be treated differently more than the same, for partly this reason
07:13 diakopter can an error exception be lost in a Failure that never gets used? How many unthrown exceptions can build up?
07:13 quietfanatic and partly for the naming reason.
07:13 TimToady control exceptions are a seperate mechanism, really
07:13 moritz diakopter: and how many angels fit on a needle?
07:13 cognominal joined #perl6
07:13 TimToady *separate, gah
07:14 diakopter moritz: I wasn't trying to make a point. :|  I was literally asking a question.
07:14 quietfanatic Different things should be different.
07:14 moritz diakopter: you can stuff away arbitrarily many unthrown exceptions in an array, and never process it. If that's what you want to do.
07:14 quietfanatic I probably should have spoken up much earlier, when I first heard that control flow and exceptions were going to be the same
07:14 quietfanatic but for some reason I was much younger then. :)
07:15 TimToady they aren't the same
07:15 moritz it's just intercepting them that is unified
07:15 TimToady except insofar as they both look up the stack for something that tells them how far to unwind the stack
07:15 quietfanatic They actually aren't?  I had heard it from yourself that they were several years back
07:15 quietfanatic hm
07:15 TimToady moritz: not even that
07:15 TimToady CATCH vs CONTROL
07:16 moritz TimToady: "unified" in the sense that you use isomorphic constructs, not that use you use the same constructs
07:16 quietfanatic I hope returning doesn't have to peruse the stack usually
07:16 TimToady control exceptions will tend to be a small set, and a "handler" may well be optimized to a bit in the call fram
07:16 TimToady frame
07:16 cj joined #perl6
07:17 TimToady well, whether it has to peruse the stack or not depends on how you handle continuations
07:18 TimToady but continuations aren't exactly 0 overhead either
07:18 diakopter does a Failure-wrapped error exception need to hold a reference to its whole static frame chain so it can access closed-over variables and its whole dynamic frame chain so it can display a stack trace?
07:19 quietfanatic In ASM, a continuation is automatically pushed to the stack on a subrouting call.
07:19 TimToady also, normal exceptions are completely dynamically scoped, while control exceptions are often lexotic
07:19 quietfanatic Assuming Perl 6 ever reaches the ASM level.
07:19 quietfanatic hm
07:21 quietfanatic diakopter: Regarding ignoring exceptions, the only case I can see where ignoring an exception would be a problem is if you store the result of closing a filehandle in a variable and never use the variable.
07:21 quietfanatic Well, this is far too much for me to be able to understand at once.
07:21 diakopter ah, I was just about to ask whether you know the answer to my next quesiton
07:21 quietfanatic I'll stop being a problem child for a little while :)
07:22 quietfanatic diakopter: regarding failure-wrapped exceptions:  For the static part, depends on how smart your closure generator is.  For the dynamic part...I don't know.  Probably.
07:22 TimToady diakopter: is not much different than the overhead of keeping a closure aroud
07:22 TimToady *around
07:23 diakopter (I'm asking because I've been thinking about the implementation of a debugger)
07:23 TimToady I'm not sure we need to keep a backtrack with the failure, as long as there's some indication where the original error was
07:24 TimToady might be a pragma to keep it
07:24 quietfanatic I think that's a point where efficiency concerns dictate a pragma
07:24 quietfanatic ...I was just about to say until TimToady++ said it first
07:24 TimToady but a backtrace of where it was actually thrown will probably indicate where it came from most of the time
07:24 moritz well, we need two backtraces
07:25 moritz one for the original location
07:25 moritz and one for the point where it was thrown from
07:25 quietfanatic ...and why don't we provide a log of the entire program up to the point of failure while we're at it. :)
07:25 diakopter hopefully they share at least a few frames
07:27 moritz a backtrace isn't so much information
07:27 diakopter I think an exception should be able to be inspected in a debugger without throwing it
07:27 moritz it doesn't need to keep lexicals around
07:28 moritz diakopter: sure
07:29 quietfanatic Well, I had probably better go comatose for a few hours.  That'll make me a little less of a snipe.
07:30 TimToady I don't think any amount of rest will make me less of a snipe.  :)
07:31 diakopter I was taken on a snipe hunt once. we didn't find anything.
07:33 quietfanatic Good night, whoever happens to share my timezone.
07:33 quietfanatic and several to the west :)
07:33 TimToady o/  # oh wait
07:33 TimToady zzzx &
07:34 TimToady ^ snored myself awake there
07:46 kresike joined #perl6
07:46 kresike good morning all you happy perl6 people
07:49 xinming joined #perl6
07:55 kaare_ joined #perl6
08:25 grondilu joined #perl6
08:30 am0c joined #perl6
08:33 cognominal joined #perl6
08:34 rurban joined #perl6
08:35 dakkar joined #perl6
08:45 jnthn hello, #perl6
08:45 tadzik hello jnthn
08:46 tadzik jnthn: 56 modules passing, 50 failing now; NativeCall still broken
08:46 jnthn tadzik: I saw... And moritz++ already sent a patch for MIME::Base64
08:46 tadzik ayep
08:47 jnthn OK, so we're down to Zavolaj and moritz also sees failures in the socket tests
08:49 jnthn moritz: I've just run the socket test several times and it passes reliably.
08:49 jnthn moritz: So I'm guessing something platform specific, but it's a bit hard for me to track down.
08:50 jnthn moritz: I dunno if subbuf is used anywhere; I did change that.
08:51 cognominal_ joined #perl6
08:53 sisar joined #perl6
08:55 mustapha joined #perl6
09:00 fhelmberger joined #perl6
09:04 fhelmberger joined #perl6
09:12 daxim joined #perl6
09:17 pmurias_ joined #perl6
09:18 bbkr joined #perl6
09:18 masak good antenoon, #perl6
09:19 masak the modules that fail -- is any effort being done to take the failing stuff and make spectests out of it?
09:20 dalek rakudo/toqast: 135013d | jnthn++ | src/Perl6/Actions.pm:
09:20 dalek rakudo/toqast: Harden a check.
09:20 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/135013dac7
09:20 dalek rakudo/toqast: ba93c1d | jnthn++ | src/Perl6/ (2 files):
09:20 dalek rakudo/toqast: Port something to QAST that somehow got missed. Fixes Zavolaj.
09:20 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/ba93c1d6fc
09:21 jnthn masak: Well, pir::foo stuff doesn't belong in spectest.
09:21 jnthn masak: And probably nor does native calling stuff just yet.
09:22 tadzik \o/
09:22 tadzik masak: on qbootstrap, after the spectests were clean there were no module regressions either
09:22 tadzik (iirc)
09:23 jnthn Yeah, that's my recollection too
09:23 jnthn The module space regressions left over here are about things that we'd not expect the spectests to cover.
09:23 jnthn And the rest of the modules seem to work, iiuc.
09:23 jnthn (everyone who contributes to spectest)++
09:26 crab2313 joined #perl6
09:38 masak sounds good.
09:39 awoodland joined #perl6
09:42 longqinsi joined #perl6
09:46 dalek rakudo/toqast: 7efa992 | jnthn++ | src/Perl6/Actions.pm:
09:46 dalek rakudo/toqast: Fix another place Op was wrongly assumed.
09:46 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/7efa992535
09:46 dalek rakudo/toqast: d4435ab | jnthn++ | src/Perl6/ConstantFolder.pm:
09:46 dalek rakudo/toqast: Don't leave constant folding failure to chance.
09:46 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/d4435ab64f
09:46 dalek nqp/toqast: aa69d06 | jnthn++ | src/QAST/ (7 files):
09:46 dalek nqp/toqast: First pass through optimizing the QAST node structures, which saves some time and some memory.
09:46 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/aa69d06286
09:46 longqinsi I'm trying to run perl6 on windows. I have installed parrot rakudo 4.5.0. I can start perl6 in cygwin without any parameter. But when I do the same thing  in cmd , I get error:PARROT VM: Could not load bytecode Could not load oplib `nqp_ops'. Who can tell me why?
09:47 jnthn longqinsi: Maybe differences in the path between the two environments?
09:49 longqinsi Maybe. Do you know how to get the path of cygwin?
09:49 jnthn echo $PATH maybe
09:49 * jnthn doesn't know much about cygwin at all
09:52 longqinsi I have found it : printenv PATH
09:53 moritz I think   echo %PATH% might work on cmd too
09:58 crab2313 joined #perl6
10:03 MayDaniel joined #perl6
10:13 dalek doc: 514fae0 | moritz++ | lib/Str.pod:
10:13 dalek doc: [Str] follow spec titlecase refactor
10:13 dalek doc: review: https://github.com/perl6/doc/commit/514fae0c51
10:22 dalek doc: 56b73a4 | moritz++ | lib/Str.pod:
10:22 dalek doc: [Str] more updates
10:22 dalek doc: review: https://github.com/perl6/doc/commit/56b73a4044
10:23 MayDaniel joined #perl6
10:27 kaleem joined #perl6
10:28 M_o_C joined #perl6
10:28 kaleem joined #perl6
10:30 DarthGandalf joined #perl6
10:33 masak r: sub is-palindrome($s) { my $just-lc-letters = $s.comb.grep(/\w/).join.lc; $just-lc-letters eq $just-lc-letters.flip }; say is-palindrome "A man, a plan, a canal... Panama!"
10:33 p6eval rakudo 4fe23e: OUTPUT«True␤»
10:33 masak \o/
10:34 masak r: sub is-palindrome { $_ eq .flip given $^s.comb.grep(/\w/).join.lc }; say is-palindrome "A man, a plan, a canal... Panama!"
10:34 p6eval rakudo 4fe23e: OUTPUT«True␤»
10:34 moritz masak: I'd call the variable $just-letters-lc
10:34 masak in retrospect, yes.
10:34 moritz masak: cause it's not "just lc letters" from the string
10:34 masak aye.
10:34 tadzik $java-lang-data-enterprise-letters-lowercase-only
10:34 masak oh, what's the name of such adjectives?
10:34 masak "all the visible stars" vs "all the stars visible"?
10:35 moritz jnthn: https://gist.github.com/3175472 that's my analysis of the socket failure
10:36 moritz jnthn: the problem is related to the fact that IO::Socket.recv doesn't do any real decoding. It seems to receive binary parrot strings, and simply hands them on
10:36 moritz at least I think that's what's going on
10:36 moritz $!buffer ~= nqp::p6box_s($!PIO.recv()) if $!buffer.bytes <= $bufsize
10:36 jnthn moritz: I wonder how on earth we got away with it before...
10:37 tadzik :)
10:37 jnthn The only thing that's really changed is subbuf, which did some odd things.
10:37 moritz jnthn: by looking the other way REALLY HARD
10:38 jnthn Whan a pain in the neck.
10:38 moritz jnthn: fwiw whiteknight++'s io_cleanup1 branch fixes this by adding an .encoding attribute to socket.pmc
10:42 GlitchMr joined #perl6
10:42 crab2313 joined #perl6
10:44 moritz jnthn: trying a patch now
10:47 MayDaniel joined #perl6
10:50 moritz much better
10:50 erkan joined #perl6
10:50 moritz now that changes the argument to recv to mean characters instead of bytes
10:50 moritz which is rather sane, I think
10:51 moritz but makes a test fail
11:01 daxim pug ⊆ pug   http://s3-ec.buzzfed.com/static/enhanced/web04/2012/4/2/13/enhanced-buzz-23183-1333387533-76.jpg
11:02 masak daxim: and both manage to look sad about it.
11:03 dalek star: f8f66ac | moritz++ | skel/docs/announce/2012.07:
11:03 dalek star: more deprecation notices: recv and IO::File/IO::Dir
11:03 dalek star: review: https://github.com/rakudo/star/commit/f8f66ac058
11:04 GlitchMr print_r(array_count_values(str_split(implode("", array_map("file_get_contents", array_slice($argv, 1))))));
11:04 GlitchMr I've feeling it would be simpler in Perl 6
11:06 * masak is thrown into a sudden depression by seeing PHP :(
11:06 Timbus wait are you joining a scring and then.. splitting it again?
11:07 dalek rakudo/toqast: 0392a80 | moritz++ | src/core/IO/Socket.pm:
11:07 dalek rakudo/toqast: switch IO::Socket.recv to character semantics
11:07 dalek rakudo/toqast:
11:07 dalek rakudo/toqast: this makes the tests not abort on linux, but the tests need adapting
11:07 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/0392a80820
11:07 jnthn masak: ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. # bf program to make you feel better :)
11:08 Timbus >.<
11:08 masak thanks, that helped :)
11:08 masak what does it do, print 'hello world'?
11:08 GlitchMr It counts letters in every ARGV file
11:09 masak today's mini-challenge: run jnthn's above bf program on p6eval! :)
11:09 moritz r: say '++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.' # won!
11:09 p6eval rakudo 4fe23e: OUTPUT«++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.␤»
11:09 Timbus ffff beaten
11:09 GlitchMr > ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. # bf program to make you feel better :)
11:09 GlitchMr Preceding context expects a term, but found infix > instead
11:09 masak no no no
11:10 masak you're deliberately misunderstanding... :)
11:10 GlitchMr Sure
11:10 jnthn masak: Yes, hello world :)
11:10 masak run jnthn's above bf program *on a bf interpreter* written in Perl 6, on p6eval. *sigh*
11:10 masak I'm surrounded by aspies who listen to what I say, not what I mean... :P
11:11 * masak knows he's going to eat his hat for that comment the next time he's obnoxious himself, though
11:12 masak in related news, I've reverted back to my old (AFK) behavior of answering "yes" to "... or ..."-type questions.
11:12 flussence r: note @*ARGFILES».slurp.join.comb.classify(*.ord)
11:12 p6eval rakudo 4fe23e: OUTPUT«Dynamic variable @*ARGFILES not found␤  in method <anon> at src/gen/CORE.setting:9599␤  in <anon> at src/gen/Metamodel.pm:2304␤  in any find_method_fallback at src/gen/Metamodel.pm:2302␤  in any find_method at src/gen/Metamodel.pm:843␤  in method dispatch:<hyper> a…
11:12 masak though after a short pause I usually provide the correct alternative as well, as a kind of public service.
11:12 flussence blargh.
11:13 flussence r: note @*ARGS».slurp.join.comb.classify(*.ord)
11:13 p6eval rakudo 4fe23e: OUTPUT«Nil␤»
11:13 flussence the php translates to something like that anyway.
11:15 dalek roast/toqast: 333ca4c | moritz++ | S32-io/IO-Socket-INET. (2 files):
11:15 dalek roast/toqast: update Socket tests to assume character semantics in .recv
11:15 dalek roast/toqast: review: https://github.com/perl6/roast/commit/333ca4c63a
11:15 moritz jnthn: ok, in the roast/toqast the socket tests pass again
11:15 jnthn \o/
11:15 jnthn moritz++
11:20 moritz URI also passes all tests here (though I've tested it without precompilation)
11:21 flussence I wrote a thing, does it look useful to anybody? https://github.com/flussence/Pod-Iterator
11:21 arnsholt Once again, spectests are awesome
11:22 arnsholt I'm not entirely incredulous at the idea that my refactorings actually work
11:22 masak flussence: nice!
11:26 JimmyZ joined #perl6
11:27 JimmyZ masak: 说到 PHP,我最近在用 PHP 做 BDD 测试
11:28 jnthn r: (->$c,@a?{my ($ptr,$pc,$l,@p)=0,0,0,$c.comb;while @p[$pc++] {{'['=>{ @a[$ptr] ?? ($l = $pc - 1) !! (1 until @p[$pc++] eq ']') },']'=>{$pc=$l},'>'=>{$ptr++},'<'=>{$ptr--},'+'=>{@a[$ptr]++},'-'=>{@a[$ptr]--},'.'=>{print(chr(@a[$ptr]))}}{$^i}()} })('++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.');
11:28 p6eval rakudo 4fe23e: OUTPUT«Hello World!␤»
11:31 * kresike wonders if jnthn is human or not
11:33 JimmyZ kresike: see http://jnthn.net :)
11:35 masak jnthn++!
11:35 masak jnthn: that is the awesomes thing I've seen today. and I'm on the Internet, so that's saying quite a lot.
11:35 masak awesomest*
11:36 jnthn :)
11:36 kresike JimmyZ, I have seen videos of his talks about perl6, but still, I think he's an alien or a robot or something :) Humans don't do these kind of things ...
11:36 * jnthn figures he'll go for a rechar^W^W^Wtake lunch :)
11:36 masak r: say chars q/(->$c,@a?{my ($ptr,$pc,$l,@p)=0,0,0,$c.comb;while @p[$pc++] {{'['=>{ @a[$ptr] ?? ($l = $pc - 1) !! (1 until @p[$pc++] eq ']') },']'=>{$pc=$l},'>'=>{$ptr++},'<'=>{$ptr--},'+'=>{@a[$ptr]++},'-'=>{@a[$ptr]--},'.'=>{print(chr(@a[$ptr]))}}{$^i}()} })('++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.');/
11:37 p6eval rakudo 4fe23e: OUTPUT«361␤»
11:37 masak doesn't quite fit in a tweet... :)
11:38 JimmyZ kresike: that remind me of bacek ....
11:39 kresike JimmyZ, never heard of her/him/it ...
11:40 colomon joined #perl6
11:41 colomon o/
11:41 kresike hello colomon o/
11:41 masak JimmyZ: 我可以想像 BDD 让愉快甚至使用 PHP
11:42 masak that was probably wildly wrong, but I bet the sense came through.
11:42 JimmyZ kresike: he is the guy who implemented gms GC in parrot
11:43 GlitchMr http://jnthn.net/cgi-bin/photo_large.pl?id=3783
11:43 dalek roast: 42450a0 | (Solomon Foster)++ | S32-str/substr.t:
11:43 dalek roast: Add substr tests which will throw UTF-16 implementations which are acting like UCS-2.
11:43 dalek roast: review: https://github.com/perl6/roast/commit/42450a0aca
11:44 JimmyZ masak: 是的,不通顺。
11:44 GlitchMr Why Perl 6 implementation would use UCS-2 internally?
11:44 tadzik oh, so that was php... I thought it's some CPAN module for weird function names
11:44 colomon masak: I'm still in north ontario, can you subject the niecza bug those new tests show?
11:45 JimmyZ there are some same things in CPAN, which named cucumber too
11:45 masak colomon: in what way do they fail?
11:46 colomon masak: it looks like substr is operating on 2-byte words rather than UTF-16 code points.
11:47 GlitchMr perl6: print "\x10000".chars
11:47 p6eval rakudo 4fe23e: OUTPUT«1»
11:47 p6eval ..niecza v19-13-g442e075: OUTPUT«2»
11:47 colomon n: say (0x10426, 0x10427).chrs.substr(0,1).ords
11:47 p6eval niecza v19-13-g442e075: OUTPUT«[31m===[0mSORRY![31m===[0m��Confused at /tmp/Yt_FMM5uMV line 1:�------> [32msay (0x10426, 0x10427).chrs[33m�[31m.substr(0,1).ords[0m��Parse failed��»
11:47 masak there's your subject, then. "substr is operating on 2-byte words, not UTF-16 code points".
11:48 masak colomon: you got an escape char in there.
11:48 masak .chrs (something weird) .substr
11:48 colomon masak: yeah, thought it must be
11:48 masak by the way, I still dislike .chrs -- that feels like PHP to me, too.
11:48 colomon I'm on satellite internet from the middle of nowhere, and I need to get out fishing...
11:48 masak or at least the same kind of tendency.
11:49 masak colomon: I'll submit the issue for you.
11:49 * masak submits nieczue
11:49 colomon masak++
11:50 tadzik hahaha
11:50 tadzik nieczue sounds like nieczułe
11:50 tadzik phenny: pl en "nieczułe"?
11:50 phenny tadzik: "insensitive" (pl to en, translate.google.com)
11:50 tadzik :
11:50 tadzik :>
11:51 masak 哈哈哈
11:51 * masak will start calling it 'nieczułe', then :)
11:53 colomon phenny: tell sorear I've got working .tc, .tclc, .tcuc modulo the substr bug, but my implementations are ugly.
11:53 phenny colomon: I'll pass that on when sorear is around.
12:06 arnsholt Fun. My changes to Actions/World.pm make the setting compilation segfault
12:11 JimmyZ you breaks the World
12:11 tadzik Some men just like to watch the World segfault
12:11 arnsholt =D
12:11 arnsholt But fixing it has to wait for later
12:12 arnsholt travel &
12:15 masak tadzik++ # :D
12:16 moritz flussence: Pod::To::HTML now also has a pod iterator, though more functional style
12:19 xinming joined #perl6
12:22 masak rn: constant X = 0..14; say X.WHAT
12:22 p6eval rakudo 4fe23e, niecza v19-13-g442e075: OUTPUT«Range()␤»
12:23 masak rn: constant X = |(0..14); say X.WHAT
12:23 p6eval niecza v19-13-g442e075: OUTPUT«Unhandled exception: Unable to resolve method Capture in type Range␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/IveLM9IsTx line 1 (X init @ 2) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/src/NieczaBackendDotnet.pm6 line 76 (do…
12:23 p6eval ..rakudo 4fe23e: OUTPUT«===SORRY!===␤Could not find sub &prefix:<|>␤»
12:23 masak rn: constant X = list 0..14; say X.WHAT
12:23 p6eval rakudo 4fe23e, niecza v19-13-g442e075: OUTPUT«List()␤»
12:25 GlitchMr r: say pir::lcm__iii(4, 5)
12:25 p6eval rakudo 4fe23e: OUTPUT«No such method 'gist' for invocant of type 'Integer'␤  in sub say at src/gen/CORE.setting:7000␤  in block <anon> at /tmp/Y9c3FY0Pbo:1␤␤»
12:25 GlitchMr r: say +pir::lcm__iii(4, 5)
12:25 p6eval rakudo 4fe23e: OUTPUT«20␤»
12:25 GlitchMr I start to like Parrot :)
12:27 * moritz likes to start parrot
12:27 flussence moritz: that one looks a lot better than my attempt... but I'll keep going with this and see how it turns out when I try to actually use it :)
12:27 GlitchMr Of course, it's 4 lcm 5 in Perl 6, but well, Parrot is more lowlevel
12:28 GlitchMr But, it seems more dynamic than C for example
12:30 masak that's the idea.
12:30 masak "Parrot: more dynamic than C, for example"
12:31 brrt GlitchMr: finally!
12:31 brrt somebody still likes parrot over here :-)
12:31 tadzik :)
12:31 masak awww :)
12:31 * masak hugs brrt
12:31 masak brrt: I like Parrot too. I wish it well.
12:32 GlitchMr No memory management :)
12:32 * brrt hugs masak back
12:32 masak I see it struggling, and don't know what to do about it.
12:32 brrt parrot is awesome
12:32 GlitchMr (well, manual memory management)
12:32 * tadzik hugs Parrot
12:32 masak the *vision* of Parrot is awesome.
12:32 brrt .. true
12:32 masak I want to live in a world where it has come true.
12:32 brrt what happened to parrot as far as i can tell
12:32 brrt is it got old
12:32 masak quickly.
12:32 brrt yes, unfortunately
12:33 brrt and whats more
12:33 masak it got old while it was still beta.
12:33 masak or alpha, even, perhaps.
12:33 brrt 'other' vms have made huge advances since its start
12:33 masak aye.
12:33 tadzik what I see as a problem, is that at one point in time everything you heard at #parrot was: "this subsystem is shit". "That subsystem is shit"
12:34 masak it's harder today than back in 2001 to carve oneself a niche among VMs-that-do-dynamic stuff.
12:34 tadzik then Parrot went "Redesign ALL THE THINGS!"
12:34 GlitchMr Actually, perhaps I should try making very simple language in Parrot
12:34 tadzik GlitchMr: do, it's a lot of fun
12:34 masak I wouldn't recommend anyone to try to create a dynamic VM today, unless they *really* knew their stuff.
12:34 * brrt is thinking on toying with m0 to make a small interpreter
12:35 masak tadzik: ambitious redesign isn't so much the core problem as the symptom, though.
12:35 tadzik the problem is that I think it lacked manpower for all it wanted to do
12:36 tadzik now m0 is stalled, or at least seems so
12:36 GlitchMr I can make grammars in Parrot, am I right?
12:36 brrt PGE
12:36 tadzik yes, with nqp
12:36 brrt oh, nqp is probably better
12:36 tadzik it's still the old nqp, nqp-rx
12:36 tadzik (I think)
12:39 flussence wait, I have an idea! let's take all the parrot devs who want to rewrite everything all the time, and make them work on PHP instead! :)
12:39 GlitchMr I don't think that PHP could be made better without changing everything
12:40 flussence that's the idea :)
12:40 moritz GlitchMr: but "changing everything" isn't so uncommon in PHP land
12:40 GlitchMr I mean, if you would make better PHP, it would be incompatible with PHP
12:41 flussence maybe they should just be marketing parrot itself as a PHP alternative... it's probably a nicer language already
12:43 flussence (well, with a nqp-ish wrapper around it. I can't imagine anyone wanting to write general purpose programs in a VM pseudo-asm language...)
12:43 brrt winxed is nicer than php
12:43 brrt and comes with a 'standard library' in the form of Rosella
12:44 flussence I keep hearing about this winxed thing but I have absolutely no idea what it is
12:45 * JimmyZ likes parrot too
12:45 JimmyZ well, I think nqp is nicer than winxed ;)
12:45 brrt winxed is a language that looks and smells like javascript
12:45 brrt but is totally parrot underneath
12:46 brrt so it has classes and namespaces and continuations and multiple return values an all that
12:46 brrt most of that works out really well
12:46 moritz winxed is like a much nicer syntax for PIR
12:46 brrt some things don't
12:47 moritz NQP on the other hand only does the intersection of what parrot easily provides and what Perl 6 wants to be
12:51 jnthn OK, so with native call fixed and moritz++ having patched the sockets issue - what do we feel is left for the merge?
12:52 moritz Nil?
12:52 moritz are all the optimizations back?
12:53 jnthn moritz: Inlining of routines isn't restored yet, but the other optimizations are.
12:54 jnthn moritz: I'll work on that, but I don't think it need block the merge.
12:54 moritz then I'm +1 on merging now
12:55 jnthn That optimization needs a re-do rather than some tweaks, since it can be done in a radically better way now.
12:55 jnthn OK, I'll merge this evening, unless somebody finds a reason not to before then.
12:55 jnthn (Plus I'm meant to be doing $dayjob stuff at the moment. :-))
13:02 tokuhiro_ joined #perl6
13:04 PacoAir joined #perl6
13:19 skids joined #perl6
13:23 [Coke] ingy: (up to date) \o/
13:26 masak rn: enum A <a b c d>; say A.enums.keys
13:26 p6eval rakudo 4fe23e, niecza v19-13-g442e075: OUTPUT«a b c d␤»
13:26 masak rn: enum A <a b c d>; say .^name for A.enums.keys
13:26 p6eval rakudo 4fe23e, niecza v19-13-g442e075: OUTPUT«Str␤Str␤Str␤Str␤»
13:27 masak rn: enum A <a b c d>; say .^name for A.enums
13:27 p6eval rakudo 4fe23e, niecza v19-13-g442e075: OUTPUT«Pair␤Pair␤Pair␤Pair␤»
13:29 lumi_ joined #perl6
13:30 pmichaud perlcabal.org seems to be down  :-(
13:30 masak was just gonna say.
13:30 masak luckily, there's https://github.com/perl6/specs/blob/master/S12-objects.pod
13:30 masak rn: enum A <a b c d>; say b.^name
13:31 p6eval rakudo 4fe23e, niecza v19-13-g442e075: OUTPUT«A␤»
13:31 masak what's the way to get a list of these values out of A?
13:31 moritz rn: enum A <a b c d>; say A.enums.perl
13:31 p6eval niecza v19-13-g442e075: OUTPUT«EnumMap.new(...)␤»
13:31 p6eval ..rakudo 4fe23e: OUTPUT«("a" => 0, "b" => 1, "c" => 2, "d" => 3).hash␤»
13:31 moritz perlcabal.org back up again
13:32 moritz rn: enum A <a b c d>; say A.enums.values
13:32 p6eval rakudo 4fe23e, niecza v19-13-g442e075: OUTPUT«0 1 2 3␤»
13:32 masak moritz: S12 says
13:32 masak CoinFace.enums.[1]        # Tails => 1
13:32 zhutingting joined #perl6
13:32 masak Tails, not "Tails".
13:32 masak I think Rakudo doesn't do that.
13:33 moritz rn: enum A <a b c d>; say A.enums[0].perl
13:33 p6eval rakudo 4fe23e: OUTPUT«("a" => 0, "b" => 1, "c" => 2, "d" => 3).hash␤»
13:33 p6eval ..niecza v19-13-g442e075: OUTPUT«"a" => 0␤»
13:33 moritz masak: Tails => 1 autoquotes Tails
13:33 moritz rn: my %h = a => 1, b => 2; say %h[0].perl
13:34 p6eval niecza v19-13-g442e075: OUTPUT«"a" => 1␤»
13:34 p6eval ..rakudo 4fe23e: OUTPUT«("a" => 1, "b" => 2).hash␤»
13:34 moritz hm
13:34 moritz I don't think it's a good idea to allow positional indexing into an unordered construct
13:34 moritz rn: my %h = a => 1, b => 2; say %h[1].perl
13:34 p6eval rakudo 4fe23e: OUTPUT«Failure.new(exception => X::OutOfRange.new(what => "Index", got => 1, range => 0..0, comment => Any))␤»
13:34 p6eval ..niecza v19-13-g442e075: OUTPUT«"b" => 2␤»
13:35 jnthn rn: enum A <a b c d>; say A.enums.pairs[0].perl
13:35 p6eval rakudo 4fe23e, niecza v19-13-g442e075: OUTPUT«"a" => 0␤»
13:35 jnthn rn: enum A <a b c d>; say A.enums.pairs[1].perl
13:35 p6eval rakudo 4fe23e, niecza v19-13-g442e075: OUTPUT«"b" => 1␤»
13:36 flussence is there a method like .WHAT but returns just the ident part of the class name?
13:37 pmichaud flussence: .WHAT.perl, IIRC
13:37 masak moritz: +1
13:37 pmichaud r:  say 1.WHAT;   say 1.WHAT.perl;
13:37 p6eval rakudo 4fe23e: OUTPUT«Int()␤Int␤»
13:37 flussence oh, thanks. I miss something obvious again :)
13:37 masak moritz: so, how *do* I get the enum *objects* (in order) out of the enumeration?
13:38 moritz flussence: .^name
13:38 flussence ooh, that's even better
13:39 PerlJam greetings #perl6 people
13:40 moritz rn: say (enum :: <a b c >).enums.values.perl
13:40 p6eval niecza v19-13-g442e075: OUTPUT«[0, 1, 2].list␤»
13:40 p6eval ..rakudo 4fe23e: OUTPUT«===SORRY!===␤ResizablePMCArray: Can't pop from an empty array!␤»
13:40 jerome joined #perl6
13:40 masak PerlJam! \o/
13:41 PerlJam masak: you are in a room that is bigger on the inside but is not the tardis.  :)
13:42 masak indeed.
13:42 * masak .oO( #perl6: bigger on the inside )
13:43 jnthn rn: enum Beer < ale stout porter >; say Beer::.keys
13:43 p6eval niecza v19-13-g442e075: OUTPUT«0␤»
13:43 p6eval ..rakudo 4fe23e: OUTPUT«ale stout porter␤»
13:43 PerlJam masak: btw, naming the game "crypt" may start a myth about Perl 6 being dead  ;)
13:43 jnthn rn: enum Beer < ale stout porter >; say Beer::.pairs.perl
13:43 p6eval niecza v19-13-g442e075: OUTPUT«(0 => Stash.new(...), ).list␤»
13:43 p6eval ..rakudo 4fe23e: OUTPUT«("ale" => Beer::ale, "stout" => Beer::stout, "porter" => Beer::porter).list␤»
13:43 jnthn moritz: Like that.
13:45 thou joined #perl6
13:45 mucker joined #perl6
13:46 masak jnthn: thanks.
13:46 masak rn: enum Beer < ale stout porter >; say Beer::.pairs>>.value
13:47 p6eval niecza v19-13-g442e075: OUTPUT«Stash.new(...)␤»
13:47 p6eval ..rakudo 4fe23e: OUTPUT«ale stout porter␤»
13:47 pmichaud going through the package/stash to get to the keys seems ... not right
13:47 masak agreed.
13:48 pmichaud I mean, it may work in rakudo, but it doesn't feel "spec"
13:48 masak it feels too heavy-handed, too.
13:48 bluescreen10 joined #perl6
13:49 pmichaud r: enum Beer <ale stout porter>; say Beer.^parents(:local)
13:49 p6eval rakudo 4fe23e: OUTPUT«Int()␤»
13:49 jnthn Well, the question was how to do it, not what'd be a nice way to do it :)
13:50 pmichaud oh; I'm interested in "What's the Perl 6 way to do it"
13:50 jnthn Even less spec but nicer:
13:50 * masak too
13:50 jnthn r: enum Beer < ale stout porter >; say Beer.^enum_values.perl
13:50 p6eval rakudo 4fe23e: OUTPUT«("ale" => 0, "stout" => 1, "porter" => 2).hash␤»
13:51 jnthn Or as a list
13:51 jnthn r: enum Beer < ale stout porter >; say Beer.^enum_value_list.perl
13:51 p6eval rakudo 4fe23e: OUTPUT«(Beer::ale, Beer::stout, Beer::porter)␤»
13:51 jnthn Anyway, it's all there in meta-space whichever sugar we pick :)
13:52 pmichaud yeah, using Beer::.pairs seems wrong because I could (theoretically) bind subs and other things into the Beer package that aren't really part of the enumeration.
13:53 jnthn pmichaud: Yes, indeed.
13:53 jnthn pmichaud: But it is at least spec that this should work, whereas the meta-model way ain't (yet) spec.
13:53 jnthn pmichaud: That is, "work" :-)
13:54 pmichaud r: enum Beer < ale stout porter >;  say Beer.enums.perl
13:54 p6eval rakudo 4fe23e: OUTPUT«("ale" => 0, "stout" => 1, "porter" => 2).hash␤»
13:54 pmichaud *there*
13:54 pmichaud that's spec.
13:55 pmichaud It's in the first sentence of S12's "The Enumeration Type"  :-P
13:55 pmichaud r: enum Beer < ale stout porter >;  say Beer.enums.keys.perl
13:55 p6eval rakudo 4fe23e: OUTPUT«("ale", "stout", "porter").list␤»
13:56 jnthn pmichaud: I'm not sure what's what moritz was after, fwiw.
13:56 pmichaud oh, probably not.
14:01 masak what masak was after.
14:02 masak no, I don't want strings there.
14:02 masak I want the *enum* values.
14:02 masak they're nicer to pass around than strings.
14:02 masak (and I half-suspect that the spec means them to be enum values, not strings)
14:03 masak (but as moritz rightly pointed out, the indication I found for that being so was actually a false lead because auto-quoting of pair keys)
14:04 jnthn afk for a little bit
14:04 pmichaud Offhand, I think that .enums should return them.
14:04 pmichaud instead of the ints.
14:08 [Coke] still only one yapc::eu perl6 talk that isn't really.
14:11 masak pmichaud: instead of the strings, surely?
14:11 masak pmichaud: the ints are what the enums are associated with.
14:12 pmichaud the enums *are* the ints, though.
14:12 pmurias_ [Coke]: the perlito5 one?
14:12 pmichaud I wouldn't expect   Beer::ale => 0
14:13 pmichaud I would expect   'ale'  => Beer::ale, maybe.
14:13 pmichaud r:  enum Beer < ale stout porter >;   say Beer::ale + 3;
14:13 p6eval rakudo 4fe23e: OUTPUT«3␤»
14:14 pmichaud r:  enum Beer < ale stout porter >;   say Beer::porter + 3;
14:14 p6eval rakudo 4fe23e: OUTPUT«5␤»
14:14 pmichaud see, it's an Int already.  :-)
14:14 [Coke] pmurias_: no, it's masak's autopun LT.
14:15 pmichaud despite what S12 currently says, I'd expect:
14:16 pmichaud Beer.enums.keys   # ('ale', 'stout', 'porter')
14:16 pmichaud Beer.enums.values   # (Beer::ale, Beer::stout, Beer::porter)
14:16 GlitchMr Just wondering. I declare operators B and C which are tighter than operator A. Is operator B equiv to C?
14:17 pmichaud GlitchMr: as things currently stand, yes.
14:17 PerlJam GlitchMr: should be.
14:18 GlitchMr ... oh, I think I understand... when I declare C, I already have operator B which is tighter than A
14:18 GlitchMr So, C is looser than B
14:18 pmichaud GlitchMr: they should be equiv
14:19 GlitchMr But doesn't :tighter means slightly tigher than this operator, but not too tight
14:19 [Coke] r: enum Pets < cat dog bun >; say Pets::dog.Int
14:19 p6eval rakudo 4fe23e: OUTPUT«1␤»
14:19 masak pmichaud: ok, I think I agree.
14:19 pmichaud also, seeing this now (I've never really understood enums til seeing this code), I think it's a mistake for EnumMap to be the base class of Hash.
14:19 masak pmichaud: but if it *is* the enum, it should .perl as "ale" => ale, I think.
14:20 masak pmichaud: \o/
14:20 masak I've said for *ages* that it's a mistake for EnumMap to be a base class for Hash.
14:20 pmichaud EnumMap really wants to be an ordered list of pairs
14:20 masak aye.
14:20 pmichaud if we want a base class for Hash, it should be Mapping
14:20 masak and not be called that.
14:20 PerlJam GlitchMr: B is tighter(A)  and C is tighter(A)  make B and C equiv (and tighter than A)
14:20 masak pmichaud: +Inf
14:21 pmichaud what .enums returns should be an ordered list of pairs that understands both .[] and .{} to dtrt
14:22 pmichaud I think it should .perl as   "ale" => Beer::ale
14:23 masak aye.
14:23 masak wfm.
14:23 pmichaud essentially, the values of an enumeration are the actual Enumeration objects, not their base class thingies
14:24 pmichaud if you want those, you use  >>.Numeric or >>.Int
14:25 tadzik fun fact: "Ale" means "but" in Polish
14:25 GlitchMr but...
14:25 GlitchMr fun fact: "But" means "shoe" in Polish... oh wait
14:26 masak tadzik: I'm having trouble explaining to myself why this fact feels absolutely obvious to me...
14:26 masak it's as if pl:"ale" *must* mean en:"but".
14:26 GlitchMr Seriously, you should expect this with every short word
14:27 masak you should expect every short word to mean "but"? :P
14:27 PerlJam masak: or shoe
14:27 GlitchMr I've checked "lol" for fun... it turned out that it means "fun" in Dutch
14:27 GlitchMr Nothing special. It's very short word, so well...
14:27 PerlJam GlitchMr: but was that a pre-existing meaning or one that's only recently come to be?  :)
14:28 GlitchMr https://en.wiktionary.org/wiki/lol
14:28 GlitchMr "Of uncertain origin. Found in publications from as early as 1560. Probably derived from the onomatopoeia 'lollen', originally meaning 'to snooze'. Compare English loll."
14:28 GlitchMr If it was found in 1560... well
14:29 GlitchMr As for but: https://en.wiktionary.org/wiki/but
14:29 tokuhiro_ joined #perl6
14:30 GlitchMr And of course https://en.wiktionary.org/wiki/ale
14:32 pmichaud "too" is short, too, but does "too" also mean "but"?
14:32 * masak ends up with a method with six (!) small subroutines, each building on the previous ones, and wonders if this is a good thing
14:35 tadzik pmichaud: "too" is pronounced "tu", which means "here" :)
14:36 brrt joined #perl6
14:36 pmichaud masak: S02 also says:
14:36 pmichaud EnumMap     Associative Positional Iterable
14:36 moritz erm, what.
14:36 pmichaud ...and I think we had decided that hash arguments should not bind to array parameters
14:36 pmichaud which means that EnumMap is either not Positional or not the base class for Hash
14:36 moritz and Hash isa EnumMap
14:37 moritz yes, something's fishy here
14:37 GlitchMr "The only way creating a new language compiler could be easier is if these files created themselves."
14:37 GlitchMr ok
14:37 moritz japhb: btw I've written a small script that compares the MRO of classes in rakudo and in type-graph.txt
14:38 moritz japhb: there were just three or four disagreement. Will paste them later when I'm at the other machine
14:38 masak pmichaud: right, seems we've muddled two orthogonal intents until now.
14:39 jnthn back
14:41 GlitchMr This language could be nice starting point :)
14:42 jnthn tadzik: (ale) same in Slovak :) I probably managed to pun badly on it at some point...
14:43 atrodo joined #perl6
14:47 pmurias joined #perl6
14:50 xinming joined #perl6
14:58 fgomez joined #perl6
15:05 moritz r: say Nil.^name
15:05 p6eval rakudo 4fe23e: OUTPUT«Nil␤»
15:05 [Coke] r: say Inf.Int;
15:05 p6eval rakudo 4fe23e: OUTPUT«Cannot coerce Inf to an Int␤  in method gist at src/gen/CORE.setting:9594␤  in sub say at src/gen/CORE.setting:7000␤  in block <anon> at /tmp/ZKBuymk059:1␤␤»
15:06 [Coke] huh. https://rt.perl.org/rt3 now mentions niecza. (but not pugs)
15:07 kresike bye all
15:07 hoelzro hey Perl6 folk
15:08 hoelzro let's say there were a module for importing a Perl 5 module into Perl 6
15:08 hoelzro what would be a good syntax for specifying this?
15:08 hoelzro I was thinking 'use perl5 => "Module::Name"'
15:09 flussence use Module::Name :from<perl5>
15:10 tadzik yep
15:10 tadzik we did have that working at some point
15:11 hoelzro oh, really?
15:12 hoelzro how did it work?
15:12 moritz by magic
15:13 [Coke] pugs: use File::Spec :from<perl5>
15:13 p6eval pugs: OUTPUT«pugs: *** Unsafe function 'use' called under safe mode␤    at /tmp/vgQWfGRdXa line 1, column 1␤»
15:13 daxim [17:04] <abraxxa> php runs in the browser: http://phpjs.hertzen.com/
15:13 diakopter flussence: "I can't imagine anyone wanting to write general purpose programs in a VM pseudo-asm language..."  some of us like pain
15:14 flussence you've got me there.
15:16 hoelzro so let's say I have a new method of a Perl5 class that accepts arbitrary params
15:16 hoelzro ex. Rob->new(foo => 17, bar => 18)
15:16 [Coke] r: my Int $a = Inf;
15:16 p6eval rakudo 4fe23e: OUTPUT«Type check failed in assignment to '$a'; expected 'Int' but got 'Num'␤  in block <anon> at /tmp/HUzKu7NNLT:1␤␤»
15:16 hoelzro how would one call that from Perl 6?
15:17 moritz the perl 5 method just expects a list
15:17 moritz so you give it a list
15:17 masak makes sense.
15:17 moritz Rob.new('foo', 17, 'bar', 18)
15:18 japhb moritz++ # Continued cleanup of type-graph.txt
15:18 hoelzro ok
15:18 moritz or maybe we can teach it to flatten out pairs in argument lists
15:18 hoelzro I figured that; there's no way to make that "prettier"?
15:18 moritz japhb: remaining discrepancies are: type-graph.txt says Signature is Cool, Rakudo disagrees
15:18 hoelzro moritz: but how would I then do Rob->new({ ... })?
15:18 mhasch a library with lots of magic might want to employ an orang-utan librarian (sorry I could not resist)
15:18 hoelzro explicit hash in perl 6?
15:18 moritz hoelzro: Rob.new({ ...})
15:19 japhb Thank you moritz; I'd intended to do a similar cross-check myself, but $work-week intruded.  :-/
15:19 moritz japhb: I'll just commit the script
15:19 moritz and
15:19 moritz Stash
15:19 masak mhasch: heh :)
15:19 moritz rakudo says it inherits from Hash
15:19 moritz type-graph doesn't
15:19 moritz I guess I'll just fix up the type graph
15:20 tadzik every time I hear "discrepancy" in my head I hear "involving a semi-tonal discrepancy"
15:21 tadzik so I decomutee, and you have fun singing the song in your heads :)
15:21 [Coke] r: (1..3).map({$_ => $_*$_}).perl.say #RT 68298
15:21 p6eval rakudo 4fe23e: OUTPUT«use of uninitialized variable $_ of type Any in numeric context  in block <anon> at /tmp/jYbRD55qyN:1␤␤use of uninitialized variable $_ of type Any in numeric context  in block <anon> at /tmp/jYbRD55qyN:1␤␤use of uninitialized variable $!key of type Any in string c…
15:22 moritz that's the old hash vs. block dichtonomy
15:22 dalek doc: bf9c66f | moritz++ | type-graph.txt:
15:22 dalek doc: [type-graph.txt] fix up entries for Stash and Signature
15:22 dalek doc: review: https://github.com/perl6/doc/commit/bf9c66f46d
15:22 dalek doc: 06d1593 | moritz++ | util/check-type-graph.pl6:
15:22 dalek doc: add a script that cross-checks MRO of type-graph.txt with Rakudo
15:22 dalek doc: review: https://github.com/perl6/doc/commit/06d1593f66
15:23 japhb Ah, I see the problem with Signature ... BOOTSTRAP says it's Any, but Signature.pm has 'is Cool' in a comment at the top (I used naive grepping to do the first pass collection of data for type-graph.txt)
15:24 moritz well, signatures are cool, but Signature is not Cool :-)
15:24 masak ;)
15:24 japhb moritz, True.  Just need to fix the comments in Signature.pm.  ;-)
15:24 * mhasch wonders what a Cool module would do
15:24 dalek rakudo/nom: 7c87dcb | moritz++ | src/core/Signature.pm:
15:24 dalek rakudo/nom: remove misleading comment, japhb++
15:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7c87dcbd36
15:25 [Coke] r: say 612-81
15:25 p6eval rakudo 4fe23e: OUTPUT«531␤»
15:26 diakopter mhasch: Cool is a Perl 6 thingy. that's about all I remember.
15:26 japhb r: say Stash.^mro;
15:26 p6eval rakudo 4fe23e: OUTPUT«Stash() Hash() EnumMap() Iterable() Cool() Any() Mu()␤»
15:27 erkan joined #perl6
15:27 moritz good thing we have docs now: http://doc.perl6.org/type/Cool
15:29 [Coke] r: our Str a; #RT#76830
15:29 p6eval rakudo 4fe23e: OUTPUT«===SORRY!===␤Malformed our␤at /tmp/UfrCAUT0Im:1␤»
15:29 moritz that looks like a pretty good error message
15:30 GlitchMr token quote:sym<"> { <?["]> <quote_EXPR: ':qq'> }
15:30 GlitchMr Where I can find documentation for quote_EXPR in nqp?
15:30 fgomez joined #perl6
15:30 * japhb wonders how he missed the Stash is Hash entry.  Ah well ...
15:30 felher joined #perl6
15:30 moritz GlitchMr: I'd look in HLL::Grammar
15:31 GlitchMr ok :)
15:31 japhb moritz, I understand why you removed some of the Rakudo-specific parts of type-graph.txt, but some of them surprised me.  Why is class WrapHandle gone?  Is it deprecated but not gone yet?
15:33 moritz r: say WrapHandle
15:33 p6eval rakudo 4fe23e: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&WrapHandle' called (line 1)␤»
15:33 moritz japhb: it's only defined lexically within another scope, not user-visible
15:34 japhb Hmmm, can you get it as a return?  Meaning, might the user end up receiving a WrapHandle?
15:34 moritz r: sub f() { }; say &f.wrap({}).WHAT
15:34 p6eval rakudo 4fe23e: OUTPUT«Nominal type check failed for parameter '&wrapper'; expected Callable but got Hash instead␤  in method wrap at src/gen/CORE.setting:1661␤  in block <anon> at /tmp/1okwNFMRv_:1␤␤»
15:35 moritz r: sub f() { }; say &f.wrap({$_}).WHAT
15:35 p6eval rakudo 4fe23e: OUTPUT«WrapHandle()␤»
15:35 moritz hm, you can
15:35 moritz so either that need to change, or we need to expose and spec WrapHandle
15:35 japhb I thought so ...
15:35 japhb nodnod
15:36 pmurias_ joined #perl6
15:36 * diakopter pmurias_ hi
15:38 daxim joined #perl6
15:38 diakopter heh
15:39 TimToady r: my $_ = 'abc'; when m:g/./ -> @x { say @x }
15:39 p6eval rakudo 4fe23e: OUTPUT«===SORRY!===␤Redeclaration of symbol $_␤at /tmp/E86BizvlVf:1␤»
15:39 TimToady r: $_ = 'abc'; when m:g/./ -> @x { say @x }
15:39 p6eval rakudo 4fe23e:  ( no output )
15:39 japhb r: sub f() { }; my $handle = &f.wrap({$_}); say &f.^mro;
15:39 p6eval rakudo 4fe23e: OUTPUT«Sub+{Wrapped}() Sub() Routine() Block() Code() Any() Mu()␤»
15:39 japhb So role Wrapped is visible too
15:45 mhasch moritz++: thanks for doc.perl6.org and p6doc. I feel like xmas has come early this year :-)
15:46 masak \o/
15:46 masak moritz++
15:46 masak mhasch: please let us know how we can make it even better for newcomers.
15:46 masak (and experts)
15:46 thelazydeveloper joined #perl6
15:49 * masak found a parsing bug: https://rt.perl.org/rt3/Ticket/Display.html?id=114256
15:52 thelazydeveloper joined #perl6
15:53 mhasch the headlines seem to lack <a name=...> tags, offhand.  But I certainly will give more feedback later. Today's tuits go to my yapceu talk.  There is a deadline looming...
15:57 japhb moritz, also, why remove module PROCESS and package Metamodel?  Just getting rid of everything that is not a role or class?
15:57 seldon joined #perl6
15:58 aindilis joined #perl6
15:58 masak I don't think we should do <a name=..> any more. the id=".." attribute does the same thing, has other advantages, and no drawbacks.
16:03 mhasch Masak: I stand corrected.  I thought that was the reason for some intra-page links not working, but apparently my browser has an issue with %20 in ids.
16:03 jnthn moritz: (WrapHandle) the spec only says what it can be used for. We can spec and expose the type too, but not doing so was the conservative thing.
16:04 jnthn OK, nobody filed objects to the toqast merge and the evening is here. So... :)
16:08 nightlord joined #perl6
16:08 diakopter jnthn: is it ok if there are still mentions of PAST:: in the source?
16:08 diakopter I'm not saying there are; I'm just curious
16:08 mhasch masak: on second thought, I think not the brwoser is at fault; %20 in URLs means blank and in IDs means %20, does it not? the html should read <h1 id="foo bar"> rather than <1 id="foo%20bar"> IMO.
16:09 jnthn diakopter: Yes, and there will be for a little bit.
16:09 jnthn QAST::Regex still wraps things up in PAST::Node in places. That's gonna have to wait until I work on moving NQP to QAST.
16:11 jnthn Well, maybe not, but it was more than I wanted to bite off right away.
16:11 fhelmberger joined #perl6
16:12 * diakopter wonders whether rakudo will still load the past parrot library afterwards
16:13 Coleoid joined #perl6
16:14 jnthn We'll stop doing that eventually, after NQP is also converted.
16:16 timotimo mhasch: it seems like names must'n contain spaces: ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
16:16 timotimo http://www.w3.org/TR/html4/types.html#type-name <- at least in html4
16:18 masak mhasch: I think we should be able to do without spaces in IDs.
16:18 mhasch even better, yes
16:20 dalek Heuristic branch merge: pushed 207 commits to nqp by jnthn
16:20 dalek Heuristic branch merge: pushed 188 commits to rakudo/nom by jnthn
16:25 am0c joined #perl6
16:28 jnthn pmichaud: toqast landed. Happy hacking on all the things! :)
16:30 masak \o/
16:30 masak jnthn++
16:30 masak ...and I have a Perl 6 day tomorrow. how convenient. :)
16:32 [Coke] jnthn: aw, just missed the daily spectest run.
16:32 jnthn Do quasi placeholders!
16:32 masak that's my plan.
16:32 [Coke] jnthn++
16:33 japhb jnthn++
16:33 jnthn [Coke]: I don't think we win more tests.
16:33 japhb Now time to rebuild all the things
16:33 jnthn Oh, actually
16:33 jnthn There are I think some passing todos.
16:33 gfldex timotimo: in any html or you foobar CSS. There is no quoting for name/id/class in CSS.
16:34 [Coke] jnthn: I know. Perhaps I was just trying to keep up the presence of the daily run. ;)
16:34 jnthn "The daily run" sounds like some exercise thing :P
16:34 [Coke] ew.
16:34 masak it exercises the spectests. :)
16:35 kaleem joined #perl6
16:35 [Coke] Thank goodness I didn't call it the daily runs.
16:39 Coleoid jnthn++ !
16:46 dalek specs: 89b9891 | pmichaud++ | S07-lists.pod:
16:46 dalek specs: Add initial draft of S07-lists.pod, the new Synopsis 7.
16:46 dalek specs: review: https://github.com/perl6/specs/commit/89b9891ea1
16:47 moritz jnthn: did you merge the roast branch too?
16:48 pmichaud if someone wants to update perlcabal.org to point to the new S07-lists.pod document (or tell me how to do it), that would be excellent.
16:48 pmichaud questions, comments, patches welcomed, of course.
16:48 * masak looks
16:48 masak pmichaud++
16:48 pmichaud it's definitely not complete yet, because there are still some semantics we have to work out.
16:52 moritz pmichaud: docs/feather/syn_index.html in the perl6/mu repo
16:53 pmichaud moritz++ # thanks
16:53 pmichaud I'm afk for a few minutes -- bbiab
16:53 diakopter moritz: will the smartlinks script pick up the new file?
16:54 moritz hm, there might be some trouble with having two S07-*.pod files
16:54 jnthn moritz: I...didn't know there was one. :)
16:54 pmichaud I'm fine with removing the old S07.
16:54 moritz jnthn: it's where I adapted the socket tests to deal with character-based .recv
16:55 masak "finiteness isn't currently known" giving Mu. feels ickish in the same way as wantarray() giving back three possible values, two of which are boolean. which everyone forgets. but I see the problem and don't have a better solution. :/
16:55 moritz enum Finity <Finite Infinite Unknown>;
16:55 masak better.
16:56 masak there's also a curious parallel with a possible three-value solution to halting problem algorithms. "halts", "doesn't halt", "dunno, too complicated".
16:56 masak moritz: also, I really like the name "Finity" :)
16:56 Coleoid There is an S07-iterators.pod.  And the current smartlink script special-cases perl6 docs to lose the portion after S\d\d.  So I believe moritz is right about the problem.
17:02 cognominal joined #perl6
17:03 dalek specs: 75e74e0 | moritz++ | S07-iterators.pod:
17:03 dalek specs: there can be only one S07
17:03 dalek specs: review: https://github.com/perl6/specs/commit/75e74e08e3
17:04 tadzik yay, toqast is here!
17:04 masak yay!
17:04 tadzik jnthn++, contributors++
17:04 tadzik awesomeness
17:04 * moritz wonders what a toq-AST is :-)
17:05 masak an AST for the Toposa language, duh. :)
17:05 dalek rakudo/nom: 48fdb9e | jnthn++ | src/Perl6/ (2 files):
17:05 dalek rakudo/nom: Switch many type checks to a more optimal construct, based on profiler feedback. Cuts the time spent in the optimizer to a third (!!!) of what it once was; on my machine we shave ~5s off CORE.setting build and > 10s off spectest run.
17:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/48fdb9e249
17:05 masak https://en.wikipedia.org/wiki/Toposa_language -- "Language codes: ISO 639-3 toq"
17:05 tadzik woot
17:06 tadzik 10s on jnthn's spectests run is probably about 10 minutes on mine :P
17:06 masak jnthn++!
17:06 jnthn oops, I lost a commit in the merge...
17:06 dalek rakudo/nom: 0392a80 | moritz++ | src/core/IO/Socket.pm:
17:06 dalek rakudo/nom: switch IO::Socket.recv to character semantics
17:06 dalek rakudo/nom:
17:06 dalek rakudo/nom: this makes the tests not abort on linux, but the tests need adapting
17:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0392a80820
17:06 dalek rakudo/nom: ed269f7 | jnthn++ | src/core/IO/Socket.pm:
17:06 dalek rakudo/nom: Merge branch 'toqast' into nom
17:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ed269f7535
17:06 jnthn Tehre we are
17:07 dalek roast: 333ca4c | moritz++ | S32-io/IO-Socket-INET. (2 files):
17:07 dalek roast: update Socket tests to assume character semantics in .recv
17:07 dalek roast: review: https://github.com/perl6/roast/commit/333ca4c63a
17:07 dalek roast: 89d4c66 | moritz++ | S32-io/IO-Socket-INET. (2 files):
17:07 dalek roast: Merge remote branch 'origin/toqast'
17:07 dalek roast:
17:07 dalek roast: Switches $socket.recv to consistent character semantics
17:07 dalek roast: review: https://github.com/perl6/roast/commit/89d4c66fd9
17:08 pmichaud I don't want Finity to be an enum.
17:09 pmichaud or if it is an enum, I want it to have the values True, False, and Mu :-)
17:10 pmichaud it's far far too convenient to be able to say   ! $x.infinite   and get the correct result for both False and Mu
17:11 pmichaud not to mention that not knowing an object's finiteness means its finiteness is somehow "undefined"  :-)
17:16 dalek mu: 6f132f2 | pmichaud++ | docs/feather/syn_index.html:
17:16 dalek mu: Update syn_index.html to point to new S07 document.
17:16 dalek mu: review: https://github.com/perl6/mu/commit/6f132f2ef4
17:21 leprevost joined #perl6
17:29 diakopter TimToady: in the P6-ish code I'm writing, I have a need for a contextual that acts like a prototype-based javascript object, where I need to text for existence of keys in the hash and all its parent hashes.  I can emulate this with a stack (which I can iterate) of hashes and pushing/popping where I would otherwise my %*contextual... but ... is there a better way to do this?
17:31 diakopter [TimToady or anyone, I mean....]
17:31 TimToady if you don't really need a hash, then you have an XY problem :)
17:31 TimToady why do you need a hash?
17:32 diakopter well I've used inheriting javascript objects that way quite a few times for symbol tables and caches
17:32 diakopter here it's for a symbol table of sorts
17:32 TimToady do you need to be able to add slots after you've created the inner object?
17:33 diakopter yes, but only to the current one
17:33 tadzik any windows user around?
17:33 TimToady one could do it with inheritance from the outer, or with delegation, and add slots with a mixin
17:33 diakopter tadzik: me
17:34 TimToady but it's true that I've wanted shadowing hashes also occasionally
17:34 tadzik diakopter: could you test panda on on offline-bootstrap branch?
17:34 dalek panda/offline-bootstrap: a5814af | moritz++ | bootstrap.pl:
17:34 dalek panda/offline-bootstrap: [bootstrap.pl] avoid a warning if $PERL6LIB is not set
17:34 dalek panda/offline-bootstrap: review: https://github.com/tadzik/panda/commit/a5814af563
17:34 dalek panda/offline-bootstrap: 04b6755 | moritz++ | bootstrap.pl:
17:34 dalek panda/offline-bootstrap: make bootstrap.pl more robust
17:34 dalek panda/offline-bootstrap:
17:34 dalek panda/offline-bootstrap: do not add ext/ to lib once ext/ is installed
17:34 dalek panda/offline-bootstrap: review: https://github.com/tadzik/panda/commit/04b67556b5
17:34 dalek panda/offline-bootstrap: b6104c9 | tadzik++ | bootstrap.pl:
17:34 dalek panda/offline-bootstrap: Merge branch 'master' into offline-bootstrap
17:34 dalek panda/offline-bootstrap:
17:34 dalek panda/offline-bootstrap: Conflicts:
17:34 dalek panda/offline-bootstrap: bootstrap.pl
17:34 dalek panda/offline-bootstrap: review: https://github.com/tadzik/panda/commit/b6104c9e6a
17:35 tadzik moritz: I tried to merge your changes to bootstrap.pl with mine, this time with no rebase magic. Could you tell me if it works fine on your box now?
17:36 moritz tadzik: will do
17:36 [Coke] +# 07/25/2012 - rakudo++ (22899); niecza (89.96%); pugs (41.04%)
17:36 [Coke] rakudo is failing 65 tests, niecza 3.
17:36 diakopter tadzik: hrm
17:36 [Coke] S32-str/substr.rakudo aborted 63 test(s)
17:37 [Coke] S32-str/substr.niecza 29-30 failed.
17:37 TimToady diakopter: there are likely also ways of doing .^add_attribute or some such if the representation doesn't freeze that at compose time
17:37 jnthn Some of the Rakudo fails may be down to the moritz++ patch that I missed in the merge
17:40 diakopter TimToady: instead of a stack, I guess I could emulate it with a contextual hash, but that also stashes a reference to its outer contextual hash under some magically key, then the search routine traverses the parents
17:40 colomon joined #perl6
17:40 tadzik yay, I can see NativeCall passing in emmentaler :>
17:40 TimToady you could derive from Hash and wrap FETCH to do the delegation, I suppose
17:41 jnthn tadzik: yay
17:42 TimToady the tricky part of a decent hierarchical hash is making a way for an inner hash to say that a key is deleted from the outer hash, but maybe that's not a problem for you
17:47 masak when would you ever need that?
17:47 masak sounds like that would go against the flow of the dependency.
17:48 TimToady only if you have a Liskovian problem
17:49 TimToady case in point, suppose you want a temp %*ENV that deletes some entries as well as adds some
17:49 kaare__ joined #perl6
17:49 TimToady but delegates the keys you don't care about to the outer %*ENV
17:50 TimToady currently the only way to do that is by copying the whole outer %*ENV
17:51 TimToady more generally, temporizing is for making hypotheses, and sometimes you want to hypothesize the absence of something
17:53 diakopter tadzik: I've never tried panda.
17:55 TimToady so it seems to me that the inner hash must at least support an element type of Nil, to say "There's no value under this key, and don't bother trying my ancestral hash"
17:56 diakopter seen in enterprise software trying to be smart: "Story223 - an User Story" (where User Story is a named type of something)
17:56 aloha in enterprise software trying to be smart: "Story223 - an User Story" (where User Story is a named type of something) was last seen in  15546 days 17 hours ago .
17:56 timotimo :D
17:56 flussence wat.
17:56 TimToady speaking of "trying to be smart"
17:57 PerlJam joined #perl6
17:57 timotimo seen schrödingers cat, alive
17:57 aloha schrödingers cat, alive was last seen in  15546 days 17 hours ago .
17:57 timotimo seen schrödingers cat, dead
17:57 aloha schrödingers cat, dead was last seen in  15546 days 17 hours ago .
17:57 timotimo well, that's somewhat expected, but also somewhat surprising
17:57 tadzik diakopter: cool. Do you want to? :)
17:58 diakopter I'll show you anuserstory..
17:59 diakopter tadzik: will you be online 9 hours from now?
18:00 tadzik diakopter: I don't think so
18:00 diakopter I might be able to do it without help
18:00 tadzik if it doesn't Just Work with 'perl6 bootstrap.pl', then it means I've failed, and that's a valueable information
18:01 p6eval joined #perl6
18:01 diakopter tadzik: wait, offline-bootstrap branch of what?
18:01 tadzik diakopter: panda. https://github.com/tadzik/panda
18:01 diakopter ohh; I assumed rakudo
18:01 * diakopter clones
18:02 tadzik 59 modules ok, 47 not ok (106 total)
18:02 tadzik yay
18:02 tadzik there are few regressions compared to pre-toqast; I'll try to crank out a tool which will compare two resultsets
18:03 tadzik http://tjs.azalayah.net/index.html
18:03 diakopter I get two copies of the error: ===SORRY!===
18:03 diakopter Could not find Shell::Command in any of: , , C:\Users\mwilson/.perl6/lib, C:/Par
18:03 diakopter rot/lib/parrot/4.6.0-devel/languages/perl6/lib
18:03 uvtc joined #perl6
18:03 moritz I guess MIME::Base64 doesn't have my patcha pplied yet
18:04 moritz diakopter: did you run bootstrap.pl?
18:04 diakopter that was from running bootstrap.pl
18:04 tadzik that means I've screwed up :)
18:04 moritz oh
18:04 moritz any of: , ,
18:04 moritz looks like there are some empty elements in there
18:04 moritz diakopter: are there any warnings before that?
18:04 diakopter no, just two copies of that error
18:04 tadzik it should contain at least 4 elements
18:05 uvtc At http://doc.perl6.org/type/Cool , I notice that, in the listing of of built-in types that inherit from Cool, among them is "Baggy". What is a Baggy?
18:05 tadzik (see https://github.com/tadzik/panda/blob/offline-bootstrap/bootstrap.pl#L22)
18:05 quietfanatic Something that's "like" a Bag?
18:05 moritz uvtc: a common base type for Bag and KeyBag
18:05 moritz iirc
18:05 diakopter oh wait.
18:06 diakopter the second copy of that error has only one comma where the first has , ,
18:06 uvtc It seems out of place there. I think "baggy" is an adjective, but "baggie" is the noun.
18:06 uvtc moritz: thanks.
18:06 diakopter oh wait.
18:06 diakopter and different paths.
18:06 moritz tadzik: offline-bootstrap.pl works for me
18:06 tadzik great
18:06 diakopter tadzik: https://gist.github.com/3177595
18:07 tadzik diakopter: is it any better on master?
18:08 quietfanatic Is there any place Bags are used in the standard setting?
18:08 tadzik I don't think so
18:08 diakopter tadzik: https://gist.github.com/3177604
18:08 quietfanatic so basically, they're there in case somebody wants them
18:09 quietfanatic if that's so, can I have Vectors? :)
18:09 sorear good * #perl6
18:09 moritz quietfanatic: yes, in modules :-)
18:09 phenny sorear: 11:53Z <colomon> tell sorear I've got working .tc, .tclc, .tcuc modulo the substr bug, but my implementations are ugly.
18:09 sorear phenny: tell colomon cool!
18:09 phenny sorear: I'll pass that on when colomon is around.
18:10 quietfanatic then why aren't Bags in a module?  <-- is playing troublemaker again
18:10 moritz quietfanatic: I'd be all for it
18:10 uvtc phenny, tell TimToady noticing Baggy listed at http://doc.perl6.org/type/Cool , isn't "baggy" an adjective and, with "baggie" being the (er, possibly-trademarked?) noun?
18:10 phenny uvtc: I'll pass that on when TimToady is around.
18:10 quietfanatic I may be biased because of my areas of interest, but I have seen a lot more real code using vectors than bags.
18:10 tadzik so it gets further on master. Thanks diakopter, I'll try to figure out what's happening
18:11 tadzik oh
18:11 diakopter tadzik: I can install wget if you like
18:11 tadzik diakopter: that'll help, yes
18:13 * diakopter downloads from http://users.ugent.be/~bpuype/wget/
18:13 tadzik uh-oh
18:13 tadzik may that be that windows wants / to be \? :/
18:14 moritz that wouldn't explain why the first @*INC entry is empty
18:14 diakopter actually I think paths passed to windows api will take / too, but paths in the shell need \
18:14 flussence r: qp{/foo/bar}
18:14 p6eval rakudo ed269f: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<{ }>, couldn't find final '}' at line 2, near "/foo/bar}"␤»
18:15 flussence r: q:p{/foo/bar}
18:15 p6eval rakudo ed269f: OUTPUT«===SORRY!===␤Colons may not be used to delimit quoting constructs at line 2, near ":p{/foo/ba"␤»
18:15 TimToady Vectors are likely to fall out of a real implementation of S09
18:15 phenny TimToady: 18:10Z <uvtc> tell TimToady noticing Baggy listed at http://doc.perl6.org/type/Cool , isn't "baggy" an adjective and, with "baggie" being the (er, possibly-trademarked?) noun?
18:15 flussence :(
18:16 flussence n: q:p{/foo/bar}
18:16 p6eval niecza v19-13-g442e075:  ( no output )
18:16 flussence n: say (q:p{/foo/bar}).perl
18:16 p6eval niecza v19-13-g442e075: OUTPUT«"/foo/bar".IO␤»
18:16 flussence niecza++
18:17 diakopter tadzik: https://gist.github.com/3177655
18:17 diakopter (master)
18:17 flussence n: say q:p:to{blah}␤    /foo/bar␤blah␤
18:17 p6eval niecza v19-13-g442e075: OUTPUT«"    /foo/bar\n".IO␤»
18:17 quietfanatic TimToady: including behvior such as dot products, getting the magnitude and angle of vectors, and things like that?
18:17 [Coke] pmichaud++
18:17 quietfanatic TimToady: I mean spatial vectors, not vectors that are actually just arrays.
18:18 flussence n: say q:p:win{c:\foo\bar}
18:18 TimToady I know
18:18 p6eval niecza v19-13-g442e075: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Unrecognized quote modifier: win at /tmp/peO4wiC6dT line 1:â�¤------> [32msay q[33mâ��[31m:p:win{c:\foo\bar}[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1402 (die @ 5) â�¤  at /ho…
18:18 TimToady but they're still multidimensional, which is S09
18:18 moritz flussence: I don't think anybody does qp, except the spec
18:19 TimToady I suppose spatial vectors can be emulated with a single dimension
18:19 quietfanatic A vector is implemented by just a one-dimensional list of numbers
18:19 quietfanatic but it has a lot of extra behavior
18:19 TimToady anyway, the only reason it's not there is because of low demand (so far)
18:19 quietfanatic Have you had any demand for Bags?
18:20 TimToady sure, was looking at an RC task today that wants Bags
18:20 TimToady http://rosettacode.org/wiki/Dutch_national_flag_problem
18:21 TimToady a terribly practical problem, as you can see :)
18:21 quietfanatic right
18:21 je joined #perl6
18:22 quietfanatic what about the problem of every mathematics, physics, graphics, and game library implements their own vectors and they're all incompatible?
18:22 quietfanatic C++ has this problem way up the wazoo.
18:22 quietfanatic In C++ the only solution is to create your *own* vector type that supersets and subsets them all.
18:22 TimToady despite moritz++'s taunting, I'm all for having Vector as a builtin
18:23 TimToady a role, perhaps
18:23 quietfanatic hm
18:23 TimToady fits in with my notion that universal math doesn't belong behind a 'use Math'
18:24 quietfanatic Despite all the complaining I've just done, I apparently have made little real thought about a solution. :)
18:24 * TimToady hates languages that make you say 'use Math' or some such
18:24 tadzik diakopter: ok, thansk
18:24 quietfanatic Probably it'd have to be a parametric role taking a number of dimensions as an argument
18:24 tadzik that means that your prove is too old, ftr
18:25 Juerd TimToady: *All* of math should be built-in?
18:25 Juerd It's a rather broad subject
18:25 quietfanatic except cross-product only works on Vec3s...
18:25 diakopter tadzik: me?
18:25 moritz including symbolic calculations please
18:25 tadzik yep
18:25 tadzik I think so, at least
18:25 quietfanatic For the record, I wouldn't mind saying use Vectors; if it's in the standard library.
18:25 TimToady note, vectors are also in RC: http://rosettacode.org/wiki/Vector_products#Perl_6
18:25 diakopter hm, I just downloaded this perl from activestate yesterday
18:25 skids pmichaud: note that removing the old S07 removes the material on coroutines, and that is referenced from S17 as being in S07.
18:25 tadzik maybe I'm wrong then
18:26 tadzik oh, -p
18:26 tadzik not -e
18:26 masak quietfanatic: cross products working on Vec3s is a kind of categorical error turned into a feature. :)
18:26 masak quietfanatic: the result should really be a 3x3 array...
18:26 tadzik I don't know what's going on then
18:26 TimToady which is why we want S09
18:27 quietfanatic masak: How does that get turned into a 3-dimensional (pseudo-)vector?
18:27 flussence r: enum NL <red white blue>; my @things = NL.enums.keys.roll(20); say @things.sort({ NL::{$_}.value }).perl; # golf please :)
18:27 p6eval rakudo ed269f: OUTPUT«("red", "red", "red", "red", "red", "red", "red", "red", "white", "white", "white", "white", "white", "white", "blue", "blue", "blue", "blue", "blue", "blue")␤»
18:28 quietfanatic TimToady: S09 for PDLish things?
18:28 icwiener_ joined #perl6
18:28 quietfanatic TimToady: I think Vectors tend to like to be compact and fast.
18:28 TimToady for anything multi-dimensional, including PDL
18:28 TimToady well, compact is orthogonal to S09 mostly, but yes
18:29 quietfanatic TimToady: Also if you do any GPU programming, you may begin to think that vectors should even be native types.
18:29 TimToady I guess compact stuff is discussed in S09 as well
18:29 masak quietfanatic: like this: https://upload.wikimedia.org/wikipedia/en/math/b/9/9/b994c9a58aa159ffe32042b697179d13.png
18:29 TimToady I can't begin to think that, since I thought it long ago :P
18:30 quietfanatic masak: Agh, my background is dark and the image is transparent
18:30 diakopter hm, this activeperl's cpan is totally broken; what a surprise
18:30 masak heh :)
18:30 quietfanatic brb
18:31 * masak .oO( the night is dark and filled with terrors )
18:32 quietfanatic Not only that, it's antialiased for a white background and the antialiasing is non-transparent
18:32 quietfanatic making the transparent background all but useless
18:32 jnthn pmichaud: At a first pass through your S07 commit, it looks good.
18:34 quietfanatic Actually, even in CPU-land there are SIMD registers and instructions that make native vectors make a lot of sense.
18:34 quietfanatic GPUs even have native matrices though.  That's just a little too much IMO :)
18:35 * moritz very much liked that a GPU sped up his simulations by a factor ~60
18:35 TimToady well, hypers are meant to map normal parallelism onto GPUs and such, so you could do a bunch of those little GPU matrices in parallel
18:36 quietfanatic Unless you're doing a lot of computations with them, the overhead of sending the to and from the GPU wouldn't be worth it.
18:36 quietfanatic and trying to detect whether it's worth it is a very brave optimization strategy
18:37 * flussence is reading the current S16 and slowly, horribly realises it seems to be trying to implement most of libnss
18:38 TimToady a good place for a hotspot analyzer to try it both ways and see which is faster
18:38 masak flussence: all careful readings of the current S16 will lead to slow, horrible realizations.
18:38 quietfanatic Assuming it knows the size of the usage in advance.
18:39 quietfanatic s/size/scale
18:40 TimToady hypers generally know the size of what they're dealing with, since they're not generally used over lists, for which X and Z are more appropriate
18:40 quietfanatic But the size has to be known all the way back at optimization time even.
18:41 TimToady hotspot optimization is JIT
18:41 quietfanatic huh
18:41 quietfanatic I see...
18:41 TimToady but even for a normal optimizer, we try to keep the sizes declarative by default
18:42 quietfanatic Oh, right.  That's why it can try it both ways, because it actually is doing the calculation at the same itme
18:42 quietfanatic *time
18:42 quietfanatic I misunderstood that.
18:42 TimToady might even implement it with .race :)
18:43 TimToady well, a race contextualizer, which might or not make sense as a method
18:44 quietfanatic I see.  It's pretty nice when your programming languages are as intelligent as humans.
18:44 TimToady we're not going for minimalism here, in any case :)
18:44 quietfanatic The computer might even be able to run some other programs in the background.
18:44 diakopter all your cores...
18:45 * quietfanatic will try to stop being pessimistic now
18:45 * TimToady is pessimistic about that :)
18:51 Chillance joined #perl6
18:53 [Coke] who owns mildew?
18:53 sorear pmurias
18:55 [Coke] (looks like we have fudges for kp6, mildew, pugs, rakudo, niecza).
18:55 [Coke] wondering if the mildew/kp6 fudges are still needed.
19:02 moritz flussence: ignore S16, S32::IO is the real deal
19:02 moritz flussence: ie the one I'm actually trying to implement
19:02 moritz S16 is doomed to starvation by simply being ignored by those people who matter (ie those who actually implement stuff)
19:08 [Coke] moritz: ... so let's remove it?
19:08 moritz [Coke]: I'm not quite bold enough to do that
19:10 [Coke] <b>moritz</b>
19:10 [Coke] how about now?
19:10 moritz now my nick is bolder.
19:11 moritz anyway, if there's a big majority in here for 'git rm S16-io.pod', I'll do it
19:11 masak there's something to be said for it. the spec would be less confused as a result.
19:11 moritz but it's a case where I ask for permission rather than forgiveness
19:12 moritz I count that as +1 from each <masak moritz [Coke]>
19:12 masak though I'd rather it be replaced by an empty document than removed altogether.
19:12 moritz ok
19:12 TimToady before doing that, I would treat it as an RFC, and ask what pain points it's trying to address
19:12 moritz "please see S32::IO"
19:12 TimToady and do we have a story on those pain points
19:13 TimToady other than "we're a Unix shop, go jump"
19:13 moritz as long as we don't do it on p6l, I'm fine with it
19:13 flussence the bottom half of it can be abbreviated to "is native('libnss')"
19:13 TimToady in any case, we can certainly mark large chunks it as conjectural, or worse
19:14 moritz btw, http://perlcabal.org/syn/S07.html has picked up the new S07
19:15 [Coke] is there a list of valid syn states? baked > conjectural > other baked?
19:15 flussence .oO( baked > half-baked > burnt... )
19:16 moritz airy (like S16), fluid, slushy, solid
19:16 vmspb joined #perl6
19:16 TimToady S16 seems highly charged, so plasma maybe
19:17 fhelmberger joined #perl6
19:20 daxim joined #perl6
19:25 rurban left #perl6
19:28 moritz ok, algorithm question
19:28 moritz I have two array, @a and @b
19:29 moritz and I want to order those elements of @a that appear in @b in the same order as they appear in @b
19:29 moritz the elements in @a but not in @b can be ordered in any way, doesn't matter
19:30 moritz how do I best do that?
19:30 masak ooh, never heard that one before.
19:30 moritz hm, maybe  my %b = @b.kv.reverse; @a.sort({ %h{$_} // 0 })
19:30 moritz masak: it's for p6doc's htmlify.pl
19:31 masak ok.
19:31 moritz masak: I want to process the type docs in MRO
19:31 masak right.
19:31 masak sorting with an appropriate function sounds like a good start.
19:31 masak remember that you can sort several times, too.
19:32 dalek nqp: 6238e27 | jnthn++ | src/ (4 files):
19:32 dalek nqp: Implement multi-dispatch cache in NQP. It was fairly fast without this anyway, but this helps a bit more; we do a lot of multi-dispatch when compiling QAST. Also fixes a memory leak.
19:32 dalek nqp: review: https://github.com/perl6/nqp/commit/6238e27041
19:35 mhasch fwiw, I like the user/group roles in S16 but not the quoting syntax stuff. File names should be data, not program text.
19:40 raiph joined #perl6
19:42 flussence I'm not sure who thought a function to add entries to /etc/passwd baked into the language was a good idea
19:43 moritz different time, different universe :-)
19:43 mhasch I agree; write seems excentric...
19:44 sorear eccentric?
19:44 TimToady not at the center anymore, in any case :)
19:47 * flussence tried to find something comparable in the php func reference, but ended up finding out something worse: it has no $0 equivalent! argh!
19:48 masak :(
19:49 flussence not technically true; it does, but it's *a separate extension*. For one function.
19:49 moritz dazzling new depths indeed
19:52 masak r: my @a = 1, 2, 3, 4, 5, 6; my @b = 5, 4, 3; say @a.sort({ index_of(@b, $_) }); sub index_of(@x, $e) { return (my $i)++ if $_ === $e for @x; return -1 }
19:52 p6eval rakudo ed269f: OUTPUT«1 2 6 3 4 5␤»
19:52 masak oh.
19:52 masak r: my @a = 1, 2, 3, 4, 5, 6; my @b = 5, 4, 3; say @a.sort({ -index_of(@b, $_) }); sub index_of(@x, $e) { return (my $i)++ if $_ === $e for @x; return -1 }
19:52 p6eval rakudo ed269f: OUTPUT«3 4 5 1 2 6␤»
19:52 masak moritz: there. :)
19:53 masak huh, wait :)
19:53 moritz that doesn't look right :-)
19:53 masak r: my @a = 1, 2, 3, 4, 5, 6; my @b = 5, 4, 3; say @a.sort({ -index_of(@b.reverse, $_) }); sub index_of(@x, $e) { return (my $i)++ if $_ === $e for @x; return -1 }
19:53 p6eval rakudo ed269f: OUTPUT«3 4 5 1 2 6␤»
19:53 masak I got them to float to the beginning, but not in the right order...
19:54 moritz r: my @a = <1 2 3 4 5 6>; my @b = <5 3 4>; my %h = @b.kv.reverse; say @a.sort: { %h{$_} // -1 };
19:54 p6eval rakudo ed269f: OUTPUT«3 4 5 6 1 2␤»
19:54 masak heh :)
19:54 masak r: my @a = 1, 2, 3, 4, 5, 6; my @b = 5, 4, 3; say @a.map({ index_of(@b, $_) }); sub index_of(@x, $e) { return (my $i)++ if $_ === $e for @x; return -1 }
19:54 moritz r: my @a = <1 2 3 4 5 6>; my @b = <5 3 4>; my %h = @b.kv.reverse; say %h.perl
19:55 p6eval rakudo ed269f: OUTPUT«-1 -1 0 0 0 -1␤»
19:55 p6eval rakudo ed269f: OUTPUT«("2" => "4", "1" => "3", "0" => "5").hash␤»
19:55 masak hm.
19:55 masak I think that's a Rakudobug.
19:55 moritz r: my @a = <1 2 3 4 5 6>; my @b = <5 3 4>; my %h = @b.kv.flat.reverse; say %h.perl
19:55 masak r: my @a = 1, 2, 3, 4, 5, 6; my @b = 5, 4, 3; say @a.map({ index_of(@b, $_) }); sub index_of(@x, $e) { my $i; return $i++ if $_ === $e for @x; return -1 }
19:56 diakopter hm
19:56 moritz somehow p6eval is very slow
19:56 masak so it would seem.
19:56 p6eval rakudo ed269f: OUTPUT«("4" => 2, "3" => 1, "5" => 0).hash␤»
19:57 p6eval rakudo ed269f: OUTPUT«-1 -1 0 0 0 -1␤»
19:57 masak huh.
19:57 moritz r: my @a = <1 2 3 4 5 6>; my @b = <5 3 4>; my %h = @b.kv.flat.reverse; say @a.sort: { %h{$_} // -1 };
19:57 masak oh, right :)
19:57 masak no, it's me. I'm silly.
19:57 * moritz submits masakbug
19:57 p6eval rakudo ed269f: OUTPUT«1 2 6 5 3 4␤»
19:57 masak r: my @a = 1, 2, 3, 4, 5, 6; my @b = 5, 4, 3; say @a.map({ index_of(@b, $_) }); sub index_of(@x, $e) { return $_ if $x[$_] === $e for ^@x; return -1 }
19:57 moritz anyway, I like that solution better, and it works :-)
19:58 moritz that = mine
19:58 p6eval rakudo ed269f: OUTPUT«===SORRY!===␤Variable $x is not declared␤at /tmp/M2x2cbybj3:1␤»
19:58 masak fair enough :)
19:58 masak r: my @a = 1, 2, 3, 4, 5, 6; my @b = 5, 4, 3; say @a.map({ index_of(@b, $_) }); sub index_of(@x, $e) { return $_ if @x[$_] === $e for ^@x; return -1 }
19:58 p6eval rakudo ed269f: OUTPUT«-1 -1 2 1 0 -1␤»
19:58 masak moritz: I think your solution is doing with a hash what mine is doing with a function.
19:58 masak r: my @a = 1, 2, 3, 4, 5, 6; my @b = 5, 4, 3; say @a.sort({ -index_of(@b, $_) }); sub index_of(@x, $e) { return $_ if @x[$_] === $e for ^@x; return -1 }
19:58 moritz masak: so it seems
19:58 p6eval rakudo ed269f: OUTPUT«3 4 5 1 2 6␤»
19:59 masak dangit! :)
19:59 moritz masak: you sort by -index_of
20:00 moritz masak: that's why it reverses the order
20:00 _daniel-s__ joined #perl6
20:02 dalek doc: 873f1b2 | moritz++ | htmlify.pl:
20:02 dalek doc: [htmlify] generate type docs in MRO order
20:02 dalek doc:
20:02 dalek doc: this does not really improve anything, but it will make it easier to
20:02 dalek doc: include docs for methods from superclasses and roles
20:02 dalek doc: review: https://github.com/perl6/doc/commit/873f1b2faf
20:03 moritz r: my @a = 1, 2, 3, 4, 5, 6; my @b = 5, 4, 3; say @a.sort: &index_of; sub index_ok($e) { return $_ if @b[$_] === $e for ^@b; -1 }
20:03 p6eval rakudo ed269f: OUTPUT«No such method 'Nil' for invocant of type 'Parcel'␤  in <anon> at src/gen/BOOTSTRAP.pm:808␤  in <anon> at src/gen/BOOTSTRAP.pm:805␤  in any <anon> at src/gen/BOOTSTRAP.pm:800␤  in block  at src/gen/CORE.setting:5512␤  in method sort at src/gen/CORE.setting:5506␤  i…
20:03 moritz r: my @a = 1, 2, 3, 4, 5, 6; my @b = 5, 4, 3; say @a.sort: &index_of; sub index_of($e) { return $_ if @b[$_] === $e for ^@b; -1 }
20:03 p6eval rakudo ed269f: OUTPUT«1 2 6 5 4 3␤»
20:03 moritz finally
20:03 masak there we are.
20:03 masak and if you want them first,
20:03 birdwindupbird joined #perl6
20:04 masak r: my @a = 1, 2, 3, 4, 5, 6; my @b = 5, 4, 3; say @a.sort: &index_of; sub index_of($e) { return $_ if @b[$_] === $e for ^@b; Inf }
20:04 p6eval rakudo ed269f: OUTPUT«5 4 3 1 2 6␤»
20:04 masak \o/
20:04 diakopter anyone know what's the nqp equivalent of pir::delete(%hash, 'key')
20:06 moritz nqp::deletekey
20:06 Bucciarati joined #perl6
20:06 diakopter excellent; thanks
20:09 masak [Coke]: I think you just got competition: https://gist.github.com/3034482
20:10 * masak .oO( more competition! )
20:10 bruges_ joined #perl6
20:11 [Coke] masak: can we get an official count in that gist? ;)
20:12 flussence ooh, gcc 4.7 has hyperoperators (sorta). http://gcc.gnu.org/gcc-4.7/changes.html → Language specific improvements → C family
20:14 moritz masak: for interactive programs as crypt (or the one I'll maintain for $new_work soon :-) I think it would be nice to record all user-provided commands, and then have a 'trace' command (or so) to print them back to the user (more)
20:14 thou gotta say that S07 doc is really nice to read. thanks pmichaud++!
20:15 moritz masak: and then a command line option which accepts such a trace, and reproduces the same behavior as if you'd entered it manually
20:16 moritz masak: it's probably overkill for crypt, but something I'd do in any heavy-used, semi-interactive command line program
20:16 masak [Coke]: it's not the *number* of bugs, it's "The most insane, creative, simply up-the-wall fruit-bat bananas mis-use of the game". :)
20:16 [Coke] ahhh.
20:16 masak [Coke]: so far your "add disk to win" bug was that one.
20:17 masak now I think you tie with Bruce on... something.
20:17 masak moritz: yes, that does sound nice.
20:17 [Coke] feather1's installed perl6:
20:17 [Coke] This is Rakudo Perl 6, version 2010.08 built on parrot 2.7.0
20:18 masak bit old, no?
20:18 moritz "bit" :-)
20:18 moritz is that alpha?
20:18 flussence installed as in package-managey-installed?
20:18 moritz probably not. Feather is a mess :-)
20:18 [Coke] flussence: no.
20:19 moritz $ which perl6
20:19 moritz /usr/local/bin/perl6
20:19 [Coke] as in "make install", no doubt.
20:19 moritz oh, we still have /usr/local/bin/incredibly_ugly_hack_to_restart_apache
20:20 flussence (most distro-packaged rakudos seem to be ancient from what I've seen...)
20:20 uvtc Current practice for both Rakudo and Rakudo Star is to run `make install`, which installs `perl6` somewhere into the current project directory, correct?
20:21 sorear correct
20:21 moritz uvtc: it installs into ./install unless you configured it with a different --prefix
20:21 uvtc sorear: moritz : gotcha. Thanks.
20:21 moritz which seems to be a saneish default
20:22 uvtc I agree. I like for it to live in its own world in ~/opt/rakudo.
20:22 flussence (wow, someone in gentoo is on the ball. rakudo is only 1 month out of date and it's correctly split into rakudo/nqp/parrot pkgs now)
20:24 uvtc My understanding was that a given release of Rakudo has a specific release of Parrot it's supposed to be used with.
20:24 uvtc So, having them live together under one roof
20:24 uvtc seemed to make sense.
20:25 uvtc That is to say, if you upgraded Parrot but not Rakudo (or vice versa), something might go amiss.
20:25 [Coke] yes, but that's a common issue with packaging, no?
20:26 [Coke] given you might have multiple things installed that depend on parrot.
20:27 uvtc Yes, a common issue. Also, I agree that you might have multiple things which depend upon Parrot. I recall a while back when I was trying out Rakudo,
20:27 uvtc I built parrot first, in a separate directory,
20:28 uvtc but then it was pointed out to me that it's easier to use --gen-parrot.
20:29 lichtkind joined #perl6
20:29 moritz well, the last three rakudo releases all worked on the same parrot revision
20:29 moritz so we do try to ease the pain of the packagers
20:35 TimToady uvtc: Baggy is a role, so the adjectival form is appropriate
20:36 uvtc TimToady: Oh, I see, thanks.
20:39 uvtc Just grabbed the latest rakudo and tried to build, but it failed somewhere into the `perl Configure.pl --gen-parrot --gen-nqp` stage.
20:39 uvtc Have never tried building from HEAD, but saw this http://perl6maven.com/tutorial/perl6-installing-rakudo
20:39 uvtc and thought I'd give it a try.
20:39 uvtc The error I get is:
20:39 uvtc make: *** [src/stage1/NQPCORE.setting.pbc] Error 1
20:39 uvtc Command failed (status 512): make
20:39 uvtc Command failed (status 512): /usr/bin/perl Configure.pl --with-parrot=/home/john/opt/rakudo/install/bin/parrot --make-install
20:40 [Coke] utvc can you gist a few dozen lines before that?
20:42 uvtc sure: https://gist.github.com/3178556
20:44 moritz eeks, that the old GC-gone-wild thing :(
20:44 flussence .oO( why is it always a single char? )
20:45 moritz r: say Int ~~ Cool
20:45 p6eval rakudo ed269f: OUTPUT«True␤»
20:46 moritz ah, the Cool docs don't have a proper list of methods yet
20:46 * moritz has a patch that includes methods from superclasses and roles in the HTML output
20:46 masak moritz++
20:48 dalek doc: eee7a83 | moritz++ | htmlify.pl:
20:48 dalek doc: [htmlify] Include methods from superclasses, roles
20:48 dalek doc:
20:48 dalek doc: Also removes some debugging output
20:48 dalek doc: review: https://github.com/perl6/doc/commit/eee7a835e9
20:48 moritz and the surprising thing is: it took me only about a quarter of an hour
20:48 moritz and htmlify still runs in <5min on my slow machine
20:48 masak unacceptable! go back and do it slower! :P
20:49 moritz http://doc.perl6.org/type/Int
20:49 moritz for example
20:49 moritz or http://doc.perl6.org/type/Array
20:50 * moritz -> sleep
20:53 masak guten n8, moritz. dream of superclasses and roles in the HTML output.
20:59 benabik joined #perl6
21:00 masak do cars have floors? what do they have?
21:02 cotto joined #perl6
21:02 uvtc They have an over-undercarriage.
21:02 flussence carpets
21:02 benabik floors, on which they have floor mats
21:02 masak excellent. thanks.
21:02 huf random americans and canadians i asked said floor(|board)
21:02 masak this is for the game descriptions.
21:02 masak I'm putting water in the car.
21:02 flussence that'll ruin the upholstery!
21:03 huf surely it's down..
21:03 uvtc left #perl6
21:03 uvtc joined #perl6
21:03 masak thinking I'll go with "What doesn't discolor the seats collects in miserable little puddles on the floor mats."
21:04 * masak likes having a miniature narrative universe to play around in :)
21:07 masak 2**7 tests in crypt! \o/
21:09 lichtkind raiph: hai
21:10 masak phenny: no en "hai"?
21:10 phenny masak: "shark" (no to en, translate.google.com)
21:10 raiph lichtkind: lo
21:10 phenny raiph: 22 Jul 05:52Z <moritz> tell raiph that he now has direct commit access to perl6/doc on github. Welcome!
21:10 geekosaur shark with norovirus?
21:11 masak geekosaur: norovirus and a "lazer" on its head. :)
21:11 masak and it's having a bad day.
21:21 uvtc left #perl6
21:32 Coleoid joined #perl6
21:51 TimToady new RC entry: http://rosettacode.org/wiki/Dutch_national_flag_problem#Perl_6
21:53 TimToady the Bag entry is a bit suboptimal because I didn't discover how to get replication directly from a Bag
21:53 TimToady maybe I should read the documentation...
21:53 masak if it isn't spec'd, we should probably spec it.
21:55 TimToady rn: say bag(<a a b b b c>).list
21:55 p6eval rakudo ed269f, niecza v19-13-g442e075: OUTPUT«a b c␤»
21:56 TimToady rn: say bag(<a a b b b c>).flat
21:56 p6eval rakudo ed269f: OUTPUT«a 2 b     3 c     1␤»
21:56 p6eval ..niecza v19-13-g442e075: OUTPUT«a b c␤»
21:56 TimToady rn: say bag(<a a b b b c>).elements
21:56 p6eval rakudo ed269f: OUTPUT«No such method 'elements' for invocant of type 'Bag'␤  in block  at /tmp/VEs5aeT4pt:1␤␤»
21:56 p6eval ..niecza v19-13-g442e075: OUTPUT«Unhandled exception: Unable to resolve method elements in type Bag␤  at /tmp/HLwUzzieOE line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3918 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3919 (module-CORE @ 562) ␤  at /ho…
21:56 TimToady maybe I should read the code, horrors
21:56 dalek nqp: 54df5ca | jnthn++ | src/QAST/ (2 files):
21:56 dalek nqp: Make the code refs list generation a bunch more efficient. Shaves a little more off CORE.setting compilation.
21:56 dalek nqp: review: https://github.com/perl6/nqp/commit/54df5ca709
21:58 TimToady rn: say bag(<a a b b b c>)
21:58 p6eval rakudo ed269f, niecza v19-13-g442e075: OUTPUT«bag("a" => 2, "b" => 3, "c" => 1)␤»
21:58 masak .elements? when all other classes do .elems?
21:58 TimToady rn: say bag(<a a b b b c>).elems
21:58 p6eval rakudo ed269f, niecza v19-13-g442e075: OUTPUT«6␤»
21:58 TimToady I'm trying to get <a a b b b c> back out of it
21:59 masak .pairs
21:59 masak rn: say bag(<a a b b b c>).pairs
21:59 p6eval rakudo ed269f: OUTPUT«a 2 b     3 c     1␤»
21:59 p6eval ..niecza v19-13-g442e075: OUTPUT«"a" => 2 "b" => 3 "c" => 1␤»
22:00 jnthn r: say bag(<a a b b b c>).pairs.map(*.key xx *.value)
22:00 p6eval rakudo ed269f: OUTPUT«No such method 'Int' for invocant of type 'WhateverCode'␤  in sub infix:<xx> at src/gen/CORE.setting:5638␤  in block  at /tmp/fc1D00u0t1:1␤␤»
22:00 jnthn ah, xx doesn't do that, does it...
22:00 jnthn r: say bag(<a a b b b c>).pairs.map({ .key xx .value})
22:00 p6eval rakudo ed269f: OUTPUT«a a b b b c␤»
22:00 jnthn Feels like there should be a method that does that for you though.
22:00 TimToady .list used to do that, but when we made bags not flatten in list context, we didn't add a way to do that
22:01 TimToady how'bout .xx
22:01 jnthn ;)
22:01 jnthn Temptingly cute (today) :)
22:01 masak feels like a category mistake :)
22:01 pmichaud I suspect that .list could still do that
22:01 masak aye.
22:01 TimToady it really clobbers up your sets of sets if they flatten too eagerly
22:02 pmichaud flattening is (currently) determined by being Iterable; not by the return/presence of .list (more)
22:02 pmichaud for example, match objects have .list but don't flatten either
22:03 TimToady well, just so set( set(@a), set(@b) ) ends up with 2 elements
22:03 jnthn Wow...the optimize phase went from 7.49% of CORE.setting compile time down to 2.52%.
22:03 * pmichaud decides to build the new qasted rakudo
22:03 TimToady .xx makes less sense on a set, I'll grant
22:04 TimToady .members maybe
22:04 pmichaud .values could work, too.
22:04 TimToady not on a bag
22:05 TimToady both sets and bags are specced to behave like Hash for hashy functions
22:05 pmichaud okay.
22:05 TimToady so keys returning <a b c> is correct for the bag above
22:06 * TimToady just wonders if .members is a bit long huffmanwise
22:08 TimToady thing is, .keys works fine on a set
22:08 TimToady it's only a bag that needs to distinguish, so maybe .keys vs .xx is okay
22:09 TimToady it's just if you use .xx on a set, it's only going to have 0 or 1 on the right :)
22:10 masak .keys Zxx .values # :)
22:10 lue joined #perl6
22:10 lue hello world o/
22:10 masak lue! \o/
22:13 lue did you catch my pull request?
22:15 Entonian joined #perl6
22:15 masak oh! no, but I will now.
22:16 * masak is notoriously bad at keeping up with github notifications
22:16 lue me too (got around 96 or so, because I haven't bothered deleting them)
22:19 masak lol, I blogged! \o/ http://strangelyconsistent.org/blog/july-25-2012-putting-out-the-fire
22:25 diakopter TimToady: I ended up using cloning then iterating keys and comparing with the parent at the end stage of each level
22:26 lue oh, masak: I can't examine the items in my inventory at the moment.
22:26 * masak cherry-picks in lue++'s commit
22:26 pmichaud I get a spectest failure in nom (in substr.t)
22:27 pmichaud No such method 'chrs' for invocant of type 'Parcel' in block  at t/spec/S32-str/substr.rakudo:68
22:27 jnthn Hmm...when'd that creep in
22:27 masak lue: correct, I haven't prioritized the 'inventory' command. it's not in the critical path of winning the game.
22:27 masak lue: I plan to put it in before the month is over.
22:27 lue "> put helmet on me \n You cannot put things on the me."
22:28 masak :)
22:28 lue understandable, it really isn't critical in this game.
22:28 masak lue: I'll note that as a clever mis-use of the game. (which should clearly be implemented.)
22:28 masak lue: congratulations, you're also now eligible for a book.
22:28 masak (keep the bugs coming!)
22:29 lue I just like the "on the me" part of that sentence :)
22:29 masak yeah, that's cute.
22:29 masak (and wrong)
22:30 jnthn r: (0x10426, 0x10427).chrs
22:30 p6eval rakudo ed269f: OUTPUT«No such method 'chrs' for invocant of type 'Parcel'␤  in block  at /tmp/pxt1Gxkc9D:1␤␤»
22:30 jnthn t: (0x10426, 0x10427).chrs
22:30 p6eval toqast : OUTPUT«No such method 'chrs' for invocant of type 'Parcel'␤  in block  at /tmp/zorjTNhUaQ:1␤␤»
22:30 jnthn n: (0x10426, 0x10427).chrs
22:30 p6eval niecza v19-13-g442e075:  ( no output )
22:30 * lue found another one, putting on gist...
22:30 diakopter what's chrs
22:30 timotimo would it turn integers into characters?
22:30 jnthn pmichaud: Likes like a new test added by colomon
22:31 diakopter maybe he meant chars?
22:31 jnthn *Looks
22:31 jnthn Well, niecza accepts it/runs it.
22:31 masak diakopter: .chrs does .chr on each character in the string.
22:31 * diakopter shuts up
22:31 jnthn Either that means it's spec and we should fudge this new test for Rakudo until we implement this, or it's not spec and the test shouldn't be there.
22:32 jnthn masak: No, .chr goes from code point (integer) to string
22:32 jnthn r: say 69.chr
22:32 p6eval rakudo ed269f: OUTPUT«E␤»
22:32 lue https://gist.github.com/3179112 # And here I thought I'd report the yo dawg error message falsely implied I successfully put the helmet in the helmet
22:32 jnthn r: say "lol".ords
22:32 p6eval rakudo ed269f: OUTPUT«108 111 108␤»
22:32 jnthn I'm guessing the idea is chrs is the opposite of .ords
22:33 jnthn r: say [0x10426, 0x10427].chrs
22:33 p6eval rakudo ed269f: OUTPUT«????????␤»
22:33 jnthn Looks like it may be implemented in the wrong place or not in Cool in Rakudo.
22:33 seldon joined #perl6
22:36 pmichaud if it's an operation on an array/list, it typically goes into Any
22:37 pmichaud (see .join, .sort, etc.)
22:37 lue masak: I put another game error in the gist above
22:37 pmichaud n:  say (65, 69, 76, 76, 79).chrs
22:37 p6eval niecza v19-13-g442e075: OUTPUT«AELLO␤»
22:38 obra joined #perl6
22:38 sorear o/ obra
22:38 jnthn pmichaud: aye
22:38 jnthn OK, time for some rest.
22:38 jnthn If I can sleep :/
22:38 jnthn 'night, #perl6
22:39 pmichaud jnthn++ # merging new qast implementation into nom
22:39 masak lue: oh!
22:39 masak lue: well, 'examine helmet' is wrong independently of what you did with it before that.
22:40 masak lue: I've simply forgotten to add the description for it in game-data/descriptions.
22:40 masak fixing right away. lue++
22:40 lue well, then in that case the yo dawg error message implies that I get the object in the object anyway (not that it matters too much though).
22:41 pmichaud afk, soccer
22:41 pmichaud bbl
22:41 masak lue: what should it say, in your opinion?
22:41 masak I thought it was common knowledge that you can't actually put things in themselves :P
22:42 lue I don't think there's a better message, my brain was being a bit too nitpicky.
22:44 lue (my favorite form of the meme however is "Yo dawg, I heard you like $objects, so I put an $object in your $object so you can $action while you $action")
22:46 whiteknight joined #perl6
22:46 sorear This is a potion bottle, not a Klein bottle!
22:46 sorear That would be an interesting topological exercise.
22:47 masak lue: yes, but there's no good way to autogenerate $action :)
22:47 masak sorear! \o/
22:47 * lue considers creating an "object tree" viewer in the game and then disabling the YoDawg error to see what the game's object tree looks like afterward
22:47 sorear are there any other recovering nethack addicts in the channel?
22:48 masak I've delved into Nethack occasionally, though I never got hooked on it.
22:48 masak Angband, however. oh boy.
22:48 sorear yes, well
22:48 sorear angband does not have containers.
22:49 masak it has chests.
22:49 sorear so I can't give you the container-in-self error message from there
22:49 sorear you can't put stuff _in_ chests though
22:49 masak troo.
22:49 lue .oO(I've played both, angband more seriously than nethack)
22:49 sorear the game cheats - a chest is a once-usable item generator
22:49 masak aye.
22:50 sorear have you played a version of angband recent enough to have my name on the credits?
22:50 masak probably. though I haven't looked for your name there.
22:50 masak what'd you do?
22:52 sorear cage cleaning and assorted minor features
22:52 sorear I forget all
22:52 crab2313 joined #perl6
22:53 masak ok.
23:09 mucker joined #perl6
23:18 [Coke] OOC, anyone else here diabetic?
23:18 diakopter pre-
23:20 lue I can't start the names of modules and classes with numbers, can I?
23:21 masak lue: identifiers in general must start with an alphabetic or an underscore. not a digit.
23:21 lue :( [ 6502::Assembler is the best name I can come up with though ]
23:22 diakopter :P
23:22 [Coke] Assembler:6502 makes more sense. ;)
23:22 seldon MOS6502::Assembler?
23:22 masak Assembler::SixtyFiveOhTwo
23:23 lue ooh! (MOS6502)
23:23 dalek Pugs.hs: f0f0053 | coke++ | / (3 files):
23:23 dalek Pugs.hs: ucfirst is gone, replaced by tc.
23:23 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/f0f00538ea
23:24 lue although, if a lot of assemblers were to come out in Perl 6, Assembler::6502 might make more sense
23:24 * lue checks CPAN for guidance from the past
23:26 seldon I once had to find a classname for 30/360.
23:26 diakopter BSOUT = $FFD2
23:27 masak lue: I plan to make an implementation of the untyped lambda calculus.
23:27 masak somewhat easier to name.
23:27 masak look forward to using greek letters in some of the method names, though :)
23:28 lue The format in P5-land seems to be Asm::cpu. I think I'll go with Asm::6502, at least for now.
23:28 lue (I briefly considered _6502::Assembler after getting my question about identifiers answered)
23:29 masak std: module Asm::6502;
23:29 p6eval std d5bea92: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse module definition at /tmp/_crXkdoRuL line 1:â�¤------> [32mmodule Asm::[33mâ��[31m6502;[0mâ�¤    expecting any of:â�¤    nameâ�¤   traitâ�¤Parse failedâ�¤FAILED 00:00 40mâ�¤Â»
23:29 masak you can't.
23:30 lue .emotion("NO!", :big);
23:31 lue std: module Asm::_6502;
23:31 p6eval std d5bea92: OUTPUT«ok 00:00 40m␤»
23:32 diakopter std: module Asm6502
23:32 p6eval std d5bea92: OUTPUT«Use of uninitialized value $x in pattern match (m//) at STD.pm line 66582.�Use of uninitialized value $x in concatenation (.) or string at STD.pm line 66621.�[31m===[0mSORRY![31m===[0m�Unable to parse module definition at /tmp/8f1fGg1hvD line 1 (EOF):�------> [3…
23:32 diakopter std: module Asm6502;
23:32 p6eval std d5bea92: OUTPUT«ok 00:00 40m␤»
23:32 seldon masak: Do you mean to make something like $λx.α(x => y) ?
23:34 masak seldon: something like that, yes.
23:34 seldon I look forward to reading your code, then.
23:35 masak I'll probably put arithmetic expressions in, with infix:<+> and infix:<*> and infix:<**>. and implement it first with Int, and then with Church numerals, just to show it's possible.
23:36 kst joined #perl6
23:36 seldon Much of that can be done with * though, can't it?
23:36 masak the wikipedia page -- https://en.wikipedia.org/wiki/Lambda_calculus -- makes it seem like there are lots of degrees of freedom when it comes to reduction strategies.
23:36 masak seldon: what do you mean?
23:36 seldon Assembly of anonymous function objects.
23:37 masak yes, but that's not the point. :)
23:37 masak the lambda calculus is purely *string* manipulation.
23:37 masak it's parsing a string in a certain way, and then allowing a small set of operations on the data structure that results.
23:38 masak and each operation results in a new string, a new legal lambda expression.
23:39 seldon And you want to be able to prove that function f and g are equivalent, that sort of thing?
23:39 masak no, I just want to implement the lambda calculus.
23:40 seldon You'd end up being able to do it, though, which intrigues me.
23:40 masak well, you can prove that f and g are α-equivalent or β-equivalent, I guess.
23:42 masak I don't really grok η-conversion yet, I'm afraid.
23:43 seldon That's the most interesting one, if I have my greek letters right.
23:44 masak :)
23:45 masak it would seem to me that η-equivalence would by necessity run up against the Halting Problem.
23:45 sorear beta is the one that gets you into halting trouble
23:45 masak oh.
23:46 sorear (\x.xx)(\x.xx) beta-reduces to itself
23:46 masak aye.
23:46 sorear eta-reduction is just turning sub foo($x) { bar($x) } --> &bar
23:46 masak oh, it's *just* that. then I grok it.
23:47 masak beta-reduction feels like "turn the crank one step".
23:47 sorear scoping is where the lambda calculus really gets gnarly
23:47 masak yeah.
23:47 masak I expect to have lots of tests concerning that. :)
23:48 masak α-conversion seems to be mostly there to create appropriate equivalence classes.
23:48 masak so that you can talk about different β-reductions leading to "the same" result.
23:49 sorear remember that beta-reduction can move terms around in such a way that they see different scopes, and you have to be careful not to create a shadowing
23:49 sorear have you encountered de Bruijn numbering yet?
23:50 masak no, but a quick glance gives me the impression that it's something I'll have a use for.
23:50 masak they basically eliminate the need for α-conversion, it seems.
23:51 masak ok, I see how it works. neat.
23:52 masak it feels in some way like a better way to write lambda calculus expressions.
23:52 masak of course, this way doesn't allow free variables at all, I guess.
23:54 [Coke] you need to $ for them.
23:54 masak :)
23:54 masak any-λ.
23:55 masak 'night, #perl6
23:55 sorear night
23:55 seldon 'night is a good idea.
23:56 [Coke] anyone mind if I s/ucfirst/tc/ in roast ?

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

Perl 6 | Reference Documentation | Rakudo