Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-05-07

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:00 sjohnson rakudo: say (" cow ", " pig ", " chicken").trim-leading.perl
00:00 p6eval rakudo 1eef08: OUTPUT«"cow   pig   chicken"␤»
00:00 sjohnson rakudo: say (" cow ", " pig ", " chicken").WHAT
00:00 p6eval rakudo 1eef08: OUTPUT«Parcel()␤»
00:01 sorear TimToady: What's so "if we can get away with it" about 128-bit types?
00:01 sjohnson rakudo: my @a = " cow ", " pig ", " chicken"; say @a.trim-leading.perl
00:01 p6eval rakudo 1eef08: OUTPUT«"cow   pig   chicken"␤»
00:01 sjohnson can the trim work on lists / parcels too? or strings only
00:02 sjohnson rakudo: my @a = " cow ", " pig ", " chicken"; say @a.trim.perl
00:02 p6eval rakudo 1eef08: OUTPUT«"cow   pig   chicken"␤»
00:02 TimToady sorear: all the 64-bit folks will say "we already can do 64 bits in hardware, why should we have to work as hard as the people emulating 64-bits on 32-bit architectures?"  :)
00:03 * sorear thinks bitd+ should be a macro-type-family
00:03 TimToady yeah, was thinking that myself
00:03 TimToady the generic routines would be interesting
00:05 TimToady though, I suppose as soon as you can push an arbitrary bitstring into bigint representation, it gets kinda boring again
00:05 sjohnson rakudo: my @a = " cow ", " pig ", " chicken"; say ~@a.trim.perl
00:05 p6eval rakudo 1eef08: OUTPUT«"cow   pig   chicken"␤»
00:05 ash_ in the llvm, you can make an integer of iNNNN where NNNN is 1 to 2 ^ 32 -1
00:05 ash_ it emulates it if your hardware doesn't support it
00:05 TimToady then there's the weird ones like num80
00:06 TimToady ash_: does that include things like i24?
00:06 ash_ its float support isn't nearly that dynamic
00:07 TimToady or just powers of 2?
00:07 ash_ TimToady: yeah, that would work
00:07 sjohnson TimToady: do you have any thoughts on whether you can trim sets in p6, on Lists (in p6, are they called parcels?)
00:08 ash_ when it compiles to native code it might upgrade that to a i32, but in the llvm-ir form it does all its bounds checkings as a i24
00:08 TimToady sjohnson: I don't know what you're asking.
00:09 sjohnson i'm looking at Str.pod and i see that strings can trim whitespace, which is to be expected.  but i was wondering if you could do a @a = @b.trim
00:09 sjohnson or would one just use the map
00:09 TimToady or a hyper
00:10 ash_ @a = @b.>>trim  ?
00:10 TimToady @b».trim
00:10 ash_ ah, my bad . on the wrong side
00:10 TimToady @b».=trim to do it in place
00:10 sjohnson rakudo: my @a = " cow ", " pig ", " chicken ", my @b = @a.map($_.=trim); say @b.perl
00:10 p6eval rakudo 1eef08: OUTPUT«Method 'trim' not found for invocant of class ''␤current instr.: '!dispatch_.=' pc 438 (src/glue/dispatch.pir:117)␤»
00:11 ash_ rakudo: my @a = " cow ", " pig ", " chicken ", my @b = @a.map({$_.=trim}); say @b.perl
00:11 p6eval rakudo 1eef08: OUTPUT«[[]]␤»
00:11 TimToady um, s/,/;/
00:11 sjohnson rakudo: my @a = " cow ", " pig ", " chicken "; my @b = @a.map($_.=trim); say @b.perl
00:11 p6eval rakudo 1eef08: OUTPUT«Method 'trim' not found for invocant of class ''␤current instr.: '!dispatch_.=' pc 438 (src/glue/dispatch.pir:117)␤»
00:11 ash_ rakudo: my @a = " cow ", " pig ", " chicken "; my @b = @a.map({$_.=trim}); say @b.perl
00:11 p6eval rakudo 1eef08: OUTPUT«["cow", "pig", "chicken"]␤»
00:11 sjohnson thanks guys
00:11 ash_ rakudo: my @a = " cow ", " pig ", " chicken "; my @b = @a.map({ *.trim }); say @b.perl
00:11 p6eval rakudo 1eef08: OUTPUT«[{ ... }, { ... }, { ... }]␤»
00:12 lichtkind good night
00:12 sjohnson this is some cool stuff to look forward to
00:12 ash_ is that legal? to do *.trim
00:12 ash_ or is it @a.map *.trim;  ?
00:14 sjohnson i suppose.. rakudo can tell us!
00:14 k23z__ joined #perl6
00:15 sjohnson rakudo:   my @a = " cow ", " pig ", " chicken ";  @a>>.trim; say @a.perl
00:15 p6eval rakudo 1eef08: OUTPUT«[" cow ", " pig ", " chicken "]␤»
00:15 sjohnson rakudo:   my @a = " cow ", " pig ", " chicken ";  @a>>.trim.perl;
00:15 p6eval rakudo 1eef08:  ( no output )
00:15 * sjohnson scratches head
00:15 ash_ rakudo:  my @a = " cow ", " pig ", " chicken "; @a>>.=trim; @a.perl
00:15 p6eval rakudo 1eef08:  ( no output )
00:15 ash_ rakudo:  my @a = " cow ", " pig ", " chicken "; @a>>.=trim; @a.perl.say
00:15 p6eval rakudo 1eef08: OUTPUT«["cow", "pig", "chicken"]␤»
00:15 sjohnson heh
00:15 sjohnson forgot to say it
00:16 sjohnson oops
00:16 sjohnson thanks ash_, you saved me much confusion
00:16 sjohnson perl 6 hero
00:16 ash_ @a>>.trim is not going to modify @a, its going to make a new @
00:16 sjohnson my @a = " cow ", " pig ", " chicken ";  @a>>.=trim.perl.say;
00:17 sjohnson rakudo:  my @a = " cow ", " pig ", " chicken ";  @a>>.=trim; @a.perl.say;
00:17 p6eval rakudo 1eef08: OUTPUT«["cow", "pig", "chicken"]␤»
00:17 sjohnson <--- impressed with perl6
00:17 ash_ don't forget, >> doesn't make it do it in order, it will autothread in the future, so the results are out of order
00:19 sjohnson really?
00:19 sjohnson just when i thought i understood it all
00:19 sjohnson <--- goes back to the drawing board
00:20 * diakopter had already forgotten that TimToady already answered my question about casting
00:20 sjohnson hello dia
00:21 diakopter hello sjo
00:22 sjohnson ( `ー´)
00:22 ash_ isn't there a sequential hyper op?
00:22 diakopter preparing to copy/paste yet another section of my C# code
00:22 ash_ I don't see it anymore in the spec
00:23 ash_ sjohnson: Look up the <== op
00:23 sjohnson ash_: that's easier said than done.  what would i google for?
00:23 sjohnson everytime i try to google for operators, frustration results
00:23 ash_ S03 and S07
00:24 diakopter ooo that's an idea
00:24 ash_ <== blows my mind
00:24 diakopter all the operators should also be indexed by each's written-out name
00:25 diakopter in the synopses I mean. so google would find "left-angle equal equal"
00:25 ash_ <== is the Feed operator
00:25 ash_ also take/gather are nifty
00:26 sjohnson yeah
00:27 sjohnson looks like ash_ is referring to the Sequencer technology
00:29 ash_ doing: my @b <== grep { ... }, @a; makes @b lazy, it only evaluates the grep when it needs to, so you get a list being fed into another list lazily
00:29 sjohnson i think i need to have someone dumb it down for me
00:30 sjohnson ahh nevermind, i think i get it
00:30 sjohnson but i am not sure of when i would use it.  perhaps my script programming needs are too basic :/
00:30 ash_ when you don't know when something will end, its always nice to be lazy and only evaluate when you have to
00:32 ash_ its like when your parsing a log for instance, if you have a really big apache log that is say 400 mb, you don't want to load all of that into memory, you normally grab 1 line at a time
00:33 sjohnson TimToady: a question if i may.  are the trailing/leading Str functions part of the Perl 6 spec, or just a feature that Rakudo adds?
00:34 sjohnson Str.pod doesn't mention them *sad face*
00:34 ash_ you mean like 123.Str ?
00:34 sjohnson rakudo: say " cow ".trim-trailing # like this
00:34 p6eval rakudo 1eef08: OUTPUT« cow␤»
00:35 ash_ ah, i think the spec is out of date on those
00:37 chitragupt joined #perl6
00:37 lue o hai
00:38 sjohnson the answer to this question has the potential to make leaps and bounds in terms of perl progress for anally-retentive guy's lik eme
00:41 sjohnson hmm.. i suppose i will have to wait for an answer some other day
00:42 lue sjohnson: I can't imagine rakudo implementing something unspecced.
00:42 lue My guess is they talked about it, but never got to speccing it.
00:43 sorear lue: you mean like macros, or the Perl6::Compiler API, or ...?
00:43 sjohnson my thoughts as well
00:43 sorear rakudo: say Perl6::Compiler.compile("2+2", target => 'past')
00:43 p6eval rakudo 1eef08: OUTPUT«Capture[0x2bd95c8]␤»
00:43 sorear rakudo: say Perl6::Compiler.compile("2+2", target => 'pir')
00:43 p6eval rakudo 1eef08: OUTPUT«␤.HLL "perl6"␤␤.namespace []␤.sub "_block59"  :anon :subid("18_1273192021.04975")␤    .param pmc param_72 :slurpy␤.annotate "line", 0␤    .const 'Sub' $P63 = "19_1273192021.04975" ␤    capture_lex $P63␤.annotate "line", 1␤    get_hll_global $P61, "!UNIT_START"␤    .const 'Sub'
00:43 p6eval ..$P63…
00:43 kst joined #perl6
00:44 yinyin joined #perl6
00:50 plobsing joined #perl6
01:00 lue would it be a good idea to set the initial values for my variables in a class in some sort of init, or right before all my methods?
01:01 [Coke] "about as necessary as a waterproof camel"
01:02 ash_ lue: why not do class Foo { has $.a = 123; } ?
01:03 lue I'm going to have to "initialize" them anyway (NES emulator), but just curious if there was any sort of special thing do to.
01:03 ash_ you can do a BUILD or new if you want
01:04 ash_ http://perlgeek.de/blog-en/perl-6/object-construction-and-initialization.html talks about object initialization, from moritz_++
01:06 lue Thank you.
01:09 lue I need to make it so the NES "boots up" correctly. BUILD seems perfect for that.
01:18 lue rakudo: class Hi { submethod BUILD { say %args; }; };  Hi("hi")
01:18 p6eval rakudo 1eef08: OUTPUT«Symbol '%args' not predeclared in BUILD␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
01:18 lue rakudo: class Hi { submethod BUILD { say %_; }; };  Hi("hi")
01:18 p6eval rakudo 1eef08: OUTPUT«Placeholder variables cannot be used in a method at line 11, near "; };  Hi(\""␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
01:19 ash_ rakudo: class Hi { submethod BUILD { say %_; }; };  Hi.new(:a<"hi">);
01:19 p6eval rakudo 1eef08: OUTPUT«Placeholder variables cannot be used in a method at line 11, near "; };  Hi.n"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
01:19 lue just wondering how you get what's passed to BUILD.
01:20 ash_ rakudo: class Hi { method new(%kw) { say %kw; }; };  Hi.new(:a<"hi">);
01:20 p6eval rakudo 1eef08: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤current instr.: 'perl6;Hi;new' pc 393 (EVAL_1:55138937)␤»
01:21 ash_ BUILD should have all the values already
01:22 lue I just need the user to input a couple of file directories. Wondering if that can happen using just BUILD...
01:22 lue rakudo: class Hi { submethod BUILD { say %_; }; };  Hi("hi" => $a)
01:22 p6eval rakudo 1eef08: OUTPUT«Placeholder variables cannot be used in a method at line 11, near "; };  Hi(\""␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
01:22 lue rakudo: class Hi { submethod BUILD { say %args; }; };  Hi("hi" => $a)
01:22 p6eval rakudo 1eef08: OUTPUT«Symbol '%args' not predeclared in BUILD␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
01:23 ash_ rakudo: class Hi { method new(*%kw) { say %kw; }; };  Hi.new(:a<hi>);
01:23 p6eval rakudo 1eef08: OUTPUT«a  hi␤␤»
01:23 ash_ you'd probably need to do that in .new
01:24 lue yeah. Hello, bless()
01:24 colomon lue: if you can't imagine Rakudo implementing something unspecced, you need to stretch your imagination.  :)
01:24 lue er, see terms and conditions for details (?)
01:25 lue (I should have put an asterisk at the end)
01:25 lue (then again, I'm writing an _emulator_. Be pretty stunning not to need to call bless)
01:25 lue I probably meant s/unspecced/not discussed/
01:27 colomon True that most things get discussed here before they are added.
01:27 colomon (though I added a log-e method yesterday on my lonesome.  think it should be probably be private and therefore not spec'd in the long run.)
01:28 lue .oO(is it used to build wall-e ? :) )
01:29 chitragupt joined #perl6
01:30 lue .oO( remind me never to look in the spec if I want to use something within the next five minutes :) )
01:31 colomon It's used to implement log, at any rate.  That could be used for waste disposal, I suppose....
01:32 lue I could use a new hous-e. Can you get me a few log-e's? </puntrain>
01:34 lue afk
01:36 chitragupt joined #perl6
01:40 alester joined #perl6
01:52 JimmyZ joined #perl6
01:54 szabgab joined #perl6
01:54 chitragupt joined #perl6
01:59 Psyche^ joined #perl6
02:10 agentzh joined #perl6
02:17 TimToady < ash_> don't forget, >> doesn't make it do it in order, it will autothread in the future, so the results are out of order
02:17 TimToady this is not quite correct
02:17 TimToady just because it is calculated in any order doesn't mean the results are returned in any order
02:17 ash_ ah, did that change?
02:17 TimToady never been different
02:18 TimToady it's only if you have side effects like .say that you notice the out-of-orderness
02:18 colomon the work might be done in any order, but the result list is always in the same order the data went in.
02:18 TimToady but the result will always be ordered, or hypers are completely useless
02:19 colomon rakudo: say (1..10 >>+>> 1).perl
02:19 p6eval rakudo 1eef08: OUTPUT«1..[11]␤»
02:19 colomon bother
02:19 colomon rakudo: say ((1..10) >>+>> 1).perl
02:19 p6eval rakudo 1eef08: OUTPUT«[2, 3, 4, 5, 6, 7, 8, 9, 10, 11]␤»
02:20 colomon so it might do, say, 5 + 1 before it does 3 + 1 -- but the final order will always look like that.
02:21 sorear Why are parrot STRINGs so complicated?
02:23 colomon sorear: this is the wrong channel to ask that.  ;)
02:24 sorear colomon: I was hoping that I'd get a better answer by asking slightly further away
02:25 colomon and you might well be right.  :)
02:25 TimToady too many conflicting requirements, like the space shuttle
02:26 TimToady and perhaps a penchant to re-invent type information with properties
02:28 TimToady mix in several doses of premature optimization; stir well
02:30 plobsing joined #perl6
02:32 TimToady also, reliance on icu figures in there
02:35 TimToady there have been plans to simplify the string model in an NFGish fashion, but not enough collective tuits to get there
02:37 sorear As I understand it, the plan is for NFG to be used only as a complication
02:37 TimToady they may see it that way :/
02:38 TimToady the real simplification would be to allow compact arrays of ints to be used as strings
02:38 TimToady and reduce strings to an api, basically
02:39 TimToady they're too isolated in their own little black box currently
02:40 TimToady it might actually help to prototype an NFG implementation in Perl 6
02:40 TimToady once we get bufs
02:40 TimToady most of the Unicode tables can be borrowed right out of Perl 5
02:45 colomon masak++
02:48 pugssvn r30577 | lwall++ | [mixin.t] move declaration of @array out to where it can be seen by more than one block
02:51 pugssvn r30578 | lwall++ | [mixin.t] a better fix is to move the block boundary
03:07 tylerni7 joined #perl6
03:13 ash_ how much is involved with unicode? is it easy to do without say ICU ?
03:15 jhuni joined #perl6
03:25 sorear TimToady: the thing is, "NFG" is being added as just another string representation
03:26 TimToady yeah...btw, I just looked at quasi unquoting, and it does let you interpolate text as well as ast, so you could a declared name, for instance
03:27 molaf joined #perl6
03:27 ash_ "you could a declared name" ?
03:27 TimToady interpolate
03:28 TimToady or should I say, 'Interpolate "interpolate".'
03:28 ash_ lol
03:28 sorear TimToady: talking to me?
03:28 TimToady yes
03:29 kst joined #perl6
03:29 sorear How do you interpolate text?
03:29 TimToady by returning a string inside the {{{...}}}
03:30 TimToady if you return a string, it reparses there
03:30 TimToady it's still not quite the ability to insert random ast nodes, but it's an escape valve at least
03:31 sorear so {{{ is legal absolutely anywhere?
03:31 sorear how does that interact with one-pass parsing?
03:31 TimToady eh, it only means quasi unquote within a quasi quote
03:31 TimToady otherwise you just have three nested blocks
03:32 sorear S06 says that quasi { } parses the innards exactly once
03:33 sorear but, if {{{ }}} can produce textual substitution, how is it possible to statically parse quasiquotes?
03:33 TimToady hmm, good question :)
03:36 nihiliad joined #perl6
03:40 sorear in general, I feel as though Lisp's quasiquotes only work because they're actually a completely general data structure templating system
03:41 TimToady and even if we tell it, assume we parsed rule <longname> here, we still have to defeat any LTM at that point
03:41 TimToady it's really like the quasi needs to tell the parser its next fate
03:42 TimToady descend through these rules and feed the leaf node this
03:42 sorear what's a fate?
03:42 TimToady when we do the LTM alternation across all rules transitively
03:42 TimToady it decides which rules the recursive descent is destined to descend
03:42 TimToady so no choices have to be made until you run out of a chain of fate
03:43 TimToady that's how we mix PEG with LTM
03:44 chitragupt joined #perl6
03:44 TimToady for instance, if you go to the pugs/src/perl6 dir and (after making) look at lex/STD/P6/termish
03:45 TimToady you'll see the structure of a lexer, which is a pattern prefix, a tab, and the chain of fate that the pattern implies
03:45 sorear I've seen the lexer files but not yet figured out quite what was in them
03:46 TimToady that's pretty much all that's in 'em
03:47 sorear what's in a pattern prefix?
03:47 sorear what are in the .store and name-mangled files?
03:48 TimToady just the lexer dfa-ish patterns that, in theory, should be matched in parallel
03:48 ash_ I am not sure how quasi-quotes won't require a re-parse... TimToady do you think its possible to do that all in a single parse?
03:49 TimToady .store is just a Storable of the same data, predigested slightly
03:49 k23z__ joined #perl6
03:49 TimToady the name mangled files are the specific multis of a proto
03:49 TimToady the fate chain consists of a list of pairs
03:50 TimToady and there are two kinds of pairs
03:50 TimToady the first gives the name of the alternation in question, just to make sure things stay in sync
03:50 TimToady (each alternation double checks its name against it)
03:50 sorear are the alternatives in p5regex format?
03:50 TimToady yes
03:50 TimToady ish
03:51 TimToady if the second part is a number, then it's a normal | alternation
03:51 TimToady if the second part is a mangled name, it's a <proto> call that has to look for all the proto: rules
03:53 TimToady the (?#::) is a marker that says if you use this pattern in a larger lexer, it doesn't compose with anything after it
03:54 TimToady that is to say, (?#::) represents the declarative/procedural boundary that S05 goes on about
03:55 TimToady so it generally means the subrule did something side-effecty
03:56 * diakopter makes a mental note to check the May 6 irclog when I go to handport Cursor.pm
03:56 BrowserUk TimToady: Last night you said "everything outside an async{} is shared; everything inside isn't" Does that mean that my x =1; async{ $x = 2; sleep 1e9 } while(1){ print $x.say }; will at some point start printing 2?
03:57 sorear diakopter: What are you porting it to?
03:57 BrowserUk 'scuse the 5isms
03:57 TimToady I would think that $x would only need locking during the assignment
03:58 sorear I presume we'll construct a memory model at some point which allows for $x to be indefinitely cached in the main thread because you didn't synchronize
03:58 TimToady I'm thinking data locks, not thread locks, or *horrors* a GIL
03:59 TimToady I don't profess to be an expert on this, but I'm just trying to keep everything as local as possible
04:00 TimToady sorear: what do you mean by 'indefinitely cached'?
04:01 sorear TimToady: the compiler hoists the read of $x outside the loop
04:02 BrowserUk Okay, thanks. I need to process that.
04:03 TimToady well, sorear seems to have a slightly different view of it than me, I think I heard him say it wouldn't change to 2
04:03 sorear BrowserUk: I am sorry about scaring you off yesterday
04:04 TimToady I guess I can see where a thread might assume it has sole control of its "own" variables like $x
04:04 TimToady unless an async {} itself pessimizes outer declarations
04:04 sorear I'm not necessarily saying it should *not* change to 2
04:04 ash_ when would the variables synchronize? immediately? or when the async{ } ends?
04:04 BrowserUk No matter. I'l try to be breifer in future.
04:05 sorear however, the Go and Java memory consistency models both *allow* it to stay 1 forever
04:05 TimToady s'okay, we try to have a wide dynamic range here :)
04:05 sorear and I don't really think we should be designing a radical memory model before we have any implementation experience
04:05 TimToady I guess we need to figure out what is sufficiently dwimmy for a sufficiently low price
04:06 TimToady though that never stopped us from speculating about pretty much anything here :)
04:06 sorear Perl can become DWIMmier about shared memory in the future; it's best to be noncommittal now
04:07 TimToady I dunno, I'm kinda noncommital about being noncommittal...
04:08 BrowserUk I have a strong preference for explicit sharing. It means all local vars are unshareable, therefore lock free to he metal.
04:08 TimToady I guess, when an async splits off, it knows in a closurely way which external variables it refers to
04:09 BrowserUk The async would, but the continuing thread wouldn't
04:09 TimToady for that model, I suppose it behooves the program to split off asyncs early, and do all the declarations inside
04:09 TimToady or we need some way of cloning externally linked vars
04:09 TimToady btw, that's one reason we try to distinguish readonly dynamic vars from rw ones
04:09 TimToady since the ro ones can just be copied into the thread
04:10 TimToady like the Unix environment vars
04:10 BrowserUk Explicit sharing and non cloning would be my preference. Shared vars live in a completely different space to locals. (Closures might need to be promoted or aliased?)
04:11 TimToady BrowserUk: well, unless part of the async is to mark the variables as potentially shared
04:11 TimToady then at least if the outer thread looked, it could find it out
04:11 TimToady but as you say, it's nice to get it as close to the metal as we can
04:12 TimToady I think we can at least guarantee that a lexical pad without an async in it can assume no sharing
04:12 TimToady so we're fine in the downward direction, basically
04:12 ash_ my $a = 1; async { sleep 123; $a = 2; sync $a; }; loop { say $a };
04:13 TimToady it's looking up the lexical scopes that is more problematic
04:13 BrowserUk ash_: That's interesting.
04:14 TimToady what does 'sync' do there?
04:14 ash_ synchronize $a with the rest of the world?
04:14 ash_ just thinking out loud
04:14 TimToady sounds like a transaction commit
04:15 BrowserUk TimToady: I assumed that it meant that closures were async local copies. and sync() locked the original, updated it then freed the lock.
04:15 TimToady my $a = 1; async { sleep 123; contend { $a = 2 } }; loop { say $a }  # STMish
04:16 ash_ hmm, i should read S17 before commenting
04:17 TimToady local copies of outer vars seems a bit strange to me
04:17 BrowserUk TimToady: The difference I see is that contend is a block; which could call subs, which call other subs... sync operates on a var. No deep trawling needed to ensure rollback is possible.
04:19 TimToady otoh, you need some way of managing larger transactions
04:19 iblechbot joined #perl6
04:20 ash_ TimToady: how many threads does contend lock against?
04:20 BrowserUk TimToady: The other nice thing is that you don't hold the lock. Just manipulate the copy and then the briefest of locks to sync it back. No possibility of deadlocks.
04:20 TimToady we could go a more erlangish direction and say that all asyncs get only a readonly view of the outer lexicals, and you do other stuff with message queues
04:22 TimToady course, if the outer lexical can change, you can still get incoherent views in different threads, hmm
04:23 BrowserUk Go's channels are similar and quite interesting. Essentiall just queues, but able to pass anything including channels. Also, useful outside of concurrency.
04:23 ash_ yeah, i was about to mention google go
04:23 TimToady in theory, p6 feeds are the same
04:23 TimToady though not yet implemented
04:24 BrowserUk They form the basis of how the add iterators to customs classes
04:24 BrowserUk s/the/they/
04:24 TimToady it's one way to do it
04:25 ash_ gather/take is simliar in p6
04:26 ash_ for making your own iterator
04:26 [Coke] TimToady: simon already prototyped an NFG implementation in perl6, about... what, 2 years ago?
04:26 [Coke] (is unicode easy to do without ICU). hee.
04:27 BrowserUk Indeed. All these things work similarly at the syntax level, the hard bit is under the covers.
04:27 TimToady one could take a point of view that a shared variable may only be read or written by any given thread, and the variable is the name of a queue of values
04:29 TimToady another interesting model that we had was that the lower levels of the program could be message based like Erlang, and then a transactional superstructure could be put on the upper levels, with appropriate handshaking in the middle
04:30 BrowserUk For many things I like the idea of promises: my $x = async \&someLongRoutine; #so other stuff;  my $y = $x * 3; If $x has recieved its value by the time you use it, no block; if it hasn't, you wait until it has.
04:30 TimToady we more or less have those already with laziness
04:31 TimToady though mostly for lists, which are serial promises :)
04:31 BrowserUk (Sounds like you've been talking to my wife :)
04:31 TimToady well, I talk to my wife occasionally too :)
04:32 BrowserUk I need to think, read and write somethings down. Thanks for your time.
04:32 TimToady ciao
04:32 BrowserUk bye
04:37 BrowserUk left #perl6
04:38 jonrafkind what is the state of perl6's syntactic extension?
04:38 PerlJam Texas
04:40 jonrafkind I mean, perl6 gives you the capability of defining new parsers, but what is the result of the parsing the input stream?
04:41 mightmouse joined #perl6
04:41 PerlJam I'm even less sure now of what you're really asking.
04:42 jonrafkind perl6 has macros, or something, right?
04:42 orafu joined #perl6
04:42 PerlJam jonrafkind: it does.
04:42 mightmouse hello
04:43 jonrafkind i saw some document on the perl6 website about it, but it wasn't very clear, can you explain how they work for me? im familiar with scheme
04:43 mightmouse im trying to setup the ilbot from your site..
04:43 mightmouse but the tutorial wasn't real clear on where everything goes :\
04:43 mightmouse can you help me out?
04:45 balb joined #perl6
04:45 balb in which situation I can do something like 'print ${$var}', please give me one example
04:46 PerlJam mightmouse: You'll have to talk to moritz about that.
04:46 TimToady mightmouse: you'd want to talk to moritz_ but he's probably asleep
04:46 mightmouse ah ok
04:46 mightmouse thx mate
04:46 TimToady Germany
04:47 [mark] joined #perl6
04:48 PerlJam balb: Are you trying to print the value of the variable whose name is contained in $var?
04:48 jonrafkind TimToady, you are quite familiar with the macro situation, right?
04:48 PerlJam heh
04:48 TimToady macros are still in development, but we do have derived grammars that we use heavily
04:49 thowe joined #perl6
04:49 thowe Hi
04:49 PerlJam thowe: hello
04:50 * thowe is happy
04:50 jonrafkind do the grammars simply define replacement syntax?
04:50 jonrafkind or can you write functions that perform arbitrary computation
04:50 thowe I think I am finally getting a laptop that isn't someone else's 10 year old cast-off
04:50 balb PerlJam: I am trying to following some perl tutorial and want to know what is ${} ?
04:50 TimToady grammars are classes, and derived grammars can override specific rules
04:50 TimToady so you can tweak a little, or tweak a lot
04:50 jonrafkind any notion of hygiene?
04:50 TimToady in macros, sure
04:51 thowe Grammars look nifty.  I do a lot of text processing, so they will be nice for me
04:51 PerlJam balb: a Perl *6* tutorial? or a Perl 5 tutorial?
04:51 TimToady quasi quoting/unquoting
04:51 TimToady also textual macros if you need 'em
04:51 jonrafkind thats not hygiene.. but that lets you use gensym I guess
04:51 TimToady well, it's all the interplay of the lexical scopes
04:52 TimToady sorear is currently working out some of the implementation details, but the intent is that they be correctly generic
04:53 jonrafkind are there examples of macros on the web floating about?
04:53 TimToady it is, of course, a bit more complicated in a language with a complex grammar than it would be in Scheme
04:53 BrowserUk joined #perl6
04:53 PerlJam thowe: blog about your experiences using Perl 6 for text processing.  It'll help the next guy I'm sure.
04:54 TimToady jonrafkind: have you read the section in S06 about macros?
04:54 jonrafkind yea
04:54 BrowserUk Sorry. Question arising: Subs/blocks are first class? Can a sub defined in one thread be called from another?
04:54 thowe hrm.  I don't have a blog...
04:54 thowe The more interesting stuff I do would not be of general interest
04:55 thowe and I'm a boring person otherwise as well
04:55 jonrafkind wait no I read S05
04:55 TimToady jonrafkind: sorear has a beginning of an imlementation, maybe he has some examples he's been testing
04:55 PerlJam thowe: heh, you sound like me :)
04:55 TimToady macros are specced at S06:2785
04:56 TimToady if you look at the log, that'll be turned into a link
04:59 kst joined #perl6
05:01 TimToady jonrafkind: short summary, you *can* write an unhygienic macro with a quasiquote, but you have to work at it; the default is that variables bind into the macro's lexical scope, not the user's
05:01 jonrafkind ok
05:02 TimToady and the quasi is considered a block boundary, so any variables declared inside are not visible externally
05:02 TimToady s/block boundary/lexical scope/
05:03 jonrafkind so if I wrote the 'or' macro that somehow expanded from 'or a b c' into '$x = a; or b c', that would work? the point being that `or' introduces a new $x binding, so recursive calls to or would have their own $x
05:03 TimToady for examples of non-macro derived grammars, STD.pm6 is the largest example currently, and perhaps the best
05:04 TimToady well, you'd say 'my $x = a' to make the new declaration explicit
05:04 jonrafkind right
05:04 TimToady all variables have to  be declared in Perl 6
05:05 jonrafkind oh I saw STD.pm6 and my eyes sort of glazed over..
05:05 TimToady indeed, there's a lot there
05:05 TimToady but the basic principle is this
05:05 TimToady the current parse state is held in the objects that are passed around
05:05 TimToady those objects are all derived from Cursor
05:06 TimToady which keeps the current position in the parse
05:06 TimToady but they are all typed according to the current language that is being parsed
05:06 TimToady so to switch languages in mid stream, it suffices merely to pass a different type of Cursor to the next match rule
05:07 TimToady Perl 6 itself is a braid of several different languages, and derivatives of those
05:07 TimToady for instance, there's a basic quoting language called Q, and all other quoters derive from that by adding escapes, different terminators, etc
05:08 TimToady so the double quote language starts with the Q language and mixes in the qq role, which defines all the escape sequences you expect in double quotes
05:09 TimToady it's just a derived class, with methods that happen to be matched in parallel when the quote nibbler looks for the rule <escape>
05:09 sorear hi, I just came back
05:09 TimToady I think jonrafkind might want to ask you about macro examples
05:10 jonrafkind yea, if you have any smallish ones
05:10 TimToady jonrafkind: note, they may only work in sorear's copy of rakudo :)
05:11 gfx joined #perl6
05:13 stepnem joined #perl6
05:14 jonrafkind sorear, have any?
05:14 sorear http://pastie.org/943825 is real world macro code
05:14 sorear from the IRC client I'm prototyping
05:15 sorear as you can see, it's pretty horrible
05:15 sorear lots of explicit stringing and unstringing
05:15 sorear macros can return ASTs but it's suprisingly non-useful
05:15 sorear because returning an AST isn't enough to generate a definition &c
05:15 sorear you also have to call various methods on the compile-time metamodel
05:16 sorear and the only thing that knows how to do that is the standard parser actions
05:16 sorear hygenic/quasiquote stuff isn't implemented
05:16 sorear I'm convinced it's unimplementable as specced
05:16 orafu joined #perl6
05:16 sorear TimToady and I have been trying to come up with a workable revision
05:17 jonrafkind was my fortress paper any use to you?
05:17 sorear there are a few very nasty cases
05:17 sorear I never saw it
05:17 chitragupt joined #perl6
05:18 jonrafkind i dunno if it will help, but here it is anyway: http://www.cs.utah.edu/~rafkind/papers/fool09.pdf
05:18 sorear for instance, parse-then-quasiquote is not sufficient to create a macro that works like sub
05:18 sorear suppose you had such a macro
05:18 sorear macro my-sub is parsed( / <signature>? <blockoid> / ) { MAGIC HERE }
05:19 sorear my-sub (&infix:<¢>) { 2 ¢ 3 }
05:19 sorear you can't parse Perl 6 without knowing the lexical referencing environment
05:19 jonrafkind is that parameterizing the macro over the infix operator?
05:19 sorear no
05:20 sorear sub (&infix:<¢>) { 2 ¢ 3 } is just an alpha renaming of sub (&foo) { foo(2, 3) }
05:20 sorear operators are funny spelled functions
05:20 jonrafkind ok
05:20 meppl joined #perl6
05:21 sorear in Haskell, operators and functions are always lexically distinguishable; in Perl 6, they aren't
05:22 jonrafkind so is the issue that you don't bind macros until after parsing?
05:23 sorear the issue is that <block> in a parse list doesn't know the lexical referencing environment
05:24 jonrafkind oh it only has its own lexical environment
05:24 BrowserUk left #perl6
05:28 TimToady it's like you want to be able to trigger the parse from inside the quasi-quote
05:28 TimToady and pretend to be the lexical scope of the quasi while parsing the user's code somehow
05:29 sorear I suppose if you're just substituting terms it doesn't matter.
05:29 sorear But if you're just substituting terms, you should just use a & argument
05:30 TimToady there are reordering issues as well, if the parse is a different order than the plug-ins
05:30 sorear I have a hunch that hygenic macros were invented as a bandaid for the lack of proper lexically scoped HOFs in early Lisp
05:30 TimToady or maybe that's inside out
05:30 TimToady maybe we should parse the user's code as generic code, and instantiate it into the quasi
05:31 TimToady hmm, but that could lose hygiene
05:32 jonrafkind hygiene matters in languages with proper lexical scoping, like scheme
05:34 sorear jonrafkind: last time I read the Scheme hygenic macros spec, my reaction was "none of this would be necessary if "lambda" was shorter".  I'm biased.
05:35 TimToady it's shorter in Perl 6 :)
05:35 hejki :)
05:35 TimToady and -> almost looks like a lambda, rotated 45°
05:35 chitragupt joined #perl6
05:36 TimToady and squinting
05:36 jonrafkind (define-syntax-rule (l x ...) (lambda x ...)) yay, one letter
05:37 sorear I'm pretty sure that doesn't work
05:37 TimToady course, then we go and blow it all on sigils :)
05:37 sorear the 'x' in the lambda is a new variable, nothing in the body can bind to it
05:38 jonrafkind no, the x comes from the users input
05:38 sorear rakudo: sub infix:<d>($n,$s) { [+] (1 .. $s).pick($n, :replace) }; say 4 d 6; # Perl6 parsing rules depend on lexical scope; generic parsing of arbitrary code is impossible
05:38 p6eval rakudo 1eef08: OUTPUT«10␤»
05:38 jonrafkind if you have mzscheme around, throw this into the repl: (define-syntax-rule (l x ...) (lambda x ...))(define q (l (p) (+ p 1)))(q 2)
05:40 TimToady sorear: are you claiming that the 'is parsed' would not be running in the user's current language?
05:41 sorear TimToady: I'm claiming that 'is parsed' without closures is not enough to implement a macro which parses a signature and a block *in the scope of that signature*
05:41 TimToady ah
05:42 TimToady well, it would have to set up the lexical scope before the signature just as STD does
05:42 sorear phenny: tell masak , you complained about not being able to use regexes outside grammars earlier - "my regex" works in rakudo
05:42 phenny sorear: I'll pass that on when masak is around.
05:42 sorear TimToady: exactly
05:43 sorear no amount of magic we can put into quasi { } is going to make things "just work"
05:43 TimToady is parsed(/ <.newpad> <signature>? <.finishpad> <blockoid>/) as it currently stands
05:43 TimToady that seems like a rather specialized thing
05:43 sorear the rakudoversion is much uglier
05:43 TimToady not sure I want that to 'just work'
05:43 sorear sure, but it's the specific example I started with
05:43 TimToady well, but that's rakudo :)
05:43 sorear implementing a custom method-like declarator
05:45 PerlJam I have no idea what you guys are talking about really, but couldn't you add another  "is foo" to get the appropriate lexpad magic?
05:45 TimToady for something like that, it seems like 'augment slang MAIN { token routine_declarator:sym<my-sub> {...} }' is much more straightforward
05:45 TimToady assuming one can also attach the action conveniently
05:47 TimToady PerlJam: 'is foo' is okay, but sometimes it's the hammer everyone keeps mentioning
05:47 TimToady it's nicer if you can get the thing to just fall out from other features more naturally
05:48 TimToady internal trait blocks, aka "phasers", have the advantage of giving lexical scoping, for instance
05:51 PerlJam I've never wanted macros beyond the simple text subsitution kind anyway :)
05:54 TimToady admittedly, the routine_declarator in STD is not exactly simple...
05:55 TimToady another approach would be to derive a new grammar in which, say <blockoid> was a wrapper around the standard one, and then just call the standard routine_declarator in the new slang
05:56 TimToady part of the power of all this is that you can redefine subrules out from under superrules
05:56 TimToady though I'm sure there are infelicities involved
05:57 TimToady esp if the superrule thinks it knows the structure of the subrule
05:58 TimToady anyway, Lord, make the easy things easy, and the hard things possible, and gimme wisdom to know the difference.  -- St Larry of Assisi
05:59 TimToady zzz &
06:07 am0c joined #perl6
06:12 uniejo joined #perl6
06:14 kst joined #perl6
06:16 snarkyboojum joined #perl6
06:21 moritz_ good morning
06:25 sorear good morning
06:29 snarkyboojum good beautiful afternoon in the sun
06:35 Su-Shee joined #perl6
06:35 pugssvn r30579 | moritz++ | fix a function call in S06-multi/type-based.t
06:35 pugssvn r30579 |
06:35 pugssvn r30579 | Patch courtesy of Hongwen Qiu
06:40 * sorear reads S04
06:40 viklund joined #perl6
06:42 sorear hmm
06:42 sorear std: sub foo() { return { return }; }; foo()(); # what does this do?
06:42 p6eval std 30578: OUTPUT«ok 00:01 113m␤»
06:47 sorear S04:0318 EHTMLINPOD
06:47 sorear oh wait nevermind
06:49 JimmyZ rakudo: sub foo() { return { say 'hi'; return }; }; foo()();
06:49 p6eval rakudo 1eef08: OUTPUT«hi␤No exception handler and no message␤current instr.: '&return' pc 17923 (src/builtins/Junction.pir:414)␤»
06:49 JimmyZ rakudo: sub foo() { return { say 'hi'; }; }; foo()();
06:49 p6eval rakudo 1eef08: OUTPUT«hi␤»
06:49 pugssvn r30580 | sorear++ | Fix incorrect use of HTML in POD6 in S04
06:49 JimmyZ rakudo: sub foo() { return {} }; foo()();
06:50 p6eval rakudo 1eef08: OUTPUT«invoke() not implemented in class ''␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
06:50 JimmyZ rakudo: sub foo() { return { return } }; foo()();
06:50 p6eval rakudo 1eef08: OUTPUT«No exception handler and no message␤current instr.: '&return' pc 17923 (src/builtins/Junction.pir:414)␤»
06:50 JimmyZ bug?
06:50 moritz_ JimmyZ: the error message is less than awesome, but the behaviour is correct
06:51 moritz_ JimmyZ: you can only return() from routines, not from blocks
06:51 JimmyZ rakudo: sub foo() { { return } }; foo()();
06:51 p6eval rakudo 1eef08: OUTPUT«invoke() not implemented in class 'ResizablePMCArray'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
06:51 moritz_ that looks more like a bug
06:51 JimmyZ rakudo: sub foo() { { say 'hi'; return } }; foo()();
06:51 p6eval rakudo 1eef08: OUTPUT«hi␤invoke() not implemented in class 'ResizablePMCArray'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
06:53 sorear JimmyZ: per spec, 'return' throws a special exception which can only be caught by the lexically enclosing sub, unwinding any intervening dynamic scope
06:55 JimmyZ NYI must be a bug :)
06:57 sorear JimmyZ: that error message is parrot-ese for "you tried to use an array as a sub"
06:57 sorear vtables are confusing like that
06:58 JimmyZ yes, but rakudo shouldn't display
07:04 Ross joined #perl6
07:05 snarkyboojum joined #perl6
07:06 drbean joined #perl6
07:17 kaare joined #perl6
07:26 bbkr_ joined #perl6
07:32 pugssvn r30581 | qiuhw++ | Add "qiuhw" to AUTHORS list to test if qiuhw have the proper commit privilege.
08:27 moritz_ ash_: (backlogging) @a>>.method may *run* out of order, but the result list will still be in the correct order
08:27 moritz_ ash_: so @a>>.trim is a valid application
08:27 moritz_ ash_: just things with side effects (like .say) shouldn't be used that way
08:29 moritz_ oh sorry, just saw that TimToady++ already mentioned it
08:29 moritz_ sorry for the noise
08:29 moritz_ I should backlog first, and then talk :-)
08:40 cosimo joined #perl6
08:40 dakkar joined #perl6
09:21 kst joined #perl6
09:38 mightmouse joined #perl6
09:48 Exodist joined #perl6
09:49 yinyin joined #perl6
10:12 rv2733 joined #perl6
10:14 wknight8111 joined #perl6
10:18 masak joined #perl6
10:18 masak ohio, #perl6
10:18 phenny masak: 06 May 17:21Z <sorear> tell masak that "may get lost" means "will get lost"
10:18 phenny masak: 06 May 19:11Z <moritz_> tell masak I'm inclined to reject maspalio++'s patch that changes the proto web script to Web::Scraper. Reason: the documentation of Web::Scraper is so incomplete that I don't think I could maintain that script. Thoughts?
10:18 phenny masak: 05:42Z <sorear> tell masak , you complained about not being able to use regexes outside grammars earlier - "my regex" works in rakudo
10:19 masak sorear: yes, and excellent, respectively.
10:21 masak moritz_: I tried to install Web::Scraper this morning, and failed. I'll try again tomorrow, and also have a closer look at the module. the underlying intent (not matching HTML with regexes) is of course commendable.
10:22 moritz_ it is, no doubt about that
10:22 masak moritz_++ # for committing the other two tidying commits from Xavier
10:33 masak ash_: I looked at your gist; it looks nice. I'd have called the phasers COMPOSE and INHERIT, to parallel more with BEGIN, START, INIT, END, etc.
10:47 masak std: sub foo(&infix:<¢>) { 2 ¢ 3 }
10:47 p6eval std 30581: OUTPUT«ok 00:01 116m␤»
10:53 masak &
10:57 xinming joined #perl6
11:05 KyleHa joined #perl6
11:06 KyleHa Good morning, #perl6
11:11 colomon o/
11:16 wknight8111 joined #perl6
11:28 envi^home joined #perl6
11:31 moritz_ \o it's KyleHa++
11:31 KyleHa Hi.  8-)
11:41 rjh joined #perl6
11:42 wknight8111 joined #perl6
11:43 TiMBuS joined #perl6
11:47 * moritz_ has to decide what the next "This week's contribution to Perl 6" is going to be
11:54 moritz_ only about 9% of the people who search for Perl 6 with google click on perl6.org
11:55 hejki :O
11:55 moritz_ that's because the average position in the search results is... 10
11:55 hejki weird, we need to pump it up
11:56 moritz_ it's a chicken-and-egg problem: people search for Perl 6, find dev.perl.org/perl6/ as first hit, think it's the official site, and set links to it
11:57 moritz_ and google reports 630 backlinks
11:59 moritz_ another SEO problem with perl6.org is that it contains relatively little text
12:01 k23z__ joined #perl6
12:03 lrnperl6 joined #perl6
12:03 lrnperl6 morning all
12:04 moritz_ hi
12:04 lrnperl6 morning moritz_
12:08 takadonet morning all
12:22 kst joined #perl6
12:22 _jaldhar joined #perl6
12:26 JimmyZ joined #perl6
12:32 chitragupt joined #perl6
12:37 colomon alpha: say 10.log(1i)
12:37 p6eval alpha 30e0ed: OUTPUT«0 + -1.46587119775886i␤»
12:39 moritz_ rakudo: say 1i** (0 + -1.46587119775886i)
12:39 p6eval rakudo 1eef08: OUTPUT«No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:␤:(Int $a, Int $b)␤␤current instr.: 'perl6;Rat;new' pc 470503 (src/gen/core.pir:64734)␤»
12:39 moritz_ rakudo: say 8.log(2)
12:39 p6eval rakudo 1eef08: OUTPUT«3␤»
12:39 moritz_ somhow I have a hard time believing that the result is correct
12:40 moritz_ (a complex number with magnitude 1) ** anything   has the magnitude 1, no?
12:41 moritz_ rakudo: say 10.log(1)
12:41 p6eval rakudo 1eef08: OUTPUT«Divide by zero␤current instr.: 'infix:</>' pc 305345 (src/gen/core.pir:3034)␤»
12:41 colomon Huh.  good point.
12:42 * moritz_ watches the math lectures bitrot in his brain
13:04 KyleHa joined #perl6
13:07 KyleHa Irc on my phone... I wonder what this does when I go through a dead spot.
13:10 KyleHa o/
13:15 mathw ...that, I think :)
13:16 SmokeMachine joined #perl6
13:25 ruoso joined #perl6
13:30 cosimo joined #perl6
13:32 kst joined #perl6
13:34 mightmouse joined #perl6
13:36 patrickas joined #perl6
13:36 pmurias joined #perl6
13:36 pmurias diakopter: hi
13:42 colomon loliblogged: http://justrakudoit.wordpress.com/2010/05/07/sins-of-a-logger/
13:42 JimmyZ loop { colomon++; }
13:57 clintongormley joined #perl6
14:01 christoffer joined #perl6
14:01 christoffer who
14:02 christoffer masak: hej!
14:08 am0c joined #perl6
14:09 dalek rakudo: def9f9c | (Solomon Foster)++ | src/core/ (4 files):
14:09 dalek rakudo: Move .sin method to Numeric and Real, cleaning up the Num and Complex versions a tad in the process.  Also clean up the Real.unpolar code, and delete the now unneeded Num.unpolar.
14:09 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/def9f9ccae4f6ddb39e01f3c3d1a76de24a3a941
14:09 dalek rakudo: 977fad6 | (Solomon Foster)++ | src/core/ (4 files):
14:09 dalek rakudo: Rename log-e to the more traditional (yet still unspec'd and likely to go away) ln.
14:09 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/977fad626edabd8d6f1e21adf5439d1ca0c54b0f
14:16 diakopter pmurias: hi
14:16 mantovani joined #perl6
14:17 log_ joined #perl6
14:21 pmurias diakopter: when will perlesque have the ability to define classes with attributes+methods?
14:21 diakopter soooooooooon :)
14:21 diakopter do you need that soon?
14:22 pmurias i could write the mildew runtime in C# but i'm not sure if it's not better to wait
14:23 diakopter I think it's better to wait
14:23 diakopter b/c the translated CIL will be essentially just as efficient
14:24 diakopter can you focus on your optimizer for another few days?
14:24 diakopter or translator?
14:26 pmurias yes
14:28 diakopter I'm very close on parametric types-as-literals (for static invocations) and parametric-types-in-parameters. When I'm done with those, I'll work on closure type signatures
14:28 diakopter which TimToady et al said were:
14:28 diakopter my $a:(Int --> Int);  and  my $b:(--> Int);  # parameter-less function
14:29 diakopter pmurias: identical to how they're declared as parameters
14:33 kst joined #perl6
14:33 diakopter pmurias: eh
14:33 diakopter pmurias: and then after those, classes.
14:34 diakopter should be this weekend.
14:45 dual joined #perl6
14:46 alester joined #perl6
14:58 cognominal rakudo: say int "1"
14:58 p6eval rakudo 1eef08: OUTPUT«Could not find sub &int␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
14:58 cognominal hum
14:58 m6locks rakudo: say Int "1"
14:58 p6eval rakudo 1eef08: OUTPUT«Confused at line 11, near "say Int \"1"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
15:06 TimToady rakudo doesn't have the functional forms of coercion yet
15:07 moritz_ is that even allowed without parenthesis?
15:08 moritz_ std: say Int "1!
15:08 p6eval std 30581: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/jlp3cjhiXt line 1:␤------> [32msay Int [33m⏏[31m"1![0m␤    expecting any of:␤      bracketed infix␤  infix or meta-infix␤      statement modifier loop␤Parse failed␤FAILED 00:01 112m␤»
15:08 moritz_ std: say Int "1"
15:08 p6eval std 30581: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/Tdhrnac1KE line 1:␤------> [32msay Int [33m⏏[31m"1"[0m␤    expecting any of:␤    bracketed infix␤  infix or meta-infix␤      statement modifier loop␤Parse failed␤FAILED 00:01 110m␤»
15:08 masak 'Int' is foremost a type, I guess. and only secondarily a (coerce) function.
15:13 dalek csmeta: r243 | diakopter++ | trunk/Sprixel/ (4 files):
15:13 dalek csmeta: [perlesque] parametric ("generic" in CLR) type annotations in parameter lists,
15:13 dalek csmeta: too.
15:13 dalek csmeta: review: http://code.google.com/p/csmeta/source/detail?r=243
15:14 nihiliad joined #perl6
15:20 TimToady er, yes, the parens are required
15:21 TimToady std: say Int("1")
15:21 p6eval std 30581: OUTPUT«ok 00:01 110m␤»
15:21 TimToady rakudo: say Int("1")
15:21 p6eval rakudo 1eef08: OUTPUT«Could not find sub &Int␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
15:23 justatheory joined #perl6
15:24 TimToady oddly, there's wiggle room in the syntax for supporting: (Int) "1" but the space would presumably be required, which would confuse C programmers
15:25 * masak prefers the Int($thing) syntax anyway
15:25 diakopter TimToady: ah, so TypeName() casts if the types are on the same path in the type hierarchy, but coerces if they don't?
15:27 diakopter *amended for multiple inheritance, but my question still holds
15:27 TimToady TypeName() only guarantees to give you an object that is consistent with TypeName, and does not commit to whether any copying happens, unless .new
15:27 TimToady *unlike
15:27 diakopter ok.
15:28 diakopter obviously native->native will copy
15:28 TimToady nodnod
15:29 diakopter I guess can cast/coerce to a Role
15:29 diakopter one can
15:30 alexn_org joined #perl6
15:31 TimToady + is Numeric() and ~ is Stringy()
15:31 diakopter user roles
15:31 TimToady there has to be mechanism to decide which actual type to coerce to
15:32 TimToady so Numeric might pattern match a string to see if it's a Rat or a Comlex
15:32 TimToady p
15:32 diakopter C# enables conversion operators on a class, so a Foo class can have a Bar operator, so that Foo->Bar calls that routine
15:35 chitragupt joined #perl6
15:35 TimToady diakopter: see S13:193
15:37 ash_ so, you could use Type(args) and get a Type.new(args) right?
15:37 TimToady no
15:37 TimToady er, not unless defined that way
15:37 TimToady no guarantees one way or the other
15:38 TimToady (didn't know how to interpret your "could")
15:38 TimToady could mean either "should" or "might"
15:38 diakopter but you can have different new methods taking different types
15:38 diakopter ?
15:38 ash_ "As a fallback, if no method responds to a coercion request, the class will be asked to attempt to do Dog.new($spot) instead." is what I was referring to
15:39 TimToady that's a "might"  :)
15:40 patrickas joined #perl6
15:40 patrickas left #perl6
15:41 ash_ if I had class Foo { method Bar { ... } }; and did Bar(Foo.new) it would call Foo's Bar as the "coercion request", then possibly fall back to other mechanisms of conversion, (but I like how it mentions doing it the other way around is preferred, that way makes sense to me)
15:41 TimToady actually, it'd probably be more like a Dog.clone($spot)
15:42 Juerd Why not $spot.clone?
15:42 alexn_org joined #perl6
15:42 TimToady $spot is not of type Dog yet
15:42 ash_ the desired result is a new instance of Dog
15:44 TimToady if you define both ends, then which coercion is used will depend on which way you invoke it; each of them falls back to the other, I think, if there's only one or the other
15:48 ash_ I wish more languages did multi-methods dispatch, its awesome
15:48 jonrafkind joined #perl6
15:54 chitragupt joined #perl6
15:55 chitragupt joined #perl6
15:56 ruoso joined #perl6
15:57 cdarroch joined #perl6
15:57 cdarroch joined #perl6
16:00 kst joined #perl6
16:01 * masak discovers that a borderline spam comment on the p6advent blog is in fact spam only by following the link of the commenter, arriving at a Russian site for non-prescription drugs
16:05 masak std: sub foo($a = 5, $b) {}
16:05 p6eval std 30581: OUTPUT«[31m===[0mSORRY![31m===[0m␤Can't put required parameter after optional parameters at /tmp/k2fd7lGgXL line 1:␤------> [32msub foo($a = 5, $b[33m⏏[31m) {}[0m␤Check failed␤FAILED 00:01 113m␤»
16:05 masak rakudo: sub foo($a = 5, $b) {}
16:05 p6eval rakudo 1eef08:  ( no output )
16:05 masak do we have a ticket for that yet?
16:07 masak rakudo: sub foo($a = $b, $b) { say $a }; foo(:b(42)) # mwhahaha
16:07 p6eval rakudo 1eef08: OUTPUT«Any()␤»
16:08 ash_ rakudo: use MONKEY_TYPING; augment grammar Perl6::Grammar { }; # has that been added to the bt?
16:08 p6eval rakudo 1eef08: OUTPUT«Method 'compose' not found for invocant of class ''␤current instr.: 'perl6;Perl6;Grammar;!class_init_11' pc 352 (EVAL_1:50381503)␤»
16:09 * masak submits rakudobug
16:09 masak (for the parameters thing)
16:10 masak ash_: no, doesn't seem that way. want to add it?
16:10 ash_ sure, how do i add a ticket again?
16:10 masak email rakudobug@perl.org
16:16 moritz_ masak: did you get your russian visa?
16:17 [particle] steal masak++'s irssi plugin for rakudobug
16:17 masak [particle]: (1) not using irssi :) (2) no plugin :)
16:17 moritz_ it's built-in :-)
16:17 masak moritz_: I finally made it through the application process, yes.
16:17 [particle] ah, i guess it's a core feature of masak, my mistake
16:17 masak it is.
16:18 masak it's part of the masakism package, actually.
16:20 [particle] i wish that were a role
16:20 [particle] it's a valuable skill to compose into new perl hackers
16:26 cj what's the meeting channel for the rakudo folks?
16:27 masak #rakudosketch
16:27 cj or, if jerry gay is here, could you raise your hand?
16:27 moritz_ here
16:27 moritz_ that's [particle]
16:27 cj hi [particle]
16:27 [particle] hola cj
16:27 cj [particle]: just incorporated the biz.  I've got an EIN and everything.
16:28 cj [particle]: feel like chatting with Chris and me?
16:28 [particle] congrats! don't forget to register with the state
16:28 [particle] i mean, with the city
16:28 cj [particle]: my lawyer is taking care of all of that. ;)
16:28 Ross joined #perl6
16:29 moritz_ good to have one :-)
16:29 cj [particle]: I learned my lesson the first time.  all my paperwork went to pieces once I moved.  the state sent the renewal papework and the usps didn't forward it.  :)
16:29 [particle] sigh
16:29 cj the lawyer is now responsible for that sort of thing, and she's better at it than I am ;)
16:29 [particle] cj: i can chat for a little bit now, yeah
16:29 kst joined #perl6
16:30 cj xmpp handle?
16:30 alexndc joined #perl6
16:31 [particle] jerry.gay@rakudoconsulting.com
16:32 hercynium joined #perl6
16:32 PerlJam cj: What business?
16:36 cj PerlJam: Collier Technologies LTD
16:36 cj PerlJam: I got it primarily to get an AS number.
16:36 PerlJam cj: nice name :)
16:37 cj bitches wouldn't accept my sole prop
16:37 cj hmm... maybe I should watch my language.
16:38 moritz_ this is a publicly logged channel :-)
16:38 PerlJam #perl6 is forgiving, but history mayn't be  ;)
16:39 masak I thought he was talking about female dogs.
16:39 cj thanks, moritz_.  I think this is the first time I've been opped here...
16:39 [particle] /kickban moritz_ # oh the power!
16:39 [particle] oops ;)
16:39 colomon we saw a lovely bitch the other night.  still trying to decide if we can afford one of her puppies.
16:39 cj I'm talking with someone at ORA (do they still call it that) about writing a book on the DLR...
16:40 cj s/that/that?/
16:40 PerlJam cj: just don't take an advance.
16:40 cj PerlJam: haha.  what's that mean?
16:40 cj PerlJam: another word for golden handcuffs?
16:41 PerlJam cj: sometimes publishers will advance you money for you to work on your book.  don't do it.   It's safest
16:41 cj PerlJam: hurm...  If I do it in my 'spare time' (ie, don't take money for it), I won't be able to afford the time to write it...
16:42 PerlJam cj: well, just remember that the advance comes from your future profits.  hopefully there's enough to cover the advance and a little more.
16:43 SmokeMachine joined #perl6
16:44 PerlJam cj: the the profits don't cover the advance, in a few years or so you may get a letter ... "you owe us $$$, please pay"  :-)
16:45 Juerd So in effect it's just a loan?
16:45 cj PerlJam: that's loads of fun.  I think I'd need to request a fee for my work on the document.  I'd be willing to assign most of the rights to the person who has me on contract during the time.
16:46 PerlJam Juerd: every publisher treats it differently I think.
16:46 PerlJam Juerd: But they *are* in the business to make money :)
16:46 Juerd Bastards :)
16:47 Juerd Many organizations are in the business of making money, but making money often requires the guts to invest in something that may not pay off
16:48 Juerd If you have to buy a new machine, you won't get a refund if it turns out that it doesn't help to increase the profit.
16:48 Juerd (I might be suggesting that writers are machines. I'm not sure. ;))
16:49 Juerd (Writers mustn't be bought though)
16:50 PerlJam cj: The real person to talk to about book stuff is chromatic.  He may even have some sage advice.  :)
16:52 PerlJam (although we do have at least one other book author on channel ;)
16:53 moritz_ PerlJam: I guess you don't count yourself, although you are one, in fact?
16:53 PerlJam moritz_: no, I don't typically count myself.
16:53 moritz_ PerlJam: at least partial author, of a not-yet published book
16:54 sorear as a C++ programmer I prefer Int($thing) anyway.  one of the few places where the new syntax is actually better
16:54 Su-Shee don't write printed books anymore. publish, publish plenty, but do it in the web to your own pace and conditions.
16:54 Su-Shee also, learn how to use those funny tiny words correctly. ;)
16:55 moritz_ Su-Shee: getting stuff printed is a (probably irrational but strong) incentive to make it "right"
16:55 PerlJam because once printed, it's forever  ;)
16:55 Su-Shee I know.
16:56 moritz_ and somehow it's also easier to get editorial review for printed material
16:56 Su-Shee But I also know that essentially you're writing for an audience. people. get incentive, recognition and all that from them.
16:57 Su-Shee moritz_: ok, what's the difference if you write a book about Perl 6 getting let's say chromatic doing it for O'Reilly instead of ... letting chromatic do it? ;)
16:57 moritz_ Su-Shee: I mostly write a Perl 6 book because nobody else I know does it, and I want one
16:58 PerlJam moritz_: selfish!  ;)
16:58 Su-Shee moritz_: I know, I just took you as an example.
16:58 moritz_ Su-Shee: if chromatic wrote one, I'd be happy to contribute a bit, or continue blogging
16:58 moritz_ s/or/and/
16:59 Su-Shee continuing blogging is an essential must if you want Perl 6 to take off.
16:59 isBEKaml joined #perl6
16:59 isBEKaml hey, good (evening|afternoon|morning) folks!
16:59 Su-Shee I find it remarkable how few Ruby books exists. Compared to the level of discussion and recognition.
17:00 PerlJam Su-Shee: 37 signals are good marketers
17:00 PerlJam Su-Shee: they hype rails, rails is ruby, etc.
17:00 moritz_ isBEKaml: good time() :-)
17:02 isBEKaml 37 signals? Weren't they the ones that brought about Rails? DHH?
17:02 [Coke] (writing a book) chromatic has a company that does publishing, fwiw.
17:03 moritz_ [Coke]: that's the one that will publish the Perl 6 book, yes
17:03 sorear chromatic has-a company?
17:03 moritz_ sorear: chromatic, allison... and I think a few more folks
17:03 moritz_ Onyx Neon Press
17:03 PerlJam and he should legally change his name to chromatic so I don't have to go "who's this?" every time I see his name  :)
17:04 Su-Shee PerlJam: so let's learn from them. also Rubyist blog plenty, pretty and for a broad audience.
17:04 [Coke] moritz_: danke. I was trying to google it. =-)
17:04 moritz_ PerlJam: his name appears as "chromatic" on serveral books. That's good enough for me :-)
17:05 PerlJam moritz_: Did it say that on the contract you signed?  :)
17:05 moritz_ that's cheating :-)
17:06 moritz_ speaking of the book.. I'd like to name it 'Using Perl 6'
17:06 PerlJam moritz_: wfm
17:06 isBEKaml dannit! I was wondering chromatic can't be his real name. So he just sort of grew into this identity? ;)
17:07 PerlJam the pattern  "____ing Perl 6" works quite well
17:07 moritz_ isBEKaml: he just tries to keep his legal name and his internet presence separate
17:07 [Coke] with your host, gene rayburn.
17:07 moritz_ and rather successful, I might add
17:08 Su-Shee moritz_: you know who padeluun is? ;)
17:08 dalek book: f7a5527 | moritz++ | src/subs-n-sigs.pod:
17:08 dalek book: [subs] flesh out/add some examples
17:08 dalek book: review: http://github.com/perl6/book/commit/f7a552722832bbaeebc517fcb1194f5cc1c3dadc
17:08 moritz_ Su-Shee: no
17:09 isBEKaml moritz_: He must have "partitioned" his mind into 2 identity spaces, then... =)
17:09 Su-Shee moritz_: wtf?! :)
17:09 moritz_ Su-Shee: can't know everybody :-)
17:10 isBEKaml Su-Shee: I read padeluun as "paladin"! :)
17:10 PerlJam isBEKaml: heh, that's what I read at first too
17:11 isBEKaml PerlJam: too many fantasy tales... ;)
17:11 * PerlJam finds a padeluun on twitter and gets a "padeluun is german, so you must know who he is" kind of feeling  :)
17:11 Su-Shee moritz_: well he's the founder of foebud and doing privacy stuff and all since 198x ;) anyway. he managed to keep "padeluun" even in front of the bundesverfassungsgericht during some expert hearing (vorratsdatenspeicherung) _that_ is hiding a real name.. :)
17:12 moritz_ Su-Shee: just read his wp article... impressive
17:12 PerlJam Su-Shee: gesundheit.
17:12 Juerd There are several rather succesful realname-hiders in the Perl world :)
17:12 PerlJam Juerd: A suppose Juerd isn't your real name either?
17:12 Juerd chromatic, Barbie, Abigail
17:12 * moritz_ can't remember any of their real names :-)
17:12 PerlJam s/A/I/
17:12 [Coke] PerlJam: Was, Sie sprechen kein Deutch?
17:12 Su-Shee PerlJam: single most important figure in german privacy politics since the mid-80ies.
17:13 Juerd PerlJam: That is correct, but I do use it IRL.
17:14 PerlJam okay ... time for me to come clean .... my real name isn't PerlJam   ;)
17:14 Juerd Shocking
17:14 * Su-Shee just dropped her spoon.
17:14 * isBEKaml fell off the chair..
17:14 _sri oh my
17:14 Juerd Hm, maybe Perl people are more susceptible to caring about their personal identifiers than others
17:15 Su-Shee Juerd: no. consider "_why"
17:15 Juerd There's brian d foy who doesn't want mixed capitals, and perhaps the weirdest case is Ingy döt Net
17:15 PerlJam Su-Shee++  exactly what I was about to say
17:15 Juerd Su-Shee: I don't get it
17:15 isBEKaml Su-Shee: nor do I
17:16 PerlJam Juerd, isBEKaml: Su-Shee is coming up with a "counter example"  (though it's not really :)
17:16 diakopter "Ruby people" aren't all that different from "Perl people" imho
17:16 Su-Shee "_why, the lucky stiff" is a ruby pop star. vanished a few months ago and took down all his projects.
17:16 _sri http://en.wikipedia.org/wiki/Why_the_lucky_stiff
17:17 Juerd So that's one in Ruby world
17:17 _sri nobody knows his real name
17:17 Juerd Versus 6 in Perl world :)
17:17 PerlJam Su-Shee: He said "more susecptible to caring", not "the only ones who care" about their personal identifiers
17:17 isBEKaml Su-Shee: Was he the one about "Why's poignant guide to Ruby" ? or something, I don't quite recall..
17:17 Tene FSVO "nobody"
17:17 PerlJam _sri: his real name is "why"
17:17 Su-Shee isBEKaml: exactly.
17:18 isBEKaml Su-Shee: I just thought it was written by someone with a twisted way of authorship. ;)
17:18 Tene "Real" isn't the right adjective for that question.  There's "given name", "chosen name", "legal name", etc.
17:19 Tene If people recognize you by a name, or you recognize yourself, that's at least as real as the name a government recognizes you by.
17:19 Su-Shee isBEKaml: from what I've read and look into and saw friends drool, he was quite a figure.
17:19 Juerd Tene: Good point
17:19 _sri well, being an artist and a programmer is not easy, sadly code is not timeless
17:19 [Coke] why looks like jack  lack.
17:19 hejki yup
17:19 hejki :>
17:19 Su-Shee Tene: or, your name is that common that noone recognizes you by your real name :)
17:20 cj _sri: it is with github!
17:20 hejki _sri: not when you're "artist" that none has ever heard of ;>
17:20 Tene Su-Shee: You used "real name" again there.  You're being inconsistent. :)
17:20 * _sri goes to draw an improved version of the mona lisa and pushes it to github
17:20 * Juerd read monad lisa
17:20 Su-Shee Tene: sorry. common slang here for the distinction of "screen name" and "the thing in your id"
17:21 isBEKaml Ok, let's separate them into two. names and handles. :)
17:21 PerlJam Juerd: too much haskell
17:21 Juerd PerlJam: Exactly none; I don't think that can be too much.
17:22 PerlJam isBEKaml: I have no protuberances that resemble a handle thank you.  :)
17:22 PerlJam Juerd: then too much hanging out on #perl6  ;)
17:22 Juerd PerlJam: Could be :)
17:23 isBEKaml PerlJam: lol, you're quite a literal! ;)
17:23 mdxi i once went to the IRC channel for the Escape Velocity series of games, because i loved them dearly. the guy who wrote the games was there, adn his handle was "moki" mine was "mdxi" then, like it is now. they all thought i was him, adn when i pointed out that i wasn't, they wouldn't believe that i hadn't carefully chosen my nick to optically mimic his.
17:24 PerlJam mdxi: you fiend!
17:24 Su-Shee I changed nicks when I was a) always asked after wing commander and b) confused with a graphic's card.
17:25 * _sri overclocks Su-Shee
17:25 isBEKaml Su-Shee: I would have confused yours with a delicacy(note I don't call it that :) ), but you spelled with a double-ee
17:25 isBEKaml :)
17:26 Juerd I changed nicks to get a clean slate, mostly regarding search engines.
17:26 diakopter Su-Shee: oh; I confused you with sushi
17:26 Su-Shee isBEKaml: yeah, it's made of my name and my former nick and should intentionally look like "sushi" :)
17:26 Su-Shee _sri: takes only 4 coffees and a coke. :)
17:27 Su-Shee and it rarely clashes. unless I'm too slow with all those vanity logins in social networks ;)
17:27 Juerd I hated that I couldn't be Juerd on twitter :|
17:27 Su-Shee Juerd: yeah, because you sound like a very common german man's name :)
17:27 isBEKaml Su-Shee: multiple coffee cups and multiple social network logins. That's slow! Overclock further!
17:27 isBEKaml :)
17:27 Juerd Su-Shee: Juerd is a Frisian name and rather uncommon, even in Fryslan.
17:28 Su-Shee Juerd: well I'm from nearby.. :)
17:28 Juerd How much so?
17:29 Su-Shee like 45min by car? :)
17:29 kst joined #perl6
17:29 Juerd Did I give you the impression that I live in Fryslan? :)
17:30 Su-Shee Juerd: no. for some reason I considered you dutch.
17:30 Juerd I am
17:30 Su-Shee yeah, but I don't know why I know that :)
17:30 Juerd feather.perl6.nl perhaps
17:31 Su-Shee no, I have you in some other context in my head. lost the connection though :)
17:31 isBEKaml Juerd: I considered your name there. :)
17:32 Juerd isBEKaml: Considered for what? :)
17:32 isBEKaml Juerd: and figured you might be Dutch.
17:32 PerlJam "Juerd" sounds dutch?
17:32 isBEKaml PerlJam: No, he revealed his name some time ago..
17:33 * Juerd <- my name
17:35 takadonet steinbech
17:35 takadonet ...
17:35 moritz_ yeah, but why should we bother?
17:35 Juerd You shouldn't :)
17:36 Su-Shee moritz_: research reflex. :)
17:37 Tene isBEKaml: "The text that the government uses to identify me" isn't necessarily the name that family and friends think of someone as.  To me, the latter is much more important.
17:37 _sri prepare to be inspected
17:38 envi_home2 joined #perl6
17:38 Juerd The government uses an integer to identify me, not text :)
17:38 Tene :P
17:38 PerlJam Tene: indeed.  One of my cousins has a little girl.  I have no idea what her "real name" is, but everyone calls her "Breezy", so that's her name.
17:38 Su-Shee we have a number-letter combination ;)
17:38 Juerd 180333215, my "citizens service number", formerly SSN.
17:39 Su-Shee Juerd: YOU KNOW YOURS BY HEART?!
17:39 isBEKaml Tene: Sure, I concur with you there.
17:39 hejki Juerd: do you know what's SSN in holland :)
17:39 hejki Juerd: BSN, Burger Service Nummer :)
17:39 Juerd Su-Shee: Yes. It's part of the VAT number NL180333215B01 that I have to use all the time.
17:39 Juerd hejki: Yes. Formerly SoFi.
17:39 hejki :O
17:40 PerlJam "Burger"?
17:40 Su-Shee Juerd: I have something which resembles a social security number and one unique tax identifier.
17:40 hejki PerlJam: yup.. means Citizen
17:40 Su-Shee PerlJam: citizen. we don't use the french derived word in dutch and german
17:40 PerlJam interesting.
17:40 Juerd Su-Shee: .nl now uses the same number for a lot of different things. They refactored. Not good for one's privacy.
17:41 Juerd What used to be relevant only for my taxes suddenly became relevant for almost everything, and I'm required to publish the number.
17:41 Su-Shee Juerd: I have a number literally for each and every step of beaucracy :)
17:41 Juerd Su-Shee: Treasure that.
17:42 isBEKaml moritz_: I see you have applied Xavier's patch into proto. To tell you the truth, I had only one reservation against Web::Scraper. It seems to be under-documented. I don't know how popular it is or how good it is...
17:42 * _sri demands rfid implants to protect his privacy... oh wait...
17:43 Su-Shee PerlJam: oh, I'm just reading that the roots for our "Buerger/burger" are the same like your english "borough".
17:43 Juerd I sometimes wonder why I haven't been a victim of identity theft yet. Enterpreneurs have to publish everything here.
17:43 Tene rakudo: say 'hi'
17:43 Su-Shee _sri: you forgot your tin foil hat ;)
17:43 p6eval rakudo 1eef08: OUTPUT«hi␤»
17:43 Juerd Including my home street address, date of birth and SSN.
17:44 sorear Juerd: Does merely knowing the SSN serve as proof of identity for you?
17:44 Juerd sorear: Definitely not, but it does to many others.
17:44 isBEKaml Juerd: maybe identity theft is hard in that since it's published everywhere, impostors can be easily caught?
17:44 * _sri puts on his tinfoil hat
17:44 sorear yes, it's completely ridiculous here
17:45 Juerd isBEKaml: I don't think they can.
17:45 _sri our passports have rfid chips these days...
17:45 Su-Shee I barely managed to get one without.
17:45 _sri implants are not unrealistic...
17:45 sundar joined #perl6
17:45 PerlJam the problem in the USA is getting anyone to even question you are who you say you are.  I always test banks about it when I can and most times they fail.
17:46 PerlJam "you just walked in off the street and asked for the PIN to be reset on this debit card?  Sure, let me do that for you"
17:46 Juerd In .nl it's common to just get passwords over the phone, and all you need is someone's address and date of birth.
17:46 Juerd I do it all the time for my clients.
17:47 clsn joined #perl6
17:47 Su-Shee yeah but on the other hand let's not forget that this is essentially a good thing.. not having to be entirely paranoid and secretive.
17:47 Juerd Su-Shee: Paranoia is good when it comes to essentials like bank accounts
17:47 * sorear thinks asymmetric cryptosystems need to be a lot more popular
17:47 PerlJam "you have a bank statement and want to close the account?  Sure, no problem. We'll do it now"
17:48 PerlJam Su-Shee: how's that one?
17:48 _sri surely terrorists have to use banks too
17:48 Juerd sorear: One problem is that it's hard to make asymmetric crypto systems compatible with the notion of actual anonimity. :)
17:48 Su-Shee PerlJam: 15 years ago, here you just would have to sign some paper and be done with the closing. (for example)
17:49 Juerd Su-Shee: Still works like that here
17:49 PerlJam Su-Shee: banks at least should be checking your ID before taking most actions.  Mostly they don't (I've found)
17:49 Su-Shee _sri: there's actually meters of research how terrorists (and mafia for example) do their finances and it's pretty interesting. and also: you don't need banks.
17:49 Juerd Su-Shee: "Do you want your balance paid out in cash, or transferred to another account?"
17:50 _sri obviously terrorists need to write a finance self help book for us normal people
17:50 Su-Shee yes but this is only bad because of abuse - not because a trusting system is a bad sign for a society
17:50 Juerd I just had to show my debit card (of which I had forgotten the PIN!) and sign a form.
17:50 PerlJam Su-Shee: A bank would make a good front for laundering money  ;)
17:51 Su-Shee PerlJam: I think here it's some insurance company ;)
17:52 _sri at least you still get brand new shotguns for opening bank accounts (michael moore++)
17:52 Su-Shee Juerd: if you go into the money printing building here in berlin, there is like 2 guys. not even police. the typical elderly watchman. ;)
17:53 Su-Shee (they use Perl btw ;)
17:53 Juerd Su-Shee: The elderly watchmen use Perl?
17:53 Su-Shee Juerd: the money printing institution ;)
17:53 Juerd I'm always astonished by the lack of security at the AMS-IX (Amsterdam Internet Exchange)
17:53 Su-Shee federal whatever it's called in english :)
17:53 Su-Shee Juerd: I think it's the same with DECIX
17:53 _sri Su-Shee: so you already were scouting there? :)
17:54 Su-Shee _sri: I worked for them doing Perl :)
17:54 Juerd Any engineer could just blow the whole place up, or much funnier, just go wild with pliers and cut lots of fibers.
17:54 Su-Shee no, I didn't get paid in cash ;)
17:54 Su-Shee Juerd: yes, same here.
17:54 hejki working with perl is awesome
17:55 isBEKaml Su-Shee: Then what? Vacations? :)
17:55 hejki but it makes you hate your coworkers too much :)
17:55 _sri Su-Shee: you should have demanded a suitcase full of cash
17:55 Su-Shee _sri: of course we tried. ;)
17:55 Juerd Couldn't they give you some bad prints that they were going to throw away anyway? :)
17:55 Su-Shee _sri: they've heard this joke a couple of times. ;)
17:56 sorear "But... this is the Internet, so if you blow up AMS-IX, Dutch IP traffic will just be automagically rerouted through Polynesia"
17:56 Juerd sorear: Yea. Well. No.
17:56 Juerd sorear: There have been outages.
17:56 Juerd It appears that 10 GE doesn't grow on trees.
17:56 Su-Shee I think, you'd need to kill AMSIX and DECIX and that would be it with continental europe and internet. ;)
17:57 sorear GE?
17:57 Juerd sorear: Gb/s Ethernet.
17:57 * _sri hates working for federal agencies, they always pay late
17:57 Juerd There's simply not enough capacity to reroute.
17:58 Su-Shee _sri: in retrospect, it was one of the best and timely and well managed project I ever did.
17:58 Juerd AMS-IX is 5 locations though, so to really get all ISPs offline you would at least need to organize the effort a little.
17:58 cj Su-Shee: "most timely"
17:58 Juerd Fortunately you can trigger the explosions over TCP/IP ;)
17:58 _sri Su-Shee: yay for elderly watchmen?
17:59 cj Juerd: did you just say bomb and explode and network-based trigger mechanism?
17:59 PerlJam _sri: in the US they must pay within 30 days (or maybe it's 60, I forget) *by law*
17:59 Su-Shee _sri: the guy from them always came with his techie-buddy. every discussion went smoothly and competently.
17:59 Juerd cj: You said bomb.
17:59 Juerd cj: I was referring to, eh. Hm.
17:59 Juerd cj: to PHP's explode() function. Yes, that's what I was referring to.
18:00 Juerd It's like split.
18:00 cj good catch!
18:00 _sri PerlJam: sweet, here you have to send them reminders quite often :(
18:00 PerlJam Juerd: just don't talk about your PHP code on or near an airplane  :)
18:01 ruoso I've been thinking about threading models the last days...
18:01 Su-Shee PerlJam: you can mention perl's "pack" and "unpack" safely ;)
18:01 Juerd Su-Shee: Depends on what you're packing
18:01 PerlJam ruoso: There was a good discussion about that here last night
18:02 ruoso hmm... just because I decided to sleep ;(
18:02 ruoso :)
18:02 Juerd Su-Shee: Some people go crazy about signed shorts.
18:02 * ruoso goes backloggin
18:02 Su-Shee *haha* :)
18:02 Su-Shee moritz_: call the book "perl 6 puns" ;)
18:02 PerlJam well, I guess it was about 14 hours ago.  It was last night for me  :)
18:03 PerlJam Su-Shee: that's the follow-up
18:03 isBEKaml moritz_: or "Punning Perl 6" following the "___ing X" pattern. :)
18:03 _sri "Perl 6 Guide to the Galaxy"
18:04 Juerd Hacker's guide to Perl 6
18:04 _sri the last page just says "42"
18:04 Su-Shee *hehe*
18:04 kst joined #perl6
18:04 Juerd _sri: *cough*
18:05 Juerd _sri: That's forty-two, not 42.
18:05 Su-Shee "the joy of six" ;)
18:05 isBEKaml _sri: lol, I was wondering why you pulled that one out...
18:05 PerlJam "Hacking Perl 6" would make a good title, but it might be misconstrued.
18:05 sorear rakudobuild on latest parrot finishes in 11m36s
18:05 Juerd Su-Shee: That would just get your website on just about every pedo blocklist.
18:05 sorear 8m42s real
18:05 Juerd PerlJam: Sixing Perl
18:06 Su-Shee Juerd: if course I was referring to six grown-ups. ;)
18:06 PerlJam Juerd: what were you just saying to Su-Shee ?  :)
18:06 isBEKaml In cricket parlance, "Hitting Perl for a six!"
18:06 Su-Shee isBEKaml: doesn't really sound innocent as well ;)
18:07 isBEKaml Su-Shee: Erm, Cricket as in the game of Cricket.
18:07 Juerd PerlJam: STARTKEYLOGGER ;)
18:07 Su-Shee isBEKaml: yes, I was referring to hitting and six. but maybe it's just my friday-after-work-mind ;)
18:08 PerlJam face it ... 6 is just a sexy number.
18:08 * ruoso .oO( isn't it a sixy number? )
18:08 Su-Shee PerlJam: let's bring the passion back to perl then ;)
18:08 * ruoso just can't get to the irc log
18:08 Su-Shee "passionate perl six" ;)
18:09 PerlJam I think the pun train has gone *way* off the tracks  :)
18:09 isBEKaml Su-Shee: I can't see how you got that after-work-mind... :D
18:09 _sri "orgasmic perl six"
18:09 Su-Shee PerlJam: well I'm punning in a foreign language. ;)
18:09 Su-Shee _sri: very nice. some indian theme as cover design maybe?
18:10 isBEKaml _sri: pfft, you're making it bloody obvious! ;)
18:10 Juerd I sometimes find it hard to believe that English can be someone's native language :)
18:11 Su-Shee darn. it's 7 dwarfs. hm.
18:11 Juerd Su-Shee: Now you know why.
18:11 _sri Su-Shee: these days you seem to need a vampire theme for a bestseller though :/
18:11 Su-Shee _sri: TRUE SIX? :)
18:11 _sri :D
18:11 TimToady *ing Perl 6
18:12 Juerd Right
18:12 * sorear ponders a Unicode-derived encoding where combining chars are easily recognizable
18:12 _sri TRUE SIX: *ing Perl
18:13 Su-Shee "... and then Edward took up programming and wrote a Perl 6 program.." I _guarantee_ world-wide success. ;)
18:13 isBEKaml _sri: One catch, Perl6 won't be Perl when it's out. It isn't even Perl now... :)
18:13 Juerd Uh oh. Don't go there :)
18:13 _sri pure genius
18:14 Su-Shee _sri: also a great xkcd ;)
18:15 isBEKaml Su-Shee: that's back cover note? Sounds like WTOP! :)
18:16 TimToady only Perl 7 is True Perl
18:17 Juerd Perl 7 was renamed to Kurila...
18:18 gbacon joined #perl6
18:18 _sri it doesn't work during daylight
18:19 Su-Shee me neither.. ;)
18:20 _sri heh
18:20 isBEKaml I don't get it. What's Kurila?
18:20 * obra ponders a Perl variant where there is no value which evaluates to false
18:20 _sri programmers and vampires are so close already when you think about it...
18:20 obra isBEKaml: Kurila was an experimental fork of Perl 5
18:20 obra isBEKaml: http://www.ohloh.net/p/kurila
18:20 _sri we need to market ourselves better...
18:21 isBEKaml obra: Thanks. I should have googled it first. First link was CPAN. :)
18:21 obra no worries
18:22 moritz_ isBEKaml: I haven't applied the Web::Scraper patch yet
18:22 _sri then again...those pesky lawyers are even closer :/
18:22 * ruoso finished backlogging...
18:22 Juerd ruoso: Do you need a break now? :)
18:23 ruoso one idea I've been considering about threading was each object having a "owner thread"
18:23 isBEKaml moritz_: Ok.
18:23 TimToady that fits well with message passing
18:23 ruoso yes... and when you try to call a method in an object owned by a different thread
18:24 ruoso it would result in a message to that thread
18:24 TimToady sort of distributed monitors
18:24 ruoso it also fits well with feeds
18:24 ruoso since feeds already requires us to re-implement unix pipes
18:25 TimToady interesting question how it relates to shared outer lexicals though
18:25 ruoso it would propagate back to the original thread
18:29 ruoso in fact... every lazy list already needs to be implemented as a re-implemented unix pipe
18:30 lichtkind joined #perl6
18:30 cj so, if I were going to implement a regular expression parser and wanted same to compile to an assembly language, what should I read in order to get ready?
18:30 TimToady perhaps some objects could have one reader owner and a different writer owner
18:31 cj I've got until the 23rd to prepare ;)
18:31 ruoso TimToady, well... that's what a unix pipe is :)
18:31 diakopter cj: I thought you were going to muck around with the existing compiler
18:32 diakopter cj: you want to reimplement it?
18:33 cj diakopter: nah, I guess I could read the existing compiler's code
18:34 cj but I thought I'd get familiar with the theory before diving in to that, so I'd recognize jargon when I came across it.
18:34 diakopter cj: I skimmed the library in question
18:34 lichtkind <.ws> means something like <ws>* ?
18:34 sorear cj: read all about DFAs, Thomson NFA matchers, maybe some stuff about logic programming and compilation of backtracking
18:34 sorear lichtkind: <.ws> is a non capturing <ws>
18:35 diakopter cj: one problem with CLR regexes is they also have to support BackToFront mode, so your compiler has to be able to compile it both ways
18:35 lichtkind sorear: thanks but it can also be happy if no ws is found?
18:36 clsn I'm pretty sure http://gist.github.com/393761 worked in an older version of p6.  Any ideas why it now claims that a regexp is not closed with an angle bracket?  And the version in the comment doesn't work either?
18:36 sorear lichtkind: no
18:36 diakopter cj: luckily CLR regexes are Perl-like as opposed to POSIX-like
18:36 sorear rakudo: say "aa" ~~ / . <ws> . /;
18:36 p6eval rakudo 1eef08: OUTPUT«␤»
18:36 sorear rakudo: say "a+" ~~ / . <ws> . /;
18:36 p6eval rakudo 1eef08: OUTPUT«a+␤»
18:37 sorear <ws> will match at an alnum-punctuation boundry
18:37 sorear even if there is no actual space
18:37 sorear but <.ws> always requires <ws> to match
18:37 sundar left #perl6
18:37 sorear (NB: derived grammars can override <ws> to match other token rules)
18:38 Tene clsn: "not closed with an angle bracket", if you look closer, is complaining about ::.  It's seeing :: when it's expecting either alpha to continue the name or > to finish the <foo>.
18:38 _jaldhar joined #perl6
18:39 clsn In another version (with a longer token name) the error-message actually cuts off in the middle of the token name.  So that makes sense, sorta.
18:40 cj diakopter: 'both ways'?
18:41 TimToady clsn: STD parses both of those just fine
18:41 ShaneC joined #perl6
18:42 clsn It errors with the build I built today.  AFAIK, :: is the right way to separate the namespace.  Maybe something more subtle is wrong with my installation?
18:42 ruoso TimToady, the problem with that approach would be balancing the objects amongst the threads
18:42 Tene clsn: p6eval here in the channel confirms that it's the same.
18:42 ruoso eventually you could have a thread with too many objects...
18:42 diakopter cj: see privmsg plz
18:42 Tene rakudo: grammar Simpl { token xxx { 'x' }; token yyy { '!' }; token zzz { <xxx>*<yyy> } }; my $s = "cx!"; my $a = $s ~~ /<Simpl::xend>/; say $a.perl;
18:42 p6eval rakudo 1eef08: OUTPUT«regex assertion not terminated by angle bracket at line 11, near "::xend>/; "␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
18:43 Tene see?  near "::xend>/; "
18:43 TimToady I don't see any :: in the link you gave
18:43 clsn Second line from the bottom.
18:43 TimToady oh, I see it
18:43 ruoso TimToady, unless each object has its own thread and just registers itself in the scheduler when it needs to answer anything...
18:43 TimToady anyway, STD doesn't mind it
18:43 ruoso but that would be a bit more complicated
18:44 Tene STD: grammar Simpl { token xxx { 'x' }; token yyy { '!' }; token zzz { <xxx>*<yyy> } }; my $s = "cx!"; my $a = $s ~~ /<Simpl::xend>/; say $a.perl;
18:44 ruoso the other side of that coin would be to have smaller thread barriers
18:45 ruoso such as running each routine as a different thread...
18:45 ruoso or each closure as a different thread
18:45 ruoso then the value would be owned by that closure
18:45 TimToady Tene: you want std:
18:45 Tene std: grammar Simpl { token xxx { 'x' }; token yyy { '!' }; token zzz { <xxx>*<yyy> } }; my $s = "cx!"; my $a = $s ~~ /<Simpl::xend>/; say $a.perl;
18:46 p6eval std 30581: OUTPUT«ok 00:01 115m␤»
18:46 ruoso then each closure would work like a process, and the unix analogy would be complete
18:46 TimToady rakudo: say 42.Any::defined
18:46 p6eval rakudo 1eef08: OUTPUT«0␤»
18:47 clsn So it's using some not-yet-implemented feature... I thought named grammars worked.
18:47 TimToady hmm
18:47 masak joined #perl6
18:47 masak ahoy, #perl6!
18:47 Tene Hi masak.
18:47 TimToady say 42.Int::defined
18:47 TimToady rakudo: say 42.Int::defined
18:47 p6eval rakudo 1eef08: OUTPUT«0␤»
18:47 Tene masak: You know the state of using grammars from rakudo?  clsn is having issues: http://gist.github.com/393761
18:48 TimToady rakudo: say 42.Mu::defined
18:48 p6eval rakudo 1eef08: OUTPUT«0␤»
18:48 masak Tene: guess you've seen those emails from Alberto. what do you think about wrapping up the Web.pm grant?
18:48 * masak looks at the gist
18:48 Tene masak: Sounds great to me.
18:49 masak Tene: how does your schedule look? I'm going to Russia next week, so I'm a bit... distracted by planning and procrastination.
18:49 ruoso I'm starting to think the closure-as-process-analogy would actually work...
18:49 isBEKaml hi masak!
18:49 sorear clsn: http://rt.perl.org/rt3/Public/Bug/Display.html?id=74866
18:50 ruoso any value the closure brings from outer scopes are "input pipes"
18:50 ruoso any values expected to be returned by the closure are "output pipes"
18:50 sorear hello masak!
18:50 ruoso when the closure calls a method in an object that is outer to the closure, it "forks"
18:51 SmokeMachine joined #perl6
18:51 ruoso (this is all non-os-threads, just coroutines)
18:51 masak Tene, clsn: seems that <A::B> isn't implemented. I could be wrong though.
18:51 clsn sorear: ok, the error messages are indeed confusing.  Shouldn't the identifier parse though?
18:51 sorear clsn: dunno, I didn't look at your actual code
18:51 TimToady rakudo: say 42.Int::defined
18:51 p6eval rakudo 1eef08: OUTPUT«0␤»
18:51 TimToady Int::defined doesn't seem to work as a normal method either
18:52 TimToady <A::B> is the same thing
18:52 masak isBEKaml, sorear: hi!
18:52 sorear I can't find it, either
18:52 clsn The non-:: version in the comment doesn't work either; it complains about <xend> on Regex;Cursor.
18:52 ruoso actually... each value the closure sees from outer scope provide both an "input pipe" and an "output pipe"
18:52 masak TimToady: oh, right! so that syntax is simply obsolete?
18:53 TimToady clsn: yes, it isn't in the right language to find <xend>
18:53 TimToady masak: no, it's not obsolete
18:53 masak ok.
18:53 clsn OK, so I'm misusing the grammar-less tokens, then.
18:53 TimToady $obj.Foo::bar still says to call bar on $obj as if it were a Foo, not a $obj.WHAT
18:54 * ruoso will digest that idea a bit more
18:54 * ruoso decommute &
18:54 tedv how exactly does that work?  Does it temporarily change the type of $obj to Foo until the function executes?
18:55 tedv like if bar() calls some other function, I assume $obj will be considered a Foo for the context of that function as well?
18:55 TimToady no, I think the object itself stays with its full type
18:56 TimToady it's just a way to prune the candidate list
18:56 tedv so if bar() operates on $obj.WHAT, it will still access the correct type.
18:56 TimToady yes
18:56 tedv ah I see, so it gives more control over which function signature it matches
18:56 TimToady it's similar to submethods, which are called on behalf of each parent type when you're doing, say, a BUILDALL
18:57 TimToady each BUILD is called on behalf of each type, but the object is still the same object
18:58 TimToady the difference here is that a submethod is only called on behalf of a specific type
18:59 TimToady while $obj.Foo::bar is called starting at Foo
18:59 TimToady but can call any Foo method ancestral to Foo
19:00 TimToady it's more like my $meth = Foo.can('bar'); $obj.$meth()
19:00 TimToady where $meth is a hard ref, so $obj.$meth is really $meth($obj), that is, a sub call
19:01 hercynium joined #perl6
19:02 TimToady rakudo: say defined(42)
19:02 p6eval rakudo 1eef08: OUTPUT«1␤»
19:02 isBEKaml Building Rakudo with latest Parrot fails ? http://pastebin.com/9S1pVEpL
19:02 TimToady rakudo: say Int::defined(42)
19:02 p6eval rakudo 1eef08: OUTPUT«Can not find sub Int::defined␤current instr.: 'perl6;Perl6Exception;throw' pc 15354 (src/builtins/Associative.pir:46)␤»
19:02 TimToady rakudo: say Mu::defined(42)
19:02 p6eval rakudo 1eef08: OUTPUT«Can not find sub Mu::defined␤current instr.: 'perl6;Perl6Exception;throw' pc 15354 (src/builtins/Associative.pir:46)␤»
19:03 TimToady anyway, 42.Int::defined should return 1, not 0
19:05 sorear How about 42.Sub::arity
19:05 jnthn TimToady: Hmm. It's implemented like you suggest.
19:05 jnthn rakudo: say 42.Int::defined()
19:05 p6eval rakudo 1eef08: OUTPUT«0␤»
19:06 sorear isBEKaml: How old is your rakudo?
19:06 jnthn rakudo: say 42defined()
19:06 p6eval rakudo 1eef08: OUTPUT«Confused at line 11, near "say 42defi"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
19:06 jnthn rakudo: say 42.defined()
19:06 p6eval rakudo 1eef08: OUTPUT«1␤»
19:06 isBEKaml sorear: I just git pulled it.
19:06 jnthn wtf.
19:06 sorear isBEKaml: what branch?
19:06 jnthn Oh.
19:06 jnthn I know why.
19:07 jnthn It's using the type object when doing the method lookup
19:07 masak I'd like to turn your attention to this use.perl comment by thickas, which deserves to be a proper blog post: http://use.perl.org/comments.pl?sid=44766&amp;cid=71923
19:07 jnthn And so finds the .defined for that.
19:07 isBEKaml sorear:  git://github.com/rakudo/rakudo.git -- master
19:08 BrowserUk joined #perl6
19:08 TimToady so perhaps .can needs to go a bit meta and assume a type object represents a defined object really
19:08 jnthn Perhaps.
19:08 moritz_ isBEKaml: did you reconfigure rakudo?
19:08 jnthn Something like that.
19:08 isBEKaml moritz_: reconfigure? I don't understand..
19:09 PerlJam masak: wow.
19:09 isBEKaml moritz_: I svn upped Parrot, git pulled rakudo and then hit make && make install.
19:10 masak Tene: thus, I'm tempted to go for Albert's option B, even though I do believe there's not very much left.
19:10 masak Tene: anyway, I'd like to virtually sit down with you some day and produce one of them time lines. would feel better to do it together.
19:10 moritz_ isBEKaml: run perl Configure.pl
19:10 Tene masak: That's a great plan.
19:11 masak PerlJam: yes, and you know what else? thickas bought me a book from my Amazon wishlist. it arrived today. I'm giddy with gratitude.
19:11 moritz_ isBEKaml: and then 'make install' again
19:12 masak PerlJam: he threatened to do so in a use.perl comment a while ago, but I thought it was only a spur-of-the-moment idea. apparently he actually meant it. thickas++
19:12 PerlJam I'm still not through reading his post  :)
19:12 isBEKaml moritz_: Ah, I'm at a newer version of Parrot than required for the latest build of Rakudo...
19:13 PerlJam isBEKaml: that's not always a good idea.
19:13 moritz_ isBEKaml: should still work, if you reconfigure
19:13 moritz_ isBEKaml: at least it jsut worked for me with the latest parrot revisions
19:14 sorear isBEKaml: After svn upping Parrot, you need to compile and install it
19:14 * jnthn glances the spec changes and wonders how hard he'd get hit for a patch that s/The first version of Rakudo */Perl 6.0.0/ in the recent proto changes.
19:14 moritz_ masak: any objections to slowly moving links to proto to proto.perl6.org?
19:14 [Coke] to be very safe - realclean parrot; svn up; re-configure/build/install;
19:15 jnthn (proto.perl6.org)++ :)
19:15 * jnthn looks over it
19:15 masak moritz_: go for it.
19:16 jnthn ooops, I just managed to use "proto" to refer to two completely seperate things.
19:16 moritz_ :-)
19:16 jnthn (the first was about the proto in the context of multi dispatch stuff...)
19:16 moritz_ so I figured
19:16 masak aye.
19:16 jnthn I'll worry about it properly when I'm back from vacation.
19:16 jnthn Or maybe after Rakudo *.
19:17 masak humans are wonderful at context.
19:17 jnthn Or maybe somebody else can worry about it.
19:17 * jnthn 's flight has got cancelled
19:17 masak by the way, given the sheer tenacity of the 'proto' project, I've decided to call my next project 'failure'.
19:17 jnthn Due to moar erruptions.
19:17 masak and the one after that 'disaster'.
19:17 jnthn :-)
19:18 masak jnthn: so you're like "lol Im stuck on Iceland!" ?
19:20 pugssvn r30582 | moritz++ | [perl6.org] switch proto links to proto.perl6.org
19:21 jnthn masak: yup!
19:21 masak :)
19:21 jnthn masak: What a pity ;-)
19:21 moritz_ glad you take with humour
19:21 masak no real danger. it's only MOLTEN LAVA!
19:22 isBEKaml no real danger. It's only Smouldering Ash! :)
19:22 jnthn masak: There's a VERY nice locally brewed beer here called Lava. :-)
19:22 mathw We should see if we can get the UFO sent over for jnthn
19:23 masak we have a UFO?
19:23 mathw Or the sub-aquatic camel
19:23 mathw Of course we have a UFO
19:23 mathw The onion-shaped one
19:23 jnthn moritz_: I knew when I came here it was a risk.
19:23 mathw My boss is flying to Majorca tomorrow
19:23 masak is there a list of these things somewhere?
19:23 mathw supposedly
19:23 mathw however, midlands airports going south are still okay right now
19:23 jnthn moritz_: I knew about the cancellation today, for a flight tomorrow, rather than getting to the airport and finding out.
19:24 mathw jnthn: that is better that way
19:24 jnthn The place I'm staying is nice, there's a pub over the road with nice beer, I've got good wifi connectivity so can even work a bit from here if I do get stranded for longer.
19:24 mathw yay
19:25 mathw so no panic then
19:25 jnthn So it's hardly the end of the world.
19:25 jnthn No, none at all.
19:25 mathw \o/
19:25 masak jnthn: is it true that you still can't pronounce the name of the volcano?
19:26 jnthn I did learn how at one point
19:26 jnthn But forgot again :-)
19:26 mathw heh
19:26 jnthn The first ll is apparnetly like dl though
19:26 mathw I can't even spell it
19:27 mathw although being able to pronounce it probably helps with the spelling as it's not just a meaningless collection of letters
19:27 isBEKaml erm, I don't know how Icelandics pronounce it, but I guess I saw three words there... Eyja fjolla joekull. Don't know what they mean though.. ;)
19:27 jnthn It actually means something descriptive in Icelandic, apparently.
19:27 moritz_ like "big scary volcano that interupts flight traffic"?
19:27 mathw firey mountain which interferes with air travel?
19:29 BrowserUk left #perl6
19:29 jnthn :-)
19:30 * jnthn is going to find dinner
19:30 jnthn bbiab
19:30 mathw enjoy
19:30 * mathw is considering having a second dinner
19:30 mathw aikido does that to me :)
19:30 jnthn I'll be sure to.
19:30 jnthn Going to the nice micro-brewery pub later too \o/
19:30 jnthn o/
19:30 masak joined #perl6
19:31 mathw bye jnthn
19:31 mathw welcome back masak
19:34 [Coke] mathw: "what about second breakfast!?"
19:34 mathw I think 2034 is too late in the day to be calling it second breakfast :)
19:34 mathw I have second breakfast at work :D
19:34 [Coke] ... any hobbit will tell you, it's never too late for lastmeal.
19:36 masak` joined #perl6
19:36 masak <PerlJam> okay ... time for me to come clean .... my real name isn't PerlJam   ;)
19:36 masak *lol*
19:37 mathw :)
19:37 mathw I thought everyone knew that
19:37 masak` mathw: guess that's the funny part.
19:37 moritz_ well, my first name isn't moritz_ either :-)
19:37 Su-Shee we expressed appropriate surprise. ;)
19:38 Su-Shee moritz_: nice try ;)
19:40 kst joined #perl6
19:41 masak` don't know why, but the book title 'Sixing Perl' looks a bit naughty.
19:41 TimToady The Joy of Six
19:42 isBEKaml masak`: That's why it's too Sixy! :)
19:42 masak` :)
19:44 mathw Does it have a plan?
19:45 mathw moritz_: My first name isn't 'math' :)
19:45 Su-Shee TimToady: My idea exactly. Got rejected. ;)
19:46 moritz_ Su-Shee: would you act as a model for the cover, if we do call it "The Joy of Six"?
19:46 mathw I'd like to formally claim the title for my future book: "You have six onions."
19:46 isBEKaml Su-Shee: Then let's change that to Six of Joy! ;)
19:46 Su-Shee moritz_: *haha* then I insist on seriously bad 70ies style. ;)
19:47 moritz_ :-)
19:49 Su-Shee *rotfl* at wikipedia, the book cover picture seriously looks chuck-norris like. ;)
19:56 isBEKaml Su-Shee: link?
19:57 isBEKaml I don't seem to find the "Joy of Six" title on Wikipedia at all.. :|
19:57 Su-Shee isBEKaml: err.. you might exchange the i for an e ;)
19:57 isBEKaml Su-Shee: jeez... :D
19:58 PerlJam isBEKaml: http://www.guardian.co.uk/sport/blog/2009/apr/24/joy-of-six-strike-partnerships  :-)
19:59 * [Coke] picards, THERE ARE SIX ONIONS!
20:00 PerlJam isBEKaml: if you really want something from wikipedia, there's this : http://en.wikipedia.org/wiki/Hold_Ye_Front_Page   (look at the 5th bullet point)
20:00 isBEKaml PerlJam: I don't follow soccer closely... I only happen to watch cricket, for nationalistic fervour. ;)
20:00 isBEKaml PerlJam: And, yeah, I got links to Joy-of-six within body text. I just said I never got a title link. :)
20:01 snarkyboojum joined #perl6
20:02 isBEKaml Su-Shee: The caricature's like lampooning the hollywood actors! ;)
20:04 [Coke] hey, where's the data for this: http://rakudo.de/
20:05 [Coke] spectest-progress.csv?
20:05 PerlJam [Coke]: aye
20:05 * [Coke] grins, as he just tripped over a new web-based graphing library.
20:08 [Coke] is ~foo/public_html still be served out on feather.perl.nl?
20:09 [Coke] *being
20:09 * moritz_ thinks so
20:09 isBEKaml core.pir' s still the bottleneck in building Rakudo? Takes quite a bit of time...
20:09 [Coke] ... huh. there it is. wtf.
20:09 [Coke] isBEKaml: ayup
20:11 isBEKaml hmmm
20:17 colomon Gack, keep on finding places in my Perl 6 to C++ port where I forgot to add a return statement.  gcc doesn't seem to complain, but Visual C++ rightly throws a fit.
20:18 moritz_ colomon: gcc only detects such cases (if at all) if you have some optimization options enabled
20:18 arnsholt colomon: Isn't there some gcc -Wall-evarything that throws a warning?
20:18 moritz_ colomon: because only then does it do control flow analysis
20:19 colomon arnsholt: probably.
20:20 moritz_ -Wextra
20:20 moritz_ iirc
20:20 moritz_ then it also warns about unused parameters
20:21 colomon unused parameters warnings are a pain -- compiling on many platforms means many #if branches and many unused parameters.
20:22 colomon still, it's funny to feel so rusty at C++ programming....
20:22 moritz_ :-)
20:23 sorear I like the crevasse in that graph around Feb 10
20:24 sorear And how narrow it is
20:24 colomon also I'm gobsmacked that Visual C++ 2005 doesn't seem to have "round" in math.h.
20:24 kst joined #perl6
20:25 colomon sorear: start of the crevice is switching "master" from alpha to ng.  end is when I got the trig tests running again, I think.  :)
20:26 sorear colomon: yeah, I like how quickly we recovered from the Great Rewrite
20:26 colomon well, we're still not quite back to the peak.... but we're in spitting distance now.
20:26 moritz_ well, only quick in terms of spectests
20:27 moritz_ in terms of actual real-world usability it's only slowly catching up
20:27 moritz_ and very much blocking on Match objects, IMHO
20:32 hercynium joined #perl6
20:33 dalek csmeta: r244 | diakopter++ | trunk/Sprixel/ (4 files):
20:33 dalek csmeta: [perlesque] parametric types in static invocations, enabling constructor
20:33 dalek csmeta: invocations as well.
20:33 dalek csmeta: review: http://code.google.com/p/csmeta/source/detail?r=244
20:34 diakopter spinclad: ping
20:36 diakopter perlesque: sub int foo(int $a, List[int] $b) { say(($a * $a) ~ (' ... ' ~ $b.ToString())); return 1 }; foo(33, List[int].new()) # static constructors, direct bijection to CLR standard library
20:36 p6eval perlesque: OUTPUT«1089 ... System.Collections.Generic.List`1[System.Int32]␤»
20:38 diakopter interestingly, CIL generic types also use square brackets in their names, so they're identical to p6 ones, but for the additional arity marker
20:39 dalek book: 218afc4 | moritz++ | bin/book-to-latex:
20:39 dalek book: add title, authors and table of contents to PDF version
20:39 dalek book: review: http://github.com/perl6/book/commit/218afc400f9ce0d24674bbdfb86595b5499da53d
20:39 dalek book: 18be8df | moritz++ | src/subs-n-sigs.pod:
20:39 dalek book: [subs] talk about type constraints, just a bit
20:39 dalek book: review: http://github.com/perl6/book/commit/18be8dfe883158ee3c1169a676263f2fc567a879
20:40 pmurias joined #perl6
20:49 diakopter pmurias: hi :)
20:50 diakopter just committed  r245
20:50 diakopter perlesque: sub int foo(int $a, List[Dictionary[string, P6object]] $b) { say(($a * $a) ~ (' ... ' ~ $b.ToString())); return 1 }; foo(33, List[Dictionary[str,P6object]].new())
20:50 p6eval perlesque: OUTPUT«1089 ... System.Collections.Generic.List`1[System.Collections.Generic.Dictionary`2[System.String,Sprixel.Runtime.P6object]]␤»
20:50 diakopter perlesquel: .
20:50 p6eval perlesquel: OUTPUT«1089 ... System.Collections.Generic.List`1[System.Collections.Generic.Dictionary`2[System.String,Sprixel.Runtime.P6object]]␤real 0.05␤user 0.01␤sys 0.04␤»
20:52 pmurias diakopter: hi
20:53 dalek csmeta: r245 | diakopter++ | trunk/Sprixel/ (2 files):
20:53 dalek csmeta: [perlesque] fix the multiple-type-param case(s). Perhaps I should test shtuff.
20:53 dalek csmeta: review: http://code.google.com/p/csmeta/source/detail?r=245
20:53 dalek csmeta: r246 | pawelmurias++ | trunk/Sprixel/ (3 files):
20:53 dalek csmeta: P6LexicalScope throws exceptions
20:53 dalek csmeta: review: http://code.google.com/p/csmeta/source/detail?r=246
20:53 pmurias diakopter: re testing stuff testing stuff is always a good idea
20:54 diakopter :P I know
20:54 diakopter well, given infinite resources, yes.
20:55 pmurias in the case of the compiler the cost of writing a test is always low
20:58 Ross joined #perl6
21:00 mikehh_ joined #perl6
21:01 moritz_ rakudo: sub f(:@a) { say @a.perl }; f :a<3>, :a(4), :!a
21:01 p6eval rakudo 1eef08: OUTPUT«duplicate named argument in call␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
21:01 diakopter TimToady: I don't know how to annotate a routine as returning a closure :(
21:02 diakopter moritz_: do you know?
21:02 moritz_ diakopter: I just know --> Callable, but that's not enoough for your case I fear
21:02 diakopter nope
21:03 diakopter but  --> (--> Int)  would work
21:03 diakopter or  --> (Int --> Int)  and such
21:04 moritz_ std: sub f(-->(Int --> Int)) { }
21:04 p6eval std 30582: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse signature at /tmp/T12X2onoy9 line 1:␤------> [32msub f([33m⏏[31m-->(Int --> Int)) { }[0m␤Couldn't find final ')'; gave up at /tmp/T12X2onoy9 line 1:␤------> [32msub f(-->[33m⏏[31m(Int --> Int)) { }[0m␤    expecting any of:␤
21:04 p6eval ..   new…
21:04 moritz_ std: sub f(--> Callable where :(Int --> Int)) { }
21:04 p6eval std 30582: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse signature at /tmp/6ANxAKN9Og line 1:␤------> [32msub f([33m⏏[31m--> Callable where :(Int --> Int)) { }[0m␤Couldn't find final ')'; gave up at /tmp/6ANxAKN9Og line 1:␤------> [32msub f(--> Callable [33m⏏[31mwhere :(Int --> Int))
21:04 p6eval ..…
21:04 diakopter std: sub f -->(Int --> Int) () { }
21:04 p6eval std 30582: OUTPUT«[31m===[0mSORRY![31m===[0m␤Missing block at /tmp/PaRoSyp4Wz line 1:␤------> [32msub f [33m⏏[31m-->(Int --> Int) () { }[0m␤    expecting any of:␤       block␤  routine_def␤        trait␤Parse failed␤FAILED 00:01 109m␤»
21:05 donri joined #perl6
21:05 diakopter std: sub f() -->(Int --> Int) { }
21:05 p6eval std 30582: OUTPUT«[31m===[0mSORRY![31m===[0m␤Missing block at /tmp/F2Imtv7PES line 1:␤------> [32msub f() [33m⏏[31m-->(Int --> Int) { }[0m␤    expecting any of:␤        block␤  routine_def␤        trait␤Parse failed␤FAILED 00:01 111m␤»
21:05 szabgab I seem to remember there was a project to add wxwidgest or some other GUI toolkit binding to Parrot, do you know anything about it? Can it be used from Rakudo?
21:05 donri Does perl 6 have any solution similar to Python 2.5+'s with statement and context managers?
21:05 szabgab or in short, can someone write GUI app in Rakudo?
21:06 orafu joined #perl6
21:06 Tene szabgab: I wrote a couple of gui apps in rakudo months and months ago.  The bindings I used back then have not been kept up through a few revisions of the hll interop api, so I have no idea what the current state is.
21:06 * donri would like to see GObject as a Parrot language
21:06 moritz_ szabgab: http://github.com/jnthn/zavolaj has an example using win32 gui stuff
21:07 szabgab I think would have preferred a simple "no". Then I could crawl back to my hole and not do any further reading :-)
21:07 moritz_ donri: I don't know Python very well.. what are statement and context managers?
21:08 moritz_ rakudo: say 'foo' ~~ { $_ ~ $_ }
21:08 p6eval rakudo 1eef08: OUTPUT«foofoo␤»
21:08 Tene moritz_: with open('/etc/passwd') as f: f.read() ...
21:08 donri Sorry, it's called the "with" statement. with open(file) as f: f.read() # wraps it in a try:... finally: f.close()
21:09 sorear szabgab: I have 'use Tk:from<perl5>' working
21:09 pmurias diakopter: what could be usefull if you made your ide run all the tests with a single button press
21:09 moritz_ donri: there's 'given', which sets $_
21:09 szabgab hmm, that smells like work :-)
21:10 sorear http://github.com/jnthn/blizkost/raw/master/examples/tk.pl
21:10 Tene that doesn't do any cleanup or scope limiting, though.
21:10 diakopter pmurias: yeah
21:10 moritz_ donri: and files are closed automatically when they go out of scope
21:10 donri moritz_: The idea is open() returns a file object, passed to "as f", and that object has __enter__ and __exit__ method that are called before and after the with block, respectively.
21:10 donri Yea in Python too, I think. But it's just one example.
21:10 szabgab sorear, thanks
21:10 moritz_ hm... then I guess we don't
21:12 diakopter otoh, such a construct could be created fairly simply
21:13 _jaldhar joined #perl6
21:13 donri But I'm specifically curious about builtin features. Doesn't have to be identical of course.
21:14 ethel joined #perl6
21:14 diakopter the notion of "builtin" is very much a gray line
21:14 donri Heh.
21:14 diakopter since the syntax is so easily malleable
21:14 diakopter one person's Perl 6 code might look very, very different from another person's.
21:15 moritz_ diakopter: the variable that 'with' assigns to - is that special somehow?
21:15 moritz_ erm, meant donri, sorry
21:15 * donri moved to Python from Ruby due among other things to being tired of that in Rubyland. But somehow feeling Perl 6 manages to be sane anyway somehow.
21:15 Tene moritz_: scoped to the contained block, and methods called on it on block enter and exit.
21:16 moritz_ or are the __enter_- and __exit__ methods called of all variables in scope?
21:16 donri moritz_: It's just what open() returns.
21:16 moritz_ ok
21:16 Tene moritz_: no, just f
21:16 donri http://docs.python.org/reference/datamodel.html#context-managers for the curious.
21:18 sjohnson Authenticating with public key "TBM smu johnson (rsa-key-20080512)"
21:18 sjohnson Linux ToneLoc 2.6.27-14-server #1 SMP Mon Aug 31 13:57:10 UTC 2009 i686
21:18 sjohnson The programs included with the Ubuntu system are free software;
21:18 sjohnson oops
21:18 sjohnson sorry
21:18 sjohnson rakudo:  sub blah { print 'pig' }; my $x = 'blah'; &$x;
21:18 p6eval rakudo 1eef08: OUTPUT«Confused at line 11, near "&$x;"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
21:18 diakopter (for the further curious, javascript's "with statement" means something very different, and C#'s "using statement" is very similar to how python's "with statement" has been described. destructor method called upon exit.  no enter method though)
21:19 donri Isn't "using" import in C#?
21:19 diakopter yes, also
21:19 diakopter at the top level
21:19 donri o_O
21:20 diakopter though it's not really import as much as "just use this name as one of the prefixes to use to resolve typenames in this codefile"
21:20 donri Ah.
21:22 diakopter "using statement": http://msdn.microsoft.com/en-us/library/yh598w02.aspx
21:22 donri What would be the Perl 6 way to reuse contextual boilerplate?
21:22 Tene contextual boilerplate?
21:23 donri Such as try:... finally:...close()
21:23 moritz_ you'd use a LEAVE block instead of 'finally:'
21:24 Tene You could write a macro for it, or just a function, depending on your tastes.
21:25 donri I guess Perl 6 is more like Ruby, you'd just pass a closure to a function?
21:25 Tene with open('/etc/passwd/), -> $f { $f.read(); ... };
21:25 Tene Yeah, it's an option.
21:25 moritz_ donri: probably, yes
21:25 donri je'e :)
21:26 diakopter (same as Perl 5)
21:26 Tene If I have time tonight, I'll show you the macro version.
21:26 pugssvn r30583 | moritz++ | [t/spec] clean up classify.t, and extend it
21:29 pmurias why not open('/etc/passwd, -> $f {$f.read();...})?
21:29 donri Also, annotations. Python 3+ allows you to associate arbitrary expressions with a function and its arguments. def foo(bar: "maybe a commenting string here", baz: str) -> xyzzy
21:29 donri They do nothing in the language itself, but you can use them to for example build a typing system.
21:30 moritz_ what does "they do nothing" mean? do they get stored?
21:30 donri Yea ... but they have no meaning to Python itself.
21:30 Tene donri: Perl 6 already has a typing system.  sub foo(Str $bar, Int $baz where $baz > 2) { ... }
21:31 moritz_ Tene: need curlies are { $baz > 2 }
21:31 Tene oh, yeah, right.
21:31 moritz_ you can only omit them when you do a smart match
21:31 Tene or just where * > 2
21:31 moritz_ right :-)
21:31 dalek rakudo: 916b56d | moritz++ |  (2 files):
21:31 dalek rakudo: implement List.classify; all tests pass except those depending on binding
21:31 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/916b56d60d40d02f3e620d8857d94582b896c1ae
21:32 donri Tene: But typing is just one thing you could do. Maybe def index() -> "/" for web server routing?
21:32 Tene donri: Yes, you can do that.  'sec
21:32 moritz_ donri: you'd do that with traits in Perl 6
21:32 donri Ah, traits.
21:32 moritz_ sub index() is url('/') { ... }
21:32 donri Cool!
21:33 Tene http://github.com/tene/Doten/blob/master/dt.pl is an example I put together a long time ago.
21:33 Tene I think the module itself is using old hackish syntax instead of real supported syntax.  I don't think it runs anymore.
21:34 donri Why is "my" still necessary in Perl 6? Why is't it the default?
21:34 Tene Yes, confirmed, looks like I cheated.
21:34 Tene donri: variable declarations are important for properly dealing with scope, and handling a few other types of errors.
21:35 donri (I love that you can have "-" in symbol names.)
21:35 Tene if you mistype a variable name, for example.
21:35 * moritz_ likes that too
21:35 moritz_ ... and it gets caught at compile time
21:35 donri Decorators: would you do that with traits too?
21:36 Tene python has some sort of issue with variables for closures, I think?  They added the 'nonglobal' keyword to try to get around it, iirc?
21:36 Tene I remember being horrified once I understood how scoping works in ruby.
21:36 donri "works"? ;)
21:37 Tene Yeah, that sounds about right.  I'm generally grumpy about ruby, though, so ignore me pls. :)
21:37 nnunley joined #perl6
21:38 * donri went from loving Perl 5 to hating it and loving Ruby to hating it and loving Python to... liking Python and finding it difficult to wait for Perl 6.
21:40 moritz_ then don't way, do!
21:43 dalek rakudo: ab23221 | moritz++ | build/PARROT_REVISION:
21:43 dalek rakudo: bump PARROT_REVISION to get more testing on newer parrots
21:43 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/ab2322165d5bb9a62e88c0aa0dd17d88059f21b6
21:43 moritz_ colomon: List.classify implemented... what was the example you tried to do the others day? :-)
21:45 Tene perl6: (1..10).classify({ $_ !% 2 }).perl.say
21:45 p6eval pugs: OUTPUT«*** ␤    Unexpected "!%"␤    expecting operator or "}"␤    at /tmp/mdimxITmOV line 1, column 23␤»
21:45 p6eval ..elf 30583: OUTPUT«Parse error in: /tmp/QqjDAv7hqs␤panic at line 1 column 24 (pos 24): Only boolean infix operators may be negated␤WHERE: (1..10).classify({ $_ !% 2 }).perl.say␤WHERE:                        /\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  (eval):8:in
21:45 p6eval ..`__infix_prefix_meta_operator_6947…
21:45 p6eval ..rakudo 1eef08: OUTPUT«Method 'classify' not found for invocant of class 'Range'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
21:45 moritz_ (btw the old tests for classify had some of the calls wrapped in an eval(), and had no comma after the } )
21:45 moritz_ Tene: not yet updated on evalbot
21:45 Tene ah
21:46 Tene well, that's the example colomon tried.
21:46 Tene why does eval need a comma after the }?
21:46 Tene ah
21:46 Tene wait, why?
21:47 moritz_ it had   classify {block} 1,2,3, 4
21:47 moritz_ p5ism
21:47 Tene oh, ouch
21:47 k23z__ joined #perl6
21:49 moritz_ anyway, I love it how simple the implementation of classify was
21:49 moritz_ contains one line of workaround for autovivifciation
21:49 moritz_ but is otherwise quite nice
21:50 moritz_ $ ./perl6 -e ' (1..10).classify({ $_ !% 2 }).perl.say'
21:50 moritz_ ("0" => [1, 3, 5, 7, 9], "1" => [2, 4, 6, 8, 10])
21:50 cognominal rakudo:   my @a;  @a[0..1] = < a b >;
21:50 p6eval rakudo 1eef08: OUTPUT«push_pmc() not implemented in class 'ResizableFloatArray'␤current instr.: 'perl6;Perl6Role;!add_variant' pc 10481 (src/gen/RoleToClassApplier.pir:7584928)␤»
21:51 cognominal hum, hat is the proper way?
21:52 cognominal on my yesterday rakudo, it gives Cannot assign to readonly value
21:54 moritz_ should work
21:54 kst joined #perl6
21:54 moritz_ rakudo is waiting for another array/list refactoring
21:55 moritz_ and the rakudo on p6eval is pretty old
21:55 moritz_ like, 4 days
21:55 moritz_ compiling a newer version right now
21:59 cognominal ok, just curious
22:05 aindilis joined #perl6
22:08 fda314925 joined #perl6
22:08 hejki joined #perl6
22:08 Trey joined #perl6
22:08 yahooooo joined #perl6
22:09 yahooooo joined #perl6
22:20 diakopter TimToady: I need a syntax...
22:21 TimToady "The more, the merrier."  <-- that one is pretty funky.
22:22 chitragupt joined #perl6
22:22 diakopter hm.
22:23 diakopter oh, you haven't waterlogged
22:23 diakopter backlogged
22:23 TimToady workin' onit
22:29 patrickas joined #perl6
22:30 diakopter TimToady:  does   use __PyUnderScores__;  cause all routine names to need __ prefixes and suffixes?
22:31 diakopter not just routine names, *all* names
22:32 TimToady er, huh?
22:32 diakopter kidding.
22:33 diakopter I need a way to annotate a Callable as a strongly-typed closure, as a return type for a routine.
22:36 TimToady I see that
22:38 diakopter on a related note, closure types that take an object of their own type as a parameter or return an object of their own type - I don't know how to express these.
22:39 * lichtkind included now escape sequences
22:40 TimToady well, this at least parses:
22:40 TimToady std: sub foo (--> Callable[:(Int --> Int)]) {...}
22:40 p6eval std 30583: OUTPUT«ok 00:01 114m␤»
22:41 diakopter in C#, one would use a self-referential delegate,  expressed like so (as a quasi-"member" of a class):  delegate Func<Foo, Foo> Foo(Foo foo);
22:42 diakopter a function from Foo to Foo *is* a Foo
22:42 diakopter but does it parse correctly
22:43 TimToady I suspect so
22:43 diakopter std: sub foo (int --> Callable[:(Int --> Int)]) {...}
22:43 p6eval std 30583: OUTPUT«ok 00:01 112m␤»
22:44 diakopter where does that "int" end up
22:44 TimToady as the first and only arg to foo
22:44 diakopter oh, this is a proto sub?
22:44 TimToady huh?
22:45 diakopter I don't understand why an argument name isn't required
22:45 sjohnson is there a p6 way, to write this "one liner" to be less redundant:  push @a, $_->{key1} if exists($_->{key1});
22:45 TimToady well, you can't talk about it without a name, but it requires merely that you pass an int
22:45 diakopter oh
22:45 diakopter I didn't realize names were optional; heh
22:45 sjohnson push @a, $x if (my $x = exists($_->{key1}));  # won't work
22:45 TimToady std: sub foo ($, $, $,) {...} # requires 3 args
22:45 p6eval std 30583: OUTPUT«ok 00:01 111m␤»
22:46 TimToady hmm, a bit surprised it allowed the final accidental comma
22:46 TimToady maybe it requires four args :)
22:46 diakopter std: sub foo ($, $,'' $,) {...}
22:46 p6eval std 30583: OUTPUT«ok 00:01 112m␤»
22:47 kst joined #perl6
22:47 diakopter std: sub foo ('') {...}
22:47 p6eval std 30583: OUTPUT«ok 00:01 112m␤»
22:47 diakopter std: sub foo ('' '') {...}
22:47 p6eval std 30583: OUTPUT«[31m===[0mSORRY![31m===[0m␤Multiple prefix constraints not yet supported at /tmp/n6BWANlOXO line 1:␤------> [32msub foo ('' ''[33m⏏[31m) {...}[0m␤Check failed␤FAILED 00:01 112m␤»
22:48 diakopter std: sub foo ('' 7) {...}
22:48 TimToady just like multi fact (0) { 1 }
22:48 p6eval std 30583: OUTPUT«[31m===[0mSORRY![31m===[0m␤Multiple prefix constraints not yet supported at /tmp/qM3BQycxay line 1:␤------> [32msub foo ('' 7[33m⏏[31m) {...}[0m␤Check failed␤FAILED 00:01 112m␤»
22:48 diakopter std: sub foo ($, $,'' $,) {...} # but this
22:48 p6eval std 30583: OUTPUT«ok 00:01 112m␤»
22:48 diakopter no comma between '' and $
22:48 TimToady any value may be *used* as a type constraint, as long as <value> parses it
22:48 diakopter ohh
22:49 diakopter weeuuhhd
22:49 sjohnson does it have anything to do with the computers-being-nice-to-humans design where you have 1 push per line in your source code, and on the final line, the "$val'" doesn't break anything?
22:49 TimToady otherwise you have to write multi fact ($x where 0) {...
22:49 TimToady }
22:49 sjohnson $val' => $val, i mean
22:50 TimToady that only works because it is explicitly allowed to have a nullterm there after the final ,
22:50 TimToady but parameters are parsed with a different mechanism
22:52 TimToady which, as it happens, allows a final optional comma
22:52 * diakopter is BBBBBBBBBBBBBBBBBEEEEEEEEEERRRRRRRRRRRRRRRRRRRRRRRRRRRRYYYYYYYYYYYY glad I gave up reimplementing the standard grammar
22:52 diakopter now if only everyone else would give it up too...
22:57 nihiliad joined #perl6
22:59 sjohnson pugs: say "Woof"
22:59 p6eval pugs: OUTPUT«Woof␤»
22:59 sjohnson pugs: say " Woof ".trim-trailing
22:59 p6eval pugs: OUTPUT«*** No such method in class Str: "&trim"␤    at /tmp/cmJeikOCiG line 1, column 5 - line 2, column 1␤»
23:00 tche joined #perl6
23:01 sorear TimToady: Do I understand correctly that @a[1] = $x; means &postcircumfix:<[ ]>(@a, 1).STORE($x) ?  What does @a[1] := $x mean?
23:02 sjohnson same as $a[1] in p5 i think
23:02 diakopter sjohnson: he's asking a deeper level than that
23:02 sjohnson i kinda figured :/
23:04 sorear array element binding is troublingly described
23:04 sorear generally := seems magical
23:04 colomon moritz_++:  yay!  (was out at fish fry, stopping by home to grab instruments and now off to a jam)
23:04 diakopter sorear: to me too
23:05 sorear colomon: Your recent commit to List.classify has lead to #p5p praising Perl6 progress
23:05 sjohnson rakudo: my $hash; $hash{val} = 1;  say %hash{val};
23:05 p6eval rakudo ab2322: OUTPUT«Symbol '%hash' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
23:06 sjohnson rakudo: my %hash; $hash{val} = 1;  say %hash{val};
23:06 p6eval rakudo ab2322: OUTPUT«Symbol '$hash' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
23:06 sjohnson rakudo: my %hash; %hash{val} = 1;  say %hash{val};
23:06 p6eval rakudo ab2322: OUTPUT«Could not find sub &val␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
23:06 * sjohnson gives up
23:06 diakopter sjohnson: :)
23:06 sorear rakudo: my %hash; %hash{"val"} = 1; say %hash{"val"};
23:06 diakopter it's like javascript in that sense
23:06 p6eval rakudo ab2322: OUTPUT«1␤»
23:06 sorear magical subscript quoting is gone
23:07 sorear rakudo: my %hash; %hash<val> = 1; say %hash<val>;
23:07 p6eval rakudo ab2322: OUTPUT«1␤»
23:07 sorear but there's a new "quoted subscript" operator, with less magic
23:07 sjohnson rakudo: my %hash; $hash{"val"} = 1; say %hash{"val"};
23:07 p6eval rakudo ab2322: OUTPUT«Symbol '$hash' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
23:07 sorear std: my %h; $h{1}
23:07 p6eval std 30583: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable $h is not predeclared (did you mean %h?) at /tmp/p8gqa9jMHk line 1:␤------> [32mmy %h; $h[33m⏏[31m{1}[0m␤Check failed␤FAILED 00:01 112m␤»
23:08 sjohnson i thought you could do it the p5 way or p6 way... but it seems as though i must do it with % sigil to access/set a value
23:08 colomon sorear: that was moritz_++'s commit.  :)
23:08 sorear sigils don't change depending on how you subscript anymor
23:08 sjohnson sorear: is this the only way to do it now?
23:09 colomon oh wow, the classify code is very nice!
23:09 sjohnson in other words, this new behaviour, is the only way?
23:09 sorear no
23:09 sorear the old way is gone, though
23:09 sorear good riddance
23:09 sjohnson if you dont mind, can you show me another way?
23:10 sorear rakudo: my %h; say %h.'postcircumfix:<{ }>'(1); #method call
23:10 p6eval rakudo ab2322: OUTPUT«␤»
23:10 sjohnson rakudo:  my %hash;  %hash.val = 1;  say %hash<val>;
23:10 p6eval rakudo ab2322: OUTPUT«Method 'val' not found for invocant of class ''␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
23:10 sjohnson (was worth a shot)
23:10 sorear rakudo: my %h; say %h<1>;
23:10 p6eval rakudo ab2322: OUTPUT«␤»
23:10 sorear autoquoting
23:11 TiMBuS joined #perl6
23:11 sjohnson rakudo: my %h; %h{"val"} = 1;  say %h("val"); # curious
23:11 p6eval rakudo ab2322: OUTPUT«invoke() not implemented in class ''␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
23:11 sorear class ''?
23:12 sjohnson i broketed it.
23:12 Tene postifx () is always invocation.
23:12 diakopter that appears often in the RT tickets
23:13 diakopter class ''
23:14 sorear Tene: yes, but shouldn't that be class "Hash"?
23:14 Tene Yes.
23:14 sorear I wonder if it's getting a null name because it's actually a punned role
23:14 Tene rakudo: class Lolcat { }; my Lolcat $l .= new(); $l("OHAI");
23:14 p6eval rakudo ab2322: OUTPUT«invoke() not implemented in class 'Lolcat'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
23:15 sjohnson rakudo: my %h; %h{10}{key1} = "cow";  %h{20}{key1} = "pig";  %h{30}{key2} = "chicken";
23:15 Tene A bit more evidence.
23:15 p6eval rakudo ab2322: OUTPUT«Could not find sub &key1␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
23:15 sjohnson oh shoot
23:15 sjohnson quotes
23:15 sjohnson rakudo: my %h; %h{10}{"key1"} = "cow";  %h{20}{"key1"} = "pig";  %h{30}{"key2"} = "chicken";
23:15 p6eval rakudo ab2322: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class 'Proxy'␤current instr.: '!postcircumfix:<{ }>' pc 14455 (src/builtins/Code.pir:30)␤»
23:16 Tene rakudo: my %h; %h{10}<key1> = "cow"; %h{20}{'key1'} = "pig"; say %h.perl;
23:16 p6eval rakudo ab2322: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class 'Proxy'␤current instr.: '!postcircumfix:<{ }>' pc 14455 (src/builtins/Code.pir:30)␤»
23:16 Tene Yeah, autovivification is busted.
23:16 sorear autoviv is in ROADMAP
23:17 sjohnson Tene: thanks
23:17 Tene sjohnson: glad to help
23:18 sjohnson its what i deserve for being too ambitious
23:39 sjohnson rakudo:  my $a; $a.defined.say;
23:39 p6eval rakudo ab2322: OUTPUT«0␤»
23:39 sjohnson rakudo:  my $a = 1; $a.defined.say;
23:39 p6eval rakudo ab2322: OUTPUT«1␤»
23:40 sjohnson can a scalar push itself to an array?
23:40 kst joined #perl6
23:40 sjohnson as in, $a.defined.push(@defined_vals);
23:42 sjohnson perhaps that's too radical.
23:47 rv2733 joined #perl6
23:51 justatheory joined #perl6
23:51 sorear what would $a.defined.push mean?
23:52 sorear rakudo: my $a = 1; say $a.defined.WHAT;
23:52 p6eval rakudo ab2322: OUTPUT«Bool()␤»
23:52 sorear rakudo: my $a = 1; say $a.defined.^methods.Str;
23:52 p6eval rakudo ab2322: OUTPUT«pred ACCEPTS perl Bool Bridge succ uc index chr acotanh samecase trim-trailing substr flip atanh exp cosec acosec chars cosech roots lcfirst sec cis comb log log10 atan sprintf acos bytes eval sin chop tanh asinh acosech abs ceiling unpolar floor asech ord capitalize round
23:52 p6eval ..split ma…
23:52 sorear ok, Bool does have a few methods
23:53 sorear anyways you could always do @defined_vals.push($a) if $a.defined
23:53 sorear alternatively, make a list of all your vals
23:53 sorear then @defined_vals = @vals.grep: *.defined;
23:55 arnsholt .u ḷ
23:55 phenny U+1E37 LATIN SMALL LETTER L WITH DOT BELOW (ḷ)
23:56 sorear urxvt gets that character completely wrong
23:57 sorear I see an upside down bold small letter j
23:58 sorear does rakudo have !FETCH?
23:58 sjohnson sorear: what im trying to do, just for curiosity sake, is make this line as non-redundant as possible
23:59 sjohnson bear in mind, this is p5 code.   but it is this:  push @a, $_->{somekey} if exists($_->{somekey});

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

Perl 6 | Reference Documentation | Rakudo