Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-11-05

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 sorear diakopter: want infinoid pinged?
00:01 TimToady diakopter: which island does it smell like?
00:01 phenny TimToady: 04 Nov 20:18Z <sbp> ask TimToady what <print> should match. S05 says a "single printable character", but what is a printable character in General Category Value terms? everything except for C[cfson]? sorear suggests Mn should be excluded too. Cf. TR44 § 5.7.1
00:02 TimToady I think marks should be included in printable, which is there primarily to prevent your terminal from asploding from control chars
00:03 risou left #perl6
00:05 aubreyja joined #perl6
00:11 jhuni joined #perl6
00:29 masak ok.. what is this perl 6 about??
00:29 masak does it have something to do with Blackberry??
00:30 masak today's improvements seem to have brought the static page generation down from ~8 minutes to ~6 minutes.
00:31 xabbu42 left #perl6
00:31 masak but the big discovery was that most of the time is spent generating the feed.atom file. this shouldn't surprise me, really, but I wasn't aware that it's the real bottleneck.
00:31 masak and easily improvable.
00:37 Tene masak: you've got a port of Devel::NYTProf to Perl 6 ready, right?
00:37 masak eheheh.
00:37 diakopter eheheh hee
00:37 masak no, I'm timing using `time`.
00:38 colomon if that's what you're announcing in December, I'll consider naming my second-born Masak.
00:38 Limbic_Region joined #perl6
00:38 masak that would surely be an honor. I'll consider it.
00:38 masak anyway, blog post! http://strangelyconsistent.org/blo​g/november-4-2010-untuit-overflow
00:39 masak and now, I bid ye a good night.
00:39 colomon \o
00:40 masak left #perl6
00:41 sorear colomon: not Carl?
00:41 diakopter and, google and apple merge to form a 500B company named goople
00:42 colomon sorear: Carl's a name we gave serious thought to already, but elected against because there are multiple family members with the name already.
00:43 impious left #perl6
00:46 sorear ok, I think I'm out of LHF optimizations for the new for loops
00:46 sorear down to 880 ns
00:47 sorear 64 times faster than yesterday, still 5.5 times slower than p5 :(
00:50 colomon that's still, what, two orders of magnitude faster than Rakudo?
00:57 jasonmay left #perl6
00:58 aubreyja left #perl6
01:00 jasonmay joined #perl6
01:01 sorear 226 ns Perl 5  13 us Niecza  367 us Rakudo on the new ctxmark.pl
01:01 sorear which conveniently is a polyglot
01:01 kanishka joined #perl6
01:07 [1]Limbic_Region joined #perl6
01:07 stkowski left #perl6
01:09 Limbic_Region left #perl6
01:09 [1]Limbic_Region is now known as Limbic_Region
01:16 dnl left #perl6
01:24 sorear colomon: closer to 3; last measurement 600us (2010.09-10-g13c8a23)
01:24 dnl joined #perl6
01:25 colomon sorear++
01:27 sorear now I'm focusing on my $x = 0; $x++ until $x == 10_000_000;
01:35 lidden left #perl6
01:46 kanishka left #perl6
01:48 lue ohai o/
01:49 risou__ joined #perl6
01:49 risou__ left #perl6
01:56 colomon Apparently my tune "The Phantom Wristband" completely breaks my p6 ABC code.  :\
02:03 colomon or I just screwed up pbcopy and pbpaste again.
02:05 colomon ah, when properly applied it just dies halfway through.
02:10 plobsing joined #perl6
02:23 warthurton joined #perl6
02:29 agentzh joined #perl6
02:31 colomon I never programmed a double bar line into the ABC grammar.  What an odd thing to overlook!
02:41 cdarroch left #perl6
02:47 whiteknight left #perl6
02:50 jrockway left #perl6
02:52 obra left #perl6
02:56 Chillance left #perl6
02:56 justatheory joined #perl6
03:05 jrockway joined #perl6
03:08 dukeleto Are there any Perl 6 people interested in created Perl 6-related tasks for Google Code-In?
03:08 dukeleto I would really like to see some Perl 6 tasks on http://trac.parrot.org/parro​t/wiki/GoogleCodeIn2010Tasks
03:08 Limbic_Region left #perl6
03:15 am0c joined #perl6
03:23 [particle]1 joined #perl6
03:23 [particle] left #perl6
03:31 lue ooh, Google Code-In starts the day before DW's 47th anniversary!
03:37 justatheory left #perl6
03:48 dukeleto DW?
04:00 justatheory joined #perl6
04:09 justatheory left #perl6
04:32 dnl left #perl6
05:06 QinGW joined #perl6
05:20 QinGW left #perl6
05:29 am0c left #perl6
05:31 QinGW joined #perl6
05:49 quietfanatic joined #perl6
05:49 quietfanatic rakudo: rule x { x }; say "x" ~~ x
05:49 p6eval rakudo 142d22: OUTPUT«Useless declaration of has-scoped rule in a module; add our or my to install it in the lexpad or namespace␤Could not find sub &x␤  in main program body at line 22:/tmp/U5vYKtW1qj␤»
05:49 quietfanatic rakudo: my rule x { x }; say "x" ~~ x
05:49 p6eval rakudo 142d22: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤  in 'x' at line 2:/tmp/NK0w1xz2us␤  in main program body at line 22:/tmp/NK0w1xz2us␤»
05:49 quietfanatic rakudo: our rule x { x }; say "x" ~~ x
05:49 p6eval rakudo 142d22: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤  in 'x' at line 2:/tmp/73ozthNz8C␤  in main program body at line 22:/tmp/73ozthNz8C␤»
05:50 quietfanatic This is...not expected.
05:55 _kaare joined #perl6
06:06 quietfanatic rakudo: my regex x { x }; say "x" ~~ x
06:06 p6eval rakudo 142d22: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤  in 'x' at line 2:/tmp/K6jePTSX2g␤  in main program body at line 22:/tmp/K6jePTSX2g␤»
06:07 TimToady rakudo: my regex x { x }; say "x" ~~ /<x=&x>/
06:07 p6eval rakudo 142d22: OUTPUT«x␤»
06:19 sorear a microoptimization of nominal type checks made the for benchmark ~50% faster
06:20 * sorear is not pleased that the JIT is still 4x slower than Perl 5...
06:20 sorear TimToady: who do I get to blame for the mark stack?  beating the performance of Perl 5 list context is frustratingly hard
06:31 flatwhatson left #perl6
06:44 flatwhatson joined #perl6
06:50 flatwhatson left #perl6
06:52 wtw joined #perl6
07:02 flatwhatson joined #perl6
07:12 araujo left #perl6
07:24 araujo joined #perl6
07:31 drbean_ is now known as drbean
07:32 meppl joined #perl6
07:46 mavrc joined #perl6
07:50 xabbu42 joined #perl6
07:55 dual left #perl6
08:44 trbhoang joined #perl6
08:49 trbhoang left #perl6
08:54 sftp left #perl6
08:55 sftp joined #perl6
09:07 xabbu42 left #perl6
09:31 cjk101010 joined #perl6
09:41 dakkar joined #perl6
09:47 timbunce joined #perl6
10:05 QinGW left #perl6
10:12 mberends left #perl6
10:28 mberends joined #perl6
10:37 smash joined #perl6
10:38 smash hello everyone
10:38 moritz_ o/ smash
10:44 smash trying to run benchmarks including the new rakudo star release
10:44 smash but the process is getting a bit heavy :\
10:50 ggoebel left #perl6
11:04 timbunce left #perl6
11:18 drbean left #perl6
11:22 ggoebel joined #perl6
11:26 drbean joined #perl6
11:27 ggoebel left #perl6
11:31 sftp left #perl6
11:34 sftp joined #perl6
11:36 ggoebel joined #perl6
11:41 ggoebel left #perl6
11:48 mavrc left #perl6
11:49 mavrc joined #perl6
12:03 Due_ joined #perl6
12:04 Due_ left #perl6
12:05 takadonet yo
12:18 bbkr rakudo: require ::; # some PMC array is visible in error message (despite code being stupid). report or already known?
12:18 p6eval rakudo 142d22: OUTPUT«===SORRY!===␤ResizablePMCArray: Can't pop from an empty array!␤»
12:18 bbkr std: require ::;
12:18 p6eval std a194beb: OUTPUT«ok 00:01 118m␤»
12:19 * bbkr is curious what should it load...
12:22 bbkr std: require *;
12:22 p6eval std a194beb: OUTPUT«ok 00:01 118m␤»
12:24 kanishka joined #perl6
12:26 ggoebel joined #perl6
12:45 jnthn Probably explodes if parse_name returns an empty array or something.
12:46 jnthn (We often rely on being able to .pop the result..)
12:48 mikehh joined #perl6
12:53 moritz_ std: require 1 + 2;
12:54 p6eval std a194beb: OUTPUT«ok 00:01 119m␤»
12:54 moritz_ bbkr: syntactically, require just expects a term
12:54 mikehh left #perl6
13:02 bbkr moritz_: which is nice feature for plugins loading. require "Plugins::" ~ $sth.
13:05 bbkr however stringified * is wasted potential here. "require Crypt::*"  to load all modules from this namespace would be awesome.
13:05 moritz_ sounds like a good task for a module.
13:05 mikehh joined #perl6
13:05 moritz_ like Module::Pluggable in p5
13:06 xabbu42 joined #perl6
13:07 bbkr exactly. but it requires spec change, so * gets special meaning in require
13:07 moritz_ the module could just override the built-in require
13:08 bluescreen joined #perl6
13:09 bluescreen is now known as Guest78750
13:09 dnl joined #perl6
13:15 ggoebel left #perl6
13:18 masak joined #perl6
13:18 masak oh hai, #perl6!
13:18 moritz_ oh hai masak
13:18 smash masak: hello
13:19 masak I have this odd feeling there was something I ought to remember today... :P
13:19 moritz_ the date?
13:19 moritz_ remember, remember
13:19 moritz_ the 5th of November
13:19 wamba joined #perl6
13:19 masak right! that's it! :)
13:20 ggoebel joined #perl6
13:21 mavrc left #perl6
13:22 Patterner left #perl6
13:23 * moritz_ would be surprised if masak++ didn't use the Guy Fawkes thing in his first blogging November
13:23 masak you recall correctly.
13:24 masak Franklin Roosevelt got the second year. http://strangelyconsistent.org/blo​g/november-5-2009-hanging-in-there
13:25 mathw o/
13:26 [particle]1 is now known as [particle]
13:27 MayDaniel joined #perl6
13:30 masak I have a problem with which you might help me. it's only to a minor degree about solving the actual problem, and to a major degree about doing it in a sustainable way.
13:30 colomon As of a minute ago, the ABC module parses a full 25 tune set of my tunes, and can generate about 98% correct Lilypond instructions from them.  At a quick glance, I think the number of errors in the ABC -> Lilypond translation appear to be fewer then the number of errors I made entering the original ABC notation for the tunes.  :)
13:30 masak colomon: \o/
13:31 jhuni left #perl6
13:32 masak ok, here's the problem specification. the input consists of paragraphs separated by \n\n. output paragraphs with a line length of at most 80 or ($LINE_LENGTH) characters. line break on spaces if possible, otherwise try to make the "overshoot" as small as possible.
13:32 colomon oooo, it's Text::Autoformat.
13:32 colomon or even Text::Wrap?
13:32 masak right.
13:33 masak my (meta-)problem is that each time I develop a solution for this, it's after far too much trial and error, and the solution I arrive at is usually an inscrutable regex, or something involving a regex, and I won't remember it till next time.
13:33 masak yes, maybe the answer is simply "use a module".
13:33 moritz_ I guess the first step is splitting on \n**2..*
13:33 Psyche^ joined #perl6
13:33 Psyche^ is now known as Patterner
13:34 moritz_ the rest depends on the expected output quality
13:34 mathw wrapping is a PAIN
13:34 mathw as I discovered with Form
13:34 mathw which has an astoundingly simplistic wrapping algoritm
13:35 moritz_ an easy approach is to go the 80th column, and from there on to the left until you find a blank
13:35 colomon work is on-going on a Text::Wrap port
13:35 moritz_ then chop of everything up to that blank, and start again
13:35 masak there's a wrapping algo in ufo. I think it does what moritz_++ suggests.
13:35 * masak looks
13:35 colomon alas Text::Wrap isn't in modules.perl6.org yet.
13:36 moritz_ XML::Writer uses something much easier: it counts the columns, and wraps if > 80
13:36 moritz_ or > 70
13:36 mathw colomon: \o/
13:36 mathw I suspect Form may start to depend on that at some point
13:36 colomon I've had p5's Text::Autoformat open in a tab in my browser for a week, trying to get up the nerve to start translating it.
13:36 masak ah, no. the ufo one adds one word at a time, and inserts a newline "after the fact" when it sees that the result overflowed.
13:37 masak it's less messy than it sounds, because it's not in-place.
13:37 colomon takadonet is working on Text::Wrap.
13:37 masak takadonet++
13:38 colomon I'd argue the correct solution is to get him to post what he's got and gang up on fixing any remaining problems.  :)
13:38 MayDaniel left #perl6
13:42 hanekomu joined #perl6
13:44 mavrc joined #perl6
13:50 kanishka left #perl6
13:52 takadonet soon soon. Lots of things to do at work right now
13:58 masak takadonet: no rush. (hurry hurry hurry)
14:01 takadonet masak: well Text::Tabs is done
14:01 takadonet masak: and only one fcn left to do in Text::Wrap  ( only were 2 fcn in the first place)
14:01 masak takadonet: what is Text::Tabs' relation to the Str.indent method?
14:02 takadonet masak: I have not looked to closely to it for the moment. I just do a straight up p5 to p6 convert. Once it's working the same, was going to do it hte perl 6 way
14:03 takadonet however I  cannot do that for the last function because of some limitation of the Perl 6 regex
14:03 masak takadonet: I hope your work ends up in Rakudo, then. the Str.indent method is probably not too tricky to implement for someone who has ported Text::Tabs.
14:03 masak limitations in Perl 6 regexes can often be overcome by doing low-level string twiddling.
14:03 takadonet indeed
14:06 alester joined #perl6
14:07 Guest78750 left #perl6
14:11 takadonet rakudo: "I want this to work so badly!" ~~ /(\N**0..5)/
14:11 p6eval rakudo 142d22:  ( no output )
14:11 takadonet rakudo: "I want this to work so badly!" ~~ /(\N**0..5)/ say $0;
14:11 p6eval rakudo 142d22: OUTPUT«===SORRY!===␤Confused at line 22, near "\"I want th"␤»
14:11 takadonet ... stupid ;
14:11 takadonet rakudo: "I want this to work so badly!" ~~ /(\N**0..5)/ ; say $0;
14:11 p6eval rakudo 142d22: OUTPUT«I wan␤»
14:11 masak seems to work so badly already :)
14:12 takadonet rakudo: my $limit=5; "I want this to work so badly!" ~~ /(\N**0..$limit)/ ; say $0;
14:12 p6eval rakudo 142d22: OUTPUT«===SORRY!===␤Only integers or '*' allowed as range quantifier endpoint at line 22, near "$limit)/ ;"␤»
14:12 masak ah.
14:12 masak I think that's one place where all the ingredients are there, but there's a bit of a bus number involved.
14:13 takadonet nuts
14:14 * moritz_ not sure if the number of repetitions must be known at compile time
14:15 simon__ joined #perl6
14:15 masak takadonet: you could always investigate what it would take to work. just look in nqp-rx. maybe if you start pulling some threads, others will follow.
14:15 masak moritz_: I don't see why it would. so many other things are dynamic in regexes.
14:15 takadonet masak: time is always my limiting factor
14:16 masak nodnod
14:16 PerlJam joined #perl6
14:16 PerlJam left #perl6
14:17 PerlJam joined #perl6
14:18 moritz_ there's a PAST::Regex.new(:pasttype<quant>) which accepts :min and :max
14:19 colomon takadonet: that's why I was suggesting putting what you've got now on github already.  I know there's an awesome satisfaction to working it out yourself, but throwing the combined of masak++ and moritz_++ at it would help get it ready to go... and there are already people out there waiting to use it!  :)
14:19 moritz_ maybe :max(PAST::Var.new(:scope<lexical>, :name($foo))) would work
14:20 moritz_ then it's a simple matter of extending the parser (steal from STD.pm6) and the action methods
14:22 takadonet colomon: I was then... shit happen at work hehe. I'm planning putting everything on asap
14:23 Guest78750 joined #perl6
14:29 cjk101010 left #perl6
14:31 moritz_ std: / a ** $_ .. $_ /
14:31 p6eval std a194beb: OUTPUT«ok 00:01 122m␤»
14:33 moritz_ uhm
14:33 moritz_ I suspect that's parsed just like   a ** b
14:33 mkramer left #perl6
14:33 moritz_ you really need a ** { closure }
14:34 mkramer joined #perl6
14:34 moritz_ so *that's* the version you need to enable in rakudo
14:34 moritz_ and since it relies on returned ranges, you must do it Rakudo (nqp-rx has no Range)
14:35 pyrimidine joined #perl6
14:51 Guest78750 left #perl6
14:51 patspam joined #perl6
14:54 tadzik joined #perl6
14:55 masak it would be nice to see more Perl 6 tasks on http://trac.parrot.org/parro​t/wiki/GoogleCodeIn2010Tasks
14:56 masak but I can't currently think of any good candidate tasks.
14:56 tadzik hey masak!
14:57 masak hello there, tadzik
14:57 tadzik everyone else hello as well :)
15:00 aesop left #perl6
15:02 jnthn oh hai
15:02 masak jnthn! \o/
15:02 jnthn masak! \o/
15:02 jnthn Have a gut time in Vienna?
15:02 masak aber ja.
15:03 masak this might interest some. http://axisofeval.blogspot.com/2010/07​/c-40-industrial-response-to-lisp.html -- I can only assume that the note the post ends up on is deliberately provocative... and I don't necessarily understand in which sense Perl et al. need to catch up.
15:03 masak Wien is a much prettier city than Paris. :)
15:03 Guest78750 joined #perl6
15:05 jnthn masak: I concur. :-)
15:05 moritz_ I think Paris is only beautiful if somebody shows you the beautiful places
15:05 jnthn I miss having it a 1 hour train ride away.
15:05 masak moritz_: right. whereas in Wien, we just wandered around, and never saw anything outright un-pretty.
15:06 * moritz_ fights with http://mathworld.wolfram.com/EllipticIntegral.html
15:06 smash moritz_: remember this https://github.com/smashz/perl6-CGI-Cookie ? :)
15:06 masak moritz_: by the way, Perl 5 is only beautiful if somebody shows the beautiful places. this is evidenced in how some of my former classmates employ Perl 5.
15:07 moritz_ smash: I remember, but in the mean time lost a bit of motivation to hack on CGI::App
15:07 moritz_ sorry about that
15:08 smash hehe, no problem
15:09 tadzik smash: hey, have you tried benchmarking newest Star?
15:10 Chillance joined #perl6
15:11 smash tadzik: i already added the new release but still trying to run the benchmark script
15:11 smash it's getting really heavy to run
15:11 smash and it takes a lot of time
15:11 tadzik I see
15:12 smash it's running as we speak, for like 5 hours already :)
15:13 smash arg, givin' errors now
15:14 smash colomon: prime.pl in bench-scripts repo is giving an error: sudo route -nv add -host 192.168.1.19 -interface tun0
15:15 colomon ??????
15:15 smash err.. ups.. that's not the error of course, sorry, the error is: Method 'munch' not found for invocant of class 'Int'
15:15 TiMBuS left #perl6
15:15 colomon should be batch
15:15 colomon (I think)
15:17 colomon no, wait.
15:17 colomon are you having trouble with an older version of Rakudo?
15:18 colomon (trying it locally, and of course it's taking two minutes, since it works!)
15:19 tadzik seen the Parrot roadmap, the one with Numbers and lots of "performance" word here and there?
15:19 aloha Sorry, I haven't seen the Parrot roadmap, the one with Numbers and lots of "performance" word here and there.
15:20 colomon smash: I'll try to check in a more backwards compatible version in a moment.
15:21 TiMBuS joined #perl6
15:23 MayDaniel joined #perl6
15:24 aesop joined #perl6
15:25 mtk joined #perl6
15:29 colomon smash: try the versions I just pushed.
15:29 colomon er, just pushed now.
15:31 mtk left #perl6
15:32 mtk joined #perl6
15:35 kensanata joined #perl6
15:36 Naa joined #perl6
15:36 Naa left #perl6
15:37 Naa joined #perl6
15:37 Naa left #perl6
15:39 Naa joined #perl6
15:39 Naa left #perl6
15:40 Naa joined #perl6
15:40 Naa left #perl6
15:41 jnthn "Shall I stay on the channel? Naa!"
15:41 smash colomon: i'll try it later, the process takes hours to run.. thks
15:41 * arnsholt is amused
15:41 masak jnthn: apparently he reached that decision several times.
15:42 aesop left #perl6
15:42 araujo left #perl6
15:43 masak who's willing to step up and manage a list of topics/writers for this year's Advent Calendar?
15:45 * tadzik looks who steps out first
15:45 masak tadzik! I knew I could count on you! :)
15:45 colomon and where should the list be mantained?
15:46 masak Mu?
15:46 colomon *maintained
15:46 tadzik ecosystem? :)
15:46 masak ecosystem contains modules, not blogging plans. :)
15:46 tadzik darn, I always get into trouble :)
15:46 masak tadzik: I know you'll do a fine job.
15:46 * colomon took several seconds to realized "Mu?" was a possible answer rather than a question.
15:46 tadzik as soon as I get my internets back
15:47 tadzik masak: sounds like fun to me
15:47 masak tadzik: and you won't be alone in maintaining it. build it, and they will come. at least it was like that last year.
15:47 tadzik masak: build what? The list?
15:47 masak yes.
15:47 * masak tries to find last year's
15:47 tadzik hm. Any ideas, of what we didn't cover yet?
15:47 tadzik maybe Rakudo hacking, or something?
15:48 tadzik you could write something about it, couldn't you, masak?
15:48 * tadzik whistles
15:48 masak :)
15:48 masak I'd like to see us optimize for newcomers, in some way.
15:48 tadzik are there tests for the last year's calendar?
15:49 tadzik It's still good, maybe it'll have to be reviewed a bit, like the grammars chapter have been
15:49 ggoebel masak: is the code behind your perl6 blog available anywhere?
15:49 mtk left #perl6
15:49 masak ggoebel: yes, as a (now outdated) gist.
15:50 masak ggoebel: I can give you that, or something better, depending what you need.
15:50 wtw left #perl6
15:51 masak I can't find where the old advent calendar list has gone. last time I looked, it was in the Pugs repo.
15:51 masak but that's almost a year ago.
15:51 colomon tadzik: are you on wordpress as a contributor to the Advent calendar blog?
15:52 tadzik colomon: yes
15:52 colomon \o/
15:52 tadzik I figured out the easiest way to get a short list of posts is to go to the Dashboard :/
15:53 colomon I think we could probably use an updated Sequence operator post this year.
15:53 araujo joined #perl6
15:53 masak ggoebel: while you deliberate, here's the gist: https://gist.github.com/601864 :)
15:53 colomon An updated "how to get Rakudo" that covers Rakudo *
15:54 ggoebel masak: I'm trying to get a blog up for a "The Lacuna Expanse" alliance. As there are a few perl6 folks in the alliance... Good excuse to use perl6 :)
15:54 ggoebel just need something that I can get up and running quickly...
15:55 masak ggoebel: I'm not sure you'd be able to stand the current level of pain. but if you're willing to give it a shot, I can send you a working .tar.gz file.
15:55 tadzik Traits!
15:55 tadzik pardon my shouting, I didn't want to forget it
15:55 masak ggoebel: that is, a .tar.gz file with a working example blog system.
15:56 masak ggoebel: just be aware that I plan to obsolete the current script and replace it with a module down the road.
15:56 tadzik like sub foo() is something(arg1, arg2). There is a dispatcher like this in Web.pm, I never know how it works. Plus this is awesome. Volunteers?
15:56 masak ggoebel: you *should* be able to just hotswapt that new module then, and keep running with it. but no guarantees.
15:57 ggoebel I'm willing to try pain... :)
15:57 masak excellent. five minutes.
15:57 kanishka joined #perl6
15:57 jnthn tadzik: NativeCall uses the same trait-y mechanism too.
15:57 tadzik right
15:57 tadzik https://gist.github.com/664348
15:57 tadzik short list, from the top of my head
15:58 tadzik maybe something targeting Perl 5 programmers?
15:58 tadzik something about the module system?
15:58 colomon module system +1
15:59 agentzh left #perl6
15:59 tadzik I'll maybe post that to perl6-users
15:59 tadzik ideas? Call for ideas
15:59 moritz_ szabgab++ # http://szabgab.com/blog/2010/​11/perl-ecosystem-group.html
16:00 MayDaniel left #perl6
16:00 tadzik szabgab++ # awesome!
16:00 moritz_ (though s/efforts/goals/ would be better, IMHO)
16:00 92AABH2ZL joined #perl6
16:01 sscaffid joined #perl6
16:02 tadzik hmm, maybe a post about The Perl 6 itself – specification, not an implementation, this is Rakudo, this is Niecza, this is Parrot, things like this?
16:03 colomon certainly enough things have changed to warrant a post like that.
16:03 tadzik does that mean yes?
16:03 tadzik I suppose so *adding*
16:04 sscaffid left #perl6
16:04 sscaffid joined #perl6
16:04 patspam left #perl6
16:05 patspam joined #perl6
16:06 sscaffid is now known as hercynium
16:07 spq1 left #perl6
16:07 tadzik maybe the list should be reddited, so the Perl 5 programmers will think about it as well, not only the Perl 6 community?
16:08 colomon we got oodles of attention last year, it was a huge success in those terms.
16:08 colomon I don't do reddit, and don't know how much attention (if any) came from that channel.
16:09 tadzik takadonet++ reddits lots of Perl (and Perl 6) related stuff
16:09 takadonet :)
16:10 tadzik http://trac.parrot.org/parrot/wiki/GoogleCodeI​n2010Tasks?version=54#Task:CreateaPerl6T-Shirt -- dang, I'm so looking forward to this :)
16:13 risou joined #perl6
16:15 colomon errr, I have a perl 6 t-shirt.
16:15 colomon or rather, a Rakudo t-shirt.
16:15 colomon from YAPC::NA
16:16 colomon actually, I had another as well from cafe press, but I haven't seen it in four or five months now.
16:16 Naa joined #perl6
16:16 Naa join
16:17 Naa hii
16:17 masak Naa: hi!
16:17 Naa what's ur name ?
16:17 masak Naa: we're happy you're here. welcome to our humble adobe.
16:17 * masak <-- masak's name
16:18 Naa u are wellcome
16:18 masak so are you :)
16:18 Naa hii masak
16:18 masak hii \o/
16:19 mkramer I'm totally getting the shirt
16:19 Naa im women i come from Indonesia
16:19 Naa :p
16:20 masak welcome hither, woman from Indonesia!
16:20 masak rakudo: say "Hi, Naa! I'm a program!"
16:20 p6eval rakudo 142d22: OUTPUT«Hi, Naa! I'm a program!␤»
16:20 hanekomu left #perl6
16:20 tadzik (:
16:20 moritz_ masakbot!
16:21 tadzik I'm also thinking about a laptop sticker
16:21 masak moritz_: in the end, we're all software.
16:21 tadzik <insert sexually offensive comment here>
16:21 lidden joined #perl6
16:22 Naa left #perl6
16:22 masak tadzik: <gentle but reproachful putdown based on channel standards>
16:22 tadzik I hope I didn't scare her :)
16:22 masak Naa :)
16:22 masak but try to avoid it next time, just in case.
16:22 tadzik sure thing
16:22 mikehh left #perl6
16:23 masak uttering the words "sexually offensive" as soon as a woman enters is... less than awesome. :/
16:23 Naa joined #perl6
16:23 masak Naa! \o/
16:23 Naa yess
16:24 * tadzik begs for forgiveness
16:24 masak Naa: we were just discussing the limits of civil discourse.
16:24 Naa ok
16:25 masak Naa: how are u?
16:25 cdarroch joined #perl6
16:25 cdarroch left #perl6
16:25 cdarroch joined #perl6
16:25 Naa maybe im not join, because i dont understand
16:25 Naa fine
16:25 Naa masak u are male or female ?
16:26 masak Naa: yes, most of the time I am.
16:26 masak Naa: I'm a stereotypical male.
16:26 Naa LoL
16:26 masak (that is, I have a stereo at home)
16:26 Naa nice to meet u all
16:27 masak likewise.
16:27 masak Naa: have you seen our butterfly?
16:27 huf masak: you type on your stereo?! i'm confused
16:27 huf or does that mean you type with both hands?
16:27 florz are you all filtering mirc colors that you still haven't engaged your clients' ignore powers? =:-)
16:27 masak huf: no, I just own a typical stereo :)
16:27 masak Naa: http://perl6.org/camelia-logo.png
16:28 moritz_ statically typed stereo!
16:28 masak florz: my client is too awesome to bother me with colors :)
16:28 florz it's a useful troll hint, you see? =:-)
16:28 Naa ur client ?
16:29 masak florz: she's not a troll, she's a female from Indonesia.
16:29 florz erm, yeah, sure
16:29 huf trolls cant be female?!
16:29 huf i'm going to the nearest bridge to start a protest against that kind of discrimination
16:29 masak that's not what I meant :)
16:29 florz *gg*
16:29 huf :)
16:29 tadzik watch out for trolls looking for myto at the bridge
16:30 huf you'll hear from the indonesian troll's front soon
16:30 masak I'm just asking you not to project things down to the troll spectrum based only on color choices.
16:30 huf unless they bump into the troll's front of indonesia ;)
16:30 masak huf: "troll's". Indonesia has but one troll? :P
16:30 Naa heiiiii im female foresure florz
16:30 huf oh no, i'll be hearing from the plurals' front of indonesia now
16:31 masak Naa: did you look at http://perl6.org/camelia-logo.png yet? what do you think?
16:31 masak huf: :P
16:31 masak Naa: you don't happen to own a blackberry, do you?
16:31 * masak .oO( blackberry-typical female )
16:32 Naa yes
16:32 masak \o/
16:32 masak *lol*
16:32 tadzik is blackberry promoting #perl6 somehow?
16:32 Naa i used my BB
16:32 masak "promoting" :)
16:34 Naa left #perl6
16:35 tadzik interesting
16:41 tadzik I imagine some Chatmosphere dev being a silent Perl 6 fan and "accidentally" setting #perl6 as a default channel or something
16:46 masak yeah, same here.
16:51 tadzik or we could simply ask the next suprisecomer
16:54 takadonet masak: not my best work but..... https://github.com/Takadonet/Text-Tabs-Wrap
16:57 * masak reads
16:58 justatheory joined #perl6
16:58 masak takadonet: why you commit .pir files? that feels like a hassle and a potential source of problems.
16:58 takadonet masak: that was an accident!
16:59 masak ok.
16:59 tadzik left #perl6
17:00 masak anyway, it all looks good. please add it to the ecosystem, too.
17:00 masak http://github.com/perl6/ecosystem
17:00 takadonet masak: just removed them now. Only one test module so far
17:00 takadonet only one test module passed so far
17:01 masak nod
17:02 tadzik joined #perl6
17:02 takadonet do not have commit bit :(
17:03 masak hugme: add takadonet to ecosystem
17:03 hugme masak: sorry, I don't know anything about project 'ecosystem'
17:03 masak hrm.
17:04 masak and I don't seem to have a metacommit bit. so we'll have to await someone who does.
17:04 masak either that, or I'll add you myself.
17:07 masak there; added. should show up on http://modules.perl6.org/ soonish.
17:07 dual joined #perl6
17:07 masak by the way, Camelia image link on http://modules.perl6.org/ is broken. :/
17:08 pyrimidine left #perl6
17:08 pyrimidine joined #perl6
17:13 MayDaniel joined #perl6
17:14 risou left #perl6
17:15 risou joined #perl6
17:27 TimToady sorear: you can blame me for the mark stack; I used to be smart, y'know...  :)
17:29 TimToady course, several other things help P5's list performance, like knowing list context at compile time, and flattening everything willy nilly
17:29 TimToady and, of course, always being eager
17:29 masak Wikipedia informs me that the mark stack "saves bookmarks to locations in the argument stack".
17:31 masak that does sound like an optimization.
17:31 TimToady it's just an obvious way to handle variadic args if you're passing them via a stack
17:32 masak lately I've been toying with the idea of forking the perl5 code base, stripping it down to its barest necessities, and then trying to make it behave like Perl 6. just to get a first-hand feel of the obstacles one runs up against.
17:33 masak also, it might be instructive to try to reduce perl5 to something "sane" and cruftless.
17:33 masak IIUC that's not exactly the goal of perl5i.
17:33 TimToady you too could create a new language...  :)
17:33 jnthn masak: I think the Kurilla project did something starting off along those lines, but I think it's headed other places now too (e.g. adding some stuff)
17:34 jnthn (Not discouraging you, just another thing that you might like to look at. :-))
17:34 masak I guess the temptation to add stuff is very large.
17:34 masak I will have a look at Kurilla.
17:34 TimToady well, since you have nothing else to do, you might as well...  :P
17:34 jnthn I hope I spelt it right, or you'll have fun in Google. :-)
17:35 masak "Perl Kurila is a dialect of Perl. With Perl 5 as ancestor it has a solid base, but without the backwards compatibility requirement of Perl 5, it is free to evolve into new directions." -- sounds familiar... :)
17:37 * jnthn ponders the prep he still needs to do for $course next week and hopes he gets some Perl 6 hacking time in at the weekend
17:37 masak TimToady: oh, so I told you about my Copious Spare Time™, did I? :)
17:37 masak jnthn: I hope so too. I'll be sitting next to you :)
17:37 masak or did you mean this weekend?
17:37 jnthn masak: wait, you're coming...what
17:38 jnthn masak: That's not this weekend, that's next weekend, right?
17:38 masak yes...
17:38 jnthn Otherwise you'd be on a train, like, right now. :-)
17:38 masak indeed.
17:38 masak sorry about the confusion. for some reason I thought you meant next week's weekend.
17:38 jnthn You're so confusing. :P
17:38 masak I am.
17:38 masak even I'm confused now.
17:38 TimToady huh?
17:39 jnthn masak: It's quite simple. This weekend you're in Uppsala. You get puns via IRC. Next weekend you're in Lund. You get puns through your ears.
17:39 jnthn Anyway, yes, it's this weekend that I need to prepare for $course.
17:40 masak puns through my ears. sounds punful.
17:40 jnthn Next week's weekend is nice and free. :-)
17:40 masak \o/
17:41 jnthn .oO( If I start punning really hard, they'll go in one ear and out the other... )
17:41 simon__ left #perl6
17:41 masak there's nothing to ear but ear itself.
17:42 TimToady corny...
17:42 * masak hangs head
17:43 TimToady shucks
17:46 * colomon is a-maized at what goes on around here...
17:47 jnthn Puns could crop up at any moment.
17:47 * TimToady is tired of stalk jokes
17:48 jnthn We should leave off them for a bit.
17:48 masak a pun holiday? what an idea.
17:49 TimToady at least the kernel of an idea
17:49 masak Colonel of an idea or a General idea?
17:49 TimToady that's chicken, either way
17:50 jnthn Eep, all the things near the top of the 6model ROADMAP are tricky. :-)
17:50 TimToady .=reverse
17:50 jnthn Darn, that didn't change anything. :P
17:50 jnthn Apart from creating dependency issues. ;-)
17:51 szabgab mberends sends his regards but he is cooking now, yummy :)
17:51 TimToady yes, but those are easy to deal with; just do the dependencies first
17:52 jnthn szabgab: You're cooking mberends?!
17:52 TimToady is he ready to eat?
17:52 szabgab moritz_: thanks for the link, effort was replaced by goals
17:52 sorear good * #perl6
17:53 jnthn o/ sorear
17:53 szabgab mberends: pls stop lauging
17:54 szabgab or however that should be spelt
17:54 TimToady don't start with the spelt jokes
17:56 dakkar left #perl6
18:01 TimToady rakudo: my $limit=5; "I want this to work so badly!" ~~ /(\N**{0..$limit})/ ; say $0;
18:01 p6eval rakudo 142d22: OUTPUT«I want this to work so badly!␤»
18:02 TimToady that's supposed to work, but instead it interprets the block as a normal closure, and uses '' for the delimiter, it seems
18:03 takadonet TimToady: for a sure there, I thought it was working :(
18:03 TimToady oh, moritz_++ already figgered it out
18:04 Tene TimToady: overloading ** to mean both delimiter and quantifier has seemed like a mistake since I first saw it, fwiw.
18:05 Tene it also means that it's rather more awkward to express a quantified limited match.
18:05 Tene "five comma-separated values"
18:06 TimToady the speculation is that \d+ ** 1..5 ** ',' would handle that
18:06 92AABH2ZL left #perl6
18:06 TimToady or some such
18:06 Tene Eww. >.>
18:07 Tene This is the kind of overloading that I've enjoyed seeing Perl 6 move away from in other areas.
18:13 TimToady giving it a different name won't help with the composition much
18:14 kanishka left #perl6
18:14 masak sushi &
18:15 hercynium sushi++ # should have had that for lunch today :)
18:16 TimToady I still could, but shouldn't...
18:17 aesop_ joined #perl6
18:18 sorear What things from modules.perl6.org should I suck into Niecza?
18:19 tadzik maybe Acme::Meow? It didn't work the last time I checked
18:20 tadzik unless you mean "as a standard, shipped with niecza modules"
18:23 sorear I mean, shipped with Niecza, and maybe tested as well
18:24 tadzik benchmark?
18:25 colomon sushi++ indeed.  sadly lacking in my new hometown.  :(
18:32 stkowski joined #perl6
18:42 kanishka joined #perl6
18:47 wamba left #perl6
18:48 icwiener joined #perl6
18:53 sorear I removed 1. stale DHCP IPs 2. individual bans that are subsumed by group bans still present 3. lambdabot
18:53 sorear if lambdabot comes back, tell me and I'll "@part #perl6"
18:53 sorear I've been a lambdabot admin since 2007, coincidentally
18:58 smash left #perl6
19:03 hercynium left #perl6
19:03 Juerd The remaining ban list is still quite long
19:04 Juerd Don't bans ever expire?
19:04 sorear No
19:05 Juerd They all carry the same timestamp. That's weird.
19:05 sorear that is the timestamp of the last netsplit
19:05 Juerd I see
19:06 sorear we could just remove all the bans and see what happens
19:06 Juerd I think that's a good idea
19:06 sorear I support this but won't do it unilaterally
19:06 sorear ok
19:07 Juerd Even if it should cause trouble, restoring the specific bans is easy
19:08 Juerd And I'm used to channels where bans expire in a few hours or days; these are all more than a month old.
19:08 Juerd Very few people persist their join attempts after a few days.
19:08 Juerd Four at a time even. Be careful not to overload the irc server :P
19:09 sorear irssi has a LOT of cleverness for efficient handling of bans and kicks
19:09 sorear I do not suspect it was designed for freenode :)
19:09 Juerd The original #irssi was on ircnet if I recall correctly
19:10 sorear huh.  Well I guess this isn't needed either
19:10 Juerd ircnet has no services, so all channel management is done by bots and actual people
19:14 hercynium joined #perl6
19:27 x3nU is now known as xenu
19:27 xenu is now known as Guest63611
19:27 Guest63611 is now known as x3nU
19:32 envi left #perl6
19:38 diakopter dukeleto: did you get p6 code-in ideas?
19:39 dukeleto diakopter: i made some perl6 tasks, but i can surely use more.
19:39 dukeleto diakopter: Parrot and Perl got accepted, as 1 of only 20 "orgs" to be involved this year.
19:39 dukeleto diakopter: non-code tasks are very valuable
19:40 diakopter the "Create a Perl 6 T-Shirt" description seems a bit off: "Any of the current Parrot logos can be used as a starting point, or ..."
19:40 dukeleto diakopter: but you can add any kind of task you want
19:40 dukeleto diakopter: typo! Care to fix it?
19:40 PerlPilot joined #perl6
19:40 diakopter I'm on vacation :)
19:40 dukeleto diakopter: just please use the template
19:40 dukeleto diakopter: yeah, so am i.
19:41 TimToady but see http://www.cafepress.com/rakudo
19:41 dukeleto TimToady: you are correct. there already exist Perl 6 shirts. But obviously we need more.
19:41 dukeleto TimToady++ # keeping my honest
19:43 PerlJam left #perl6
19:43 PerlPilot is now known as PerlJam
19:46 kanishka left #perl6
19:46 diakopter probably TimToady was referring to GoogleCodeIn2010Tasks where it says "currently we do not have any Perl 6 T-shirts."
19:46 jferrero joined #perl6
19:47 dukeleto diakopter: i just fixed that :)
19:47 dukeleto diakopter: in the process of fixing it actually
19:48 kanishka joined #perl6
19:48 dukeleto diakopter: fixed.
19:49 dukeleto TimToady: am I correct in saying that Perl 6 T-Shirts can use already existing Perl 6 logos (such as camelia) if they are created in an open source format with the appropriate open source license?
19:50 dukeleto TimToady: i am only talking about the graphic for the t-shirt. the actual production/printing of them is another matter
19:51 dukeleto Would someone like to create a "Perl 6 users" survey task? I think that would be a nice thing for the Perl 6 community to have.
19:52 MayDaniel left #perl6
19:54 hercynium left #perl6
19:59 TimToady dukeleto: see https://github.com/perl6/mu/​raw/master/misc/camelia.txt for terms of usage
20:01 warthurton left #perl6
20:07 Guest78750 left #perl6
20:07 Guest78750 joined #perl6
20:08 Util rakudo: class Foo { has $.n; multi method new ( $n ) { say "my new() was called: $n"; self.bless: *, :$n;};                                                                       }; Foo.new( 42 ).perl.say;
20:08 p6eval rakudo 142d22: OUTPUT«my new() was called: 42␤Foo.new(n => 42)␤»
20:08 masak ggoebel++ # has got psyde running, so there are now two instances in use
20:08 Util rakudo: class Foo { has $.n; multi method new ( $n ) { say "my new() was called: $n"; self.bless: *, :$n;};  submethod BUILD (*@args) { say "my BUILD was called: {@args.perl}" } }; Foo.new( 42 ).perl.say;
20:08 thepler left #perl6
20:08 colomon \o/
20:08 p6eval rakudo 142d22: OUTPUT«my new() was called: 42␤my BUILD was called: []␤Foo.new(n => Any)␤»
20:08 thepler joined #perl6
20:08 Util Why didn't .bless pass parameters to BUILD?
20:09 masak good question.
20:10 jnthn It probably did
20:10 masak ...but...?
20:10 jnthn *@args captures positionals
20:10 masak oh! :)
20:10 * masak is glad he didn't submit a rakudobug :)
20:12 masak rakudo: class Foo { has $.n; method new($n) { self.bless: *, :$n }; submethod BUILD(*%kwargs) { say %kwargs.perl } }; Foo.new( 42 )
20:12 p6eval rakudo 142d22: OUTPUT«{"n" => 42}␤»
20:13 takadonet left #perl6
20:13 Util thanks!
20:18 mtk joined #perl6
20:19 plobsing left #perl6
20:24 x3nU left #perl6
20:30 mtk left #perl6
20:32 estrabd is now known as estrabbdbababa
20:33 estrabbdbababa is now known as estrabd_aftmfk
20:40 masak I have a candidate for a p6l topic. it is this: "with .new and .clone working the way they do (providing direct write access to private attributes), how do I protect the invariants of my class?"
20:40 mtk joined #perl6
20:41 jnthn "Override .new and .clone!" ;-)
20:42 masak which is equivalent to saying that the default implementation of those methods aren't compatible with upholding object invariants.
20:44 picgla1 joined #perl6
20:45 masak and it also means that anyone who's not aware that .new and .clone are invariant-breakers will most likely write classes whose invariants can easily be broken by a third party.
20:46 masak which is kinda... the opposite of the point of encapsulation.
20:46 dukeleto TimToady: thanks for the link! that clarifies things greatly.
20:46 pyrimidine left #perl6
20:50 masak I think being able to set private attributes from the constructor methods is fundamentally wrong. it's the only place where we allow direct access like that. in all other places, we have a layered approach.
20:50 masak even if that's just an overridable default, I think it's the wrong one. because people will write unencapsulated code by default.
20:51 risou left #perl6
20:53 Guest78750 left #perl6
20:53 Chat6629 joined #perl6
20:53 mtk left #perl6
20:54 Chat6629 hi too all the sweet ladies in here
20:54 Chat6629 any lovely lady wanna chat
20:55 Chat6629 left #perl6
20:55 * BinGOs blinks.
20:56 quietfanatic Is make() in grammers NYI?
20:56 jnthn masak: I can see that argument.
20:57 masak quietfanatic: Rakudo internals rely heavily on make()
20:57 quietfanatic Hm, then maybe it doesn't work how I think it works
20:57 masak too bad Chat6629 didn't show up when Naa was still here...
20:57 quietfanatic Doesn't it change the return value of the regex to be what you give to it?
20:57 jnthn masak: OTOH, "you can set stuff at initialization but then have to have permission to touch it" sorta biases things towards people making  immutable data structures.
20:57 BinGOs masak: heh
20:58 masak quietfanatic: no, it's more of an annotation.
20:58 quietfanatic Huh
20:58 masak quietfanatic: it sets the .ast attribute.
20:58 jnthn quietfanatic: It sets something that you can get with .ast
20:58 quietfanatic Ah...
20:58 mkramer I agree with you masak, fwiw
20:58 quietfanatic I see.  Let me see if I can use that.
20:59 masak jnthn: immutable objects are just as vulnerable to broken invariants as mutable ones.
20:59 jnthn masak: Depends how you're expressing your invariants.
20:59 BinGOs masak: indeed they can probably have a nice chat offline as they share the same computer.
20:59 masak BinGOs: oh?
21:00 jnthn masak: Express them as type constraints and they're upheld.
21:00 masak true.
21:00 BinGOs scrollback++
21:00 masak but sometimes invariants are inter-attribute.
21:00 jnthn Troo
21:01 jnthn masak: fwiw, I'm not actually that attached to the current way construction/initialization is done. Just putting accross some of the obvious counter points.
21:01 masak that's good.
21:01 jnthn masak: The number of calls it takes to set up an object and our current inability to optimize them away does bother me a bit.
21:01 masak asking ourselves what we really want is probably a good first step.
21:01 starcoder left #perl6
21:02 masak I would prefer something that kept to the same level of respecting private attribute access as the rest of the Perl 6 OO system.
21:02 MayDaniel joined #perl6
21:03 BinGOs masak: both from an IP address in Dallas, Texas according to WHOIS.
21:03 mkramer What's the point of P6Opaque with .new as it is?
21:03 BinGOs not that means anything.
21:03 masak BinGOs: maybe it's pmichaud crank calling us :)
21:03 BinGOs >:)
21:03 jnthn masak: heh, I was just gonna say something like that. :P
21:03 jnthn masak: I'm curious how much code you have that relies on the current encapsulation breakage.
21:03 quietfanatic rakudo: grammar A { token TOP { x make { 'a' } } }; say A.parse("x").ast.perl
21:03 p6eval rakudo 142d22: OUTPUT«Any␤»
21:04 jnthn masak: And how much more or a burden it is to have to write constructors.
21:04 masak in fact, let's go with a concrete example here. class Foo, with attributes $.a, $.b and $.c, all public and rw, but with the proviso that they must all sum to 42 for all defined instances, always.
21:04 jnthn masak: And how many people would say "oh so the solution is has $.foo ratehr than has $!foo" and now they have even less encapsulation.
21:04 masak how do I build it in Perl 6?
21:05 jnthn That is, in trying to push for more encapsulation we may accidentally end up with people writing less encapsulated software.
21:05 masak I can declare my own accessors for all three attributes, and have them return Proxy objects with STORE methods that did the invariant checks. and I'd have to override .new and .clone.
21:05 mkramer masak: constraint network.  That's nothing the language should be doing for you though.  You're always going to have to roll your own constructor for that
21:05 masak somehow, that seems like a lot of work for just one simple invariant.
21:05 jnthn masak: That's a great use for a custom meta-attribute.
21:06 jnthn Which has a .compose that generates the constraint you're looking for.
21:06 mkramer Why do you think that should be simple?
21:06 jnthn er
21:06 masak jnthn: nod. probably someone will do an OO::Invariant module with some nice sugared syntax for this.
21:06 jnthn generates the accessor that you're looking for
21:06 jnthn masak: Right, and there'll probably be several good ways to do it too :-)
21:06 masak mkramer: because I've come to expect simple problems to map to simple solutions in Perl.
21:06 mkramer that's not a simple problem
21:07 masak it was simple enough to state.
21:07 jnthn Well, the halting problem isn't too hard to state. ;-)
21:07 masak "[the attributes] must all sum to 42 for all defined instances, always."
21:07 mkramer You didn't fully state it.  If I add 5 to $.a, whence do I take off 5?
21:07 masak I don't think that's too much to ask, what with encapsulation and all.
21:07 masak mkramer: um.
21:07 masak er.
21:08 masak I guess attributes can't be individually modified under that model.
21:08 flussence yay, I did stuff today! https://gist.github.com/664870
21:08 masak maybe special accessor methods could be created that modify several attributes at once.
21:08 starcoder joined #perl6
21:08 masak flussence: nice!
21:08 jnthn At which point you could just have each of those trigger the constraint check.
21:08 jnthn or
21:08 mkramer So you're asking for cross-attribute type constraints
21:09 masak mkramer: yes.
21:09 masak that was my example, because I think that happens often enough.
21:09 jnthn method my_fancy_accessor($a, $b, $c) is postchecked('foo') { ... }; method foo() { ...czech... }
21:10 jnthn While I can see use cases, I'm not sure what we stand to gain by pulling this into the core langauge.
21:10 flussence I've been trying to figure out why that last test there doesn't work but I'm getting nowhere... anyone know what's wrong with it?
21:11 jnthn I've been able to suggest fairly nice ways to just use the extension mechanisms we already have to get decent support for two different constraint models now. :-)
21:11 masak jnthn: well, I'm really talking about something deeper; making it hard for third parties to create an object that breaks the invariants of the class.
21:11 mkramer Havingross-attribute type constraints doesn't feel like the same issue as the simple fact that there is no private data in perl6 as long as .new is around.
21:11 masak it's funny how a concrete example actually served to confuse people. :)
21:11 masak sorry about that.
21:13 * sorear wanders back
21:14 jnthn masak: But given that if you're going to have to either hand-roll applying the invariants or use some module, and Perl folks tend to like modules, having the module also make sure the check is enforced during creating new objects doesn't seem too burdensome.
21:14 masak maybe so. it's just that in Perl 6, we tend to like really sane defaults too, and Perl 6 OO is full of them.
21:15 masak except in this particular case, with the constructors.
21:15 jnthn Oh, I agree.
21:15 jnthn I'm just not completely convinced the current situation is insane.
21:15 jnthn I can buy it from a "oh no, encapsulation breakage" argument.
21:15 sorear All Chatmosphere users are now banned.
21:16 jnthn sorear++
21:16 jnthn But I do worry that it will drive people to the one-char change of has $!beer to $.beer
21:16 jnthn In order to get a "free constructor"
21:16 sorear I don't know if Blackberry is the same, but iOS IRC clients need bouncers
21:17 sorear because a background app can't keep a socket open for more than 600 seconds
21:17 mkramer ohhh...I see where you're coming from now jnthn
21:17 sorear there was a long thread on this on #mono
21:17 sorear I suspect the host I just banned is a Chatmosphere corporate relay
21:18 sorear Come to think of it, it probably has an I-line; I should ask freenode.net
21:18 flussence I had a look at their website, it seems to be a web IRC thing. Pretty seedy-looking to me.
21:19 picgla1 left #perl6
21:22 mkramer class Database { has $!.dangerous_quality; method dangerous_quality (Foo $a) { $!dangerous_quality = $a; very_important_callback() } };
21:22 mkramer with .new in place, can I trust that very_important_callback() gets called every time my Database has a  $!dangerous_quality set?
21:23 mkramer This might also be a terrible example
21:24 jnthn mkramer: I think this is the point masak++ is arguing. If you don't also write your own .new, then the initial value could be set to whatever the creator fancied.
21:24 masak sorear++ # I enjoyed those people, but they weren't really relevant to #perl6
21:24 masak mkramer: that is indeed the point I'm arguing. thanks.
21:25 masak .perl helps fetch all private attributes, .clone helps store all private attributes (even readonly ones!), as long as you're prepared to get it through a new object, which probably isn't a big deal.
21:26 sorear /who *!*@69.41.179.202 turns up nobody atm
21:27 sorear so I guess they aren't abusing an iline
21:27 * sorear calls of the email
21:29 Tene It's still not obvious to me that there's actually a problem here.  Perl has a history of not trying to keep you from doing stupid things.  If there's not a public accessor, you probably have a pretty good reason for trying to set a private attribute in a constructor.
21:29 Tene Reminds me of this: http://steve-yegge.blogspot.com/2010/07/wi​kileaks-to-leak-5000-open-source-java.html
21:29 mkramer Tene: this isn't an issue until you're programming in the large.  When you are, "that would be stupid, nobody would do that" is not enough.  Either it's guaranteed not to happen, or you must assume that it's already happened.
21:30 masak right. either we should have a *good* encapsulation, or we should go the CLOS and Smalltalk way and not have one at all.
21:31 * masak realizes he has not read a Yegge blog post in months
21:31 Tene mkramer: It's not "That would be stupid; nobody would do that" but "That's unusual, so if you're doing it, you have a reason to do it."
21:32 mkramer Even if there's a reason to do it in some cases, having guarantees about the ways in which objects can come to have the private states that they have is more valuable.  If you ever have an unusual reason, then you have a simple expedient, which is rolling your own constructor, or extending the default with BUILDARGS
21:34 kensanata left #perl6
21:34 orafu left #perl6
21:34 sorear Perl 5 wants you to stay out of its living room because you weren't invited, not because it has a shotgun.  # TimToady?  I don't remember exactly where I read this
21:34 masak I think that's from perldoc somewhere.
21:35 Tene I certainly could just be wrong here; I'm not strongly convinced that I'm right.  Being so concerned about forcing things like this, treating users of your libraries as the enemy, seems a bit OCD paranoid to me.
21:35 sorear Tene++
21:35 mkramer they are your enemy
21:36 mkramer we are talking about tools to protect your api from hostile invaders
21:36 lucs sorear: perlmodlib.pod
21:36 Tene In that case, I'm glad for the warning against using code you produce. ;)
21:36 masak it's not about OCD. it's about either doing encapsulation 100% or not bothering to do it at all, becuase all intermediate settings are worse then those endpoints.
21:36 mkramer Exactly
21:37 mkramer if you'
21:37 orafu joined #perl6
21:37 mkramer if you're going to make this creampuff argument about living rooms and invitations, then why is there such a thing as $! at all?
21:37 mkramer What good is 95% of the way?
21:37 Tene Wait, where did exceptions come in?
21:38 masak Tene: I wondered that too. mkramer means the twigil :)
21:38 Tene Ah.
21:40 masak and I agree. the access to the underlying attributes is a worthy idea, that Perl 6 persues and follows through... up to the point of the constructors, where you're allowed complete access, destroying the whole original idea.
21:40 masak "Perl 6: we almost got encapsulation"
21:41 mkramer lol...ahahahah that's too funny
21:41 mkramer Oh man...it must be friday
21:41 masak not really :/
21:41 jnthn Yah, really, it's Friday.
21:41 masak :P
21:41 sorear The Internet attributes that sentence to Larry Wall, but the oldest citation I can find is Simon Cozens, May 28 2000
21:42 Tene I guess if you really want to directly instantiate an object with given attributes, you can use bless instead.
21:42 sorear mkramer: $! is for namespace control, not security
21:43 sorear $!foo is really $!Class::foo so it can never accidentally collide with another class's local attributes
21:43 mkramer $! was meant as a synechdoche for "the concept of private attributes in Perl 6"
21:43 sorear (trusts is stupid and I'm not going to do it)
21:43 masak either we believe in the control of all access paths to the repr object, and then the current default constructors ought to be modified in some way -- or we ditch the whole thing with an inner layer of attributes and an outer layer of methods, and just bunch them together, making the OO model much simpler.
21:43 Tene I don't know that I would object to the default constructor only setting public attributes.  If you want to set private attributes in your custom constructor, though, that should be fine.
21:44 mkramer That's all we're talking about here.  Obviously, classes are free to expose private data in whatever way they wish
21:44 Tene masak: So... you're going to restrict Bless to only be callable from constructors, or something?
21:44 sorear masak: as an implementor I prefer the status quo to either of your "solutions"
21:44 PerlJam sorear: That phrase was in the 3rd edition of the camel book.  Maybe earlier.
21:44 PerlJam sorear: it's definitely a lwallism
21:45 masak Tene: bless is clearly part of the problem here. I've been trying to understand bless for more than a year now, and I don't feel I'm there yet.
21:45 Tene mkramer: People *have* been saying that being able to set private attributes from constructors is bad: 14:50 < masak> I think being able to set private attributes from the constructor methods is fundamentally wrong.
21:45 masak Tene: all I know so far is that it's very different from the Perl 5 version :)
21:45 sorear bless is broken
21:45 mkramer Tene: masak and I are arguing for the same point right now
21:45 jnthn Critiquing my own point that we may push more people to use $.foo instead of $!foo, I do have to wonder if there's really a common use case where you care little enough about privacy to let people set the values in the first place, but enough that they're not seen again from then on. Maybe. Maybe not.
21:45 jnthn sorear: Is there anything that you don't consider broken? ;-)
21:45 Tene I must have not read closely enough; I didn't see any actual proposals.
21:46 mkramer the default .new should not be able to set private attributes
21:46 sorear jnthn: quite a lot; I've only complainained about what, 100 things so far, out of a spec corpus as big as C++'s :p
21:46 jnthn :-)
21:46 * masak is happy about the discussion that resulted, but overwhelmed by all the opinions
21:46 Tene jnthn: if you want to let them be set in the constructor but nowhere else, you can write your own constructor.
21:47 jnthn Tene: *nod* Yes, making people write the constructor in that case may well be the better default.
21:47 masak <Tene> masak: So... you're going to restrict Bless to only be callable from constructors, or something?
21:47 sorear I agree that allowing has $!foo to be set from .new is wrong.
21:47 * jnthn is starting to come around to masak's view
21:47 masak Tene: I thought that was the *definition* of a constructor in Perl 6.
21:47 jnthn I think the spec pretty much says that a constructor is something that calls bless
21:47 masak Tene: the fact that it returns something .bless'd.
21:47 jnthn All the default .new does is delegate to .bless
21:48 jnthn Well, with a candidate.
21:48 Tene rakudo: class Foo { has $!a; method lol { say $!a }; }; my $x = Foo.bless(*, :a("ohai")); $x.lol;
21:48 p6eval rakudo 142d22: OUTPUT«ohai␤»
21:48 sorear bless in Perl 5 takes an existing data object and turns it in to your class
21:48 Tene Should that be forbidden?
21:49 sorear Tene: I think if you want to set private attributes directly you should have to use CREATE
21:49 jnthn Tene: I think we'd really be talking about chaning bless or the default BUILD
21:49 jnthn Not so much about changing new.
21:49 sorear all caps, like !, is a visual indicator of mucking with innards
21:49 jnthn Probably it's actually the default BUILD that needs to change.
21:49 Tene "all access paths to the repr object" would include bless, right?
21:50 jnthn Tene: I'm not sure I quite follow the question.
21:50 masak Tene: yes.
21:51 masak at least I think it should.
21:51 Tene jnthn: I was primarily responding to masak there: 15:43 < masak> either we believe in the control of all access paths to the repr object, ...
21:51 jnthn Really, .bless doesn't do that much other than call .CREATE if you didn't give it a candidate already, and then calls BUILDALL
21:52 masak actually, at one point I was dismayed that variables typed with a subtype could even be in a state that didn't conform to the invariant of the subtype (namely when they're uninitialized). but I've since come to accept that it must be so.
21:52 mavrc left #perl6
21:52 jnthn oh, that's where the "all paths to the repr object" came from
21:52 Tene jnthn: My question is really, if I have a class I want to instantiate with a set of attributes, is that really unreasonable to do?
21:53 masak that's a good question to ask.
21:53 jnthn .oO( If an attribute is private, is it really there? )
21:54 masak is .bless a third-party tool? I think Tene just shoed that it is. if so, why does it give access to private attributes?
21:54 mavrc joined #perl6
21:54 masak s/shoes/showed/
21:54 masak erghbl
21:54 masak s/shoed/showed/
21:55 jnthn shoe!
21:55 jnthn Maybe another interesting angle to look at it from is, do private attributes contribute to the API of the object
21:55 masak my instinctive response is "no".
21:55 sorear BEGIN SOREAR'S TAKE
21:56 jnthn At the moment they only do by virtue of the constructor leaking named parameters mapping to them.
21:56 sorear .CREATE takes a repr name and 1 or more private attributes
21:56 sorear BUILD submethods take public-API names; has $.foo creates a public-API name, $!foo does not, custom BUILD can have custom names
21:57 sorear .BUILDALL and .bless take public-API names and pass them off to BUILD submethods
21:57 sorear .new takes public-api names, and exists to interpret positionals; .bless never interprets a positional except as a base class
21:57 sorear UNLOCK
21:57 jnthn oops, I spoke within the lock
21:57 jnthn ;-
21:57 jnthn )
21:58 masak now you have a broken smiley face!
21:58 masak as punishment.
21:58 jnthn Oh noes!
21:58 masak dislocated mouth.
21:58 masak it's been shifted sideways and pushed up to eye level.
21:59 jnthn No no, that's the guy next to me's unibrow.
21:59 masak sorear: I like your take.
22:00 jnthn sorear: It makes sense, though I'd rather leave CREATE as it is (just takes a REPR name)
22:00 jnthn And if folks want to se private attrs they can write a custom BUILD.
22:00 jnthn *set
22:00 jnthn But +1 on the publicity
22:00 jnthn er, publicness
22:00 jnthn ...whatever the correct word is. :-)
22:02 mkramer damn, I couldn't follow sorear
22:03 thepler the init_arg option in Moose is useful for this kind of stuff.  is there nothing like it in p6?
22:03 Tene jnthn: So if I want to construct a custom isntance of a given class, I need to rely on the implementation of that class to allow that, or modify that class?
22:03 Tene That seems very wrong to me.
22:04 patspam left #perl6
22:05 jnthn Tene: It's somewhat a scoping issue. If you have a lexical declared inside a class body, there's no way to get at that from outside either. This is just kinda the same apart from then there's one per instance.
22:06 patspam joined #perl6
22:06 jnthn But yes, it would be making $!foo more restricted access than it currently is, for sure.
22:07 masak not even inheritance breaks encapsulation in Perl 6. that's pretty unique, I think. to the people who design Perl 6 OO, it seems clear: "what? no, it's private to the base class." to Java people, that's not clear at all.
22:07 masak in that light, it's strange that currently, object construction breaks encapsulation.
22:08 Tene jnthn: I don't see how that's the same at all.  I must be failing to generalize here.
22:09 jnthn thepler: There's not an init_arg equivalent, though in a sense this discussion is about whether has $!foo defaults to init_arg => undef or not.
22:10 jnthn Tene: Well, or I could be trying to over-generalize. :-)
22:14 _kaare left #perl6
22:22 sorear the following code fragment shows up a bit in niecza:
22:22 sorear if ($r) {
22:22 sorear %$op = %$r;
22:22 sorear bless $op, ref($r);
22:22 sorear }
22:22 sorear I wonder what niecza-v6 should do
22:22 mkramer random thought:
22:23 mkramer has $!foo is Constructable
22:27 mkramer the funny thing is that I can't think of a use for such a hypothetical adverb
22:27 masak s/adverb/trait/
22:30 meppl left #perl6
22:39 mavrc left #perl6
22:43 MayDaniel left #perl6
22:43 masonkramer joined #perl6
22:45 moritz_ jnthn: sounds like one of your puns: https://nerdball.nerd2nerd​.org/images/3595/img.jpeg
22:45 moritz_ sorry, wrong URL
22:45 moritz_ http://s.gullipics.com/image/z/​v/i/hq2x3b-ewjf1-3pa8/img.jpeg
22:47 * jnthn visits both :)
22:48 jnthn moritz_: Awesome!! \o/
22:52 moritz_ jnthn: and another one: http://ircz.de/static/pics/2​010/01/11_05_20_50/RQ0Oj.png
22:53 jnthn :D
22:53 jnthn Those are grat.
22:53 jnthn *great
23:07 masak blog post! http://strangelyconsistent.org/blo​g/november-5-2010-aim-for-the-eye
23:07 envi joined #perl6
23:11 jnthn Nice :-)
23:11 getpwnam joined #perl6
23:13 tri joined #perl6
23:14 Eevee joined #perl6
23:14 getpwnam left #perl6
23:14 jnthn .oO( štyri )
23:17 jferrero left #perl6
23:20 sorear masak: You should be using $target.IO.changed before any(@sources).IO.changed
23:20 masak ooh!
23:20 masak sorear++
23:21 masak that's what I get for refusing to use junctions in a really first-class manner. :)
23:21 masak very nice. I'll change it to that, and addendum the blog post.
23:21 jnthn :P
23:21 jnthn All that work on junctions and masak don't even use 'em. :P
23:22 * masak <-- ungrateful Perl 6 weenie
23:22 jnthn hehe
23:22 masak anyway, this is why I like hanging out my code in public. people improve it.
23:23 Tene masak: you need to add an extra semicolon every 20 characters.
23:23 masak huh?
23:23 Tene You seem to be accepting unsolicited edits to your source.  I'm offering one.
23:23 masak where?
23:24 masak Tene: sure, but I'm totally without context.
23:24 masak extra semicolons where?
23:24 Tene masak: You were talking about improving your code, so I offered an edit that would break everything.
23:24 masak ah. a "joke". :)
23:25 Tene It wasn't helpful, just trolling that missed its mark.
23:25 jnthn Harsh!
23:25 jnthn :)
23:25 masak I forgot to mention the part where I (and my peers) do something called "judiciousness" :)
23:25 Tene It seems you much more expect me to be helpful than to be harassing.  Interesting.
23:25 masak I do, and I will continue to do so.
23:26 masak one of these days it will pay off.
23:37 sorear things terminals do to annoy me: I copy and paste a printed command line, and it gets cut into 4 lines
23:37 sorear -bash: ecza/obj/NAME.cs: No such file or directory
23:38 stkowski left #perl6
23:39 masonkramer any(@sources)...love it love it love it
23:39 masak it's now in the post. it only took 4m20s to update it :P
23:39 masak I'm sure I can shave that time down even further if I try.
23:42 masonkramer So often that's what grep and map end up getting used for

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

Perl 6 | Reference Documentation | Rakudo