Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-08-23

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 Psyche^ joined #perl6
00:05 Patterner left #perl6
00:05 Psyche^ is now known as Patterner
00:11 dalek 6model: 4c8ee84 | jnthn++ | dotnet/runtime/Metamodel/Representations/P6 (3 files):
00:11 dalek 6model: Eliminate use of Nullable<T>, which should make life a bit easier for mberends++ when porting.
00:11 dalek 6model: review: http://github.com/jnthn/6model/commit/4​c8ee84ab9d2ddb839ada6a874c37d87045a26ac
00:13 lichtkind left #perl6
00:15 flatwhatson left #perl6
00:16 flatwhatson joined #perl6
00:24 dalek 6model: b23a318 | jnthn++ | dotnet/runtime/Metamodel/SharedTable.cs:
00:24 dalek 6model: Flesh out STable a little more; this adds find_method and postcircumfix:<{ }> caching.
00:24 dalek 6model: review: http://github.com/jnthn/6model/commit/b​23a318b3fbddec453f921122a1fc8df19f71eab
00:34 hudnix left #perl6
00:37 drbean left #perl6
00:45 meppl left #perl6
00:46 lest_away is now known as lestrrat
00:54 * jnthn -> sleep
00:59 whiteknight left #perl6
01:05 jferrero joined #perl6
01:07 TimToady phenny: tell masak yes, checking scope constraints on FIRST is in my todo file
01:07 phenny TimToady: I'll pass that on when masak is around.
01:17 jferrero left #perl6
01:23 Trashlord joined #perl6
01:39 cggoebel left #perl6
01:47 Italian_Plumber joined #perl6
01:49 molaf_ joined #perl6
01:52 molaf left #perl6
02:09 [Coke] git question: How do I kill all the changes I've made locally since my last 'push' ?
02:09 [Coke] (I'm ahead by N commits, and I don't want any of them.)
02:10 hudnix joined #perl6
02:10 colomon some form of git reset, I think
02:10 Italian_Plumber left #perl6
02:12 Italian_Plumber joined #perl6
02:14 Italian_Plumber left #perl6
02:19 gfx joined #perl6
02:19 diakopter jnthn: interesting: http://bugsplat.info/2010-0​8-22-perl-with-a-lisp.html
02:32 agentzh joined #perl6
02:32 * colomon must remember he has a lot of stuff to do, and not just spend the next week translating that blog post's code to p6....
02:33 meppl joined #perl6
02:36 sorear [Coke]: git reset --hard origin/master
02:36 cheeps left #perl6
02:39 [Coke] sorear++
02:46 azert0x left #perl6
02:47 meppl left #perl6
02:53 xinming joined #perl6
03:27 tylercurtis Is there a named subrule form of \w?
03:40 [Coke] left #perl6
03:40 [Coke] joined #perl6
03:49 ingy tylercurtis: hi
03:50 tylercurtis ingy: Hi.
03:51 ingy :)
03:51 ingy you wanted something?
03:52 tylercurtis ingy: Remember how I was supposed to add a LICENSE to yaml-pm6? I finally got around to doing so, but I wanted to know what you want the COPYRIGHT section of the README to say before I commit it.
03:54 ingy tylercurtis: how about something like any of my cpan modules
03:55 [Coke] left #perl6
03:55 ingy tylercurtis: http://gist.github.com/544745
03:57 tylercurtis ingy: well, same terms as Perl itself seems kinda inappropriate for a Perl 6 module, since that could be anything from AL 1.0/GPL if you interpret it as Perl 5, AL 2.0, MIT, or who knows what else. In addition, the "Ingy döt Net." part will become only partially accurate once I start working on it.
03:59 tylercurtis ingy: http://gist.github.com/544748 here's the standard-ish (in that everything but the Copyright 2010. <SOMETHING> part came from TPF's webpage) notice for the AL 2.0 (IIRC, that's what you said to put as the license, right?).
04:01 ingy tylercurtis: I think you should add your name to authors but the copyright should just be in one name
04:01 [Coke] joined #perl6
04:01 tylercurtis ingy: Works for me.
04:06 tylercurtis ingy: Create a seperate AUTHORS or CREDITS file or just add an AUTHORS section to the README?
04:06 * tylercurtis has some slight changes to push to the loader branch that don't make it work but at least let it compile.
04:17 sftp left #perl6
04:21 redicaps joined #perl6
04:22 redicaps left #perl6
04:22 shelling_lab left #perl6
04:22 shelling_lab joined #perl6
04:39 shelling_lab left #perl6
04:49 shelling_lab joined #perl6
04:50 molaf_ left #perl6
05:07 Eevee left #perl6
05:08 gfx left #perl6
05:26 drake1 joined #perl6
05:27 drake1 hello, how do you code something like http://pastebin.ca/1923137 in perl6 / rakudo ?
05:29 kaare joined #perl6
05:30 kaare is now known as Guest81071
05:33 drake1 things like dynamic method construction
05:33 tylercurtis drake1: which bit are you asking about?
05:34 drake1 the ``sub'' and the my @bin initialization
05:35 tylercurtis You could do them exactly the same way. Perl 6 does have some nicer ways to do some of it, though.
05:36 drake1 oh, and is it possible to export a perl6 program in VM-code only ie. without the source code itself
05:36 drake1 tylercurtis: good
05:36 tylercurtis For example, in Perl 6, list assignment is looser than comma, so you don't need the parentheses around the list in the my @bin assignment.
05:36 drake1 nice
05:36 tylercurtis Well, technically, you would have to use my or our or such to declare the @bin variable, since Perl 6 is strict by default(and for now, at least, is strict always).
05:37 tylercurtis title => "Winamp" can be written perhaps a little more nicely as :title<Winamp>.
05:37 drake1 that's what im used to, only forgot to in this test script. first run with Tk;
05:37 tylercurtis And so on for the other items in the hashes.
05:38 drake1 not .title = "Winamp"
05:38 tylercurtis In Perl 6, "foreach my $bin (@bin) {...}" becomes "for @bin -> $bin {...}".
05:39 drake1 fine
05:39 tylercurtis You also don't need the -> in your hash dereferences in Perl 6.
05:39 drake1 so foreach is dropped?
05:39 TimToady yes, always for now
05:39 tylercurtis drake1: for is always foreach. If you want C-style for, you want loop.
05:39 drake1 tylercurtis: like with multi-dimensional hashes in perl5 ?
05:40 TimToady yes, but you can drop it on the first one now too :)
05:40 drake1 TimToady: OK
05:40 TimToady because it's always a ref/deref at that boundary
05:40 drake1 naturally
05:40 drake1 good
05:41 tylercurtis $bin->{title} would have to become either $bin<title> or $bin{'title'} since postcircumfix:<{ }> doesn't autoquote anymore.
05:41 TimToady only => autoquotes now
05:41 drake1 im also tired of the -> thingy
05:41 TimToady and it doesn't do -foo like p5
05:41 TimToady but => indicates real pairs, so we don't need the - to keep tk in sink
05:41 TimToady sync
05:42 TimToady assuming we had Tk bindings...
05:42 tylercurtis -> becomes . for methods, as well.
05:42 TimToady not sure what blizkost wants to cross over to p5 there...
05:42 drake1 then it's getting closer to ``sh'' perhaps
05:43 TimToady if so, it's an accident :)
05:43 tylercurtis drake1: you can now drop the sub from "sub { ... }", also.
05:43 drake1 perl is alot more friendly with data structures etc
05:43 drake1 tylercurtis: to it's just the curlies?
05:43 snearch joined #perl6
05:44 TimToady rakudo: my $closure = { 'say hi drake1' }; $closure()
05:44 drake1 nice
05:44 p6eval rakudo b958a1:  ( no output )
05:44 TimToady er...only written right
05:44 drake1 it's a lot of nice improvements
05:44 TimToady rakudo: my $closure = { say 'hi drake1' }; $closure()
05:44 p6eval rakudo b958a1: OUTPUT«hi drake1␤»
05:45 drake1 you're continuing to support the ``fork'' ?
05:45 TimToady those are just the surface improvements
05:45 drake1 sweet
05:45 tylercurtis I'm not sure Perl 6 supports "new MainWindow;" syntax anymore. I though I had seen it in the spec, but I can't seem to find it at the moment.
05:45 TimToady though the 'for @array -> $elem {...}' syntax actually points to the fundamental notion that all blocks are really just lambdas
05:46 drake1 just copied from another website. I never use objects like that, normally
05:46 TimToady no, you'd either have to put a : after MainWindow, or flip it around to MainWindow.new
05:46 TimToady no more guessing about indirect objects
05:46 drake1 fine enough
05:47 drake1 more like ``ld'' import, then
05:47 TimToady so the colon is now required after such an object
05:47 TimToady but lets you add more args
05:47 tylercurtis What's the name for that syntax?
05:47 TimToady we still call it indirect object
05:47 TimToady it's just not ambiguous anymore
05:48 * tylercurtis thought it had some fancy linguistics-inspired name that he can never remember.
05:48 * tylercurtis appears to be wrong.
05:49 TimToady it's really more like the direct object in English
05:49 drake1 with adjective constructors
05:50 TimToady rakudo: class Dog { has $.ears; has $.tail }; my $fido = new Dog: tail => 'long', ears => 'short'; say $fido.perl
05:50 p6eval rakudo b958a1: OUTPUT«===SORRY!===␤Confused at line 22, near "my $fido ="␤»
05:51 TimToady maybe rakudo doesn't parse that yet
05:51 TimToady std: class Dog { has $.ears; has $.tail }; my $fido = new Dog: tail => 'long', ears => 'short'; say $fido.perl
05:51 p6eval std 32087: OUTPUT«ok 00:01 119m␤»
05:51 TimToady the STD parser doesn't mind it
05:51 drake1 cool
05:51 drake1 cool syntax/
05:52 TimToady esp when formatted one initializer per line
05:52 TimToady which is hard to show in irc
05:53 drake1 a bit more active than bind configuration
05:55 drake1 you know with wildcard_name { parameter1=blah\nparameter2 ...
05:55 TimToady tylercurtis: \w === <alnum>
05:56 TimToady we have to preserve the clocking of the code to better report syntax errors
05:57 TimToady so it takes a bit more punctuation to make sure the parser stays in sync, since it's a richer language
05:57 TimToady many syntax errors show up by noticing two terms in a row
05:57 TimToady so that's always an error in Perl 6
05:57 TimToady std: 42 42
05:57 p6eval std 32087: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/LcB0P4wdGb line 1:␤------> [32m42 [33m⏏[31m42[0m␤    expecting any of:␤  bracketed infix␤  infix or meta-infix␤      statement modifier loop␤Parse failed␤FAILED 00:01 116m␤»
05:58 tylercurtis TimToady: if I modify alnum, will that change the behavior of \w, then? I don't think I'm going to end up doing that, since the grammar in question turned out to be simple enough to not need word boundary checks, but it's nice to know in case I do need to.
05:58 TimToady but it can show things that are more subtle, like a missing semicolon
05:59 TimToady std: my $a = 42␤my $b = 43;
05:59 p6eval std :  ( no output )
05:59 TimToady heh
05:59 tylercurtis rakudo: my $a = 42␤my $b = 43
05:59 p6eval rakudo b958a1: OUTPUT«===SORRY!===␤Confused at line 22, near "my $a = 42"␤»
05:59 cono left #perl6
06:00 TimToady tylercurtis: uh, I think changing alnum would probably change \w in STD, but not sure about rakudo
06:00 TimToady std: my $a = 42␤my $b = 43;
06:00 p6eval std :  ( no output )
06:00 TimToady std: my $a = 42;␤my $b = 43;
06:00 p6eval std :  ( no output )
06:00 TimToady hmm, evalbot hosed?
06:00 TimToady std: my $a = 42;
06:00 p6eval std :  ( no output )
06:01 drake1 it's really good to see it becomes clear
06:01 TimToady odd, it was just there...
06:01 drake1 perl5's a bit messy
06:01 TimToady yes, just a bit
06:01 drake1 fine enough to the hardcore scripts
06:01 TimToady std: 42
06:01 p6eval std :  ( no output )
06:02 uniejo joined #perl6
06:02 TimToady it shouldn't be stuck mid compile, because it is supposedly using snapshot semantics
06:03 TimToady perhaps the server is overloaded or something
06:03 TimToady rakudo: 42
06:03 p6eval rakudo b958a1:  ( no output )
06:03 TimToady rakudo: say 42
06:03 p6eval rakudo b958a1: OUTPUT«42␤»
06:04 TimToady std: 42
06:04 p6eval std 32087: OUTPUT«ok 00:01 114m␤»
06:04 TimToady std: my $a = 42␤my $b = 43;
06:04 p6eval std 32087: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row (previous line missing its semicolon?) at /tmp/S0YtT21PCl line 2:␤------> [32m<BOL>[33m⏏[31mmy $b = 43;[0m␤    expecting any of:␤        POST␤   bracketed infix␤    infix or meta-infix␤      postfix␤
06:04 p6eval ..postfix_prefix_meta_operator␤       statement modif…
06:05 TimToady here it figures out a semicolon seems to be missing, since there's a line break
06:12 tylercurtis As I write tests for a toy LISP interpreter, I find myself thinking about how convenient it is to use functions as list ops, without parenthesizing the arguments. That seems a little ironic.
06:15 drake1 well, printf "%s\n" $F |egrep '\.l|\.y' for now. thanks for the introduction
06:15 drake1 bye
06:15 drake1 left #perl6
06:21 wtw joined #perl6
06:27 moritz__ is now known as moritz_
06:28 snearch left #perl6
06:40 mberends left #perl6
06:45 barika joined #perl6
06:55 moritz_ good morning
06:56 moritz_ and good evening to sorear :-)
06:57 tylercurtis Good night, #perl6.
06:58 tylercurtis left #perl6
07:35 tadzik joined #perl6
07:35 tadzik o/
07:37 wamba joined #perl6
07:39 rgrau joined #perl6
07:44 azawawi joined #perl6
07:44 azawawi hi
07:45 rokoteko_ joined #perl6
07:49 barika left #perl6
07:49 nadim left #perl6
07:49 huf left #perl6
07:49 phenny left #perl6
07:49 renormalist left #perl6
07:49 aesop left #perl6
07:49 rokoteko left #perl6
07:50 azawawi sorear: ping
07:51 azawawi phenny: tell sorear I tried http://irclog.perlgeek.de/​perl6/2010-08-19#i_2722179 and it worked. Thanks. How about documenting that somewhere?
07:53 azawawi phenny down?
07:54 lestrrat is now known as lest_away
07:55 sorear no, you're just on the wrong channel
07:55 sorear phenny is in the other #perl6 now
07:56 azawawi other #perl6?
07:56 drbean joined #perl6
07:57 sorear do you know what a netsplit is
07:58 azawawi nop but i just read about it
07:59 barika joined #perl6
07:59 nadim joined #perl6
07:59 huf joined #perl6
07:59 phenny joined #perl6
07:59 renormalist joined #perl6
07:59 aesop joined #perl6
07:59 azawawi sorear: on a unsuccessful parse, i get a lot of uninitialized variable errors. It that normal?
08:03 sorear not for me
08:04 sorear it might be for you; disable the warnings if you have to
08:05 azawawi std: say 1;
08:05 p6eval std 32087: OUTPUT«ok 00:01 115m␤»
08:05 azawawi std: say;
08:05 p6eval std 32087: OUTPUT«Potential difficulties:␤  Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/cuPE3P6cui line 1:␤------> [32msay[33m⏏[31m;[0m␤ok 00:01 114m␤»
08:06 patrickas joined #perl6
08:07 patrickas left #perl6
08:08 azawawi sorear: here is what im getting when trying it on Strawberry Perl 5.12.0
08:09 * azawawi checks it again on his ubuntu vm
08:13 sorear I am sorry but I cannot help with any Strawberry-specific problem
08:14 sorear it works fine on a 5.12.0 built from the git sources
08:14 azawawi sorear: yeah i know. i couldnt even get blizkost on run on that strawberry...
08:16 fod left #perl6
08:18 thebird joined #perl6
08:24 tadzik left #perl6
08:27 dakkar joined #perl6
08:29 daxim joined #perl6
08:29 drake1 joined #perl6
08:29 azawawi sorear: ok i tried all the steps again on ubuntu and I still get the same warnings. Any clue to what is happening? Am i compiling CORE.setting in a wrong way or should i get a compatible CORE.setting with the same STD version?
08:30 drake1 another question. something like http://pastebin.ca/1923194 with pipe-line shell setup, how's that in perl6 ?
08:30 azawawi sorear: this is what i use to compile the setting if it is not there http://pastebin.ca/1923196
08:33 sorear azawawi: you can't use STD->parse* twice in one process without a huge amount of locals, and even then it's not reliable
08:33 sorear see sys_compile_module for the current list
08:33 zulon joined #perl6
08:34 azawawi sorear: i know but it is executed once after syml/CORE.syml is created
08:34 moritz_ drake1: a lot of IO stuff isn't specified yet. So I'm not sure how it will end up looking
08:34 azawawi sorear: second runs yield the same warnings. Am i missing something here?
08:34 drake1 moritz_: ok
08:35 sorear azawawi: are you changing directories at all anywhere?
08:36 azawawi sorear: nop, just that simple example
08:36 azawawi sorear: and i made sure that S:H:P6 STD stuff is deleted before installing STD
08:38 sorear well, there's something wrong, probably related to STD's lack of reusability
08:39 * azawawi tries older STD versions
08:41 azawawi sorear: maybe the change to STD:: namespace made these errors
08:41 drake1 use Tk; won't allow perl to fork so had to use stdio for extern solutions
08:41 azawawi sorear: older STD behaves the same
08:42 azawawi drake1: why dont you try using blizkost? Write p5 in perl6
08:42 drake1 blizkost?
08:42 azawawi drake1: http://github.com/jnthn/blizkost
08:42 azawawi drake1: embeds perl5 in Rakudo perl 6
08:43 sorear azawawi: you're on your own
08:43 drake1 azawawi: nice. ill try it
08:44 azawawi sorear: Thanks. I thought so :)
08:44 azawawi sorear: im rolling back S:H:P6 to the older STD copying script.
08:44 shade\ left #perl6
08:45 drake1 no perl6 module to associate a file descriptor with an io buffer?
08:46 azawawi left #perl6
08:47 shade\ joined #perl6
08:47 shade\ left #perl6
08:54 lest_away is now known as lestrrat
08:54 lestrrat is now known as lest_away
08:55 lest_away is now known as lestrrat
08:58 zulon left #perl6
08:59 drake1 left #perl6
09:05 jnthn morning
09:05 dalek niecza: 36e966d | sorear++ | src/ (3 files):
09:05 dalek niecza: *very* hacky first take on $/ and $¢
09:05 dalek niecza:
09:05 dalek niecza: They're only available inside regex embedded blocks.
09:05 dalek niecza: review: http://github.com/sorear/niecza/commit/3​6e966d8920a7bd87f85b0ff812c358f2a72e4a4
09:05 dalek niecza: 862b2be | sorear++ | / (2 files):
09:05 dalek niecza: Parse $/ and $¢
09:05 dalek niecza: review: http://github.com/sorear/niecza/commit/8​62b2be361d4f61e3bc53efc722ac6553d8b4e84
09:05 dalek niecza: eb16e02 | sorear++ | src/Niecza/Actions.pm:
09:05 dalek niecza: Implement parsing of $<foo> form
09:05 dalek niecza: review: http://github.com/sorear/niecza/commit/e​b16e02225dfc160654024628d6c669f65954eb7
09:05 moritz_ next step: $0
09:09 moritz_ niecza: 'abc' ~~ / <alpha> { say $<alpha> } /
09:09 p6eval niecza eb16e02: OUTPUT«Unhandled exception: Unable to resolve method alpha in class Cursor␤  at /tmp/VHk_61qKRO line 0␤  at lib/SAFE.setting line 976␤  at /tmp/VHk_61qKRO line 0␤  at /tmp/VHk_61qKRO line 0␤  at lib/SAFE.setting line 988␤  at lib/SAFE.setting line 346␤  at /tmp/VHk_61qKRO line 1␤
09:09 p6eval ..at lib/…
09:10 moritz_ niecza: 'abc' ~~ / $<alpha>=(.) { say $<alpha> } /
09:10 p6eval niecza eb16e02: OUTPUT«[31m===[0mSORRY![31m===[0m␤Can't locate object method "new" via package "RxOp::Any" (perhaps you forgot to load "RxOp::Any"?) at /home/p6eval/niecza/src/Niecza/Actions.pm line 546.␤Attribute (zyg) does not pass the type constraint because: Validation failed for
09:10 p6eval ..'ArrayRef[RxOp]'…
09:10 moritz_ sorear: what built-in named rules are available?
09:12 sorear ws.
09:13 sorear also, while $<foo> parsing may be implemented...
09:13 sorear niecza: ' ' ~~ / <ws> { say $<ws> } /
09:13 p6eval niecza eb16e02: OUTPUT«Unhandled exception: Unable to resolve method at-key in class Cursor␤  at /tmp/da70PO5Syg line 1␤  at /tmp/da70PO5Syg line 1␤  at lib/SAFE.setting line 975␤  at /tmp/da70PO5Syg line 0␤  at lib/SAFE.setting line 933␤  at /tmp/da70PO5Syg line 0␤  at lib/SAFE.setting line 976␤
09:13 p6eval ..at /tm…
09:14 moritz_ niecza: '  ' ~~ / <ws> { say ':' ~ $/{'ws'} ~ ':' } /
09:14 p6eval niecza eb16e02: OUTPUT«Unhandled exception: Unable to resolve method at-key in class Cursor␤  at lib/SAFE.setting line 836␤  at /tmp/U4fSrSdzxx line 1␤  at /tmp/U4fSrSdzxx line 1␤  at lib/SAFE.setting line 975␤  at /tmp/U4fSrSdzxx line 0␤  at lib/SAFE.setting line 933␤  at /tmp/U4fSrSdzxx line 0␤
09:14 p6eval ..at lib…
09:20 shade\ joined #perl6
09:20 shade\ left #perl6
09:20 Mowah joined #perl6
09:25 drbean left #perl6
09:25 mulander left #perl6
09:27 shade\ joined #perl6
09:27 shade\ left #perl6
09:28 * sorear is now trying to get niecza's parse->past-ish stage to accept STD
09:29 sorear I don't think jnthn is going to try to compete with me in parsing STD.pm6 in the next two weeks
09:29 moritz_ I don't expect that either
09:29 moritz_ he's working on much more low-level stuff
09:31 sorear moritz_: one flaw in niecza which affects the evalbot that I'm not sure how to fix
09:31 sorear moritz_: niecza keeps a cache of precompiled modules
09:32 sorear moritz_: sometimes I like to make binary-incompatible changes to the code generation, but I don't want to invalidate the cache on any compiler tweak
09:32 sorear is there a more elegant way out than just a Parrot-style version number?
09:33 shade\ joined #perl6
09:33 sorear looks like the next big error generator is adverbs.  hmm.
09:33 sorear rakudo: my %foo; say %foo<x> :exists;
09:33 moritz_ sorear: have a dummy revision file, and make all modules depend on it
09:34 p6eval rakudo b958a1: OUTPUT«===SORRY!===␤Confused at line 22, near "say %foo<x"␤»
09:34 moritz_ sorear: and change that revision file whenever you want them to recompile
09:34 sorear would that work across git?
09:34 moritz_ sure; if you commit these changes to the revision file, its timestamp will be updated too
09:35 ruoso left #perl6
09:40 jnthn sorear: No, I generally stay well away from the grammar engine. :-)
09:41 moritz_ sorear: I'm curious about your mid to long-term goals for niecza. Will you try to attract users and contributors? what will you do after you have STD bootstrapped?
09:42 ppant joined #perl6
09:44 moritz_ http://github.com/moritz/perlgeek.de/blob/maste​r/source/blog-source-en/perl-6/not-zero-sum.txt # anybody want to comment on my next blog post before it goes live?
09:47 sorear moritz_: after STD is bootstrapped, I'm going to try the metacircular aspects of Perl 6 - BEGIN and eval
09:48 sorear I'm going to try to set up a real REPL
09:49 sorear there may be an attempt at macros, or maybe not; I would need to figure out how to resolve meta type issues first
09:49 sorear TimToady has said that the compiler and the compilee have logically distinct interpreters, which raises questions on how they can share AST nodes and strings
09:50 sorear github-- # presenting a .*\.txt URL as text/html
09:53 sorear moritz_: 1, how does worldwide population growth figure into this 2. is it just me, or has the US gov't become a disproportionate exporter of demographics?
09:53 moritz_ sorear: if you have better links, please share them :-)
09:53 mathw o/
09:54 jnthn o/ mathw
09:55 moritz_ I'll write a bit about population growth
09:59 tadzik joined #perl6
09:59 Mowah left #perl6
10:00 Mowah joined #perl6
10:00 Mowah left #perl6
10:03 Mowah joined #perl6
10:04 Gothmog_ joined #perl6
10:07 rokoteko_ is now known as rokoteko
10:07 rokoteko left #perl6
10:07 rokoteko joined #perl6
10:08 ggoebel joined #perl6
10:09 sorear ggoebel: are you reachable?
10:09 agentzh left #perl6
10:10 moritz_ http://perlgeek.de/blog-en​/perl-6/not-zero-sum.html loliblogged
10:11 sorear perl 6 hackers have their blogs on paper sticks?
10:11 moritz_ paper stick?
10:11 jnthn lol
10:11 * moritz_ doesn't get it
10:11 jnthn moritz_: Think it's a place on "lolly"
10:11 jnthn *play
10:12 szbalint moritz_++
10:12 moritz_ oh my
10:12 sorear they're called lolipops in the states
10:12 Mowah left #perl6
10:12 jnthn Yes, in the UK too :-)
10:12 jnthn Or "lolly" as slang. :-)
10:12 moritz_ we have "lolly" too
10:12 jnthn Sweet. :-)
10:12 Mowah joined #perl6
10:13 moritz_ but I didn't make the jump to paper sticks
10:13 szbalint The connection was a bit *thin*.
10:14 moritz_ that's why I didn't *thin*k of it
10:14 Mowah left #perl6
10:15 Mowah joined #perl6
10:17 moritz_ I've also hackernews'ed it - let's see what comes out of it :-) http://news.ycombinator.com/item?id=1626335
10:19 Mowah left #perl6
10:19 Mowah joined #perl6
10:23 ppant left #perl6
10:24 Mowah left #perl6
10:25 Mowah joined #perl6
10:25 Mowah left #perl6
10:26 Mowah joined #perl6
10:27 Mowah left #perl6
10:27 pnu left #perl6
10:27 Mowah joined #perl6
10:27 Mowah left #perl6
10:29 lestrrat is now known as lest_away
10:32 dalek niecza: f61a6db | sorear++ | / (3 files):
10:32 dalek niecza: Implement operator adverb processing
10:32 dalek niecza: review: http://github.com/sorear/niecza/commit/f​61a6db0bdf8ace0de1217d09ede42e6a0bd0784
10:32 pnu joined #perl6
10:32 Mowah joined #perl6
10:34 azert0x joined #perl6
10:34 azert0x left #perl6
10:35 Mowah left #perl6
10:35 Mowah joined #perl6
10:36 sorear Mowah: What's the problem?
10:36 azert0x joined #perl6
10:37 * moritz_ ignores joins and leaves
10:37 sorear what about quits?
10:37 moritz_ too
10:37 moritz_ 12:36    3 #perl6: JOINS PARTS QUITS NICKS
10:37 azert0x hello
10:37 sorear down to 205 sorry()s in STD parse
10:37 moritz_ from my ignorance list
10:37 moritz_ hi azert0x
10:37 tadzik I miss an irc client which will keep those events in some separate windows, visible, but not polluting the tal
10:38 tadzik the fact is these are almost useless on irc, where everyone idles like hell anyway
10:38 tadzik hi azert0x
10:38 moritz_ tadzik: I ignore them in irssi, and if they interest me, I look into the web based IRC logs
10:38 sorear tadzik: that's what I was planning when I got sidetracked.
10:38 moritz_ though they aren't quite complete
10:38 tadzik sorear: sidetracked? By Perl 6?
10:39 tadzik there's an old irssi theme having that, but it segfaults
10:39 sorear by *implementing* perl6 :|
10:39 tadzik :)
10:39 sorear I pretty thoroughly hate irssi
10:39 * tadzik on weechat
10:39 tadzik but not a love-hate relationships, these are just tools
10:39 sorear I was writing a replacement in perl6 when I realized a couple features I needed were missing
10:40 sorear who says those are mutually exclusive?
10:40 tadzik hm?
10:41 tadzik isn't there some nice irc client in Perl which we can extend all way long?
10:47 sorear next... metaoperators
10:48 sorear this will be a little bit interesting.
10:48 sorear (I'm mainly concerned with infix_postfix_meta_operator:sym<=>)
10:48 * sorear wonders if the user should be able to define metaops with names like that
10:50 dalek niecza: 5b403a4 | sorear++ | src/Niecza/Actions.pm:
10:50 dalek niecza: Implement \$\d+ syntax
10:50 dalek niecza: review: http://github.com/sorear/niecza/commit/5​b403a4af4f94ab4a95ef761fe7fcfc5714a2154
10:51 * sorear out
10:58 meppl joined #perl6
11:07 scottp joined #perl6
11:07 scottp left #perl6
11:26 Mowah left #perl6
11:34 envi^home joined #perl6
11:36 envi^home left #perl6
11:40 envi^home joined #perl6
11:45 M_o_C joined #perl6
11:47 araujo left #perl6
12:02 takadonet morning all
12:07 [particle] left #perl6
12:08 [particle] joined #perl6
12:10 zulon joined #perl6
12:15 ruoso joined #perl6
12:16 zulon left #perl6
12:16 M_o_C left #perl6
12:17 zulon joined #perl6
12:22 sftp joined #perl6
12:23 araujo joined #perl6
12:30 zulon left #perl6
12:40 [Coke] RT: 673 active tickets; 152 new; 12 need tests.
12:41 moritz_ :/
12:42 rgrau_ joined #perl6
12:42 TiMBuS mo' users, mo' tickets
12:45 [Coke] moritz_: by which I mean "are assigned to moritz". =-)
12:47 drbean joined #perl6
12:52 Italian_Plumber joined #perl6
12:56 timbunce joined #perl6
12:58 karb joined #perl6
13:04 karb left #perl6
13:07 drake1 joined #perl6
13:07 drake1 it's my perl day today heh
13:08 drake1 just wrote this http://pastebin.ca/1923290
13:08 drake1 and started to think that maybe perl6 is more nice to call functions from returned object pointers
13:09 moritz_ what are these pointers you're talking about?
13:09 drake1 object methods
13:09 drake1 sry
13:10 drake1 the ->pack on like 13 eg
13:10 drake1 s,like,line
13:10 jnthn Well, you save a character :-)
13:11 moritz_ .pack instead of ->pack
13:11 jnthn Other things would likely get neater too :-)
13:11 moritz_ like, no more - in front of named options
13:11 drake1 with dots instead of arrows
13:11 jnthn "sub { my $widget = shift;" could become maybe -> $widget { ... }
13:11 tadzik looks like the Canvas methods is using some funny named parameters paring
13:11 drake1 the dot colors of that Canvas grid drove me close to insane on MSN and cpan to find the property
13:12 foodoo joined #perl6
13:12 orafu left #perl6
13:13 drake1 not => { ... } instead of ``sub''?
13:14 orafu joined #perl6
13:15 drake1 instead of => sub { ... } sry
13:15 zulon joined #perl6
13:15 jnthn $mw.bind('<ButtonPress-1>' => -> $widget { ... }) # pointy block way
13:15 jnthn $mw.bind('<ButtonPress-1>' => sub ($widget) { ... }) # anonymous sub way
13:15 drake1 and `pairs' by the arrow instead
13:15 jnthn The => -> looks kinda funny though :-)
13:16 drake1 yes
13:16 Guest81071 left #perl6
13:17 drake1 but => is still to associate a pair?
13:17 moritz_ not "still"
13:17 moritz_ perl 5 has no idea of pairs
13:18 drake1 seems like -> int argc, int argv alike prototyping
13:18 moritz_ in perl 5, => is just like a comma, except that it quotes the LHS
13:18 drake1 yes I know with first one being the even positions
13:18 moritz_ buubot: eval: [my $a = 5 => 'b' => a => 4]
13:18 buubot moritz_: [5,"b","a",4]
13:19 moritz_ whereas in Perl 6, the => actually constructs a Pair object
13:19 PerlJam moritz_: well, it quotes barewords on the LHS, not just anything :)
13:19 moritz_ bareword identifiers, right
13:23 drake1 does anyone know how to get a direct pixmap to X instead of all those objects?
13:23 moritz_ aren't there Tk widges for displaying pixel graphics?
13:23 drake1 I don't know
13:23 moritz_ I'd be surprised if not
13:24 drake1 something like an X pixmap string
13:24 drake1 whatever
13:24 drake1 it's fine enough with perl objects
13:25 moritz_ http://search.cpan.org/~srez​ic/Tk-804.029/pod/Pixmap.pod
13:25 drake1 XPM then
13:26 bbkr joined #perl6
13:29 drake1 then $mw->bind would then be $mw.bind or just mw.bind ?
13:29 drake1 in perl6
13:30 tadzik $mw.bind, variable is a variable
13:30 drake1 and it's still called a reference variable?
13:30 tadzik well, it's just a scalar
13:31 drake1 no special type
13:32 moritz_ since (nearly) everything in Perl 6 is a reference, it doesn't make sense to call something explcilitly a reference
13:32 drake1 nice
13:33 drake1 but perl6 know we're asking for an object method by the dot?
13:33 drake1 knows*
13:33 moritz_ with the dot you *always* ask for an object method
13:33 drake1 alright
13:33 jnthn ...what other sort of method is there in Perl 6? :-)
13:34 moritz_ well, .() is probably not an object method
13:34 jnthn oh, I see what you mean.
13:34 drake1 jnthn: only playing smart with OO terms
13:35 moritz_ other languages distinguish "object methods" and "class methods"
13:35 jnthn Yeah
13:35 moritz_ in Perl 6, a "class method" just means calling a method on the type object
13:35 drake1 class methods are still package::method ?
13:35 tadzik package.method
13:35 moritz_ TypeObject.method()
13:35 moritz_ like
13:36 drake1 nice
13:36 moritz_ Gymnast.new().walk-to-bar()
13:36 jnthn ;-)
13:36 moritz_ there .new() is a method on the type object
13:36 drake1 and perl6 also has arbitrary constructors with blessings ?
13:36 moritz_ yes
13:36 drake1 cool
13:37 moritz_ though you get one free for default
13:37 Helios- left #perl6
13:38 Helios- joined #perl6
13:38 drake1 then perl is close to perfect
13:45 drake1 are there any pattern modifiers for locale compatible BREs and EREs?
13:46 moritz_ what are BREs and EREs?
13:46 PerlJam basic regex and extended regex
13:47 PerlJam they are POSIXy I think.
13:47 drake1 \(basic\|extended\) regular expression
13:47 drake1 sometimes perl is very rich in meta characters
13:47 moritz_ I don't know; Perl 6 doesn't use POSIX regexes :-)
13:48 drake1 read a bit about the angle bracket expressions for pattern meta control
13:48 drake1 seems it'
13:48 drake1 s
13:48 drake1 gonna be possible
13:50 wooden left #perl6
13:53 drake1 even in a `lex' alike fashion by default
13:54 drake1 with implicit /.../e's actions and stuff
13:55 uniejo left #perl6
13:55 drake1 perfect for ASM generators
13:59 drake1 maybe a bit slower than lex+yacc+cc
14:01 PerlJam slower for now, but still more expressive.
14:01 moritz_ well, we found that Perl 6 is a pretty good language to write a compiler in
14:01 drake1 very friendly, usually
14:01 moritz_ which is why big parts of Rakudo are written in Perl 6
14:02 drake1 with a proper build system, the compilation time isn't really an issue
14:02 PerlJam whenever the code is optimized for speed, I'd be willing to be the total time of development using Perl6 will be much less than lex+yacc
14:02 drake1 probably
14:02 drake1 also a matter of taste
14:03 lamstyle joined #perl6
14:06 Trashlord left #perl6
14:10 bbkr lex+yacc are very complicated when compared to P6 grammar with :actions attached. check for example masak's HTML::Template - grammar is on one screen. i use Eyapp at work and most jobs can be done with P6 grammars in 50% less time.
14:10 amkrankruleuen joined #perl6
14:11 drbean left #perl6
14:11 drake1 I love to code C
14:11 tadzik I need to lear about this grammars Actions
14:11 drake1 sometimes Perl is a lot more complicated
14:12 moritz_ and sometimes a lot easier :-)
14:12 drake1 when things are getting tiny and specific
14:12 drake1 moritz_: depends on many things
14:12 bbkr drake1: me too. and I think it will be possible soon (or it is possible now) to have very clear P6 grammar and C libs to interpret AST.
14:13 drake1 hmm
14:13 moritz_ drake1: sure; for low level stuff C is easier; but string manipulations are just a PITA in C
14:13 moritz_ more so if they can contain binary data
14:13 drake1 depends how you wrap it
14:13 Italian_Plumber left #perl6
14:14 moritz_ well, the fact that you have to wrap it speaks for itself
14:14 moritz_ in Perl, it is already wrapped
14:14 bbkr tadzik: the best way to see how grammar actions work is to analyze JSON::Tiny (available on CPAN)
14:14 drake1 C99 macro code is typically far enough string magic
14:14 drake1 but I like perl to
14:15 drake1 depends on my personal mood
14:16 moritz_ http://github.com/moritz/json/blo​b/master/lib/JSON/Tiny/Grammar.pm
14:16 drake1 sometimes the one sometimes the other
14:16 moritz_ http://github.com/moritz/json/blo​b/master/lib/JSON/Tiny/Actions.pm
14:17 Trashlord joined #perl6
14:17 drake1 a bit paradoxical, how perl5 is completely utf-8 for a trillion different scripts while trying to be the a single language for everything at the same time
14:18 * moritz_ doesn't understand that statement
14:18 moritz_ you can use perl5 in all-latin1 if you want
14:20 alester joined #perl6
14:20 drake1 I mean with `sh' you always switch scripting language, in perl you stay or can stay in perl
14:20 tadzik moritz_: make $<pair>>>.ast.flat; is actually make $<pair>».ast.flat?
14:20 tadzik >>> looks not pretty
14:20 moritz_ tadzik: yes; I planned to change that
14:21 moritz_ now that the applicable rakudobug is fixed
14:21 tadzik so Grammar is Parsing, and Actions is generating the actual data structure?
14:22 perlygatekeeper joined #perl6
14:22 tadzik duh, I need to finally read this grammar chapter
14:22 drake1 the actions stack the compilation
14:22 drake1 in fine binary strings
14:23 moritz_ tadzik: yes, you should
14:23 moritz_ tadzik: and report back whether it answers your questions
14:31 amkrankruleuen Hello, i find documentation for Sockets in Perl6
14:31 moritz_ where?
14:32 amkrankruleuen generally
14:33 moritz_ are you searching for documentation?
14:34 moritz_ http://perlcabal.org/syn/S32/IO​.html#IO%3A%3ASocket%3A%3AINET seems all we have right now :(
14:34 amkrankruleuen Ups, sorry, i sleep -.-, i s/find/search/
14:34 moritz_ there are some working examples that you could use as inspiration, though
14:34 amkrankruleuen Thanks
14:35 tadzik moritz_: so far the book looks nice, I even noted down some bugs and typos
14:35 moritz_ in particular http://github.com/mberends/http-server-simple
14:35 moritz_ tadzik++
14:35 tadzik I sat and started reading it from the very beginning
14:35 tadzik let me translate it to english
14:35 tadzik moritz_: can I fix them myself?
14:35 moritz_ tadzik: sure
14:35 moritz_ hugme: add tadzik to book
14:35 * hugme hugs tadzik. Welcome to book!
14:36 tadzik that'd be the second Warsaw Perl Monger fixing the Perl 6 Book :)
14:36 tadzik after Piotr Fusik
14:36 tadzik moritz_: oh thanks :)
14:36 tadzik suprise hugme :)
14:37 * moritz_ thinks we could use a dozen Warsaw Perl Mongers :-)
14:37 x3nU is now known as mbialy
14:37 drake1 IO::Pipe, that's exactly what I needed. Thank you moritz_.
14:37 tadzik :)
14:37 tadzik speaking of Warsaw Perl Mongers, how is require doing in Rakudo?
14:38 pnate joined #perl6
14:38 moritz_ it blocks on me not getting it to parse, and nobody else is working on it :/
14:38 moritz_ rakudo: use Test <is ok plan>;
14:38 p6eval rakudo b958a1: OUTPUT«===SORRY!===␤Confused at line 22, near "use Test <"␤»
14:39 tadzik looks like pdf conversion is eating letters
14:39 moritz_ the parsing code is in src/Perl6/Grammar.pm line 458
14:39 moritz_ tadzik: are you looking at the latest PDF?
14:39 dalek book: 8746dbc | moritz++ | src/ (2 files):
14:39 dalek book: [subs] rip out section about multi methods; it belongs into the OO chapter, and probably with quite different wording
14:39 dalek book: review: http://github.com/perl6/book/commit/87​46dbc2a3db0126a000bece08b4ee27a5af7413
14:40 tadzik moritz_: yep
14:40 moritz_ and I think that the <arglist> *should* be parsing <is ok plan>
14:40 tadzik http://imgur.com/xeGFO
14:40 tadzik moritz_: ↑
14:40 moritz_ ouch
14:41 tadzik also, I don't know how to fix that one: http://imgur.com/Sle6T
14:41 tadzik besides another lowercased c
14:42 drake1 sed '/^\.PL/,/^\.LP/!d' */* |perl . Gotta run. Bye
14:42 drake1 left #perl6
14:43 tadzik also I have no tools to build the book :/
14:43 moritz_ tadzik: the README tells you what you need... it comes with every modern Linux distributions
14:43 moritz_ s/s$//
14:44 tadzik speak for yourself, CRUX has no inkscape in official ports ;)
14:44 tadzik should I add myself to contributors?
14:44 moritz_ s/modern/modern and mostly complete/
14:44 moritz_ :-)
14:44 moritz_ tadzik: yes, please
14:45 tadzik CRUX is complete. It's just frugal in terms of packages :)
14:45 moritz_ I can't build it currently, because at $work I don't have the tools either
14:45 moritz_ will try some fixes at home later on
14:46 zulon left #perl6
14:46 dalek book: 54b6b80 | tadzik++ | src/regexes.pod:
14:46 dalek book: Fixed another broken C<> in regexes.pod
14:46 dalek book: review: http://github.com/perl6/book/commit/54​b6b8034b8bb9d8b35be55c3c73d2387460e019
14:46 dalek book: d28f1b3 | tadzik++ | src/basics.pod:
14:46 dalek book: Fixed C<> in basics.pod
14:46 dalek book: review: http://github.com/perl6/book/commit/d2​8f1b35eecb235de73d3b30b75b1249f88d8075
14:46 tadzik I think the first one fixed that second bug
14:46 moritz_ aye
14:46 moritz_ and I think the first bug is just missing indention
14:47 moritz_ it seems the building code uncondtionally cuts off the first 4 characters of code blocks
14:48 tadzik so indenting it will fix it? This appears in many places
14:48 moritz_ I'll test it when I get home
14:48 moritz_ if that's the fix, easy karma :-)
14:49 tadzik :D
14:49 tadzik speaking of easy karma...
14:50 jnthn tadzik++
14:50 jnthn ;-)
14:50 sftp left #perl6
14:50 tadzik oh noes, you have spoiled the effect! :)
14:50 tadzik speaking of easy karma, **dalek**...
14:50 sftp joined #perl6
14:52 dalek book: 426a900 | moritz++ | src/basics.pod:
14:52 dalek book: markup fix, noticed by tadzik++
14:52 dalek book: review: http://github.com/perl6/book/commit/42​6a900cb42badc737aed81175f1488279aa1417
14:52 dalek book: 081b5ef | tadzik++ | lib/book.sty:
14:52 dalek book: Added myself to contributors
14:52 dalek book: review: http://github.com/perl6/book/commit/08​1b5efafd4d041c1557e0f778e1afc07ec6bce3
14:52 tadzik ...there we go :)
14:52 tadzik I mean the second one :)
14:52 mbialy is now known as x3nU
14:53 tadzik so these are just spaces, yep? I remember seeing another few bugs like this one
14:53 tadzik or maybe I didn't
14:54 wtw left #perl6
14:55 moritz_ there are some more
14:56 moritz_ src/basics.pod lines 491 to 502
14:56 tadzik http://www.reddit.com/r/programming/comments/d4eg​k/age_discrimination_in_perl_6_using_subsets_and/ I see a room for some nice propaganda response to that comment :)(
14:56 moritz_ and src/subs-n-sigs.pod lines 76 and later
14:56 tadzik aye
14:56 tadzik are you fixing it now?
14:57 moritz_ no; I want to test if my last commit actually fixed anythinig
14:57 moritz_ but I can't do that right now
14:57 moritz_ so I have to wait for tonight
14:58 tadzik building inkscape atm, I may be able to test it in a few minuts
14:58 moritz_ (reddit) replied, though my reply seems a bit lame
14:59 tadzik not bad
15:05 lue hello o/
15:05 bbkr rakudo: sub foo(Int $x) {say "called with $x"}; foo(any(1,2,3)) # it that correct method dispatch or a bug? looks like a bug because Int !~~ Junction
15:05 tadzik hi lue \o
15:05 p6eval rakudo b958a1: OUTPUT«(timeout)»
15:05 moritz_ timeout looks bad
15:05 moritz_ rakudo: sub foo(Int $x) {say "called with $x"};
15:06 p6eval rakudo b958a1:  ( no output )
15:06 bbkr it returns "called with 1" "called with 2" "called with 3" locally on Pisa release
15:06 moritz_ and that's spec
15:06 moritz_ that's what we call "autothreading"
15:06 jnthn That's what auto-threading does.
15:07 bbkr ah, awesome!
15:07 tadzik autothreading alredy works? yay. I thought threads in Parrot are NYI
15:08 justatheory joined #perl6
15:08 mathw it doesn't necessarily do it in parallel
15:08 mathw conceptually yes
15:08 moritz_ authoreading != threading
15:08 mathw but at the moment it doesn't use threads to do it
15:08 tadzik oh, I see
15:11 bbkr rakudo: multi sub foo(Int $x) {say "called with number $x"}; multi sub foo(Str $y) {say "called with string $y"}; foo(one(1,"a")) # this dispatch is purely AWESOME!
15:12 p6eval rakudo b958a1: OUTPUT«(timeout)called with number 1␤»
15:13 bbkr eval has some hickup today :(
15:13 jnthn bbkr: That took...effort...to get right. :-)
15:13 [Coke] partcl-nqp: puts [namespace children ::]
15:13 p6eval partcl-nqp: OUTPUT«␤»
15:13 [Coke] ww!
15:13 isBEKaml joined #perl6
15:14 moritz_ bbkr: what's odd is that the p6eval has a pretty load at the moment
15:15 scoon joined #perl6
15:16 isBEKaml good evening, #perl6!
15:17 moritz_ o/ isBEKaml
15:18 isBEKaml hugme: hug moritz # for his response to the reddit thread. esp "Steal" xD
15:18 * hugme hugs moritz
15:18 scoon left #perl6
15:18 justatheory left #perl6
15:19 tadzik hehe
15:27 bbkr hmm, i found some inconsistency. %($x) calls method $x.hash but @($x) does not call $x.array.
15:27 bbkr i'm not sure if it's anywhere in the spec
15:27 moritz_ what does @() call? .flat?
15:28 TimToady probably .list
15:28 bbkr rakudo: class A { method list {say 1}}; %(A.new) # checking
15:28 jnthn rakudo: class A { method flat { say "yes" } }; say @(A.new)
15:28 p6eval rakudo b958a1: OUTPUT«Method 'hash' not found for invocant of class 'A'␤  in main program body at line 22:/tmp/rhvL2pb_Pp␤»
15:28 p6eval rakudo b958a1: OUTPUT«A()<0x5fbf5e0>␤»
15:28 bbkr rakudo: class A { method list {say 1}}; @(A.new) # checking
15:29 p6eval rakudo b958a1: OUTPUT«1␤»
15:29 jnthn rakudo: class A { method list { say "yes" } }; say @(A.new)
15:29 p6eval rakudo b958a1: OUTPUT«yes␤1␤»
15:29 jnthn ah, bbkr beat me to it :-)
15:29 bbkr .list :) thanks, everything clear now
15:29 TimToady we try to keep the flat/slice distinction lazy
15:42 pyrimidine joined #perl6
15:42 x3nU where can i find list of date&time related functions in perl6 (if there's any)?
15:44 tadzik S32 is it?
15:44 PerlJam x3nU: http://perlcabal.org/syn/S32/Temporal.html
15:44 tadzik yep
15:45 TimToady you can find these things via perl6.org specifications linking to http://perlcabal.org/syn/
15:46 x3nU thanks :)
15:48 zulon joined #perl6
15:50 Mowah joined #perl6
15:55 ruoso left #perl6
15:57 pmichaud good morning, #perl6
15:57 TimToady back atchya
15:58 jnthn afternoon, pmichaud :-)
15:58 tadzik pre-evening, pmichaud :)
16:00 TimToady hugme should randomly hug people who use :( or :/
16:00 pmichaud it doesn't do that yet?  :(
16:00 risou joined #perl6
16:00 tadzik :(
16:00 tadzik that'd be a nice feature
16:01 TimToady if not overdone
16:01 jnthn But what about all the extra traffic? :/
16:01 tadzik hugme: hug jnthn
16:01 * hugme hugs jnthn
16:01 TimToady it should track who it has not hugged recently
16:01 jnthn .oO( hugma )
16:02 TimToady it should especially hug someone new to the channel
16:02 * [Coke] thinks that's a little overboard.
16:02 TimToady I mean if they use a negative emoticon
16:04 [Coke] oh, I thought you meant on join.
16:04 [Coke] Þ
16:05 bbkr rakudo: say "mmmmmmmmmany" ~~ /m ** 1..0/ # a bug? inverted ranges (correct according to STD) matches infinite amount in regexp repetition ** op
16:05 p6eval rakudo b958a1: OUTPUT«mmmmmmmmm␤»
16:05 TimToady it could also detect when someone asks a question and there's no activity for the next N minutes
16:05 jnthn Oh wow, :Þ is a really cool Icelandic smiley.
16:06 TimToady bbkr: yes, that should match 0 times
16:06 TimToady should probably be a compile error, really
16:07 * PerlJam suddenly wonders what  / x ** 'a'..'z' /  would mean
16:07 sjn jnthn: :Ð
16:07 pmichaud bbkr: yes, it's a bug.
16:09 pmichaud PerlJam: I suspect it would parse as  / [ x ** 'a'] .. 'z' /
16:10 * bbkr reports
16:11 pmichaud std:  / <[9..0]> /  # just checking
16:11 p6eval std 32087: OUTPUT«ok 00:03 117m␤»
16:11 tylercurtis joined #perl6
16:13 molaf joined #perl6
16:14 foodoo left #perl6
16:14 tadzik left #perl6
16:14 pugssvn r32088 | lwall++ | [STD] detect empty range on ** quantifier
16:14 gfldex i like hugme as it is right now because the human interaction that is required to trigger the hug gives that hug a meaning
16:16 bbkr inverted ranges should be legal. there are many examples when silent-skip of inverted range is most DWIM behavior.
16:17 pmichaud inverted ranges are okay, but probably not if the range is a constant.
16:17 jnthn bbkr: I suspect this is only looking for literals that are inverted.
16:18 TimToady jnthn: that is correct
16:18 pmurias joined #perl6
16:18 pmurias hi
16:18 bbkr jnthn: yes
16:18 TimToady empty character class ranges are a bit harder to detect, since we'd have to deal with \x and such
16:19 TimToady that should probably be done in the semantic layer
16:19 pmichaud agreed
16:22 pmichaud afk, lunch and errands
16:25 bbkr rakudo: say "" ~~ /m ** 1..-1 / # tiny bug - error message should say "positive integers" because -1 IS an integer.
16:26 x3nU i know that i'm asking stupid questions but it's because there's no good perl6 tutorial
16:26 p6eval rakudo b958a1: OUTPUT«===SORRY!===␤Only integers or '*' allowed as range quantifier endpoint at line 22, near "-1 / # tin"␤»
16:26 x3nU how do i read Str from socket?
16:26 Mowah left #perl6
16:26 moritz_ x3nU: there is indeed no good documentation for that - see http://github.com/mberends/http-server-simple for an example though
16:26 x3nU i heard that there was get() method, but well... it  *Was*
16:28 TimToady std: say "" ~~ /m ** 1..-1 /
16:28 p6eval std :  ( no output )
16:28 TimToady std: 42
16:28 p6eval std :  ( no output )
16:29 TimToady has p6eval abandoned using 'make snap' for std?
16:29 zulon left #perl6
16:29 moritz_ no
16:31 spq1 joined #perl6
16:32 ambs joined #perl6
16:34 ambs left #perl6
16:35 snearch joined #perl6
16:35 TimToady std: say "" ~~ /m ** 1..-1 /
16:35 p6eval std 32088: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed range at /tmp/NlvQf0HNFI line 1:␤------> [32msay "" ~~ /m ** 1..[33m⏏[31m-1 /[0m␤    expecting quantifier␤Parse failed␤FAILED 00:01 119m␤»
16:36 TimToady std: say "" ~~ /m ** 1..0 /
16:36 p6eval std 32088: OUTPUT«[31m===[0mSORRY![31m===[0m␤Empty range at /tmp/CL9etXG2gw line 1:␤------> [32msay "" ~~ /m ** 1..0[33m⏏[31m /[0m␤Parse failed␤FAILED 00:01 119m␤»
16:38 bbkr TimToady: I'll add this output to both tickets.
16:40 bbkr std: "" ~~ /m ** 1..Inf /
16:40 p6eval std 32088: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed range at /tmp/S0dgnvVdrx line 1:␤------> [32m"" ~~ /m ** 1..[33m⏏[31mInf /[0m␤    expecting quantifier␤Parse failed␤FAILED 00:03 119m␤»
16:41 bbkr well,  1..Inf is not malformed range :)
16:41 bbkr std: 1..Inf
16:42 p6eval std 32088: OUTPUT«ok 00:04 116m␤»
16:42 bbkr inconsistency here
16:47 ruoso joined #perl6
16:47 isBEKaml left #perl6
16:47 TimToady it can't match Inf of them, only * of them  :)
16:49 TimToady matching is harder than counting :)
16:50 dalek book: 917d907 | moritz++ | src/ (2 files):
16:50 dalek book: more markup fixes; turns out we need four leading spaces in each code block
16:50 dalek book: review: http://github.com/perl6/book/commit/91​7d90721a040c91931391e2c6c059f65a39e4c8
16:55 x3nU ok, i know how to read str from socket
16:55 justatheory joined #perl6
16:56 x3nU but what if i want read bytes or integer
16:56 bbkr TimToady: you're right. and that's why it shouldn't complain about malformed range, because range is perfectly legal, but not in this context. STD error is misleading.
16:57 moritz_ x3nU: oha has submitted a patch that allows reading bytes
16:57 moritz_ x3nU: it's being reviewed
16:59 dakkar left #perl6
17:00 x3nU so in best case i will be able to do that in a month? ;f
17:00 moritz_ in a week, if you're lucky
17:00 moritz_ (and if you build the compiler from source)
17:01 x3nU using compiler builded from repo is bad idea imho ;/
17:01 bbkr TimToady: most P5 converts won't see difference between 1..* and 1..Inf meaning. and if they get "malformed range" error they will report bug because the range is valid.
17:02 TimToady tylercurtis: in your subset article, a 16-year-old is neither a Child nor an Adult
17:02 mathw TimToady: that's because they're a Hassle
17:03 tylercurtis TimToady: thanks.
17:03 * tylercurtis fixes.
17:03 TimToady bbkr: I don't think that's going to be a major problem
17:07 TimToady normal ranges also allow negative numbers and non-numerics, and we don't allow those here either
17:08 TimToady it's much more likely for a p5 programmer to try to leave out the right side of .. entirely in this case
17:08 TimToady std: /x ** 1../
17:08 p6eval std 32088: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed range at /tmp/jJajhI08ZT line 1:␤------> [32m/x ** 1..[33m⏏[31m/[0m␤    expecting quantifier␤Parse failed␤FAILED 00:01 117m␤»
17:09 * tylercurtis suspects that, for now at least, Rakudo's error messages are much more relevant for (new) P5 converts.
17:09 moritz_ tylercurtis: yes, but rakudo gets its parse error messages from STD
17:12 thebird left #perl6
17:13 pmurias left #perl6
17:13 bbkr TimToady: I'm just saying that "expecting quantifier" part of this error message is not helpful at all because there are some "hidden" limitations about this quantifier (positive Int or *). But I assume not muany implementations will use directly STD errors, so maybe you're right that it won't be major problem
17:14 * bbkr is back to bughunting
17:15 pmurias joined #perl6
17:16 TimToady I just don't want the grammar to end up ten times larger to catch marginal mistakes that almost anyone can figure out rapidly; there has to be some balance between that and an error message that just says '?'
17:17 ingy hi TimToady. Got a sec?
17:17 moritz_ and the error message does indicate the position pretty well
17:17 TimToady had one, but it expired 17 seconds ago...
17:17 moritz_ rakudo: / ; /
17:17 p6eval rakudo b958a1: OUTPUT«===SORRY!===␤Confused at line 22, near "/ ; /"␤»
17:17 TimToady std: / ; /
17:17 p6eval std 32088: OUTPUT«[31m===[0mSORRY![31m===[0m␤Semicolon must be quoted at /tmp/BkGopLO1bQ line 1:␤------> [32m/ ;[33m⏏[31m /[0m␤Parse failed␤FAILED 00:01 115m␤»
17:18 moritz_ std: / - /
17:18 p6eval std 32088: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/AnzpibclQL line 1:␤------> [32m/ -[33m⏏[31m /[0m␤Can't call method "from" on unblessed reference at STD.pm line 53782.␤FAILED 00:01 115m␤»
17:18 ingy I need a word/term... general term for a piece of data like a string or num
17:18 TimToady oopsie
17:18 moritz_ ingy: "atom"?
17:18 TimToady scalar? item?
17:18 TimToady datum?
17:18 ingy "object" feels correct but too overloaded
17:18 TimToady thingie?
17:19 ingy the value could be a list
17:19 TimToady Moo
17:19 moritz_ "value"?
17:19 ingy value and object are two
17:19 ingy except $value->value feels yucky
17:19 bbkr "item"
17:20 PerlJam bbkr: I don't think the limitations will be hidden if everywhere we talk about ranges in regexp, we use normal ranges as an analogue rather than begin the same.
17:20 PerlJam s/begin/being/
17:20 ingy the thingy has type and value properties
17:20 ingy variable seems wrong
17:20 moritz_ "instance"?
17:20 tylercurtis Thing?
17:21 PerlJam ingy: "object"  :)  Just because it's too overloaded in general doesn't mean it can't work.
17:21 ingy thing is too wishy washy
17:21 x3nU case insensitive regex is still unimplemented?
17:21 moritz_ x3nU: no
17:21 tylercurtis rakudo: say 'AbC' ~~ /:i abc/
17:21 p6eval rakudo b958a1: OUTPUT«AbC␤»
17:22 ingy I am on PerlJam's camp, but thought I'd ask here
17:22 moritz_ rakudo: say 'AbC' ~~ m:i/abc/
17:22 p6eval rakudo b958a1: OUTPUT«AbC␤»
17:22 x3nU wow
17:22 moritz_ now with modifiers on the outside
17:22 bbkr ingy: maybe "chunk" ?
17:22 tylercurtis Noun.
17:22 ingy I like wow ;)
17:22 rhr_ left #perl6
17:22 ingy x3nU++
17:23 ingy datum
17:23 TimToady dat
17:23 snearch left #perl6
17:24 ingy nice
17:24 ingy TimToady++ for inventing new words
17:25 ingy but I think I want a common one
17:25 BlueT_ joined #perl6
17:25 ingy more acmeist
17:25 ingy acmeism is inclusive of boring languages
17:25 envi^home left #perl6
17:25 ingy :P
17:25 tylercurtis http://thesaurus.com/browse/thi​ng?r=76&amp;src=ref&amp;ch=the
17:26 ingy tylercurtis: I been surfing too :)
17:28 ingy portion
17:28 * sjn wonders where to find documentation for the batch method
17:29 rhr joined #perl6
17:30 colomon sjn: don't know if it exists yet.
17:30 sjn S07 mentions itr
17:30 colomon and come to think of it, I don't think it's supposed to exist at all any more -- the batch method, I mean, not the documentation
17:30 sjn oh?
17:31 TimToady S07 is quite out of date
17:31 colomon I believe it's been replaced (more or less) by munch.
17:31 colomon which probably also isn't documented.
17:32 colomon that area of the spec and implementation has been under heavy construction recently.
17:33 sjn colomon: so you'd write (1,2,4...*).munch(10) ?
17:33 colomon any objections to my removing batch from the spectests (it's only in two tests at the moment) and Rakudo?
17:33 colomon sjn: yes
17:33 sjn ok
17:33 sjn why the name change?
17:33 colomon star: say (1,2,4...*).munch(10)
17:33 p6eval star 2010.07: OUTPUT«1248163264128256512␤»
17:33 colomon star: say (1,2,4...*).munch(10).perl
17:34 p6eval star 2010.07: OUTPUT«(1, 2, 4, 8, 16, 32, 64, 128, 256, 512)␤»
17:34 pmurias left #perl6
17:34 colomon It behaves by taking the first N items off of the list (like using shift N times in a row), so munch was considered more accurate than batch, because it conveys the notion that the items are now gone from the list.
17:35 sjn right
17:35 sjn why not just call it first?
17:36 TimToady first does something else
17:36 colomon again, first doesn't convey the notion that the elements are gone from the list
17:36 sjn ah
17:36 sjn right
17:37 colomon star: my $a := (1, 2, 4 ... *); say $a.munch(3).perl; say $a.munch(3).perl
17:37 sjn and .shift(10) would be kinda odd
17:37 p6eval star 2010.07: OUTPUT«(1, 2, 4)␤(8, 16, 32)␤»
17:37 colomon I think shift(10) has been seriously considered, but people felt it was better to have a separate method name for now.
17:38 TimToady .munch might default to .munch(*), which would let the list decide how big to make the batch
17:39 risou left #perl6
17:39 sjn fwiw, I like term reuse, when possible :)
17:39 TimToady shift was also felt to be more specific to arrays than to lists
17:40 TimToady we're trying to keep the APIs somewhat distinct
17:40 sjn hm.
17:45 bbkr rakudo: %() # Parrot VM: PANIC: Out of mem!
17:45 p6eval rakudo b958a1:  ( no output )
17:45 bbkr hmm
17:45 bbkr does it go OOM locally for you on Pisa build?
17:46 sjn shift and munch(1) are the same type of actions, but still different...
17:47 sjn is it possible to have lists that begin with * ?
17:47 sjn (or Inf)
17:47 justatheory left #perl6
17:48 moritz_ sure
17:48 moritz_ rakudo: say (Inf, 1, 2, Inf).perl
17:48 p6eval rakudo b958a1: OUTPUT«(Inf, 1, 2, Inf)␤»
17:48 TimToady you're confusing lists with ranges
17:48 sjn e.g. (*...*+*,1,1)
17:49 moritz_ arithmetics with Inf is pretty boring
17:49 moritz_ Inf +-*/ finite number == +- Inf
17:49 moritz_ all other operations are either +-Inf or NaN
17:50 bbkr rakudo: %(); say "alive";
17:50 p6eval rakudo b958a1:  ( no output )
17:50 * bbkr reports
17:51 sjn right, so munch() works on lists _and_ ranges, but not arrays
17:52 TimToady rakudo: say (* R... 1,1,*+*).munch(10).perl
17:52 p6eval rakudo b958a1: OUTPUT«(1, 1, 2, 3, 5, 8, 13, 21, 34, 55)␤»
17:53 moritz_ scary.
17:54 sjn rakudo: (1..*).munch(4).perl.say
17:54 p6eval rakudo b958a1: OUTPUT«Method 'munch' not found for invocant of class 'Range'␤  in main program body at line 22:/tmp/PsFUmJmtTg␤»
17:54 sjn right
17:54 * sjn is even more confused
17:55 sjn maybe I should play with something safer :-P
17:55 moritz_ .[^10] is pretty safe
17:55 sjn rakudo: (1..*)[^4].perl.say
17:55 moritz_ rakudo: say (1..*).[^10].join(', ')
17:55 p6eval rakudo b958a1: OUTPUT«(1, 2, 3, 4)␤»
17:55 p6eval rakudo b958a1: OUTPUT«1, 2, 3, 4, 5, 6, 7, 8, 9, 10␤»
17:56 * sjn likes the munch() thing mostly because of the possibilities for making Edvard Munch jokes :)
17:57 moritz_ rakudo: say %(a => 1, b => 2).perl
17:57 p6eval rakudo b958a1:  ( no output )
17:58 tylercurtis left #perl6
17:59 sjn on the down side, I'm getting a bit worried about the keyword inflation in Perl6 :-(
17:59 TimToady left #perl6
18:00 moritz_ .munch is not a keyword
18:00 sjn well
18:00 sjn ok, "term inflation"?
18:00 moritz_ "method inflation"?
18:01 dalek rakudo: 689bb75 | moritz++ | src/builtins/Parcel.pir:
18:01 dalek rakudo: fix %() segfault. Patch courtesy of TiMBuS++
18:01 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​89bb75f29b004c28c934380676c2c22fb7e195e
18:01 sjn "concept inflation"
18:02 sjn or as we n00bs like to call it, "ETOOMUCHTOLEARN"
18:03 moritz_ I kinda share your concerns
18:03 moritz_ OTOH you don't need to learn them all
18:04 * sjn proposed to jnthn to give a talk in Oslo about "patterns" in Perl6 (where that term means "concepts that are common all over perl 6, that you can put together to create really cool tings")
18:04 sjn multimethods is one such thing
18:05 sjn another is metaoperators
18:05 moritz_ that's actually a nice idea
18:05 sjn I'm sure there are others</perl6 n00b>
18:06 sjn my problem with that thought, plus the munch/shift thing, is that they don't really go together
18:06 araujo left #perl6
18:06 pugssvn r32089 | moritz++ | [t/spec] tests for %() hash context forcer; also tests RT #75502
18:07 sjn in my brane at least - munch and shift are so similar, it seems weird they're named differently
18:07 araujo joined #perl6
18:08 sjn the concept is really "take n items of the beginning of this sequence", right?
18:08 sjn where shift just takes 1, and munch takes any
18:08 sjn but they do it differently according to what kind of sequence they operate on
18:10 sjn (at which point, my thoughts go "this smells awefully multimethod-like")
18:13 macroron joined #perl6
18:14 macroron left #perl6
18:14 macroron joined #perl6
18:16 pugssvn r32090 | moritz++ | [t/spec] get rid of wrong plan
18:17 cotto_work joined #perl6
18:17 plainhao joined #perl6
18:20 am0c^ joined #perl6
18:25 jakk_ joined #perl6
18:25 rlb3 joined #perl6
18:26 moritz_ std: / - /
18:26 p6eval std 32088: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/iBU9UZsd8y line 1:␤------> [32m/ -[33m⏏[31m /[0m␤Can't call method "from" on unblessed reference at STD.pm line 53782.␤FAILED 00:01 115m␤»
18:26 moritz_ rakudo: / - /
18:26 p6eval rakudo b958a1: OUTPUT«===SORRY!===␤Confused at line 22, near "/ - /"␤»
18:26 jakk_ left #perl6
18:27 moritz_ nqp: / - /
18:27 p6eval nqp: OUTPUT«Confused at line 1, near "/ - /"␤current instr.: 'parrot;HLL;Grammar;panic' pc 552 (src/cheats/hll-compiler.pir:205)␤»
18:27 Phiend joined #perl6
18:28 alanhaggai joined #perl6
18:28 Phiend hello, I have a simple question on roles : I know it is possible to add a role to an object or class, but I never hear of the role being removed.  Possible/how ?
18:29 PerlJam Phiend: sounds painful
18:29 * Phiend laughs
18:29 moritz_ Phiend: don't think it's supported
18:29 Phiend if not, that would be kinda a glaring design issue.
18:30 moritz_ removing a role screams for trouble
18:30 Phiend well, it is reasonable.   happens all the time in real life, for example.  an it would be orthogonal behavior, darn it :)
18:31 tylercurtis joined #perl6
18:32 moritz_ phenny: tell mberends if you replace 'plan *;' with a specific number, please spectest before committing
18:32 phenny moritz_: I'll pass that on when mberends is around.
18:33 colomon Phiend: would you expect every existing object of that class to be modified to lose the attributes and methods from that role?
18:34 pugssvn r32091 | moritz++ | [t/spec] remove a wrong plan; avoid STDOUT output that confuses TAP
18:34 moritz_ std: $
18:34 p6eval std 32090: OUTPUT«[31m===[0mSORRY![31m===[0m␤Non-declarative sigil is missing its name at /tmp/GlPSJbdGbL line 1:␤------> [32m<BOL>[33m⏏[31m$[0m␤Bogus statement at /tmp/GlPSJbdGbL line 1:␤------> [32m$[33m⏏[31m<EOL>[0m␤    expecting twigil␤Parse failed␤FAILED 00:03 116m␤»
18:34 moritz_ std: @
18:34 p6eval std 32090: OUTPUT«[31m===[0mSORRY![31m===[0m␤Non-declarative sigil is missing its name at /tmp/vckluP58Zp line 1:␤------> [32m<BOL>[33m⏏[31m@[0m␤Bogus statement at /tmp/vckluP58Zp line 1:␤------> [32m@[33m⏏[31m<EOL>[0m␤    expecting twigil␤Parse failed␤FAILED 00:03 116m␤»
18:34 jdv79 wrong chan - sorry
18:35 Phiend colomon: for truly dynamic roles, yes.
18:36 pugssvn r32092 | moritz++ | run more tests
18:36 chromatic joined #perl6
18:36 chromatic Allowing role removal would violate the type system.
18:37 colomon chromatic++
18:37 Phiend perhaps it is a design issue, then
18:37 moritz_ aye; it would make every operation unsafe
18:37 gfldex what does not mean that you can't implement a prototype based object system with perl 6
18:37 chromatic You're welcome to write a custom MOP which allows that, but you get to respond to bug reports when that happens.
18:37 * Phiend chuckles
18:39 moritz_ it sounds comparably safe to allow ripping out integers from a language
18:39 moritz_ or any other built-in types
18:39 chromatic Now I can imagine that it's useful to pretend that an entity does not perform a role in certain cases, but I expect it's more useful to override the DOES() equivalent, whatever that's called in Perl 6 today.  (Haven't tried lately; don't remember.)
18:40 moritz_ well, method does() in the metaclass
18:40 chromatic $entity.^does() ?
18:40 Phiend from a design standpoint, it makes sense though that some roles be removable.  For instance if you were writing code that modelled admin privileges, you would want to be able to revoke those privileges.  In the real world, this often happens with 'roles' - once a cop, not always a cop for instance.  It is fine if you want to keep perl6 simple, however I would assume roles would be able to
18:40 Phiend reflect transient behavior occasionally.
18:41 chromatic That's really not a role as much as it is instance data.
18:41 moritz_ Phiend: just because something is called a "role" doesn't mean you have to implement it with actual rules
18:41 moritz_ s/rules/roles/
18:41 colomon "perl6 simple" !!!!!!!!!!!!!!!
18:41 sorear left #perl6
18:41 moritz_ in fact it's probably a pretty bad idea
18:41 rlb3 left #perl6
18:41 Phiend yes, maybe roles shouldn't actually be roles ?
18:41 moritz_ because you'd have to generate code for each roles
18:42 Phiend well, maybe this is something to think on for a future version of p6.  maybe it is a bad idea, but then maybe not.
18:43 chromatic It's a very bad idea to allow decomposition of roles from classes.
18:43 chromatic That said, if you implement your admin system in terms of runtime decoration of instances with roles, you could make that work.
18:43 Phiend but doing so would make it orthogonal.    mmmmmmmm...orthogonal.
18:43 chromatic Orthogonal is useless if the system doesn't work.
18:44 Phiend chrome, you mean runtime subtraction of roles is possible ?
18:44 colomon you keep saying "orthogonal", but what I keep hearing is "insane"
18:44 Phiend I get that a lot :)
18:44 chromatic Runtime manipulation of the class of an object is (in theory) possible.
18:44 moritz_ you could just have a "reset" role that just overrides the privilege methods that the other roles might have mixed in
18:44 Phiend well, how many calculators have you seen with '+' but no '-' ?
18:45 Phiend m: yes, but why would you need to do that hack in a well-designed language ?
18:45 tylercurtis Peano arithmetic.
18:45 chromatic How many calculators have you seen where you can say 10.02 looks like a rational number, but it's an integer.  I promise.
18:46 * tylercurtis always had fixed point calculators, as far as he could tell.
18:46 gfldex Phiend: if the Perl 6 role would not have been called role, would you still want it to be removeable?
18:46 moritz_ Phiend: why would you not need that in a well-designed language?
18:46 colomon Phiend: what exactly do you think the opposite of removing a role at run time?
18:46 Phiend what would we call it then : a biscuit ?
18:46 moritz_ a trait
18:47 chromatic an aspect
18:47 moritz_ a mixin
18:47 moritz_ an interface
18:47 moritz_ whatever
18:47 Phiend I think the name role is good enough.
18:47 chromatic I hope not a mixin or an interface.
18:47 tylercurtis A class.
18:47 Phiend an interface, not quite.
18:47 chromatic a partial class
18:48 Phiend gfldex: no matter what you call it, my answer is yes.
18:49 chromatic Okay, so when you decompose a role out of a class at runtime, do you run the constraint solver?
18:49 chromatic Do you reoptimize all of the code that could possible use that class?
18:49 Phiend I don't know - not a design expert.
18:49 chromatic Do you modify all of the instances of that class?
18:49 moritz_ Phiend: what do you think should happen if you remove the Numeric role from Int at runtime, and then somebody calls 3.sin?
18:49 chromatic What if they have user data that goes away, because those are attributes of the role?
18:49 chromatic Do you save them?
18:49 chromatic Do you discard them?
18:49 Phiend kaboom!
18:49 moritz_ right
18:50 gfldex do you remove all methods that come from classes that use attributes that come from a role?
18:50 chromatic What if it's a parametric role>
18:50 Phiend I didnot say every role should have this ability, but you should be able to, if it makes sense.
18:50 moritz_ ok
18:50 chromatic It never makes sense.
18:50 moritz_ that#'s a good idea
18:50 Phiend how this is done is left up to those crazy enough to go for it.
18:50 moritz_ as long as it's only allowed on the empty set of roles
18:51 gfldex :->
18:51 Phiend chrome:  sure it does.  You have a role as a licensed driver.  If you should do a few illegal DUI operations, you could lose that role
18:51 chromatic That's instance data.
18:51 chromatic That's not a role.
18:51 Phiend roles can be granted on instance objects, no ?
18:52 chromatic Sure.
18:52 gfldex the name role put an idea into your head that works very well with the reality you live in, but quite bad with programming languages
18:53 moritz_ and I must admit that some of us gave examples likes this, which might not be the best OO design
18:53 gfldex well, it does work quite well with javascript. But you trade languages niceness with speed and unpredictable runtime behaviour
18:53 Phiend I remain unconvinced; it would seem natural for a language that seeks to go along with how you think to actually do it.
18:53 Phiend gfldex: it does ?
18:53 colomon I dunno, I'm not seeing any obvious reason why removing a role *from an instance object* would necessarily be a terrible thing, though it would probably be a pain to implement cleanly.
18:54 gfldex at lest for mozilla you can fool around with the prototype chain
18:54 moritz_ Phiend: it's ok. You can drop a topic even if you're not convinced that your idea is bad :-)
18:54 sorear joined #perl6
18:54 chromatic Why would you decompose the LicensedDriver role from the Driver class when one instance of the Driver loses his license?
18:54 Phiend mor:  I take that as an insult, sir
18:54 moritz_ Phiend: you shouldn't
18:54 colomon it's generalizing that to removing a role from an entire class that's completely insane.
18:54 Phiend chrome: you would not - you would decompose the instance/object, obviously.
18:55 Phiend I didn't even suggest that...although now that I think about it...
18:55 moritz_ colomon: it's interface sanity. sin(5 bot not Numeric) # BOOOM
18:55 chromatic Runtime application and deapplication of roles from instances makes sense.
18:55 Phiend I think so :)
18:55 moritz_ if you're unlucky, such cases blow up in your own code
18:55 chromatic Runtime decomposition of roles from classes does not.  You cannot do it safely in any but the most trivial circumstances.
18:56 colomon moritz_: yeah, but you can always do stuff that blows up code.
18:56 moritz_ and people will write bug reports because your code blows up, even though it's not your problem
18:56 Phiend <nods>
18:56 moritz_ colomon: if you have good type constraints and precondtions, you can avoid that
18:56 colomon I mean, why shouldn't you be able to say my $a = 5 but not Numeric?
18:56 colomon yes, that would mean Numeric functions wouldn't work on it.
18:57 moritz_ because code all around assumes that Int ~~ Numeric
18:57 moritz_ and if you have instances where that's not true, your type system is screwed
18:57 gfldex role foo { has $.a; }; class bar does foo { method bumm () { say $.a; } } }; my $o1 = bar.new(); remove role foo from bar; $o1.bumm(); # what would happen?
18:57 masak joined #perl6
18:57 colomon moritz_: on an instance -- ie, this particular $a -- not on every Int.
18:57 masak ahoy, #perl6!
18:57 phenny masak: 01:07Z <TimToady> tell masak yes, checking scope constraints on FIRST is in my todo file
18:57 moritz_ colomon: code we have depends on 1 ~~ Numeric
18:57 masak no rush.
18:58 Phiend it should throw a runtime exception, I would expect.
18:58 gfldex :->
18:58 colomon moritz_: 1 is not an instance of an object, it's a literal.
18:58 moritz_ Phiend: and disable all optimizations that are based on nominal types?
18:58 Phiend m: I dunno !
18:58 moritz_ well, that would be a consequence
18:59 moritz_ masak: but is it FIRST on the todo list? :-)
18:59 Phiend I'm not saying that decomposition on every role is the right thing - I would think not.  Once an int, always a filthy int.
18:59 chromatic That's what we're saying.  You can't decompose roles from classes at runtime.
18:59 Phiend true dat
19:00 chromatic The system does not have sufficient information to do so, even if it were safe.
19:00 Phiend but I think such an operation on instances does make sense, in some situations.
19:00 chromatic Sure; no one's disputing that.
19:00 moritz_ well, I do
19:00 Phiend ok, we are then in agreement.
19:00 Phiend except for moritz.
19:00 chromatic Sure; no good-hearted person could possibly dispute that!
19:00 moritz_ :-)
19:00 Phiend much is explained :)
19:01 Phiend well, thats all I desired !
19:01 chromatic There are probably better ways to accomplish most goals (in your Driver case, a subset type) but it's a possible operation.
19:01 TimToady joined #perl6
19:01 jnthn chromatic is right - you *lose* information when you compose roles into a class. When you compose roles into an instance, it actually creates an anonymous subclass and puts the role into that. So in that case you could re-bless to the superclass, I guess.
19:01 Phiend how would you code that then ?
19:01 masak moritz_: maybe it's NEXT on the todo list :P
19:02 chromatic You *lose* that information on purpose, as a design goal of roles.
19:02 mberends joined #perl6
19:02 jnthn chromatic: Right. :-)
19:02 Phiend thats part of what makes roles great
19:02 Phiend it increases the KISS-itude
19:03 jnthn I've mostly tended to think of roles as re-usable bits of functionality that you use to build stuff, rather than pluggable things to add and remove.
19:03 chromatic Phiend, something like subset LicensedDriver of Driver where *.points < 3 && age > 17;
19:03 Phiend interesting...although it is a hack methinks.
19:03 chromatic How so?  It's a parametric type, like you might find in ML.
19:04 jnthn chromatic: I'd tended to see them as refinement types rather than parametric types.
19:04 * TimToady imagines running some subset of DESTROY submethods if you rebless yourself to a parent class
19:04 Phiend well, I think so because I don't know subsets so good, and when I think of removing roles, I want to say stuff like 'bob isnt aLicensedDriver' - I'm a lazy coder ;)
19:04 jnthn TimToady: I wasn't offering to implement it, just saying its possible. :P
19:05 jnthn TimToady: Though yes, running the DESTROYs could make sense.
19:05 TimToady I've been wanting to talk about mixins for the last 1/2 hour, but appflux was unusable
19:05 chromatic You don't have to write code to specify *how* to make Bob an unlicensed driver.  You can write declarative code to specify the rules as to why Bob has just become an unlicensed driver.
19:05 TimToady took you guys about 20 minutes to get there...
19:05 Phiend knock yourself out, TT !
19:05 chromatic You can ignore the mechanism and describe the policy.
19:06 TimToady yes and no
19:06 TimToady a language designer must simultaneously know everything and nothing
19:07 chromatic You need a Leelu wig.
19:07 PerlJam If you already know nothing, how do you get to know everything?  :)
19:07 moritz_ that's the problem.
19:07 rokoteko PerlJam: ?
19:07 TimToady the basic problem is that performance and exceptions leak through every abstraction
19:08 Phiend chrome: but what if the decomposition is a decision made at runtime, ad hoc ?
19:08 PerlJam and knowing things (or no things) isn't enough either, you have to *decide* which is important.  And *that's* the hard part if you ask me.
19:08 rokoteko You must be humble enough to understand you know nothing, as I see it. So basically he willingness always to learn something new. :) Not saying "I know everything, Im not interested.." But OTOH, Im not a language designed. :)
19:09 Phiend ya gotta have Vision.  Unlike Microsoft.
19:09 * TimToady is now contemplating a form of mixin that is really delegation
19:09 chromatic If you have subset types (whether you call them parametric or refinement), than any type dispatcher can destructure to examine specific attribute values.
19:09 tylercurtis left #perl6
19:10 chromatic That's a runtime decision, but a fair amount of type-based dispatch can be runtime dispatch anyway.
19:10 PerlJam TimToady: temporized?
19:10 TimToady no
19:10 TimToady if you mixin a role, and you make not only an anon class but a new object that delegates to the parent object
19:11 TimToady then you can just switch back to the parent, and the child will be GC'd
19:12 TimToady the main problem with that is identity
19:12 moritz_ rakudo: / | /
19:13 p6eval rakudo 689bb7:  ( no output )
19:13 moritz_ rakudo: / | /; say "alive"
19:13 p6eval rakudo 689bb7: OUTPUT«alive␤»
19:13 chromatic What does that offer over swapping to the anon class?
19:13 TimToady so you want the delegating child to pretend to have the same identity as its parent
19:13 TimToady automatic GC
19:13 jnthn TimToady: I'd hope that we have enough flexibility in the meta-model for that to be done in a module.
19:13 moritz_ std: / | /
19:13 p6eval std 32092: OUTPUT«[31m===[0mSORRY![31m===[0m␤Null pattern not allowed at /tmp/seCzwubd7Z line 1:␤------> [32m/ | [33m⏏[31m/[0m␤    expecting quantifier␤Parse failed␤FAILED 00:01 115m␤»
19:13 TimToady when you unmixin
19:13 TimToady jnthn: sure, I'm just speculatin'
19:14 jnthn TimToady: Oh, I'm not saying it's a bad idea. :-)
19:14 chromatic Suppose the anon class remembers its parent (because it has to).
19:15 TimToady just sayin' that making it two different objects makes it really clear which memory belongs to each
19:16 jnthn Aye.
19:16 chromatic True.  You don't have to morph.
19:16 TimToady morphing is also possible, of course
19:16 jferrero joined #perl6
19:16 jnthn Wrapping existing stuff rather than mutating it always makes it easy to "go back".
19:16 gfldex i'm trying to find a real world example where somebody is revoked a role and you dont want to keep any record that he/she ever had this role. I can't find any. On top of that drivers licenses are a really bad example here.
19:16 TimToady but I don't think calling the appropriate DESTROYs would do it completely
19:16 TimToady unless you can GC within an object's storage :)
19:17 Phiend would a Power Rangers example help ?
19:17 chromatic DESTROY on morph is a hard problem.  Trust me.
19:17 TimToady and that's likely to depend on the repr
19:17 jnthn TimToady: Yeah, that's the other thing that bothers me about re-blessing to a superclass.
19:17 TimToady we're only discussing morph to a parent class here
19:17 jnthn Yes, immediate parent makes it less bad.
19:17 chromatic If all of these anon classes are singletons though, instance storage and class storage could be the same thing.
19:17 TimToady so calling the right DESTROY is just a smop, but reclaiming memory is a different issue
19:18 jnthn But it'd still need the repr to co-operate I guess.
19:18 chromatic Identity seems like the least worst problem to solve.
19:18 TimToady one wonders if the mixed object can serve as its own class
19:19 TimToady the inside-out way of repeating what chromatic said
19:19 chromatic Yes, but then wouldn't $mixed.^does( 'Class' ) be true suddenly?
19:19 jnthn TimToady: It may want to wrap the meta-object too.
19:19 TimToady huh?  we don't have Class in that sense in Perl 6
19:20 jnthn It took me a while longer to realize that http://www2.parc.com/csl/groups/sda/publi​cations/papers/Chiba-ISOTAS96/for-web.pdf is basically a lot of words for "let's do delegation" :-)
19:20 TimToady I guess the problem is that :U would be false
19:20 jnthn *while longer than it should have done
19:21 jnthn TimToady: When you say "serve as its own class" I'm not sure what meaning of class you're meaning. :-)
19:21 TimToady me too :)
19:21 moritz_ std: / \p /
19:21 jnthn ;-)
19:21 p6eval std 32092: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unrecognized regex backslash sequence at /tmp/lZEfIRsa8p line 1:␤------> [32m/ \[33m⏏[31mp /[0m␤Check failed␤FAILED 00:03 116m␤»
19:22 TimToady that should probably be a .obs()
19:22 moritz_ ie "Obsolete use of..." ?
19:22 sorear good * #perl6
19:22 jnthn o/ sorear
19:23 moritz_ \o
19:23 moritz_ rakudo: /\p/
19:23 p6eval rakudo 689bb7: OUTPUT«===SORRY!===␤Confused at line 22, near "/\\p/"␤»
19:23 masak o/ sorear
19:23 jnthn masak! \o/
19:23 * jnthn didn't see masak sneak in :-)
19:23 masak jnthn: only half here... :)
19:24 jnthn Ah
19:24 jnthn Clearly just your invizible half. :-)
19:24 TimToady the problem is we should really parse the argument to \p as well, and you example wouldn't trigger that
19:25 * Alias waves
19:25 masak Alias! \o/
19:25 * moritz_ particles
19:25 Alias I'm heading off to TechEd today for the sekrit Microsoft Open Source track
19:25 Alias Anyone got anything they want me to talk to MS about
19:26 Phiend Visual COBOL
19:26 chromatic Not DDOSsing CPAN Testers.
19:26 Alias :)
19:26 PerlJam Alias: providing resources for Perl 6 development.
19:26 Alias PerlJam: What kind
19:26 Phiend yeah: $$$$$$$$$$$$, preferrably in gold.
19:26 PerlJam Alias: whatever jnthn needs :)
19:26 chromatic Build servers for Parrot and Rakudo would be lovely.
19:27 PerlJam Alias: what chromatic said
19:27 jnthn PerlJam: We can get Microsoft to give me beer? ;-)
19:27 Alias chromatic: I'll add that to the list for the testing lab 2.0
19:27 chromatic Thank you.
19:27 Phiend don't they  have a micro-brewery ?  <ducks>
19:27 jnthn lol :-D
19:27 PerlJam Alias++
19:27 jnthn Phiend: Trouble is it only makes soft drinks...
19:27 pnate left #perl6
19:28 Alias jnthn: Anything you want? MSDN license? (I have one spare)
19:28 * Phiend bites his tongue...
19:28 jnthn Alias: I have a lot of Microsoft stuff already 'cus I do .Net dev in my $other-job.
19:29 PerlJam jnthn: couldn't you use a really nice machine for dev work?
19:29 PerlJam :)
19:29 jnthn ;-)
19:29 Alias Not entirely sure I can get hardware out of them
19:29 Phiend that would be cute - ask them for MacBooks
19:29 jnthn Alias: I don't know how much interest they have in knowing that folks are looking at Perl 6 on .Net (multiple, in fact).
19:30 moritz_ rakudo: /<[\]]>/
19:30 p6eval rakudo 689bb7:  ( no output )
19:30 Alias jnthn: I've got a 20 minute talk tomorrow
19:30 jnthn Alias: It may be worth mentioning that there are such efforts afoot. They can't take an interest if they don't know about them. :-)
19:30 Alias I'll include it
19:30 PerlJam Does microsoft have any real interest in perl these days?
19:31 Phiend well, this is a new record for me - I never been on here this long without being kicked...
19:31 Phiend PerlJam: that is a GOOD question !
19:31 Phiend They've got IronRuby and IronPython.... but missing some perl loving.
19:31 PerlJam Phiend: well, the important part would be, if they do ... for what?
19:32 Phiend Yes.
19:32 Alias PerlJam: They care about InterOp in general
19:32 Phiend they do ???
19:32 rokoteko PerlJam: I dunno. I think perl people should have interested on making it work on windows systems.
19:32 Phiend pardon my skepticism.
19:33 Phiend I think it is good for Perl, and actually good for Microsoft, although I fear they don't have the wisdom to see it that way.
19:33 rokoteko PerlJam: it's anyways the most popular platform. That's just a sad fact. :/
19:33 Alias Phiend: The more code works on Windows, the more code gets run on Windows, the more licenses people will buy
19:33 Phiend true dat.
19:34 Phiend well, roko. things are changing.  laptops are rising, and OS X is getting bigger.
19:34 Alias Plus, I'm sure there's a soft spot for Perl in MS
19:34 Tene There's a perception I've sen before that the more open-source code windows-using people run, the easier they can migrate away from MS.
19:34 * Phiend MUHAHAHAHAHA
19:34 Alias They built Windows using Perl for years and years
19:34 Phiend Tene: yes, but lets not mention that.
19:35 moritz_ rakudo: /a[b}/
19:35 p6eval rakudo 689bb7: OUTPUT«===SORRY!===␤Confused at line 22, near "/a[b}/"␤»
19:35 Phiend yes, in the past Microsoft has been good to Perl. Even though part of the reason I got uninstalled at my last job was that it was a "Microsoft shop", which made perl unpopular.
19:35 moritz_ std: /a[b}/
19:35 p6eval std 32092: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse bracketed regex at /tmp/cYo4scQBFP line 1:␤------> [32m/a[33m⏏[31m[b}/[0m␤Couldn't find final ']'; gave up at /tmp/cYo4scQBFP line 1:␤------> [32m/a[b[33m⏏[31m}/[0m␤    expecting any of:␤   metachar␤       quantifier␤
19:35 p6eval ..regex atom␤Parse …
19:36 PerlJam "uninstalled"? That's an interesting metaphor.
19:36 Alias Phiend: I'm hoping that Strawberry Professional will help with that. Make's Perl look more like a "normal" Windows language
19:36 Phiend why do that to Perl though ?
19:36 molaf left #perl6
19:36 Phiend or is this a visual studio add in ?
19:36 Alias So it will suck less?
19:36 Alias It's a Visual Studio equivalent
19:36 Phiend Perl doesn't suck.  windows does.
19:36 Alias Plus no command line
19:36 Phiend well, it sounds good.
19:36 Alias Unless you want it
19:36 Phiend command line : old farts love it.
19:37 Phiend however you get perl in there, is good.  We must infiltrate, integrate and destroy !
19:38 Phiend hopefully at some point during all that, there will be beer involved.
19:38 moritz_ phenny: ask pmichaud it seems that the p6regex tests in nqp-rx assumes that nqp-rx should support the :x($count) modifier -- is that sitll a valid assumption?
19:38 phenny moritz_: I'll pass that on when pmichaud is around.
19:39 Phiend well, I've exceeded my luck quotient for today; everybody weng chung !
19:39 chromatic left #perl6
19:39 Phiend left #perl6
19:42 amkrankruleuen left #perl6
19:43 dalek nqp-rx: 705f966 | moritz++ | t/p6regex/ (8 files):
19:43 dalek nqp-rx: [p6regex-test] fudge it to be clean; fix a few tests along the way
19:43 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/7​05f9664a49786a521bf6653499afffd4ddf0adc
19:47 masak left #perl6
19:55 dalek nqp-rx: dfbe437 | moritz++ | build/Makefile.in:
19:55 dalek nqp-rx: include p6regex-test in "test" target
19:55 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/d​fbe437e25d9d20f79ab32c2d202e4531ac38701
19:58 tylerni7 left #perl6
20:02 timbunce left #perl6
20:03 Alias left #perl6
20:03 ingy re: the datum/object/thing naming discussion, I am settling on "value" for now. This is mainly due to the fact that they are always thought about in the context of things returned by functions.
20:03 ingy and everyone knows that a function returns a value.
20:03 ingy QED
20:04 ingy BBQ
20:04 ingy ETC
20:04 ingy FTW
20:04 PerlJam I  thought they returned PArcels
20:04 ingy meh
20:04 TimToady not are values are valuable
20:04 [Coke] not everything is a perl6.
20:05 ingy [Coke]: but perl6 is certainly a everything
20:07 x3nU how do i convert Match to Str?
20:07 ingy x3nU: tmtowtdi
20:07 moritz_ $/.Str
20:07 moritz_ or ~$/
20:07 TimToady or just use it as a string
20:07 timbunce joined #perl6
20:07 x3nU also imho it sucks that i must conver it
20:07 x3nU convert it*
20:08 moritz_ TimToady: rakudo currently requires a conversion to Str for hash keys
20:08 moritz_ because $/ ~~ Positional, so the .{}(Positional) multi is called
20:08 moritz_ which iterates over the argument
20:08 moritz_ and since $/ doesn't flatten, it recurses infinitely
20:09 jnthn Maybe we need a Match candidate...
20:09 jnthn (that knows to strinfigy it)
20:09 jnthn er, stringify
20:09 TimToady I guess the question is what will DWTM
20:10 jnthn It kinda feels like we're adding a (allbeit useful) special case there.
20:10 jnthn It makes me feel slightly dirty.
20:11 jnthn As if there should be a better way for this to work.
20:13 moritz_ rakudo: 'abc' ~~ /(.)(.)(.)/; my @a := $/; .say for @a;
20:13 p6eval rakudo 689bb7: OUTPUT«abc␤»
20:13 moritz_ is that right?
20:13 moritz_ I would kinda expect something @-sigiled to be flat
20:13 moritz_ rakudo: 'abc' ~~ /(.)(.)(.)/; my @a := $/.flat; .say for @a;
20:14 p6eval rakudo 689bb7: OUTPUT«a␤b␤c␤»
20:14 x3nU also, how do i convert str to uppercase? there is .tou but it don't work with Str
20:14 PerlJam rakudo: say "foo".uc
20:15 p6eval rakudo 689bb7: OUTPUT«FOO␤»
20:15 daxim left #perl6
20:15 PerlJam rakudo: say uc("foo")
20:15 p6eval rakudo 689bb7: OUTPUT«FOO␤»
20:16 x3nU lol, i don't know why i was thinking about tou
20:16 x3nU but thanks :)
20:20 pugssvn r32093 | lwall++ | [STD] handle \p redirection
20:20 Mowah joined #perl6
20:20 moritz_ rakudo: my @a := 1; say @a.perl
20:21 p6eval rakudo 689bb7: OUTPUT«1␤»
20:21 moritz_ rakudo: my @a := 1; say @a ~~ Positional
20:21 p6eval rakudo 689bb7: OUTPUT«0␤»
20:21 moritz_ rakudo: my Str $a := 1
20:21 p6eval rakudo 689bb7: OUTPUT«You cannot bind a variable of type Int() to a variable of type Str().␤  in 'infix:<:=>' at line 685:CORE.setting␤  in main program body at line 22:/tmp/22REpULr3l␤»
20:22 Helios- left #perl6
20:22 Helios joined #perl6
20:23 Helios left #perl6
20:23 jnthn moritz_: Some type of problem there...
20:24 moritz_ some type of problem ticketed there :-)
20:24 jnthn moritz_: I think we get away with it for assignment because list assignment means you can't fail to assign something positional.
20:24 Helios joined #perl6
20:25 moritz_ jnthn: is the problem that @a doesn't have a Positional type constraint?
20:26 jnthn Yeah, I think so.
20:28 mberends phenny, tell masak oha++'s Socket.pm and INET.pm patch in http://gist.github.com/543580 tests out OK on all the webservers unmodified in http://github.com/mberends/http-se​rver-simple/tree/master/examples/ so it looks good to commit it. This does not prove binary file I/O yet however, that requires some rewriting.
20:28 phenny mberends: I'll pass that on when masak is around.
20:28 phenny mberends: 18:32Z <moritz_> tell mberends if you replace 'plan *;' with a specific number, please spectest before committing
20:28 guidj0s_ joined #perl6
20:29 moritz_ phenny++
20:30 jnthn o/ mberends
20:30 mberends moritz_: I did spectest, that's what delayed the commits. Have I let some errors through? Sorry if that is the case.
20:30 moritz_ mberends: yes, two mis-plans; I fixed them, so no problem
20:30 mberends thanks moritz_++ :)
20:31 tylerni7 joined #perl6
20:32 kirillm left #perl6
20:33 moritz_ std: sub design-ice-cream-mixture(:$name!, $base = 'Vanilla') {
20:33 p6eval std 32093: OUTPUT«[31m===[0mSORRY![31m===[0m␤Can't put optional positional parameter after variadic parameters at /tmp/PCimRuuR2z line 1:␤------> [32mcream-mixture(:$name!, $base = 'Vanilla'[33m⏏[31m) {[0m␤Unable to parse block at /tmp/PCimRuuR2z line 1:␤------> [32meam-mixture(:$name!,
20:33 p6eval ..$ba…
20:33 mberends o/ jnthn: I'm going to have to apply a dependency injection circularity saw to the 6model java hierarchy. Still wondering where to cut...
20:33 moritz_ std: sub design-ice-cream-mixture(:$name!, $base = 'Vanilla') { }
20:33 p6eval std 32093: OUTPUT«[31m===[0mSORRY![31m===[0m␤Can't put optional positional parameter after variadic parameters at /tmp/hmxUfXl2CG line 1:␤------> [32mcream-mixture(:$name!, $base = 'Vanilla'[33m⏏[31m) { }[0m␤Potential difficulties:␤  $base is declared but not used at /tmp/hmxUfXl2CG line
20:33 p6eval ..1:␤…
20:33 moritz_ TimToady: that error message is mighty confusing
20:33 moritz_ :$name! doesn't look rather variadic to me
20:33 jnthn I think it's Just Wrong.
20:33 moritz_ std: sub design-ice-cream-mixture($base = 'Vanilla', :$name!) { }
20:34 jnthn Probably just bug somewhere.
20:34 p6eval std 32093: OUTPUT«Potential difficulties:␤  $base is declared but not used at /tmp/wR4NDCkoBN line 1:␤------> [32msub design-ice-cream-mixture([33m⏏[31m$base = 'Vanilla', :$name!) { }[0m␤ok 00:01 119m␤»
20:34 jnthn mberends: Oh, curious.
20:34 jnthn mberends: Why, ooc?
20:35 mberends jnthn: it's a long loop. SharedTable used to be at the end, now it's also at the beginning.
20:35 jnthn :S
20:36 mberends jnthn: via ThreadContext and Context
20:36 jnthn I'm curious why I didn't hit the problem in the .Net version.
20:36 PhatEddy joined #perl6
20:36 jnthn mberends: Is this some "can't have circular references between classes" thingy?
20:36 dalek book: 677ac11 | moritz++ | src/subs-n-sigs.pod:
20:36 dalek book: Fix order of named and positional parameters.
20:36 dalek book:
20:36 dalek book: Thanks to David H Adler and James E Keenan in RT #77220
20:36 dalek book: review: http://github.com/perl6/book/commit/67​7ac115b4c3ad094766390430573258b9a91e39
20:37 jnthn mberends: If so, I guess I just hadn't appreciated that Java had such a restriction.
20:37 mberends jnthn: yes, hence dependency injection as a solution.
20:37 jnthn Ah
20:37 jnthn That sucks.
20:37 jnthn .oO( Surprise! It's Java! )
20:38 mberends jnthn: nvm, first nom, then hacking
20:38 jnthn mberends: Oh well. At least you didn't offer to port it to VBScript... ;-)
20:38 moritz_ rakudo: sub a(:$a!, $b = 2) { }
20:38 slavik left #perl6
20:38 p6eval rakudo 689bb7: OUTPUT«===SORRY!===␤Can't put required parameter after variadic parameters at line 22, near ") { }"␤»
20:38 mberends jnthn: lol
20:38 jnthn moritz_: I blame STD! ;-)
20:38 PhatEddy rakudo: my $ = 2; say 'hello'
20:38 p6eval rakudo 689bb7: OUTPUT«hello␤»
20:38 timbunce_ joined #perl6
20:38 moritz_ jnthn: sure; I'll just retitle the ticket
20:38 PhatEddy std: my $ = 2; say 'hello'
20:38 timbunce left #perl6
20:38 p6eval std 32093: OUTPUT«ok 00:01 118m␤»
20:39 timbunce_ is now known as timbunce
20:39 jnthn moritz_: I'll probably be lazy and let STD fix it first. ;-)
20:39 pugssvn r32094 | colomon++ | [t/spec] Add some new series operator tests.
20:39 moritz_ wfm.
20:40 PhatEddy rakudo: my $ = 2; say $
20:40 * jnthn loves having blog stats
20:40 p6eval rakudo 689bb7: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "$"␤»
20:40 jnthn std: my $ = 2; say $
20:40 p6eval std 32093: OUTPUT«[31m===[0mSORRY![31m===[0m␤Non-declarative sigil is missing its name at /tmp/bl2JeNupzH line 1:␤------> [32mmy $ = 2; say [33m⏏[31m$[0m␤Confused at /tmp/bl2JeNupzH line 1:␤------> [32mmy $ = 2; say $[33m⏏[31m<EOL>[0m␤    expecting twigil␤Other potential difficulties:␤
20:40 p6eval ..…
20:40 moritz_ jnthn: so, how many visitors did your 6model post attract?
20:40 jnthn Just 192 so far.
20:41 moritz_ probably too young to have number of RSS followers
20:41 jnthn moritz_: But after 2 days its the second most popular post.
20:41 jnthn moritz_: Yes, it's only the 4th post on the blog.
20:41 jnthn It's quite young.
20:41 jnthn moritz_: I haven't got any historical stats to compare it to, of course.
20:42 dalek rakudo: 819e2ce | colomon++ | src/core/List.pm:
20:42 dalek rakudo: Remove List.batch method, as it is obsolete.
20:42 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8​19e2ce4ede6b020d69480e8e1a23bc59e1049d2
20:42 molaf joined #perl6
20:42 moritz_ jnthn: my p6 blog posts usually attract between a few hundred and 2k visitors
20:43 moritz_ many of them through planetsix and perlphere.net
20:43 PhatEddy jnthn: you noticed the earlier $ = 2 example that std and rakudo took.  Is that the one you're going wait for std on?  Is it ok?
20:43 moritz_ perlsphere.net actually
20:43 jnthn PhatEddy: No, I was talking about the one moritz_ found in signature parsing.
20:44 jnthn PhatEddy: The my $ = 2; is silly but OK.
20:44 moritz_ std: sub f(:$x, :$y!) { }
20:44 p6eval std 32093: OUTPUT«ok 00:02 117m␤»
20:45 jnthn PhatEddy: It's a degenerate case of things like my ($a, $, $b) = foo(); where you don't want the second thing stored anywhere.
20:46 moritz_ std: sub f($x?, $y) { }
20:46 p6eval std 32093: OUTPUT«[31m===[0mSORRY![31m===[0m␤Can't put required parameter after optional parameters at /tmp/FIXs6hnsIk line 1:␤------> [32msub f($x?, $y[33m⏏[31m) { }[0m␤Potential difficulties:␤  $x is declared but not used at /tmp/FIXs6hnsIk line 1:␤------> [32msub f([33m⏏[31m$x?, $y) {
20:46 p6eval ..…
20:47 PhatEddy rakudo: say $.perl
20:47 p6eval rakudo 689bb7: OUTPUT«Lexical 'self' not found␤  in main program body at line 2:/tmp/LIXuBOBNea␤»
20:47 PhatEddy rakudo: say Any.perl
20:47 p6eval rakudo 689bb7: OUTPUT«Any␤»
20:48 jnthn std: say $.perl
20:48 p6eval std 32093: OUTPUT«ok 00:03 116m␤»
20:48 jnthn We could whine about that one I guess.
20:50 macroron left #perl6
20:51 moritz_ we do :-)
20:52 jnthn moritz_: :P
20:52 jnthn moritz_: I was thinking more, like, compile time-y, and helpfully. :-)
20:53 PhatEddy Um ... what should say $.perl have done?
20:53 jnthn PhatEddy: It's equivalent to self.perl
20:54 jnthn PhatEddy: But outside of a method, there is no self.
20:54 PhatEddy rakudo: say self.perl
20:54 p6eval rakudo 689bb7: OUTPUT«(timeout)»
20:55 jnthn rakudo: say self.perl
20:55 PhatEddy rakudo: say 'hello'
20:55 p6eval rakudo 689bb7: OUTPUT«===SORRY!===␤Symbol 'self' not predeclared in <anonymous> (/tmp/YyC4Me9q8E:22)␤»
20:55 p6eval rakudo 689bb7: OUTPUT«hello␤»
20:55 dalek book: 98d51fe | moritz++ | src/subs-n-sigs.pod:
20:55 dalek book: [subs] positional parameters come before named ones
20:55 dalek book: review: http://github.com/perl6/book/commit/98​d51fe51b764598482311a38667fdc9d51e6c23
20:56 molaf left #perl6
20:56 PhatEddy If it's ok I'll try to research a bit further and file the critter ??
20:56 PhatEddy if needed
20:57 drake1 joined #perl6
20:57 jnthn PhatEddy: I'm all for a ticket that proposes making those two fail more consistently/helpfully.
20:57 jnthn I'm even happier with a patch that does so. ;-)
20:58 drake1 now I wrote some more perl http://pastebin.ca/1923627
20:58 drake1 how would that be perl6?
20:59 moritz_ drake1: are you sure that does what you want it to do?
20:59 drake1 yes
20:59 drake1 moritz_: but only with mode=0
21:00 moritz_ ah, unpack has a ($$) prototype
21:00 moritz_ I thought it would slurp up the whole file in line 04
21:00 drake1 in perl6?
21:00 drake1 no I set the record size with $/
21:00 guidj0s_ left #perl6
21:01 guidj0s_ joined #perl6
21:01 moritz_ no, perl 5
21:01 moritz_ oh right
21:01 moritz_ well
21:01 moritz_ still, if it were in list context, it would slurp the whole file
21:02 moritz_ which was my point of confusion
21:02 drake1 is it possible to compare two arrays with implicit iteration ?
21:02 drake1 for exact identical values
21:02 guidj0s_ left #perl6
21:02 jnthn Maybe try @a >>===<< @b
21:02 drake1 unpack only read in a single record
21:03 moritz_ or @a == @b && @a >>===<< @b
21:03 moritz_ because @a >>===<< @b dies if they have different lengths
21:04 jnthn oh, true
21:04 sekimura joined #perl6
21:05 * moritz_ -> sleep
21:05 drake1 output snip http://pastebin.ca/1923644
21:06 PhatEddy rakudo: my (Any, @x) = (3, 10); say "@x"
21:06 p6eval rakudo 689bb7: OUTPUT«@x␤»
21:06 dju left #perl6
21:06 PhatEddy rakudo: my (Any, @x) = (3, 10); say "{@x}"
21:07 p6eval rakudo 689bb7: OUTPUT«3 10␤»
21:07 PhatEddy rakudo: my ($, @x) = (3, 10); say "{@x}"
21:07 p6eval rakudo 689bb7: OUTPUT«10␤»
21:08 drake1 PhatEddy: I thought about comparing @magic with ( 0x32,0x04)
21:10 Tene moritz_: use the angles the other way on something you want autoextended
21:10 pyrimidine left #perl6
21:12 drake1 if (@magic == (0x32,0x04) ) { # PSF1 format should work?
21:12 drake1 they're always the same length
21:13 Tene rakudo: say "foo" if (1,2) == (3,4);
21:13 p6eval rakudo 689bb7: OUTPUT«foo␤»
21:13 drake1 hmm
21:13 Tene that casts both sides to a scalar and does a numeric comparison on the result.
21:13 Tene rakudo: say "foo" if (1,2) >>==<< (3,4);
21:14 p6eval rakudo 689bb7: OUTPUT«foo␤»
21:14 Tene Oh...
21:14 drake1 so you still have to iterate manually?
21:14 Tene rakudo: say "foo" if all((1,2) >>==<< (3,4));
21:14 drake1 explicitly*
21:14 p6eval rakudo 689bb7:  ( no output )
21:14 Tene rakudo: say "foo" if all((1,2) >>==<< (1,2));
21:14 p6eval rakudo 689bb7: OUTPUT«foo␤»
21:14 Tene rakudo: say "foo" if all((1,2) >>==<< (1,3));
21:14 p6eval rakudo 689bb7:  ( no output )
21:14 Tene So, that works fine for you.
21:14 drake1 nice
21:14 perlygatekeeper left #perl6
21:14 PhatEddy left #perl6
21:15 Tene the >> << make the operation run on individual elements from each list, and produces a list of the results.
21:16 gfldex std: my @a = 1..3; say [?] @a;
21:16 p6eval std 32094: OUTPUT«[31m===[0mSORRY![31m===[0m␤Prefix requires an argument at /tmp/wJwz1P3CBl line 1:␤------> [32mmy @a = 1..3; say [?[33m⏏[31m] @a;[0m␤Parse failed␤FAILED 00:01 119m␤»
21:16 jnthn [op] needs an infix
21:18 drake1 I could always say: if("@magic" eq "@psf1") I guess
21:18 justatheory joined #perl6
21:19 ruoso left #perl6
21:19 drake1 or ultimately pack a binary string
21:21 eternaleye_ joined #perl6
21:21 drake1 if pack ("CC",(0x32,0x04)) eq <FONT>
21:22 eternaleye_ left #perl6
21:28 drake1 better get the X11 pixmap toggle I wrote a bit earlier combined with this PSF reader. then it's gonna be a nice 'r' and a nice EUR for ISO8859-1[56]
21:30 timbunce left #perl6
21:31 x3nU i have written simple module
21:31 x3nU but
21:32 x3nU because lack of tutorials it's really ugly
21:32 x3nU and i don't know how to fix it
21:32 x3nU so i hope someone helps
21:32 x3nU http://github.com/xenu/Net-Daytime
21:34 eternaleye left #perl6
21:34 eternaleye joined #perl6
21:35 timbunce joined #perl6
21:37 dju joined #perl6
21:40 dju left #perl6
21:40 dju joined #perl6
21:41 Trashlord left #perl6
21:49 drake1 left #perl6
21:51 gfldex x3nU: timeZoneToTimeZone would want to be a hash if i would have wrote it :)
21:52 x3nU gfldex: makes sense
21:54 tylercurtis joined #perl6
21:56 gfldex x3nU: And that regex don't got any names in it. You might want to have a grammer instead and export it for other folk to use.
21:57 x3nU could show me example? :)
21:57 x3nU could you*
21:58 * tylercurtis wishes a bit that he didn't have somewhere to go earlier during the removing roles discussion.
21:59 x3nU seriously, perl6 *really* needs a good tutorial, it would bring a lot of supporters
22:01 Mowah left #perl6
22:01 tadzik joined #perl6
22:01 gfldex x3nU: another note to that hash thingy. If some country comes up with the brilliant idea to introduce another timezone. Only 10 years or so later the ISO will have a name for it and your package would have to updated or subclassed. Updating that hash could be done even at runtime, without any hassle.
22:01 tadzik oh hai
22:01 Mowah joined #perl6
22:02 Mowah left #perl6
22:02 gfldex and there are tutorials :)
22:02 x3nU btw timezones
22:02 gfldex http://rosettacode.org/wiki/Category:Perl_6
22:02 Mowah joined #perl6
22:02 x3nU thing that pisses me off is duplicated timezone acronyms
22:03 gfldex http://github.com/perl6/perl6-examples
22:03 x3nU anyway i'm going to fix my module tommorow
22:03 alester left #perl6
22:03 x3nU thanks for gfldex
22:03 x3nU thanks for help gfldex *
22:03 Mowah left #perl6
22:03 TimToady std: /\pL/
22:03 x3nU good night :)
22:04 p6eval std 32094: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of \pL; in Perl 6 please use <+isL> at /tmp/eK_kFp8ncS line 1:␤------> [32m/\pL[33m⏏[31m/[0m␤Parse failed␤FAILED 00:02 115m␤»
22:06 colomon left #perl6
22:06 Eevee joined #perl6
22:10 colomon joined #perl6
22:14 TimToady rakudo: say "foo" if (1,2) eqv (1,2)
22:14 p6eval rakudo 689bb7: OUTPUT«foo␤»
22:14 TimToady rakudo: say "foo" if (1,2) eqv (1,3)
22:15 p6eval rakudo 689bb7:  ( no output )
22:15 TimToady I dunno why you guys are futzing with >>===<<
22:16 fod joined #perl6
22:16 sbp original question was:
22:16 sbp 22:01  <drake1> is it possible to compare two arrays with implicit iteration ?
22:16 sbp 22:02  <drake1> for exact identical values
22:16 TimToady and in what sense does eqv not do implicit iteration?
22:18 TimToady rakudo: say "foo" if (1,2) ~~ (1,2)  # also works, unless RHS contains wildcard
22:18 p6eval rakudo 689bb7: OUTPUT«foo␤»
22:18 am0c joined #perl6
22:21 wamba left #perl6
22:24 Tene TimToady: i didn't remember eqv.
22:27 timbunce left #perl6
22:32 whiteknight joined #perl6
22:35 tylercurtis left #perl6
22:40 xinming left #perl6
22:40 xinming joined #perl6
22:45 shade\ left #perl6
22:46 lest_away is now known as lestrrat
22:48 shade\ joined #perl6
22:49 risou joined #perl6
22:55 cognominal this may be of interest to people here : http://code.google.com/p/es-lab/wiki/Traits
23:01 lue left #perl6
23:07 shade\ left #perl6
23:08 cognominal voilà qui m'avait échappé car je ne lis guère linuxfr mais que je trouve via une recherche google :  https://linuxfr.org//2010/07/21/27151.html
23:11 shade\ joined #perl6
23:14 xinming left #perl6
23:14 cognominal oops, wrong window  again :(
23:15 xinming joined #perl6
23:16 mberends cognominal: nice all the same :)
23:17 mberends "une affaire de mugs" :-)
23:23 cognominal masak++
23:26 Pavlz joined #perl6
23:26 Pavlz hello
23:27 Pavlz do you know which license is used by perl6 ?
23:27 Pavlz thanks
23:27 Pavlz iw0fzw paolo
23:28 gfldex Pavlz: your question is not that easy to answer
23:28 jnthn Pavlz: Depends what you mean by "Perl 6", since it's a spec, and implementations of it are free to use whatever license they wish.
23:28 mberends Pavlz: Rakudo has the same as Perl 5, Artistic License 2.0. Other implementations vary.
23:28 jnthn Pavlz: One popular implementation is Rakudo, and its license is http://github.com/rakudo/r​akudo/blob/master/LICENSE
23:29 Pavlz why is  used a camel as logo ?
23:30 Pavlz is funny, but i am curios to know
23:30 mberends Pavlz: O'Reilly trademarked it as part of their series of book cover pictures.
23:30 gfldex that camel is a butterfly
23:30 gfldex for perl 6 that is
23:31 Pavlz camel is not a butterfly
23:31 gfldex indeed
23:31 Pavlz camel is an animal which walk in the desert
23:31 gfldex i
23:32 crythias joined #perl6
23:32 gfldex i'm not entirely sure you understood me as i wanted to
23:32 mberends Pavlz: camel => O'Reilly book, onion => Perl, butterfly => Perl 6
23:34 Pavlz comes out on Artistic License 2.0
23:34 Pavlz This license is a free software license, compatible with the GPL thanks to the relicensing option in section 4(c)(ii).Artistic License 2.0
23:35 Pavlz and this is described on Artistic License 2.0
23:36 Pavlz http://www.gnu.org/licenses/lice​nses-list.html#SoftwareLicenses
23:37 Pavlz so Artistic License 2.0 is compatible with the GPL
23:37 mberends Pavlz: yes
23:37 Pavlz and i am happy for this
23:38 Pavlz in which contest can be used PERL ?
23:38 Pavlz wath is its own point of force ? for what is really good ?
23:39 mberends Pavlz: mainly text processing, "glue" between applications, and thousands of other uses
23:39 Pavlz one example
23:40 mberends Pavlz: most examples are in http://search.cpan.org/
23:41 gfldex the BBC uses perl for most of their websites
23:41 mberends Pavlz: if you're interested in learning, see http://www.perl101.org/
23:41 Pavlz and how you know to do this about BBC ?
23:41 Trashlord joined #perl6
23:42 gfldex Pavlz: are you using an online translation thingy?
23:42 Pavlz no
23:43 Pavlz i am typing myself
23:43 Pavlz and i made any error
23:43 Pavlz i know this
23:43 Pavlz but it's normal, cause i am english
23:44 gfldex i'm asking because i can't find meaning in your last question
23:45 drake1 joined #perl6
23:45 Pavlz i am italian, and is just good that i type in English, because there are many italian people, which don't know Italian, and you think that to know English is more important when people, don't speak the language of their own country ?
23:46 draxil left #perl6
23:47 drake1 in perl6, can you subclass without blessing the initial class like this http://pastebin.ca/1923798 ?
23:48 Pavlz in italy there are 6.000.000 ofilliterate,and you think that English is the primary focus ?
23:48 ruoso joined #perl6
23:50 mberends Pavlz: your English is very much better than my Italian. And many of us enjoyed a very well run conference in Pisa recently: http://conferences.yapceurope.org/ye2010/
23:50 Pavlz when there are 6.000.000 people of illeterate, you must ask to yourself if Berlusconi won for its own program, or for the fact that people don't know him in the IRL = In the Real Life
23:51 gfldex Pavlz: i did not intend to offend you and am very sad that my english does not allow me to be as gentle as mberends
23:51 Pavlz i am happy for your conference, but i don't know if you have seen what this the real situation here in Italy
23:52 Pavlz you are not offending me
23:52 TimToady however, this seems somewhat OT for #perl6
23:53 Pavlz yes, is OT for #perl6
23:53 TimToady it's okay, as long as it's not interfering with people trying to work
23:54 TimToady but some of us do feel like we have to read everything here
23:54 mberends .oO( there's that TimToady++ sending us back to work again ;)
23:55 draxil joined #perl6
23:56 drake1 if you actually called the constructor through a sub class, how would perl6 manage to associate the new tier in the chain?
23:56 TimToady drake1: in what sense are you subclassing?  I just see functional wrappers around an anonymous
23:56 TimToady hash
23:56 drake1 typical
23:56 lestrrat is now known as lest_away
23:57 jnthn class Cat { }; class Lolcat is Cat { } # this is how to subclass in Perl 6
23:57 jnthn And the default inherited new constuctor will do the right thing.
23:57 jnthn So will your own new method and self.bless(...)
23:58 drake1 jnthn: I mean how the constructor in a parent class would associate the sob class with the object
23:58 drake1 jnthn: the class name of the sub class still has to be blessed?
23:59 jnthn drake1: No, you don't have to do that in Perl 6. The self in the constructor in the parent class is a type object of the subclass, and that's how it knows what to bless into.

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

Perl 6 | Reference Documentation | Rakudo