Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-07-09

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 TimToady I guess there's one on Code
00:00 jnthn TimToady: Huh?
00:00 jnthn multi trait_mod:<is>(Code $block, :$default!) {
00:00 jnthn multi trait_mod:<is>(Code $block, $arg?, :$export!) {
00:01 s1n ironically that was the one i was testing
00:01 nihiliad joined #perl6
00:01 pmichaud TimToady is correct that rakudo's handling of names is currently all wrong.  Basically every package declaration should also result in a lexical declaration as well.
00:01 jnthn TimToady: Some not in there are "compiler handles".
00:01 jnthn pmichaud: Yeah, I'm starting to get that now.
00:02 pmichaud I've known this for a while but haven't figured out a completely good way of resolving it.
00:02 ihrd joined #perl6
00:02 jnthn OK.
00:02 s1n "yes, and rakudo currently gets that wrong" lol
00:02 jnthn We should discuss at YAPC::EU
00:02 pmichaud it's probably not that hard to do, though.
00:02 pmichaud aktually
00:02 jnthn We also need a good way to handle multi-joined names.
00:02 pmichaud it might be trival to do.
00:02 pmichaud *trivial
00:02 jnthn 'cus the way I hacked in is f**ked.
00:03 pmichaud if we simply treat every sub as the viviself for a :scope('lexical') of the same name
00:03 jnthn That's pretty much how my sub foo works now.
00:03 pmichaud right.
00:03 pmichaud so the difference between "our" and "my" is that "my" subs are anonymous in the package namespace
00:04 elmex joined #perl6
00:04 jnthn Right.
00:04 pmichaud seems like it might be workable.
00:04 pmichaud but I'm wondering if methods play by the same rules
00:07 TimToady methods by default are neither our nor my
00:07 jnthn they're more has-ish.
00:07 jnthn iirc
00:07 pmichaud right, but do methods end up mucking with the lexical pad at all?  I'm guessing no.
00:08 awwaiid joined #perl6
00:08 TimToady and, in fact, if you declare one as 'our' or 'my' you might have to be careful not to accidentally call it as a sub
00:08 pmichaud i.e., our sub foo() { ... }   ends up making an entry in the current lexpad for 'foo'
00:08 pmichaud method foo() { ... }   # ?
00:08 Limbic_Region joined #perl6
00:08 TimToady doesn't, unless you specifically say 'our' or 'my'
00:09 TimToady and the entry in the lexpad looks like a function
00:09 TimToady if you do
00:09 TimToady which is why that's not the defualt
00:09 s1n btw, the ticket for this is #67364, i didn't check if it was a dup (pmichaud didn't chime in saying he knew about it before i wrote it)
00:09 TimToady *default
00:10 TimToady my method foo() {...}; &foo($object)
00:10 ihrd joined #perl6
00:10 TimToady one way to call a private method :)
00:11 pmichaud okay, that's fine.  I think we can make all of that work without any difficult.
00:11 TimToady or more accurately, to call a public method non-virtually
00:11 pmichaud A similar situation holds for class names as well, yes?    class  XYZ {   }   creates a lexical entry for "XYZ"
00:12 frew joined #perl6
00:12 TimToady yes, and pretty much all the searching for packages also happens in the lexical scopes, with GLOBAL as a last resort
00:12 TimToady when I say Num::pi in STD, it finds CORE::Num, which is a lexical name
00:13 pmichaud correct.
00:13 pmichaud that's the way I was thinking things would head.
00:13 TimToady when I say my class Foo::Bar, it creats Foo in the current lexical scope only, with Bar inside that
00:14 pmichaud what does "Bar inside that" mean, exactly?
00:14 pmichaud Bar would be a package symbol, yes?
00:15 pmichaud i.e., a symbol in the Foo package
00:15 TimToady means Foo thinks it's a package, but the name Foo is only lexical
00:15 TimToady correct
00:15 TimToady if you ask Foo for its PARENT:: it hands you back MY::
00:16 pmichaud what about "class Foo::Bar", without the "my"?
00:16 TimToady which is your current lexical scope, which is effectively anonymous
00:16 pmichaud that creates a "Foo" entry in the current package?
00:16 TimToady scans up lexical scopes for Foo
00:16 pmichaud if no Foo found?
00:17 TimToady creates GLOBAL::Foo::Bar as well as lexical alias Foo
00:17 pmichaud *and if ...
00:17 pmichaud okay.
00:17 pmichaud really that's  CORE::GLOBAL::Foo::Bar, yes?
00:17 TimToady I'm pretty sure that's what it currently does
00:18 TimToady yes, except...
00:18 TimToady I'm thinking that all externally compiled units end up with a GLOBALish package that has to get meshed with all other GLOBALish packages, and ends up attached to UNIT as GLOBAL, probably
00:19 TimToady and we basically have to detect or ignore GLOBAL collisions at link time
00:19 skids joined #perl6
00:20 TimToady currently when you use the std command to compile a .pm or a .setting, it forces the current GLOBAL into GLOBALish
00:20 TimToady before dumping the symbol table
00:21 TimToady since it's just a view of GLOBAL, which will be synthetic
00:21 TimToady in the actual process
00:22 TimToady all of this is multiplied by the fact that when we say Foo it's really a shorthand for a longname
00:23 pmichaud right
00:23 TimToady the existence of a name:auth:ver in GLOBAL could, in fact, probably replace %ISA as the signal that we already loaded something
00:23 pmichaud oooh, that could be very nice
00:25 TimToady and, interestingly, if you declare the top of a file with 'my module', you don't get that alias, which is appropriate for settings at least
00:26 jnthn OK folks, time for me to sleep...train leaves in 5 and a half hours.
00:26 TimToady though not perhaps for ordinary modules, since it could force reloading inadvertently
00:26 TimToady night
00:26 jnthn night :-)
00:26 pmichaud jnthn: have a terrific vacation
00:26 TimToady that too
00:26 pmichaud jnthn: I'm envious.  Which alps are you heading to?
00:26 jnthn pmichaud: Thanks! It's Switzerland, there's mountains and fondu.
00:27 pmichaud aaaargh!
00:27 * pmichaud misses Switzerland.
00:27 jnthn pmichaud: Going to be staying in Wengen.
00:27 jnthn Which is up from Interlaken.
00:27 pmichaud I used to make it to Geneva twice a year.
00:27 jnthn About 4,000ft up.
00:27 jnthn Oh, Geneva is a nice city too. :-)
00:27 TimToady try not to change altitude too rapidly
00:27 pmichaud 4,000 ft?
00:27 pmichaud that's all?!
00:27 jnthn Well, that's where the hotel is.
00:28 * pmichaud remembers staying in Zermatt, which was quite a bit higher :-)
00:28 jnthn But of course the trails and so on go higher than that. :-)
00:28 synthEEEE joined #perl6
00:28 jnthn Oh, yes, that's higher. :-)
00:28 ihrd joined #perl6
00:28 pmichaud I managed to go from hikes at 3,500 meters to my home at sea level in around 36 hours :-)
00:29 jnthn It's managable, if in shape. :-)
00:29 TimToady it's the sudden drops that are hard on you
00:29 jnthn "Oxygen drunk"
00:29 pmichaud anyway, have a great time, enjoy some fondu for me
00:29 jnthn Will do!
00:29 jnthn Take care, all :-)
00:29 pmichaud A bientot.
00:30 jnthn o/
00:30 s1n pmichaud: btw, i'm scheduling dallas.p6m for next tuesday, will send out the notice tonight
00:31 pmichaud s1n: yes, I was thinking that would be the case.
00:31 pmichaud excellent, it's on my calendar
00:31 s1n and frew and i will be making a presence at dfwuug
00:31 pmichaud tomorrow?
00:31 s1n yup
00:31 pmichaud I hadn't planned to go, but perhaps I will.
00:31 s1n gotta make a p6 presence :)
00:31 pmichaud We should all wear "Perl is Dead" shirts or something :-)
00:31 pmichaud the python guys would love that.
00:32 s1n Perl is Dead. Long Live Perl [56].
00:32 s1n we should make some dallas.p6m shirts
00:32 pmichaud indeed
00:33 pmichaud I'm hoping to have my shirts ready on cafepress/zazzle/spreadshirt in the next couple of days
00:33 s1n know anyone (other than cafepress) that can make some decent shirts?
00:33 s1n we could do cafepress, but they are usually only in white
00:33 pmichaud http://cafepress.com/rakudo  # first drafts
00:33 pmichaud cafepress does dark shirts now.
00:33 pmichaud so does zazzle
00:34 s1n oh, well, lets get some shirt up, i like that slogan i just made :)
00:34 pmichaud okay, I'll draft something when I'm working on the others.
00:34 s1n then we can show up to area meetings, like dfwuug, and people will stop to say something i'm sure
00:35 pmichaud although it might need to be   Long Live Perl 5|6
00:35 s1n true
00:35 pmichaud or even 5..6  :-P
00:35 s1n ooo
00:35 s1n yeah 5..6
00:35 pmichaud although people would think we screwed up the version number and forgot a digit or doubled the dot
00:35 pmichaud 5.6.0?  5.8.6?  where's the typo?
00:35 s1n hmm, but it's a funny inside joke :)
00:36 s1n yeah, the 5|6 probably works better
00:36 pugs_svn r27487 | lwall++ | [S14] a slightly closer approximation to eventual reality
00:36 pmichaud okay, kids are pestering me to go swimming with them -- back later
00:36 s1n [front, big font] Perl is Dead. [back,big font] Long Live Perl 5|6.
00:40 TimToady put an upside camel on the front, and a right-side up Camelia on the back :)
00:41 TimToady perching on a camel with its tongue sticking out, maybe :)
00:45 FCO joined #perl6
00:51 frankshaw joined #perl6
00:55 ihrd left #perl6
01:03 cbk can one make an array without any pre-determined limit in perl 6?
01:04 TimToady that's what arrays are by default
01:04 cbk oh
01:05 cbk so i don't have to have an number of slots in the array to start off with?
01:05 TimToady certainly not, that would be very un-Perlish
01:05 cbk so can I do this... my @req_pet;
01:05 cbk then add a pet to the array by getting the last unused slot
01:06 cbk ?
01:06 cbk like this @req_pet[$x] = $pet_idea;
01:07 cbk where $x is the number of elements in the array + 1
01:07 TimToady usually you'd just say push(@req_pet, $pet_idea) to do that
01:08 cbk push, ok I'll try that :)
01:08 TimToady (same in Perl 5, btw)
01:08 cbk thanks
01:15 cbk TimToady, how can you clear the screen in perl 6 (if you don't mind)
01:16 cbk the simplest way please ")
01:18 TimToady on which OS?
01:19 TimToady run("clear") should work on Unixey systems
01:19 spx2 why is november not listed on the link in the topic ?
01:19 spx2 it's like this new funky web framework thing .. in p6
01:19 cbk Linux
01:20 TimToady then that should work
01:21 cbk I'm sorry I meant to clear the screen form within a perl 6 script. (ie cls)
01:21 TimToady I just told you
01:21 TimToady run("clear")
01:22 cbk just like that "run("clear")"  like the perl 5 command system is now "run"?
01:23 cbk cool!
01:23 cbk thanks
01:23 TimToady precisely, but it returns true for success rather than false
01:23 cbk ok
01:24 TimToady which is why we renamed it
01:25 hercynium joined #perl6
01:28 SmokeMachine joined #perl6
01:29 cbk is there any good perl 6 books out yet? (that are NOT over 4 years old)
01:32 TimToady not yet, though there are some in the works
01:34 nbrown joined #perl6
01:36 pmichaud (camel on a shirt)  -- won't someone bark at us for that?  ;-)
01:44 TimToady yeah, I suppose
01:46 stepnem joined #perl6
01:51 mikehh joined #perl6
01:54 obra_ all you should need to do is ask first
02:04 pugs_svn r27488 | kyle++ | [t/spec] Test for RT #60176
02:05 pugs_svn r27489 | kyle++ | [t/spec] remove empty dir
02:08 jauaor joined #perl6
02:29 s1n is there a die equivalent?
02:36 justatheory joined #perl6
02:37 TimToady rakudo: die "oops"
02:37 p6eval rakudo 70bfd5: OUTPUT«oops␤in Main (/tmp/fAEzGnKCBh:2)␤»
02:37 s1n rakudo: die
02:38 p6eval rakudo 70bfd5: OUTPUT«No applicable methods.␤in Main (/tmp/VO5JK3sPoh:2)␤»
02:38 s1n hmm, bug?
02:38 TimToady you didn't give it an argument
02:38 TimToady so it didn't match any signatures
02:38 s1n it won't just die like p5?
02:39 azawawi joined #perl6
02:39 azawawi hi
02:39 TimToady rakudo: !!!
02:39 p6eval rakudo 70bfd5: OUTPUT«Syntax error at line 2, near "!!!"␤in Main (src/gen_setting.pm:3340)␤»
02:39 TimToady rakudo: ...
02:39 p6eval rakudo 70bfd5: OUTPUT«Can't return outside a routine␤in Main (/tmp/hl05fbXGmv:2)␤»
02:40 TimToady O_O
02:40 azawawi joined #perl6
02:40 TimToady rakudo: fail
02:40 p6eval rakudo 70bfd5: OUTPUT«Can't return outside a routine␤in Main (/tmp/tzqz3NQArU:2)␤»
02:40 s1n rakudo: exit
02:40 p6eval rakudo 70bfd5:  ( no output )
02:41 s1n close
02:41 TimToady rakudo: .die
02:41 p6eval rakudo 70bfd5: OUTPUT«Method 'die' not found for invocant of class 'Failure'␤»
02:41 TimToady now that's funny
02:41 s1n rakudo: warn
02:41 p6eval rakudo 70bfd5: OUTPUT«Warning! Something's wrong.␤␤»
02:41 s1n hah
02:42 TimToady it shouldn't have a newline
02:42 TimToady Perl 5 would tell you the line number
02:42 TimToady rakudo: $!.die
02:42 p6eval rakudo 70bfd5: OUTPUT«Method 'die' not found for invocant of class 'Failure'␤»
02:43 alester joined #perl6
02:45 TimToady s1n: so yes, die without arg is supposed to work, and there's a rakudo bug
02:45 TimToady specced to default to $!
02:46 * s1n files rakudobug
02:46 TimToady S04:1062
03:02 pugs_svn r27490 | kyle++ | [t/spec] Test for RT #60966
03:13 Tene http://arohner.blogspot.com/2009/07/can-your-programming-language-do-this.html
03:17 s1n Tene: i assume you're going to respond to that?
03:17 Tene ... Oh, that's a good idea.
03:17 Tene Sure.
03:17 Tene I could BLOG about it, even!
03:18 Tene :)
03:18 s1n good idea
03:18 Tene I haven't written any blog posts in... a while.
03:19 s1n i'll see if i can one up him with my vast knowledge of info. theory and stats :)
03:19 s1n (create something with p6 that clojure can't do)
03:19 dukeleto joined #perl6
03:20 donaldh joined #perl6
03:21 molaf joined #perl6
03:27 TimToady there was some discussion of the article earlier today
03:27 s1n tell masak for some reason, i'm getting timeouts now when trying to clone November at git://guthub.com/viklund/november.git
03:28 TimToady see http://irclog.perlgeek.de/perl6/2009-07-08#i_1300229 and following
03:28 TimToady Tene: ^^
03:31 s1n moritz's response looks perfectly sane :)
03:32 Tene TimToady++
03:32 TimToady did he post one?
03:32 KyleHa joined #perl6
03:32 s1n doesn't look like it
03:33 s1n oh, yeah
03:33 KyleHa This test is driving me crazy:  ok( ! try { die "foo"; 1 }, 'die in try cuts off execution');
03:33 s1n rakudo: my @P = 0.2, 0.5, 0.3; say -[+] @P.map: { $^p * log($^p)/log(2) }
03:33 p6eval rakudo 70bfd5: OUTPUT«1.48547529722733␤»
03:33 KyleHa OK, now that I'm here, I have an idea...
03:33 TimToady he did change the spec for log though :)
03:34 s1n hah
03:35 KyleHa Sometimes I get Null PMC in get_bool(), and sometimes the test fails, but the test description isn't output--as if the desc string got eated.
03:35 TimToady is try a function?
03:35 KyleHa I thought it was built in.
03:35 TimToady what happens if you put (try {...})
03:35 TimToady could still be parsing as a listop in rakudo
03:36 KyleHa If I wrap in parens, I get the Null PMC access result.
03:36 KyleHa rakudo: say !try { die 'foo'; 1 }
03:36 TimToady rakudo: say !Failure
03:36 p6eval rakudo 70bfd5: OUTPUT«Null PMC access in get_bool()␤in Main (/tmp/1bARK69YpF:2)␤»
03:36 p6eval rakudo 70bfd5: OUTPUT«1␤»
03:37 KyleHa rakudo: say ! try { 1 }
03:37 p6eval rakudo 70bfd5: OUTPUT«0␤»
03:37 TimToady rakudo: say (try { die 'foo'; 1 }).WHAT
03:37 p6eval rakudo 70bfd5: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/6Hjyiw4WD6:2)␤»
03:37 TimToady rakudo: say (try { die 'foo'; 1 }).PARROT
03:37 p6eval rakudo 70bfd5: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/om0vLIGjxY:2)␤»
03:37 TimToady "It's the Nothing!!!"
03:38 KyleHa I guess I'll fudge it with a skip and note the inconsistent behavior.
03:39 * s1n sleeps
03:44 pugs_svn r27491 | kyle++ | [t/spec] Testing one bug in RT #67374
03:45 * Tene is again tempted to play with defining macros in PGE.
04:01 cognominal joined #perl6
04:13 nsh_ joined #perl6
04:13 sbp joined #perl6
04:20 zcxzczxcz joined #perl6
04:20 shinobi_cl hi
04:20 literal hello
04:21 shinobi_cl what is the "standard" file naming convention for perl6? the programs are .p6, but the libraries? .p6m? .pm6?
04:21 literal it's still .pl and .pm
04:22 shinobi_cl do you think it will stay that way?
04:22 literal yeah
04:23 shinobi_cl ok, thanks! :)
04:23 literal it's the reason why Perl 6 files must start with "use v6;" or "module Something;" or "class Something;" or "grammar Something;"
04:23 literal so Perl will know that it's Perl 6
04:24 shinobi_cl ahh,, i didnt know that..
04:25 shinobi_cl well, you see. i'm working on an application on risk management... and i was thinking that perl6 roles are IDEAL for modelling stuff like securities. Theres a lot of them.... with so many different features..
04:25 shinobi_cl maybe a library for managing them would be a 'killer app' for perl6 ..
04:26 literal you should probably look into Perl 5 + Moose, if you need something for production
04:27 shinobi_cl mmm not really, the system is already done in java, i only do text processing with perl :)
04:27 shinobi_cl but when i saw roles i liked the concept... now that im knowing better the different kinds of financial instruments
04:27 shinobi_cl roles seems perfect for modelling job like that
04:28 shinobi_cl i know that moose has roles in p5
04:28 shinobi_cl but, i dont know... i like perl6 more :)
04:29 literal try it out, then
04:29 shinobi_cl well, thanks, and good night!
04:29 shinobi_cl left #perl6
04:30 dukeleto joined #perl6
04:31 eternaleye joined #perl6
04:32 eternaleye_ joined #perl6
05:23 justatheory joined #perl6
05:39 frew joined #perl6
05:47 elmex_ joined #perl6
05:51 xinming joined #perl6
06:05 tann joined #perl6
06:07 tann_ joined #perl6
06:08 barney joined #perl6
06:18 kate21de joined #perl6
06:28 cbk joined #perl6
06:32 frankshaw joined #perl6
06:40 justatheory joined #perl6
06:47 iblechbot joined #perl6
06:51 eternaleye rakudo: sub 起る( Str :woken-by($友達) ) { say "お早うございます, $友達!" }; 起る( :woken-by<皆> )
06:51 p6eval rakudo 70bfd5: OUTPUT«お早うございます, 皆!␤»
06:51 visual joined #perl6
06:56 lisppaste3 visual pasted "untitled" at http://paste.lisp.org/display/83279
06:57 szabgab is the recommended way to iterate over lines of a file is this now ?       for $fh.lines -> $line { }
06:59 eternaleye szabgab: Yeah, IIUC
07:09 buu ingy: You around?
07:12 rfordinal joined #perl6
07:12 rfordinal left #perl6
07:21 donaldh joined #perl6
07:41 dakkar joined #perl6
07:44 DemoFreak joined #perl6
07:48 eMaX joined #perl6
08:06 Matt-W Morning
08:07 moritz_ oh hai
08:09 meppl joined #perl6
08:09 ejs joined #perl6
08:32 dalek rakudo: e7a7999 | moritz++ | docs/ChangeLog:
08:32 dalek rakudo: [docs] ChangeLog updates
08:32 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e7a7999b906393fbae4a8ff954a5e19643339a5d
08:36 M_o_C joined #perl6
08:36 amoc joined #perl6
08:37 ejs joined #perl6
08:58 szabgab rakudo: sub f (@numbers) { @numbers.perl.say }; f((1,2));
08:58 p6eval rakudo e7a799: OUTPUT«[1, 2]␤»
08:58 szabgab rakudo: sub f (@numbers) { @numbers.perl.say }; f((1));
08:58 p6eval rakudo e7a799: OUTPUT«Parameter type check failed; expected Positional, but got Int for @numbers in call to f␤in sub f (/tmp/3XzTio0aHw:2)␤called from Main (/tmp/3XzTio0aHw:2)␤»
08:58 szabgab rakudo: sub f (@numbers) { @numbers.perl.say }; f(1);
08:58 p6eval rakudo e7a799: OUTPUT«Parameter type check failed; expected Positional, but got Int for @numbers in call to f␤in sub f (/tmp/99OxG9C0i6:2)␤called from Main (/tmp/99OxG9C0i6:2)␤»
08:58 kate21de1 joined #perl6
08:59 moritz_ rakudo: sub f (@numbers) { @numbers.perl.say }; f([1]);
08:59 p6eval rakudo e7a799: OUTPUT«[1]␤»
08:59 moritz_ rakudo: sub f (*@numbers) { @numbers.perl.say }; f(1);
08:59 p6eval rakudo e7a799: OUTPUT«[1]␤»
08:59 szabgab sure with a * it works
08:59 szabgab but what is the difference between when I pass (1,2) or (1) to the starless array ?
09:00 moritz_ rakudo: say (1, 2).WHAT
09:00 moritz_ rakudo: say (1).WHAT
09:00 p6eval rakudo e7a799: OUTPUT«List()␤»
09:00 p6eval rakudo e7a799: OUTPUT«Int()␤»
09:00 moritz_ that's the difference.
09:01 moritz_ rakudo: say (1,).WHAT
09:01 p6eval rakudo e7a799: OUTPUT«List()␤»
09:01 szabgab and is that a good thing ?
09:01 moritz_ depends.
09:01 szabgab ok, when is that a good thing ?
09:01 moritz_ when you want to do thinks (1 + 2) * 3
09:02 moritz_ if (...) constructed a list, you'd be screwed.
09:02 szabgab shouldn't thet * force it into scalar context ?
09:02 moritz_ and you wouldn't want (2) * 3 to give you a different result than 2 * 3, would you?
09:03 moritz_ szabgab: aye. And a list in numeric context returns the number of items
09:03 moritz_ (also note that a user might define a non-scalar multi of infix:<*>)
09:03 szabgab I can see I 'll make tons of money teaching Perl 6 - if I manage to understand it one day :-)
09:05 moritz_ guess why I try to understand it so early on? :-)
09:05 moritz_ but I think it's going to change somewhat
09:05 moritz_ (...) creates a capture
09:05 moritz_ then (1) can be bound to an array parameter
09:06 moritz_ but a capture with a single scalar behaves like that scalar in normal situates
09:06 moritz_ *situations
09:06 moritz_ I gues that'll dwim more
09:07 szabgab I don't really like the fact that my above example fails now, that (1) is a different animal than (1,2) , but maybe it is 'cause I don't get it
09:07 szabgab of course I was on leave from Perl 6 for almost 2 months now
09:08 moritz_ yeah, I think rakudo hasn't caught up with the latest capture things
09:10 szabgab moritz_, btw have you tried Padre with Perl 6 ?
09:10 lichtkind joined #perl6
09:10 szabgab azawawi made some really nice integrations
09:11 moritz_ szabgab: no, I've seen the pictures, but haven't tried yet
09:19 pjcj joined #perl6
09:19 tann joined #perl6
09:27 Hale-Bopp joined #perl6
09:36 last joined #perl6
09:37 pancake joined #perl6
09:57 eMaX joined #perl6
10:12 pmichaud joined #perl6
10:12 pjcj joined #perl6
10:12 amoc joined #perl6
10:12 dakkar joined #perl6
10:12 donaldh joined #perl6
10:12 xinming joined #perl6
10:12 eternaleye joined #perl6
10:12 sbp joined #perl6
10:12 nsh_ joined #perl6
10:12 jauaor joined #perl6
10:12 christine joined #perl6
10:12 Patterner joined #perl6
10:12 frodwith joined #perl6
10:12 nothingmuch joined #perl6
10:12 omega joined #perl6
10:12 cls_bsd joined #perl6
10:12 Jedai joined #perl6
10:12 charsbar_ joined #perl6
10:12 frew_ joined #perl6
10:12 yahooooo joined #perl6
10:12 Tene joined #perl6
10:12 gbacon joined #perl6
10:12 lisppaste3 joined #perl6
10:12 jrockway joined #perl6
10:12 lambdabot joined #perl6
10:12 PacoLinux joined #perl6
10:12 lucs joined #perl6
10:12 drbean joined #perl6
10:12 renormalist joined #perl6
10:12 simcop2387 joined #perl6
10:12 bionoid joined #perl6
10:12 integral joined #perl6
10:12 silug joined #perl6
10:12 [particle] joined #perl6
10:12 gfldex joined #perl6
10:12 mtve joined #perl6
10:12 pochi joined #perl6
10:12 dmpk2k joined #perl6
10:12 jnthn joined #perl6
10:12 betterworld joined #perl6
10:12 frettled joined #perl6
10:12 rafl joined #perl6
10:12 gabiruh joined #perl6
10:12 Trey joined #perl6
10:12 s1n joined #perl6
10:12 Grrrr joined #perl6
10:12 c1sung joined #perl6
10:12 literal joined #perl6
10:12 Caelum joined #perl6
10:12 leedo joined #perl6
10:12 Helios joined #perl6
10:12 r0bby joined #perl6
10:12 andreasg_ joined #perl6
10:12 Ingmar joined #perl6
10:12 cxreg joined #perl6
10:12 LCamel joined #perl6
10:12 DQuest joined #perl6
10:12 tomaw- joined #perl6
10:12 Maddingue joined #perl6
10:12 moritz_ joined #perl6
10:12 ingy joined #perl6
10:12 obra_ joined #perl6
10:12 Woody2143 joined #perl6
10:13 last joined #perl6
10:13 kate21de1 joined #perl6
10:13 DemoFreak joined #perl6
10:13 barney joined #perl6
10:13 sri_kraih_ joined #perl6
10:13 Matt-W joined #perl6
10:13 allbery_b joined #perl6
10:13 dalek joined #perl6
10:13 kborer joined #perl6
10:13 skids_ joined #perl6
10:13 szabgab joined #perl6
10:13 avar joined #perl6
10:13 Lorn joined #perl6
10:13 jevin joined #perl6
10:13 baest joined #perl6
10:13 p6eval joined #perl6
10:13 pnu joined #perl6
10:13 michaelr joined #perl6
10:13 phenny joined #perl6
10:14 pancake joined #perl6
10:14 SmokeMachine joined #perl6
10:14 awwaiid joined #perl6
10:14 skipper joined #perl6
10:14 agentzh joined #perl6
10:14 PZt joined #perl6
10:14 rjh joined #perl6
10:14 broquaint joined #perl6
10:14 ssm joined #perl6
10:14 RonOreck joined #perl6
10:14 chipdude joined #perl6
10:14 meteorjay joined #perl6
10:27 zamolxes joined #perl6
10:28 icwiener joined #perl6
10:30 pancake joined #perl6
10:30 SmokeMachine joined #perl6
10:30 awwaiid joined #perl6
10:30 skipper joined #perl6
10:30 agentzh joined #perl6
10:30 PZt joined #perl6
10:30 rjh joined #perl6
10:30 broquaint joined #perl6
10:30 ssm joined #perl6
10:30 RonOreck joined #perl6
10:30 chipdude joined #perl6
10:30 meteorjay joined #perl6
10:31 masak joined #perl6
10:35 eMaX joined #perl6
10:37 ejs joined #perl6
10:41 masak hmpf, "[S14] a slightly closer approximation to eventual reality" is one of the most generic commit comments I've ever seen. :P
10:41 Matt-W :)
10:41 ZuLuuuuuu joined #perl6
10:42 Infinoid at least it's more specific than "commit this to svn"
10:42 masak oh, absolutely.
10:42 masak or 'changed some stuff'
10:42 Infinoid "here, hold this"
10:42 moritz_ hey, the [S14] moniker is very informative
10:43 masak yes, it was the most informative part of the message.
10:43 masak with only that, the message would have been almost as informative.
10:45 masak speaking of pickiness, I'm happy about this 'less than awesome' trend in error messages.
10:45 moritz_ me too
10:45 Matt-W yes
10:45 Matt-W me too
10:46 sjohnson Matt-W: !
10:46 sjohnson how's it going?
10:46 moritz_ of course in Perl 6 "less than awesome" is synonymous to "buggy", but it does sound nicer :-)
10:47 masak moritz_: well, it's not only that. it presupposes that we are aiming for awesome. and that matters a lot.
10:48 moritz_ masak: aye, that's what my "sound nicer" should also imply, but of course I wasn't that eloquent :-)
10:48 Matt-W hi sjohnson
10:48 Matt-W It's going badly
10:48 Matt-W I'm trying to compile Xerces on Solaris 10 on x86
10:49 pmurias joined #perl6
10:49 masak to me it's the main thing -- shaping reality with the phrase 'less than awesome'. it's fun to say/write awesome, and the term latches on as a goal.
10:50 sjohnson masak: yurg, though i don't know the implications, i understand and trust your word for it
10:50 Matt-W well we're trying ot make the most awesome programming language ever
10:50 sjohnson now you're talking
10:51 masak sjohnson: it was jnthn++ who, a couple of days ago, described an error message as 'less than awesome'. the phrase stuck.
10:51 masak sjohnson: but it seems to me to have reminded people that awesome is actually what we're building here. anything less is unacceptable.
10:52 desertm4x joined #perl6
10:53 sjohnson well, it looks as though a lot of my suggestions to improve Perl 5 have already been figured out
10:53 sjohnson though i think i can find 1 or 2 more
10:53 sjohnson despite all the "problems" perl 5 is still my favourite blissful joy to program in
10:53 masak sjohnson: well, Perl 6.0.0 will be really extensible, on top of being awesome.
10:54 sjohnson masak: :)
10:54 sjohnson i like that
10:54 masak sjohnson: so, any additions you will want to make will probably be easy to do.
10:54 masak though I worry a bit about the macros and language extensions.
10:54 masak we really haven't gotten our hands dirty there yet.
10:55 moritz_ sjohnson: it might please you to learn that in the next major version of perl 5 'use 5.011' or 'use 5.012' will implictly enable 'use strict'
10:55 moritz_ rgs++ for that
10:55 sjohnson i do like that
10:55 masak moritz_: how does one remove 'use strict' from one-liners, then?
10:55 sjohnson moritz_: but the true thing that would really rock my world... would be... if trim() was backported
10:55 masak sjohnson: just write your own! :P
10:55 moritz_ masak: by not writing 'use 5.012' in the one-liner?
10:56 masak moritz_: oh, aha.
10:56 sjohnson masak: writing my own becomes very tedious among switching shells on monthly basis
10:56 sjohnson i rely on String::Strip;
10:56 sjohnson and because of that, it has become a nightmare
10:56 sjohnson when i am doing emergency tasks
10:56 sjohnson and i get an @INC error
10:56 sjohnson ... but that is better, than writing my own sub trim { function
10:57 sjohnson everytime i do something on a new system
10:57 * sjohnson stops frothing at the mouth
10:57 sjohnson even others make fun of Perl.. for saying that the trim is new to Perl 6
10:57 masak sjohnson: sub trim { my ($s) = @_; for ($s) { s/^\s+//; s/\s+$//; } return $s } # it's just one line!
10:57 sjohnson while other languages have had it since some sort of infancy
10:58 sjohnson masak: i realize that i can implement it, but should i also implement a + operator, for adding integers?
10:58 masak sjohnson: I hear you.
10:58 masak I'm also glad that it's there now.
10:58 masak I just don't consider it catastrophic when it's gone.
10:58 masak s/gone/missing/
11:00 sjohnson well, in my experience, because i have to switch shells for IRC purposes every 2 months
11:00 sjohnson i have written many perl scripts to handle many of my shell needs
11:00 pancake s/// is not implemented in rakudo yet :?
11:00 * Matt-W is embarking on some Perl this afternoon
11:00 * Matt-W is happy about that
11:00 Matt-W pancake: correct
11:00 masak pancake: no, inly .=subst
11:00 Matt-W pancake: but strings have a .subst method which does the same job
11:00 sjohnson and when i run a simple command but get a huge CPAN error, that could be avoided by PHP or pythons trim / .strip... i get frustrated really quickly
11:01 Matt-W rakudo: say "Hello".subst(/H/, 'y');
11:01 sjohnson i suppose i could write a macro in vim to just add the trim function to do
11:01 p6eval rakudo e7a799: OUTPUT«yello␤»
11:01 pancake but .subst is for losers :P inlang regexps are cooler
11:01 sjohnson but i think that backporting trim for Perl 5, would be a substantial "right step" in the right direction
11:01 masak pancake: agreed.
11:01 masak pancake: patches welcome. :)
11:01 Matt-W rakudo: my $a = "Hello"; $a.=subst(/H/, 'y'); say $a;
11:01 p6eval rakudo e7a799: OUTPUT«yello␤»
11:01 Matt-W masak: it's a parsing thing with s/// isn't it?
11:02 moritz_ it is.
11:02 masak Matt-W: very likely.
11:02 Matt-W thought so
11:02 * Matt-W -> fooooooood
11:02 masak probably nontrivial at that.
11:02 Matt-W &
11:08 masak rakudo: eval 'sub infix:<L>($a, $b) { "L yeah!" }' or die $!; 4 L 5
11:08 p6eval rakudo e7a799: OUTPUT«Statement not terminated properly at line 2, near "L 5"␤in Main (src/gen_setting.pm:3340)␤»
11:08 masak ah. that's what I thought.
11:08 masak I guess STD.pm won't let that through either.
11:08 masak std: eval 'sub infix:<L>($a, $b) { "L yeah!" }' or die $!; 4 L 5
11:08 p6eval std 27491: OUTPUT«##### PARSE FAILED #####␤Syntax error (two terms in a row?) at /tmp/ZvUy3QApXo line 1:␤------> [32m<L>($a, $b) { "L yeah!" }' or die $!; 4 [31mL 5[0m␤    expecting any of:␤      infix or meta-infix␤      infix stopper␤    standard stopper␤ statement modifier loop␤
11:08 p6eval ..terminator␤FAILED 00:02 37m…
11:08 masak that's probably as it should be.
11:09 zamolxes joined #perl6
11:09 moritz_ std doesn't run an eval anyway
11:10 masak exactly.
11:10 masak but I don't think it should.
11:10 moritz_ right
11:10 masak so both Rakudo and STD DTRT here.
11:10 moritz_ because all grammar modifications are lexically scoped by default
11:11 masak oh, that too.
11:11 masak but also, an eval is runtime, while the parsing of operators is before that.
11:11 moritz_ also true.
11:18 frankshaw joined #perl6
11:20 donaldh joined #perl6
11:25 beggars joined #perl6
11:30 s1n masak: i just built your web repo and a bunch of tests failed
11:30 masak s1n: ok.
11:30 masak s1n: I'm currently implementing hitomi, and those test failures are known.
11:31 masak any others might have bit-rotted; I'll take a look myself.
11:31 s1n http://pastebin.com/m7e31d9cd
11:32 s1n i might be doing something wrong (automating it) so let me know if those just look wrong
11:32 masak yes, that's about what I'd expect.
11:32 masak some bit rot in routes.
11:32 s1n okay
11:33 masak the tests suffer from a lack of overview right now. :/
11:33 s1n just thought i'd let you know in case you didn't already
11:33 masak s1n: I wasn't 100% aware, so thanks. :)
11:33 masak s1n: anything Web.pm-related I can help you with?
11:33 moritz_ why didn't pugs_svn report r27492?
11:33 * masak is going to lunch in a few minutes
11:34 s1n masak: not just yet, i'll let you know more tonight :)
11:34 pugs_svn joined #perl6
11:34 masak s1n: sounds interesting. :)
11:35 masak s1n: I might be intermittent tonight, due to a Harry Potter marathon. but I'll stop by now and then.
11:40 Sunbeam joined #Perl6
11:43 azawawi joined #perl6
11:43 azawawi hi
11:43 azawawi literal: ping
11:48 pmurias azawawi: hi
11:49 azawawi pmurias: hey :)
11:55 moritz_ I don't know why, but the svn bot ate two cool commits
11:55 moritz_ so let me tell you that Su-Shee++ just commited the cool new design for http://perl6-projects.org/
11:56 * azawawi takes a peek :)
11:57 azawawi moritz_: nice but the links are small bold font on my win32 chrome OS :)
11:57 moritz_ azawawi: the font sizes and spacing might need a few tweaks, yes
11:58 * azawawi tests it over IE and firefox
12:00 azawawi moritz_: on ie7, camelia image has a border and is a bit close to the text
12:01 moritz_ that doesn't strike me as horrible, just a bit suboptimal
12:03 mdxi i tend to believe that IE users are, by the fact that they're using IE, incapable of making value judgements anyway :)
12:03 azawawi FF 3.5 is not playing it fair; when I installed it, it replaced the default chrome browser without asking :)
12:03 azawawi mdxi: :)
12:04 azawawi mdxi: people are lazy by default
12:06 Matt-W hmm on my FF 3.5, all the body content seems to be shifted a little to the left compared to the header
12:06 azawawi @tell literal any pending grok update soon?
12:06 lambdabot Consider it noted.
12:06 Matt-W It's also disturbingly colourful
12:07 lichtkind hello
12:08 azawawi lichtkind: hi
12:08 mdxi i like it tons better than what was there
12:08 lichtkind azawawi: the cheat sheet is now much longer :)
12:08 sri_kraih joined #perl6
12:10 Matt-W It does have the distinct advantage of being custom-designed and not an obviously generic template
12:11 * Matt-W dives into some Perl 5
12:11 azawawi lichtkind: i was parsing it in the morning to add it to perl 6 help autocomplete dialog...
12:13 HemanShaw joined #perl6
12:13 frankshaw left #perl6
12:15 azawawi lichtkind: http://svn.perlide.org/padre/trunk/Padre-Plugin-Perl6/parse_p6_help.pl
12:19 lichtkind azawawi: and where are the pods?
12:20 Matt-W moritz_: re blog entry on exceptions, I'd not heard of the 'hyper' operator
12:20 azawawi lichtkind: that script creates it from the website...
12:20 lichtkind azawawi: i want to include them too into perl6::doc
12:23 azawawi lichtkind: run it and you'll get your POD :)
12:23 lichtkind azawawi: yes , but there still lots missing, next day i want add array and string methods
12:23 azawawi lichtkind: cool then
12:24 azawawi lichtkind: i hope grok gets that information as well
12:24 azawawi lichtkind: 'grok method', 'grok my' is really useful
12:25 lichtkind grok is also based on that tablet?
12:46 azawawi lichtkind: sorry i was away a bit; grok is based on S29 + other synopsis
12:46 lichtkind azawawi: thanks for the script
12:47 lichtkind azawawi: nop i do here also lot of things
12:47 azawawi lichtkind: like what?
12:47 alester joined #perl6
12:48 lichtkind azawawi: i mailed the grok guy and text::editor::simple guy some other guy with a kephra feature request and im planning my next travel
12:49 azawawi lichtkind: cool
12:50 azawawi lichtkind: do u an API i can re-use?
12:50 lichtkind azawawi: what?
12:51 azawawi lichtkind: im using App::Grok API to get help topics/etc... is there anything like that in Perl6::Doc ?
12:52 IllvilJa joined #perl6
12:52 lichtkind azawawi: not yet , i didnt much in last year with that module
12:53 azawawi lichtkind: i see; no worries. keep u the great work on the tablets :)
12:53 azawawi lichtkind: s/keep u/keep up/
12:54 skids joined #perl6
12:54 lichtkind azawawi: thanks but its twice as much you see, i maintain also the german mirror
12:54 azawawi lichtkind: oh that's too much :)
12:55 azawawi lunch &
12:57 lichtkind azawawi: ihave some more hats :) bye
13:06 macae joined #perl6
13:07 masak joined #perl6
13:23 synth joined #perl6
13:28 payload joined #perl6
13:31 ispy_ joined #perl6
13:37 ruoso joined #perl6
13:39 ruoso Hello!
13:39 sbp hey ruoso
13:39 masak ruoso: \o
13:39 mj41 joined #perl6
13:39 [particle] moritz_: where was the perl6-projects.org refresh announced?  how do we get in touch for comments?  i don't like how the text bounces as you mouse over the selections, i'd rather see the text get larger in-place without affecting spacing (making sure the other list items are already properly spaced to accommodate a larger font size)
13:40 moritz_ [particle]: it was announced here (more)
13:40 [particle] well, that's how i found out about it :)
13:40 masak [particle]: full ack. things should never be resized in any way, shape or form by a mouse-over.
13:41 moritz_ [particle]: I think that the test size, spacing and hover effects need some more work
13:41 Matt-W rakudo: my $p = "raw"; $p eq any(<raw tunnel>) ?? say "yes" !! say "no";
13:41 p6eval rakudo e7a799: OUTPUT«yes␤»
13:41 Matt-W rakudo: my $p = "rabbit"; $p eq any(<raw tunnel>) ?? say "yes" !! say "no";
13:41 p6eval rakudo e7a799: OUTPUT«no␤»
13:41 * Matt-W weeps at not having perl 6 yet
13:41 moritz_ Matt-W: it's even prettier...
13:41 Matt-W yes
13:42 Matt-W and how do I express that half so elegantly in perl 5?
13:42 moritz_ rakudo: my $p = "raw"; say $p eq any(<raw tunnel>) ?? "yes" !! "no"
13:42 p6eval rakudo e7a799: OUTPUT«yes␤»
13:42 [particle] moritz_: completely agree about text size, spacing and hover
13:43 moritz_ use List::MoreUtils qw(any); say any({$_ eq $p}, @list) ? 'yes' : 'no';
13:43 Matt-W moritz_: unfortunately many cool modules aren't available to me. I don't suppose that's in core in 5.8...
13:43 Chillance joined #perl6
13:44 [particle] moritz_: also, the page header with camelia is wider than the sections below, so the layout feels unbalanced
13:45 Matt-W [particle]: that might be more acceptable, but it's also off to one side...
13:45 moritz_ yes, I'm aware of that. Patches welcome :-)
13:46 [particle] oh, the site css is in the repo? how is it updated? i am not unafraid of css
13:46 moritz_ [particle]: it's  in docs/feather/perl6-projects.org/
13:46 moritz_ and updated by a cron job
13:46 moritz_ at least every 15min
13:47 moritz_ (we used to have a notice explaining that on the page, don't know where that went)
13:47 * Matt-W cackles madly
13:50 Matt-W it's only thursday and I'm already insane
13:50 Matt-W this has not been a good week
13:51 moritz_ why, does it usually take you 'til friday to go insane?
13:51 Matt-W friday afternoon
13:51 Matt-W on a good week, it never happens at all
13:52 moritz_ you're ahead of your time, congratulations!
13:55 pugs_svn r27494 | moritz++ | [perl6-projects.org] don't resize links on hover, just replace the dotted by a
13:55 pugs_svn r27494 | moritz++ | solid line
13:58 rfordinal joined #perl6
13:59 pmurias_ joined #perl6
13:59 hercynium joined #perl6
14:00 pugs_svn r27495 | moritz++ | [perl6-projects.org] more CSS tweaks: line spacing, font size
14:18 payload1 joined #perl6
14:23 cbk_ joined #perl6
14:24 skipper_ joined #perl6
14:25 nihiliad joined #perl6
14:26 pmichaud Good morning, #perl6
14:26 masak morning, pmichaud.
14:26 moritz_ oh hai pmichaud
14:26 molaf joined #perl6
14:27 pmichaud perl6-projects++
14:27 moritz_ Su-Shee++
14:28 masak oh! nice! didn't see that till now.
14:28 moritz_ pugs_svn eated her commits; perhaps because she has a dash in her svn username?
14:28 masak and the backgrounds of the boxes are schemed on Camelia. nice!
14:29 masak though the yellow has too much green in it, and a bit too much saturation. mind if I tweak it slightly?
14:29 [particle] that's what public svn repos are for!
14:30 masak "don't ask to fix" :)
14:30 moritz_ masak: we had a preview yesterday with less saturation, that looked a bit disappointing; so be sure to to desaturate it too much
14:30 * masak opens up Gimp to find the perfext yellow
14:30 [particle] (bigger font + wider display)++
14:30 PerlJam ++ for whoever fixed the changing font size on hover.
14:30 [particle] looking much better now
14:31 masak moritz_: understood. actually, I think the interplay between all backgrounds and Camelia is what matters most.
14:31 [particle] i don't like that the download link is solely for rakudo
14:32 moritz_ [particle]: we discussed that yesterday too
14:32 masak I'll also note that my browser window is not wide enough by default to allow three boxes to fit on one row, which makes the page look... less than awesome.
14:32 masak I'd prefer absolute positioning to floats, I think.
14:33 moritz_ then you'd have horizontal scrolling
14:33 moritz_ which IMHO is even less than less than awesome :-)
14:33 pmichaud I think I prefer the horizontal scroll
14:34 pmichaud having the boxes jump around on resize is... disconcerting
14:34 masak moritz_: there's a horizontal scrollbar regardless, due to the header. but I see your point.
14:34 moritz_ how often do you resize your browser, pmichaud?
14:34 pmichaud moritz_: frequently, actually.
14:34 masak pmichaud has a point too.
14:34 * moritz_ nearly never
14:34 moritz_ well
14:35 * PerlJam used to resize browser often before having an extra monitor
14:35 masak moritz_: try and narrow the browser window to two columns and observe the result.
14:35 moritz_ usually I hate horizontal scrolling because it makes it impossible to read text
14:35 masak but that's not the issue here.
14:35 moritz_ but since the text is broken up in columns anyway, it doesn't matter very much here
14:36 masak what we have is effectively a 2x3 table.
14:36 masak (yes, I said table. so sue me.)
14:37 * moritz_ sues masak
14:38 masak 'it's 2009, and web designers still get sued for saying "table". when will the madness end?'
14:39 payload joined #perl6
14:39 moritz_ never.
14:39 pmichaud the boxes also don't align.  However, given that Camelia has such assymetries, perhaps the boxes should also.  :-)
14:39 pmichaud *asymmetries
14:39 PerlJam there's something a little off with the layout that I can't quite put my finger on ... like there's a little too much space between the boxes or the boxes are too small
14:39 pmichaud for example, the right two boxes aren't aligned
14:39 pmichaud and none of the boxes align with the header (ff 3.5)
14:39 moritz_ actually what we really need is a site layout language
14:40 moritz_ something which CSS wasn't really designed for
14:40 masak moritz_: do that (successfully), and you'll be famous.
14:40 PerlJam moritz_: but perl 6 *is*!  :)
14:41 PerlJam moritz_: (perl 6 is designed for designing such a language anyway  ;)
14:41 moritz_ masak: I'm already famous, nearlly all people I know know me too :-)
14:41 masak moritz_: :)
14:42 pmichaud Larry is known for "rn", "patch", and Perl.   I appear to be known for Rakudo, PmWiki, and "Strawberry Pop-Tart Blow-torches".  :-|
14:43 pugs_svn r27496 | pmurias++ | [re-smop] proof of concept call-graph printer
14:43 masak moritz_: experimenting a little, I see what you mean about too little saturation. but I believe there's a middle ground.
14:44 masak pmichaud: that's a nice track record, I'd say. especially the pop-tarts. :)
14:45 moritz_ and I thought it was toaster experiments
14:45 pmichaud it's nice that it's still #1 on google search for "strawberry pop-tart"  :-)
14:45 masak but the yellow needs to be softer. right now it's too sharp.
14:45 masak ah, found the right nuance.
14:46 Exodist joined #perl6
14:47 pmurias ruoso: re using berkley db for stm, isn't berkley db a persistent hash?
14:47 ruoso pmurias, it can be used in-memory only
14:48 Matt-W wow
14:48 Matt-W perl6-projects has changed again!
14:48 Matt-W I detect people tweaking
14:48 iblechbot joined #perl6
14:50 pugs_svn r27497 | masak++ | [perl6-projects] mildened background colors a little
14:51 masak you know what I think would really suit the page too? a subtly fading background, such as the one Mozilla uses for its site. just a slight fade from a nuance of grey to white.
14:52 PerlJam masak: sounds good to me.
14:53 masak hm, seems mozilla.com uses another layout now, so I can't show an example.
14:53 masak but I have such a background ready, so I'll copy it in and you can see how it looks in 15 minutes. :)
14:54 Matt-W yay
14:55 TimToady hmm, the TM seems to have disappeared from Camelia, and she no longer links to the pdl
14:55 PerlJam Aha!  I know what bothers me about the current design.  It's too flat and "blocky".   I tend to favor designs that are more "fractal".  Where all that blank space in the header or in the area between boxes or at the bottom of the boxes has some little detail that fills in the space just a little.
14:55 KyleHa joined #perl6
14:55 TimToady we do want to convey simplicity, however
14:56 masak a fractal is simple. :P
14:56 justatheory joined #perl6
14:56 TimToady that's part of why Camelia is in cartoon style
14:56 ruoso anyway... the design breaks with a higher dpi font
14:56 TimToady I didn't say they weren't :P
14:56 PerlJam Sure, but I'm thinking of little things like .... oh, I don't know  ... a little bit of grass and a small flower near Camelia
14:57 pmichaud how about a few onions sprinkled about?  :-P
14:57 PerlJam yeah, or onions
14:57 pugs_svn r27498 | masak++ | [perl6-projects] added fading background
14:57 PerlJam (or, *an* onion)
14:57 masak onions and grass!
14:57 Matt-W mmm... onions...
14:58 PerlJam It's like an easter egg that's subtle and adds just a bit of nuance.
14:58 TimToady could also start to look cluttered if we're not careful
14:58 PerlJam I also tend to favor ultra-sparse designs too  (see google)
14:59 PerlJam the current design seems to be just enough in the middle of those that it bothers me
14:59 Matt-W I'm still dubious about the background colours
14:59 Matt-W and the download button being a completely different shape to everything else looks very out of place
14:59 ruoso the widths of the columns should have been in %s it is breaking with bigger fonts
14:59 Matt-W and download what, anyway?
14:59 PerlJam Matt-W: *the* perl 6  :)
14:59 masak Matt-W: I don't think my change for the background colors has gone through yet.
14:59 TimToady it used to say downloads
15:00 TimToady why did it get changed back?
15:00 Matt-W masak: I shall look forward to it
15:00 * Matt-W also suggests the headers in the boxes should be in a larger font than the rest of the box contents
15:01 moritz_ Matt-W: it has now
15:01 moritz_ Matt-W: feel free to patch that in
15:01 PerlJam The downloads "button" could look like an onion.  that would break up the monotony of the boxes and still be perly  :)
15:02 moritz_ PerlJam: sure, make a graphic and commit it
15:02 Matt-W hmm, a bit better
15:02 Matt-W still feels like CBeebes
15:02 Matt-W CBeebies*
15:02 moritz_ actually I find it a bit depressing with dark background :/
15:03 Matt-W it makes it look like a cloud came across
15:03 TimToady seems a bit drab now
15:03 Matt-W probably the wrong solution
15:03 Matt-W I might play with a copy this evening
15:03 Matt-W not that I'm any great shakes as a designer
15:03 TimToady the less saturated colors also add to the drabness
15:03 Matt-W but, you know, ideas
15:04 pmichaud I agree -- either keep the saturation, or avoid the camelia colors
15:04 masak I agree. it's a bit drab now. it can still be improved.
15:04 DemoFreak joined #perl6
15:04 agentzh left #perl6
15:04 Matt-W all things can be improved
15:05 Matt-W apart from Perl 6's for loops (go on, prove me wrong)
15:05 agentzh joined #perl6
15:05 masak what my change did was mainly to make the boxes look more homogenous. before the change, the yellow was screaming.
15:05 moritz_ Matt-W: they could be faster :-)
15:05 TimToady most things can be improved in one dimension by making them worse in some other dimension
15:05 Matt-W moritz_: that's not the language's fault, that's the implementation's fault
15:06 Matt-W TimToady: this is very true
15:06 pmichaud Can we yet write "for" in Perl 6?   ;-)
15:06 * PerlJam jumps up and down on the waterbed to see what happens
15:06 TimToady yeah, well, with a different language the implementation might be done by now :P
15:06 TimToady std: for
15:06 p6eval std 27498: OUTPUT«Undeclared routine:␤   for used at 1 ␤ok 00:02 36m␤»
15:06 TimToady oh wait
15:06 TimToady std: "for"
15:06 p6eval std 27498: OUTPUT«ok 00:04 36m␤»
15:06 TimToady yes, we can
15:06 pmichaud I meant the implementation of for loops
15:06 pmichaud TimToady: :-P
15:07 KyleHa1 joined #perl6
15:08 Matt-W pmichaud: you could probably write it in terms of loop and elems, but you might need some extra introspection stuff to examine the pointy block for parameters...
15:08 TimToady introspection is probably a sign of incorrectness
15:08 moritz_ or of magic :-)
15:08 pmichaud Matt-W: our inability to describe for loops in Perl 6 was once identified as sub-optimal.  So, consider yourself proven wrong :-P
15:09 pmichaud Matt-W: but as a consolation prize, we have this copy of "Rakudo: The Home Game" and some other parting gifts :-P
15:10 Matt-W pmichaud: I'm sorry, I've not seen any proof that you can't do it, or you won't be able to do it very soon.
15:10 Matt-W Therefore I win :P
15:10 TimToady we're still missing a primitive to allow partial binding to a list, removing the elements that bind, and leaving the rest
15:11 masak speaking of introspection, I have a very concrete example of a grammar extension that I'd like to discuss. let's say I'd like to introduce the keyword 'whence', which'd work like Haskell's 'where'. how'd I do it? as specific instructions as possible.
15:12 masak so it'd be a statement modifier, just like statement-modifier if, for, given etc.
15:12 TimToady rewrite STD :P
15:12 masak TimToady: yes, exactly.
15:13 masak it practically can't be done the way STD.pm looks now.
15:13 TimToady your problems there are not syntactic, but semantic violations of one-pass-ness
15:13 masak mind you, STD.pm is the coolest Perl 6 code I've ever seen.
15:13 masak but extending it this way seems... difficult.
15:13 masak oh, the one-pass-ness is a problem too, yes.
15:14 TimToady you can certainly add a new statement modifier by derivation
15:14 TimToady but the problem is post-declaration
15:14 masak TimToady: I'd like to see an example of that, even a small one.
15:15 moritz_ maybe overwriting block?
15:15 masak why block?
15:15 moritz_ rule block { '{' ~ '}' <statement_list> <whence_block>? }
15:16 masak oh.
15:16 REPLeffect joined #perl6
15:16 moritz_ and setting a context var that tells the parser to skip variable declaration checks
15:16 moritz_ (which you'd also have to implement, of course)
15:16 masak interesting.
15:16 TimToady overriding non-category rules is much more antisocial than adding new rules to existing categories
15:17 moritz_ aye :-)
15:17 moritz_ but we need a no-strict mode for one-liners and 'no strict' anyway
15:17 moritz_ so at one point such a flag/context var will eventually exist
15:17 masak anyway, the statement modifiers right now seem to be pretty much tangled up in the token statement.
15:18 TimToady I don't follow what you mean at all
15:18 masak moritz_: well, I still want variable checks on unbound variables. :)
15:18 masak TimToady: that might be because I'm not sufficiently familiar with STD.pm yet.
15:18 skids TimToady: other than the fact that "Lists" are immutable, and pulling the .elems across in ($foo, $bar) := shift(...),shift(...) what else does the "missing primitive" for loops/feeds need to do?  (If I'm at all following, that is?)
15:20 TimToady syntactically, adding a new statement modifier is as simple as "use MyGrammar is STD; rule statement_mod_cond:whence {<sym> <modifier_expr> }"
15:20 TimToady er, 'use STD; grammar MyGrammar is STD;'
15:20 masak how do I know it's _cond and not _loop?
15:20 TimToady you can make it whatever pleases you
15:21 TimToady but whence doesn't feel like a loop to me
15:21 masak they're equivalent? why are there two types?
15:21 masak given doesn't feel like a loop to me. :)
15:21 TimToady well, it's really more like topicializer on the outside
15:21 moritz_ TimToady: but masak wants to have the side effect that it surpressed declaration checks in the loop *before* the whence?
15:21 moritz_ s/\?//
15:22 REPLeffect joined #perl6
15:22 TimToady yes, that's the semantic bit I was complaining about, but has nothing to do with syntax :)
15:22 masak indeed.
15:22 masak I hadn't thought about it as breaking one-pass-ness before.
15:23 moritz_ TimToady: when we usually talk about such things, declaration checks are part of the syntax for you, no? :-)
15:23 TimToady you also have to write wrappers around the symbol table manipulation routines to prevent carping about undefineds
15:23 TimToady only when I want them to be :P
15:24 masak pmichaud: oh, and btw: would PRE and POST be hard to implement, or low-hanging fruit?
15:24 * TimToady tries again to backlog...
15:24 masak if only tests are the blocker, I volunteer to write some.
15:25 masak :q
15:25 * masak pretends that that was a smiley and not a vim command
15:25 masak one day I'll have a computer that does focus-follows-eyes...
15:27 eiro haha ... i wrote it yesterday on my facebook page: "%s#|.* is not an insult, it's a vim command"
15:27 eiro and before: ":>!$ is not a smiley: it's a shell command !"
15:29 DC joined #perl6
15:34 TimToady actually, as long as you limit your postdeclarations to things that can parse as listops, current STD already allows postdeclaration
15:34 TimToady that doesn't allow you to say i + j though
15:35 TimToady so maybe you want a different postdeclaration policy
15:35 RonOreck joined #perl6
15:35 masak I got all of that except 'allow you to say i + j'
15:35 justatheory joined #perl6
15:35 moritz_ I think $i + $j would be fine
15:35 masak oh, that works for me.
15:35 TimToady but those aren't allowed to be post declared
15:36 TimToady and i + j parses as i(+j)
15:36 TimToady so you need a different policy
15:36 masak :/
15:36 kidd_` joined #perl6
15:37 TimToady like, postdeclared functions require (), and bare symbols parse more like values
15:38 TimToady but postdeclared variables are more problematic in the current scheme of things
15:40 masak aye, maybe I shouldn't try to spit against the wind. I'll see if I can find a more one-pass-friendly grammar extension example.
15:40 TimToady szabgab: (1,2) and (1) will soon parse to the same thing, which pmichaud and I have been calling a Parcel, which is sort of a pre-Capture notion
15:40 dukeleto joined #perl6
15:41 TimToady and may, in fact, replace Capture, if Parcel can present the Capture interface while remaining a Parcel
15:42 TimToady the difference is that in a Parcel (1,2,:a) treats :a as just another item in its list of objects
15:42 TimToady its putting it into Capture context of some sort that divides it into positionals and nameds
15:43 [particle] parcel reminds me more of package that capture
15:44 TimToady yes, that's because it doesn't get unwrapped till it reaches its destination
15:44 [particle] ah
15:45 TimToady but when we distinguish foo(1,2,:a) from foo(1,2,(:a)), a Parcel wrapping is what hides the :a from the outer capture
15:45 TimToady Parcel is also related to "paren cell"
15:45 TimToady so it's a bit like an S-EXPR
15:47 pmurias ruoso: what's a good way of viewing a call graph?
15:47 TimToady macros will probably be dealing with parcels instead of captures, probably
15:48 TimToady so says the Department of Redundancy Department...
15:48 TimToady note that the Parcel vs Capture distinction may have ramifications for SMOP innards
15:49 [particle] i don't think it will stop there
15:49 ruoso pmurias, dot?
15:49 TimToady well, no, but pmichaud already knows it
15:49 [particle] so trismop may be around the corner
15:50 TimToady they're probably ignoring me :)
15:50 pmichaud no, just working on another message in another window.
15:50 ruoso TimToady, Parcel?
15:51 TimToady Parcel
15:51 ruoso that's a new one
15:51 * ruoso haven't backlogged... should probably do it before asking repeated questions
15:51 TimToady yes, but we've been discussing it for several days now
15:52 TimToady but the last 5 minutes are the short version
15:52 TimToady well, 15 minutes
15:53 pmichaud 12, actually.
15:53 estrabd joined #perl6
15:53 pmurias ruoso: can dot handle several thousand nodes?
15:54 ruoso TimToady, you bet it does have ramifications...
15:54 estrabd joined #perl6
15:54 ruoso pmurias, in that case, a database may provide the best tools
15:55 ruoso TimToady, but maybe not that many, as the last capture change
15:55 ruoso TimToady, it probably will be a mildew-only entity... I'm not sure it will really affect SMOP,
15:55 ruoso since it's more Parse-related than data-related
15:56 ruoso i.e.: Parcels become capture most of the time
15:56 TimToady it impacts at the point where someone wants to call foo(1,2,:a) and foo happens to want to bind the arguments as a Parcel rather than as a Capture
15:57 TimToady so either you have to be able to reconstruct the Parcel, or Capture is just a view of a Parcel
15:57 ruoso hmm... to the extent it provides a different API
15:57 pmurias ruoso: a call graph is a tree, and i'm not sure what flattening it in a database table will give us
15:57 ruoso pmurias, recursive relationships
15:57 pmichaud it may also impact the structure a bit, since it may then be possible to have   foo(1, :a<bc>, 2, 3, :a<de>, 4)
15:58 pmurias ruoso: explain
15:58 ruoso pmurias, a table that references itself
15:58 ruoso pmurias, this call is a child of another call
15:58 pmurias but it's a tree, there are no cycles
15:59 ruoso TimToady, hmm... so maybe that means Parcel should be more basal than Capture... which means another huge refactoring
15:59 TimToady that's what I was pointing out as a possibility
16:00 * ruoso lunch & think about it....
16:00 TimToady chow
16:11 jrtayloriv joined #perl6
16:18 REPLeffect joined #perl6
16:20 cdarroch joined #perl6
16:22 Psyche^ joined #perl6
16:30 register joined #perl6
16:30 register joined #perl6
16:32 register72 joined #perl6
16:34 lucar joined #perl6
16:40 jrtayloriv joined #perl6
16:40 moritz_ rakudo: my ($a, $b, $c); $b := $c; $a := $b; $c = 4; say $a
16:40 p6eval rakudo e7a799: OUTPUT«4␤»
16:40 moritz_ rakudo: my ($a, $b, $c); $b := $c; $a := $b; $c = 4; say $b
16:40 p6eval rakudo e7a799: OUTPUT«4␤»
16:41 moritz_ is that how it's specced?
16:42 pmichaud what would you expect instead?
16:42 moritz_ dunno, just asking
16:42 pmichaud I think it's correct, yes.
16:42 pmichaud $b gets bound to $c, so both are the same.  $a is then bound to $b (which is also $c), so all three are the same.
16:43 pmichaud Changing $c then changes $a and $b
16:43 pmichaud phrased another way -- at the point of the assignment, $a, $b, and $c all refer to the same container
16:48 payload joined #perl6
16:52 payload joined #perl6
16:55 tann joined #perl6
17:02 justatheory joined #perl6
17:03 rfordinal joined #perl6
17:09 skids Parcel++ (I like that name)
17:10 japhb_ joined #perl6
17:19 pugs_svn r27499 | moritz++ | [irclog] forbid access to .conf files
17:21 rfordinal left #perl6
17:31 hercynium joined #perl6
17:39 japhb joined #perl6
17:47 ZuLuuuuuu joined #perl6
17:54 jrtayloriv joined #perl6
17:55 pmurias joined #perl6
17:58 KyleHa joined #perl6
17:58 ruoso TimToady, right... so a Parcel is like a Capture that remembers the position of the named args
18:00 ruoso the refactoring is not that bad, I just need to store the entire list, and keep two indexes, one for "only the positionals", and other for the named args... the capture creation in SMOP can be maintained as it is, we would just add a variant for creating a capture in the parcel level...
18:00 ruoso thank god capture is immutable
18:01 ruoso but at which level is it determined if an item of a Parcel might be a named arg?
18:02 ruoso is it at ~~ Pair level?
18:02 ruoso or is it something more related to the parsing?
18:02 moritz_ no
18:02 moritz_ "a" => 'b' # a pair, but not a named arg
18:04 ruoso so it's parse-related
18:05 ruoso I think for SMOP we won't need two different objects for Parcel and Capture then
18:05 ruoso it's just two different views of the same data
18:06 TimToady but they'll fight over the @ api if we don't distinguish the types, I suspect
18:07 TimToady I have to go through my table of 200 examples and see how things actually interconvert...
18:08 TimToady like, what is the type of self when you say (@a,@b).method
18:09 tann joined #perl6
18:09 TimToady groceries &
18:09 ruoso TimToady, unless we define that named are always also positionasl
18:09 ruoso and go back 2 years....
18:13 * ruoso didn't really mean to say that...
18:24 skids So does the "when => 'now',1,2,3; #always a named arg" mean literally always, even if there's no candidate with that named arg, but there is a candidate with a Pair positional?
18:24 moritz_ yes, unless there's a positional named $when
18:25 davef joined #perl6
18:25 * skids would still consider that a named argument (just not a named param)
18:26 skids OK, so MMD does not have to happen to determine what's a named arg.  Makes sense.
18:28 * skids re-notices :$when notation.
18:29 skids I'll have to run through my param names "suggestion" list with that in mind.
18:31 ruoso but since it's defined at parse-time everything is easier
18:33 skids Definitely.
18:33 ruoso TimToady, btw... I'd argue that @ always gets only the positionals
18:33 davef Hi - I'm using java2perl6 to translate some JDBC APIs to Perl 6.  It generates roles with methods of  the form  'multi method createStatement()   returns java::sql::Statement { ... }'. Can anyone tell me what the 'returns' bit is supposed to do?
18:33 skids Though, I had to ask because it's not like that would stop the Perl community... suffering on the part of developers to help the users etc. :-)
18:34 ruoso davef, the "returns" goes to inside the signature with a --> java::sql::Statement
18:34 skids Erm, returns and return type are not the same thing.
18:35 skids IIRC returns is the one that is visible inside the function, as context to the right of a return statement.
18:35 moritz_ davef: it's supposed to declare a return value
18:35 skids Or do I have that bass ackwards?
18:35 moritz_ std: multi method createStatement()   returns java::sql::Statement { ... }
18:35 p6eval std 27499: OUTPUT«##### PARSE FAILED #####␤Malformed block at /tmp/E2OuQqi4MQ line 1:␤------> [32m createStatement()   returns java::sql::[31mStatement { ... }[0m␤    expecting any of:␤   indirect name␤    morename␤FAILED 00:02 37m␤»
18:36 ruoso skids, in Java it's for both sides
18:36 moritz_ std: multi method createStatement()   returns Int { ... }
18:36 p6eval std 27499: OUTPUT«ok 00:02 37m␤»
18:37 ruoso std: role java::sql::Statement {}; multi method create-statement( --> java::sql::Statement) {..}
18:37 p6eval std 27499: OUTPUT«##### PARSE FAILED #####␤Unable to parse blockoid; couldn't find final '}' at /tmp/x0evUZwIv8 line 1:␤------> [32me-statement( --> java::sql::Statement) {[31m..}[0m␤    expecting any of:␤       prefix or noun␤   statement end␤    statement list␤   whitespace␤FAILED 00:02 37m␤»
18:37 ruoso hmm...
18:37 skids ...
18:39 davef I looked at S12 but maybe I'm looking in the wrong place, where's it documented?
18:39 ruoso moritz_, I think std is accepting that returns as an arbitrary trait....
18:40 ruoso std: multi method create-statement() shoots Int {..}
18:40 zamolxes joined #perl6
18:40 skids ruoso: ... not ,,
18:40 p6eval std 27499: OUTPUT«##### PARSE FAILED #####␤Malformed block at /tmp/wC16zxmbWw line 1:␤------> [32mmulti method create-statement() [31mshoots Int {..}[0m␤    expecting any of:␤     blockoid␤ method_def␤       terminator␤       trait␤FAILED 00:02 37m␤»
18:40 skids *.. even
18:40 skids davef: S06 prolly
18:40 davef I'm using rakudo - does that make a difference?
18:40 davef thanks skids
18:40 ruoso std: role java::sql::Statement {}; multi method create-statement( --> java::sql::Statement) {...}
18:40 p6eval std 27499: OUTPUT«ok 00:02 37m␤»
18:40 ruoso skids, ah... thanks
18:41 moritz_ rakudo: sub a() return Int { 3 }; say a()
18:41 p6eval rakudo e7a799: OUTPUT«Malformed routine definition at line 2, near "a() return"␤in Main (src/gen_setting.pm:3340)␤»
18:41 ruoso davef, ^^
18:41 moritz_ rakudo: sub a() returns Int { 3 }; say a()
18:41 p6eval rakudo e7a799: OUTPUT«Method 'succ' not found for invocant of class 'Method'␤»
18:41 moritz_ rakudo: sub a(--> Int) { 3 }; say a()
18:41 p6eval rakudo e7a799: OUTPUT«3␤»
18:41 moritz_ davef: this version works
18:41 moritz_ or also
18:41 moritz_ rakudo: Int sub a() { 3 }; say a
18:41 p6eval rakudo e7a799: OUTPUT«Statement not terminated properly at line 2, near "sub a() { "␤in Main (src/gen_setting.pm:3340)␤»
18:41 moritz_ rakudo: sub Int a() { 3 }; say a
18:41 p6eval rakudo e7a799: OUTPUT«Malformed routine definition at line 2, near "Int a() { "␤in Main (src/gen_setting.pm:3340)␤»
18:42 moritz_ ok, doesn't work :/
18:42 ruoso moritz_, I'm not sure this alternative declarations are valid
18:42 ruoso moritz_, S06 only lists ( --> Int)
18:42 moritz_ std: our Int sub foo() { }
18:42 p6eval std 27499: OUTPUT«ok 00:02 37m␤»
18:42 moritz_ std: Int sub foo() { }
18:42 p6eval std 27499: OUTPUT«##### PARSE FAILED #####␤Syntax error (two terms in a row?) at /tmp/tmuijGksEp line 1:␤------> [32mInt [31msub foo() { }[0m␤    expecting any of:␤        infix or meta-infix␤      infix stopper␤    standard stopper␤ statement modifier loop␤  terminator␤FAILED 00:02 36m␤»
18:42 moritz_ ah, it only works with scope modifier
18:42 moritz_ rakudo: our Int sub a()  { 5 }; say a
18:43 p6eval rakudo e7a799: OUTPUT«5␤»
18:43 moritz_ rakudo: our Int sub a()  { '4' }; say a
18:43 p6eval rakudo e7a799: OUTPUT«Return value type check failed; expected Int, but got Str␤in sub a (/tmp/pvVho5m5Zv:2)␤called from Main (/tmp/pvVho5m5Zv:2)␤»
18:43 davef The java2perl6 code is 2 years old, I guess the syntax may have changed since then, I'm trying to work out what it should emit.
18:44 ruoso moritz_, maybe it's a fossil... but S06 doesn't list "Int sub" for a long time already
18:44 moritz_ davef: with --> ReturnType in the syntax it should be fine
18:44 moritz_ ruoso: maybe S12?
18:45 davef so would that be 'multi method createStatement() --> java::sql::Statement { ... }' ?
18:46 ruoso davef, no..
18:46 ruoso davef, multi method createStatement( --> java::sql::Statement) {...}
18:47 davef dumb question - what does the '...' mean in this context?
18:47 moritz_ it marks the method as a stub
18:47 ruoso davef, yada-yada-yada
18:48 moritz_ ie if you call it, it'll throw an exception
18:48 davef ok - does the -> follow any parameter declarations?
18:50 moritz_ yes
18:50 moritz_ and it's -->, not ->
18:51 kate21de joined #perl6
18:51 * moritz_ wrote some Perl 5 binding tests to make sure it's mostly compatible with Perl 6
18:51 masak joined #perl6
18:52 davef thanks - I'll go and play now :)
18:52 masak good evening, lambdacamels.
18:54 moritz_ good evening bugbutterfly :-)
18:54 * masak flaps contentedly
18:55 masak but remember, boys and girls: anyone can report bugs. it's finding them that's the trick. for that, you have to try write Perl 6 code that no-one's written before.
18:56 masak (and anyone can to that too, though it's getting harder by the day.)
18:56 * ruoso »ö«
19:00 explorer joined #perl6
19:04 pmurias_ joined #perl6
19:05 moritz_ I've been thinking about file tests
19:05 moritz_ and somehow I don't like the current situation
19:05 masak please elaborate.
19:05 moritz_ it's hard to find words for it, but it feels ... like legacy
19:06 moritz_ -e $foo becomes $foo ~~ :e
19:06 masak I know what you mean.
19:06 moritz_ and $foo ~~ :s returning an integer...
19:06 masak but there are sometimes local maxima that are hard to get out of.
19:06 moritz_ smartmach usually returns a Bool
19:06 masak Test.pm is another example.
19:06 moritz_ my idea would be a .f method on Str that means "interpret this string is a file"
19:06 moritz_ so you could write "/etc/passwd".f.exists
19:07 moritz_ or $str.f.size
19:07 masak .File.exists would be nicer
19:07 ruoso moritz_, I agree that ~~ with a pair is weird
19:07 ruoso worse... it's not even a pair
19:07 moritz_ masak: but maybe a bit long
19:07 moritz_ ruoso: :e is a pair
19:08 moritz_ rakudo: say :e ~~ Pair
19:08 p6eval rakudo e7a799: OUTPUT«1␤»
19:08 moritz_ it's short for :e(True)
19:08 pmurias ruoso: if i put the call-graph data in a database will have convenient methods of viewing it (not counting writing a custom tool)
19:08 ruoso pmurias, SQL
19:10 ruoso moritz_, I could suggest "if $file.stat: :e {...}"
19:11 ruoso moritz_, I could suggest "my $size = $file.stat: :s
19:11 moritz_ ruoso: please not. 'stat' is just the name of a syscall, not a word
19:11 ruoso pmurias, if you manage to design a dimensional model for the data you can use an OLAP tool like jpivot
19:12 ruoso moritz_, any word that would describe what "stat" dose?
19:12 moritz_ ruoso: 'file' or 'path'
19:13 moritz_ 'interpret that thing as a file'
19:13 moritz_ or path
19:13 ruoso $file.status:
19:13 ruoso $file.status: :e
19:13 ruoso $file.status: :s
19:13 masak I like that.
19:13 huf stat is not a word?
19:13 huf wait. is grep a word?
19:13 masak stat is a Unixy term. it has more traction than status.
19:13 KyleHa1 joined #perl6
19:13 ruoso masak, does it?
19:14 huf dunno about you, but stat is a pretty well-defined word in my mind
19:14 masak ruoso: I think so, yes.
19:14 moritz_ huf: do your non-Unixy pals understand it
19:14 huf moritz_: obviously not, but my non-unixy friends dont program either ;)
19:15 pmurias joined #perl6
19:15 masak I agree with huf. this is not a case where length == clarity.
19:15 moritz_ that's why I proposed .f
19:15 huf moritz_: but if they can learn the meaning of grep, stat shouldnt be a problem (i my baseless opinion)
19:15 moritz_ huf: we also want to encourage beginners
19:16 moritz_ and there's a non-Unix world too
19:16 pmichaud part of the difference is that "grep" doesn't really have an English homologue.  "Stat" does.
19:16 huf hmm...
19:16 masak moritz_: I still haven't seen a solution to the 'treat Strings as Files' problem which I really like.
19:17 masak pmichaud: well, 'stat' has more precise connotations than 'status'.
19:17 pmichaud in the unix world, yes.  outside of that, it has different meanings in the statistics and medical fields
19:17 RonOreck I think some people might recognize stat as meaning 'right now', as in 'I need that whatchmacalit, stat!'
19:17 moritz_ anyway, the aspect that the most critique here is about the names and not the idea itself encourages me to send a mail to p6l later
19:18 masak pmichaud: you have a point.
19:18 pmichaud moritz_: for your, I'd prefer to see us come up with a method or operator that unambiguosly means "this string is a filename"
19:18 pmichaud *for your mail
19:20 masak moritz_: by all means, send an email.
19:20 skids alternative, not a good one, but a way to pass a string to open()?
19:20 masak though this is one of those potential bikeshedding topics. :)
19:20 pmichaud definite bikeshed.  My paintbrushes are ready.
19:21 pmichaud "Gold!  It has to be gold!"
19:22 skids fusia.
19:22 skids There are simply not enough fusia colored buildings.
19:22 moritz_ skids: I thought about that, but it's a different operation
19:23 moritz_ stat accesses file meta data, open() makes file data accessible
19:23 skids moritz_: ah good point.
19:24 ruoso I kinda think that, as open, stat would need to be a sub instead of a method
19:26 Sunbeam joined #Perl6
19:26 masak regex matches are great in Perl because they have a succinct syntax -- the =~ operator in Perl 5, ~~ in Perl 6, all the shortcurts with $_, and so on.
19:26 masak ideally one'd want something similar for file operations.
19:26 masak in Perl 5, that's -e et al.
19:27 masak in Perl 6, it's already gotten slightly longer due to our higher standards of sanity.
19:30 nihiliad joined #perl6
19:32 * ruoso votes for: multi stat(Str $name, *%switches) {...}
19:33 skids Erm, so wiat, how's this differ from S03 $filename ~~ :e again?
19:33 Sunbeam joined #Perl6
19:33 ruoso skids, it doesn't add this very peculiar semantic to smart match
19:34 skids But isn't the semantic on the Str class, not smartmatch?
19:34 skids Just $f ~~ :adv matches against $f.adv() generically?
19:35 ruoso skids, that's even weirder
19:36 ruoso skids, but no... I think it's defined in the smart-match table as compile-time semantics
19:36 masak I'm not sure I agree that the semantics of the smartmatch is that peculiar.
19:36 ruoso if stat $file, :e { say 'something' }
19:36 masak regex matches return Match, for example.
19:36 ruoso my $size = stat $file, :s
19:36 skids That's what S03 seems to say:  (The 1st form $filename ~~ :e) actually translates to the latter form ($filename.e) so the object's class decides how to dispatch methods"
19:37 Sunbeam joined #Perl6
19:37 pmichaud S03 says that matching against a pair actually does an attribute test
19:38 pmichaud it's not syntactic, nor compile-time.
19:38 * ruoso re-re-re-reads S03
19:38 masak what's an attribute test, precious?
19:38 pmichaud $x ~~ :foo   ->   $x.foo
19:38 masak so, a method?
19:38 pmichaud or, more precisely:    $x."foo"
19:38 moritz_ actually...
19:39 Sunbeam joined #Perl6
19:39 ruoso pmichaud, does that mean that Str must implement a method "e"?
19:39 [particle] sunbeam: you're bouncing in and out
19:39 moritz_ $x ~~ $y  => $x."$y.key()" ~~ $y.value()
19:39 Sunbeam Sorry
19:39 moritz_ if $y ~~ Pair
19:39 Sunbeam Fixing xchat theme.
19:39 Sunbeam :P
19:39 [particle] aha
19:39 pmichaud ruoso: I believe it does mean that, yes.  (checking)
19:39 Sunbeam i b amsgin i was fixing xchat theme, so don't freak out ok ty. <3
19:40 ruoso pmichaud, now *that's* weird
19:40 pmichaud S03:
19:40 pmichaud The filetest operators are gone.  We now use a C<Pair> as a
19:40 pmichaud pattern that calls an object's method:
19:40 pmichaud if $filename ~~ :e { say "exists" }
19:40 pmichaud is the same as
19:40 pmichaud if $filename.e { say "exists" }
19:41 sri_kraih joined #perl6
19:41 tann rakudo: try { 1/0; CATCH { say "oopsie!" } }
19:41 p6eval rakudo e7a799: OUTPUT«oopsie!␤»
19:41 ruoso that transfer the "stat" feature to every single object that might be subject to that test
19:42 * ruoso definetively votes for a multi stat($filename, *%switches)
19:42 [particle] rakudo: 'readable'.say if '.'.r
19:42 p6eval rakudo e7a799: OUTPUT«Method 'r' not found for invocant of class 'Str'␤»
19:42 [particle] std: 'readable'.say if '.'.r
19:42 p6eval std 27499: OUTPUT«ok 00:02 36m␤»
19:43 moritz_ anyway, the current spec is inconsistent
19:43 moritz_ because $x ~~ :a translates to $x."a" ~~ Bool::True
19:43 moritz_ and smartmatching against True always gives True
19:43 moritz_ (:a is the same as :a(Bool::True))
19:43 pmichaud moritz_: that's a good point.
19:44 masak yes, there's something rotten in the stat of filetests.
19:44 moritz_ hah, it helps to write dozens of smartmatch tests :/
19:44 pmichaud under the current spec, though, one could do    $filename ~~ :m(3..*)   # file is older than 3 days
19:44 pmichaud er, :M
19:45 KyleHa1 moritz_++ # writing dozens of smartmatch tests
19:45 tann why is CATCH all uppercase while 'try' lower?
19:45 pmichaud It used to be that :a was the same as :a(1), which is probably how the ~~ test snuck in.
19:45 ruoso tann, because try is not required... ;)
19:45 masak tann: the uppercase in some blocks indicates that they are special in some way.
19:45 ruoso rakudo: 1/0; CATCH {say 'oopsie!'}
19:45 p6eval rakudo e7a799: OUTPUT«oopsie!␤Divide by zero␤»
19:45 tann gotcha
19:46 moritz_ [particle]: btw the reason that your .r thing didn't work is that rakudo implements the method :r, not r
19:46 [particle] ah, right!
19:46 [particle] std: 'readable'.say if '.'.:r
19:46 p6eval std 27499: OUTPUT«ok 00:02 36m␤»
19:46 [particle] rakudo: 'readable'.say if '.'.:r
19:46 p6eval rakudo e7a799: OUTPUT«Multiple Dispatch: No suitable candidate found for 'concatenate_str', with signature 'PSP->P'␤in Main (src/gen_setting.pm:1343)␤»
19:46 moritz_ the spec changes since then
19:46 [particle] it's not so readable, imo
19:46 moritz_ you can't call a method with : in the name like that
19:46 pmichaud why does rakudo implement ":r", I wonder?
19:46 masak I believe that one is already submitted.
19:46 moritz_ rakudo: say '.'.':r'
19:46 pmichaud rakudo:  say '.'.":r"()
19:47 [particle] moritz_: it parses in std
19:47 tann rakudo: TRY { 1/0; CATCH { say 'mama!' }}
19:47 p6eval rakudo e7a799: OUTPUT«Method ':r' not found for invocant of class 'Str'␤»
19:47 p6eval rakudo e7a799: OUTPUT«Method ':r' not found for invocant of class 'Str'␤»
19:47 p6eval rakudo e7a799: OUTPUT«Could not find non-existent sub TRY␤»
19:47 pmichaud rakudo:  say '.'.":e"()
19:47 p6eval rakudo e7a799: OUTPUT«1␤»
19:47 masak tann: there's no TRY. please read S04.
19:47 ruoso most importantly, it transfer to the object, a responsabiliy of something that should be a multi
19:47 moritz_ [particle]: but parses as what?
19:47 [particle] i don't know, but i can't imagine that it should
19:47 tann masak: was trying to trick rakudo
19:48 masak tann: ok? :)
19:48 masak tann: as you see, it did work. Rakudo just said that theere's no TRY, which is true.
19:48 masak s/did/didn't/
19:49 tann smart cookie rakudo is!
19:49 masak yup.
19:52 ispy_ joined #perl6
19:55 tann since p6 advocates democracy, i'm think the 'perl' in 'perl 6' stands for 'populist enlightened reflective learner' :)
19:55 tann s/think/thinking/
19:55 * masak is wearing the Polymorphic Existential Recursive Lambdas t-shirt today
19:56 pmurias tann: p6 advocates democracy?
19:56 [particle] yes. it's not welcome in north korea.
19:56 moritz_ it's more about consensus and awesomeness than majorities
19:56 tann pmurias: multi keyword says it all :)
19:57 tann and also, there's a timtoady around here
19:58 mofino joined #perl6
20:01 * ruoso reading the sun presentation on JDK 7 parallelization... interesting that they still don't consider implicit threading and implicit async-IO, and still point to explicit...
20:01 ruoso heaheaheahe
20:01 ruoso "One of the features being debated for the JDK 7 release is closures"
20:03 ruoso they're almots getting at the p5 syntax...
20:03 ruoso double highestGpa = students.withFilter( { Student s => (s.graduationYear == THIS_YEAR) } ).withMapping( { Student s => s.gpa } ).max();
20:03 lichtkind ruoso: hej
20:04 ruoso lichtkind, hi
20:05 ruoso the funniest part is that they call it .withFilter and .withMapping to implement grep and map ...
20:07 huf because long names are *so* much easier to read :)
20:11 ruoso seriously... there's something very wrong about the designers of java
20:12 ruoso it's like if they lived in a parallel universe where LISP was never written
20:13 eMaX joined #perl6
20:30 davef rakudo: role java::sql::Statement {multi method executeQuery(Str $v1 --> Int) { 5 }}
20:30 p6eval rakudo e7a799:  ( no output )
20:31 davef std:  role java::sql::Statement {multi method executeQuery(Str $v1 --> Int) { 5 }}
20:31 p6eval std 27499: OUTPUT«ok 00:02 39m␤»
20:32 literal @tell azawawi pong
20:32 lambdabot Consider it noted.
20:34 davef Does rakudo implement return types yet? I'm getting syntax errors (or have I got something wrong?)
20:34 moritz_ davef: yes, it does
20:34 moritz_ rakudo: sub a(--> Int) { 3 }; say a();
20:34 p6eval rakudo e7a799: OUTPUT«3␤»
20:34 moritz_ rakudo: sub a(--> Int) { "3" }; say a();
20:34 p6eval rakudo e7a799: OUTPUT«Return value type check failed; expected Int, but got Str␤in sub a (/tmp/imhKTTwTpH:2)␤called from Main (/tmp/imhKTTwTpH:2)␤»
20:34 moritz_ see, it checks the return type.
20:35 davef does that work for multi methods as well?
20:35 moritz_ I think so, yes
20:35 moritz_ of course the return type doesn't participate in the dispatch
20:36 pmichaud well, it *can*, but not in the way you normally think :-)
20:38 davef Doh!! - perl6 NOT perl on command line ;(
20:41 pmichaud heh
20:41 pmichaud I've done that a few times.
20:42 molaf joined #perl6
20:46 literal @tell azawawi I'm working on a couple of things, but they're not ready just yet
20:46 lambdabot Consider it noted.
20:51 last joined #perl6
20:53 cbk_ does anyone have a good site on the web regarding all there is to know about perl 6 hashes (%) that's fairly current?
20:53 skids_ joined #perl6
20:54 moritz_ cbk_: the synopsis, probably S02, S09 and S32/Containers
20:54 cbk_ ok thanks
21:02 mkfort joined #perl6
21:02 mkfort_ joined #perl6
21:25 Limbic_Region joined #perl6
21:42 Whiteknight joined #perl6
21:46 pugs_svn r27500 | moritz++ | [perl6-projects.org] make fonts in headings a bit larger
21:48 SmokeMachine joined #perl6
21:48 Psyche^ joined #perl6
22:04 athomason joined #perl6
22:13 meppl joined #perl6
22:15 jamtech joined #perl6
22:22 amoc joined #perl6
22:50 s1n pmichaud: going to the dfwuug?
22:52 molaf joined #perl6
22:53 frew joined #perl6
22:55 pmichaud s1n:  still not sure if I'll go.
22:56 pmichaud the topic doesn't seem particularly relevant to me
22:56 ihrd joined #perl6
22:56 mikehh_ joined #perl6
22:56 pmichaud and I have to go fetch food for the family
22:56 pmichaud (doing that now--bbi20)
22:58 jrtayloriv joined #perl6
23:21 ihrd joined #perl6
23:22 ihrd left #perl6
23:23 davef left #perl6
23:30 FurnaceBoy joined #perl6
23:35 DC joined #perl6
23:37 pmichaud back.  not able to make it to dfwuug
23:41 dalek rakudo: 544038f | pmichaud++ | src/pmc/objectref_pmc.template:
23:41 dalek rakudo: Remove obsolete (and unmarked) reference to cached_type.  bacek++
23:41 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/544038fd119389fdceda9d46b654aff4ce32ed40
23:55 FurnaceBoy joined #perl6

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

Perl 6 | Reference Documentation | Rakudo