»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by lichtkind on 5 March 2010.
sjohnson rakudo: say (" cow ", " pig ", " chicken").trim-leading.perl 00:00
p6eval rakudo 1eef08: OUTPUT«"cow pig chicken"␤»
sjohnson rakudo: say (" cow ", " pig ", " chicken").WHAT
p6eval rakudo 1eef08: OUTPUT«Parcel()␤»
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
p6eval rakudo 1eef08: OUTPUT«"cow pig chicken"␤»
sjohnson can the trim work on lists / parcels too? or strings only
rakudo: my @a = " cow ", " pig ", " chicken"; say @a.trim.perl 00:02
p6eval rakudo 1eef08: OUTPUT«"cow pig chicken"␤»
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?" :)
sorear thinks bitd+ should be a macro-type-family 00:03
TimToady yeah, was thinking that myself
the generic routines would be interesting
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
p6eval rakudo 1eef08: OUTPUT«"cow pig chicken"␤»
ash_ in the llvm, you can make an integer of iNNNN where NNNN is 1 to 2 ^ 32 -1
it emulates it if your hardware doesn't support it
TimToady then there's the weird ones like num80
ash_: does that include things like i24? 00:06
ash_ its float support isn't nearly that dynamic
TimToady or just powers of 2? 00:07
ash_ TimToady: yeah, that would work
sjohnson TimToady: do you have any thoughts on whether you can trim sets in p6, on Lists (in p6, are they called parcels?)
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.
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
or would one just use the map
TimToady or a hyper
ash_ @a = @b.>>trim ? 00:10
TimToady @b».trim
ash_ ah, my bad . on the wrong side
TimToady @b».=trim to do it in place
sjohnson rakudo: my @a = " cow ", " pig ", " chicken ", my @b = @a.map($_.=trim); say @b.perl
p6eval rakudo 1eef08: OUTPUT«Method 'trim' not found for invocant of class ''␤current instr.: '!dispatch_.=' pc 438 (src/glue/dispatch.pir:117)␤»
ash_ rakudo: my @a = " cow ", " pig ", " chicken ", my @b = @a.map({$_.=trim}); say @b.perl 00:11
p6eval rakudo 1eef08: OUTPUT«[[]]␤»
TimToady um, s/,/;/
sjohnson rakudo: my @a = " cow ", " pig ", " chicken "; my @b = @a.map($_.=trim); say @b.perl
p6eval rakudo 1eef08: OUTPUT«Method 'trim' not found for invocant of class ''␤current instr.: '!dispatch_.=' pc 438 (src/glue/dispatch.pir:117)␤»
ash_ rakudo: my @a = " cow ", " pig ", " chicken "; my @b = @a.map({$_.=trim}); say @b.perl
p6eval rakudo 1eef08: OUTPUT«["cow", "pig", "chicken"]␤»
sjohnson thanks guys
ash_ rakudo: my @a = " cow ", " pig ", " chicken "; my @b = @a.map({ *.trim }); say @b.perl
p6eval rakudo 1eef08: OUTPUT«[{ ... }, { ... }, { ... }]␤»
lichtkind good night 00:12
sjohnson this is some cool stuff to look forward to
00:12 lichtkind left
ash_ is that legal? to do *.trim 00:12
or is it @a.map *.trim; ?
sjohnson i suppose.. rakudo can tell us! 00:14
00:14 k23z__ joined
sjohnson rakudo: my @a = " cow ", " pig ", " chicken "; @a>>.trim; say @a.perl 00:14
p6eval rakudo 1eef08: OUTPUT«[" cow ", " pig ", " chicken "]␤» 00:15
sjohnson rakudo: my @a = " cow ", " pig ", " chicken "; @a>>.trim.perl;
p6eval rakudo 1eef08: ( no output )
sjohnson scratches head
ash_ rakudo: my @a = " cow ", " pig ", " chicken "; @a>>.=trim; @a.perl
p6eval rakudo 1eef08: ( no output )
ash_ rakudo: my @a = " cow ", " pig ", " chicken "; @a>>.=trim; @a.perl.say
p6eval rakudo 1eef08: OUTPUT«["cow", "pig", "chicken"]␤»
sjohnson heh
forgot to say it
oops 00:16
thanks ash_, you saved me much confusion
perl 6 hero
ash_ @a>>.trim is not going to modify @a, its going to make a new @
sjohnson my @a = " cow ", " pig ", " chicken "; @a>>.=trim.perl.say;
rakudo: my @a = " cow ", " pig ", " chicken "; @a>>.=trim; @a.perl.say; 00:17
p6eval rakudo 1eef08: OUTPUT«["cow", "pig", "chicken"]␤»
sjohnson <--- impressed with perl6
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
sjohnson really? 00:19
just when i thought i understood it all
<--- goes back to the drawing board
diakopter had already forgotten that TimToady already answered my question about casting 00:20
sjohnson hello dia
diakopter hello sjo 00:21
00:22 cdarroch left
sjohnson ( `ー´) 00:22
ash_ isn't there a sequential hyper op?
diakopter preparing to copy/paste yet another section of my C# code
ash_ I don't see it anymore in the spec
sjohnson: Look up the <== op 00:23
sjohnson ash_: that's easier said than done. what would i google for?
everytime i try to google for operators, frustration results
ash_ S03 and S07
diakopter ooo that's an idea 00:24
ash_ <== blows my mind
diakopter all the operators should also be indexed by each's written-out name
in the synopses I mean. so google would find "left-angle equal equal" 00:25
ash_ <== is the Feed operator
also take/gather are nifty
sjohnson yeah 00:26
looks like ash_ is referring to the Sequencer technology 00:27
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
ahh nevermind, i think i get it 00:30
but i am not sure of when i would use it. perhaps my script programming needs are too basic :/
ash_ when you don't know when something will end, its always nice to be lazy and only evaluate when you have to
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:32
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:33
Str.pod doesn't mention them *sad face* 00:34
ash_ you mean like 123.Str ?
sjohnson rakudo: say " cow ".trim-trailing # like this
p6eval rakudo 1eef08: OUTPUT« cow␤»
00:35 chitragupt left
ash_ ah, i think the spec is out of date on those 00:35
00:36 lest_away is now known as lestrrat 00:37 chitragupt joined
lue o hai 00:37
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:38
hmm.. i suppose i will have to wait for an answer some other day 00:41
lue sjohnson: I can't imagine rakudo implementing something unspecced. 00:42
My guess is they talked about it, but never got to speccing it.
sorear lue: you mean like macros, or the Perl6::Compiler API, or ...? 00:43
sjohnson my thoughts as well
00:43 kst left
sorear rakudo: say Perl6::Compiler.compile("2+2", target => 'past') 00:43
p6eval rakudo 1eef08: OUTPUT«Capture[0x2bd95c8]␤»
sorear rakudo: say Perl6::Compiler.compile("2+2", target => 'pir')
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'
..$P63…
00:43 kst joined 00:44 yinyin joined 00:50 plobsing joined
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:00
[Coke] "about as necessary as a waterproof camel" 01:01
ash_ lue: why not do class Foo { has $.a = 123; } ? 01:02
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
perlgeek.de/blog-en/perl-6/object-c...ation.html talks about object initialization, from moritz_++ 01:04
lue Thank you. 01:06
I need to make it so the NES "boots up" correctly. BUILD seems perfect for that. 01:09
01:12 jhuni left
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)␤»
lue rakudo: class Hi { submethod BUILD { say %_; }; }; Hi("hi")
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)␤»
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)␤»
lue just wondering how you get what's passed to BUILD.
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)␤»
ash_ BUILD should have all the values already 01:21
lue I just need the user to input a couple of file directories. Wondering if that can happen using just BUILD... 01:22
rakudo: class Hi { submethod BUILD { say %_; }; }; Hi("hi" => $a)
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)␤»
lue rakudo: class Hi { submethod BUILD { say %args; }; }; Hi("hi" => $a)
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:22 wknight8111 left
ash_ rakudo: class Hi { method new(*%kw) { say %kw; }; }; Hi.new(:a<hi>); 01:23
p6eval rakudo 1eef08: OUTPUT«a hi␤␤»
ash_ you'd probably need to do that in .new
lue yeah. Hello, bless() 01:24
colomon lue: if you can't imagine Rakudo implementing something unspecced, you need to stretch your imagination. :)
lue er, see terms and conditions for details (?)
(I should have put an asterisk at the end) 01:25
(then again, I'm writing an _emulator_. Be pretty stunning not to need to call bless)
I probably meant s/unspecced/not discussed/
01:27 chitragupt left
colomon True that most things get discussed here before they are added. 01:27
(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.)
lue
.oO(is it used to build wall-e ? :) )
01:28
01:29 chitragupt joined
lue
.oO( remind me never to look in the spec if I want to use something within the next five minutes :) )
01:30
colomon It's used to implement log, at any rate. That could be used for waste disposal, I suppose.... 01:31
lue I could use a new hous-e. Can you get me a few log-e's? </puntrain> 01:32
afk 01:34
01:35 chitragupt left 01:36 chitragupt joined 01:40 alester joined 01:52 JimmyZ joined, chitragupt left 01:54 szabgab joined, chitragupt joined 01:59 Psyche^ joined 02:04 Patterner left, Psyche^ is now known as Patterner 02:10 agentzh joined
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
this is not quite correct
just because it is calculated in any order doesn't mean the results are returned in any order
ash_ ah, did that change?
TimToady never been different
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.
TimToady but the result will always be ordered, or hypers are completely useless
colomon rakudo: say (1..10 >>+>> 1).perl 02:19
p6eval rakudo 1eef08: OUTPUT«1..[11]␤»
colomon bother
rakudo: say ((1..10) >>+>> 1).perl
p6eval rakudo 1eef08: OUTPUT«[2, 3, 4, 5, 6, 7, 8, 9, 10, 11]␤»
colomon so it might do, say, 5 + 1 before it does 3 + 1 -- but the final order will always look like that. 02:20
sorear Why are parrot STRINGs so complicated? 02:21
colomon sorear: this is the wrong channel to ask that. ;) 02:23
sorear colomon: I was hoping that I'd get a better answer by asking slightly further away 02:24
colomon and you might well be right. :) 02:25
TimToady too many conflicting requirements, like the space shuttle
and perhaps a penchant to re-invent type information with properties 02:27
mix in several doses of premature optimization; stir well 02:28
02:29 plobsing left 02:30 plobsing joined
TimToady also, reliance on icu figures in there 02:32
there have been plans to simplify the string model in an NFGish fashion, but not enough collective tuits to get there 02:35
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 :/
the real simplification would be to allow compact arrays of ints to be used as strings 02:38
and reduce strings to an api, basically
they're too isolated in their own little black box currently 02:39
it might actually help to prototype an NFG implementation in Perl 6 02:40
once we get bufs
most of the Unicode tables can be borrowed right out of Perl 5
colomon masak++ 02:45
pugssvn r30577 | lwall++ | [mixin.t] move declaration of @array out to where it can be seen by more than one block 02:48
r30578 | lwall++ | [mixin.t] a better fix is to move the block boundary 02:51
03:00 rv2733 left 03:03 tylerni7 left 03:07 tylerni7 joined
ash_ how much is involved with unicode? is it easy to do without say ICU ? 03:13
03:15 jhuni joined 03:23 k23z__ left 03:24 kst left
sorear TimToady: the thing is, "NFG" is being added as just another string representation 03:25
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:26
03:27 molaf joined
ash_ "you could a declared name" ? 03:27
TimToady interpolate
or should I say, 'Interpolate "interpolate".' 03:28
ash_ lol
sorear TimToady: talking to me?
TimToady yes
03:29 kst joined
sorear How do you interpolate text? 03:29
TimToady by returning a string inside the {{{...}}}
if you return a string, it reparses there 03:30
it's still not quite the ability to insert random ast nodes, but it's an escape valve at least
sorear so {{{ is legal absolutely anywhere? 03:31
how does that interact with one-pass parsing?
TimToady eh, it only means quasi unquote within a quasi quote
otherwise you just have three nested blocks
sorear S06 says that quasi { } parses the innards exactly once 03:32
but, if {{{ }}} can produce textual substitution, how is it possible to statically parse quasiquotes? 03:33
TimToady hmm, good question :)
03:36 nihiliad joined
sorear in general, I feel as though Lisp's quasiquotes only work because they're actually a completely general data structure templating system 03:40
03:40 chitragupt left
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
it's really like the quasi needs to tell the parser its next fate
descend through these rules and feed the leaf node this 03:42
sorear what's a fate?
TimToady when we do the LTM alternation across all rules transitively
it decides which rules the recursive descent is destined to descend
so no choices have to be made until you run out of a chain of fate
that's how we mix PEG with LTM 03:43
03:44 chitragupt joined
TimToady for instance, if you go to the pugs/src/perl6 dir and (after making) look at lex/STD/P6/termish 03:44
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
TimToady that's pretty much all that's in 'em 03:46
sorear what's in a pattern prefix? 03:47
what are in the .store and name-mangled files?
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?
TimToady .store is just a Storable of the same data, predigested slightly 03:49
03:49 k23z__ joined
TimToady the name mangled files are the specific multis of a proto 03:49
the fate chain consists of a list of pairs
and there are two kinds of pairs 03:50
the first gives the name of the alternation in question, just to make sure things stay in sync
(each alternation double checks its name against it)
sorear are the alternatives in p5regex format?
TimToady yes
ish
if the second part is a number, then it's a normal | alternation 03:51
if the second part is a mangled name, it's a <proto> call that has to look for all the proto: rules
the (?#::) is a marker that says if you use this pattern in a larger lexer, it doesn't compose with anything after it 03:53
03:53 stephenlb left
TimToady that is to say, (?#::) represents the declarative/procedural boundary that S05 goes on about 03:54
so it generally means the subrule did something side-effecty 03:55
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:56 ruoso left
sorear diakopter: What are you porting it to? 03:57
BrowserUk 'scuse the 5isms
TimToady I would think that $x would only need locking during the assignment
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
I don't profess to be an expert on this, but I'm just trying to keep everything as local as possible 03:59
sorear: what do you mean by 'indefinitely cached'? 04:00
sorear TimToady: the compiler hoists the read of $x outside the loop 04:01
BrowserUk Okay, thanks. I need to process that. 04:02
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
TimToady I guess I can see where a thread might assume it has sole control of its "own" variables like $x 04:04
unless an async {} itself pessimizes outer declarations
sorear I'm not necessarily saying it should *not* change to 2
ash_ when would the variables synchronize? immediately? or when the async{ } ends?
BrowserUk No matter. I'l try to be breifer in future.
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 :)
sorear and I don't really think we should be designing a radical memory model before we have any implementation experience
TimToady I guess we need to figure out what is sufficiently dwimmy for a sufficiently low price
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
TimToady I dunno, I'm kinda noncommital about being noncommittal... 04:07
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 patspam left
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
or we need some way of cloning externally linked vars
btw, that's one reason we try to distinguish readonly dynamic vars from rw ones
since the ro ones can just be copied into the thread
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?)
TimToady BrowserUk: well, unless part of the async is to mark the variables as potentially shared 04:11
then at least if the outer thread looked, it could find it out
but as you say, it's nice to get it as close to the metal as we can
I think we can at least guarantee that a lexical pad without an async in it can assume no sharing 04:12
so we're fine in the downward direction, basically
ash_ my $a = 1; async { sleep 123; $a = 2; sync $a; }; loop { say $a };
TimToady it's looking up the lexical scopes that is more problematic 04:13
BrowserUk ash_: That's interesting.
TimToady what does 'sync' do there? 04:14
ash_ synchronize $a with the rest of the world?
just thinking out loud
TimToady sounds like a transaction commit
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:15 molaf left
ash_ hmm, i should read S17 before commenting 04:16
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.
TimToady otoh, you need some way of managing larger transactions 04:19
04:19 iblechbot joined
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.
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
course, if the outer lexical can change, you can still get incoherent views in different threads, hmm 04:22
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
TimToady in theory, p6 feeds are the same
though not yet implemented
BrowserUk They form the basis of how the add iterators to customs classes 04:24
s/the/they/
TimToady it's one way to do it
ash_ gather/take is simliar in p6 04:25
for making your own iterator 04:26
[Coke] TimToady: simon already prototyped an NFG implementation in perl6, about... what, 2 years ago?
(is unicode easy to do without ICU). hee.
BrowserUk Indeed. All these things work similarly at the syntax level, the hard bit is under the covers.
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:27
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:29
04:29 alester left
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
though mostly for lists, which are serial promises :) 04:31
BrowserUk (Sounds like you've been talking to my wife :)
TimToady well, I talk to my wife occasionally too :)
BrowserUk I need to think, read and write somethings down. Thanks for your time. 04:32
TimToady ciao
BrowserUk bye
04:37 BrowserUk left
jonrafkind what is the state of perl6's syntactic extension? 04:38
PerlJam Texas
jonrafkind I mean, perl6 gives you the capability of defining new parsers, but what is the result of the parsing the input stream? 04:40
04:40 orafu left 04:41 mightmouse joined
PerlJam I'm even less sure now of what you're really asking. 04:41
jonrafkind perl6 has macros, or something, right? 04:42
04:42 orafu joined
PerlJam jonrafkind: it does. 04:42
mightmouse hello
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..
but the tutorial wasn't real clear on where everything goes :\
can you help me out?
04:45 balb joined
balb in which situation I can do something like 'print ${$var}', please give me one example 04:45
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
mightmouse ah ok
thx mate
TimToady Germany
04:46 steinberg left 04:47 [mark] joined
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?
PerlJam heh
TimToady macros are still in development, but we do have derived grammars that we use heavily
04:49 thowe joined
thowe Hi 04:49
PerlJam thowe: hello
thowe is happy 04:50
jonrafkind do the grammars simply define replacement syntax?
or can you write functions that perform arbitrary computation
thowe I think I am finally getting a laptop that isn't someone else's 10 year old cast-off
balb PerlJam: I am trying to following some perl tutorial and want to know what is ${} ?
TimToady grammars are classes, and derived grammars can override specific rules
so you can tweak a little, or tweak a lot
jonrafkind any notion of hygiene?
TimToady in macros, sure
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?
TimToady quasi quoting/unquoting
also textual macros if you need 'em
jonrafkind thats not hygiene.. but that lets you use gensym I guess
TimToady well, it's all the interplay of the lexical scopes
sorear is currently working out some of the implementation details, but the intent is that they be correctly generic 04:52
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
PerlJam thowe: blog about your experiences using Perl 6 for text processing. It'll help the next guy I'm sure. 04:53
TimToady jonrafkind: have you read the section in S06 about macros? 04:54
jonrafkind yea
04:54 kst left
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...
The more interesting stuff I do would not be of general interest
and I'm a boring person otherwise as well 04:55
jonrafkind wait no I read S05
TimToady jonrafkind: sorear has a beginning of an imlementation, maybe he has some examples he's been testing
PerlJam thowe: heh, you sound like me :)
TimToady macros are specced at S06:2785
if you look at the log, that'll be turned into a link 04:56
04:59 kst joined, jhuni left
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
TimToady and the quasi is considered a block boundary, so any variables declared inside are not visible externally 05:02
s/block boundary/lexical scope/
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
well, you'd say 'my $x = a' to make the new declaration explicit 05:04
05:04 mightmouse left
jonrafkind right 05:04
TimToady all variables have to be declared in Perl 6
jonrafkind oh I saw STD.pm6 and my eyes sort of glazed over.. 05:05
TimToady indeed, there's a lot there
but the basic principle is this
the current parse state is held in the objects that are passed around
those objects are all derived from Cursor
which keeps the current position in the parse 05:06
but they are all typed according to the current language that is being parsed
so to switch languages in mid stream, it suffices merely to pass a different type of Cursor to the next match rule
Perl 6 itself is a braid of several different languages, and derivatives of those 05:07
for instance, there's a basic quoting language called Q, and all other quoters derive from that by adding escapes, different terminators, etc
05:07 stepnem left
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:08
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
TimToady I think jonrafkind might want to ask you about macro examples
jonrafkind yea, if you have any smallish ones 05:10
05:10 iblechbot left
TimToady jonrafkind: note, they may only work in sorear's copy of rakudo :) 05:10
05:11 gfx joined 05:13 stepnem joined
jonrafkind sorear, have any? 05:14
sorear pastie.org/943825 is real world macro code
from the IRC client I'm prototyping
as you can see, it's pretty horrible 05:15
lots of explicit stringing and unstringing
macros can return ASTs but it's suprisingly non-useful
05:15 chitragupt left
sorear because returning an AST isn't enough to generate a definition &c 05:15
you also have to call various methods on the compile-time metamodel
and the only thing that knows how to do that is the standard parser actions 05:16
hygenic/quasiquote stuff isn't implemented
05:16 orafu left
sorear I'm convinced it's unimplementable as specced 05:16
05:16 xinming left, orafu joined
sorear TimToady and I have been trying to come up with a workable revision 05:16
jonrafkind was my fortress paper any use to you? 05:17
sorear there are a few very nasty cases
I never saw it
05:17 chitragupt joined
jonrafkind i dunno if it will help, but here it is anyway: 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
suppose you had such a macro
macro my-sub is parsed( / <signature>? <blockoid> / ) { MAGIC HERE }
my-sub (&infix:<¢>) { 2 ¢ 3 } 05:19
you can't parse Perl 6 without knowing the lexical referencing environment
jonrafkind is that parameterizing the macro over the infix operator?
sorear no
sub (&infix:<¢>) { 2 ¢ 3 } is just an alpha renaming of sub (&foo) { foo(2, 3) } 05:20
operators are funny spelled functions
jonrafkind ok
05:20 meppl joined
sorear in Haskell, operators and functions are always lexically distinguishable; in Perl 6, they aren't 05:21
jonrafkind so is the issue that you don't bind macros until after parsing? 05:22
sorear the issue is that <block> in a parse list doesn't know the lexical referencing environment 05:23
05:23 gfx left
jonrafkind oh it only has its own lexical environment 05:24
05:24 BrowserUk left
TimToady it's like you want to be able to trigger the parse from inside the quasi-quote 05:28
and pretend to be the lexical scope of the quasi while parsing the user's code somehow
sorear I suppose if you're just substituting terms it doesn't matter. 05:29
But if you're just substituting terms, you should just use a & argument
05:29 TiMBuS left
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
TimToady or maybe that's inside out
maybe we should parse the user's code as generic code, and instantiate it into the quasi
hmm, but that could lose hygiene 05:31
jonrafkind hygiene matters in languages with proper lexical scoping, like scheme 05:32
05:33 chitragupt left
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:34
TimToady it's shorter in Perl 6 :) 05:35
hejki :)
TimToady and -> almost looks like a lambda, rotated 45°
05:35 chitragupt joined
TimToady and squinting 05:36
jonrafkind (define-syntax-rule (l x ...) (lambda x ...)) yay, one letter
sorear I'm pretty sure that doesn't work 05:37
TimToady course, then we go and blow it all on sigils :)
sorear the 'x' in the lambda is a new variable, nothing in the body can bind to it
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
p6eval rakudo 1eef08: OUTPUT«10␤»
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)
TimToady sorear: are you claiming that the 'is parsed' would not be running in the user's current language? 05:40
05:40 k23z__ left
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
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
phenny sorear: I'll pass that on when masak is around.
sorear TimToady: exactly
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
that seems like a rather specialized thing
sorear the rakudoversion is much uglier
TimToady not sure I want that to 'just work'
sorear sure, but it's the specific example I started with
TimToady well, but that's rakudo :)
sorear implementing a custom method-like declarator
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
assuming one can also attach the action conveniently
PerlJam: 'is foo' is okay, but sometimes it's the hammer everyone keeps mentioning 05:47
it's nicer if you can get the thing to just fall out from other features more naturally
internal trait blocks, aka "phasers", have the advantage of giving lexical scoping, for instance 05:48
PerlJam I've never wanted macros beyond the simple text subsitution kind anyway :) 05:51
TimToady admittedly, the routine_declarator in STD is not exactly simple... 05:54
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:55
part of the power of all this is that you can redefine subrules out from under superrules 05:56
05:56 justatheory left
TimToady though I'm sure there are infelicities involved 05:56
esp if the superrule thinks it knows the structure of the subrule 05:57
anyway, Lord, make the easy things easy, and the hard things possible, and gimme wisdom to know the difference. -- St Larry of Assisi 05:58
zzz & 05:59
06:07 am0c joined 06:12 uniejo joined 06:13 kst left 06:14 kst joined 06:16 snarkyboojum joined 06:20 jonrafkind left
moritz_ good morning 06:21
sorear good morning 06:25
snarkyboojum good beautiful afternoon in the sun 06:29
06:35 Su-Shee joined
pugssvn r30579 | moritz++ | fix a function call in S06-multi/type-based.t 06:35
r30579 |
r30579 | Patch courtesy of Hongwen Qiu
06:37 nihiliad left
sorear reads S04 06:40
06:40 viklund joined
sorear hmm 06:42
std: sub foo() { return { return }; }; foo()(); # what does this do?
p6eval std 30578: OUTPUT«ok 00:01 113m␤»
sorear S04:0318 EHTMLINPOD 06:47
oh wait nevermind
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)␤»
JimmyZ rakudo: sub foo() { return { say 'hi'; }; }; foo()();
p6eval rakudo 1eef08: OUTPUT«hi␤»
pugssvn r30580 | sorear++ | Fix incorrect use of HTML in POD6 in S04
JimmyZ rakudo: sub foo() { return {} }; foo()();
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()();
p6eval rakudo 1eef08: OUTPUT«No exception handler and no message␤current instr.: '&return' pc 17923 (src/builtins/Junction.pir:414)␤»
JimmyZ bug?
moritz_ JimmyZ: the error message is less than awesome, but the behaviour is correct
JimmyZ: you can only return() from routines, not from blocks 06:51
JimmyZ rakudo: sub foo() { { return } }; foo()();
p6eval rakudo 1eef08: OUTPUT«invoke() not implemented in class 'ResizablePMCArray'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
moritz_ that looks more like a bug
JimmyZ rakudo: sub foo() { { say 'hi'; return } }; foo()();
p6eval rakudo 1eef08: OUTPUT«hi␤invoke() not implemented in class 'ResizablePMCArray'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
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:53
JimmyZ NYI must be a bug :) 06:55
sorear JimmyZ: that error message is parrot-ese for "you tried to use an array as a sub" 06:57
vtables are confusing like that
JimmyZ yes, but rakudo shouldn't display 06:58
07:00 snarkyboojum left 07:04 Ross joined, drbean left 07:05 snarkyboojum joined 07:06 drbean joined 07:10 thowe left 07:16 Ross left 07:17 kaare joined, kaare is now known as Guest57162 07:20 Guest57162 left 07:26 bbkr_ joined 07:27 plobsing left
pugssvn r30581 | qiuhw++ | Add "qiuhw" to AUTHORS list to test if qiuhw have the proper commit privilege. 07:32
07:42 stepnem left 07:49 bbkr_ left 07:54 cosimo left 08:26 alexn_org left
moritz_ ash_: (backlogging) @a>>.method may *run* out of order, but the result list will still be in the correct order 08:27
ash_: so @a>>.trim is a valid application
ash_: just things with side effects (like .say) shouldn't be used that way
oh sorry, just saw that TimToady++ already mentioned it 08:29
sorry for the noise
I should backlog first, and then talk :-)
08:37 mantovani left 08:40 cosimo joined, dakkar joined 09:20 kst left 09:21 kst joined 09:38 mightmouse joined 09:43 yinyin left 09:48 Intensity left, Exodist left, Exodist joined 09:49 yinyin joined, yinyin left 10:12 rv2733 joined 10:14 wknight8111 joined 10:18 masak joined
masak ohio, #perl6 10:18
phenny masak: 06 May 17:21Z <sorear> tell masak that "may get lost" means "will get lost"
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?
masak: 05:42Z <sorear> tell masak , you complained about not being able to use regexes outside grammars earlier - "my regex" works in rakudo
masak sorear: yes, and excellent, respectively. 10:19
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:21
moritz_ it is, no doubt about that 10:22
masak moritz_++ # for committing the other two tidying commits from Xavier
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:33
std: sub foo(&infix:<¢>) { 2 ¢ 3 } 10:47
p6eval std 30581: OUTPUT«ok 00:01 116m␤»
10:47 agentzh left 10:48 JimmyZ left
masak & 10:53
10:57 xinming joined 11:03 wknight8111 left 11:05 KyleHa joined
KyleHa Good morning, #perl6 11:06
colomon o/ 11:11
11:16 wknight8111 joined 11:28 envi^home joined 11:29 wknight8111 left 11:30 mightmouse left
moritz_ \o it's KyleHa++ 11:31
KyleHa Hi. 8-)
11:34 balb left 11:41 rjh joined 11:42 wknight8111 joined 11:43 TiMBuS joined 11:45 rjh left 11:46 KyleHa left
moritz_ has to decide what the next "This week's contribution to Perl 6" is going to be 11:47
only about 9% of the people who search for Perl 6 with google click on perl6.org 11:54
hejki :O 11:55
moritz_ that's because the average position in the search results is... 10
hejki weird, we need to pump it up
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:56
11:56 chitragupt left
moritz_ and google reports 630 backlinks 11:57
another SEO problem with perl6.org is that it contains relatively little text 11:59
12:01 k23z__ joined 12:03 lrnperl6 joined
lrnperl6 morning all 12:03
moritz_ hi 12:04
lrnperl6 morning moritz_
takadonet morning all 12:08
12:21 kst left 12:22 _jaldhar left, kst joined, _jaldhar joined 12:26 JimmyZ joined 12:32 chitragupt joined, s1n left
colomon alpha: say 10.log(1i) 12:37
p6eval alpha 30e0ed: OUTPUT«0 + -1.46587119775886i␤»
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)␤»
moritz_ rakudo: say 8.log(2)
p6eval rakudo 1eef08: OUTPUT«3␤»
moritz_ somhow I have a hard time believing that the result is correct
(a complex number with magnitude 1) ** anything has the magnitude 1, no? 12:40
rakudo: say 10.log(1) 12:41
p6eval rakudo 1eef08: OUTPUT«Divide by zero␤current instr.: 'infix:</>' pc 305345 (src/gen/core.pir:3034)␤»
colomon Huh. good point.
moritz_ watches the math lectures bitrot in his brain 12:42
12:48 TiMBuS left 12:54 cosimo left 13:04 viklund left, KyleHa joined
KyleHa Irc on my phone... I wonder what this does when I go through a dead spot. 13:07
o/ 13:10
13:10 KyleHa left
mathw ...that, I think :) 13:15
13:16 SmokeMachine joined 13:25 ruoso joined 13:30 cosimo joined, IllvilJa left 13:32 kst left, kst joined 13:34 mightmouse joined 13:36 patrickas joined, pmurias joined
pmurias diakopter: hi 13:36
13:40 dual left, lrnperl6 left
colomon loliblogged: justrakudoit.wordpress.com/2010/05/...-a-logger/ 13:42
JimmyZ loop { colomon++; }
13:46 mightmouse left 13:53 am0c left 13:57 clintongormley joined 14:01 christoffer joined
christoffer who 14:01
masak: hej! 14:02
14:08 am0c joined
dalek kudo: def9f9c | (Solomon Foster)++ | src/core/ (4 files):
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
kudo: 977fad6 | (Solomon Foster)++ | src/core/ (4 files):
Rename log-e to the more traditional (yet still unspec'd and likely to go away) ln.
diakopter pmurias: hi 14:16
14:16 mantovani joined 14:17 log_ joined 14:18 log_ left
pmurias diakopter: when will perlesque have the ability to define classes with attributes+methods? 14:21
diakopter soooooooooon :)
do you need that soon?
14:22 uniejo left
pmurias i could write the mildew runtime in C# but i'm not sure if it's not better to wait 14:22
diakopter I think it's better to wait 14:23
b/c the translated CIL will be essentially just as efficient
can you focus on your optimizer for another few days? 14:24
or translator?
pmurias yes 14:26
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
which TimToady et al said were:
my $a:(Int --> Int); and my $b:(--> Int); # parameter-less function
pmurias: identical to how they're declared as parameters 14:29
14:32 kst left 14:33 kst joined
diakopter pmurias: eh 14:33
pmurias: and then after those, classes.
should be this weekend. 14:34
14:45 dual joined 14:46 JimmyZ left, alester joined 14:56 christoffer left
cognominal rakudo: say int "1" 14:58
p6eval rakudo 1eef08: OUTPUT«Could not find sub &int␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
cognominal hum
14:58 pmurias left
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)␤»
TimToady rakudo doesn't have the functional forms of coercion yet 15:06
moritz_ is that even allowed without parenthesis? 15:07
std: say Int "1! 15:08
p6eval std 30581: OUTPUT«===SORRY!===␤Confused at /tmp/jlp3cjhiXt line 1:␤------> say Int ⏏"1!␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤Parse failed␤FAILED 00:01 112m␤»
moritz_ std: say Int "1"
p6eval std 30581: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/Tdhrnac1KE line 1:␤------> say Int ⏏"1"␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤Parse failed␤FAILED 00:01 110m␤»
masak 'Int' is foremost a type, I guess. and only secondarily a (coerce) function.
dalek meta: r243 | diakopter++ | trunk/Sprixel/ (4 files):
[perlesque] parametric ("generic" in CLR) type annotations in parameter lists,
15:13
15:14 k23z__ left, nihiliad joined 15:15 SmokeMachine left
TimToady er, yes, the parens are required 15:20
std: say Int("1") 15:21
p6eval std 30581: OUTPUT«ok 00:01 110m␤»
TimToady rakudo: say Int("1")
p6eval rakudo 1eef08: OUTPUT«Could not find sub &Int␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
15:23 justatheory joined
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:24
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?
*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
*unlike
diakopter ok.
obviously native->native will copy 15:28
TimToady nodnod
diakopter I guess can cast/coerce to a Role 15:29
one can
15:30 alexn_org joined
TimToady + is Numeric() and ~ is Stringy() 15:31
diakopter user roles
TimToady there has to be mechanism to decide which actual type to coerce to
so Numeric might pattern match a string to see if it's a Rat or a Comlex 15:32
p
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:33 patrickas left 15:34 chitragupt left 15:35 chitragupt joined
TimToady diakopter: see S13:193 15:35
15:36 alexn_org left, ruoso left
ash_ so, you could use Type(args) and get a Type.new(args) right? 15:37
TimToady no
er, not unless defined that way
no guarantees one way or the other
(didn't know how to interpret your "could") 15:38
could mean either "should" or "might"
diakopter but you can have different new methods taking different types
?
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
TimToady that's a "might" :) 15:39
15:40 patrickas joined, patrickas left
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)
Juerd Why not $spot.clone? 15:42
15:42 alexn_org joined
TimToady $spot is not of type Dog yet 15:42
ash_ the desired result is a new instance of Dog
15:43 kst left
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:44
ash_ I wish more languages did multi-methods dispatch, its awesome 15:48
15:48 jonrafkind joined 15:51 hercynium left 15:54 chitragupt left, chitragupt joined 15:55 chitragupt left, chitragupt joined 15:56 ruoso joined 15:57 cdarroch joined, cdarroch left, cdarroch joined 16:00 kst joined
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:01
std: sub foo($a = 5, $b) {} 16:05
p6eval std 30581: OUTPUT«===SORRY!===␤Can't put required parameter after optional parameters at /tmp/k2fd7lGgXL line 1:␤------> sub foo($a = 5, $b⏏) {}␤Check failed␤FAILED 00:01 113m␤»
masak rakudo: sub foo($a = 5, $b) {}
p6eval rakudo 1eef08: ( no output )
masak do we have a ticket for that yet?
16:06 [mark] left
masak rakudo: sub foo($a = $b, $b) { say $a }; foo(:b(42)) # mwhahaha 16:07
p6eval rakudo 1eef08: OUTPUT«Any()␤»
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)␤»
masak submits rakudobug 16:09
(for the parameters thing)
ash_: no, doesn't seem that way. want to add it? 16:10
ash_ sure, how do i add a ticket again?
masak email [email@hidden.address]
moritz_ masak: did you get your russian visa? 16:16
[particle] steal masak++'s irssi plugin for rakudobug 16:17
masak [particle]: (1) not using irssi :) (2) no plugin :)
moritz_ it's built-in :-)
masak moritz_: I finally made it through the application process, yes.
[particle] ah, i guess it's a core feature of masak, my mistake
masak it is.
it's part of the masakism package, actually. 16:18
[particle] i wish that were a role 16:20
it's a valuable skill to compose into new perl hackers
16:25 kst left
cj what's the meeting channel for the rakudo folks? 16:26
masak #rakudosketch 16:27
cj or, if jerry gay is here, could you raise your hand?
moritz_ here
that's [particle]
cj hi [particle]
[particle] hola cj
cj [particle]: just incorporated the biz. I've got an EIN and everything.
[particle]: feel like chatting with Chris and me? 16:28
[particle] congrats! don't forget to register with the state
i mean, with the city
cj [particle]: my lawyer is taking care of all of that. ;)
16:28 Ross joined
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. :)
[particle] sigh
cj the lawyer is now responsible for that sort of thing, and she's better at it than I am ;)
[particle] cj: i can chat for a little bit now, yeah
16:29 kst joined
cj xmpp handle? 16:30
16:30 alexndc joined
[particle] [email@hidden.address] 16:31
16:32 hercynium joined
PerlJam cj: What business? 16:32
16:32 alexn_org left, alexndc is now known as alexn_org, ash_ left 16:33 justatheory left 16:36 alexn_org left
cj PerlJam: Collier Technologies LTD 16:36
PerlJam: I got it primarily to get an AS number.
PerlJam cj: nice name :)
cj bitches wouldn't accept my sole prop 16:37
hmm... maybe I should watch my language.
moritz_ this is a publicly logged channel :-) 16:38
PerlJam #perl6 is forgiving, but history mayn't be ;)
16:38 moritz_ sets mode: +ooo PerlJam cj [particle]
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...
[particle] /kickban moritz_ # oh the power!
oops ;)
colomon we saw a lovely bitch the other night. still trying to decide if we can afford one of her puppies.
cj I'm talking with someone at ORA (do they still call it that) about writing a book on the DLR...
s/that/that?/ 16:40
PerlJam cj: just don't take an advance.
cj PerlJam: haha. what's that mean?
PerlJam: another word for golden handcuffs?
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...
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:42
16:43 SmokeMachine joined
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:44
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.
PerlJam Juerd: every publisher treats it differently I think. 16:46
Juerd: But they *are* in the business to make money :)
Juerd Bastards :)
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:47
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
(I might be suggesting that writers are machines. I'm not sure. ;))
(Writers mustn't be bought though) 16:49
PerlJam cj: The real person to talk to about book stuff is chromatic. He may even have some sage advice. :) 16:50
(although we do have at least one other book author on channel ;) 16:52
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.
moritz_ PerlJam: at least partial author, of a not-yet published book
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.
also, learn how to use those funny tiny words correctly. ;)
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 ;)
Su-Shee I know.
16:55 masak left
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.
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
PerlJam moritz_: selfish! ;) 16:58
Su-Shee moritz_: I know, I just took you as an example.
moritz_ Su-Shee: if chromatic wrote one, I'd be happy to contribute a bit, or continue blogging
s/or/and/
Su-Shee continuing blogging is an essential must if you want Perl 6 to take off. 16:59
16:59 isBEKaml joined
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.
PerlJam Su-Shee: 37 signals are good marketers 17:00
Su-Shee: they hype rails, rails is ruby, etc.
moritz_ isBEKaml: good time() :-)
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.
moritz_ [Coke]: that's the one that will publish the Perl 6 book, yes 17:03
sorear chromatic has-a company?
moritz_ sorear: chromatic, allison... and I think a few more folks
Onyx Neon Press
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 :)
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. =-)
moritz_ PerlJam: his name appears as "chromatic" on serveral books. That's good enough for me :-)
PerlJam moritz_: Did it say that on the contract you signed? :) 17:05
moritz_ that's cheating :-)
speaking of the book.. I'd like to name it 'Using Perl 6' 17:06
PerlJam moritz_: wfm
isBEKaml dannit! I was wondering chromatic can't be his real name. So he just sort of grew into this identity? ;)
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
[Coke] with your host, gene rayburn.
moritz_ and rather successful, I might add
Su-Shee moritz_: you know who padeluun is? ;) 17:08
dalek ok: f7a5527 | moritz++ | src/subs-n-sigs.pod:
[subs] flesh out/add some examples
moritz_ Su-Shee: no
isBEKaml moritz_: He must have "partitioned" his mind into 2 identity spaces, then... =) 17:09
Su-Shee moritz_: wtf?! :)
moritz_ Su-Shee: can't know everybody :-)
isBEKaml Su-Shee: I read padeluun as "paladin"! :) 17:10
PerlJam isBEKaml: heh, that's what I read at first too
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 :)
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.. :)
moritz_ Su-Shee: just read his wp article... impressive 17:12
PerlJam Su-Shee: gesundheit.
Juerd There are several rather succesful realname-hiders in the Perl world :)
PerlJam Juerd: A suppose Juerd isn't your real name either?
Juerd chromatic, Barbie, Abigail
moritz_ can't remember any of their real names :-)
PerlJam s/A/I/
[Coke] PerlJam: Was, Sie sprechen kein Deutch?
Su-Shee PerlJam: single most important figure in german privacy politics since the mid-80ies.
Juerd PerlJam: That is correct, but I do use it IRL. 17:13
PerlJam: My official name is not a secret though. My full official name is Jorrit Jelle Waalboer.
PerlJam okay ... time for me to come clean .... my real name isn't PerlJam ;) 17:14
Juerd Shocking
Su-Shee just dropped her spoon.
isBEKaml fell off the chair..
_sri oh my
Juerd Hm, maybe Perl people are more susceptible to caring about their personal identifiers than others
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
PerlJam Su-Shee++ exactly what I was about to say
Juerd Su-Shee: I don't get it
isBEKaml Su-Shee: nor do I
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
Su-Shee "_why, the lucky stiff" is a ruby pop star. vanished a few months ago and took down all his projects.
_sri en.wikipedia.org/wiki/Why_the_lucky_stiff
Juerd So that's one in Ruby world 17:17
_sri nobody knows his real name
Juerd Versus 6 in Perl world :)
PerlJam Su-Shee: He said "more susecptible to caring", not "the only ones who care" about their personal identifiers
isBEKaml Su-Shee: Was he the one about "Why's poignant guide to Ruby" ? or something, I don't quite recall..
Tene FSVO "nobody"
PerlJam _sri: his real name is "why"
Su-Shee isBEKaml: exactly.
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.
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.
Juerd Tene: Good point
_sri well, being an artist and a programmer is not easy, sadly code is not timeless
[Coke] why looks like jack lack.
hejki yup
:>
Su-Shee Tene: or, your name is that common that noone recognizes you by your real name :)
cj _sri: it is with github! 17:20
hejki _sri: not when you're "artist" that none has ever heard of ;>
Tene Su-Shee: You used "real name" again there. You're being inconsistent. :)
_sri goes to draw an improved version of the mona lisa and pushes it to github
Juerd read monad lisa
Su-Shee Tene: sorry. common slang here for the distinction of "screen name" and "the thing in your id"
isBEKaml Ok, let's separate them into two. names and handles. :) 17:21
PerlJam Juerd: too much haskell
Juerd PerlJam: Exactly none; I don't think that can be too much.
PerlJam isBEKaml: I have no protuberances that resemble a handle thank you. :) 17:22
Juerd: then too much hanging out on #perl6 ;)
Juerd PerlJam: Could be :)
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.
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.
_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
:)
Juerd I changed nicks to get a clean slate, mostly regarding search engines. 17:26
diakopter Su-Shee: oh; I confused you with sushi
Su-Shee isBEKaml: yeah, it's made of my name and my former nick and should intentionally look like "sushi" :)
_sri: takes only 4 coffees and a coke. :)
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 kst left
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!
:)
Juerd Su-Shee: Juerd is a Frisian name and rather uncommon, even in Fryslan.
Su-Shee Juerd: well I'm from nearby.. :) 17:28
Juerd How much so?
17:29 dakkar left
Su-Shee like 45min by car? :) 17:29
17:29 kst joined
Juerd Did I give you the impression that I live in Fryslan? :) 17:29
Su-Shee Juerd: no. for some reason I considered you dutch. 17:30
Juerd I am
Su-Shee yeah, but I don't know why I know that :)
Juerd feather.perl6.nl perhaps
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. :)
Juerd isBEKaml: Considered for what? :) 17:32
isBEKaml Juerd: and figured you might be Dutch.
PerlJam "Juerd" sounds dutch?
isBEKaml PerlJam: No, he revealed his name some time ago..
Juerd <- my name 17:33
isBEKaml Juerd: No, Juerd's what we(mostly) would call nick or handle. You said something else earlier, I guess, <quote>...official name is Jorrit Jelle Waalboer.</quote> 17:34
sorear sure that's not completely made up?
PerlJam :-) 17:35
isBEKaml could be. :)
Juerd Jorrit Jelle Waalboer is my full given name
But in practice I am Juerd Waalboer.
Su-Shee there are way to verify that. ;)
ways.
takadonet steinbech
...
moritz_ yeah, but why should we bother?
Juerd You shouldn't :)
Su-Shee moritz_: research reflex. :) 17:36
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
Juerd The government uses an integer to identify me, not text :) 17:38
Tene :P
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.
Su-Shee we have a number-letter combination ;)
Juerd 180333215, my "citizens service number", formerly SSN.
Su-Shee Juerd: YOU KNOW YOURS BY HEART?! 17:39
isBEKaml Tene: Sure, I concur with you there.
hejki Juerd: do you know what's SSN in holland :)
17:39 Ross left
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.
hejki: Yes. Formerly SoFi.
hejki :O
PerlJam "Burger"? 17:40
Su-Shee Juerd: I have something which resembles a social security number and one unique tax identifier.
hejki PerlJam: yup.. means Citizen
Su-Shee PerlJam: citizen. we don't use the french derived word in dutch and german
PerlJam interesting.
Juerd Su-Shee: .nl now uses the same number for a lot of different things. They refactored. Not good for one's privacy.
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 :)
Juerd Su-Shee: Treasure that.
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...
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.
Tene rakudo: say 'hi'
Su-Shee _sri: you forgot your tin foil hat ;)
p6eval rakudo 1eef08: OUTPUT«hi␤»
Juerd Including my home street address, date of birth and SSN.
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.
isBEKaml Juerd: maybe identity theft is hard in that since it's published everywhere, impostors can be easily caught?
_sri puts on his tinfoil hat
sorear yes, it's completely ridiculous here
Juerd isBEKaml: I don't think they can. 17:45
_sri our passports have rfid chips these days...
Su-Shee I barely managed to get one without.
_sri implants are not unrealistic...
17:45 sundar joined
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:45
"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.
I do it all the time for my clients.
17:47 clsn joined
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
17:47 envi^home left
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
PerlJam "you have a bank statement and want to close the account? Sure, no problem. We'll do it now"
Su-Shee: how's that one? 17:48
_sri surely terrorists have to use banks too
Juerd sorear: One problem is that it's hard to make asymmetric crypto systems compatible with the notion of actual anonimity. :)
Su-Shee PerlJam: 15 years ago, here you just would have to sign some paper and be done with the closing. (for example)
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)
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.
Juerd Su-Shee: "Do you want your balance paid out in cash, or transferred to another account?"
_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
Juerd I just had to show my debit card (of which I had forgotten the PIN!) and sign a form.
PerlJam Su-Shee: A bank would make a good front for laundering money ;)
Su-Shee PerlJam: I think here it's some insurance company ;) 17:51
_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. ;)
(they use Perl btw ;) 17:53
Juerd Su-Shee: The elderly watchmen use Perl?
Su-Shee Juerd: the money printing institution ;)
Juerd I'm always astonished by the lack of security at the AMS-IX (Amsterdam Internet Exchange)
Su-Shee federal whatever it's called in english :)
Juerd: I think it's the same with DECIX
_sri Su-Shee: so you already were scouting there? :)
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.
Su-Shee no, I didn't get paid in cash ;)
Juerd: yes, same here.
hejki working with perl is awesome
isBEKaml Su-Shee: Then what? Vacations? :) 17:55
hejki but it makes you hate your coworkers too much :)
_sri Su-Shee: you should have demanded a suitcase full of cash
Su-Shee _sri: of course we tried. ;)
Juerd Couldn't they give you some bad prints that they were going to throw away anyway? :)
Su-Shee _sri: they've heard this joke a couple of times. ;)
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.
sorear: There have been outages.
It appears that 10 GE doesn't grow on trees.
Su-Shee I think, you'd need to kill AMSIX and DECIX and that would be it with continental europe and internet. ;)
sorear GE? 17:57
Juerd sorear: Gb/s Ethernet.
_sri hates working for federal agencies, they always pay late
Juerd There's simply not enough capacity to reroute.
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.
cj Su-Shee: "most timely"
Juerd Fortunately you can trigger the explosions over TCP/IP ;)
_sri Su-Shee: yay for elderly watchmen?
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*
Su-Shee _sri: the guy from them always came with his techie-buddy. every discussion went smoothly and competently.
Juerd cj: You said bomb.
cj: I was referring to, eh. Hm.
cj: to PHP's explode() function. Yes, that's what I was referring to.
It's like split. 18:00
cj good catch!
_sri PerlJam: sweet, here you have to send them reminders quite often :(
PerlJam Juerd: just don't talk about your PHP code on or near an airplane :)
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 ;)
Juerd Su-Shee: Depends on what you're packing
PerlJam ruoso: There was a good discussion about that here last night
ruoso hmm... just because I decided to sleep ;( 18:02
:)
Juerd Su-Shee: Some people go crazy about signed shorts.
ruoso goes backloggin
Su-Shee *haha* :)
moritz_: call the book "perl 6 puns" ;)
PerlJam well, I guess it was about 14 hours ago. It was last night for me :)
Su-Shee: that's the follow-up 18:03
isBEKaml moritz_: or "Punning Perl 6" following the "___ing X" pattern. :)
_sri "Perl 6 Guide to the Galaxy"
18:04 kst left
Juerd Hacker's guide to Perl 6 18:04
_sri the last page just says "42"
Su-Shee *hehe*
18:04 kst joined
Juerd _sri: *cough* 18:04
_sri: That's forty-two, not 42. 18:05
Su-Shee "the joy of six" ;)
isBEKaml _sri: lol, I was wondering why you pulled that one out...
PerlJam "Hacking Perl 6" would make a good title, but it might be misconstrued.
sorear rakudobuild on latest parrot finishes in 11m36s
Juerd Su-Shee: That would just get your website on just about every pedo blocklist.
sorear 8m42s real
Juerd PerlJam: Sixing Perl
Su-Shee Juerd: if course I was referring to six grown-ups. ;) 18:06
PerlJam Juerd: what were you just saying to Su-Shee ? :)
isBEKaml In cricket parlance, "Hitting Perl for a six!"
Su-Shee isBEKaml: doesn't really sound innocent as well ;)
isBEKaml Su-Shee: Erm, Cricket as in the game of Cricket. 18:07
Juerd PerlJam: STARTKEYLOGGER ;)
Su-Shee isBEKaml: yes, I was referring to hitting and six. but maybe it's just my friday-after-work-mind ;)
PerlJam face it ... 6 is just a sexy number. 18:08
ruoso .oO( isn't it a sixy number? )
Su-Shee PerlJam: let's bring the passion back to perl then ;)
ruoso just can't get to the irc log
Su-Shee "passionate perl six" ;)
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
_sri "orgasmic perl six"
Su-Shee PerlJam: well I'm punning in a foreign language. ;)
_sri: very nice. some indian theme as cover design maybe?
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:10 SmokeMachine left
Su-Shee darn. it's 7 dwarfs. hm. 18:11
Juerd Su-Shee: Now you know why.
_sri Su-Shee: these days you seem to need a vampire theme for a bestseller though :/
Su-Shee _sri: TRUE SIX? :)
_sri :D
TimToady *ing Perl 6
Juerd Right 18:12
sorear ponders a Unicode-derived encoding where combining chars are easily recognizable
_sri TRUE SIX: *ing Perl
18:13 gbacon left
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... :)
Juerd Uh oh. Don't go there :)
_sri pure genius
Su-Shee _sri: also a great xkcd ;) 18:14
isBEKaml Su-Shee: that's back cover note? Sounds like WTOP! :) 18:15
TimToady only Perl 7 is True Perl 18:16
Juerd Perl 7 was renamed to Kurila... 18:17
18:18 gbacon joined
_sri it doesn't work during daylight 18:18
Su-Shee me neither.. ;) 18:19
_sri heh 18:20
isBEKaml I don't get it. What's Kurila?
obra ponders a Perl variant where there is no value which evaluates to false
_sri programmers and vampires are so close already when you think about it...
obra isBEKaml: Kurila was an experimental fork of Perl 5
isBEKaml: www.ohloh.net/p/kurila
_sri we need to market ourselves better...
isBEKaml obra: Thanks. I should have googled it first. First link was CPAN. :) 18:21
obra no worries
moritz_ isBEKaml: I haven't applied the Web::Scraper patch yet 18:22
_sri then again...those pesky lawyers are even closer :/
ruoso finished backlogging...
Juerd ruoso: Do you need a break now? :)
ruoso one idea I've been considering about threading was each object having a "owner thread" 18:23
isBEKaml moritz_: Ok.
TimToady that fits well with message passing
ruoso yes... and when you try to call a method in an object owned by a different thread
it would result in a message to that thread 18:24
TimToady sort of distributed monitors
ruoso it also fits well with feeds
since feeds already requires us to re-implement unix pipes
TimToady interesting question how it relates to shared outer lexicals though 18:25
ruoso it would propagate back to the original thread
in fact... every lazy list already needs to be implemented as a re-implemented unix pipe 18:29
18:30 lichtkind joined
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
cj I've got until the 23rd to prepare ;) 18:31
ruoso TimToady, well... that's what a unix pipe is :)
diakopter cj: I thought you were going to muck around with the existing compiler
cj: you want to reimplement it? 18:32
cj diakopter: nah, I guess I could read the existing compiler's code 18:33
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
lichtkind <.ws> means something like <ws>* ?
sorear cj: read all about DFAs, Thomson NFA matchers, maybe some stuff about logic programming and compilation of backtracking
lichtkind: <.ws> is a non capturing <ws>
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?
clsn I'm pretty sure 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
diakopter cj: luckily CLR regexes are Perl-like as opposed to POSIX-like
sorear rakudo: say "aa" ~~ / . <ws> . /;
p6eval rakudo 1eef08: OUTPUT«␤»
sorear rakudo: say "a+" ~~ / . <ws> . /;
p6eval rakudo 1eef08: OUTPUT«a+␤»
sorear <ws> will match at an alnum-punctuation boundry 18:37
even if there is no actual space
but <.ws> always requires <ws> to match
18:37 sundar left
sorear (NB: derived grammars can override <ws> to match other token rules) 18:37
18:38 _jaldhar left
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
18:38 _jaldhar joined
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:39
cj diakopter: 'both ways'? 18:40
TimToady clsn: STD parses both of those just fine 18:41
18:41 ShaneC joined
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
Tene clsn: p6eval here in the channel confirms that it's the same.
ruoso eventually you could have a thread with too many objects...
diakopter cj: see privmsg plz
18:42 meppl left, eternaleye left
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)␤»
Tene see? near "::xend>/; " 18:43
TimToady I don't see any :: in the link you gave
clsn Second line from the bottom.
TimToady oh, I see it
ruoso TimToady, unless each object has its own thread and just registers itself in the scheduler when it needs to answer anything...
TimToady anyway, STD doesn't mind it
ruoso but that would be a bit more complicated
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
such as running each routine as a different thread... 18:45
or each closure as a different thread
then the value would be owned by that closure
TimToady Tene: you want std:
Tene std: grammar Simpl { token xxx { 'x' }; token yyy { '!' }; token zzz { <xxx>*<yyy> } }; my $s = "cx!"; my $a = $s ~~ /<Simpl::xend>/; say $a.perl;
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
TimToady rakudo: say 42.Any::defined
p6eval rakudo 1eef08: OUTPUT«0␤»
clsn So it's using some not-yet-implemented feature... I thought named grammars worked. 18:47
TimToady hmm
18:47 masak joined
masak ahoy, #perl6! 18:47
Tene Hi masak.
TimToady say 42.Int::defined
rakudo: say 42.Int::defined
p6eval rakudo 1eef08: OUTPUT«0␤»
Tene masak: You know the state of using grammars from rakudo? clsn is having issues: gist.github.com/393761
TimToady rakudo: say 42.Mu::defined 18:48
p6eval rakudo 1eef08: OUTPUT«0␤»
masak Tene: guess you've seen those emails from Alberto. what do you think about wrapping up the Web.pm grant?
masak looks at the gist
Tene masak: Sounds great to me.
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...
isBEKaml hi masak!
sorear clsn: rt.perl.org/rt3/Public/Bug/Display.html?id=74866
ruoso any value the closure brings from outer scopes are "input pipes" 18:50
any values expected to be returned by the closure are "output pipes"
sorear hello masak!
ruoso when the closure calls a method in an object that is outer to the closure, it "forks"
18:51 SmokeMachine joined
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.
clsn sorear: ok, the error messages are indeed confusing. Shouldn't the identifier parse though?
sorear clsn: dunno, I didn't look at your actual code
TimToady rakudo: say 42.Int::defined
p6eval rakudo 1eef08: OUTPUT«0␤»
TimToady Int::defined doesn't seem to work as a normal method either
<A::B> is the same thing 18:52
masak isBEKaml, sorear: hi!
sorear I can't find it, either
clsn The non-:: version in the comment doesn't work either; it complains about <xend> on Regex;Cursor.
ruoso actually... each value the closure sees from outer scope provide both an "input pipe" and an "output pipe"
masak TimToady: oh, right! so that syntax is simply obsolete?
TimToady clsn: yes, it isn't in the right language to find <xend> 18:53
masak: no, it's not obsolete
masak ok.
clsn OK, so I'm misusing the grammar-less tokens, then.
TimToady $obj.Foo::bar still says to call bar on $obj as if it were a Foo, not a $obj.WHAT
ruoso will digest that idea a bit more 18:54
ruoso decommute &
18:54 ruoso left
tedv how exactly does that work? Does it temporarily change the type of $obj to Foo until the function executes? 18:54
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
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.
TimToady yes
tedv ah I see, so it gives more control over which function signature it matches
TimToady it's similar to submethods, which are called on behalf of each parent type when you're doing, say, a BUILDALL
18:57 hercynium left
TimToady each BUILD is called on behalf of each type, but the object is still the same object 18:57
the difference here is that a submethod is only called on behalf of a specific type 18:58
while $obj.Foo::bar is called starting at Foo 18:59
but can call any Foo method ancestral to Foo
it's more like my $meth = Foo.can('bar'); $obj.$meth() 19:00
where $meth is a hard ref, so $obj.$meth is really $meth($obj), that is, a sub call
19:01 hercynium joined
TimToady rakudo: say defined(42) 19:02
p6eval rakudo 1eef08: OUTPUT«1␤»
isBEKaml Building Rakudo with latest Parrot fails ? pastebin.com/9S1pVEpL
TimToady rakudo: say Int::defined(42)
p6eval rakudo 1eef08: OUTPUT«Can not find sub Int::defined␤current instr.: 'perl6;Perl6Exception;throw' pc 15354 (src/builtins/Associative.pir:46)␤»
TimToady rakudo: say Mu::defined(42)
p6eval rakudo 1eef08: OUTPUT«Can not find sub Mu::defined␤current instr.: 'perl6;Perl6Exception;throw' pc 15354 (src/builtins/Associative.pir:46)␤»
TimToady anyway, 42.Int::defined should return 1, not 0 19:03
sorear How about 42.Sub::arity 19:05
jnthn TimToady: Hmm. It's implemented like you suggest.
rakudo: say 42.Int::defined()
p6eval rakudo 1eef08: OUTPUT«0␤»
sorear isBEKaml: How old is your rakudo? 19:06
jnthn rakudo: say 42defined()
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)␤»
jnthn rakudo: say 42.defined()
p6eval rakudo 1eef08: OUTPUT«1␤»
isBEKaml sorear: I just git pulled it.
jnthn wtf.
sorear isBEKaml: what branch?
jnthn Oh.
I know why.
19:06 moritz_ sets mode: +o jnthn
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: use.perl.org/comments.pl?sid=44766&cid=71923
jnthn And so finds the .defined for that.
isBEKaml sorear: git://github.com/rakudo/rakudo.git -- master
19:08 BrowserUk joined
TimToady so perhaps .can needs to go a bit meta and assume a type object represents a defined object really 19:08
jnthn Perhaps.
moritz_ isBEKaml: did you reconfigure rakudo?
jnthn Something like that.
isBEKaml moritz_: reconfigure? I don't understand..
PerlJam masak: wow. 19:09
isBEKaml moritz_: I svn upped Parrot, git pulled rakudo and then hit make && make install.
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
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.
moritz_ isBEKaml: run perl Configure.pl
Tene masak: That's a great plan.
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
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
19:12 hercynium left
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...
PerlJam isBEKaml: that's not always a good idea. 19:13
moritz_ isBEKaml: should still work, if you reconfigure
isBEKaml: at least it jsut worked for me with the latest parrot revisions
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.
moritz_ masak: any objections to slowly moving links to proto to proto.perl6.org?
[Coke] to be very safe - realclean parrot; svn up; re-configure/build/install;
jnthn (proto.perl6.org)++ :) 19:15
jnthn looks over it
masak moritz_: go for it.
jnthn ooops, I just managed to use "proto" to refer to two completely seperate things. 19:16
moritz_ :-)
jnthn (the first was about the proto in the context of multi dispatch stuff...)
moritz_ so I figured
masak aye.
jnthn I'll worry about it properly when I'm back from vacation.
Or maybe after Rakudo *.
masak humans are wonderful at context. 19:17
jnthn Or maybe somebody else can worry about it.
jnthn 's flight has got cancelled
masak by the way, given the sheer tenacity of the 'proto' project, I've decided to call my next project 'failure'.
jnthn Due to moar erruptions.
masak and the one after that 'disaster'.
jnthn :-)
masak jnthn: so you're like "lol Im stuck on Iceland!" ? 19:18
pugssvn r30582 | moritz++ | [perl6.org] switch proto links to proto.perl6.org 19:20
jnthn masak: yup! 19:21
masak :)
jnthn masak: What a pity ;-)
moritz_ glad you take with humour
masak no real danger. it's only MOLTEN LAVA!
isBEKaml no real danger. It's only Smouldering Ash! :) 19:22
jnthn masak: There's a VERY nice locally brewed beer here called Lava. :-)
mathw We should see if we can get the UFO sent over for jnthn
masak we have a UFO? 19:23
mathw Or the sub-aquatic camel
Of course we have a UFO
The onion-shaped one
jnthn moritz_: I knew when I came here it was a risk.
mathw My boss is flying to Majorca tomorrow
masak is there a list of these things somewhere?
mathw supposedly
however, midlands airports going south are still okay right now
jnthn moritz_: I knew about the cancellation today, for a flight tomorrow, rather than getting to the airport and finding out.
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.
mathw yay
so no panic then 19:25
jnthn So it's hardly the end of the world.
No, none at all.
mathw \o/
masak jnthn: is it true that you still can't pronounce the name of the volcano?
jnthn I did learn how at one point 19:26
But forgot again :-)
mathw heh
jnthn The first ll is apparnetly like dl though
mathw I can't even spell it
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.. ;)
jnthn It actually means something descriptive in Icelandic, apparently.
moritz_ like "big scary volcano that interupts flight traffic"?
mathw firey mountain which interferes with air travel?
19:29 BrowserUk left
jnthn :-) 19:29
jnthn is going to find dinner 19:30
19:30 masak left
jnthn bbiab 19:30
mathw enjoy
mathw is considering having a second dinner
aikido does that to me :)
jnthn I'll be sure to.
Going to the nice micro-brewery pub later too \o/
o/
19:30 masak joined
mathw bye jnthn 19:31
welcome back masak
[Coke] mathw: "what about second breakfast!?" 19:34
mathw I think 2034 is too late in the day to be calling it second breakfast :)
I have second breakfast at work :D
[Coke] ... any hobbit will tell you, it's never too late for lastmeal.
19:36 masak` joined
masak <PerlJam> okay ... time for me to come clean .... my real name isn't PerlJam ;) 19:36
*lol*
mathw :) 19:37
I thought everyone knew that
masak` mathw: guess that's the funny part.
moritz_ well, my first name isn't moritz_ either :-)
Su-Shee we expressed appropriate surprise. ;)
moritz_: nice try ;) 19:38
19:40 kst left, kst joined
masak` don't know why, but the book title 'Sixing Perl' looks a bit naughty. 19:41
TimToady The Joy of Six
isBEKaml masak`: That's why it's too Sixy! :) 19:42
masak` :)
19:43 masak left
mathw Does it have a plan? 19:44
moritz_: My first name isn't 'math' :) 19:45
Su-Shee TimToady: My idea exactly. Got rejected. ;)
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."
isBEKaml Su-Shee: Then let's change that to Six of Joy! ;)
Su-Shee moritz_: *haha* then I insist on seriously bad 70ies style. ;)
moritz_ :-) 19:47
19:47 masak` left
Su-Shee *rotfl* at wikipedia, the book cover picture seriously looks chuck-norris like. ;) 19:49
19:53 snarkyboojum left
isBEKaml Su-Shee: link? 19:56
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 ;)
isBEKaml Su-Shee: jeez... :D
19:58 clintongormley left
PerlJam isBEKaml: www.guardian.co.uk/sport/blog/2009/...rtnerships :-) 19:58
[Coke] picards, THERE ARE SIX ONIONS! 19:59
PerlJam isBEKaml: if you really want something from wikipedia, there's this : 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. ;)
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
isBEKaml Su-Shee: The caricature's like lampooning the hollywood actors! ;) 20:02
20:03 tylerni7 left
[Coke] hey, where's the data for this: rakudo.de/ 20:04
spectest-progress.csv? 20:05
PerlJam [Coke]: aye
[Coke] grins, as he just tripped over a new web-based graphing library.
is ~foo/public_html still be served out on feather.perl.nl? 20:08
*being 20:09
moritz_ thinks so
isBEKaml core.pir' s still the bottleneck in building Rakudo? Takes quite a bit of time...
[Coke] ... huh. there it is. wtf.
isBEKaml: ayup
isBEKaml hmmm 20:11
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:17
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?
moritz_ colomon: because only then does it do control flow analysis
colomon arnsholt: probably. 20:19
moritz_ -Wextra 20:20
iirc
then it also warns about unused parameters
colomon unused parameters warnings are a pain -- compiling on many platforms means many #if branches and many unused parameters. 20:21
still, it's funny to feel so rusty at C++ programming.... 20:22
moritz_ :-)
sorear I like the crevasse in that graph around Feb 10 20:23
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 left, kst joined
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:25
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.
moritz_ well, only quick in terms of spectests
in terms of actual real-world usability it's only slowly catching up 20:27
and very much blocking on Match objects, IMHO
20:32 hercynium joined
dalek meta: r244 | diakopter++ | trunk/Sprixel/ (4 files):
[perlesque] parametric types in static invocations, enabling constructor
20:33
diakopter spinclad: ping 20:34
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]␤»
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:38
dalek ok: 218afc4 | moritz++ | bin/book-to-latex:
add title, authors and table of contents to PDF version
20:39
ok: 18be8df | moritz++ | src/subs-n-sigs.pod:
[subs] talk about type constraints, just a bit
20:40 pmurias joined
diakopter pmurias: hi :) 20:49
just committed r245 20:50
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())
p6eval perlesque: OUTPUT«1089 ... System.Collections.Generic.List`1[System.Collections.Generic.Dictionary`2[System.String,Sprixel.Runtime.P6object]]␤»
diakopter perlesquel: .
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␤»
pmurias diakopter: hi 20:52
dalek meta: r245 | diakopter++ | trunk/Sprixel/ (2 files):
[perlesque] fix the multiple-type-param case(s). Perhaps I should test shtuff.
20:53
meta: r246 | pawelmurias++ | trunk/Sprixel/ (3 files):
P6LexicalScope throws exceptions
pmurias diakopter: re testing stuff testing stuff is always a good idea
diakopter :P I know 20:54
well, given infinite resources, yes.
pmurias in the case of the compiler the cost of writing a test is always low 20:55
20:58 Ross joined 21:00 mikehh_ joined, mikehh left
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)␤»
diakopter TimToady: I don't know how to annotate a routine as returning a closure :(
moritz_: do you know? 21:02
moritz_ diakopter: I just know --> Callable, but that's not enoough for your case I fear
diakopter nope
but --> (--> Int) would work 21:03
or --> (Int --> Int) and such
moritz_ std: sub f(-->(Int --> Int)) { } 21:04
p6eval std 30582: OUTPUT«===SORRY!===␤Unable to parse signature at /tmp/T12X2onoy9 line 1:␤------> sub f(⏏-->(Int --> Int)) { }␤Couldn't find final ')'; gave up at /tmp/T12X2onoy9 line 1:␤------> sub f(-->⏏(Int --> Int)) { }␤ expecting any of:␤
.. new…
21:04 orafu left
moritz_ std: sub f(--> Callable where :(Int --> Int)) { } 21:04
p6eval std 30582: OUTPUT«===SORRY!===␤Unable to parse signature at /tmp/6ANxAKN9Og line 1:␤------> sub f(⏏--> Callable where :(Int --> Int)) { }␤Couldn't find final ')'; gave up at /tmp/6ANxAKN9Og line 1:␤------> sub f(--> Callable ⏏where :(Int --> Int))
..…
diakopter std: sub f -->(Int --> Int) () { }
p6eval std 30582: OUTPUT«===SORRY!===␤Missing block at /tmp/PaRoSyp4Wz line 1:␤------> sub f ⏏-->(Int --> Int) () { }␤ expecting any of:␤ block␤ routine_def␤ trait␤Parse failed␤FAILED 00:01 109m␤»
21:04 donri joined
diakopter std: sub f() -->(Int --> Int) { } 21:05
p6eval std 30582: OUTPUT«===SORRY!===␤Missing block at /tmp/F2Imtv7PES line 1:␤------> sub f() ⏏-->(Int --> Int) { }␤ expecting any of:␤ block␤ routine_def␤ trait␤Parse failed␤FAILED 00:01 111m␤»
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?
donri Does perl 6 have any solution similar to Python 2.5+'s with statement and context managers?
szabgab or in short, can someone write GUI app in Rakudo?
21:06 orafu joined
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
moritz_ szabgab: github.com/jnthn/zavolaj has an example using win32 gui stuff
21:07 alester left
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?
rakudo: say 'foo' ~~ { $_ ~ $_ } 21:08
p6eval rakudo 1eef08: OUTPUT«foofoo␤»
Tene moritz_: with open('/etc/passwd') as f: f.read() ...
donri Sorry, it's called the "with" statement. with open(file) as f: f.read() # wraps it in a try:... finally: f.close()
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
moritz_ donri: there's 'given', which sets $_
szabgab hmm, that smells like work :-)
sorear github.com/jnthn/blizkost/raw/maste...ples/tk.pl 21:10
Tene that doesn't do any cleanup or scope limiting, though.
diakopter pmurias: yeah
moritz_ donri: and files are closed automatically when they go out of scope
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.
Yea in Python too, I think. But it's just one example.
szabgab sorear, thanks
moritz_ hm... then I guess we don't
diakopter otoh, such a construct could be created fairly simply 21:12
21:12 _jaldhar left 21:13 _jaldhar joined
donri But I'm specifically curious about builtin features. Doesn't have to be identical of course. 21:13
21:14 ethel joined
diakopter the notion of "builtin" is very much a gray line 21:14
donri Heh.
diakopter since the syntax is so easily malleable
one person's Perl 6 code might look very, very different from another person's.
moritz_ diakopter: the variable that 'with' assigns to - is that special somehow? 21:15
erm, meant donri, sorry
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.
Tene moritz_: scoped to the contained block, and methods called on it on block enter and exit.
moritz_ or are the __enter_- and __exit__ methods called of all variables in scope? 21:16
donri moritz_: It's just what open() returns.
moritz_ ok
Tene moritz_: no, just f
donri docs.python.org/reference/datamodel...t-managers for the curious.
21:17 SmokeMachine left
sjohnson Authenticating with public key "TBM smu johnson (rsa-key-20080512)" 21:18
Linux ToneLoc 2.6.27-14-server #1 SMP Mon Aug 31 13:57:10 UTC 2009 i686
The programs included with the Ubuntu system are free software;
oops
sorry
rakudo: sub blah { print 'pig' }; my $x = 'blah'; &$x;
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)␤»
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)
donri Isn't "using" import in C#? 21:19
diakopter yes, also
at the top level
donri o_O
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.
diakopter "using statement": msdn.microsoft.com/en-us/library/yh598w02.aspx 21:22
21:22 chitragupt left
donri What would be the Perl 6 way to reuse contextual boilerplate? 21:22
Tene contextual boilerplate?
donri Such as try:... finally:...close() 21:23
moritz_ you'd use a LEAVE block instead of 'finally:'
Tene You could write a macro for it, or just a function, depending on your tastes. 21:24
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(); ... };
Yeah, it's an option.
moritz_ donri: probably, yes
donri je'e :)
diakopter (same as Perl 5) 21:26
Tene If I have time tonight, I'll show you the macro version.
pugssvn r30583 | moritz++ | [t/spec] clean up classify.t, and extend it
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
They do nothing in the language itself, but you can use them to for example build a typing system.
moritz_ what does "they do nothing" mean? do they get stored? 21:30
donri Yea ... but they have no meaning to Python itself.
Tene donri: Perl 6 already has a typing system. sub foo(Str $bar, Int $baz where $baz > 2) { ... }
moritz_ Tene: need curlies are { $baz > 2 } 21:31
Tene oh, yeah, right.
moritz_ you can only omit them when you do a smart match
Tene or just where * > 2
moritz_ right :-)
dalek kudo: 916b56d | moritz++ | (2 files):
implement List.classify; all tests pass except those depending on binding
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
moritz_ donri: you'd do that with traits in Perl 6
donri Ah, traits.
moritz_ sub index() is url('/') { ... }
donri Cool!
Tene github.com/tene/Doten/blob/master/dt.pl is an example I put together a long time ago. 21:33
I think the module itself is using old hackish syntax instead of real supported syntax. I don't think it runs anymore.
donri Why is "my" still necessary in Perl 6? Why is't it the default? 21:34
Tene Yes, confirmed, looks like I cheated.
donri: variable declarations are important for properly dealing with scope, and handling a few other types of errors.
donri (I love that you can have "-" in symbol names.) 21:35
Tene if you mistype a variable name, for example.
moritz_ likes that too
... and it gets caught at compile time
donri Decorators: would you do that with traits too?
21:36 jotr is now known as jotr^afk
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
I remember being horrified once I understood how scoping works in ruby.
donri "works"? ;)
Tene Yeah, that sounds about right. I'm generally grumpy about ruby, though, so ignore me pls. :) 21:37
21:37 nnunley joined 21:38 wknight8111 left
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:38
moritz_ then don't way, do! 21:40
dalek kudo: ab23221 | moritz++ | build/PARROT_REVISION:
bump PARROT_REVISION to get more testing on newer parrots
21:43
moritz_ colomon: List.classify implemented... what was the example you tried to do the others day? :-)
Tene perl6: (1..10).classify({ $_ !% 2 }).perl.say 21:45
p6eval pugs: OUTPUT«*** ␤ Unexpected "!%"␤ expecting operator or "}"␤ at /tmp/mdimxITmOV line 1, column 23␤»
..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
..`__infix_prefix_meta_operator_6947…
..rakudo 1eef08: OUTPUT«Method 'classify' not found for invocant of class 'Range'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
moritz_ (btw the old tests for classify had some of the calls wrapped in an eval(), and had no comma after the } )
Tene: not yet updated on evalbot
Tene ah
well, that's the example colomon tried. 21:46
why does eval need a comma after the }?
ah
wait, why?
moritz_ it had classify {block} 1,2,3, 4 21:47
p5ism
Tene oh, ouch
21:47 k23z__ joined
moritz_ anyway, I love it how simple the implementation of classify was 21:49
contains one line of workaround for autovivifciation
but is otherwise quite nice
$ ./perl6 -e ' (1..10).classify({ $_ !% 2 }).perl.say' 21:50
("0" => [1, 3, 5, 7, 9], "1" => [2, 4, 6, 8, 10])
cognominal rakudo: my @a; @a[0..1] = < a b >;
p6eval rakudo 1eef08: OUTPUT«push_pmc() not implemented in class 'ResizableFloatArray'␤current instr.: 'perl6;Perl6Role;!add_variant' pc 10481 (src/gen/RoleToClassApplier.pir:7584928)␤»
cognominal hum, hat is the proper way? 21:51
on my yesterday rakudo, it gives Cannot assign to readonly value 21:52
21:54 kst left
moritz_ should work 21:54
21:54 kst joined
moritz_ rakudo is waiting for another array/list refactoring 21:54
and the rakudo on p6eval is pretty old 21:55
like, 4 days
compiling a newer version right now
21:55 Su-Shee left
cognominal ok, just curious 21:59
22:02 k23z__ left 22:05 aindilis joined, fda314925 left, hejki left, Trey left, yahooooo left 22:08 fda314925 joined, hejki joined, Trey joined, yahooooo joined, yahooooo left 22:09 rv2733 left, yahooooo joined 22:12 pmurias left
diakopter TimToady: I need a syntax... 22:20
TimToady "The more, the merrier." <-- that one is pretty funky. 22:21
22:22 chitragupt joined
diakopter hm. 22:22
22:23 Ross left
diakopter oh, you haven't waterlogged 22:23
backlogged
TimToady workin' onit
22:29 patrickas joined
diakopter TimToady: does use __PyUnderScores__; cause all routine names to need __ prefixes and suffixes? 22:30
not just routine names, *all* names 22:31
TimToady er, huh? 22:32
diakopter kidding.
I need a way to annotate a Callable as a strongly-typed closure, as a return type for a routine. 22:33
TimToady I see that 22:36
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:38
lichtkind included now escape sequences 22:39
TimToady well, this at least parses: 22:40
std: sub foo (--> Callable[:(Int --> Int)]) {...}
p6eval std 30583: OUTPUT«ok 00:01 114m␤»
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:41
a function from Foo to Foo *is* a Foo 22:42
22:42 kst left
diakopter but does it parse correctly 22:42
TimToady I suspect so 22:43
diakopter std: sub foo (int --> Callable[:(Int --> Int)]) {...}
p6eval std 30583: OUTPUT«ok 00:01 112m␤»
diakopter where does that "int" end up 22:44
TimToady as the first and only arg to foo
diakopter oh, this is a proto sub?
TimToady huh?
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});
TimToady well, you can't talk about it without a name, but it requires merely that you pass an int
diakopter oh
I didn't realize names were optional; heh
sjohnson push @a, $x if (my $x = exists($_->{key1})); # won't work
TimToady std: sub foo ($, $, $,) {...} # requires 3 args
p6eval std 30583: OUTPUT«ok 00:01 111m␤»
TimToady hmm, a bit surprised it allowed the final accidental comma 22:46
maybe it requires four args :)
diakopter std: sub foo ($, $,'' $,) {...}
p6eval std 30583: OUTPUT«ok 00:01 112m␤»
22:47 kst joined
diakopter std: sub foo ('') {...} 22:47
p6eval std 30583: OUTPUT«ok 00:01 112m␤»
diakopter std: sub foo ('' '') {...}
p6eval std 30583: OUTPUT«===SORRY!===␤Multiple prefix constraints not yet supported at /tmp/n6BWANlOXO line 1:␤------> sub foo ('' ''⏏) {...}␤Check failed␤FAILED 00:01 112m␤»
diakopter std: sub foo ('' 7) {...} 22:48
TimToady just like multi fact (0) { 1 }
p6eval std 30583: OUTPUT«===SORRY!===␤Multiple prefix constraints not yet supported at /tmp/qM3BQycxay line 1:␤------> sub foo ('' 7⏏) {...}␤Check failed␤FAILED 00:01 112m␤»
diakopter std: sub foo ($, $,'' $,) {...} # but this
p6eval std 30583: OUTPUT«ok 00:01 112m␤»
diakopter no comma between '' and $
TimToady any value may be *used* as a type constraint, as long as <value> parses it
diakopter ohh
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?
TimToady otherwise you have to write multi fact ($x where 0) {...
}
sjohnson $val' => $val, i mean
TimToady that only works because it is explicitly allowed to have a nullterm there after the final , 22:50
but parameters are parsed with a different mechanism
which, as it happens, allows a final optional comma 22:52
diakopter is BBBBBBBBBBBBBBBBBEEEEEEEEEERRRRRRRRRRRRRRRRRRRRRRRRRRRRYYYYYYYYYYYY glad I gave up reimplementing the standard grammar
now if only everyone else would give it up too...
22:57 nihiliad left, nihiliad joined
sjohnson pugs: say "Woof" 22:59
p6eval pugs: OUTPUT«Woof␤»
sjohnson pugs: say " Woof ".trim-trailing
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
sorear TimToady: Do I understand correctly that @a[1] = $x; means &postcircumfix:<[ ]>(@a, 1).STORE($x) ? What does @a[1] := $x mean? 23:01
sjohnson same as $a[1] in p5 i think 23:02
diakopter sjohnson: he's asking a deeper level than that
sjohnson i kinda figured :/
sorear array element binding is troublingly described 23:04
generally := seems magical
colomon moritz_++: yay! (was out at fish fry, stopping by home to grab instruments and now off to a jam)
diakopter sorear: to me too
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};
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)␤»
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)␤»
sjohnson rakudo: my %hash; %hash{val} = 1; say %hash{val};
p6eval rakudo ab2322: OUTPUT«Could not find sub &val␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sjohnson gives up
diakopter sjohnson: :)
sorear rakudo: my %hash; %hash{"val"} = 1; say %hash{"val"};
diakopter it's like javascript in that sense
p6eval rakudo ab2322: OUTPUT«1␤»
sorear magical subscript quoting is gone
rakudo: my %hash; %hash<val> = 1; say %hash<val>; 23:07
p6eval rakudo ab2322: OUTPUT«1␤»
sorear but there's a new "quoted subscript" operator, with less magic
sjohnson rakudo: my %hash; $hash{"val"} = 1; say %hash{"val"};
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)␤»
sorear std: my %h; $h{1}
p6eval std 30583: OUTPUT«===SORRY!===␤Variable $h is not predeclared (did you mean %h?) at /tmp/p8gqa9jMHk line 1:␤------> my %h; $h⏏{1}␤Check failed␤FAILED 00:01 112m␤»
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. :)
sorear sigils don't change depending on how you subscript anymor
sjohnson sorear: is this the only way to do it now?
colomon oh wow, the classify code is very nice! 23:09
sjohnson in other words, this new behaviour, is the only way?
sorear no
the old way is gone, though
good riddance
sjohnson if you dont mind, can you show me another way?
sorear rakudo: my %h; say %h.'postcircumfix:<{ }>'(1); #method call 23:10
p6eval rakudo ab2322: OUTPUT«␤»
sjohnson rakudo: my %hash; %hash.val = 1; say %hash<val>;
p6eval rakudo ab2322: OUTPUT«Method 'val' not found for invocant of class ''␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sjohnson (was worth a shot)
sorear rakudo: my %h; say %h<1>;
p6eval rakudo ab2322: OUTPUT«␤»
sorear autoquoting
23:11 TiMBuS joined
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)␤»
sorear class ''?
sjohnson i broketed it. 23:12
Tene postifx () is always invocation.
diakopter that appears often in the RT tickets
class '' 23:13
sorear Tene: yes, but shouldn't that be class "Hash"? 23:14
Tene Yes.
sorear I wonder if it's getting a null name because it's actually a punned role
Tene rakudo: class Lolcat { }; my Lolcat $l .= new(); $l("OHAI");
p6eval rakudo ab2322: OUTPUT«invoke() not implemented in class 'Lolcat'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sjohnson rakudo: my %h; %h{10}{key1} = "cow"; %h{20}{key1} = "pig"; %h{30}{key2} = "chicken"; 23:15
Tene A bit more evidence.
p6eval rakudo ab2322: OUTPUT«Could not find sub &key1␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sjohnson oh shoot
quotes
rakudo: my %h; %h{10}{"key1"} = "cow"; %h{20}{"key1"} = "pig"; %h{30}{"key2"} = "chicken";
p6eval rakudo ab2322: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class 'Proxy'␤current instr.: '!postcircumfix:<{ }>' pc 14455 (src/builtins/Code.pir:30)␤»
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)␤»
Tene Yeah, autovivification is busted.
sorear autoviv is in ROADMAP
sjohnson Tene: thanks 23:17
Tene sjohnson: glad to help
sjohnson its what i deserve for being too ambitious 23:18
23:34 kst left
sjohnson rakudo: my $a; $a.defined.say; 23:39
p6eval rakudo ab2322: OUTPUT«0␤»
sjohnson rakudo: my $a = 1; $a.defined.say;
p6eval rakudo ab2322: OUTPUT«1␤»
sjohnson can a scalar push itself to an array? 23:40
23:40 kst joined
sjohnson as in, $a.defined.push(@defined_vals); 23:40
perhaps that's too radical. 23:42
23:47 rv2733 joined 23:51 justatheory joined
sorear what would $a.defined.push mean? 23:51
rakudo: my $a = 1; say $a.defined.WHAT; 23:52
p6eval rakudo ab2322: OUTPUT«Bool()␤»
sorear rakudo: my $a = 1; say $a.defined.^methods.Str;
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
..split ma…
sorear ok, Bool does have a few methods
anyways you could always do @defined_vals.push($a) if $a.defined 23:53
alternatively, make a list of all your vals
then @defined_vals = @vals.grep: *.defined;
arnsholt .u ḷ 23:55
phenny U+1E37 LATIN SMALL LETTER L WITH DOT BELOW (ḷ)
sorear urxvt gets that character completely wrong 23:56
I see an upside down bold small letter j 23:57
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
bear in mind, this is p5 code. but it is this: push @a, $_->{somekey} if exists($_->{somekey}); 23:59