Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-03-13

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:10 yertalert joined #perl6
00:33 dalek ecosystem: e28fb6a | (Solomon Foster)++ | META.list:
00:33 dalek ecosystem: Add Math::ContinuedFractions.
00:33 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/e28fb6a587
00:33 pjcj joined #perl6
00:51 timotimo what's the shortest/prettiest way for this: multi fib(Int $x where * < 0) { die "negative numbers not allowed"; } ?
00:51 aindilis joined #perl6
00:52 sorear Use a subset type and let the dispatcher error for you
00:52 timotimo when i did that, the dispatching failed, because now the normal implementation and the memoized function became "equally special" to the dispatcher
00:52 timotimo or something
00:53 timotimo (and the error message wasn't pretty. it just said Cannot call 'fib'; none of these signatures match: :(Int $x) :(Int $x)
00:53 japhb timotimo, try not putting a where clause on the error case, just on the success cases.  Then the error case is more general, and would only match when the other ones don't.  Er, I would think.
00:54 timotimo yeah, now i get "these signatures all match"
00:55 timotimo i have subset Positive of Int and subset InMemo of Positive
00:56 japhb timotimo, hmmm.  How about making the failure case: multi fib($) { die "Non-negative integers only, please." }
00:56 timotimo i did that now, yes
00:56 timotimo but now the distinction between "normal positive int" and "int that's also in my memo"
00:56 timotimo here, let me show the code
00:57 japhb timotimo, gist it
00:57 timotimo https://gist.github.com/1932925
01:00 Vespakoen joined #perl6
01:01 japhb Ah, I see, as soon as the first fib routine works its way back to the memoized numbers, then boom.
01:02 timotimo yup
01:02 Timbus|Away joined #perl6
01:03 japhb Hmmm, it certainly *intuitively* seems that your program should DWIM, but I'm not sure if it's specced that way.
01:03 FACEFOX joined #perl6
01:03 timotimo heh.
01:03 timotimo it would need to be in the spec, that a restriction on a subset is less specific than a restriction on a subset of that same subset
01:04 integral joined #perl6
01:04 integral joined #perl6
01:04 colomon Yeah, I'd be surprised if that ever worked
01:05 timotimo so, how is it fixed?
01:05 timotimo one way is to put the error case first, so that it would match immediately
01:07 * japhb is still searching the specs
01:08 timotimo i also put a die unless into fib(Int $x), but that's pretty ugly
01:09 japhb Hmmm, S06:2389-2409 seems to indicate subsets get flattened away when building the signature objects
01:10 timotimo how about the Positive subset + an extra where clause to match InMemo
01:12 scott__ joined #perl6
01:14 lumi__ joined #perl6
01:15 japhb Bah.
01:16 japhb Yeah, S12:1140 and following confirm it, especially the paragraph at 1163-1169.
01:16 japhb The fact that there *are* constraints matters.  *How many* constraints is not considered.
01:17 japhb I argue that that breaks POLA when it comes to subsets though: the reality leaks through the sugar a little too strongly.
01:17 colomon I'm inclined to think it's just asking too much of the multi dispatch.
01:18 colomon though note that memoization should be built-in with "is cached" (though as far as I know it's not yet)
01:20 japhb re: 'is cached', sure.  But I'm just seeing his code as an example of subset usage, without regard to his implementation of memoization.
01:21 colomon https://gist.github.com/2026007 (does away with multi dispatch)
01:21 sudokode joined #perl6
01:23 japhb Oooh, S12:1214-1222.  So perhaps this is just a nom bug?
01:23 colomon https://gist.github.com/2026007 (now with second script, super-short and efficient)
01:24 * japhb chuckles
01:24 colomon japhb++
01:24 colomon I think you're right that this is a nom bug
01:25 colomon which immediately leads to the question...
01:25 colomon niecza: https://gist.github.com/1932925
01:25 p6eval niecza v15-4-g1f35f89: OUTPUT«Potential difficulties:â�¤  $x is declared but not used at /tmp/RbkGEJymsa line 17:â�¤------> [32mmulti fib(Int [33mâ��[31m$x) {[0mâ�¤â�¤Usage:â�¤  /tmp/RbkGEJymsa <fib>â�¤Â»
01:25 japhb Need to be able to do args for gist eval
01:26 japhb And ...
01:26 benabik If it runs equally constrained versions in order declared, then it would never reach the `fib(InMemo $x)` multi
01:26 japhb Given S12:1214-1222, the candidates should appear in the source in the opposite order they are now.
01:26 japhb exactly.
01:27 japhb And the failing case should be 'multi fib($) {...}
01:27 colomon ------> multi fib(Int ⏏$x) {
01:27 colomon Unhandled exception: non-negative arguments required
01:28 colomon bah, reversing the mutlis doesn't help.  :(
01:30 japhb S12:1214-1222 does have the interesting effect of requiring that information about order of declaration of multis be saved into compiled modules, so that when the module is imported, the multis can be folded into the declaration order list properly.
01:31 japhb Hmmm ... but then how does that interact with the scoping rule of Tiebreaker A (S12:1202-1204)
01:32 japhb What is the relative scope of an imported module for this purpose?
01:32 havenn_ joined #perl6
01:38 japhb phenny, ask jnthn Does Rakudo constant-fold bit math on integer constants?  Which is to say, can I assume that +|'ed together bit flag constants will turn into a single bitmask in the compiler output?
01:38 phenny japhb: I'll pass that on when jnthn is around.
01:38 leprevost joined #perl6
02:02 araujo joined #perl6
02:04 Vespakoen joined #perl6
02:19 skyheights joined #perl6
02:24 Vespakoen joined #perl6
02:29 benabik joined #perl6
02:31 pernatiy joined #perl6
02:35 araujo joined #perl6
02:35 araujo joined #perl6
02:42 att joined #perl6
03:08 orafu joined #perl6
03:31 lestrrat joined #perl6
04:02 FACEFOX joined #perl6
04:21 jaldhar joined #perl6
04:26 lestrrat joined #perl6
04:26 japhb joined #perl6
04:32 envi_ joined #perl6
05:05 nnunley joined #perl6
05:19 kaleem joined #perl6
05:33 thou joined #perl6
05:35 nnunley joined #perl6
05:48 imarcusthis joined #perl6
05:59 mucker joined #perl6
06:01 localhost joined #perl6
06:08 moritz seems it doesn't :(
06:09 moritz well, if you write   constant a = 1 +| 4  then it's constant folded
06:09 scott___ joined #perl6
06:10 moritz but a simple   my $foobar = 1 +| 4;  doesn't constant-fold it
06:10 moritz though it inlines the +| operator
06:14 NamelessTee joined #perl6
06:17 imarcusthis joined #perl6
06:24 birdwindupbird joined #perl6
06:26 rsimoes1 joined #perl6
06:35 rsimoes1 joined #perl6
06:35 [particle]1 joined #perl6
06:36 _ilbot joined #perl6
06:36 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.perl6.org/ | UTF-8 is our friend!
06:36 gfldex joined #perl6
06:37 ranguard joined #perl6
06:37 krunen joined #perl6
06:38 adnauseam joined #perl6
06:38 mathw joined #perl6
06:39 apejens joined #perl6
06:42 FACEFOX joined #perl6
06:43 thou joined #perl6
06:44 TimToady joined #perl6
06:50 NamelessTee joined #perl6
06:52 rsimoes joined #perl6
06:57 wtw joined #perl6
07:00 FACEFOX joined #perl6
07:19 agentzh joined #perl6
07:25 jnthn good mornin'
07:25 phenny jnthn: 01:38Z <japhb> ask jnthn Does Rakudo constant-fold bit math on integer constants?  Which is to say, can I assume that +|'ed together bit flag constants will turn into a single bitmask in the compiler output?
07:26 preflex_ joined #perl6
07:26 jnthn phenny: tell japhb not yet *but* the bs branch landing was the blocker for that and I already have some constant folding code, just not wired up yet. So you can expect it to be in place soon.
07:26 phenny jnthn: I'll pass that on when japhb is around.
07:31 tadzik hello #perl6
07:32 moritz \o tadzik, jnthn
07:32 moritz at least the call is inlined
07:32 jnthn moritz: true
07:33 jnthn But really the answer should be. :)
07:33 jnthn Currently that needs explicit use of the constant syntax though
07:34 moritz why are all those  WHAT ( PIROP perl6_box_int__PI ( ... things on the string heap?
07:34 moritz erm, s/WHAT/WANT/
07:34 sorear o/ tadzik , jnthn , moritz
07:35 tadzik hi sorear
07:35 jnthn moritz: Inlining info
07:35 moritz jnthn: ok
07:35 jnthn moritz: the inliner currently encodes some ASTs to a little DLS because we can't serialize PAST
07:36 jnthn Soon we'll have QAST and that will be 6model based and then we'll be able to serialize it though
07:36 jnthn o/ sorear
07:36 jnthn moritz: That said, the string heap certainly contains some stuff that bothers me
07:36 jnthn Like, the reference to Perl6::Compiler
07:37 jnthn Somewhere, somehow, the serializer is finding things it probably should not.
07:37 FACEFOX joined #perl6
07:38 * moritz commutes
07:42 FACEFOX joined #perl6
08:02 lestrrat joined #perl6
08:03 FACEFOX joined #perl6
08:08 drbean joined #perl6
08:12 alim joined #perl6
08:19 icwiener joined #perl6
08:21 moritz http://www.perlmonks.org/?node_id=959260 that was a fun p5 question to answer, though not hard
08:21 moritz the p6 solution looks mostly the same
08:24 moritz though of course there's a different, cute way in Perl 6
08:25 moritz r: https://gist.github.com/2027585
08:25 p6eval rakudo bd6742: OUTPUT«6␤»
08:25 moritz n: https://gist.github.com/2027585
08:25 p6eval niecza v15-4-g1f35f89: OUTPUT«Unhandled exception: Excess arguments to Cool.match, unused named g␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (Cool.match @ 1) ␤  at /tmp/hF6B9e70pe line 9 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3838 (ANON @ 3) ␤  at /home/p6e…
08:25 moritz p: https://gist.github.com/2027585
08:25 p6eval pugs b927740: OUTPUT«*** ␤    Unexpected "0"␤    expecting operator or ")"␤    at /tmp/gnQD2DWDb7 line 14, column 34␤»
08:26 moritz ah, pugs doesn't like the series operator
08:30 mj41 joined #perl6
08:32 tyatpi joined #perl6
08:38 Trashlord joined #perl6
08:42 icwiener joined #perl6
08:42 icwiener joined #perl6
08:45 birdwindupbird joined #perl6
08:49 sisar joined #perl6
09:09 stepnem joined #perl6
09:09 eiro hello there
09:10 jnthn o/ eiro
09:10 moritz \o *
09:18 FACEFOX joined #perl6
09:36 alim joined #perl6
09:38 Vespakoen joined #perl6
09:38 dakkar joined #perl6
09:41 lestrrat joined #perl6
09:44 dalek roast: 1faa73d | moritz++ | S03-operators/value_equivalence.t:
09:44 dalek roast: test lexical roles and ===
09:44 dalek roast: review: https://github.com/perl6/roast/commit/1faa73da1c
09:45 cognominal perl6:     say "$_: " ~ (try { say $_; eval $_ }).WHAT.perl for  < [] {} () \() :() [] !@@% >
09:45 p6eval niecza v15-4-g1f35f89: OUTPUT«[]␤[]: Array␤{}␤{}: Hash␤()␤(): Parcel␤\()␤\(): Capture␤:()␤:(): Any␤[]␤[]: Array␤!@@%␤!@@%: Any␤»
09:45 p6eval ..pugs b927740: OUTPUT«pugs: Missing required parameters: $_␤»
09:45 p6eval ..rakudo bd6742: OUTPUT«Any()␤[]: X::AdHoc␤Any()␤{}: X::AdHoc␤Any()␤(): X::AdHoc␤Any()␤\(): X::AdHoc␤Any()␤:(): X::AdHoc␤Any()␤[]: X::AdHoc␤Any()␤!@@%: X::AdHoc␤»
09:47 moritz rakudo: say WHAT eval '[]'
09:47 p6eval rakudo bd6742: OUTPUT«Array()␤»
09:47 moritz rakudo: say WHAT eval $_ for < [] {} >
09:47 p6eval rakudo bd6742: OUTPUT«Array()␤Hash()␤»
09:47 moritz rakudo: say WHAT eval $_ for < [] {} \() () >
09:47 p6eval rakudo bd6742: OUTPUT«Array()␤Hash()␤Capture()␤Parcel()␤»
09:48 moritz rakudo: say WHAT eval $_ for < [] {} \() () :()>
09:48 p6eval rakudo bd6742: OUTPUT«Array()␤Hash()␤Captu​re()␤Parcel()␤Signature()␤»
09:48 cognominal moritz: thx for trying to golf it  :)
09:49 jnthn r: say "$_" for 1..2;
09:49 p6eval rakudo bd6742: OUTPUT«1␤2␤»
09:49 moritz rakudo: say WHAT try eval $_ for < [] {} \() () :()>
09:49 p6eval rakudo bd6742: OUTPUT«List()␤»
09:49 jnthn r: say "{$_}" for 1..2;
09:49 p6eval rakudo bd6742: OUTPUT«1␤2␤»
09:49 cognominal nom:   < [] {} () \() :() [] !@@% >.map: { say "$_: " ~ (try { eval $_ }).WHAT.perl }
09:49 p6eval rakudo bd6742:  ( no output )
09:49 moritz so, the try seems to make the difference
09:49 moritz rakudo: say try eval $_ for < [] {} \() () :()>
09:49 p6eval rakudo bd6742: OUTPUT«   Signature<-1765137524978402461>␤»
09:50 moritz rakudo: say try { eval $_ } for < [] {} \() () :()>
09:50 cognominal the .map form works correctly
09:50 p6eval rakudo bd6742: OUTPUT«Nominal type check failed for parameter '$code'; expected Str but got Any instead␤  in sub eval at src/gen/CORE.setting:442␤  in block <anon> at /tmp/qrm9UcCSFz:1␤␤Nominal type check failed for parameter '$code'; expected Str but got Any instead␤  in sub eval at sr…
09:50 cognominal rakudo:   < [] {} () \() :() [] !@@% >.map: { say "$_: " ~ (try { eval $_ }).WHAT.perl }
09:50 p6eval rakudo bd6742:  ( no output )
09:50 moritz does try mess with $_ ?
09:50 cognominal hum.
09:50 moritz nom: try { say $_ } for <1 b>
09:50 p6eval rakudo bd6742: OUTPUT«Any()␤Any()␤»
09:50 jnthn Don't think so
09:50 cognominal not that one
09:50 * moritz thinks so
09:51 jnthn nom: do { say $_ } for <1 b>
09:51 p6eval rakudo bd6742: OUTPUT«===SORRY!===␤Unsupported use of do...for;  in Perl 6 please use repeat...for␤at /tmp/Gdrlr5w4iq:1␤»
09:51 jnthn nom: blah { say $_ } for <1 b>; sub blah($c) { $c() }
09:51 p6eval rakudo bd6742: OUTPUT«1␤b␤»
09:51 jnthn Hmm, does seem hard to find a non-try case.
09:51 jnthn Still don't see why it should be special though
09:52 moritz nom: for <1 b> { try { say $_ } }
09:52 p6eval rakudo bd6742: OUTPUT«1␤b␤»
09:52 moritz so, only in the statement modifying case
09:52 * moritz submits rakudobug
09:53 moritz n: try { say $_ } for <1 2>
09:53 p6eval niecza v15-4-g1f35f89: OUTPUT«1␤2␤»
09:53 moritz n: try say $_  for <1 2>
09:53 p6eval niecza v15-4-g1f35f89: OUTPUT«1␤2␤»
09:53 moritz r: try say $_  for <1 2>
09:53 p6eval rakudo bd6742: OUTPUT«1␤2␤»
09:53 moritz r: try { say $_ } for <1 2>
09:53 p6eval rakudo bd6742: OUTPUT«Any()␤Any()␤»
09:53 moritz ok, only the block case
09:54 jnthn I'm sure there's another ticket a bit like thsi but not the same
09:54 moritz well, at least we have it golfed quite a bit
09:55 jnthn aye
09:55 moritz r: try { say $_ } given 2
09:55 p6eval rakudo bd6742: OUTPUT«Any()␤»
09:55 simcop2387 joined #perl6
09:55 overrosy joined #perl6
09:55 ruoso joined #perl6
09:55 takesako joined #perl6
09:55 sirhc joined #perl6
09:55 jnthn I think it's to do with nested blocks plus statement modifiers
09:55 moritz sounds about right
09:55 cognominal yes, I think so
09:56 FACEFOX joined #perl6
09:56 jnthn It's a pain to handle.
09:56 jnthn The blocks get attached to the outer they are actually written in
09:56 moritz but need to get the $_ from the contextualizer, not from the block
09:56 jnthn But then the statement modifier forces a block to be later generated that has to go "around" them
09:56 jnthn And we dont' know about it until too late.
09:56 jnthn So it needs special casing.
09:57 moritz submitted as [perl #111704]
09:57 jnthn And every way I think of to fix this issue feels like a hack :/
09:59 moritz sounds like the codegen of the statement needs to be defered until the statement modifier has done its magic
09:59 moritz or... something :/
10:01 dalek roast: c070484 | moritz++ | S04-statements/try.t:
10:01 dalek roast: test for RT #111704, try-blocks plus statement modifiers gobble up $_
10:01 dalek roast: review: https://github.com/perl6/roast/commit/c07048453b
10:02 FACEFOX joined #perl6
10:02 Guest80268 joined #perl6
10:03 cognominal perl6: perl 1
10:03 p6eval pugs b927740:  ( no output )
10:03 p6eval ..niecza v15-4-g1f35f89: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤      'perl' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1362 (die @ 3) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 33) â�¤  at /home…
10:03 p6eval ..rakudo bd6742: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&perl' called (line 1)␤»
10:03 cognominal perl6: gist 1
10:03 p6eval pugs b927740: OUTPUT«*** No such subroutine: "&gist"␤    at /tmp/zAgis9XNb0 line 1, column 1 - line 2, column 1␤»
10:03 p6eval ..rakudo bd6742, niecza v15-4-g1f35f89:  ( no output )
10:04 FACEFOX joined #perl6
10:15 envi_ joined #perl6
10:15 ab5tract joined #perl6
10:24 colomon joined #perl6
10:35 xinming joined #perl6
10:41 PZt joined #perl6
10:41 masak http://www.perlmonks.org/?node_id=959260 -- "I would be so grateful! -- Pics? ;)" -- I'm thinking of acquiring a sexism gag reflex, like the one sorear has. :(
10:41 masak oh, hai, #perl6
10:42 moritz masak: yes, that part annoyed me too
10:42 moritz oh hai masak
10:42 huf did that seriously happen?!
10:42 colomon o/
10:42 huf sweet jesus
10:43 tadzik :)
10:45 masak I'm glad it's not just me.
10:48 daxim joined #perl6
10:51 * masak replied: http://www.perlmonks.org/?node_id=959264
10:51 moritz fwiw I've considered that node for editing (you need a minimum XP level to vote on the consideration)
10:52 colomon masak++
10:52 moritz masak++
10:52 Trashlord joined #perl6
10:53 masak thank you. still made me sad, though. :(
10:54 masak on a brighter note, japhb++ found a buglet in https://gist.github.com/2021108
10:54 tadzik I'm wondering if you don't it too seriously though
10:55 moritz well, nobody ever writes such a comment in response to a man
10:55 tadzik that's true
10:55 moritz and treating men and women differently is the first step to alienating women
10:56 xinming joined #perl6
10:58 masak tadzik: the comment implies that katarinahm should express her gratitude to the replier by sending him pictures.
10:59 tadzik well, right
10:59 masak tadzik: (1) what moritz said. (2) expressing the idea, even as a joke, means we somehow don't accept women as first-class citizens.
10:59 arnsholt It's just in bad taste, IMO
10:59 masak yeah, basically.
11:06 masak the polarisation between "you're reading too much into it" and "well, consider what this means" seems fundamental to almost any debate on sexism in the programming communities.
11:06 xinming joined #perl6
11:06 eiro tadzik, ack.
11:07 eiro masak, jnthn, tadzik: i asked cognominal to create a repo "perl6 course" and add us at contributors
11:08 moritz shouldn't we just make one in the perl6 organization?
11:08 moritz and give everyone who wants commit access, just like with roast, the websites etc.
11:09 eiro moritz, you tell me :) you guys decide something and i just follow you
11:10 cognominal eiro: it is not yet in the repo, but as a gist. https://gist.github.com/2028115
11:10 eiro cognominal, can a gist become a repo ? can i clone ? branch ?
11:11 moritz yes, it can, though with some command line involvement
11:12 aindilis joined #perl6
11:14 eiro bbl
11:14 lestrrat joined #perl6
11:14 moritz now at https://github.com/perl6/course
11:14 tadzik eiro: course?
11:15 eiro moritz, thx
11:15 arnsholt Oooh, French Perl
11:15 eiro tadzik, yep! it's a complete training session we're planning.
11:15 eiro really have to go! bbl
11:15 eiro arnsholt, yup :)
11:15 arnsholt I should read it, if nothing else to brush up on my French =D
11:16 tadzik oh nice
11:16 cognominal beware, it is still raw. there are a lot of typos. That's why it was a gist and not yet a depot.
11:17 moritz commit early, repo often :-)
11:17 arnsholt cognominal: Don't worry. It's been so long since I read any French that I probably won't notice any typos =)
11:18 moritz one thing we can do is set up some perl 6 examples by category, and those can be shared between different courses
11:18 moritz like, examples for classes, roles, regexes, ...
11:19 cognominal maintenant, je me re_pose_ un peu. I will pause a bit and get a lunch.
11:23 odoacre joined #perl6
11:24 lumi__ Is there a useful way for me to run spectests nightly?
11:27 moritz lumi__: you mean, if there's an automatic smoker client? or a good way to submit the results? or if it's useful for us at all?
11:27 bruges joined #perl6
11:28 lumi__ More or less any of these
11:28 moritz yes, would be useful
11:28 NamelessTee joined #perl6
11:28 moritz you can run  'make spectest_smolder' to submit the reports
11:28 moritz and you'll probably need to write your own cron script
11:30 lumi__ moritz: Thanks, exactly what I needed :) I'll set it up
11:32 pmurias joined #perl6
11:38 benabik joined #perl6
11:43 grondilu joined #perl6
11:47 grondilu joined #perl6
11:48 grondilu nom: macro talk($s) { quasi { say {{{{$s}}}} } }; talk "hello";
11:48 p6eval rakudo bd6742: OUTPUT«Block.new()␤»
11:48 mdupont joined #perl6
11:48 grondilu pugs: macro talk($s) { quasi { say {{{{$s}}}} } }; talk "hello";
11:48 p6eval pugs b927740: OUTPUT«<SubBlock(<anon>)>␤»
11:48 grondilu pugs: macro talk($s) { quasi { say {{{$s}}} } }; talk "hello";
11:48 p6eval pugs b927740: OUTPUT«<SubBlock(<anon>)>␤»
11:48 grondilu is it too early for these stuffs?
11:49 jnthn Yes
11:50 jnthn The quasi interpolation ain't impl yet
11:50 jnthn (the {{{$s
11:50 jnthn }}} bit)
11:50 grondilu ok
11:50 * mikec wonders what that does
11:51 grondilu do you guys know about wikicreole?  They have a EBNF grammar that I'd love to see implemented in perl6:  http://www.riehle.org/2008/01/09/a​n-ebnf-grammar-for-wiki-creole-10/
11:52 jnthn mikec: Lets one chunk of AST be embedded within another
12:04 mtk joined #perl6
12:09 cognominal moritz, do I have the proper rights to push to https://github.com/perl6/course? I got a 403.
12:10 cognominal I should learn more about github depot adminstration.
12:13 jnthn depot? :)
12:13 cognominal repository
12:13 jnthn :)
12:14 cognominal or dépôt
12:15 cognominal …which should not be a dépotoir (dumping ground).
12:15 sporous joined #perl6
12:24 moritz cognominal: well, you need to use the ssh URL
12:25 moritz cognominal: ... and I've added you to the perl6 group, so now you should have commit access
12:25 moritz wow, did you never ever patch roast or the specs or so?
12:26 PacoAir joined #perl6
12:26 moritz hugme: add eiro to perl6
12:26 hugme moritz: You need to register with freenode first
12:27 moritz hugme: add eiro to perl6
12:27 * hugme hugs eiro. Welcome to the perl6 github organization
12:27 moritz anyone else missing?
12:34 * cognominal is looking french people with an interest in Perl 6 and a github account : maddingue, book, dams, franckcuny, fperrad
12:37 * grondilu is french, has a github account, but is not a good perl6 programmer yet :(
12:37 benabik He did say interest in Perl 6, not proficiency in.
12:37 moritz hugme: add grondilu to perl6
12:37 * hugme hugs grondilu. Welcome to the perl6 github organization
12:37 grondilu :)
12:38 moritz resistance is futile. You have been assimilated :-)
12:38 cognominal sorry grondilu to have forgotten you.
12:42 grondilu check out my offline wikipedia implementation using perl5:  http://www.perlmonks.org/?node_id=958466   It works but Text::Mediawiki's rendering kind of sucks.  I'm pretty sure a Perl6 grammar could help parsing the wiki markup.  Thus my remark about wikicreole.  Any help welcome.
12:43 sporous joined #perl6
12:44 dalek nqp/b64-lookup-table: 1859ad1 | moritz++ | src/6model/base64.c:
12:44 dalek nqp/b64-lookup-table: base64 decoding now uses a lookup table, not repeated branching
12:44 dalek nqp/b64-lookup-table: review: https://github.com/perl6/nqp/commit/1859ad17ef
12:44 moritz phenny: tell jnthn at your convenience, please profile the nqp/b64-lookup-table branch to see if it has made any difference. My own experiments with rakudo startup time remain inconclusive
12:44 phenny moritz: I'll pass that on when jnthn is around.
12:44 tokuhiro_ joined #perl6
12:45 preflex_ joined #perl6
12:45 masak it's hard to tell if one Anonymous Monk is infix:<===> to another, but http://www.perlmonks.org/?node_id=959296 was perhaps not entirely unexpected. basically a nonsensical reply. as for me, I'm not digging further down that thread.
12:47 moritz I've just downvoted and otherwise ignored it
12:47 masak good.
12:56 sisar joined #perl6
12:57 Chillance joined #perl6
13:13 [particle] joined #perl6
13:19 au grondilu: I've been working at $job on https://www.mediawiki.org/w​iki/Parsoid#Getting_started -- the core pegTokenizer.pegjs.txt is written in PEG.js http://pegjs.majda.cz/documentation and perhaps a PEGjs->Perl6Rules translator would be useful
13:20 au or PEGjs<->Perl6Rules, even.
13:22 * grondilu checks this out
13:27 drbean joined #perl6
13:32 masak nice, simple syntax.
13:32 masak also, an interesting way to inline actions into grammar.
13:33 Vespakoen joined #perl6
13:33 grondilu au: I installed npm on my sid machine but it doesn't seem to work :(  Isn't there a tar ball for the whole thing instead?
13:34 au npm 1.0+?
13:35 au also, if "it doesn't seem to work" means "it fails hundreds of tests on 'make test'", then it's quite normal :)
13:36 grondilu no, even a simple "npm -v" throws an exception
13:36 au grondilu: no tarballs atm afaik; you might want to install http://nodejs.org/dist/v0.6.12/node-v0.6.12.tar.gz from source to get npm working; then it should be possible to checkout only the http://svn.wikimedia.org/svnroot/medi​awiki/trunk/extensions/VisualEditor/ part and "cd tests/parser ; make test".
13:37 au (feel free to continue this conversation at #wikimedia-dev)
13:38 grondilu ok
13:39 pernatiy joined #perl6
13:40 skids joined #perl6
13:48 moritz phenny: tell jnthn MiniDBI fails to build on newest rakudo: 'Missing serialize REPR function'. Do the NCI stuff needs to be update to deal with bs?
13:48 phenny moritz: I'll pass that on when jnthn is around.
13:48 jnthn moritz: sounds lajk yes :)
13:48 phenny jnthn: 12:44Z <moritz> tell jnthn at your convenience, please profile the nqp/b64-lookup-table branch to see if it has made any difference. My own experiments with rakudo startup time remain inconclusive
13:48 phenny jnthn: 13:48Z <moritz> tell jnthn MiniDBI fails to build on newest rakudo: 'Missing serialize REPR function'. Do the NCI stuff needs to be update to deal with bs?
13:49 jnthn Guess we ain't lucky enough to know which REPR was missing it....
13:49 jnthn Hmm. I didn't think that would happen.
13:49 jnthn oh, wait...I know.
13:50 jnthn Though can't fix here...
13:52 aindilis joined #perl6
13:53 moritz no hurry
13:59 flussence seems to be just MiniDBI, my NativeCall-using code seems to work
13:59 flussence (then again I'm not doing anything particularly exciting in it...)
13:59 moritz flussence: well, 'make' in MiniDBI precompiles stuff
13:59 flussence oh, that'd be why :)
13:59 jnthn It'll just show up in precomp
14:01 moritz without precomp...
14:01 moritz ok 2 - MiniDBD::mysql version 0.01
14:01 moritz Segmentation fault
14:04 felher After i had a problem with a program i golfed down the issue for quite some time. But i don't get why the two golfed-down one-liners produce different output:
14:04 felher @g.push(3);
14:04 felher my @g = @g => 'x';
14:04 felher @g.
14:04 felher ...
14:04 felher nom: my $x; my @a = 1,2; $x = Array.new(@a) => 'x'; $x.key[0]; @a.pop(); say $x;
14:04 p6eval rakudo bd6742: OUTPUT«[1, 2] => "x"␤»
14:05 felher nom: my $x; my @a = 1,2; $x = Array.new(@a) => 'x'; @a.pop(); say $x;
14:05 p6eval rakudo bd6742: OUTPUT«[1] => "x"␤»
14:05 felher Might this be a bug?
14:05 moritz the difference is just the $x.key[0]; in sink context, right?
14:06 felher moritz: yes
14:06 flussence nom: my $x; my @a = 1,2; $x = Array.new(@a) => 'x'; $x.key[0]; say $x;
14:06 p6eval rakudo bd6742: OUTPUT«[1, 2] => "x"␤»
14:06 moritz probably is a bug, yes
14:08 felher Ah, okay. This was quite funny to debug, since everytime i added debugging-output everything worked (because i printed it). And everytime i deleted the print statements for debugging it failed again :)
14:10 * colomon is really happy with the next stage of the continued fractions project...
14:10 masak felher++ # nice golf!
14:11 masak felher: should I submit it?
14:11 felher masak: sure. Press your "masak submits rakudobug"-Button.
14:11 * masak submits rakudobug
14:11 felher masak: you do have that button, don't you?
14:12 * masak smiles mysteriously
14:12 felher :D
14:12 * moritz smiles too
14:15 jnthn moritz: Hm. I only tested the mysql thing on Windows. :)
14:15 jnthn moritz: Can I have a stacktrace?
14:17 moritz jnthn: https://gist.github.com/2029048
14:18 jnthn wtf...
14:19 moritz that's a good comment.
14:19 jnthn Innevitably heap corruption of soem kind.
14:19 jnthn *some
14:20 jnthn I guess many things allocate out of Parrot pools, but bigint and NCI do with malloc
14:22 masak nom: my @a = 1,2; my $x = [@a] => 'x'; $x.key[0]; @a.pop(); say $x;
14:22 p6eval rakudo bd6742: OUTPUT«[1, 2] => "x"␤»
14:22 masak nom: my @a = 1,2; my $x = [@a] => 'x'; @a.pop(); say $x;
14:22 p6eval rakudo bd6742: OUTPUT«[1, 2] => "x"␤»
14:22 masak oh, 'course.
14:23 moritz nom: my @a = 1,2; my $x = @a => 'x'; @a.pop(); say $x;
14:23 p6eval rakudo bd6742: OUTPUT«[1] => "x"␤»
14:23 moritz that part seems to make sense
14:23 jnthn That bit looks right.
14:23 masak aye.
14:24 masak nom: my @a = 1,2; my $x = @a => 'x'; $x.key[0]; @a.pop(); say $x;
14:24 p6eval rakudo bd6742: OUTPUT«[1] => "x"␤»
14:24 masak so Array.new is a necessary component of it all.
14:24 jnthn ah
14:25 jnthn I guess Array.new probably ain't exercised a great deal
14:25 moritz aye
14:25 moritz and it's probably written by me, in a rather naive way
14:25 pernatiy joined #perl6
14:26 jnthn nom: say Array.new(1,2,3).WHAT
14:26 p6eval rakudo bd6742: OUTPUT«Array()␤»
14:27 * jnthn wonders if Array.new can't just be written method new(*@a) { @a }
14:27 jnthn Well, besides subclassing...
14:28 jnthn But the current implementation gets that wrong too anyway
14:28 jnthn oh
14:28 jnthn no, it doesn't...
14:28 jnthn But it looks like it may well be doing soemthing too shallow
14:30 kaleem joined #perl6
14:57 tokuhiro_ joined #perl6
15:05 plutoid joined #perl6
15:12 JimmyZ joined #perl6
15:23 mj41 joined #perl6
15:32 sftp joined #perl6
15:38 masak std: sub foo($0) {}
15:38 p6eval std 1ad3292: OUTPUT«[31m===[0mSORRY![31m===[0m�Cannot declare a numeric parameter at /tmp/G65mBZ4rAk line 1:�------> [32msub foo($0[33m�[31m) {}[0m�Parse failed�FAILED 00:01 109m�»
15:38 jnthn nom: sub foo($0) {}
15:38 p6eval rakudo bd6742: OUTPUT«===SORRY!===␤Cannot declare a numeric variable␤at /tmp/36eFpJi7Yr:1␤»
15:39 jnthn Close E. Nuff
15:39 masak :D
15:39 moritz nom: try eval 'sub foo($0) { }'; say $!.perl
15:39 p6eval rakudo bd6742: OUTPUT«X::Syntax::Variable::Numeric.new(what => "parameter", filename => "eval_0", line => 1, column => Any)␤»
15:40 jnthn oh wow, the exception info even knows it's a parameter
15:40 jnthn moritz++
15:40 moritz now it should also say so :-)
15:40 jnthn Probably just tweaking method message to get to what STD has
15:40 moritz aye
15:40 mikec wow, that's cool
15:41 * moritz compiles a fix
15:41 moritz one thing I want to add soonish is the context
15:42 moritz we might not get it as accurately as STD, but should still be better than nothing
15:43 jnthn "the context"?
15:44 moritz the surrouding text from the parse
15:44 jnthn aha
15:44 moritz "context" is a totally overloaded word in here :-)
15:45 * masak .oO( its meaning depends on a lot of things surrounding its use )
15:47 * jnthn should start using http://www.contexteditor.org/ just to make things worse :P
15:47 colomon joined #perl6
15:47 dalek rakudo/nom: fee8919 | moritz++ | src/core/Exception.pm:
15:47 dalek rakudo/nom: awesomize error message for numeric parameters
15:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fee8919e67
15:56 bluescreen10 joined #perl6
15:56 sftp_ joined #perl6
16:00 att joined #perl6
16:01 Psyche^ joined #perl6
16:05 masak I believe I have what is the final word in the search for an even-distribution balanced string generator.
16:05 masak r: sub c { state @c = 1; return @c[$^n] if @c > $n; 2 * (2 * $n - 1) / ($n + 1) * c($n - 1) }; sub b($l) { return "[]" x $l if $l < 2; my $r = (^c($l)).roll; my $s; for reverse(^$l) Z ^$l -> $l1, $l2 { $s += c($l1) * c($l2); return [~] "[", b($l1), "]", b($l2) if $r < $s } }; say b 5
16:05 p6eval rakudo fee891: OUTPUT«[][][][[]]␤»
16:05 moritz r: sub c { state @c = 1; return @c[$^n] if @c > $n; 2 * (2 * $n
16:05 moritz - 1) / ($n + 1) * c($n - 1) }; sub b($l) { return "[]" x $l if
16:05 moritz $l < 2; my $r = (^c($l)).roll; my $s; for reverse(^$l) Z ^$l ->
16:05 moritz $l1, $l2 { $s += c($l1) * c($l2); return [~] "[", b($l1), "]",
16:05 p6eval rakudo fee891: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
16:05 moritz eeks
16:06 moritz c&p fail
16:06 masak I'd say.
16:06 masak &c calculates catalan numbers.
16:06 masak &b calculates balanced strings recursively.
16:07 masak the important part is the dice throw $r, which is then compared against a cumulative sum of products of catalan numbers.
16:08 masak the details of this comparison guarantee an even distribution, because the cumulative sum takes into accound how many strings of the form "[X]Y" there are for X and Y of various lengths.
16:08 masak account*
16:10 masak it's a bit of a waste to be making a new roll on each recursive call -- the first $r really has enough bits to pin down a string entirely. but it doesn't hurt either.
16:10 * moritz suspects it's not quite the final say after all :-)
16:11 masak so in the end, it turns out that the distribution can be mapped down to (a recursive) [\+] of the catalan numbers.
16:14 * moritz decommutes
16:19 masak r: sub c { state @c = 1; return @c[$^n] if @c > $n; 2 * (2 * $n - 1) / ($n + 1) * c($n - 1) }; sub b { return "[]" x $^l if $l < 2; my $r = (^c($l)).roll; return "[&b($l - 1 - $_)]&b($_)" if $r < (my $s += c($l1) * c($l2)) for ^$l }; say b 5
16:19 p6eval rakudo fee891: OUTPUT«===SORRY!===␤Variable $l1 is not declared␤at /tmp/9yek541Jg4:1␤»
16:19 masak r: sub c { state @c = 1; return @c[$^n] if @c > $n; 2 * (2 * $n - 1) / ($n + 1) * c($n - 1) }; sub b { return "[]" x $^l if $l < 2; my $r = (^c($l)).roll; return "[&b($l - 1 - $_)]&b($_)" if $r < (my $s += c($l - 1 - $_) * c($_)) for ^$l }; say b 5
16:19 p6eval rakudo fee891: OUTPUT«[[[]][[]]]␤»
16:19 masak r: sub c { state @c = 1; return @c[$^n] if @c > $n; 2 * (2 * $n - 1) / ($n + 1) * c($n - 1) }; sub b { return "[]" x $^l if $l < 2; my $r = (^c($l)).roll; return "[&b($l - 1 - $_)]&b($_)" if $r < (my $s += c($l - 1 - $_) * c($_)) for ^$l }; say b 10
16:19 p6eval rakudo fee891: OUTPUT«[[][[[]]][]][][][][]␤»
16:19 masak \o/
16:20 masak note: no implicit or explicit computation of a big triangular matric required.
16:23 masak matrix*
16:24 thou joined #perl6
16:24 NamelessTee joined #perl6
16:39 vytas joined #perl6
16:39 japhb perl6: ?(all() ~~ /^ \d+ $/)
16:39 phenny japhb: 07:26Z <jnthn> tell japhb not yet *but* the bs branch landing was the blocker for that and I already have some constant folding code, just not wired up yet. So you can expect it to be in place soon.
16:39 p6eval rakudo fee891: OUTPUT«This type cannot unbox to a native string␤  in any <anon> at src/gen/BOOTSTRAP.pm:105␤  in any !cursor_init at src/stage2/QRegex.nqp:881␤  in method ACCEPTS at src/gen/CORE.setting:8275␤  in block <anon> at /tmp/aKQYyCuIaz:1␤␤»
16:39 p6eval ..pugs b927740, niecza v15-4-g1f35f89:  ( no output )
16:40 japhb phenny, tell jnthn Ah, great, thanks!
16:40 phenny japhb: I'll pass that on when jnthn is around.
16:40 vytas left #perl6
16:40 Psyche^ joined #perl6
16:40 japhb perl6: ?(all() ~~ /./)
16:41 p6eval rakudo fee891: OUTPUT«This type cannot unbox to a native string␤  in any <anon> at src/gen/BOOTSTRAP.pm:105␤  in any !cursor_init at src/stage2/QRegex.nqp:881␤  in method ACCEPTS at src/gen/CORE.setting:8275␤  in block <anon> at /tmp/wBfthRSBT2:1␤␤»
16:41 p6eval ..pugs b927740, niecza v15-4-g1f35f89:  ( no output )
16:41 japhb ^^ Any more golfing that anyone can see for the above bug?
16:47 japhb r: all() ~~ /./
16:47 p6eval rakudo fee891: OUTPUT«This type cannot unbox to a native string␤  in any <anon> at src/gen/BOOTSTRAP.pm:105␤  in any !cursor_init at src/stage2/QRegex.nqp:881␤  in method ACCEPTS at src/gen/CORE.setting:8275␤  in block <anon> at /tmp/3G3E2ZywtM:1␤␤»
16:48 japhb Another 3 chars off
16:48 japhb :-)
16:48 japhb For some reason, I enjoy golfing errors more than working code.  :-)
16:48 masak there's more feedback in golfing errors :)
16:48 masak japhb: should I submit this?
16:49 japhb masak, Yeah, it's probably small enough to be clear at this point.
16:49 * masak submits rakudobug
16:49 japhb Thanks!
16:49 * masak bows
16:50 japhb BTW, when did r: and n: get added to p6eval?  Very nice.
16:51 moritz 9 days ago
16:51 japhb Thank you.
16:52 masak p: say "And meeeee!"
16:52 p6eval pugs b927740: OUTPUT«And meeeee!␤»
16:53 japhb How could I forget you, Pugs?
16:53 * moritz did, too
16:55 japhb So ... S17-concurrency -- it looks like it was redesigned (more than once?), but it still looks like a collection of ideas rather than something that's had any implementation behind it.  Is my assessment correct here?  And is anyone attached to the current design?
16:56 moritz yes, and no
16:56 japhb Ah, good.
16:57 moritz sorear++ has implemented a tiny bit of concurrency, but I don't know how well that corresponds to S17
16:57 japhb What did he implement?
16:57 japhb (sorear, are you around?)
16:58 japhb I remember back a long time ago, one of the compilers (Pugs?) experimented with STM, but I recall that being at most a mixed success.
17:01 * masak decommutes
17:08 kaare_ joined #perl6
17:15 MayDaniel joined #perl6
17:22 fglock joined #perl6
17:29 [Coke] r: say "" ~~ /./
17:29 p6eval rakudo fee891: OUTPUT«#<failed match>␤»
17:30 [Coke] r: say Mu() ~~ /./
17:30 p6eval rakudo fee891: OUTPUT«Method 'Mu' not found for invocant of class 'Parcel'␤  in <anon> at src/gen/BOOTSTRAP.pm:805␤  in <anon> at src/gen/BOOTSTRAP.pm:802␤  in any <anon> at src/gen/BOOTSTRAP.pm:797␤  in block <anon> at /tmp/aButAF_v15:1␤␤»
17:30 [Coke] r: say Mu ~~ /./
17:30 p6eval rakudo fee891: OUTPUT«use of uninitialized value of type Mu in string context␤#<failed match>␤»
17:30 [Coke] I'm not sure why any() ~~ /./ is worse than that.
17:31 [Coke] er, all()
17:31 [Coke] (what does all() mean, anyway?)
17:33 [Coke] (that is, what is a junction of everything of nothing?)
17:33 [Coke] r: say all() ~~ 10
17:33 p6eval rakudo fee891: OUTPUT«all()␤»
17:33 japhb I'm guessing it's junction autothreading that makes one()/any()/all() worse than Mu in this case.
17:33 [Coke] r: say Nil ~~ /./
17:33 p6eval rakudo fee891: OUTPUT«#<failed match>␤»
17:34 moritz nom: say nqp::unbox_s(Junction)
17:34 p6eval rakudo fee891: OUTPUT«Cannot unbox a type object as a native str␤  in block <anon> at /tmp/PEbdxSyZx0:1␤␤»
17:34 japhb And for the purposes of this bug, it doesn't matter whether the junction composers have arguments or not.
17:34 moritz nom: say nqp::unbox_s(all())
17:34 p6eval rakudo fee891: OUTPUT«This type cannot unbox to a native string␤  in block <anon> at /tmp/C3_koKdTvx:1␤␤»
17:34 * [Coke] shuts off the part of his brain that's thinking about this.
17:34 japhb r: nqp::unbox_s(all())
17:34 p6eval rakudo fee891: OUTPUT«This type cannot unbox to a native string␤  in block <anon> at /tmp/eZYLZwBom3:1␤␤»
17:34 japhb 'say' not necessary
17:35 [Coke] we're not suggesting that unbox_s(junction) should do something, though, are we?
17:36 [Coke] just that ~~ should autothread better?
17:36 japhb Right.
17:36 [Coke] hokay
17:36 japhb The tests with unbox_s are just to check if that's what caused the exact error message we're getting, I think.
17:37 MayDaniel joined #perl6
17:47 simcop2387 joined #perl6
17:51 [Coke] +# 03/13/2012 - rakudo++ ; niecza (96.22%); pugs (38.97%)
17:51 [Coke] +"niecza",     20309,     1,   757,  1540, 22607, 23763
17:51 [Coke] +"pugs"  ,      8227,     0,  3022,  1344, 12593, 23572
17:51 [Coke] +"rakudo",     21106,    31,   626,  1888, 23485, 24026
17:51 [Coke] niecza inches up 2 tests while everyone else holds.
17:55 mj41 joined #perl6
18:09 cognominal error golfing, we should propose that sport to the olympic committee
18:11 japhb I can just see the events: fewest strokes to demonstrate a given error, fewest strokes to trigger a VM-native error, fewest strokes to a segfault ...
18:20 japhb phenny, ask sorear What have you implemented in the way of concurrency support in Niecza?  (I mean that in the general sense, including threads, AIO, event loops, STM, actors, ....)
18:20 phenny japhb: I'll pass that on when sorear is around.
18:21 TimToady perl6: say (<[ ]> xx 10).pick(*).join
18:21 p6eval niecza v15-4-g1f35f89: OUTPUT«[][[]][[][]]]][[[]][␤»
18:21 p6eval ..pugs b927740: OUTPUT«[]]][[]]][[][][][[[]␤»
18:21 p6eval ..rakudo fee891: OUTPUT«[][][][][][][][][][]␤»
18:21 TimToady rakudo feyl
18:23 moritz should it flatten all those parcels?
18:25 TimToady that's the default for most listy methods, which is why we need .lol
18:25 TimToady admittedly the spec could be clearer here
18:26 japhb TimToady, how "deep" a concurrency model are you really looking for?  Right now the best feel I've got is "1. In general syntax, give the programmer ways to specify that things *can* be done concurrently, but leave reality to the implementations (e.g. hyper, race).  2. If the user wants to have greater control, give them features that allow them to do "native" threading, events, etc. but with a portable veneer that hides platform dependent
18:26 japhb details."  Is that about right?
18:26 TimToady perl6: say (<[ ]> xx 10).map(~*).join
18:26 p6eval pugs b927740: OUTPUT«*** Cannot cast from VList [VStr "Inf"] to VCode (VCode)␤    at /tmp/LSDUtFmiID line 1, column 5 - line 2, column 1␤»
18:26 p6eval ..rakudo fee891, niecza v15-4-g1f35f89: OUTPUT«[][][][][][][][][][]␤»
18:27 TimToady you'll note rakudo flattens there, so it's being inconsistent
18:27 TimToady perl6: say (<[ ]> xx 10).lol.map(~*).join
18:27 p6eval niecza v15-4-g1f35f89: OUTPUT«Unhandled exception: Unable to resolve method lol in class List␤  at /tmp/dbGphD48ko line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3838 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3839 (module-CORE @ 65) ␤  at /home/p6…
18:27 p6eval ..pugs b927740: OUTPUT«*** No such method in class Array: "&lol"␤    at /tmp/hxg5aZza1N line 1, column 5 - line 2, column 1␤»
18:27 p6eval ..rakudo fee891: OUTPUT«Method 'lol' not found for invocant of class 'List'␤  in block <anon> at /tmp/jZqVfffvUO:1␤␤»
18:28 TimToady perl6: say (<[ ]> xx 10).tree.map(~*).join
18:28 p6eval niecza v15-4-g1f35f89: OUTPUT«Unhandled exception: Unable to resolve method tree in class List␤  at /tmp/vp42Bk4zo1 line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3838 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3839 (module-CORE @ 65) ␤  at /home/p…
18:28 p6eval ..rakudo fee891: OUTPUT«[ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]␤»
18:28 p6eval ..pugs b927740: OUTPUT«*** No such method in class Array: "&tree"␤    at /tmp/BSEAjlSVcZ line 1, column 5 - line 2, column 1␤»
18:47 tyatpi joined #perl6
18:50 TimToady japhb: yes, that's pretty close to the mark, though I'd view events more in category 1, with some way to say "each dispatch to this object/multi spawns a thread"
18:54 overrosy joined #perl6
18:57 birdwindupbird joined #perl6
19:04 japhb TimToady, ah, OK, thank you.
19:06 [Coke] so, now that i'm trying to run pugs ona mac, I have the same problem ... benabik? had. all the test files seem to be in a utf-8 or us-ascii charset. so why is pugs complaining about utf-8 (and requiring iso8859-1 on linux?)
19:07 benabik [Coke]: I'm pretty sure GHC is reading the file and pre-processing the UTF8
19:07 benabik I have no idea if this is caused by version of GHC, OS, or what.
19:08 [Coke] benabik: what version of ghc are you using on os x?
19:08 [Coke] (I'm using 6.10.4)
19:08 benabik [Coke]: 7.0.4 from haskell-package
19:09 benabik *-platform
19:09 overrosy joined #perl6
19:11 * [Coke] tries to find a test file that complains.
19:15 sorear good driveby #perl6
19:15 phenny sorear: 18:20Z <japhb> ask sorear What have you implemented in the way of concurrency support in Niecza?  (I mean that in the general sense, including threads, AIO, event loops, STM, actors, ....)
19:15 colomon \o
19:16 [Coke] benabik: so I just ran it with no setting, and didn't get that many failures.
19:16 [Coke] (and more TODO passes than failures)
19:17 benabik No setting?
19:17 [Coke] LC_ALL is not set
19:17 sorear japhb: that which is in lib/Threads.pm6, no more, no less
19:18 sorear japhb: it's just Java/CLR style threads+monitors concurrency primitives
19:18 benabik [Coke]: I do that too but still get lots of decodeUTF8 warnings.  Is LANG set?
19:18 [Coke] (I didn't save the output, so I don't know if I got a lot of the warnings, but it doesn't seem to impact the tests on this box.)
19:18 sorear I want somthing realistic written on top of it
19:18 [Coke] benabik: can you tell me a file you get the warnings in?
19:18 benabik t/spec/integration/advent2009-day07.t
19:18 [Coke] benabik: LANG is set to en_US.UTF-8
19:19 [Coke] nope, seems fine.
19:19 [Coke] weird.
19:21 ascrazy joined #perl6
19:24 havenn joined #perl6
19:26 japhb sorear, Just to be clear, you mean "monitors" in the sense of "object with all methods implicitly run under mutex", not as in "registered event listeners", yes?
19:26 * japhb has discovered in the last week that the concurrency literature is anything but consistent in the use of certain common words ....
19:30 arnsholt japhb: Welcome to academic literature. Everyone uses their preferred terminology =)
19:33 TimToady japhb: I might argue that event dispatch to an object should behave as a monitor because objects are implicitly stateful, but dispatch to a multi should not, on the assumption that the multi code is likelier to be FP oriented
19:34 TimToady so should probably handle its own atomic {} bits
19:34 japhb arnsholt, The last time I went deep on fundamental concepts (as opposed to tight specializations, e.g. GPU programming), I was an undergrad, and my professors seemed to do a decent job of agreeing on common terminology.  With this kind of stuff?  Not so much.
19:34 pochi joined #perl6
19:34 TimToady in this case I'm scoping the "monitor" to the object, not the class, so I guess it's not a classical monitor
19:35 TimToady npi
19:36 TimToady heavy revision to all but first entry in http://rosettacode.org/wik​i/Balanced_brackets#Perl_6
19:38 japhb arnsholt, though given that it's been a couple decades since college, perhaps the academics have just had more time to come up with diversity of definition.  :-)
19:41 TimToady but certainly per-object locking/queueing will scale better than per-class, which doesn't even make a lot of sense under inheritance
19:41 japhb TimToady, I'm not entirely sure I buy that dispatch to a multi should require the programmer to know when to atomic {}.  There may be a use case I haven't thought of yet, but it seems at present that's mental load that needn't be there, if you're already fine with single method dispatch for events using monitor semantics
19:41 japhb TimToady, agreed with that last statement (and honestly, I can't see a strong need for per-class locking that isn't better served with a different WTDI)
19:42 TimToady I'd also like to be able to easily write code with multiple transactions running through it simultaneously, though it doesn't necessarily have to be default
19:43 TimToady but I'd like some way of marking the proto, so you don't have to throw async into every body
19:43 TimToady proto foo () is atomic  vs proto foo () is async, I suppose
19:45 TimToady we also need a way to dispatch that doesn't expect a response, or that manages any response via some callback mechanism
19:46 TimToady sink context isn't good enough, since you need to distinguish a sequence point at the ; boundary for imperative programma\ing
19:47 awwaiid joined #perl6
19:47 japhb TimToady, can you expand what you mean by that last statement?
19:47 TimToady foo; bar   has to wait for foo to finish
19:47 TimToady send foo; bar doesn't
19:47 TimToady fsdo send
19:48 * felher really likes the FP-oriented solution of http://rosettacode.org/wik​i/Balanced_brackets#Perl_6 :)
19:48 felher TimToady++
19:48 japhb Oh I see what you mean, you're saying that sink context shouldn't imply asynchrony automatically.
19:48 TimToady yes, we need to mark the 'go' routine calls :)
19:49 TimToady we need a shorter verb for fire-and-forget
19:49 TimToady faf foo  :)
19:50 japhb BTW, I noted an attempt in the existing S17-concurrency to try to do some of that "async return" via CONTROL exceptions.  What are your thoughts on that?
19:51 TimToady maybe it's another contextualizer...maybe I already added it, and it's 'race foo'
19:51 thou joined #perl6
19:52 TimToady well, race in sink context, to thorw away the return
19:52 TimToady japhb: I think that's probably insane
19:53 TimToady unless we teach exceptions to work like that anyway
19:53 TimToady we do need a story for where thread exceptions go
19:54 japhb I think I had roughly the same sequence of thoughts.
19:54 TimToady but merely blowing up the spawner when the spanee goofs up seems a bit untoward
19:54 japhb Eh, what's a little blowing up between friends?
19:54 TimToady druther have a bit more error encapsulation there somehow
19:55 TimToady much like a waitpid() can tell you how the child process finished
19:56 TimToady but possible propagation to the parent might be a default, in the absense of other handling
19:56 TimToady hafta think about that
19:58 japhb Maybe "child thread needs to report an error" is just another event you can listen to
19:58 japhb (going with the SIGCHLD path)
20:02 TimToady or if you are emulating call/return, could callback with a failure value
20:03 TimToady more the "you made a promise and then broke it" model
20:04 araujo joined #perl6
20:04 TimToady if we allow async routines to return lazily via promises
20:04 TimToady another way of breaking the sequence pointness of ;
20:05 TimToady but we've avoided scalar laziness for the most part till now
20:06 TimToady but you can view a promise as a scalar feed, a pipe with one value coming on it
20:06 TimToady so certainly promises can be emulated, if not native
20:07 TimToady in any case, feeds are very much *not* sequence points
20:08 TimToady hmm, nobody ever fed me lunch...
20:08 TimToady no wonder my head feels strange(r)
20:17 overrosy joined #perl6
20:22 * masak submits (<[ ]> xx 10).pick(*).join rakuobug
20:23 masak TimToady: '\\' «leg« $s.comb # that's sick/cool :P
20:23 TimToady darn, missed the chance for a Xleg pun though
20:24 TimToady and X can be lazy, so we could reject a string in the middle that hits gambler's ruin without combing it all out
20:25 masak I think merlyn would go on a rampage if he saw the results of infix:<leg> being summed by [\+] -- or is it just summing boolean values that he doesn't like?
20:25 TimToady assuming .none is also sufficiently lazy
20:26 TimToady yes, well, he would not like the interchangability of map/for either, I suspect
20:26 masak I remember one p6l email where he said something like "Bool::True should be 42 or something to dissuade people from doing this kind of stuff!"
20:26 TimToady but we all change our views over time, so I don't want to prevent anyone from repenting earlier views :)
20:27 masak nodnod
20:27 masak it just stayed with me for some reason.
20:27 masak nom: constant True = 42; say True
20:27 p6eval rakudo fee891: OUTPUT«True␤»
20:27 masak hm.
20:27 benabik r: constant True = 42; say +True
20:27 * masak submits rakudobug
20:27 p6eval rakudo fee891: OUTPUT«1␤»
20:27 benabik Huh
20:27 masak good rakudobug day today ;)
20:28 benabik Oh, I was thinking it was an enum not getting numified.  blah.
20:30 jnthn Great, not being able to change the truth is a bug :P
20:30 phenny jnthn: 16:40Z <japhb> tell jnthn Ah, great, thanks!
20:31 retup_work joined #perl6
20:31 TimToady the opposite of OUTER truth is INNER truth...  :P
20:32 ranguard Hi, is there someone who looks after perl6.org? - basically I'd like to redirect http://dev.perl.org/perl6/* somewhere and didn't know if you want to create an archive and host it?
20:32 pmurias joined #perl6
20:33 * ranguard isn't sure what is useful / what's not etc
20:33 masak ranguard: hi, we all look after perl6.org -- some more than others.
20:33 masak are you saying http://dev.perl.org/perl/* is going away?
20:33 TimToady if you have a github account, you could put it there yourself
20:34 jnthn masak: perl6/*
20:35 masak uhm. meant that.
20:35 ranguard masak: hthe stuff in /perl6/ is not current, and just a bit confusing, I'd like to just link to it on the perl6.org site then you've got everything in one place
20:35 masak sounds like a generally good idea to collect things under perl6.org, yes.
20:35 ranguard TimToady: ok, will do :)
20:35 TimToady hugme: add ranguard to perl6
20:36 hugme TimToady: You need to register with freenode first
20:36 masak I've always loved this page: http://dev.perl.org/perl6/architecture.html
20:36 [Coke] hugme: add ranguard to perl6
20:36 hugme [Coke]: sorry, you don't have permissions to change 'perl6'
20:36 [Coke] hugme: biteme
20:36 TimToady hugme: add ranguard to perl6
20:36 * hugme hugs ranguard. Welcome to the perl6 github organization
20:37 ranguard thanks :)
20:37 TimToady uh, assuming that's your github nick
20:37 ranguard it is
20:37 TimToady have the appropriate amount of fun
20:37 TimToady hopefully not negative
20:38 ranguard I'll call it /archive/ and put everything in there - can be pulled out by someone who knows what stuff actually is :)
20:39 TimToady thanks
20:41 ranguard https://github.com/perl6/perl6.org is still readonly for me :(
20:43 TimToady checking
20:43 jnthn iirc, you need git@github.com:/perl6/perl6.org in order to push
20:44 arnsholt You do. HTTP isn't really a write-y protocol
20:45 arnsholt But if you've cloned from HTTP, you can switch over to the SSH one by editing .git/config
20:46 ranguard Sorry, I mean if I goto that URL github only shows me the read-only URLs
20:46 TimToady they had some security issues recently, so maybe passwords got reset of something
20:46 japhb You *can* do write access via HTTPS to git in general, but perhaps just not github.
20:46 TimToady it's making me say I forgot my passowrd...
20:47 doy fairly sure you can write to github over https
20:47 japhb The passwords didn't get reset, but all of the SSH keys got de-trusted.  You have to manually re-trust them.
20:47 arnsholt TimToady might be onto something. They had hole that let people upload keys, so you have to audit your keys
20:47 japhb arnsholt, exactly.
20:47 mj41 joined #perl6
20:49 TimToady I'm guessing hugme is not considered trusted
20:53 TimToady and I seem to have misplaced the button to add new users on the website o_O
20:55 TimToady okay, you're added
20:55 TimToady (I think)
20:55 ranguard TimToady: wonderful, thanks :)
20:56 vlkv joined #perl6
20:57 dalek perl6.org: c210507 | (Leo Lapworth)++ | README:
20:57 dalek perl6.org: Fix spelling
20:57 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/c210507fff
20:57 TimToady obviously it worked \o/
20:57 ranguard guess it worked, I'll sort it in the next couple of days :)
20:57 masak ++ranguard
20:59 ksi joined #perl6
21:08 japhb (backlogging) TimToady, going back and reading S06's section on the feed operator, it looks like you had already specced feed to a scalar to be relatively smart: spawning a thread on a the blunt end, making the scalar contain a lazy, fully structured output from that thread.  As long as we say that exceptions from that subthread are not thrown immediately but instead show up in the feed result, that gets us halfway there.
21:11 pernatiy joined #perl6
21:16 bluescreen100 joined #perl6
21:42 masak does `my @nums of Int` mean the same as `my Int @nums`?
21:43 masak ah; S09 seems to indicate it does.
21:45 jnthn Yes
21:45 jnthn Though not in Rakudo yet.l
21:46 jnthn Also, why are you calling it @nums if it's full of Ints :P
21:48 japhb @lies
21:48 pyrimidine @stars
21:48 * masak .oO( because I'm a p6cc contestant, and my code is being ruthlessly deconstructed by strangers )
21:48 benabik my @it of Star
21:49 masak nom: my Int @a = 1, 2, "HAHAHA", 4; say "alive"
21:49 p6eval rakudo fee891: OUTPUT«alive␤»
21:49 masak nom: my Int @a = 1, 2, "HAHAHA", 4; say @a
21:49 p6eval rakudo fee891: OUTPUT«1 2 HAHAHA 4␤»
21:49 donaldh joined #perl6
21:49 masak nom: my @a of Int = 1, 2, "HAHAHA", 4; say @a
21:49 p6eval rakudo fee891: OUTPUT«1 2 HAHAHA 4␤»
21:49 masak neither works in enforcing type, it seems.
21:49 jnthn masak: Only for indexing.
21:49 masak so I don't see what jnthn means by "not in Rakudo yet" :)
21:49 masak oh, indexing.
21:49 masak nom: my Int @a; @a[0] = "HAHAHA"; say "alive"
21:49 p6eval rakudo fee891: OUTPUT«Type check failed in assignment to '$v'; expected 'Int' but got 'Str'␤  in block <anon> at /tmp/RuJsGGlCTw:1␤␤»
21:50 masak nom: my @a of Int; @a[0] = "HAHAHA"; say "alive"
21:50 p6eval rakudo fee891: OUTPUT«alive␤»
21:50 masak ah.
21:50 jnthn I think I didn't do it for the assignment because I expected pmichaud++ to be fixing that up at some point "soon". :/
21:52 thou joined #perl6
21:54 jnthn (iirc there is still some buglet in assignment, but it's a corner case)
21:54 jnthn It's the one that very occasionally means you see whinings about splicing Mu.
21:55 masak ah.
22:10 FACEFOX joined #perl6
22:10 att joined #perl6
22:17 masak nom: my $s = "ha ha ha haaa ha haa"; say ($s ~~ m:g/ha+/).WHAT
22:17 p6eval rakudo fee891: OUTPUT«Bool()␤»
22:17 masak "if you want the list of matches in Perl 6, use .comb", right?
22:18 masak it's not reasonable of me to expect m:g// to return a list of things, right?
22:18 benabik r: (m:g/ha+/).WHAT.say
22:18 p6eval rakudo fee891: OUTPUT«Method 'match' not found for invocant of class 'Any'␤  in block <anon> at /tmp/zHslu2LtBQ:1␤␤»
22:19 retup_work joined #perl6
22:19 masak nom: my $s = "ha ha ha haaa ha haa"; say $s.comb(/h(a+)/)
22:19 p6eval rakudo fee891: OUTPUT«ha ha ha haaa ha haa␤»
22:21 masak nom: my $s = "ha ha ha haaa ha haa"; say $s.comb(/h(a+)/, :match)
22:21 p6eval rakudo fee891: OUTPUT«ha ha ha haaa ha haa␤»
22:21 masak nom: my $s = "ha ha ha haaa ha haa"; say $s.comb(/h(a+)/, :match)>>[0]
22:21 p6eval rakudo fee891: OUTPUT«=> <a>␤ => <a>␤ => <a>␤ => <aaa>␤ => <a>␤ => <aa>␤␤»
22:21 masak nom: my $s = "ha ha ha haaa ha haa"; say $s.comb(/h(a+)/, :match)>>[0]>>.Str
22:21 p6eval rakudo fee891: OUTPUT«a a a aaa a aa␤»
22:21 * jnthn -> sleep, night
22:23 felher o/
22:25 masak 'night, jnthn-san.
22:39 jlaire joined #perl6
22:39 Jerkwad joined #perl6
22:41 masak 'night, #perl6
22:44 tadzik 'evening #perl6
22:44 felher night masak, welcome tadzik :)
22:45 tadzik huh, am I a night owl or what :)
22:45 tr-808_ joined #perl6
22:46 felher sure ;)
22:48 tadzik I was looking for a new phone today; I have a feeling that I only like things that angular (edgy?)
22:50 felher and, were you lucky?
22:50 tadzik well, I think I'll settle for Nokia N900, which is not available in Poland anymore it'd seem :)
22:51 overrosy joined #perl6
22:51 felher tadzik: now that i see you and you are into all the POD-stuff: how do the specs get converted to html?
22:52 felher ah, i phone with a real keyboard, not just touch :)
22:52 tadzik felher: using https://github.com/perl6/Pod-To-HT​ML/blob/master/lib/Pod/To/HTML.pm
22:53 tadzik felher: essentialy, it looks like when it'd collide with a car, the car will turn out more damaged ;)
22:54 felher tadzik: that is _only_ real kind of phone :D
22:54 felher tadzik++ # pod2html
22:54 tadzik yeah, a true descendant of good, ol' 3310
22:54 tadzik flussence++ for all the real work
22:54 felher flussence++ :)
23:02 skids joined #perl6
23:02 Vespakoen joined #perl6
23:05 wentam joined #perl6
23:06 sudokode joined #perl6
23:12 wentam how would I match anything except for a particular character in a regex?
23:13 tadzik <-[c]>
23:14 Vespakoen left #perl6
23:14 tadzik that is "every character but not »c«"
23:14 wentam tadzik, ty
23:14 tadzik yw
23:15 tadzik welcome to #perl6, we have cookies
23:15 * moritz returns from a lost table tennis game, and wants a cookie
23:15 tadzik poor moritz. Have a cookie!
23:17 * moritz -> sleep
23:18 * moritz waves to the cookie monster
23:18 * tadzik waves back
23:18 tadzik have a nice rest
23:30 benabik joined #perl6
23:35 colomon cookies?
23:35 whiteknight joined #perl6
23:35 tadzik yeah, go ahead
23:35 colomon what kind?
23:36 tadzik whatever you want, I'm paying today :)
23:36 colomon \o/
23:36 benabik solid gold.  :-D
23:36 colomon uck, too chewy
23:36 tadzik cookie gold at least
23:36 flussence .oO( hey now wait a minute, I only wrote part of a thing that does stuff with a Pod AST, tadzik++ wrote the parser - that's the hard part! )
23:37 tadzik flussence: from us two, you're the only who knows HTML :P
23:37 tadzik colomon: have another, today we party :)
23:38 colomon mmmm, peanut butter
23:38 tadzik . o O ( much butter )
23:45 wolfman2000 joined #perl6

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

Perl 6 | Reference Documentation | Rakudo