»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
sorear diakopter: want infinoid pinged? 00:00
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
TimToady I think marks should be included in printable, which is there primarily to prevent your terminal from asploding from control chars 00:02
00:03 risou left 00:05 aubreyja joined 00:11 jhuni joined
masak ok.. what is this perl 6 about?? 00:29
does it have something to do with Blackberry??
today's improvements seem to have brought the static page generation down from ~8 minutes to ~6 minutes. 00:30
00:31 xabbu42 left
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
and easily improvable.
Tene masak: you've got a port of Devel::NYTProf to Perl 6 ready, right? 00:37
masak eheheh.
diakopter eheheh hee
masak no, I'm timing using `time`.
colomon if that's what you're announcing in December, I'll consider naming my second-born Masak. 00:38
00:38 Limbic_Region joined
masak that would surely be an honor. I'll consider it. 00:38
anyway, blog post! strangelyconsistent.org/blog/novemb...t-overflow
and now, I bid ye a good night. 00:39
colomon \o
00:40 masak left
sorear colomon: not Carl? 00:41
diakopter and, google and apple merge to form a 500B company named goople
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:42
00:43 impious left
sorear ok, I think I'm out of LHF optimizations for the new for loops 00:46
down to 880 ns
64 times faster than yesterday, still 5.5 times slower than p5 :( 00:47
colomon that's still, what, two orders of magnitude faster than Rakudo? 00:50
00:57 jasonmay left 00:58 aubreyja left 01:00 jasonmay joined
sorear 226 ns Perl 5 13 us Niecza 367 us Rakudo on the new ctxmark.pl 01:01
which conveniently is a polyglot
01:01 kanishka joined 01:07 [1]Limbic_Region joined, stkowski left 01:09 Limbic_Region left, [1]Limbic_Region is now known as Limbic_Region 01:16 dnl left
sorear colomon: closer to 3; last measurement 600us (2010.09-10-g13c8a23) 01:24
01:24 dnl joined
colomon sorear++ 01:25
sorear now I'm focusing on my $x = 0; $x++ until $x == 10_000_000; 01:27
01:35 lidden left 01:46 kanishka left
lue ohai o/ 01:48
01:49 risou__ joined, risou__ left
colomon Apparently my tune "The Phantom Wristband" completely breaks my p6 ABC code. :\ 01:56
or I just screwed up pbcopy and pbpaste again. 02:03
ah, when properly applied it just dies halfway through. 02:05
02:10 plobsing joined 02:23 warthurton joined 02:29 agentzh joined
colomon I never programmed a double bar line into the ABC grammar. What an odd thing to overlook! 02:31
02:41 cdarroch left 02:47 whiteknight left 02:50 jrockway left 02:52 obra left 02:56 Chillance left, justatheory joined 03:05 jrockway joined
dukeleto Are there any Perl 6 people interested in created Perl 6-related tasks for Google Code-In? 03:08
I would really like to see some Perl 6 tasks on trac.parrot.org/parrot/wiki/GoogleC...n2010Tasks
03:08 Limbic_Region left 03:15 am0c joined 03:23 [particle]1 joined, [particle] left
lue ooh, Google Code-In starts the day before DW's 47th anniversary! 03:31
03:37 justatheory left
dukeleto DW? 03:48
04:00 justatheory joined 04:09 justatheory left 04:32 dnl left 05:06 QinGW joined 05:20 QinGW left 05:29 am0c left 05:31 QinGW joined 05:49 quietfanatic joined
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␤»
quietfanatic rakudo: my rule x { x }; say "x" ~~ x
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␤»
quietfanatic rakudo: our rule x { x }; say "x" ~~ x
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␤»
quietfanatic This is...not expected. 05:50
05:55 _kaare joined
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␤»
TimToady rakudo: my regex x { x }; say "x" ~~ /<x=&x>/ 06:07
p6eval rakudo 142d22: OUTPUT«x␤»
sorear a microoptimization of nominal type checks made the for benchmark ~50% faster 06:19
sorear is not pleased that the JIT is still 4x slower than Perl 5... 06:20
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 06:44 flatwhatson joined 06:50 flatwhatson left 06:52 wtw joined 07:02 flatwhatson joined 07:12 araujo left 07:24 araujo joined 07:31 drbean_ is now known as drbean 07:32 meppl joined 07:46 mavrc joined 07:50 xabbu42 joined 07:55 dual left 08:44 trbhoang joined 08:49 trbhoang left 08:54 sftp left 08:55 sftp joined 09:07 xabbu42 left 09:31 cjk101010 joined 09:41 dakkar joined 09:47 timbunce joined 10:05 QinGW left 10:12 mberends left 10:28 mberends joined 10:37 smash joined
smash hello everyone 10:38
moritz_ o/ smash
smash trying to run benchmarks including the new rakudo star release 10:44
but the process is getting a bit heavy :\
10:50 ggoebel left 11:04 timbunce left 11:18 drbean left 11:22 ggoebel joined 11:26 drbean joined 11:27 ggoebel left 11:31 sftp left 11:34 sftp joined 11:36 ggoebel joined 11:41 ggoebel left 11:48 mavrc left 11:49 mavrc joined 12:03 Due_ joined 12:04 Due_ left
takadonet yo 12:05
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!␤»
bbkr std: require ::;
p6eval std a194beb: OUTPUT«ok 00:01 118m␤»
bbkr is curious what should it load... 12:19
std: require *; 12:22
p6eval std a194beb: OUTPUT«ok 00:01 118m␤»
12:24 kanishka joined 12:26 ggoebel joined
jnthn Probably explodes if parse_name returns an empty array or something. 12:45
(We often rely on being able to .pop the result..) 12:46
12:48 mikehh joined
moritz_ std: require 1 + 2; 12:53
p6eval std a194beb: OUTPUT«ok 00:01 119m␤» 12:54
moritz_ bbkr: syntactically, require just expects a term
12:54 mikehh left
bbkr moritz_: which is nice feature for plugins loading. require "Plugins::" ~ $sth. 13:02
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
moritz_ like Module::Pluggable in p5 13:05
13:06 xabbu42 joined
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 13:09 bluescreen is now known as Guest78750, dnl joined 13:15 ggoebel left 13:18 masak joined
masak oh hai, #perl6! 13:18
moritz_ oh hai masak
smash masak: hello
masak I have this odd feeling there was something I ought to remember today... :P 13:19
moritz_ the date?
remember, remember
the 5th of November
13:19 wamba joined
masak right! that's it! :) 13:19
13:20 ggoebel joined 13:21 mavrc left 13:22 Patterner left
moritz_ would be surprised if masak++ didn't use the Guy Fawkes thing in his first blogging November 13:23
masak you recall correctly.
Franklin Roosevelt got the second year. strangelyconsistent.org/blog/novemb...g-in-there 13:24
mathw o/ 13:25
13:25 [particle]1 is now known as [particle] 13:27 MayDaniel joined
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. :)
masak colomon: \o/
13:31 jhuni left
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.
or even Text::Wrap?
masak right.
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
yes, maybe the answer is simply "use a module".
moritz_ I guess the first step is splitting on \n**2..*
13:33 Psyche^ joined, Psyche^ is now known as Patterner
moritz_ the rest depends on the expected output quality 13:34
mathw wrapping is a PAIN
as I discovered with Form
which has an astoundingly simplistic wrapping algoritm
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
moritz_ then chop of everything up to that blank, and start again
masak there's a wrapping algo in ufo. I think it does what moritz_++ suggests.
masak looks
colomon alas Text::Wrap isn't in modules.perl6.org yet.
moritz_ XML::Writer uses something much easier: it counts the columns, and wraps if > 80 13:36
or > 70
mathw colomon: \o/
I suspect Form may start to depend on that at some point
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.
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.
it's less messy than it sounds, because it's not in-place. 13:37
colomon takadonet is working on Text::Wrap.
masak takadonet++
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
13:38 MayDaniel left 13:42 hanekomu joined 13:44 mavrc joined 13:50 kanishka left
takadonet soon soon. Lots of things to do at work right now 13:52
masak takadonet: no rush. (hurry hurry hurry) 13:58
takadonet masak: well Text::Tabs is done 14:01
masak: and only one fcn left to do in Text::Wrap ( only were 2 fcn in the first place)
masak takadonet: what is Text::Tabs' relation to the Str.indent method?
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:02
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.
limitations in Perl 6 regexes can often be overcome by doing low-level string twiddling.
takadonet indeed
14:06 alester joined 14:07 Guest78750 left
takadonet rakudo: "I want this to work so badly!" ~~ /(\N**0..5)/ 14:11
p6eval rakudo 142d22: ( no output )
takadonet rakudo: "I want this to work so badly!" ~~ /(\N**0..5)/ say $0;
p6eval rakudo 142d22: OUTPUT«===SORRY!===␤Confused at line 22, near "\"I want th"␤»
takadonet ... stupid ;
rakudo: "I want this to work so badly!" ~~ /(\N**0..5)/ ; say $0;
p6eval rakudo 142d22: OUTPUT«I wan␤»
masak seems to work so badly already :)
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)/ ;"␤»
masak ah.
I think that's one place where all the ingredients are there, but there's a bit of a bus number involved.
takadonet nuts 14:13
moritz_ not sure if the number of repetitions must be known at compile time 14:14
14:15 simon__ joined
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
moritz_: I don't see why it would. so many other things are dynamic in regexes.
takadonet masak: time is always my limiting factor
masak nodnod 14:16
14:16 PerlJam joined, PerlJam left 14:17 PerlJam joined
moritz_ there's a PAST::Regex.new(:pasttype<quant>) which accepts :min and :max 14:18
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
then it's a simple matter of extending the parser (steal from STD.pm6) and the action methods 14:20
takadonet colomon: I was then... shit happen at work hehe. I'm planning putting everything on asap 14:22
14:23 Guest78750 joined 14:29 cjk101010 left
moritz_ std: / a ** $_ .. $_ / 14:31
p6eval std a194beb: OUTPUT«ok 00:01 122m␤»
moritz_ uhm 14:33
I suspect that's parsed just like a ** b
14:33 mkramer left
moritz_ you really need a ** { closure } 14:33
14:34 mkramer joined
moritz_ so *that's* the version you need to enable in rakudo 14:34
and since it relies on returned ranges, you must do it Rakudo (nqp-rx has no Range)
14:35 pyrimidine joined 14:51 Guest78750 left, patspam joined 14:54 tadzik joined
masak it would be nice to see more Perl 6 tasks on trac.parrot.org/parrot/wiki/GoogleC...n2010Tasks 14:55
but I can't currently think of any good candidate tasks. 14:56
tadzik hey masak!
masak hello there, tadzik 14:57
tadzik everyone else hello as well :)
15:00 aesop left
jnthn oh hai 15:02
masak jnthn! \o/
jnthn masak! \o/
Have a gut time in Vienna?
masak aber ja.
this might interest some. axisofeval.blogspot.com/2010/07/c-4...-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
Wien is a much prettier city than Paris. :)
15:03 Guest78750 joined
jnthn masak: I concur. :-) 15:05
moritz_ I think Paris is only beautiful if somebody shows you the beautiful places
jnthn I miss having it a 1 hour train ride away.
masak moritz_: right. whereas in Wien, we just wandered around, and never saw anything outright un-pretty.
moritz_ fights with mathworld.wolfram.com/EllipticIntegral.html 15:06
smash moritz_: remember this github.com/smashz/perl6-CGI-Cookie ? :)
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.
moritz_ smash: I remember, but in the mean time lost a bit of motivation to hack on CGI::App 15:07
sorry about that
smash hehe, no problem 15:08
tadzik smash: hey, have you tried benchmarking newest Star? 15:09
15:10 Chillance joined
smash tadzik: i already added the new release but still trying to run the benchmark script 15:11
it's getting really heavy to run
and it takes a lot of time
tadzik I see
smash it's running as we speak, for like 5 hours already :) 15:12
arg, givin' errors now 15:13
colomon: prime.pl in bench-scripts repo is giving an error: sudo route -nv add -host 192.168.1.19 -interface tun0 15:14
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
colomon should be batch 15:15
(I think)
no, wait. 15:17
are you having trouble with an older version of Rakudo?
(trying it locally, and of course it's taking two minutes, since it works!) 15:18
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.
colomon smash: I'll try to check in a more backwards compatible version in a moment. 15:20
15:21 TiMBuS joined 15:23 MayDaniel joined 15:24 aesop joined 15:25 mtk joined
colomon smash: try the versions I just pushed. 15:29
er, just pushed now.
15:31 mtk left 15:32 mtk joined 15:35 kensanata joined 15:36 Naa joined, Naa left 15:37 Naa joined, Naa left 15:39 Naa joined, Naa left 15:40 Naa joined, Naa left
jnthn "Shall I stay on the channel? Naa!" 15:41
smash colomon: i'll try it later, the process takes hours to run.. thks
arnsholt is amused
masak jnthn: apparently he reached that decision several times.
15:42 aesop left, araujo left
masak who's willing to step up and manage a list of topics/writers for this year's Advent Calendar? 15:43
tadzik looks who steps out first 15:45
masak tadzik! I knew I could count on you! :)
colomon and where should the list be mantained?
masak Mu? 15:46
colomon *maintained
tadzik ecosystem? :)
masak ecosystem contains modules, not blogging plans. :)
tadzik darn, I always get into trouble :)
masak tadzik: I know you'll do a fine job.
colomon took several seconds to realized "Mu?" was a possible answer rather than a question.
tadzik as soon as I get my internets back
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.
tadzik masak: build what? The list?
masak yes.
masak tries to find last year's
tadzik hm. Any ideas, of what we didn't cover yet?
maybe Rakudo hacking, or something?
you could write something about it, couldn't you, masak? 15:48
tadzik whistles
masak :)
I'd like to see us optimize for newcomers, in some way.
tadzik are there tests for the last year's calendar?
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
masak ggoebel: yes, as a (now outdated) gist. 15:49
ggoebel: I can give you that, or something better, depending what you need. 15:50
15:50 wtw left
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
but that's almost a year ago.
colomon tadzik: are you on wordpress as a contributor to the Advent calendar blog?
tadzik colomon: yes 15:52
colomon \o/
tadzik I figured out the easiest way to get a short list of posts is to go to the Dashboard :/
colomon I think we could probably use an updated Sequence operator post this year. 15:53
15:53 araujo joined
masak ggoebel: while you deliberate, here's the gist: gist.github.com/601864 :) 15:53
colomon An updated "how to get Rakudo" that covers Rakudo *
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
just need something that I can get up and running quickly...
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!
pardon my shouting, I didn't want to forget it
masak ggoebel: that is, a .tar.gz file with a working example blog system.
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?
masak ggoebel: you *should* be able to just hotswapt that new module then, and keep running with it. but no guarantees.
ggoebel I'm willing to try pain... :) 15:57
masak excellent. five minutes.
15:57 kanishka joined
jnthn tadzik: NativeCall uses the same trait-y mechanism too. 15:57
tadzik right
gist.github.com/664348
short list, from the top of my head
maybe something targeting Perl 5 programmers? 15:58
something about the module system?
colomon module system +1
15:59 agentzh left
tadzik I'll maybe post that to perl6-users 15:59
ideas? Call for ideas
moritz_ szabgab++ # szabgab.com/blog/2010/11/perl-ecosy...group.html
16:00 MayDaniel left
tadzik szabgab++ # awesome! 16:00
moritz_ (though s/efforts/goals/ would be better, IMHO)
16:00 AABH2ZL joined 16:01 sscaffid joined
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:02
colomon certainly enough things have changed to warrant a post like that. 16:03
tadzik does that mean yes?
I suppose so *adding*
16:04 sscaffid left, sscaffid joined, patspam left 16:05 patspam joined 16:06 sscaffid is now known as hercynium 16:07 spq1 left
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:07
colomon we got oodles of attention last year, it was a huge success in those terms. 16:08
I don't do reddit, and don't know how much attention (if any) came from that channel.
tadzik takadonet++ reddits lots of Perl (and Perl 6) related stuff 16:09
takadonet :)
tadzik trac.parrot.org/parrot/wiki/GoogleC...rl6T-Shirt -- dang, I'm so looking forward to this :) 16:10
16:13 risou joined
colomon errr, I have a perl 6 t-shirt. 16:15
or rather, a Rakudo t-shirt.
from YAPC::NA
actually, I had another as well from cafe press, but I haven't seen it in four or five months now. 16:16
16:16 Naa joined
Naa join 16:16
hii 16:17
masak Naa: hi!
Naa 13what's ur name ?
masak Naa: we're happy you're here. welcome to our humble adobe.
masak <-- masak's name
Naa 13u are wellcome 16:18
masak so are you :)
Naa 13hii masak
masak hii \o/
Naa 13im women i come from Indonesia 16:19
mkramer I'm totally getting the shirt
Naa 13 :p
masak welcome hither, woman from Indonesia! 16:20
rakudo: say "Hi, Naa! I'm a program!"
p6eval rakudo 142d22: OUTPUT«Hi, Naa! I'm a program!␤»
16:20 hanekomu left
tadzik (: 16:20
moritz_ masakbot!
tadzik I'm also thinking about a laptop sticker 16:21
masak moritz_: in the end, we're all software.
tadzik <insert sexually offensive comment here>
16:21 lidden joined 16:22 Naa left
masak tadzik: <gentle but reproachful putdown based on channel standards> 16:22
tadzik I hope I didn't scare her :)
masak Naa :)
but try to avoid it next time, just in case.
tadzik sure thing
16:22 mikehh left
masak uttering the words "sexually offensive" as soon as a woman enters is... less than awesome. :/ 16:23
16:23 Naa joined
masak Naa! \o/ 16:23
Naa yess
tadzik begs for forgiveness 16:24
masak Naa: we were just discussing the limits of civil discourse.
Naa 13ok
masak Naa: how are u? 16:25
16:25 cdarroch joined, cdarroch left, cdarroch joined
Naa 13maybe im not join, because i dont understand 16:25
13fine
13masak u are male or female ?
masak Naa: yes, most of the time I am. 16:26
Naa: I'm a stereotypical male.
Naa 13LoL
masak (that is, I have a stereo at home)
Naa 13nice to meet u all
masak likewise. 16:27
Naa: have you seen our butterfly?
huf masak: you type on your stereo?! i'm confused
or does that mean you type with both hands?
florz are you all filtering mirc colors that you still haven't engaged your clients' ignore powers? =:-)
masak huf: no, I just own a typical stereo :)
Naa: perl6.org/camelia-logo.png
moritz_ statically typed stereo! 16:28
masak florz: my client is too awesome to bother me with colors :)
florz it's a useful troll hint, you see? =:-)
Naa 13ur client ?
masak florz: she's not a troll, she's a female from Indonesia. 16:29
florz erm, yeah, sure
huf trolls cant be female?!
i'm going to the nearest bridge to start a protest against that kind of discrimination
masak that's not what I meant :)
florz *gg*
huf :)
tadzik watch out for trolls looking for myto at the bridge
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.
huf unless they bump into the troll's front of indonesia ;)
masak huf: "troll's". Indonesia has but one troll? :P
Naa 13heiiiii im female foresure florz
huf oh no, i'll be hearing from the plurals' front of indonesia now
masak Naa: did you look at perl6.org/camelia-logo.png yet? what do you think? 16:31
huf: :P
Naa: you don't happen to own a blackberry, do you?
masak .oO( blackberry-typical female )
Naa 13yes 16:32
masak \o/
*lol*
tadzik is blackberry promoting #perl6 somehow?
Naa 13i used my BB
masak "promoting" :)
16:34 Naa left
tadzik interesting 16:35
I imagine some Chatmosphere dev being a silent Perl 6 fan and "accidentally" setting #perl6 as a default channel or something 16:41
masak yeah, same here. 16:46
tadzik or we could simply ask the next suprisecomer 16:51
takadonet masak: not my best work but..... github.com/Takadonet/Text-Tabs-Wrap 16:54
masak reads 16:57
16:58 justatheory joined
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!
masak ok. 16:59
16:59 tadzik left
masak anyway, it all looks good. please add it to the ecosystem, too. 17:00
github.com/perl6/ecosystem
takadonet masak: just removed them now. Only one test module so far
only one test module passed so far
masak nod 17:01
17:02 tadzik joined
takadonet do not have commit bit :( 17:02
masak hugme: add takadonet to ecosystem 17:03
hugme masak: sorry, I don't know anything about project 'ecosystem'
masak hrm.
and I don't seem to have a metacommit bit. so we'll have to await someone who does. 17:04
either that, or I'll add you myself.
17:07 dual joined
masak there; added. should show up on modules.perl6.org/ soonish. 17:07
by the way, Camelia image link on modules.perl6.org/ is broken. :/
17:08 pyrimidine left, pyrimidine joined 17:13 MayDaniel joined 17:14 risou left 17:15 risou joined
TimToady sorear: you can blame me for the mark stack; I used to be smart, y'know... :) 17:27
course, several other things help P5's list performance, like knowing list context at compile time, and flattening everything willy nilly 17:29
and, of course, always being eager
masak Wikipedia informs me that the mark stack "saves bookmarks to locations in the argument stack".
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
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:32
also, it might be instructive to try to reduce perl5 to something "sane" and cruftless. 17:33
IIUC that's not exactly the goal of perl5i.
TimToady you too could create a new language... :)
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)
(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.
I will have a look at Kurilla.
TimToady well, since you have nothing else to do, you might as well... :P
jnthn I hope I spelt it right, or you'll have fun in Google. :-)
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:35
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? :)
jnthn: I hope so too. I'll be sitting next to you :)
or did you mean this weekend?
jnthn masak: wait, you're coming...what
masak: That's not this weekend, that's next weekend, right? 17:38
masak yes...
jnthn Otherwise you'd be on a train, like, right now. :-)
masak indeed.
sorry about the confusion. for some reason I thought you meant next week's weekend.
jnthn You're so confusing. :P
masak I am.
even I'm confused now.
TimToady huh?
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
Anyway, yes, it's this weekend that I need to prepare for $course.
masak puns through my ears. sounds punful. 17:40
jnthn Next week's weekend is nice and free. :-)
masak \o/
jnthn
.oO( If I start punning really hard, they'll go in one ear and out the other... )
17:41
17:41 simon__ left
masak there's nothing to ear but ear itself. 17:41
TimToady corny... 17:42
masak hangs head
TimToady shucks 17:43
colomon is a-maized at what goes on around here... 17:46
jnthn Puns could crop up at any moment. 17:47
TimToady is tired of stalk jokes
jnthn We should leave off them for a bit. 17:48
masak a pun holiday? what an idea.
TimToady at least the kernel of an idea 17:49
masak Colonel of an idea or a General idea?
TimToady that's chicken, either way
jnthn Eep, all the things near the top of the 6model ROADMAP are tricky. :-) 17:50
TimToady .=reverse
jnthn Darn, that didn't change anything. :P
Apart from creating dependency issues. ;-)
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
jnthn szabgab: You're cooking mberends?! 17:52
TimToady is he ready to eat?
szabgab moritz_: thanks for the link, effort was replaced by goals
sorear good * #perl6
jnthn o/ sorear 17:53
szabgab mberends: pls stop lauging
or however that should be spelt 17:54
TimToady don't start with the spelt jokes
17:56 dakkar left
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!␤»
TimToady that's supposed to work, but instead it interprets the block as a normal closure, and uses '' for the delimiter, it seems 18:02
takadonet TimToady: for a sure there, I thought it was working :( 18:03
TimToady oh, moritz_++ already figgered it out
Tene TimToady: overloading ** to mean both delimiter and quantifier has seemed like a mistake since I first saw it, fwiw. 18:04
it also means that it's rather more awkward to express a quantified limited match. 18:05
"five comma-separated values"
TimToady the speculation is that \d+ ** 1..5 ** ',' would handle that 18:06
or some such
Tene Eww. >.>
This is the kind of overloading that I've enjoyed seeing Perl 6 move away from in other areas. 18:07
TimToady giving it a different name won't help with the composition much 18:13
18:14 kanishka left
masak sushi & 18:14
hercynium sushi++ # should have had that for lunch today :) 18:15
TimToady I still could, but shouldn't... 18:16
18:17 aesop_ joined
sorear What things from modules.perl6.org should I suck into Niecza? 18:18
tadzik maybe Acme::Meow? It didn't work the last time I checked 18:19
unless you mean "as a standard, shipped with niecza modules" 18:20
sorear I mean, shipped with Niecza, and maybe tested as well 18:23
tadzik benchmark? 18:24
colomon sushi++ indeed. sadly lacking in my new hometown. :( 18:25
18:29 ChanServ sets mode: +o sorear, sorear sets mode: -b *!*vacates@2001:470:80e8:ab23:fe3a:fd01:ad05:* 18:30 sorear sets mode: -b *!*outdone@2001:470:80e8:ab23:fe3a:fd01:ad05:*, sorear sets mode: -b *!*fence@2001:470:80e8:ab23:fe3a:fd01:ad05:*, sorear sets mode: -b *!*stalled@2001:470:80e8:ab23:fe3a:fd01:ad05:* 18:31 sorear sets mode: -b *!*lambdabo@*.members.linode.com, sorear sets mode: -b *!*lambdabot@*.members.linode.com 18:32 stkowski joined, sorear sets mode: -b *!*@212.183.195.35.dyn.user.ono.com, sorear sets mode: -b *!*@213.Red-83-34-110.dynamicIP.rima-tde.net 18:33 sorear sets mode: -b *!*@85.136.148.151.dyn.user.ono.com 18:34 sorear sets mode: -b *!*@68-184-244-153.dhcp.stls.mo.charter.com, sorear sets mode: -o sorear 18:42 kanishka joined 18:47 wamba left 18:48 icwiener joined
sorear I removed 1. stale DHCP IPs 2. individual bans that are subsumed by group bans still present 3. lambdabot 18:53
if lambdabot comes back, tell me and I'll "@part #perl6"
I've been a lambdabot admin since 2007, coincidentally
18:58 smash left 19:03 hercynium left
Juerd The remaining ban list is still quite long 19:03
Don't bans ever expire? 19:04
sorear No
Juerd They all carry the same timestamp. That's weird. 19:05
sorear that is the timestamp of the last netsplit
Juerd I see
sorear we could just remove all the bans and see what happens 19:06
Juerd I think that's a good idea
sorear I support this but won't do it unilaterally
ok
19:06 ChanServ sets mode: +o sorear 19:07 sorear sets mode: -bbb *!*leontopod@unaffiliated/teratogen *!*leontopod@intertwingled.net Aniya!*@*
Juerd Even if it should cause trouble, restoring the specific bans is easy 19:07
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
19:08 sorear sets mode: -bbbb *!*@2001:470:80e8:ab23:fe3a:fd01:ad05:* *!*@62.57.88.34.static.user.ono.com *!*@66-189-42-131.dhcp.oxfr.ma.charter.com *!*@87.111.43.72
Juerd Very few people persist their join attempts after a few days. 19:08
19:08 sorear sets mode: -bbbb *!*@host-81-190-242-175.malbork.mm.pl *!*@eu85-86-160-186.clientes.euskaltel.es *!*@host193-252.pool8289.interbusiness.it *!*@AMarseille-157-1-144-207.w90-37.abo.wanadoo.fr, sorear sets mode: -bbbb *!*jagobah@62.57.82.* *!*mars@89.41.21.* youaredead*!*@* *!*Webchat@*.reznet.ucalgary.ca, sorear sets mode: -bbbb *!Webchat@209.91.114.* *!*jefferso@200.220.140.* *!*@CPE-121-216-123-77.lnse2.ken.bigpond.net.au yecfwmyvz!*@*, sorear sets mode: -b *!**@c-71-195-46-68.hsd1.mn.comcast.net
Juerd Four at a time even. Be careful not to overload the irc server :P 19:08
sorear irssi has a LOT of cleverness for efficient handling of bans and kicks 19:09
I do not suspect it was designed for freenode :)
Juerd The original #irssi was on ircnet if I recall correctly
sorear huh. Well I guess this isn't needed either 19:10
19:10 sorear sets mode: +i
Juerd ircnet has no services, so all channel management is done by bots and actual people 19:10
19:10 sorear sets mode: -i 19:13 sorear sets mode: -o sorear 19:14 hercynium joined 19:27 x3nU is now known as xenu, xenu is now known as Guest63611, Guest63611 is now known as x3nU 19:32 envi left
diakopter dukeleto: did you get p6 code-in ideas? 19:38
dukeleto diakopter: i made some perl6 tasks, but i can surely use more. 19:39
diakopter: Parrot and Perl got accepted, as 1 of only 20 "orgs" to be involved this year.
diakopter: non-code tasks are very valuable
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
diakopter: typo! Care to fix it?
19:40 PerlPilot joined
diakopter I'm on vacation :) 19:40
dukeleto diakopter: just please use the template
diakopter: yeah, so am i.
TimToady but see www.cafepress.com/rakudo
dukeleto TimToady: you are correct. there already exist Perl 6 shirts. But obviously we need more. 19:41
TimToady++ # keeping my honest
19:43 PerlJam left, PerlPilot is now known as PerlJam 19:46 kanishka left
diakopter probably TimToady was referring to GoogleCodeIn2010Tasks where it says "currently we do not have any Perl 6 T-shirts." 19:46
19:46 jferrero joined
dukeleto diakopter: i just fixed that :) 19:47
diakopter: in the process of fixing it actually
19:48 kanishka joined
dukeleto diakopter: fixed. 19:48
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:49
TimToady: i am only talking about the graphic for the t-shirt. the actual production/printing of them is another matter 19:50
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:51
19:52 MayDaniel left 19:54 hercynium left
TimToady dukeleto: see github.com/perl6/mu/raw/master/misc/camelia.txt for terms of usage 19:59
20:01 warthurton left 20:07 Guest78750 left, Guest78750 joined
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)␤»
masak ggoebel++ # has got psyde running, so there are now two instances in use
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
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
Util Why didn't .bless pass parameters to BUILD? 20:08
masak good question. 20:09
jnthn It probably did 20:10
masak ...but...?
jnthn *@args captures positionals
masak oh! :)
masak is glad he didn't submit a rakudobug :)
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
Util thanks! 20:13
20:18 mtk joined 20:19 plobsing left 20:24 x3nU left 20:30 mtk left 20:32 estrabd is now known as estrabbdbababa 20:33 estrabbdbababa is now known as estrabd_aftmfk
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
20:40 mtk joined
jnthn "Override .new and .clone!" ;-) 20:41
masak which is equivalent to saying that the default implementation of those methods aren't compatible with upholding object invariants. 20:42
20:44 picgla1 joined
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:45
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
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
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 20:53 Guest78750 left, Chat6629 joined, mtk left
Chat6629 hi too all the sweet ladies in here 20:54
any lovely lady wanna chat
20:55 Chat6629 left
BinGOs blinks. 20:55
quietfanatic Is make() in grammers NYI? 20:56
jnthn masak: I can see that argument.
masak quietfanatic: Rakudo internals rely heavily on make() 20:57
quietfanatic Hm, then maybe it doesn't work how I think it works
masak too bad Chat6629 didn't show up when Naa was still here...
quietfanatic Doesn't it change the return value of the regex to be what you give to it?
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.
BinGOs masak: heh
masak quietfanatic: no, it's more of an annotation. 20:58
quietfanatic Huh
masak quietfanatic: it sets the .ast attribute.
jnthn quietfanatic: It sets something that you can get with .ast
quietfanatic Ah...
mkramer I agree with you masak, fwiw
quietfanatic I see. Let me see if I can use that.
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.
BinGOs masak: indeed they can probably have a nice chat offline as they share the same computer.
masak BinGOs: oh? 21:00
jnthn masak: Express them as type constraints and they're upheld.
masak true.
BinGOs scrollback++
masak but sometimes invariants are inter-attribute.
jnthn Troo
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.
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.
masak asking ourselves what we really want is probably a good first step.
21:01 starcoder left
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
21:02 MayDaniel joined
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?
BinGOs not that means anything.
masak BinGOs: maybe it's pmichaud crank calling us :)
BinGOs >:)
jnthn masak: heh, I was just gonna say something like that. :P
masak: I'm curious how much code you have that relies on the current encapsulation breakage.
quietfanatic rakudo: grammar A { token TOP { x make { 'a' } } }; say A.parse("x").ast.perl
p6eval rakudo 142d22: OUTPUT«Any␤»
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.
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.
masak how do I build it in Perl 6?
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.
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
masak somehow, that seems like a lot of work for just one simple invariant.
jnthn masak: That's a great use for a custom meta-attribute.
Which has a .compose that generates the constraint you're looking for. 21:06
mkramer Why do you think that should be simple?
jnthn er
masak jnthn: nod. probably someone will do an OO::Invariant module with some nice sugared syntax for this.
jnthn generates the accessor that you're looking for
masak: Right, and there'll probably be several good ways to do it too :-)
masak mkramer: because I've come to expect simple problems to map to simple solutions in Perl.
mkramer that's not a simple problem
masak it was simple enough to state. 21:07
jnthn Well, the halting problem isn't too hard to state. ;-)
masak "[the attributes] must all sum to 42 for all defined instances, always."
mkramer You didn't fully state it. If I add 5 to $.a, whence do I take off 5?
masak I don't think that's too much to ask, what with encapsulation and all.
mkramer: um.
er.
I guess attributes can't be individually modified under that model. 21:08
flussence yay, I did stuff today! gist.github.com/664870
masak maybe special accessor methods could be created that modify several attributes at once.
21:08 starcoder joined
masak flussence: nice! 21:08
jnthn At which point you could just have each of those trigger the constraint check.
or
mkramer So you're asking for cross-attribute type constraints
masak mkramer: yes. 21:09
that was my example, because I think that happens often enough.
jnthn method my_fancy_accessor($a, $b, $c) is postchecked('foo') { ... }; method foo() { ...czech... }
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?
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.
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.
masak it's funny how a concrete example actually served to confuse people. :)
sorry about that.
sorear wanders back 21:13
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.
except in this particular case, with the constructors. 21:15
jnthn Oh, I agree.
I'm just not completely convinced the current situation is insane.
21:15 ChanServ sets mode: +o sorear
jnthn I can buy it from a "oh no, encapsulation breakage" argument. 21:15
21:15 sorear sets mode: +b *!*@69.41.179.202
sorear All Chatmosphere users are now banned. 21:15
jnthn sorear++ 21:16
21:16 sorear sets mode: -o sorear
jnthn But I do worry that it will drive people to the one-char change of has $!beer to $.beer 21:16
In order to get a "free constructor"
sorear I don't know if Blackberry is the same, but iOS IRC clients need bouncers
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
sorear there was a long thread on this on #mono
I suspect the host I just banned is a Chatmosphere corporate relay
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
mkramer class Database { has $!.dangerous_quality; method dangerous_quality (Foo $a) { $!dangerous_quality = $a; very_important_callback() } }; 21:22
with .new in place, can I trust that very_important_callback() gets called every time my Database has a $!dangerous_quality set?
This might also be a terrible example 21:23
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
mkramer: that is indeed the point I'm arguing. thanks.
.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:25
sorear /who *!*@69.41.179.202 turns up nobody atm 21:26
so I guess they aren't abusing an iline 21:27
sorear calls of the email
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
Reminds me of this: steve-yegge.blogspot.com/2010/07/wi...-java.html
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.
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:30
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."
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:32
21:34 kensanata left, orafu left
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.
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++
mkramer they are your enemy
we are talking about tools to protect your api from hostile invaders 21:36
lucs sorear: perlmodlib.pod
Tene In that case, I'm glad for the warning against using code you produce. ;)
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.
mkramer Exactly
if you' 21:37
21:37 orafu joined
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
What good is 95% of the way?
Tene Wait, where did exceptions come in?
masak Tene: I wondered that too. mkramer means the twigil :) 21:38
Tene Ah.
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
"Perl 6: we almost got encapsulation"
mkramer lol...ahahahah that's too funny 21:41
Oh man...it must be friday
masak not really :/
jnthn Yah, really, it's Friday.
masak :P
sorear The Internet attributes that sentence to Larry Wall, but the oldest citation I can find is Simon Cozens, May 28 2000
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
$!foo is really $!Class::foo so it can never accidentally collide with another class's local attributes 21:43
(trusts is stupid and I'm not going to do it)
mkramer $! was meant as a synechdoche for "the concept of private attributes in Perl 6"
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.
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.
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?
sorear masak: as an implementor I prefer the status quo to either of your "solutions"
PerlJam sorear: That phrase was in the 3rd edition of the camel book. Maybe earlier.
sorear: it's definitely a lwallism
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.
masak Tene: all I know so far is that it's very different from the Perl 5 version :)
sorear bless is broken
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.
mkramer Tene: masak and I are arguing for the same point right now
jnthn sorear: Is there anything that you don't consider broken? ;-)
Tene I must have not read closely enough; I didn't see any actual proposals.
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
jnthn :-)
masak is happy about the discussion that resulted, but overwhelmed by all the opinions
Tene jnthn: if you want to let them be set in the constructor but nowhere else, you can write your own constructor.
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?
sorear I agree that allowing has $!foo to be set from .new is wrong.
jnthn is starting to come around to masak's view
masak Tene: I thought that was the *definition* of a constructor in Perl 6.
jnthn I think the spec pretty much says that a constructor is something that calls bless
masak Tene: the fact that it returns something .bless'd.
jnthn All the default .new does is delegate to .bless
Well, with a candidate. 21:48
Tene rakudo: class Foo { has $!a; method lol { say $!a }; }; my $x = Foo.bless(*, :a("ohai")); $x.lol;
p6eval rakudo 142d22: OUTPUT«ohai␤»
sorear bless in Perl 5 takes an existing data object and turns it in to your class
Tene Should that be forbidden?
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
Not so much about changing new.
sorear all caps, like !, is a visual indicator of mucking with innards
jnthn Probably it's actually the default BUILD that needs to change.
Tene "all access paths to the repr object" would include bless, right?
jnthn Tene: I'm not sure I quite follow the question. 21:50
masak Tene: yes.
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, ...
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
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
21:52 mavrc left
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?
masak that's a good question to ask. 21:53
jnthn
.oO( If an attribute is private, is it really there? )
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
21:54 mavrc joined
masak s/shoes/showed/ 21:54
erghbl
s/shoed/showed/
jnthn shoe! 21:55
Maybe another interesting angle to look at it from is, do private attributes contribute to the API of the object
masak my instinctive response is "no".
sorear BEGIN SOREAR'S TAKE
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
BUILD submethods take public-API names; has $.foo creates a public-API name, $!foo does not, custom BUILD can have custom names
.BUILDALL and .bless take public-API names and pass them off to BUILD submethods 21:57
.new takes public-api names, and exists to interpret positionals; .bless never interprets a positional except as a base class
UNLOCK
jnthn oops, I spoke within the lock
;-
)
masak now you have a broken smiley face! 21:58
as punishment.
jnthn Oh noes!
masak dislocated mouth.
it's been shifted sideways and pushed up to eye level.
jnthn No no, that's the guy next to me's unibrow. 21:59
masak sorear: I like your take.
jnthn sorear: It makes sense, though I'd rather leave CREATE as it is (just takes a REPR name) 22:00
And if folks want to se private attrs they can write a custom BUILD.
*set
But +1 on the publicity
er, publicness
...whatever the correct word is. :-)
mkramer damn, I couldn't follow sorear 22:02
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?
That seems very wrong to me.
22:04 patspam left
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:05
22:06 patspam joined
jnthn But yes, it would be making $!foo more restricted access than it currently is, for sure. 22:06
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
in that light, it's strange that currently, object construction breaks encapsulation.
Tene jnthn: I don't see how that's the same at all. I must be failing to generalize here. 22:08
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:09
Tene: Well, or I could be trying to over-generalize. :-) 22:10
22:14 _kaare left
sorear the following code fragment shows up a bit in niecza: 22:22
if ($r) {
%$op = %$r;
bless $op, ref($r);
}
I wonder what niecza-v6 should do
mkramer random thought:
has $!foo is Constructable 22:23
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 22:39 mavrc left 22:43 MayDaniel left, masonkramer joined
moritz_ jnthn: sounds like one of your puns: nerdball.nerd2nerd.org/images/3595/img.jpeg 22:45
sorry, wrong URL
s.gullipics.com/image/z/v/i/hq2x3b-...8/img.jpeg
jnthn visits both :) 22:47
moritz_: Awesome!! \o/ 22:48
moritz_ jnthn: and another one: ircz.de/static/pics/2010/01/11_05_2.../RQ0Oj.png 22:52
jnthn :D 22:53
Those are grat.
*great
masak blog post! strangelyconsistent.org/blog/novemb...or-the-eye 23:07
23:07 envi joined
jnthn Nice :-) 23:11
23:11 getpwnam joined 23:13 tri joined 23:14 Eevee joined, getpwnam left
jnthn
.oO( štyri )
23:14
23:17 jferrero left
sorear masak: You should be using $target.IO.changed before any(@sources).IO.changed 23:20
masak ooh!
sorear++
that's what I get for refusing to use junctions in a really first-class manner. :) 23:21
very nice. I'll change it to that, and addendum the blog post.
jnthn :P
All that work on junctions and masak don't even use 'em. :P
masak <-- ungrateful Perl 6 weenie 23:22
jnthn hehe
masak anyway, this is why I like hanging out my code in public. people improve it.
Tene masak: you need to add an extra semicolon every 20 characters. 23:23
masak huh?
Tene You seem to be accepting unsolicited edits to your source. I'm offering one.
masak where?
Tene: sure, but I'm totally without context. 23:24
extra semicolons where?
Tene masak: You were talking about improving your code, so I offered an edit that would break everything.
masak ah. a "joke". :)
Tene It wasn't helpful, just trolling that missed its mark. 23:25
jnthn Harsh!
:)
masak I forgot to mention the part where I (and my peers) do something called "judiciousness" :)
Tene It seems you much more expect me to be helpful than to be harassing. Interesting.
masak I do, and I will continue to do so.
one of these days it will pay off. 23:26
sorear things terminals do to annoy me: I copy and paste a printed command line, and it gets cut into 4 lines 23:37
-bash: ecza/obj/NAME.cs: No such file or directory
23:38 stkowski left
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
I'm sure I can shave that time down even further if I try.
masonkramer So often that's what grep and map end up getting used for 23:42