Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-09-03

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:08 TimToady the basic problem is that P5 is too closely attached to its stack model; this is also the problem with XS
00:08 TimToady well, one of the problems
00:08 fgomez joined #perl6
00:15 cognominal if everything could be implemented using the perl5 engine, there would be no point inventing/using another engine for Perl 6.
00:15 mhasch sjn: ... and funnily stated, too: "line noise visually encapsulated into a small pill that's easy to swallow"
00:16 MikeFair joined #perl6
00:16 cognominal but hard to digest?
00:17 mhasch probably easily enough digested, but lacking juice :-)
00:23 TimToady one of those "unneeded dietary supplements" kind of things
00:23 TimToady mostly harmless
00:25 MikeFair joined #perl6
00:26 benabik joined #perl6
00:48 xdf joined #perl6
00:55 * [Coke] grabs the latest NQP which is QAST enabled.
00:56 [Coke] nqp docs/bootstrapping.pod is for nqp-rx, not npq.
00:57 pmichaud indeed.
01:01 [Coke] is docs/QASTMAP killable?
01:01 pmichaud probably need to ask jnthn++ for that
01:03 jeffreykegler joined #perl6
01:09 Targen joined #perl6
01:09 scott__ joined #perl6
01:23 [Coke] if I'm using QAST, is there a "use" statement I need to include
01:23 [Coke] ?
01:26 dayangkun joined #perl6
01:27 [Coke] pmichaud: http://feather.perl6.nl/~coke/foo.nqp
01:27 [Coke] nqp foo.nqp -e "eek"
01:27 [Coke] Unable to obtain ast from NQPMatch
01:30 [Coke] if I add "make" as i suspect is needed, I get a NPMCA
01:31 REPLeffect joined #perl6
01:41 [Coke] I assume I need to wrap it in QAST::Stmts somehow.
01:45 dayangkun joined #perl6
01:56 gongyiliao joined #perl6
02:05 FROGGS_ joined #perl6
02:22 orafu joined #perl6
02:31 jeffreykegler joined #perl6
02:39 sirrobert How can I delete a method from a class at runtime?  (opposite of .^add_method)
02:39 sirrobert I tried del_method delete_method rem_method remove_method
02:40 sirrobert really I want to *replace* a method, but I can't use add_method if one already exists
02:48 sorear as far as I know, you can't
02:48 sorear the default class system takes advantage of the append-only nature of classes for optimization
02:49 sirrobert ok, hmmm
02:49 sirrobert I am trying to add to a grammar during runtime
02:49 sorear if you want to radically change the accepted methods at runtime you probably should be using a fallback instead
02:49 sirrobert know of another way I can do that?
02:49 sorear why do you need to delete methods to add to a grammar?
02:49 sirrobert (that is, I can add_method to add a new token... but I need to be able to rewrite TOP to recognize the new token
02:49 sirrobert or, rewrite some token, anyway
02:49 benabik Why not just use inheritance?
02:50 sirrobert hmmmmmmmmmmmmmmmmm
02:50 sirrobert (trying to think of how that would be structured in this context)
02:50 sirrobert so every time a new rule is added (maybe a few dozen times), just create a new grammar, inherit from the current "head" grammar
02:50 sorear sirrobert: 1. STD uses inheritance to dynamically alter the grammar 2. this is what protoregexes are for!
02:50 benabik sorear++
02:50 sirrobert hmmmmmm protoregexes...
02:51 sirrobert I'm out of my depth on this.  I want to be in my depth on it by Wednesday =)
02:51 sirrobert any example code I can read about that?
02:51 sirrobert mostly I just need syntax help
02:52 erkan joined #perl6
02:52 erkan joined #perl6
02:52 sirrobert reading an advent calendar entry about ... protoregexes, maybe? =)
02:53 colomon sirrobert: maybe.  :)
02:53 colomon sirrobert: https://github.com/perl6/std/blob/master/STD.pm6 has examples, but the advent calendar might be a more sensible place to start.
02:53 colomon (as std is crazy complex)
02:54 sirrobert colomon: heh ok
02:54 sirrobert bookmarking it though
02:55 sirrobert p6 has a learning curve similar to vim's
02:55 sirrobert that's not a bad thing, but it's a thing =)
02:55 sirrobert now that I'm good at vim, I'm very good at it... but when I wasn't ... I wasn't
02:56 colomon sirrobert: rumor had it you're doing p6 stuff for $work, can you talk about it?
02:56 sirrobert a bit =)
02:56 sirrobert anything in particular you want to know
02:56 sirrobert (and yes, I am)
02:56 colomon Just the basics, all I know I've already said, and I'm curious.
02:56 sirrobert well,
02:57 sirrobert we started a company a bit over a year ago
02:57 * colomon is planning on starting a p6 http://en.wikipedia.org/wiki/ISO_10303-21 parser soon for $work, biggest hurdle at the moment is figuring out what to name the github repo / p6 module.
02:57 sirrobert (we = me and my CTO/co-founder)
02:57 sirrobert we did R&D for a year (had a govt grant)
02:57 colomon oo, nice
02:58 sirrobert my partner had done a PhD dissertation and got his degree for the invention we're commercializing
02:58 sirrobert but it was written in crazy shell scripts and stuff... a university research environment
02:58 sirrobert so we ported it to ruby
02:58 sirrobert (for the grant), and made it all conceptually solid and what not
02:59 kaleem joined #perl6
02:59 sirrobert then, after doing some marketing research (meaning talking to prospective customers and such)
02:59 sirrobert we ... re-wrote everything from the ground up
02:59 sirrobert more powerful, broader concept.  bigger platform (in the "Big Data" space)
02:59 sirrobert "advanced analytics" type stuff
02:59 sirrobert anyway
02:59 sirrobert now we're using a LISP and P6
02:59 tokuhiro_ joined #perl6
03:00 colomon quite a combination!
03:00 sirrobert we're having fun =)
03:00 sirrobert it was cool though that our LOC dropped amazingly
03:00 sirrobert like ...
03:00 sirrobert 50%+ reduction
03:00 colomon that's always nice!
03:01 sirrobert heh nod
03:01 sirrobert it turns out the LISP we're using is great for certain stuff
03:01 sirrobert but it's expressiveness is ...
03:01 sirrobert well, let me put it this way
03:01 sirrobert (sorry for the sketchy lack of details... more forthcoming, but I have to be a little secretive right now... we're in preliminary sales =)
03:02 sirrobert So, LISP trades semantic complexity for syntactic simplicity
03:02 sirrobert I realized that P6 does the reverse
03:03 sirrobert so when we wanted to represent real-world concepts (in a way that's accessible to end users), P6 is GREAT for modelling that
03:03 sirrobert LISP is great for modeling more "idealized" concepts
03:03 sirrobert (no one wants a LISP API)
03:03 sorear colomon: ISO-10303-21::Parser
03:03 sirrobert anyway, I've really had almost no trouble with P6
03:04 sorear colomon: don't worry too much about squatting on valuable namespace, we have :auth<cpan:COLOMON> for that
03:04 sirrobert the hardest thing is the lack of docs... there's so much syntax
03:04 colomon sirrobert++
03:04 colomon sorear: that's a very... dry name.
03:04 sirrobert oh, and DBI/ORM would be nice ;)
03:05 sirrobert but really docs.  We can write a DBI or ORM easily, if we can figure out what features are currently available.
03:05 colomon sorear: the other is my overall idea is a small set of ISO-10303-21 (ugh) tools, not just a parser.
03:06 sirrobert colomon: anyway, I'm happy to tell you more if you have any particular questions
03:06 colomon *other... thing? ... I think I meant to say.
03:06 sirrobert if I can =)
03:06 colomon sirrobert: nah, I'll let you get back to work.  But I'm very glad you're doing that, and wish you the best of luck.
03:06 sirrobert thanks =)
03:07 colomon sorear: btw, I'm anticipating the ISO-10303-21 might be good for profiling ... I have huge ISO-10303-21 files to throw at the parser.  Though I suppose they're most not things I can redistribute.
03:08 colomon afk # bedtime
03:15 cognominal p6: say  'a,a' ~~ /  'a'  % ',' /
03:15 p6eval rakudo 962b9b: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix / instead␤at /tmp/rq1q_9CORF:1␤»
03:15 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Unrecognized regex metacharacter % (must be quoted to match literally) at /tmp/NAW2KKBFn7 line 1:â�¤------> [32msay  'a,a' ~~ /  'a'  %[33mâ��[31m ',' /[0mâ�¤â�¤Unable to parse regex; couldn't find final '/' at /tmp/NAW2KKBFn7 li…
03:15 cognominal hum
03:23 cognominal p6: say  'a,a' ~~ /  'a'  %* ',' /
03:23 p6eval niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Unrecognized regex metacharacter % (must be quoted to match literally) at /tmp/dmUV9rd1NG line 1:â�¤------> [32msay  'a,a' ~~ /  'a'  %[33mâ��[31m* ',' /[0mâ�¤â�¤Unable to parse regex; couldn't find final '/' at /tmp/dmUV9rd1NG l…
03:23 p6eval ..rakudo 962b9b: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix / instead␤at /tmp/x1Q9PBGP0c:1␤»
03:23 cognominal p6: say  'a,a' ~~ /  'a'*  % ',' /
03:24 p6eval niecza v21-1-ga8aa70b: OUTPUT«#<match from(0) to(3) text(a,a) pos([].list) named({}.hash)>␤»
03:24 p6eval ..rakudo 962b9b: OUTPUT«「a,a」␤␤»
03:24 sorear o/ cognominal
04:02 Circlepuller std: 0.say;
04:02 p6eval std 2f65afc: OUTPUT«ok 00:00 40m␤»
04:02 kaleem joined #perl6
04:02 Circlepuller std: -4.abs.Str.say;
04:02 p6eval std 2f65afc: OUTPUT«ok 00:00 41m␤»
04:02 Circlepuller lol
04:04 Circlepuller rakudo: <A B C>.length.say;
04:04 p6eval rakudo 962b9b: OUTPUT«No such method 'length' for invocant of type 'Parcel'␤  in block  at /tmp/RZyHpFd069:1␤␤»
04:04 Circlepuller o
04:05 Circlepuller rakudo: <A B C>.*.say;
04:05 p6eval rakudo 962b9b: OUTPUT«===SORRY!===␤Confused␤at /tmp/tpPoiReW5f:1␤»
04:05 Circlepuller interesting
04:06 sorear o/ Circlepuller, I have not yet said hi to you
04:06 Circlepuller 'ello
04:06 sorear std: say "ok 00:00 41m"
04:06 p6eval std 2f65afc: OUTPUT«ok 00:00 41m␤»
04:07 sorear Circlepuller: what are you trying to do?
04:08 Circlepuller just toy around
04:09 sorear r: <A B C>>>.say
04:09 p6eval rakudo 962b9b: OUTPUT«C␤A␤B␤»
04:09 sorear b: <A B C>>>.say
04:09 p6eval b 922500: OUTPUT«A␤B␤C␤»
04:09 sorear b: <A B C>>>.say
04:09 p6eval b 922500: OUTPUT«A␤B␤C␤»
04:09 sorear pugs: <A B C>>>.say
04:09 p6eval pugs: OUTPUT«B␤C␤A␤»
04:09 sorear pugs: <A B C>>>.say
04:09 p6eval pugs: OUTPUT«B␤C␤A␤»
04:09 sorear pugs: <A B C>>>.say
04:09 p6eval pugs: OUTPUT«B␤C␤A␤»
04:09 sorear pugs: <A B C>>>.say
04:09 p6eval pugs: OUTPUT«B␤C␤A␤»
04:09 sorear wasn't there a vesion that did it randomly?
04:11 Circlepuller r: <A B A B B C C C>.uniq.say;
04:11 p6eval rakudo 962b9b: OUTPUT«A B C␤»
04:11 Circlepuller r: <A B A B B C C C>.uniq>>.say;
04:11 p6eval rakudo 962b9b: OUTPUT«C␤A␤B␤»
04:11 Circlepuller r: <A B A B B C C C>.uniq>>>>.say;
04:11 p6eval rakudo 962b9b: OUTPUT«===SORRY!===␤Missing << or >>␤at /tmp/C2lchSKmsP:1␤»
04:11 Circlepuller interesting
04:31 xinming joined #perl6
04:33 kaleem joined #perl6
04:43 xinming joined #perl6
05:30 bruges joined #perl6
05:30 moritz \o
05:50 fgomez joined #perl6
05:51 stepnem joined #perl6
05:56 nodmonkey joined #perl6
05:56 sorear is A.A.Alexeev a #perl6er?
05:58 felher good morning #perl6 :)
06:00 xinming joined #perl6
06:02 sorear good morning felher
06:04 masak morning, #perl6
06:04 sorear o/ masak !
06:06 dalek ecosystem: 6ca5f0c | (Alexandr A Alexeev)++ | META.list:
06:06 dalek ecosystem: added XML::Parser::Tiny
06:06 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/6ca5f0c5db
06:06 dalek ecosystem: 708e6f5 | GlitchMr++ | META.list:
06:06 dalek ecosystem: Merge pull request #9 from afiskon/patch-1
06:06 dalek ecosystem:
06:06 dalek ecosystem: added XML::Parser::Tiny
06:06 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/708e6f5779
06:07 felher o/ masak  :)
06:11 wtw joined #perl6
06:14 xinming joined #perl6
06:17 tadzik g'morning
06:18 masak tadziku! \o/
06:18 sorear tadzik!!!!!
06:24 tadzik masak! sorear! \o/
06:34 am0c joined #perl6
06:46 jaldhar joined #perl6
06:47 SamuraiJack joined #perl6
06:49 Cofyc joined #perl6
06:54 Cofyc joined #perl6
07:01 am0c joined #perl6
07:01 brrt joined #perl6
07:04 simcop2387 joined #perl6
07:16 spider-mario joined #perl6
07:47 FROGGS joined #perl6
07:49 masak rn: say (class {}).^name
07:49 p6eval niecza v21-1-ga8aa70b: OUTPUT«ANON␤»
07:49 p6eval ..rakudo 962b9b: OUTPUT«<anon>␤»
07:49 masak rn: say (class {}) === (class {})
07:49 p6eval niecza v21-1-ga8aa70b: OUTPUT«False␤»
07:49 p6eval ..rakudo 962b9b: OUTPUT«True␤»
07:49 masak o.O
07:49 masak Rakudo! really, "True"?
07:50 masak r: say (class { has $.x }) === (class {})
07:50 p6eval rakudo 962b9b: OUTPUT«True␤»
07:50 masak r: say (class { method foo {} }) === (class {})
07:50 p6eval rakudo 962b9b: OUTPUT«True␤»
07:50 masak r: say Rat === (class {})
07:50 p6eval rakudo 962b9b: OUTPUT«False␤»
07:51 * masak submits rakudobug
07:53 Circlepuller r: "\x032,4TEST".say
07:53 p6eval rakudo 962b9b: OUTPUT«2,4TEST␤»
07:53 Circlepuller aww
07:53 Circlepuller r: "\aTEST".say
07:53 p6eval rakudo 962b9b: OUTPUT«===SORRY!===␤Unrecognized backslash sequence: '\a' at line 2, near "TEST\".say"␤»
07:55 Circlepuller r: printf "%c", <7 ''>
07:55 p6eval rakudo 962b9b: OUTPUT«»
07:55 Circlepuller r: printf "%c", <7 ''>
07:55 p6eval rakudo 962b9b: OUTPUT«»
07:55 Circlepuller heh
07:55 Circlepuller heh
07:55 Circlepuller r: printf "%c", <7 ''>
07:55 p6eval rakudo 962b9b: OUTPUT«»
07:58 masak Circlepuller: arguments like <7 ''> don't flatten in Perl 6.
07:59 wk joined #perl6
07:59 Circlepuller interesting
07:59 Circlepuller still works
08:00 FROGGS what is <7 '' > suppose to mean?
08:00 tadzik r: <7 '' >.perl.say
08:00 p6eval rakudo 962b9b: OUTPUT«("7", "''")␤»
08:00 tadzik this :)
08:00 FROGGS ya
08:00 masak n: say <7 ''>.perl
08:00 p6eval niecza v21-1-ga8aa70b: OUTPUT«(val("7"), "''")␤»
08:00 masak Niecza gets closer, though.
08:01 masak n: say val("7").^name
08:01 p6eval niecza v21-1-ga8aa70b: OUTPUT«IntStr␤»
08:01 FROGGS its sometimes hard to recognize this stuff... but I guess I get used to it some day ;o)
08:01 masak you will :)
08:02 Timbus whats the main reason for val's behaviour? like keeping whitespace around a number
08:03 Timbus is there a case where you want.. that? i mean ive written a modest bit of perl and never wanted that
08:03 masak Timbus: not sure what you mean.
08:03 masak Timbus: why do you put in whitespace in the argument to val() in the first place? :)
08:03 Hariprasad joined #perl6
08:04 Timbus i belieeb that it's mentioned explicitly in the spec
08:05 masak "In any case, use of such an intuited value as a string will reproduce the original string including any leading or trailing whitespace"
08:05 masak you belieeb correctly.
08:05 masak it seems to be a case of retaining the original string as-is.
08:06 masak like, val() provides you with two views of the object: the intended (often numeric) value, and the original string.
08:06 Timbus im just wondering if this is more an internal feature
08:07 Timbus better question: when do you use val
08:08 Timbus that might be my real question
08:08 masak ah.
08:08 masak it was created due to a need for such an internal feature, yes.
08:09 masak one use you've already seen: <1 2 3> turns into val("1") etc.
08:09 masak the other use is in MAIN argument parsing.
08:09 Timbus ooh that one makes sense
08:11 masak yes, because everything comes in as strings, but not everything is intended as strings.
08:16 fhelmberger joined #perl6
08:19 Psyche^ joined #perl6
08:23 nodmonkey joined #perl6
08:26 tadzik masak: did you see http://feather.perl6.nl/~sergot/modules/?
08:27 FROGGS__ joined #perl6
08:29 jnthn tadzik: ooh :)
08:29 tadzik jnthn: did you see http://feather.perl6.nl/~sergot/modules/? {_
08:29 tadzik :)
08:29 tadzik it's the "Have you seen this dog" situation
08:33 masak tadzik: I saw it. it's nice.
08:33 masak need real icons instead of the solid-color circles. I might be able to contribute.
08:34 xinming joined #perl6
08:34 tadzik yeah, the solid circles are LTA
08:34 jnthn I didn't mind the circles fwiw :)
08:34 FROGGS__ I like the github icon font very much....
08:34 FROGGS__ maybe this is an option too?
08:35 tadzik instead of circles? :)
08:36 dakkar joined #perl6
08:36 FROGGS__ making a font having all symbols and icons for the site included
08:36 FROGGS__ its scalable, so it looks pretty when you zoom in
08:37 tadzik hm
08:37 tadzik no idea if we have manpower for that
08:38 masak FROGGS__: http://fortawesome.github.com/Font-Awesome/
08:38 masak I used that in one of my YAPC talks.
08:39 FROGGS__ its cool, isnt it?
08:39 FROGGS__ I like it when it changes color like the text nearby when hovering over a link
08:39 masak jnthn: no, the circles don't blend in. something a little more shibui is needed there.
08:49 jnthn Well, they're not a prettiness optimum, but given the page without them or the page with them, I'd take the extra information even if it's not as pretty as we'd like just yet :)
08:50 FROGGS__ using that font-awesome shouldnt be that hard...
08:51 FROGGS__ its repo is on github, right? I can send a pull request these days
08:56 colomon joined #perl6
08:56 GlitchMr joined #perl6
08:59 tadzik yes
08:59 tadzik sergot/modules.perl6.org I think
09:01 j0hnnY joined #perl6
09:16 masak sirrobert: protoregexes. for a long time, I thought they were this fairly magical thing in grammars. but they're quite easy.
09:16 masak sirrobert: they're a nice way to make an open set of alternative ways to parse the same thing.
09:17 masak sirrobert: like, consider "term". it is a protoregex in the Perl 6 grammar. if you specified "term" as a single rule, it would one big honking alternation of things that can be terms in Perl 6.
09:19 masak sirrobert: but with protoregexes, you say "proto token term {*}", and then you can specify all the alternatives individually after that.
09:19 masak like, "token term:value", and "token term:colonpair".
09:19 masak and it's an open-ended set, so inheriting grammars can easily add to that.
09:19 sergot hi! o/
09:20 masak sergocie! \o/
09:20 tadzik oh hi
09:20 sergot \o/
09:20 masak and the LTM treats each of these alternatives as part of one big alternation, and builds efficient NFAs based on that.
09:21 jnthn The NFAs look very much like the NFAs an alternation gives too :)
09:23 masak well, because protoregexes are essentially alternations lifted to the rule level.
09:23 masak there's a shudder-inducingly nice strange consistency there between proto methods and proto regexes.
09:24 masak it's just that a "method call" to a rule involves matching text using the LTM.
09:25 mucker joined #perl6
09:26 jnthn .oO( it was shudder-incuding 'cus I had to redo multi dispatch... )
09:27 masak jnthn: you had to redo multi dispatch because of LTM?
09:27 jnthn masak: I had to redo multiple dispatch because the meaning of proto changed to look more like what proto means in regexes
09:27 jnthn masak: It hadn't used to be so strangely consistent.
09:28 jnthn That was one of the (many) changes that happened in the nom branch
09:30 masak right.
09:30 masak I hardly remember what proto usedta mean by now. but I remember liking the change.
09:31 jnthn Most people like it overall, I think. Only the change of meaning of .+ and .* was not always liked.
09:34 masak oh, right.
09:34 masak yes, they seem to have gotten less useful after that.
09:34 jnthn Well, depending on what you want.
09:37 Moukeddar joined #perl6
09:38 Moukeddar o/ perl6
09:38 Moukeddar is masak traveling or something ?
09:39 masak no, I'm here.
09:39 masak just busy.
09:41 mathw_ hello!!
09:42 masak mathw_! \o/
09:42 mathw hi masak
09:43 dbr joined #perl6
09:44 tadzik hello mathw
09:44 jnthn hi, mathw
09:45 mathw hello awesome people
09:45 mathw especially awesome Sir jnthn of the Debugger.
09:45 jnthn mathw: You tried it?
09:51 mathw it made colours :)
09:52 mathw I only tried it a little bit
09:52 jnthn :)
09:52 mathw but it's so good to know it's there
09:53 jnthn After I first demo'd it at YAPC, somebody told me afterwards they thought I had to be faking the demos. :D
09:55 tadzik :)
09:59 Gesh joined #perl6
10:07 FROGGS__ jnthn: its just to good to be true
10:07 FROGGS__ but I already tried it ;o)
10:11 snearch joined #perl6
10:11 dayangkun joined #perl6
10:19 GlitchMr https://gist.github.com/e5ac91f3edb75a4d4891
10:19 GlitchMr I was bored.
10:22 FROGGS whats that »ö« for?
10:23 GlitchMr We have robots.txt, so why not humans.txt?
10:24 GlitchMr (ok, this is too silly to be on actual site)
10:29 huf FROGGS: unicode art for the butterfly, see also topic
10:31 GlitchMr perl6: https://gist.github.com/e5ac91f3edb75a4d4891
10:31 p6eval niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Confused at /tmp/9q4XfcY5MO line 1:â�¤------> [32mhttps[33mâ��[31m://gist.github.com/e5ac91f3edb75a4d4891[0mâ�¤â�¤Undeclared routine:â�¤        'https' used at line 1â�¤â�¤Parse failedâ�¤â�¤Â»
10:31 p6eval ..rakudo 962b9b: OUTPUT«===SORRY!===␤Confused␤at /tmp/v0PHLoUe6a:1␤»
10:31 GlitchMr huh?
10:32 GlitchMr I accidentally made it private?
10:33 GlitchMr https://gist.github.com/3608429
10:33 GlitchMr perl6: https://gist.github.com/3608429
10:33 p6eval rakudo 962b9b: OUTPUT«This site owes its existence to␤* Carl Mäsak (design, content, constructive bikeshedding)␤* Carlin Bingham (pedantic bug fixing)␤* Daniel Ruoso (content, design fixes)␤* Daniel Wright (perl6.org domain)␤* Herbert Breunung (minor content)␤* Larry Wall (Perl, Perl 6,…
10:33 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«This site owes its existence to␤* Carl Mäsak (design, content, constructive bikeshedding)␤* Carlin Bingham (pedantic bug fixing)␤* Daniel Ruoso (content, design fixes)␤* Daniel Wright (perl6.org domain)␤* Herbert Breunung (minor content)␤* Larry Wall (Perl,…
10:33 GlitchMr Good :)
10:34 FROGGS huf: thanks
10:34 GlitchMr But I don't like this Camelia
10:35 GlitchMr It uses ISO-8859-1 characters
10:35 GlitchMr But that's probably a feature
10:37 huf hmm?
10:37 huf it's in utf8
10:37 GlitchMr But can be written in ISO-8859-1
10:37 huf so?
10:38 huf so can the letter P
10:38 FROGGS or the letters [GlitchMr]
10:38 GlitchMr I guess that >>o<< is in utf8 too
10:38 GlitchMr (well, technically it is)
10:39 huf are you talking about the charset or the encoding here?
10:39 huf i dont see how the word "technically" enters into this\
10:40 GlitchMr encoding, charset, whatever
10:41 huf there's no case where those two things can be whatevered\
10:41 huf >>o<< is absolutely in utf8.
10:42 am0c joined #perl6
10:42 skids joined #perl6
10:42 GlitchMr Or perhaps >>o"<< as Camelia alterantive
10:43 GlitchMr Or perhaps >>`o`<<
10:43 huf here, o: is the accepted substitute for ö
10:43 huf but that's not very visually appealing
10:46 Timbus >>(ºдಠ)<<
10:52 Timbus catch the butterfly!  `` (ノ ゜Д゜)ノ  ` »ö«
10:53 Timbus (ノ;゚Д゚)ノ»ö« ᴾᵁᵀ ᴹᴱ ᴰᴼᵂᴺ
10:54 MayDaniel joined #perl6
10:54 GlitchMr Timbus: I'm not sure if this is feature, but $ev.what contains \r at end
10:55 Timbus rrreally?
10:55 Timbus odd i never noticed that
11:01 masak doesn't sound like a feature...
11:03 Timbus not sure where the \r is coming from then
11:03 Timbus perl -e 'print "test\r\n"' | perl6 -e 'say get.perl'
11:03 GlitchMr IRC server sends \r\n
11:03 GlitchMr But Perl 6 only chomps \n
11:03 GlitchMr Probably because it's UNIX or something
11:04 Timbus but
11:04 GlitchMr Hmmm... but yeah, it's weird
11:04 Timbus or is the shell eating the \r
11:05 GlitchMr glitchmr@feather ~/SixtySixBot> cat factoids
11:05 GlitchMr { "future" : "The future is already here \u00e2\u0080\u0094 it's just not very evenly distributed.\r" }
11:05 GlitchMr Possibly...
11:05 GlitchMr Also, binary data in JSON :P
11:05 daxim joined #perl6
11:05 GlitchMr https://gist.github.com/3608585
11:05 GlitchMr Just wondering, how can I initialize variable basing on other variable?
11:05 GlitchMr I've
11:06 GlitchMr has $.file;
11:06 GlitchMr has %!content = try { from-json slurp $.file } // {};
11:06 GlitchMr But %!content tries to read $.file, so it doesn't work
11:06 hoelzro GlitchMr: maybe initialize %!content in BUILD?
11:08 GlitchMr Not really
11:09 GlitchMr $.file is Any in BUILD for some reason
11:09 GlitchMr oh, it's submethod, not method
11:09 Timbus it's initialized after build
11:10 Timbus or is that a lie
11:10 GlitchMr https://gist.github.com/3608610
11:11 Timbus yeah
11:11 GlitchMr Am I doing something wrongly?
11:12 Timbus you're making the same mistakes i made.
11:14 GlitchMr When Perl 6 is making OOP easier, overloading .new is still complicated ;)
11:14 FROGGS dont you have to access attributes from inside the class with exclamation mark instead of dot?
11:14 GlitchMr Exclamation mark is for private attributes
11:14 Timbus i think the solution was a custom new
11:15 Timbus or, grab '$file' in build as a parameter and use that instead of $.file
11:15 FROGGS IMO you just use the dot when declaring the attrib
11:16 FROGGS do you wanna pass $.file to new() ?
11:16 GlitchMr Yes
11:16 GlitchMr Also, https://gist.github.com/3608623
11:17 xinming joined #perl6
11:17 GlitchMr (by the way, prefix thing is worst hax ever)
11:18 Timbus lol, oh i see
11:18 Timbus yeah i wouldn't rely on that
11:18 FROGGS try that: https://gist.github.com/3608624
11:19 FROGGS fiddled around with this stuff this weekend
11:20 GlitchMr Works
11:20 FROGGS cool
11:20 FROGGS try using the dot instead of !
11:21 FROGGS shoudnt work
11:21 GlitchMr 13:21:40   @GlitchMr | 66, add camelia »ö«
11:21 GlitchMr 13:21:44   @GlitchMr | 66, camelia
11:21 GlitchMr 13:21:44 SixtySixBot | GlitchMr: »ö«
11:21 GlitchMr Good
11:22 * Timbus looks at FROGGS gist
11:22 Timbus uh..
11:22 Timbus hm
11:23 Timbus something about that feels wrong but im not savvy enough to pick it
11:23 FROGGS about what exactly?
11:23 GlitchMr { "future" : "The future is already here \u00e2\u0080\u0094 it's just not very evenly distributed.\r", "camelia" : "\u00c2\u00bb\u00c3\u00b6\u00c2\u00ab\r" }
11:23 GlitchMr Except I still have weird \r
11:24 FROGGS whats your $*OS ?
11:25 tokuhiro_ joined #perl6
11:25 GlitchMr It's feather dev server
11:25 GlitchMr But it reports "linux"
11:25 FROGGS k
11:25 FROGGS I was thinking you might use macos
11:26 GlitchMr Would Perl 6 even compile on Classic Mac OS ;)?
11:26 daxim people still use classic?
11:26 FROGGS well, I guess
11:28 GlitchMr I'm not sure, but today Perl 6 is used on two platforms - Unix-like and Windows
11:28 Timbus FROGGS, i think what I don't like is the 'new' method. you can just remove it and use  .new(file => $filename)
11:28 FROGGS my guess was that say using os specific line endings, and print will not
11:28 Timbus which is far more perl6ish
11:29 FROGGS Timbus: but what if I dont want named params?
11:29 FROGGS like DateTime.new
11:29 FROGGS give it something, and according to its type it does some magic or not
11:29 GlitchMr But perhaps in future Perl 6 will support platforms like VMS or Android ;)
11:29 GlitchMr (ok, Android is sort of Unix, I know)
11:30 FROGGS I believe Android is already supported somehow
11:30 crazycow joined #perl6
11:30 GlitchMr Without Debootstrap?
11:30 FROGGS no idea
11:31 GlitchMr But, I guess it's possible
11:31 GlitchMr I already have Perl 5 on my Android phone
11:32 FROGGS cool, is there a howto to do that?
11:33 FROGGS I thought the Android support got stuck in 2008
11:34 GlitchMr http://code.google.com/p/perldroid/wiki/Compiling5160
11:36 GlitchMr I've Perl on unrooted phone BTW ;)
11:36 FROGGS cool cool cool
11:36 FROGGS I always wanted to do that
11:36 FROGGS porting my games to my phone ;o)
11:39 GlitchMr I also have bash, vim, busybox and mc :)
11:39 FROGGS mc++
11:39 FROGGS *g*
11:39 FROGGS thats always the first thing I install on my boxes
11:39 FROGGS so you are able to use cpan on it?
11:40 GlitchMr Well, pure Perl modules work
11:40 FROGGS great
11:40 FROGGS of course it wont compile xs stuff
11:40 GlitchMr Well, if you would install C compiler... possibly
11:40 FROGGS but I have to find a way to load libs somehow
11:40 GlitchMr Not that I have space for that on my device
11:41 GlitchMr Every executable is on /data partition
11:41 GlitchMr I want this to work without rooting, so I cannot make ext2 partition on SD card or anything like that
11:42 GlitchMr But if you have rooted phone, I guess you can try making ext2 partition on SD card or something
11:44 ChoHag joined #perl6
11:44 FROGGS hmmm, I'll give it a try and let you know...
11:45 GlitchMr http://dl.dropbox.com/u/63913412/SC20120903-134346.png
11:45 tadzik Perl 5 runs natively on my phone, but it's 5.8.6 or something
11:46 GlitchMr I also found this screenshot on my Dropbox: http://dl.dropbox.com/u/63913412/android.png
11:47 gongyiliao joined #perl6
12:01 ivan`` joined #perl6
12:04 cognominal r:   my $rxa = /a/; my $rx = / $rxa /;  say 'match' if 'a' ~~ $rx; say $<rxa>
12:04 p6eval rakudo 962b9b: OUTPUT«match␤Any()␤»
12:05 cognominal By similarity with grammars, I would expect $<rxa> to return 'a'. Am I wrong?
12:06 jnthn Yes
12:06 jnthn You need to explicitly capture it
12:06 cognominal ok, that's fine by me.
12:07 cognominal I wanted to be sure that was intended behavior
12:14 cognominal Sep 03 05:24:53 <sorear>o/ cognominal
12:14 cognominal \o sorear and every one
12:24 moritz o/
12:25 * moritz at his first day at $new_work
12:25 brrt \o moritz
12:25 brrt what kind of $new_work
12:26 brrt probably not construction, but thats just me guessing
12:26 moritz perl 5 programming
12:27 pmichaud ...people still use that?  ;-)
12:28 masak those Perl 5 people are desperate. they put big fives on their conf shirts just so that people will take notice.
12:29 masak moritz: have the appropriate amount of new work ;)
12:30 moritz masak: takk :-)
12:32 * masak sings New Work, New Work
12:32 zby_home_ joined #perl6
12:48 Timbus joined #perl6
12:50 JimmyZ joined #perl6
12:53 Cofyc joined #perl6
12:55 PacoAir joined #perl6
13:10 TimToady funny to call it jet *lag* when it makes you wake up several hours early...
13:14 jnthn heh :)
13:18 FROGGS TimToady: I call them Aaron or David when I wake up hours earlier ;o)
13:18 FROGGS but, hey, just 16 years to go -.-
13:20 jaldhar joined #perl6
13:36 bbkr joined #perl6
13:39 bbkr perl6 -e '-1' # should this code work as in p5 ? in latest star it breaks because it thinks −1 is an option.
13:39 bbkr with "Option -e needs a value, but is followed by an option" error
13:40 moritz bbkr: that's an error, please submit a bug report for it
13:40 masak bbkr++
13:40 * bbkr reports
13:43 Circlepuller_ joined #perl6
13:45 jnthn stockholm &
13:48 ast left #perl6
14:05 masak sometimes the simplest path to solving a problem is to translate it to a different model, solve it there, and translate back.
14:06 whiteknight joined #perl6
14:06 masak I wish there were more tools in modern programming languages for doing this three-step thing.
14:08 flussence .oO( /usr/bin/schwartz )
14:09 masak yes, the Schwartzian transform is a good example of this. there are many more.
14:10 TimToady transform Perl 5 design to Perl 6 design, fix Perl 6, backport to Perl 5
14:10 flussence :D
14:10 masak ;)
14:11 sisar joined #perl6
14:11 felher joined #perl6
14:11 sisar o/ #perl6 !
14:11 masak sisar! \o/
14:11 estrai hi, I heard some rumors about plans to put Perl6 on JVM, is there any truth in that, if yes is there a space that has more details?
14:11 masak for example, if I want to add an index before the first heading of an HTML document, created out of all the headings in that document... I'd much rather solve the text matching/rewriting problem as a tree rewriting problem.
14:12 masak estrai: interesting, you're the second person to ask in less than 48 hours. is there some source of information about this that we don't know about?
14:12 bbkr std: q…say # is this STD bug (should be interpreted as .say on empty quoted string) or Rakudo bug (because it accepts this syntax)?
14:12 p6eval std 2f65afc: OUTPUT«[31m===[0mSORRY![31m===[0m�Couldn't find terminator … at /tmp/AcvWJzAI7G line 1 (EOF):�------> [32mdo bug (because it accepts this syntax)?[33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 40m�»
14:12 masak estrai: (yes, there are plans to make Rakudo target multiple VMs.)
14:12 bbkr r: q...say
14:12 p6eval rakudo 962b9b: OUTPUT«␤»
14:13 masak std: q...say
14:13 p6eval std 2f65afc: OUTPUT«ok 00:00 40m␤»
14:13 bbkr estrai \o/
14:13 estrai masak: my source is someone who went to YAPC
14:13 masak bbkr: I see no conflict there between STD and Rakudo.
14:13 flussence looks like q..\ .say to me.
14:13 masak estrai: ok. yes, that was discussed at YAPC::Europe.
14:14 masak flussence: it is.
14:15 flussence r: q․.․.say
14:15 p6eval rakudo 962b9b: OUTPUT«.␤»
14:15 bbkr nvm, my stupid IRC client changed 3x dot to tripple dot char :)
14:16 bbkr .u ...
14:16 phenny U+0020 SPACE ( )
14:16 phenny U+0021 EXCLAMATION MARK (!)
14:16 phenny U+0022 QUOTATION MARK (") [...]
14:19 masak bbkr: maybe switch to a less stupid IRC client?
14:21 daxim loldium
14:27 estrai masak: is there any other information available, ie conclusion of the discussions / anyone working on JVM implementation?
14:29 masak estrai: well, here's what's going on. Rakudo has needed to be prepared for other VMs. part of that has been removing (Parrot-specific) PIR from the project. if I'm not mistaken, the last big bit was removed with the last branch, toqast, on Rakudo.
14:30 masak there's a corresponding toqast branch in nqp (on which Rakudo is built) that also needs to land.
14:30 masak but these are just the last refactors in a long line of refactors leading up to being positioned for VM independence.
14:31 masak I'm less clear what needs to be done now, beyond "port nqp to another VM".
14:31 [Coke] Didn't toqast in nqp just land this weekend?
14:31 masak oh, maybe.
14:31 FROGGS__ joined #perl6
14:31 * masak has been distracted lately :)
14:32 gfldex Merge latest master into toqast.  jnthn authored 2 days ago
14:33 * [Coke] does dislike that artifact of git merging.
14:34 [Coke] "but I'm IN maste... oh."
14:34 flussence merges should go one direction, rebases for the other
14:35 estrai that's really nice, thanks alot for the info
14:39 kaare_ joined #perl6
14:39 smash joined #perl6
14:40 moritz eeks, the code I'm inheriting doesn't use whitespace after a comma
14:41 timotimo huh,is that a problem?
14:41 colomon timotimo: for legibility, yes.
14:42 moritz timotimo: only if I want to read the code, or write new code that follows the same "style"
14:42 colomon anyone have a clue why token reverse_solidus { '\' } is a Malformed regex ?
14:42 timotimo i inherited some c++ code where all code was put into the class definitions inside the header file ... only benefit i saw from it was that the makefile is really simple.
14:43 colomon oh, '\' is an exception to the norm?
14:43 integral joined #perl6
14:43 integral joined #perl6
14:43 timotimo wouldn't it be fairly straightforward to have an automated program fix the comma issue?
14:43 moritz colomon: because the \ escapes the '
14:43 colomon moritz++
14:44 moritz timotimo: separate class definition doesn't work if you use templates
14:44 timotimo yeah, but the code hardly does use templates at all
14:44 timotimo as in: declares three different template classes in one file, but uses the same convention for all other files as well
14:45 timotimo well, i shall not rant about other peoples' code too much. my own code is far from perfect as well :)
14:46 skids joined #perl6
14:47 sftp joined #perl6
14:49 ChoHag joined #perl6
14:57 ChoHag joined #perl6
14:58 * masak idly wonders if work has been done to automatically derive a grammar from a sufficiently well-specified class hierarchy with .Str methods
14:58 xinming joined #perl6
15:00 timotimo do i misunderstand something here? wouldn't that require .Str to be essentially a reversible function?
15:01 timotimo i would understand if you meant a .FromStr method or something like that
15:01 arnsholt masak: What are you thinking of?
15:02 arnsholt This may or may not be related to my academic speciality =)
15:08 masak arnsholt: having, say, an XML grammar be deduced from the class hierarchy of Element, Attribute, ProcessingInstruction, etc, and the way they can contain each other and serialize into XML.
15:09 masak arnsholt: that is, directly using the fact that XML parsing and XML serialization are (or should be) inverse operations.
15:21 araujo joined #perl6
15:21 araujo joined #perl6
15:26 thou joined #perl6
15:29 * colomon is off on a new project for $work: https://github.com/colomon/perl6-ISO_10303-21
15:29 xinming joined #perl6
15:31 erkan joined #perl6
15:33 masak hm, STEP?
15:33 masak oh, product manufacturing information.
15:37 colomon masak: CAD files
15:38 masak aha.
15:38 MikeFair I'd like to do something like: say("$/") in a rule to find out what got passed into it.  What can I do inside the regex to make that happen?  I read somewhere that $/ isn't valid in the middle of the match and my attempts have so far yielded nothing but an empty string (despite that there is a match string it is operatng on).  I'm just having a really hard time getting this expression right (and it seems like it should be so
15:38 MikeFair easy!)
15:39 colomon masak: and by far the most ridiculously over-wrote CAD specification I've seen.  basically it's thousands of pages of class definitions without ever stopping to tell you how the classes are intended to be used.
15:39 moritz { say "$/" }
15:39 moritz should work inside a rule
15:39 moritz that shows how much has been matched until that point
15:39 colomon masak: my current goal is a tool to help me reverse engineer STEP files.
15:40 colomon MikeFair: have you looked into the grammar debugger?
15:40 MikeFair moritz: Yeah I thought that was it, that's yielding blank for me (this is also parrot's compiler toolkit, so it's NQP)
15:40 moritz MikeFair: well, works in rakudo :-)
15:41 MikeFair moritz: :)
15:41 moritz parrot's NQP is pretty old by now
15:42 masak r: "fafafa blob" ~~ / ([f.]+) { say $/ } \s* blob /; say ?$/
15:42 p6eval rakudo 962b9b: OUTPUT«「fafafa」␤ 0 => 「fafafa」␤␤True␤»
15:42 ponbiki joined #perl6
15:42 MikeFair colomon: yes, there's also some --trace options, but I can't seem to figure out what those are either
15:42 BlueT_ joined #perl6
15:43 colomon MikeFair: yeah, I'm sure the debugger doesn't work in NQP.
15:46 dalek std: 0c2b471 | larry++ | viv:
15:46 dalek std: allow variables for /$start ~ $stop <thing>/
15:46 dalek std: review: https://github.com/perl6/std/commit/0c2b4713c0
15:46 dalek std: 6b2f25b | larry++ | CursorBase.pmc:
15:46 dalek std: support <hexdigit>
15:46 dalek std: review: https://github.com/perl6/std/commit/6b2f25ba29
15:46 dalek std: e191c3c | larry++ | STD_P5.pm6:
15:46 dalek std: more cclass and tr cleanup; parse \xffabc right
15:46 dalek std: review: https://github.com/perl6/std/commit/e191c3c265
15:48 masak it's nice to see development on STD_P5.pm6. TimToady++
15:52 am0c joined #perl6
15:55 * MikeFair goes about doing what it takes to upgrade nqp! :)
15:56 zby_home_ joined #perl6
16:00 arnsholt masak: Right. Well, if all you have are the Str methods, you're sort of into run-time properties of code without running it land
16:00 arnsholt (And the associated theorem whose name I keep forgetting)
16:00 masak *nod*
16:00 masak yeah, I think I'm looking for something more static-analyzingly than that.
16:02 arnsholt An active research field in NLP is inducing a grammar for a language solely from running text, but that's different =)
16:04 skids r: sub f (::T $g) { for ($g) -> T $h { } }; f("blah");
16:04 p6eval rakudo 962b9b: OUTPUT«Nominal type check failed for parameter '$h'; expected T but got Str instead␤  in sub f at /tmp/nyEXnQAEAB:1␤  in block  at /tmp/nyEXnQAEAB:1␤␤»
16:06 masak superstitious parentheses around $g...
16:07 masak ...but weird error. T should contain Str, no?
16:07 masak r: sub f (::T $g) { say T.^name }; f("blah")
16:07 p6eval rakudo 962b9b: OUTPUT«Str␤»
16:07 masak r: sub f (::T $g) { for $g -> T $h {} }; f("blah")
16:07 p6eval rakudo 962b9b: OUTPUT«Nominal type check failed for parameter '$h'; expected T but got Str instead␤  in sub f at /tmp/QgoutP45wf:1␤  in block  at /tmp/QgoutP45wf:1␤␤»
16:07 masak weyrd.
16:08 skids I do manage to run into some of the weirder ones, yes. :-)
16:11 masak r: sub f (::T $g) { say $g ~~ Str; say $g ~~ T; say Str ~~ T }; f("blah")
16:11 p6eval rakudo 962b9b: OUTPUT«True␤True␤True␤»
16:11 masak r: sub f (::T $g) { for $g -> $h { say Str ~~ T } }; f("blah")
16:11 p6eval rakudo 962b9b: OUTPUT«True␤»
16:12 skids it only happens in the for signature, every other place it works.
16:12 masak r: sub f (::T $g) { for $g -> $h where { say Str ~~ T } {} }; f("blah")
16:12 p6eval rakudo 962b9b: OUTPUT«True␤»
16:12 masak curious.
16:12 masak skids: mind if I submit a rakudobug?
16:12 skids please, thank you
16:12 * masak submits rakudobug
16:21 erkan joined #perl6
16:21 erkan joined #perl6
16:25 arnsholt masak: Rice's theorem
16:26 arnsholt That's the name =)
16:30 masak oh, right.
16:31 masak "It's undecidable whether a function has a certain property."
16:34 dalek roast: 1312772 | larry++ | S32-list/sort.t:
16:34 dalek roast: can't use placeholders in a hash subscript
16:34 dalek roast: review: https://github.com/perl6/roast/commit/1312772dad
16:40 s1n joined #perl6
16:41 arnsholt That's the one. For some values of function and property I'm unable to make out from the Wikipedia article
16:43 masak the value of function is "partial function", which means that the domain is too big so the function doesn't map all its values.
16:44 masak the value of property is "all non-trivial properties". where trivial is defined as "holds for all partial computable functions, or for none". I don't know exactly what that means.
16:44 masak but that makes it sound like the trivial properties aren't very interesting, and so all the interesting properties fall victim to Rice.
16:44 masak &
16:48 arnsholt Yeah, that's as far as I got
16:48 leont joined #perl6
17:14 marmay joined #perl6
17:17 MikeFair I didn't read it, but that definition of trivial makes it sound like sometest() returns true for either every partial computable function, or no function at all
17:17 dalek std: e3d3982 | larry++ | / (2 files):
17:17 dalek std: correctly parse currently defined exceptions
17:17 dalek std: review: https://github.com/perl6/std/commit/e3d39825ef
17:18 MikeFair or more specifically no partial computable function
17:20 MikeFair meaning the non-trivial properties will be true in some functions and not true in others
17:22 MikeFair at least that's my read of the sentence
17:37 diakopter phenny: ask TimToady what results when you request a value of a key that doesn't exist in a hash that stores native ints?
17:37 phenny diakopter: I'll pass that on when TimToady is around.
17:39 rindolf joined #perl6
17:39 rindolf Hi all.
17:39 diakopter o/
17:50 rindolf diakopter: what's up?
17:51 rindolf I watched the "Perl 6 Benchmarks/Optimization" talk by pmichaud on YouTube. It was nice.
17:51 rindolf Pretty impressive work on optimisations.
17:52 GlitchMr Can I do something like:
17:52 GlitchMr my $content = slurp('file') || 'File not found'
17:52 GlitchMr ?
17:52 GlitchMr So, if exception will happen, use placeholder value
17:53 dalek roast: 5397065 | larry++ | S10-packages/basic.t:
17:53 dalek roast: prefer 'can' over [can]
17:53 dalek roast:
17:53 dalek roast: (since [can] looks like it might be a character class)
17:53 dalek roast: review: https://github.com/perl6/roast/commit/53970657d6
17:53 dalek roast: e6ba01a | larry++ | S (8 files):
17:53 dalek roast: remove sigils from | and \
17:53 dalek roast: review: https://github.com/perl6/roast/commit/e6ba01a50c
17:54 GlitchMr > try {slurp('a')}.perl
17:54 GlitchMr X::AdHoc.new(payload => "Unable to open filehandle from path 'a'")
17:54 GlitchMr X::AdHoc?
17:54 GlitchMr I guess that more detailed errors are NYI
18:00 fglock joined #perl6
18:00 pmichaud ...what's with all of the "Perl 6 is out" tweets, I wonder?
18:00 pmichaud http://twitter.com/bufferzone/statuses/242647696144470016  # example
18:00 leont blame reddit
18:00 leont No, it was HN
18:01 diakopter oh dear
18:01 GlitchMr what
18:01 GlitchMr It isn't out
18:02 diakopter not in the sense they think, I'm sure
18:03 GlitchMr But why they suddenly started to say "Perl 6 is out"
18:03 GlitchMr 2012.08 is just like 2012.07
18:03 GlitchMr It's still incomplete
18:03 GlitchMr Except more complete
18:03 pmichaud yeah, that is what is a little weird... why *this release* to start saying "oh, Perl 6 is out!"
18:04 diakopter http://news.ycombinator.com/item?id=4469513
18:04 GlitchMr "a useful and usable distribution of Perl 6"
18:04 GlitchMr But that was always there
18:04 GlitchMr huh?
18:04 pmichaud anyway, I think I'm actually happy with the tweets.  Maybe it'll start to counteract the "Perl 6 is vaporware" meme  :-)
18:05 pmichaud http://twitter.com/mrmarksteadman/statuses/242566270288011264   # another one  :-)
18:05 GlitchMr "The title of this submission is in fact totally wrong. Rakudo has quarterly releases. Perl 6 is not finished."
18:05 GlitchMr Aren't they monthly?
18:06 leont Star is quarterly, right?
18:06 pmichaud it's monthly now
18:07 pmichaud we'll go back to quarterly in 2013, likely.
18:07 yves__ joined #perl6
18:07 daxim to catch up for the lack of releases during some rewrite?
18:08 * leont hopes someone will package it for ubuntu/debian, or makes it easy to build that debian package
18:09 pmichaud it's already packaged
18:10 pmichaud we time releases based on development momentum
18:10 pmichaud right now there are a lot of improvements occurring monthly, so we release monthly.  If there's less improvement taking place, we'll release quarterly.
18:10 __sri and while you are at it update the one in homebrew ;)
18:11 leont pmichaud: there where are the .debs?
18:12 pmichaud https://launchpad.net/ubuntu/+source/rakudo
18:12 leont Those are ancient and older :-/
18:13 pmichaud oh, you want up-to-date .debs  :)
18:13 leont (well, maybe the current+1 isn't ancient, but it sure isn't current either)
18:13 pmichaud ubuntu's speed is a lot slower than ours :)
18:13 pmichaud we've talked about publishing our own .debs, yes.
18:13 pmichaud it's a bit tricky, though, because we'd have to publish parrot .debs also
18:14 * __sri suddenly feels less bad about homebrew only being a month behind
18:15 GlitchMr Well, Ubuntu is supposed to be stable
18:15 GlitchMr So it includes outdated Perl 6
18:15 pmichaud and outdated parrot :)
18:15 GlitchMr Ubuntu also includes Perl 5.14.2. Not that it matters, it's still supported.
18:16 GlitchMr Perhaps I could make ppa with up-to-date Rakudo, but I don't know
18:16 leont Yeah, I'd love a ppa
18:17 leont My laptop would not be a good place to compile this sort of stuff
18:17 GlitchMr Then I will try learning how to make ppa and make one :)
18:17 frettled When $perl6_implementation is sufficiently stable that spec details don't change significantly within three years, you'll notice that it won't matter much if Ubuntu or Debian are two or three years behind :)
18:17 pmichaud 18:05 <GlitchMr> "The title of this submission is in fact totally wrong. Rakudo has quarterly releases. Perl 6 is not finished."
18:17 pmichaud where did you see that?
18:18 pmichaud I'd like to respond with "The title of this submission is in fact totally wrong.  Perl 5 has yearly releases.  Perl 5 is not finished."
18:18 GlitchMr pmichaud: 20:04:14  diakopter | http://news.ycombinator.com/item?id=4469513
18:18 frettled So right now, I think it would actually be better if these OS distributions did not confuse matters by including even Parrot, but then again, they have had similar issues with e.g. the packaging monstrosity that is ImageMagick earlier.
18:18 frettled pmichaud: and thank heavens that neither are finished!
18:19 frettled That would be a very, very sad day.
18:19 frettled A language is finished the day it lays down to die.
18:20 TimToady rn: $/ = 42;
18:20 phenny TimToady: 17:37Z <diakopter> ask TimToady what results when you request a value of a key that doesn't exist in a hash that stores native ints?
18:20 p6eval niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![31m===[0m��Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/ciDvp64RYk line 1:�------> [32m$/[33m�[31m = 42;[0m��Parse failed��»
18:20 p6eval ..rakudo 962b9b:  ( no output )
18:20 TimToady rn: $/ := 42;
18:20 p6eval niecza v21-1-ga8aa70b:  ( no output )
18:20 p6eval ..rakudo 962b9b: OUTPUT«===SORRY!===␤Cannot use bind operator with this left-hand side␤at /tmp/ETDtUr1cLN:1␤»
18:20 geekosaur stable = dead, just as in biology
18:20 TimToady rn: ($/) = 42;
18:20 p6eval rakudo 962b9b:  ( no output )
18:20 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Writing to readonly scalar␤  at /tmp/23UDmnSYaT line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4139 (module-CORE @ 571) ␤  at /home/p6eval/niecza/lib…
18:20 frettled geekosaur: no, that's completely unlike biology :)
18:21 TimToady r and n still have very different ideas of what $/ is
18:21 frettled TimToady: which one is closest to having the right idea?
18:22 TimToady not sure
18:23 TimToady diakopter: you get a fail (note that failures are allowed to violate return type constraints)
18:24 GlitchMr ok, I'm generating GPG key for PPA
18:25 colomon r: say "this, is, a, test" ~~ / [\w+]+ % ',' /;
18:25 p6eval rakudo 962b9b: OUTPUT«「this」␤␤»
18:26 colomon r: say "this, is, a, test" ~~ m:s/ [\w+]+ % ',' /;
18:26 p6eval rakudo 962b9b: OUTPUT«「this」␤␤»
18:26 colomon n: say "this, is, a, test" ~~ m:s/ [\w+]+ % ',' /;
18:26 p6eval niecza v21-1-ga8aa70b: OUTPUT«#<match from(0) to(17) text(this, is, a, test) pos([].list) named({}.hash)>␤»
18:26 diakopter TimToady: so for a hash that's trying to conserve space, the implementation needs to return the value and also mark a success flag, so the language can return the fail as appropriate?
18:28 colomon rn: say "this, is, a, test" ~~ m:s/ [\w+] [',' [\w+]]* /
18:28 p6eval rakudo 962b9b: OUTPUT«「this, is, a, test」␤␤»
18:28 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«#<match from(0) to(17) text(this, is, a, test) pos([].list) named({}.hash)>␤»
18:28 moritz sirrobert: you complained lack of docs earlier. Anything in particular that interests you?
18:29 pmichaud r: $/ := 42;    # seems to me this should be allowed by rakudo
18:29 p6eval rakudo 962b9b: OUTPUT«===SORRY!===␤Cannot use bind operator with this left-hand side␤at /tmp/_mmJdyRgJX:1␤»
18:29 pmichaud I don't know why Rakudo disallows that.
18:31 moritz pmichaud: it's probably more a case of not actively allowing it
18:31 moritz (just guessing)
18:31 moritz sergot++ # http://feather.perl6.nl/~sergot/modules/
18:32 pmichaud the error message implies it doesn't know what to do there
18:33 GlitchMr oh wait, I don't need GPG key
18:33 moritz aye
18:33 GlitchMr or I need
18:34 wk joined #perl6
18:34 pmichaud I totally cannot find where that exception (X::Bind) is being generated/thrown, either.  :-(
18:35 pmichaud (the downside to typed exceptions)
18:36 moritz $ ack -w Bind src/Perl6/
18:37 pmichaud oh, it's ['X', 'Bind']
18:37 pmichaud I was looking for X::Bind
18:37 moritz that was from a time before we supported 'X::Bind'
18:37 pmichaud silly me.
18:37 sorear good * #perl6
18:37 moritz I can change those for better greppability
18:38 pmichaud I wonder if the thrown exception should also display its type, too.
18:38 moritz I've been wondering that too
18:38 pmichaud I.e.,  "(X::Bind)  Cannot use bind operator with this left-hand-side"  instead of making me grep for the exception message to figure out the exception type
18:38 moritz maybe as http://doc.perl6.org/type/X::Bind
18:39 pmichaud could be that too.
18:39 masak sorear! \o/
18:40 * pmichaud files rakudobug.
18:41 pmichaud filed.
18:41 pmichaud lunchtime.
18:41 masak pmichaud++
18:43 s1n joined #perl6
18:44 telex joined #perl6
18:50 FROGGS_ joined #perl6
18:52 mtk joined #perl6
18:53 sorear o/ FROGGS_
18:54 pmichaud heh... on the other hand, anyone that actually follows the links in the "Perl 6 is released" tweets will land on the rakudo.org page, which is a long sequence of "Rakudo Star 2012.nn released" postings.  :-P
18:56 leont It's not bad PR
18:56 pmichaud agreed; I'm happy for the PR... it's just a little weird.  :)
18:56 FROGGS_ hi sorear
18:57 pmichaud okay, I'm afk for robotics meeting -- bbl
18:57 dalek roast: 89f0409 | larry++ | S (23 files):
18:57 dalek roast: warning suppression, mostly "not used"
18:57 dalek roast: review: https://github.com/perl6/roast/commit/89f0409efc
19:02 tipdbmp If I have the: sub flatten(|@array) { ...  } # how do I access my elements? Using @array[0, 1, ..., etc] or with the @_[0, 1, ..., etc.]?
19:03 tipdbmp r: sub flatten(|@array) { say for @array } flatten(1 .. 4);
19:03 p6eval rakudo 962b9b: OUTPUT«Obsolete use of | or \ with sigil on param @array␤===SORRY!===␤Confused␤at /tmp/Ai1RcTPy0x:1␤»
19:04 tipdbmp r: sub flatten(|@array) { say for @_ } flatten(1 .. 4);
19:04 p6eval rakudo 962b9b: OUTPUT«Obsolete use of | or \ with sigil on param @array␤===SORRY!===␤Placeholder variable '@_' cannot override existing signature␤at /tmp/WBOW3UJAUa:1␤»
19:04 TimToady semi required after }
19:04 TimToady and |@array is wrong now
19:04 TimToady just use |capture or some such
19:06 pmichaud or even just @array
19:06 TimToady and you need .say rather than say
19:06 tipdbmp right
19:06 pmichaud r: sub flatten(@array) { .say for @array); flatten(1..4);
19:06 p6eval rakudo 962b9b: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2, near "); flatten"␤»
19:06 pmichaud r: sub flatten(@array) { .say for @array }; flatten(1..4);
19:06 p6eval rakudo 962b9b: OUTPUT«1␤2␤3␤4␤»
19:07 tipdbmp r: sub flatten(@array) { .say for @array }; my ($a, $b) = 1, 2; flatten($a, $b);
19:07 p6eval rakudo 962b9b: OUTPUT«Nominal type check failed for parameter '@array'; expected Positional but got Int instead␤  in sub flatten at /tmp/9MZ0A_Ojvg:1␤  in block  at /tmp/9MZ0A_Ojvg:1␤␤»
19:08 tipdbmp r: sub flatten(@array) { .say for @array }; my ($a, $b) = 1, 2; flatten(($a, $b));
19:08 p6eval rakudo 962b9b: OUTPUT«1␤2␤»
19:09 pmichaud r: sub flatten(*@array) { .say for @array }; my ($a, $b) = 1, 2; flatten($a, $b);
19:09 p6eval rakudo 962b9b: OUTPUT«1␤2␤»
19:10 tipdbmp r: sub flatte(*@array) { .say for @array }; my @a = 1 .. 4; flatten(@a);
19:10 p6eval rakudo 962b9b: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&flatten' called (line 1)␤»
19:10 tipdbmp r: sub flatten(*@array) { .say for @array }; my @a = 1 .. 4; flatten(@a);
19:10 p6eval rakudo 962b9b: OUTPUT«1␤2␤3␤4␤»
19:16 * masak .oO( flattening won't get you anywhere... )
19:33 dalek std: 9f91d53 | larry++ | / (3 files):
19:33 dalek std: oops, that should be xdigit, not hexdigit
19:33 dalek std: review: https://github.com/perl6/std/commit/9f91d532a0
19:37 araujo joined #perl6
19:37 araujo joined #perl6
19:39 nodmonkey joined #perl6
19:50 tokuhiro_ joined #perl6
19:54 snearch joined #perl6
19:54 fridim_ joined #perl6
19:56 sivoais joined #perl6
20:00 tipdbmp r: sub flatten($a, $b, $c) { say $a, $b, $c } my @a = 1 .. 3; flatten(|@a);
20:00 p6eval rakudo 962b9b: OUTPUT«===SORRY!===␤Confused␤at /tmp/fL9tMJpeL_:1␤»
20:01 tipdbmp r: sub flatten($a, $b, $c) { say $a, $b, $c } my @a = 1 .. 3; flatten(@a);
20:01 p6eval rakudo 962b9b: OUTPUT«===SORRY!===␤Confused␤at /tmp/FtQom_Fi_P:1␤»
20:01 diakopter add a semicolon after the }
20:01 tipdbmp r: sub flatten($a, $b, $c) { say $a, $b, $c; } my @a = 1 .. 3; flatten(@a);
20:01 p6eval rakudo 962b9b: OUTPUT«===SORRY!===␤Confused␤at /tmp/64p2atdSSG:1␤»
20:01 diakopter *after, not before
20:02 tipdbmp r: sub flatten($a, $b, $c) { say $a, $b, $c }; my @a = 1 .. 3; flatten(@a);
20:02 p6eval rakudo 962b9b: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'flatten' will never work with argument types (Positional) (line 1)␤    Expected: :($a, $b, $c)␤»
20:02 tipdbmp r: sub flatten($a, $b, $c) { say $a, $b, $c }; my @a = 1 .. 3; flatten(|@a);
20:02 p6eval rakudo 962b9b: OUTPUT«123␤»
20:02 tipdbmp tnx
20:04 tipdbmp r: sub flatten($a, $b, $c) { say $a, $b, $c }; flatten(|1 .. 3);
20:04 p6eval rakudo 962b9b: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&prefix:<|>' called (line 1)␤»
20:04 tipdbmp r: sub flatten($a, $b, $c) { say $a, $b, $c }; flatten(|(1 .. 3));
20:04 p6eval rakudo 962b9b: OUTPUT«123␤»
20:04 diakopter n: sub flatten($a, $b, $c) { say $a, $b, $c }; flatten(|(1 .. 3));
20:04 p6eval niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Unable to resolve method Capture in type Range␤  at /tmp/mbgNOO8jQI line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4139 (module-CORE @ 571) ␤  at /ho…
20:05 MayDaniel joined #perl6
20:09 diakopter I didn't see a Perl 6 Report in the last few days: http://blogs.perl.org/users/perl_6_reports/
20:12 sorear that's been commented yesterday
20:12 diakopter ok
20:12 FROGGS_ hey, my name is on that page \o/
20:13 FROGGS_ now I'm famous ;o)
20:34 leont joined #perl6
20:44 Chillance joined #perl6
21:07 jnthn evening o/
21:07 mathw oh hai jnthn
21:10 FROGGS_ r: my $thing = ( sub( $a ){ ... } ); $thing.(7)
21:10 p6eval rakudo 962b9b: OUTPUT«===SORRY!===␤Variable $a is not declared␤at /tmp/ZXLAojGplz:1␤»
21:10 FROGGS_ how can I declare a?
21:11 jnthn you need a space after the word sub
21:11 FROGGS_ r: my $thing = ( sub ( $a ){ ... } ); $thing.(7)
21:11 p6eval rakudo 962b9b:  ( no output )
21:11 FROGGS_ ohh
21:11 FROGGS_ nice
21:11 FROGGS_ thanks
21:12 jnthn Otherwise it interprets it as a function call
21:12 FROGGS_ I see
21:16 masak jnthn! \o/
21:39 MikeFair joined #perl6
21:42 lizmat from doc.perl6.org:
21:42 lizmat infix orelse
21:42 lizmat Returns the first undefined argument, or else the last argument. Short-circuits
21:42 lizmat s/undefined/defined ???
21:44 sorear lizmat: that sounds like the documentation for "infix andthen"
21:44 sorear maybe they got swapped
21:45 lizmat copy/paste error, I would think
21:45 lizmat Same as infix //, except with looser precedence.
21:45 lizmat (for infix orelse)
21:46 sorear that's the correct definition of infix orelse
21:47 lizmat so, for clarity: infix orelse returns first *defined* argument, right?
21:48 diakopter I don't know whether it must check the last one for definedness.. sorear?
21:49 lizmat not according to the doc: or else the last argument
21:49 diakopter right, I agree with you it implies you don't have to check the last one
21:50 masak the point of 'orelse' (just as with '||' and 'or' and '//') is that it thunks.
21:50 masak if that's what you're asking.
21:51 diakopter huh?
21:51 masak S03's definition is like this:
21:51 masak Returns the first argument that evaluates successfully (that is,
21:51 masak if the result is defined).  Otherwise returns the result of the
21:51 masak right argument.
21:51 sorear diakopter: you're right that when passing N arguments to orelse, you only need N-1 definedness checks
21:51 lizmat so the doc is incorrect
21:51 sorear diakopter: but that's material for _Implementing Perl 6_, not the userdocs
21:53 diakopter I disagree; someone who hasn't learned about vivifying might be misled
21:53 * lizmat has a patch ready to push with s/undefined/defined
21:53 lizmat infix //
21:53 lizmat Defined-or operator. Returns the first defined operand. Short-circuits.
21:54 lizmat infix orelse
21:54 lizmat Same as infix //, except with looser precedence.
21:54 lizmat Returns the first undefined argument, or else the last argument. Short-circuits.
21:54 TimToady note that 'andthen' and 'orelse' have complementary topicalizing behavior as well, that is supposed to make it easy to write backtrackcing engines using lazy lists like STD does
21:54 TimToady *tracking
21:55 lizmat so the doc is correct for infix orelse ?
21:55 TimToady haven't looked
21:55 lizmat "Returns the first undefined argument, or else the last argument. Short-circuits."
21:56 lizmat is what it says now at the bottom of http://doc.perl6.org/language/operators
21:56 TimToady that much is true
21:56 TimToady but it also sets $! to the undefined left side when evaluating the right side
21:56 lizmat so "infix orelse" is *not* the same as "infix //"
21:57 TimToady it has additional behavior
21:57 TimToady so does 'andthen'
21:57 lizmat as infix // returns the first *DEFINED* operator, and infix orelse returns the first *UNDEFINED* operator
21:57 lizmat according to the doc
21:57 TimToady 'orelse' is not the same as p5's 'dor'
21:58 average_drifter joined #perl6
21:59 lizmat but infix // is the same as p5's // ?
21:59 * masak .oO( d'or! )
21:59 TimToady yes
21:59 TimToady (except for where p6 defined definedness differently)
21:59 TimToady refs are always true in p5, and that's not so in p6
21:59 cognominal_ joined #perl6
22:00 sorear npr: while 1 -> $x { last given 5 }; say $_
22:00 p6eval pugs: OUTPUT«*** Cannot bind to non-existing variable: "$x"␤    at /tmp/Gp1kADXx7H line 1, column 1␤»
22:00 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:â�¤  $x is declared but not used at /tmp/7iTOHxH4Gq line 1:â�¤------> [32mwhile 1 -> [33mâ��[31m$x { last given 5 }; say $_[0mâ�¤â�¤Any()â�¤Â»
22:00 p6eval ..rakudo 962b9b: OUTPUT«Any()␤»
22:00 sorear npr: (sub () { my $x; $_ = 2; while 1 -> $x { last given 5 }; say $_ })()
22:00 p6eval rakudo 962b9b, pugs: OUTPUT«2␤»
22:00 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:â�¤  $x is declared but not used at /tmp/YYdxZsjm7S line 1:â�¤------> [32m(sub () { my $x; $_ = 2; while 1 -> [33mâ��[31m$x { last given 5 }; say $_ })()[0mâ�¤â�¤2â�¤Â»
22:00 sorear huh
22:01 lizmat is there a difference between "infix orelse" and "infix andthen" ?
22:01 diakopter rn: my $x; say 1 orelse $x # TimToady, so this is wrong?
22:01 sorear npr: (sub () { my $x; $_ = 2; while 1 -> $x { 5 ~~ last }; say $_ })()
22:01 p6eval rakudo 962b9b, niecza v21-1-ga8aa70b: OUTPUT«1␤»
22:01 p6eval rakudo 962b9b, pugs: OUTPUT«2␤»
22:01 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:â�¤  $x is declared but not used at /tmp/Eoia9I_LRg line 1:â�¤------> [32m(sub () { my $x; $_ = 2; while 1 -> [33mâ��[31m$x { 5 ~~ last }; say $_ })()[0mâ�¤â�¤2â�¤Â»
22:01 lizmat there is not according to the doc on docs.perl6.org
22:01 sorear lizmat: orelse and andthen are opposites
22:02 lizmat then the documentation is incorrect, as they *both* currently state:
22:02 diakopter TimToady: lizmat is asking about a possible typo in the documentation. "undefined" instead of "defined"
22:02 sorear npr: (sub () { my $x; $_ = 2; while 1 -> $x { $_ = 5; last }; say $_ })() #OK
22:02 p6eval rakudo 962b9b, niecza v21-1-ga8aa70b, pugs: OUTPUT«5␤»
22:02 sorear wtf, why isn't this breaking!?
22:02 lizmat "Returns the first undefined argument, otherwise the last argument. Short-circuits."
22:03 sorear lizmat: you were right all along, there is a typo in the description of 'orelse'.  diakopter and TimToady are making orthogonal points
22:03 lizmat ack
22:03 lizmat pushing fix
22:03 dalek doc: 8759962 | (Elizabeth Mattijsen)++ | lib/operators.pod:
22:03 dalek doc: Fixed copy/paste error in infix orelse documentation
22:03 dalek doc: review: https://github.com/perl6/doc/commit/8759962316
22:03 diakopter sorear: what orthogonal point am I making?
22:03 sorear diakopter wants to make explicit the fact that 'orelse' doesn't call .defined on its rightmost argument
22:04 diakopter that was before the last 4 messages
22:04 sorear TimToady wants to make explicit the fact that 'orelse' topicalizes $!
22:04 lizmat should these types of info not be part of the docs?
22:05 sorear rpn: Int orelse say $!
22:05 p6eval pugs: OUTPUT«*** No such subroutine: "&orelse"␤    at /tmp/Gocg0GMqW7 line 1, column 5 - line 2, column 1␤»
22:05 p6eval ..rakudo 962b9b, niecza v21-1-ga8aa70b: OUTPUT«Any()␤»
22:05 sorear would appear that the $! topicalization is not currently implemented by anyone
22:05 TimToady nobody actually implements that part yet
22:06 sorear should we document stuff that isn't implemented?
22:06 lizmat perhaps not…  :-)
22:06 diakopter if not, which implementations would have to implement it to qualify
22:06 masak 'night, #perl6
22:07 TimToady it's not actually as important as having 'andthen' topicalize $_, I think, since one is usually more interested in adding successful constraints than unsuccessful ones
22:07 lizmat 'night masak, and 'night #perl6
22:07 TimToady if STD is any indication, failure just implies backtracking, and you're not usually interested in why it failed
22:07 TimToady in regex terms, || doesn't usually care why the left side didn't match
22:10 mucker joined #perl6
22:10 TimToady if you look at the P5 output of STD, there are more than 1000 instances of 'my $C=shift;', generally used to pass in the last candidate (or candidates, if it's a lazy list)
22:11 TimToady those are what are supposed to be replaced by the topicilization of 'andthen'
22:11 TimToady *cal
22:12 TimToady those are candidate cursors in the case of STD, but they can be any backtracking choice points
22:13 TimToady that's how we're trying to get P6 close to the notion of logic programming
22:13 TimToady it's most of what you need to write a unification engine, I think
22:16 TimToady just need something resembling junction processing to handle all the threading through binding unbound parameter slots
22:18 diakopter TimToady: does Perl 6 throw an exception if an array or hash is modified by another thread while being iterated? or what?
22:20 TimToady we're looking at a single-owner mechanism that might catch that, and perhaps implement rw/readonly params as well
22:20 TimToady it would imply every write operation has to check ownership though
22:21 TimToady but reads would be free for the non-owner
22:21 TimToady one could implement an exclusive iterator that claims ownership under that view
22:21 diakopter ok, multiple can iterate
22:21 diakopter oh
22:21 TimToady but we'd rather push things toward immutable semantics by default
22:22 TimToady and some things will always just be erroneous, I suspect
22:22 diakopter "we're looking at"..?
22:22 TimToady talked about it at YAPC::EU
22:23 TimToady or maybe it was in Perl, don't remmeber
22:25 diakopter so.. describe what you're leaning towards
22:25 average_drifter joined #perl6
22:26 diakopter iterators take read locks and a writer waits for a write lock?
22:26 diakopter iterators take read locks and a writer fails on writing?
22:27 diakopter a 2nd iterator blocks until the first is done?
22:29 diakopter I guess I need "a single-owner mechanism that might catch that, and perhaps implement rw/readonly params" explained more
22:32 TimToady well, for scalar access, it's simply the owner can write, and anyone else can read (assuming these operations are fast and appear to be atomic)
22:33 TimToady there is more than one model of composite behavior however
22:34 TimToady you can have transactionally protected iterators that have "snapshot" semantics
22:34 diakopter a lock-free, wait-free, non-blocking hash implementation I saw does that for iteration
22:35 diakopter er, redundant
22:35 TimToady or you can just say "it's erroneous to modify something that people are iterating through, if that results in inconsistent data"
22:36 diakopter where inconsistent data would mean not seeing one of the keys available at the start of the iteration, or seeing a key twice
22:36 TimToady under the single-owner model, you'd handle the transactions by having the transaction manager be the owner for enough of the time to direct traffic
22:37 diakopter if the hash implementation can handle it, can concurrent iterations/writes be allowed?
22:37 TimToady or just violating some constraint
22:37 TimToady "all these things need to add up to 42"
22:38 TimToady presumably
22:39 diakopter ok; I'll assume the same for the array
22:39 TimToady but Perl's hash semantics don't guarantee that
22:39 TimToady (currently)
22:41 TimToady one could also set up some kind of generational hash, where an iterator knows which generation it's iteerating and ignores new values
22:41 TimToady and deleted values don't get GC'd until nobody is interested in that generation anymore
22:42 leont A lock-free hash? I'm not sure it'd be possible, but would more strongly doubt it's performance
22:42 TimToady but there are external things that look Associative that we may have difficult enforcing transcational support for
22:43 leont No common architecture has stuff instructions like DWCAS that are necessary to do interesting things in a sane yet lock-free way
22:43 TimToady so I'm not sure Associative should imly that by default
22:43 TimToady and some of these things may be hard on some VMs
22:44 diakopter this looks interesting: http://www.cs.rice.edu/~javaplt/javadoc/concjunit4.7/org/cliffc/high_scale_lib/NonBlockingHashMap.html
22:44 TimToady but I do like the owner model, if only because it resembles a capabilities model rather than a prohibitions model
22:45 diakopter ^ public domain
22:45 * leont doesn't like the owner model, TBH
22:46 * TimToady dislikes the idea of using proxies to prevent writing
22:46 TimToady when most processing involves reading rather than writing
22:47 TimToady writes violate immutability, so writes should bear the overhead, not reads
22:47 whiteknight joined #perl6
22:48 TimToady it's also nicely transitive; if you aren't the owner, you can't give away ownership either
22:49 leont diakopter: that link is interesting
22:49 TimToady so if we use such a model for parameters, a readonly parameter that you pass down to another routine is still readonly without any extra effort
22:50 diakopter leont: it depends a lot on the semantics of Java's volatile, so I don't know how easy it would be to mimic in another standalone VM
22:50 diakopter also there isn't a way to store ints or floats as values to the keys; only references
22:50 leont It's fairly easy to do C++11, and fairly easy but generally unportable to do in C on most architectures
22:51 TimToady diakopter: an implementation using that might restrict keys to boxed values, I suppose
22:51 leont Can't comment on specific VMs though
22:52 diakopter the reason is it depends on sentinels and boxed values as another form of marker
22:52 diakopter sentinels for both keys and values
22:52 TimToady my %foo{int} would be forbidden, but my %foo{Int} okay
22:52 diakopter aww
22:54 diakopter leont: I'm interested in reading about how to do Java 'volatile' in C - do you have some links?
22:55 TimToady and the owner model accounts for the large majority of bindings being readonly without regard to whether the caller has ownership
22:55 leont diakopter: it's essentially using volatiles too, but you only use atomic operations
22:56 diakopter leont: ok; thx
22:56 TimToady and the default for a readonly binding is to do nothing (other than making sure things are set up that the caller has a different id from the callee)
22:56 leont And sometimes memory barriers too
22:56 leont e.g.: http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html
22:57 TimToady and multiple writers can still be handled with proxies that send requests to the actual owner for serialization
22:58 diakopter should one try to abstract the atomic operations at the processor level or for particular compilers
22:58 xinming joined #perl6
22:58 leont C++11 did just that: http://en.cppreference.com/w/cpp/atomic/atomic :-)
22:59 diakopter right, but what should one do in C
22:59 diakopter processor or compiler
23:00 leont You could do the same, though small differences get annoying. GCC's functions are type-overloaded, MSVC's aren't for example
23:00 TimToady C was never a portable language, merely ubiquitous...
23:00 diakopter I wonder if they all support writing 8 bytes on 32-bit
23:00 leont Then again, most of the time you want compare-and-swap on either a pointer or an integer
23:03 leont I wouldn't assume any architecture can write more than its wordsize atomically
23:05 eiro_ joined #perl6
23:06 eiro joined #perl6
23:11 diakopter decommute from the lonely office &
23:17 Guest8767 joined #perl6
23:18 Stefler hi
23:19 integral joined #perl6
23:19 integral joined #perl6
23:23 dalek perl6-roast-data: 87320dc | coke++ | p (2 files):
23:23 dalek perl6-roast-data: today
23:23 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/87320dc1fd
23:23 dalek perl6-roast-data: dc124df | coke++ | / (4 files):
23:23 dalek perl6-roast-data: today
23:23 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/dc124df22b
23:23 dalek perl6-roast-data: 1684404 | coke++ | p (2 files):
23:23 dalek perl6-roast-data: today
23:23 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/1684404242
23:23 dalek perl6-roast-data: f94fc20 | coke++ | p (2 files):
23:23 dalek perl6-roast-data: today
23:23 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/f94fc2098d
23:23 dalek perl6-roast-data: d2f35c5 | coke++ | / (4 files):
23:23 dalek perl6-roast-data: today
23:23 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/d2f35c5eb3
23:23 dalek perl6-roast-data: fca7b5f | coke++ | p (2 files):
23:23 dalek perl6-roast-data: today
23:23 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/fca7b5fb3b
23:26 sorear Stefler: hi
23:53 kenjiskywalker joined #perl6

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

Perl 6 | Reference Documentation | Rakudo