Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-04-08

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:07 jnthn Phew, finished writing one of my presentations for next week.
00:10 lue \o/
00:14 lue rakudo: class A { method WHAT { "B" } }; A.new.WHAT.say
00:14 p6eval rakudo 8c434e: OUTPUT«B␤»
00:15 lue still wrong :)
00:15 lue (afk)
00:17 jnthn I'm still half-hearted about changing that one. We didn't specify the mechanism by which people can implement their own kinds of type objects and stuff just yet...
00:18 jnthn Uppercase + method name may be enough.
00:18 jnthn (To denote that it's special.)
00:19 jnthn Guess I don't grok the motivation for them being macros yet.
00:23 pausenclown rakudo: class Bar { subset Foo of Num where { say "--"; $_ ~~ 1|2 };  has Foo $.foo is rw; }; my $bar = Bar.new; $bar.foo = 3; say $bar.foo
00:23 p6eval rakudo 8c434e: OUTPUT«3␤»
00:23 pausenclown shouldnt that croak?
00:23 wolf2k_ubuntu joined #perl6
00:26 jnthn yup
00:27 pausenclown rakudo: class Bar { has Foo $.foo is rw where { say "--"; $_ ~~ 1|2 }; }; my $bar = Bar.new; $bar.foo = 3; say $bar.foo
00:27 p6eval rakudo 8c434e: OUTPUT«In "has" declaration, typename Foo must be predeclared (or marked as declarative with :: prefix) at line 11, near " $.foo is "␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
00:28 pausenclown rakudo: class Bar { has Num $.foo is rw where { say "--"; $_ ~~ 1|2 }; }; my $bar = Bar.new; $bar.foo = 3; say $bar.foo
00:28 p6eval rakudo 8c434e: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤»
00:32 payload joined #perl6
00:32 payload1 joined #perl6
00:42 yinyin joined #perl6
00:45 ash__ joined #perl6
00:58 PZt joined #perl6
01:10 Limbic_Region joined #perl6
01:11 Limbic_Region salutations all
01:17 diakopter hi
01:18 TimToady Limbic_Region: o/
01:30 frzntoz joined #perl6
01:44 nihiliad joined #perl6
01:49 molaf_ joined #perl6
01:54 alester joined #perl6
01:56 Psyche^ joined #perl6
01:57 ash__ so.... scoping.... when you define a variable, say my $foo; then do something like sub bar() { $foo }; those are defined during the same lexpad, correct? you wouldn't change lexpads until you CALL a function, or your current block ends, right?
02:01 ash__ no.... that doesn't work... because you could do my $foo inside sub bar() { ... }
02:02 ash__ and never realize they were two different $foo's or the same $foo
02:02 ash__ hmmm
02:12 meppl joined #perl6
02:15 diakopter TimToady: viv --p6 seems to be truncating the last character or two
02:15 diakopter on windows.  lemme try turning on autoflush..
02:18 diakopter that didn'tfix it
02:20 diakopter hrm
02:22 diakopter perl viv --log --p6 -e "my $a; say $a;"
02:22 diakopter ...
02:22 diakopter comp_unit returns my $a; say $a;
02:22 diakopter my $a; say $
02:25 colomon joined #perl6
02:40 christine joined #perl6
02:46 eternaleye joined #perl6
02:58 diakopter yeah it's just the final two chars of the output
02:59 diakopter no matter what I enter
03:07 k23z__ joined #perl6
03:12 sorear How is { } in while condition { #( NO CODE HERE ) } distinguished from an empty hash constructor?
03:12 sorear just TTIAR, or something more special?
03:14 ash__ as in: while $b { return a => $b }   vs while $b { a => $b }
03:14 ash__ one returns a pair, the other is a hash (but its the last statement, so it might return a pair?)
03:15 ash__ in truth, i think all brackets after a condition are treated as function bodies
03:18 ash__ in nqp, while condition { } always treats the { } as a xblock, so its a block of code always
03:18 sorear ash__: nqp doesn't have hash constructors
03:19 ash__ ah, didn't realize that
03:19 sorear I'm asking mostly because I want to implement hash constructors in NQP
03:20 ash__ eh, it seems rakudo's grammar also assumes { } is an xblock http://github.com/rakudo/rakudo/blob/master/src/Perl6/Grammar.pm#L364 lines 364-366
03:20 sorear sub unflatten(*@kv) { my %h; for @kv -> $k, $v { %h{$k} := $v }; %h }
03:20 sorear ^^^ all too common in real NQP
03:20 ash__ yeah, i can see why they would be useful
03:23 ash__ so, in other words, yes, you should be able to implement hash constructors
03:27 lue hai again.
03:28 lue .oO(It's gotten bad enough my muscle memory is more inclined towards hai, as opposed to hi)
03:30 pugssvn r30335 | lwall++ | [viv] refrain from chopping off the final characters that we don't add anymore
03:32 diakopter o_O
03:33 TimToady sorear: yes, it depends on whether a term vs an infix is expected, and also on whether we have a current "goal" of '{'
03:33 diakopter oh; better :)
03:33 TimToady might be an extra newline new though
03:34 TimToady s/new/now/
03:34 diakopter yeah
03:34 TimToady er, s:2nd/new/now/
03:34 Exodist joined #perl6
03:36 lue Is that the new syntax?
03:36 lue (for replace)
03:39 sorear TimToady: What's a goal?
03:40 gfx joined #perl6
03:50 TimToady sorear: usually, it's the right side of somethinglike '{' ~ '}', but in this case it is set by hand.
03:50 szabgab joined #perl6
03:50 TimToady a number of closing brackets will terminate the current parse, but only one of them is the one we're expecting
03:50 TimToady and the 'goal' communicates that without having to establish an official sublanguage for it
03:51 lue rakudo: say "helto".s:/t/l/ # my first experiment with s:///
03:51 p6eval rakudo 8c434e: OUTPUT«Confused at line 11, near "say \"helto"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
03:51 TimToady for statement controls, the initial keyword and the final block function as a kind of bracketing construct for the intermediate expression
03:51 meppel joined #perl6
03:52 TimToady lue: why did you put a colon
03:54 lue because you did
03:54 lue [20:34:22] <TimToady> er, s:2nd/new/now/
03:55 TimToady MJD #11924 Well, if you don't know what it does, why did you put it in your program?
03:56 lue I know what it does! I don't know how to use it. Big difference! :)
03:56 TimToady MJD: #11960 So you threw in some random punctuation for no particular reason, and then you didn't get the result you expected.  Hmmmm.
03:57 sorear also, you've forgotten one of the major unifying principles of perl6
03:57 sorear :2nd is called an adverb, and it's an indivisible unit
03:57 sorear if you take out the 2nd, take out the :
03:57 sorear : makes as much sense in this context as :2d
03:58 TimToady MJD #11959 Cargo-cult.
03:58 sorear (is there an actual MJD list?)
03:58 TimToady http://cpansearch.perl.org/src/PODMASTER/Acme-MJD-0.02/lib/Acme/MJD.pm
03:58 lue rakudo: say "helto".s/t/l/
03:59 p6eval rakudo 8c434e: OUTPUT«Confused at line 11, near "say \"helto"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
03:59 * sorear makes another try at understanding STD
03:59 christine joined #perl6
03:59 TimToady std: say "helto".s/t/l/
03:59 p6eval std 30335: OUTPUT«[31m===[0mSORRY![31m===[0m␤Bogus term at /tmp/fLW5IItunl line 1 (EOF):␤------> [32msay "helto".s/t/l/[33m⏏[31m<EOL>[0m␤Undeclared routines:␤   'l' used at line 1␤       't' used at line 1␤FAILED 00:01 109m␤»
04:01 jaldhar joined #perl6
04:02 TimToady hint: s/// is not a method
04:02 diakopter std: say "helto".s
04:02 TimToady nor can you apply it to an immutable string
04:02 p6eval std 30335: OUTPUT«ok 00:01 106m␤»
04:02 lue aah! I'm no good at quests!
04:02 sorear phew
04:03 sorear I was trying to figure out how s/// could even parse as a method
04:03 TimToady std: say "foo".nonesuchmethod
04:03 p6eval std 30335: OUTPUT«ok 00:01 106m␤»
04:03 sorear unless it was a method macro like HOW
04:03 TimToady it can't
04:03 TimToady though we did consider making it a macro at one point
04:03 TimToady but we stuck with ~~
04:03 sorear std: "foo" =~ s/foo/bar/;
04:03 p6eval std 30335: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~ at /tmp/TBW1BBTAy3 line 1:␤------> [32m"foo" =~[33m⏏[31m s/foo/bar/;[0m␤FAILED 00:01 107m␤»
04:03 lue (are all the # numbers in MJD tickets?)
04:04 sorear STD++ it's an interactive Perl 6 migration system
04:04 sorear std: "foo" ~~ s/foo/bar/;
04:04 TimToady see file mentioned above
04:04 p6eval std 30335: OUTPUT«ok 00:01 108m␤»
04:04 sorear rakudo: (s/foo/bar/).WHAT.perl;
04:04 p6eval rakudo 8c434e:  ( no output )
04:04 sorear rakudo: say (s/foo/bar/).WHAT.perl;
04:04 p6eval rakudo 8c434e: OUTPUT«Substitution␤»
04:04 TimToady and then take enough of them to heart so that I am no longer tempted to channel MJD.  :)
04:05 avar rakudo: "foo" =~ s/foo/bar/;
04:05 p6eval rakudo 8c434e: OUTPUT«Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~ at line 11, near " s/foo/bar"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
04:05 avar I see perl6 is giving more useful errors than some internal parrot panic these days :)
04:05 TimToady yes, rakudo has been doing much better lately
04:06 TimToady except when it doesn't
04:06 sorear that list is far too short
04:06 sorear the Acme::MJD one
04:07 TimToady it's good enough for starters
04:08 lue Oh, so that wasn't the full list, last time I read it all?
04:08 avar I also read something vaguely about it not taking ~1GB of ram to run the test suite, maybe I'll test it out again :)
04:08 sorear dunno about the test suite
04:08 TimToady you could always hire MJD to give you a continuous feed of new ones :)
04:08 sorear but it no longer takes 1.7 GB to build at all
04:09 sorear last time I build rakudo it finished in 45 minutes and 260 MiB
04:10 sorear (in other news, perl5 seems to be building much, much slower between 5.10.1 and 5.12RC4.  Balances out?)
04:11 lue <mumble>In the right mood, I could come up with some</mumble>
04:11 * sorear tries to think of some clever way to make vim figure out the correct file type for .pmc
04:13 frzntoz joined #perl6
04:13 lue .oO(emacs would have a control sequence for that: M-x download-pmc(parrot)-mode)
04:14 lue .oO(too bad about its Lisp. It needs speech therapy.)
04:15 sorear the lack of lexical variables is more offputting than the speech
04:16 TimToady MJD #11918 Well, then get one that *does* do auto-indent.  You can't do good work with bad tools.
04:16 lue #11909 Bad programmer!  No cookie!
04:17 lue I never liked vim. Only recently could I actually quit the program after starting it. It's just a weird interface for me :/
04:19 TimToady #11948 Perhaps your veeblefitzer is clogged.
04:19 sorear when you spend half your life in a program, the interface doesn't actually matter much
04:19 TimToady #11948 Perhaps your veeblefitzer is clogged.
04:19 sorear having a common and user-friendly interface is really important for complicated software you use rarely
04:19 sorear (most fscks fail epically in this department)
04:21 lue Blender has a great interface :)
04:22 snarkyboojum joined #perl6
04:22 sorear also: package management systems.
04:22 sorear don't get me started on those.
04:23 lue aaah! That's why I only update/install/etc. thru the terminal!
04:25 lue http://perl.plover.com/idiocy/Addition.pm (MJD) what was once an idiotic module is no longer idiotic in the creation of Rakudo!
04:27 k23z__ what is MJD actually doing I wonder ?
04:27 k23z__ he obviously knows a lot of maths
04:27 k23z__ which is very nice
04:27 k23z__ but at the same time he writes code ?
04:27 k23z__ what is his job ?
04:28 k23z__ how come he gets to do both of those :) (and of course he's not on IRC because he has stuff to do  ?)
04:30 sorear lue: I only use the terminal.  Apt-get is an abomination.
04:31 lue Good thing I use Fedora (and therefore yum) :)
04:32 sorear k23z__: MJD does show up on irc fairly often
04:32 sorear well, irc.perl.org
04:32 k23z__ what nickname ?
04:32 sorear mjd
04:33 sorear he's a professional Perl advocate or something like that
04:33 k23z__ that doesn't sound like a job name IMHO
04:37 lue k23z__: I'm not a third-degree Camel, but amongst the third-degree, I've heard talk that MJD is a relatively unknown character.
04:37 lue amongst us lower degrees, of course :)
04:38 k23z__ haha there is no such thing
04:38 k23z__ lower higher degree. .. :P
04:39 lue Of course there is! It's Freecam- oops
04:46 sorear what are third degree camelers?
04:46 sorear (I think being in this room makes us all automatically second degree... OMG I'VE TALKED TO LARRY)
04:47 lue The highest order. Various servers can designate their own degrees (the Scottish Regex defines 4° to 33°)
04:47 sorear note that even while trying to emulate that mode of speech, I can't supress my urge to properly apostrophize
04:47 lue Freecamelry is quite amazing. (if you can guess what I'm parodying, you win some cake!)
04:49 lue however, any extra degrees run parallel with the first three. There is nothing higher.
04:50 lue .oO(methinks snarkyboojum needs a hello by now) snarkyboojum: hello o/
04:50 snarkyboojum lue: hello there!
04:51 lue Can you guess what I'm parodying? :)
04:56 lue "It doesn't matter how many underhanded tricks a person uses… The truth will always find a way to make itself known." --Miles Edgeworth
05:00 spinclad the New Improved Order of Templars?
05:00 lue Not quite :)
05:00 spinclad the Rosy Cruxians?
05:01 spinclad the Discordant?
05:02 spinclad (Illuminati nos omnes impedimur)
05:02 lue no and no. The name (freecamelry) did a quick s/[something]/camel/
05:02 spinclad FreeLlamasery
05:04 lue no. Many of the signers of the declaration of independence were supposed members. :)
05:04 spinclad the Builders of King Solomon's Mines
05:05 spinclad the Ordo Templi Orientis
05:05 spinclad the Shriners
05:05 lue can I tell you, or do you wish to keep guessing? It's Free[something]ry
05:06 spinclad i think i may have it pretty well surrounded by now.
05:06 spinclad (s/Builders/[something]s/)
05:06 lue .oO(Actually, you were able to name more "secret" orginzations than I've ever heard of.)
05:07 lue you are so close!
05:07 eternaleye joined #perl6
05:08 spinclad well, more than one are instances
05:08 spinclad s/Mines/[something else]/
05:08 spinclad the Golden Dawn
05:09 spinclad i'll give you the honour
05:09 lue Freemasonry :)
05:10 spinclad oh, but everybody knows that!
05:10 spinclad secret handshakes and all!
05:11 lue That's what I decided to parody as Freecamelry, though. Kudos to you though for knowing so many orginizations (it's scary actually...)
05:13 spinclad research into this area is a fertile field for cultivating paranoia crops
05:14 snarkyboojum_ joined #perl6
05:14 lue o darn, snarkyboojum apparently had lost his connection :/
05:17 lue and he made it back! o/
05:18 snarkyboojum lue: haha - broadband wireless :)
05:19 lue kill your own ghosts
05:20 Yunga joined #perl6
05:20 Yunga hi
05:21 snarkyboojum welcome to #perl6 Yunga :)
05:22 Yunga hello snarky boojum, thanks :)
05:23 Yunga i'm compiling parrot and installing perl6 to give it a try, that's years i'm waiting for it, so i guessed that hanging around here wouldn't be a bad thing ;)
05:24 snarkyboojum Yunga: excellent - what platform are you running it on?
05:25 Yunga ubuntu 9.10
05:26 snarkyboojum Yunga: definitely, the guys around here are very knowledgeable and quite witty to boot
05:26 snarkyboojum Yunga: sounds like fun to me :)
05:27 Yunga yes it is, i'm waiting for the compilation to finish so i can play with it
05:27 Yunga i'm a little affraid of all those utf8 characters however
05:28 sorear don't be
05:28 snarkyboojum the utf8 characters are as afraid of us as we are them I think :)
05:28 sorear yeah they get butchered by malfunctioning software all the time
05:28 sorear people get it easy on this
05:28 lue .u afraid
05:28 phenny lue: Sorry, no results for 'afraid'.
05:28 lue see, it's not afraid!
05:32 Yunga yes, i'm looking at a way to reconfigure my keyboard to type them easily, because ctrl-shit-u-xxxx isnt really an improvement. X can handle various keyboard config with at least 8/12 differents chars by keys, but i guess i won't remember everything
05:33 snarkyboojum that's better than anything I've worked out on OS X
05:33 Yunga sorry english is not my mother tongue :)
05:33 felipe joined #perl6
05:35 Yunga and i'm enthusiast about perl 6, i learned assembly language back in 1983, and perl, with parrot, is going back to it. that's years i'm waiting for it/
05:36 lue I would actually love to be able to do ctrl-shift-u-[number] ( stupid non-conformant KDE :( )
05:36 sorear Yunga: I've found that if you load an input method in X11 - any input method, and it doesn't matter if you unload it later - X11 will start supporting sequences like Compose > > -> »
05:36 sorear I have no idea what's actually going on here
05:37 sorear so it might not work for you
05:37 mdxi joined #perl6
05:37 sorear note1: Compose is not a modifier key.  press compose, release compose, then type >> normally
05:38 sorear note2: most keyboards manufactured after 1980 don't have compose keys.  I've used xmodmap to reconfigure my MENU key (pc107 here) to act as one
05:38 Yunga lue: you have to set up a "Compose" key in kde 3.5.9 (mine is right win key) and make or download a "~/.XCompose" file (see /usr/share/X11/locale/en_US.UTF-8/Compose or something like that file)
05:38 sorear note3: don't use », it slows down parsing in rakudo due to infelicities in the strings engine.  Use the ASCII compatibility symbol >> instead, it's much faster
05:39 Yunga sorear � i know, but i'm not sure to remember every perl6 chars ;)
05:40 Yunga
05:40 lue Yunga: I have KDE4, with a third-level (just like OS-X's) modifier set up. ĉ√ŝ∂ƒ£∞¢§§¢«»ðĈ◊
05:40 Yunga oh, ok
05:40 lue rakudo: say <<quoted>>
05:40 p6eval rakudo 8c434e: OUTPUT«quoted␤»
05:40 lue rakudo: say «quoted»
05:40 p6eval rakudo 8c434e: OUTPUT«quoted␤»
05:41 lue What I would like, though, is to be able to type _any_ unicode character. I can only type what OS-X has for its third-level, esperanto, and japanese (thru input method)
05:43 lue good night
05:43 Yunga i don't know MacOS, i played with one for one year, and i didn't really liked it. perhaps i'm biased on this, however.
05:43 snarkyboojum I love OS X, but haven't worked out how to conveniently enter chars from other character sets
05:43 lue I'm running Linux on an old PowerPC based PowerBook (which ran OS X 10.4)
05:43 Yunga it's nearly 8am here, so good day... or night, or whatever, enjoy your time anyway
05:44 * snarkyboojum wonders how temporal is coming along
05:44 lue snarky: if it's other languages, then you could use an input method (ex. 時の勇士)
05:44 snarkyboojum battery is about to die (again)
05:44 lue .oO[good night for real now]
05:44 snarkyboojum night lue
05:45 Yunga g'night lue
05:56 sorear it generally seems as though I need to play with LC_ALL to get other language input working in Linux
05:57 sorear however, changing LC_ALL in a running process is impossible*
06:00 payload joined #perl6
06:02 uniejo joined #perl6
06:06 kaare joined #perl6
06:06 jonasbn joined #perl6
06:09 LionMadeOfLions joined #perl6
06:12 snarkyboojum joined #perl6
06:25 snarkybo1jum joined #perl6
06:26 snarkyb00jum trying out irssi
06:26 snarkyb00jum so far the biggest win seems not being able to use backspace :)
06:26 sorear tried DEL and control-H?
06:26 sorear unix terminal subsystems have a long history of getting those three keys mixed up
06:27 snarkyb00jum ah - ctrl-H works a treat
06:27 sorear protocol agreement is a lot better now, but it's not quite perfect
06:28 sorear with crazies on all sides
06:28 snarkyb00jum at least I won't spam channels with disconnects now, ssh'ing to a screen session on a box with 150+ days uptime
06:29 sorear yes, ssh makes backspace issues much worse
06:29 sorear are you using putty?
06:29 snarkyboojum ssh in OS  X terminal
06:29 snarkyb00jum oops - wrong window :)
06:29 sorear what's the other host?
06:30 snarkyb00jum a linux box
06:31 snarkyb00jum OS X + ssh -> linux + screen + irssi
06:31 sorear also, 1y+ uptime is useless if your local monopoly ISP has a MTBF of 48 hours
06:31 Su-Shee joined #perl6
06:31 sorear (my situation)
06:34 snarkyb00jum sorear: ah - no good
06:41 pjcj joined #perl6
06:42 ingy sweet
06:43 ingy I patched rakudo to grok .pm6 files
06:45 finanalyst joined #perl6
06:45 snarkyb00jum YAML grammar definitions!
06:46 ingy ?
06:46 ingy hey, how do I subscribe to rakudobug ?
06:47 moritz_ ingy: the bug reports are all sent to perl6-compiler@perl.org
06:47 moritz_ I mean, RT forwards them there
06:48 moritz_ so perl6-compiler-subscribe@perl.org
06:49 ingy moritz_: I want to submit a patch
06:49 ingy not to report a bug
06:51 moritz_ ingy: rakudobug@perl.org
06:51 moritz_ with [PATCH] in the subject
06:53 ingy right... is rakudobug a mailing list I should be subscribed to first?
06:53 finanalyst jnthn: ping
06:54 ingy moritz_: ^^
06:54 moritz_ ingy: rakudobug is a submission adress for RT tickets. The tickets are then forwared to perl6-compiler@perl.org
06:54 finanalyst @seen jnthn
06:54 moritz_ it's your choice of if you subscribe to it or not
06:55 moritz_ RT should also send you replies directly
06:55 ingy I see
06:55 ingy I think I want to be involved in the replies, but don't need to be on any more mailing lists :)
06:56 ingy one is enough...
06:56 moritz_ phenny: tell masak to add a more detailed schedule to his gsoc proposal - weekly would be great, resolution of two weeks the absolute minimum
06:56 phenny moritz_: I'll pass that on when masak is around.
06:56 moritz_ ingy: you're just on one mailing list? :-)
06:56 ingy moritz_: two come to think of it
06:57 ingy yaml and inline
06:57 ingy but inline runs itself
06:57 ingy so I largely ignore that one
06:57 * moritz_ on about 20 lists
06:58 ingy :'(
06:58 sorear mailing lists are evil and wrong, long live nntp
07:03 ingy moritz_: PATCH submitted
07:04 moritz_ ingy++
07:05 sorear and now, the great wait
07:06 ingy heh, well it works here now
07:07 mberends joined #perl6
07:07 ingy I can give my talk about perl6 to the seattle python dudes now :)
07:09 moritz_ :-)
07:09 moritz_ talk driven development, TDD
07:10 mberends :-)
07:13 snarkyb00jum well I survived that one at least :)
07:18 sorear ooh what kind of talk
07:20 sorear mberends: Hi!  I just discovered vill, it looks pretty interesting
07:20 CokeBot9000 joined #perl6
07:28 mathw o/
07:31 yjh joined #perl6
07:36 yjh joined #perl6
07:40 rgrau joined #perl6
07:41 PZt joined #perl6
07:43 yjhz joined #perl6
07:44 sorear hmm
07:44 sorear I think there's a big niche for something like Inline for Perl6
07:45 sorear we've got lots of different implementations with lots of different binding protocols and lots of different build systems
07:45 sorear need a simple, general way to compile C code and link it to them, for hot spot optimization and language binding
07:46 sorear Zavolaj (will) cover binding relatively well, but does nothing for the case where custom C is involved
07:50 payload joined #perl6
07:51 sorear of course, because this /is/ Perl 6, the syntax can be much nicer
07:53 BinGOs (dumping baggage)++
07:54 sorear q:lang<C> { int n = {{ $arg }}; int i = 0; while (n != 1) { if (n & 1) { n = n * 3 + 1; } else { n /= 2; } i++; } return i; }
08:00 payload joined #perl6
08:09 IllvilJa joined #perl6
08:11 dakkar joined #perl6
08:11 payload joined #perl6
08:31 riffraff joined #perl6
08:37 moritz_ I've pushed ingy's patch, but neither dalek reported it, nor does it show up on the github web interface
08:37 moritz_ can anybody please pull and tell me if it's in the repo?
08:42 JimmyZ joined #perl6
08:42 JimmyZ moritz_: it's in the repo!
08:42 moritz_ phenny: ask jnthn to please review/apply http://github.com/quester/rakudo/commit/c7037458f248785de977e14a30c9864fc47d928c if you have some free minutes
08:42 phenny moritz_: I'll pass that on when jnthn is around.
08:42 moritz_ JimmyZ: thanks
08:50 eternaleye joined #perl6
08:53 fridim joined #perl6
08:56 eternaleye joined #perl6
09:01 clintongormley joined #perl6
09:16 pmurias joined #perl6
09:24 xabbu42 joined #perl6
09:44 jnthn o/
09:44 phenny jnthn: 08:42Z <moritz_> ask jnthn to please review/apply http://github.com/quester/rakudo/commit/c7037458f248785de977e14a30c9864fc47d928c if you have some free minutes
09:45 envi^home joined #perl6
09:46 moritz_ it's j\o/nthn
09:46 holli joined #perl6
09:47 holli rakudo: class A::B { method x { 1 } }; my $b = 'B'; say A::$b.new.x
09:47 p6eval rakudo 6b5469: OUTPUT«Confused at line 11, near "say A::$b."␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
09:48 moritz_ std: class A::B { method x { 1 } }; my $b = 'B'; say A::$b.new.x
09:48 p6eval std 30335: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/5svzIGkrfL line 1:␤------> [32m{ method x { 1 } }; my $b = 'B'; say A::[33m⏏[31m$b.new.x[0m␤    expecting any of:␤       POST␤   bracketed infix␤    infix or meta-infix␤      postfix␤
09:48 p6eval ..postfix_prefix_meta_operator␤       statement modifier loo…
09:48 moritz_ std: class A::B { method x { 1 } }; my $b = 'B'; say A::($b).new.x
09:48 p6eval std 30335: OUTPUT«ok 00:01 108m␤»
09:49 moritz_ but I think interpolating namespaces are NYI
09:49 holli rakudo: class A::B { method x { 1 } }; my $b = 'B'; say A::($b).new.x
09:49 p6eval rakudo 6b5469: OUTPUT«Confused at line 11, near "say A::($b"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
09:49 IllvilJa 'llo folks!  Is there any work on a Perl6 counterpart to DBI and friends (for hooking up a Perl6 application to Oracle, MySQL, SQLite and stuff, you know)?
09:49 jnthn moritz_: Need to look at that a little more later.
09:50 sorear IllvilJa: No.
09:50 IllvilJa Ok.
09:50 jnthn IllvilJa: mberends++ is working on something there.
09:50 sorear IllvilJa: We've got a direct MySQL binding from jnthn++
09:50 holli oh, yeah. that's another elephant =)
09:50 sorear IllvilJa: however, more interesting IMO is my project
09:50 IllvilJa Woo, we have some brave (foolhardish?) ppl out there then \o/.
09:50 sorear use DBI:from<perl5>; will work soon
09:50 IllvilJa Ok
09:51 moritz_ jnthn: ok, no hurry. I'm just trying to encourage contributions by making sure they are reviewed
09:51 IllvilJa sorear: sounds like a plausible duct-tape solution to me.
09:51 jnthn sorear: I spent all last night writing talk slides, whihc kinda needed doing, but meant I didn't get any coding time. :-/
09:51 sorear I'm fairly confident that modules with a pure object oriented interface will work by R*
09:51 jnthn sorear: Yay! :-)
09:51 sorear *pure and concrete
09:52 sorear if it's OO but you have to subclass it, things won't work so well
09:52 holli how does the Parrot/Perl 5 bridge work?
09:52 IllvilJa So that will be an interesting way to transform the Perl5 community: "If you write best-practices Perl 5 code, it may be used by Perl6 scripters" :-).
09:52 sorear holli: Black magic, duct tape, blood, and tears.
09:53 IllvilJa sorear: that kind of voodoo is all ok in the name of getting programs to work together.
09:53 sorear important note: this is a Parrot/perl5 bridge, not a Parrot/Perl5 bridge
09:56 sorear Ponie is a Parrot/Perl5 bridge.  Ponie is dead.
09:56 mathw ponie isn't so much a parrot/perl5 bridge as a perl5 compiler for parrot
09:57 sorear rakudo: say Q:PIR { $P5 = new 'ResizablePMCArray'; $P5 = 1; $P6 = $P5[0]; $P6 = 42; %r = $P5[0] }
09:57 p6eval rakudo 6b5469: OUTPUT«error:imcc:syntax error, unexpected ';', expecting '\n' (';')␤     in file 'EVAL_1' line 64␤Null PMC access in type()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
09:57 moritz_ which is basically the same
09:57 moritz_ sorear: you need to use newlines as line separators in PIR
09:57 moritz_ which you can enter in p6eval with ␤
09:58 sorear rakudo: say Q:PIR { $P5 = new 'ResizablePMCArray'␤ $P5 = 1␤ $P6 = $P5[0]␤ $P6 = 42␤ %r = $P5[0] }
09:58 p6eval rakudo 6b5469: OUTPUT«Null PMC access in set_integer_native()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
09:58 sorear rakudo: say Q:PIR { $P5 = new 'ResizablePMCArray'␤ $P5 = 1␤ $P5[0] = 12␤ $P6 = $P5[0]␤ $P6 = 42␤ %r = $P5[0] }
09:58 p6eval rakudo 6b5469: OUTPUT«42␤»
09:58 sorear rakudo: say Q:PIR { $P5 = new 'ResizableIntegerArray'␤ $P5 = 1␤ $P5[0] = 12␤ $P6 = $P5[0]␤ $P6 = 42␤ %r = $P5[0] }
09:58 p6eval rakudo 6b5469: OUTPUT«12␤»
09:59 sorear ^^^ Parrot makes no sense.
10:01 * sorear pokes jnthn
10:01 sorear RIA and RPA handle get_pmc_keyed_int in completely different ways
10:01 sorear which should I copy for P5Scalar
10:03 jnthn sorear: Parrot has no real concept of assignment.
10:04 jnthn Apart from when it does.
10:04 jnthn :-/
10:04 jnthn In the RPA case, the int got boxed, but then you modified the value in the PMC.
10:05 yinyin joined #perl6
10:05 jnthn (Yes, I agree it's messed up.)
10:05 sorear jnthn: sometimes the return value is an lvalue, sometimes it isn't, and I've spent two days blocking on which form I need to use
10:07 jnthn Well, afaik, Perl 5 doesn't provide binding, just assignment, but of course assigning a reference gives you a reference to a common thing.
10:07 sorear actually perl 5 does have binding
10:07 jnthn Anyway, for integers at least, you want more the RIA model I guess.
10:07 sorear although a very odd sort
10:08 jnthn Since my $a = 42; my @x; $x[0] = $a; $a = 100; say $x[0]; # 42
10:08 jnthn Though my $a = 42; my @x; $x[0] = \$a; $$a = 100; say ${$x[0]}; # 100
10:09 sorear (Note: I don't actually know what your last line is for)
10:09 sorear jnthn: this is for ARRAY/HASH references
10:10 jnthn I figured a scalar reference was closer to the PIR cases you were looking at.
10:10 sorear if I just return the raw array element, then it can be used as an lvalue
10:10 jnthn That's probably wrong if the array element isn't a reference.
10:10 sorear and moreover, the caller can't save the reference - it could change at any time, or even be deleted
10:11 sorear if I return a copy, then it's not possible for perl6 code to perform container operations such as ties on elements
10:11 holli rakudo: my $a = 42; my @x; $x[0] := $a; $a = 100; say $x[0];
10:11 p6eval rakudo 6b5469: OUTPUT«Symbol '$x' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
10:12 sorear and moreover it is impossible to implement lvalueish binding
10:12 sorear my $a := @arr[15];
10:12 sorear so I'm in a no-win situation
10:12 jnthn Right.
10:12 jnthn Seems so.
10:12 jnthn :-/
10:13 holli rakudo: my $a = 42; my @x; @x[0] := $a; $a = 100; say @x[0];
10:13 p6eval rakudo 6b5469: OUTPUT«:= binding of variables not yet implemented␤current instr.: '&die' pc 17293 (src/builtins/Junction.pir:404)␤»
10:13 sorear Can you use your parrot clout to make them agree on a single consistent set of semantics please?
10:13 jnthn If I have in Perl 5 a "my @a; sub foo { @a = (1,2,3); return $a[1]; }", then I don't think I should be able to modify the array with assigning to the thingy I get back from that sub, that's all.
10:13 holli booooh ;-)
10:14 sorear jnthn: right, because perl 5 'return' does the equivalent of VTABLE_clone
10:14 jnthn Anyway, I think the case for not returning a copy of everything in general.
10:15 jnthn sorear: (parrot clout) Uh, Pm has rather more clout than me and pushed the assignment/binding issue for quite a while, and didn't manage to get all that much changed. :-(
10:15 sorear I want to like Parrot so much
10:16 * jnthn knows that feeling
10:16 sorear jnthn: not returning a copy is also problematic, because what if somebody saves the return value?
10:16 jnthn "saves" in what sense?
10:17 sorear $rpa[0] = $p5array[0]
10:17 sorear ...
10:17 sorear #oops $rpa[0] just action-at-a-distanced
10:18 sorear also, it's not in general possible to save a reference to what you get back from av_fetch because of Perl 5's use of explicit deallocation which ignores reference counts in certain situations
10:19 moritz_ sounds to me like you need to clone stuff before assignment
10:19 sorear moritz_: right, the only safe thing to do is to clone everywhere you can
10:20 jnthn Oh hmm.
10:20 sorear which might have something to do with rakudo's memory usage
10:21 jnthn sorear: I think go with the safe option then. At best, it's right and works fine enough. At worse, we have to re-visit it and tweak it some later.
10:21 pausenclown_ joined #perl6
10:21 sorear am I the only one who is absolutely appalled by the Parrot development ethos?
10:25 hanekomu joined #perl6
10:26 hanekomu left #perl6
10:28 colomon joined #perl6
10:44 pmurias sorear: could you explain your problem?
10:44 sorear pmurias: I already did
10:44 pmurias with the interop that is (not the ethos)
10:45 pmurias what does RIA and RPA mean?
10:45 sorear get_pmc_keyed_int is undocumented, and the implementations already in Parrot don't agree with each other in what the vtable is supposed to do
10:45 sorear however, I have to implement it, because it's used for [] postfix
10:45 sorear and I have no idea what to follow
10:46 sorear Resizable{Integer,PMC}Array
10:46 pmurias thanks
10:47 sorear more generally, PMC* can have either lvalue (bind, alias) or rvalue (copy, share, read-only) semantics
10:47 sorear and there are no indications what a given instance of that type means
10:47 sorear anywhere
10:48 sorear RPA:get_pmc_keyed_int uses lvalue semantics for PMC*, RIA uses rvalue
10:48 pmurias what happens when you use an lvalue thing in an rvalue context
10:48 pmurias ?
10:49 M_o_C joined #perl6
10:49 sorear rvalue consumers expect to save a PMC*, and when they next look at it it will have the same value
10:50 sorear lvalue providers can reuse a PMC at any time
10:50 sorear the safe thing to do is to always VTABLE_clone PMCs that you get from or give to code not written by you
10:51 sorear because nobody else will have the same interpretation of the PDDs
10:51 pmurias so an lvalue PMC is not and rvalue
10:51 pmurias s/and/a/
10:51 sorear right
10:51 pmurias strange
10:51 sorear although it can be treated as one, most of the time
10:52 sorear unlike C lvalues, which are isomorphic to pointers and cannot be confused with rvalues in any situation
10:52 pmurias the perl5 [] seems to return a rvalue/lvalue
10:53 sorear perl5 [] returns an lvalue, but the lvalue is not allowed to escape the current dynamic scope, so if we're returning it, we return a copy or face segfaults
10:53 sorear it's not possible to implement the equivalent of \$x[12] from XS
10:55 pmurias sorear: are you sure of that?
10:55 sorear yes
10:56 sorear actually you can, but you need to break the interface contract to do so
10:56 pmurias so how is \$x[12] implemented?
10:57 sorear using SvTEMP_off, which demortalizes SVs
10:59 pmurias just increment the reference count when creating the PMC and decrement it when destroying the PMC
11:00 sorear nice try, but it doesn't work
11:01 sorear mortal SVs have lifetimes tied to a dynamic scope
11:01 pmurias perlguts needs fixing then
11:01 sorear and there are some optimizations that take advantage of this
11:02 sorear most notably sv_setsv will steal string buffers
11:02 sorear if $a is mortal, then after $b = $a;  $a will be undef if it was a string before
11:03 sorear I seem to be unable to find the "SvTEMP_off is strictly for PERL_CORE use" comment
11:03 pmurias lunch&
11:03 sorear if I can't find it, much of the preceeding will have been made moot
11:04 sorear however, I still want Parrot to make up its mind what functions are supposed to do
11:04 sorear all this cloning is very troubling
11:09 masak joined #perl6
11:09 masak oh hai, #perl6
11:09 phenny masak: 06:56Z <moritz_> tell masak to add a more detailed schedule to his gsoc proposal - weekly would be great, resolution of two weeks the absolute minimum
11:09 masak moritz_: aye, suspected the resolution might be too coarse.
11:10 masak the schedule is always the hardest bit to write :/
11:10 jnthn :/
11:10 moritz_ masak: well, don't worry if you don't quite meet the schedule in the end
11:10 jnthn Heh. If that's the case, why write a less coarse one. :/
11:10 moritz_ masak: also whiteknight asked if that's really enough material to keep you busy for three months...
11:11 * jnthn rather suspects that doing it properly will be
11:11 masak good question. I really think so. the pack/unpack business is rather involved.
11:11 jnthn Particularly as there are spec bits to worry about too.
11:11 jnthn And what masak said.
11:11 masak aye.
11:11 masak and reading/writing binary.
11:11 moritz_ masak: you could comment on the various different buf types, numbers of IO routines to be changed, specs in flux...
11:11 masak moritz_: aye. will do something like that. thanks.
11:12 moritz_ I understand whiteknight's concern - if you don't know the systems at hand very well, it does sound like a not too much work :-)
11:12 masak :)
11:13 sorear How often are getprop and setprop used?
11:13 Chillance joined #perl6
11:14 sorear rakudo: say pir::typeof__sp([])
11:14 p6eval rakudo 6b5469: OUTPUT«Array␤»
11:14 moritz_ jnthn: re "why write a less coarse one" - to show that $student really thought in detail about the proposal
11:14 jnthn moritz_: Aye, my point was that it's as much for show as it is realistic.
11:14 jnthn But yes, fair enough.
11:15 moritz_ and has a good undstanding of the necessary steps... right
11:15 jnthn sorear: Pretty often.
11:15 * sorear finds getprop and setprop troubling as well
11:16 sorear a throwback to the P5 memory model
11:16 jnthn They've proved rather useful for a whole range of things in Rakudo.
11:19 masak also, sorry I keep missing #rs meetings :/
11:19 moritz_ masak: I've proposed to change the date
11:20 masak so far, I've been busy once and forgotten it once.
11:20 masak this week, it was both.
11:20 moritz_ because Wednesday doesn't suite me well
11:20 moritz_ what about Tuesday?
11:20 masak well, for me the problem isn't the day of the week.
11:20 moritz_ but for me it is
11:20 masak it's getting the concept of #rs into my mental model.
11:20 masak Tuesday is fine.
11:21 moritz_ like, Tuesday 18:30 UTC
11:21 masak aye
11:21 jnthn That can work for me too.
11:23 moritz_ so... let's also ask bkeeler, pmichaud, colomon...
11:23 jnthn Right.
11:27 frettled What's #rs?
11:27 moritz_ rakudosketch IRC meeting
11:34 frettled Ahaha.
11:34 frettled And what's the point of rakudosketch?  :)
11:35 sorear Agreeing on design
11:35 jnthn frettled: A gathering of Rakudo devs and other interested/concerned folks to try and monitor our progress towards Rakudo * and try to keep us moving in the right kinda directions.
11:38 frettled Aha.
11:38 frettled That sounds like something for me ifwhen I get some spare energy again. :)
11:46 * moritz_ found a bug in the gsoc app
11:47 moritz_ it has tables for the student applications that can be sorted with js
11:47 moritz_ sorting by score orders 10 between 0 and 2 :-)
11:48 moritz_ don't use string comparison when you should be using numeric comparison :-)
11:49 frettled :)
11:50 pmurias moritz_: are the proposals scored already?
11:50 moritz_ pmurias: some of them
11:50 moritz_ but so early in the scoring process the scores are really meaningless
11:50 bacek joined #perl6
11:50 bacek o hai
11:51 bacek rakudo: say "hello world".iterator.map( -> $a, $b { $a.uc ~ $b.lc } )
11:51 p6eval rakudo 6b5469: OUTPUT«Method 'iterator' not found for invocant of class 'Perl6Str'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
11:51 bacek rakudo: say "hello world".split('').map( -> $a, $b { $a.uc ~ $b.lc } )
11:51 p6eval rakudo 6b5469: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤current instr.: '_block51' pc 339 (EVAL_1:134)␤»
11:51 bacek rakudo: say "hello world".split('').map( { $^a.uc ~ $^b.lc } )
11:51 p6eval rakudo 6b5469: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤current instr.: '_block51' pc 339 (EVAL_1:134)␤»
11:52 bacek .oO( I do remember that I implemented arity-aware map long time ago )
11:53 bacek rakudo: say for "hello world".split('') -> $a, $b { $a.uc ~ $b.lc }
11:53 p6eval rakudo 6b5469: OUTPUT«Confused at line 11, near "say for \"h"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
11:53 bacek erm...
11:54 moritz_ try .say
11:54 moritz_ for statements don't return meaningful values yet, I think
11:55 moritz_ rakudo: for "hello world".comb -> $a, $b { say $a.uc ~ $b.lc }
11:55 bacek rakudo: say gather for "hello world".split('') -> $a, $b { take $a.uc ~ $b.lc }
11:55 p6eval rakudo 6b5469: OUTPUT«He␤Ll␤O ␤Wo␤Rl␤StopIteration␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
11:55 p6eval rakudo 6b5469: OUTPUT«StopIteration␤current instr.: '_block45' pc 297 (EVAL_1:125)␤»
11:56 xabbu42 joined #perl6
11:56 bacek rakudo: say gather for "hello world".comb -> $a, $b { take $a.uc ~ $b.lc }
11:56 p6eval rakudo 6b5469: OUTPUT«StopIteration␤current instr.: '_block45' pc 297 (EVAL_1:125)␤»
11:57 bacek rakudo: say gather { for "hello world".comb -> $a, $b { take $a.uc ~ $b.lc } }
11:57 p6eval rakudo 6b5469: OUTPUT«StopIteration␤current instr.: '_block45' pc 297 (EVAL_1:125)␤»
11:57 cls_bsd joined #perl6
11:58 moritz_ however you form it syntactically, for with two variables and an odd count of items produces StopIteration
11:58 bacek isn't it suppose to pass Mu?
11:58 moritz_ I'm not quite sure what it's supposed to do
11:59 moritz_ rakudo: say (1, 2, 3).map(-> $a, $b { $a ~ $b })
11:59 p6eval rakudo 6b5469: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤current instr.: '_block48' pc 327 (EVAL_1:129)␤»
11:59 moritz_ rakudo: say (1, 2, 3).map(-> $a, $b? { $a ~ $b })
11:59 p6eval rakudo 6b5469: OUTPUT«123Any()␤»
11:59 bacek multi-arity map is b0rked
11:59 moritz_ seems like, yes
12:00 bacek hang on.
12:00 bacek I have to specify optional flag for second arg?
12:00 moritz_ you don't have to do anything
12:00 moritz_ I was just testing stuff
12:01 bacek rakudo: say gather for "hello world".split('') -> $a, $b? { take $a.uc ~ $b.lc }
12:01 p6eval rakudo 6b5469: OUTPUT«Hany()Eany()Lany()Lany()Oany() any()Wany()Oany()Rany()Lany()Dany()␤»
12:01 bacek rakudo: say gather for "hello world".comb -> $a, $b? { take $a.uc ~ $b.lc }
12:01 p6eval rakudo 6b5469: OUTPUT«Hany()Eany()Lany()Lany()Oany() any()Wany()Oany()Rany()Lany()Dany()␤»
12:01 moritz_ that just passes one argument to the block
12:01 bacek yes...
12:01 bacek I noticed
12:01 moritz_ anyway, we've long been looking for a general solution to such problems
12:02 moritz_ which is probably partial signature binding
12:02 f00li5h joined #perl6
12:02 moritz_ some mechanism which allows a binding a signature to a Seq without using up all values
12:02 bacek rakudo: say "hello world".comb.map: -> $a, $b? { $a.uc ~ $b.lc }
12:02 p6eval rakudo 6b5469: OUTPUT«HeLlO WoRlDany()␤»
12:02 bacek rakudo: say "hello world".comb.map: -> $a, $b? { $a.uc ~ $b ?? $b.lc !! '' }
12:02 p6eval rakudo 6b5469: OUTPUT«el olany()␤»
12:02 moritz_ and return the not yet bound values
12:03 bacek rakudo: say "hello world".comb.map: -> $a, $b? { $a.uc ~ ($b ?? $b.lc !! '') }
12:03 p6eval rakudo 6b5469: OUTPUT«HeLlO WoRlD␤»
12:03 moritz_ rakudo: say "hello world".comb.map: -> $a, $b? { $a.uc ~ ($b // '') }
12:03 p6eval rakudo 6b5469: OUTPUT«HeLlO WoRlD␤»
12:03 bacek ah. yes. //
12:04 bacek rakudo: say "hElLo world".comb.map: -> $a, $b? { $a.uc ~ ($b // '').lc }
12:04 p6eval rakudo 6b5469: OUTPUT«HeLlO WoRlD␤»
12:05 takadonet morning all
12:05 bacek rakudo: say "ПРИВЕТ мир".comb.map: -> $a, $b? { $a.uc ~ ($b // '').lc }
12:05 p6eval rakudo 6b5469: OUTPUT«ПрИвЕт мИр␤»
12:05 bluescreen joined #perl6
12:08 bacek rakudo: say "ПРИВЕТ мир".comb.map: -> $a, $b? { $a.uc, $b.lc }
12:08 p6eval rakudo 6b5469: OUTPUT«П рИ вЕ т  мИ р␤»
12:08 bacek rakudo: say "ПРИВЕТ мир".comb.map: -> $a, $b { $a.uc, $b.lc }
12:08 p6eval rakudo 6b5469: OUTPUT«П рИ вЕ т  мИ р␤»
12:08 Guest95102 joined #perl6
12:08 bacek rakudo: say "ПРИВЕТ мир".comb.map: -> $a, $b { $a.uc ~ $b.lc }
12:08 p6eval rakudo 6b5469: OUTPUT«ПрИвЕт мИр␤»
12:09 bacek interesting.
12:09 bacek moritz_, is map arity handling known bug?
12:09 moritz_ bacek: I think so, yes
12:09 bacek moritz_, ok
12:10 bacek rakudo: "ПРИВЕТ мир".comb.map( -> $a, $b { $a.uc ~ $b.lc }).say
12:10 p6eval rakudo 6b5469: OUTPUT«ПрИвЕт мИр␤»
12:12 bacek rakudo: "ПРИВЕТ мир".comb.map({ $^a.uc ~ $^b.lc }).say
12:12 p6eval rakudo 6b5469: OUTPUT«ПрИвЕт мИр␤»
12:36 pugssvn r30336 | moritz++ | [t/spec] unfudge some tests for rakudo
12:37 Yunga joined #perl6
12:38 slavik Вася ... прикол
12:51 f00li5h joined #perl6
13:00 masak phenny: tell mberends that I'm slowly converging on a 'complete' Temporal spec, but I am now having some doubts about the thing with time zones and leap seconds that I'd like to discuss with you before I push.
13:00 phenny masak: I'll pass that on when mberends is around.
13:02 alester joined #perl6
13:04 smash_ joined #perl6
13:04 smash_ hello everyone
13:05 masak smash_: \o
13:05 hudnix joined #perl6
13:08 PerlJam greetings!
13:11 rallred joined #perl6
13:14 takadonet PerlJam:morning
13:16 smash_ anyone mentoring the GSOC projects already ?
13:16 smash_ or still not defined..
13:18 moritz_ smash_: not yet decided
13:18 moritz_ hey, there's still time for project submissions
13:19 smash_ i'm not a student, can't apply
13:19 PerlJam I've signed up as a potential mentor.
13:19 moritz_ that was more a general statement
13:19 CokeBot9000 sorear: get_pmc_keyed_int is listed in PDD17; what sort of documentation were you expecting but not finding?
13:20 f00li5h joined #perl6
13:20 masak lue: ping
13:21 CokeBot9000 (pdd 17 is at http://docs.parrot.org/parrot/latest/html/docs/pdds/pdd17_pmc.pod.html)
13:22 smash_ i'm pondering on doing something por one project in the GSOC list if noone takes it
13:23 frzntoz joined #perl6
13:27 masak do we have a spectests GSoC proposal yet?
13:27 PerlJam smash_: pondering?  if no one takes it?  submit anyway!
13:27 PerlJam smash_: just do it!
13:28 jnthn masak: I think somebody mentioned that the other day...
13:28 jnthn IRC handle twigil, iirc.
13:28 jnthn Probably the twigil that follows me on Twitter.
13:30 moritz_ masak: nope. An interested student asked soem questions about it on a mailing list, but so far I haven't seen a submission
13:30 f00li5h joined #perl6
13:30 * masak hopes we get one
13:30 smash_ PerlJam: i can't apply, i'm not a student
13:30 masak it'd be sad to run out of spectests to implement :)
13:31 PerlJam smash_: oh, then ignore the "submit anyway" part and just do it anyway!  :)
13:31 smash_ PerlJam: exactly  :)
13:34 mikehh rakudo (6b54693 builds on parrot r45447 - make test PASS, spectest_smolder (pugs r30336 -> #33035) FAIL - Ubuntu 10.04 beta amd64 (gcc with --optimize)
13:34 mikehh rakudo - t/spec/S06-multi/syntax.rakudo - Failed tests:  21-22
13:34 mikehh rakudo - t/spec/S05-mass/properties-general.rakudo - TODO passed:   4-6, 11-13, 544-546, 550
13:35 mikehh sorrt that should be smolder #33065
13:37 kcwu 1
13:37 kcwu oops
13:37 ruoso joined #perl6
13:39 MOAR-f001i5h joined #perl6
13:40 * PerlJam hopes at least one of the perl 6 projects gets a slot (GSoC)
13:44 * masak too :)
13:44 * moritz_ too
13:44 moritz_ man, people seem to really not like writing a schedule
13:44 masak it's hard.
13:45 slavik is it possible with parrot to limit the amount of memory it will use? (similar to JVM's Xmx variable
13:45 slavik argument* rather
13:45 moritz_ yes; but it's also important
13:45 moritz_ slavik: ulimit -v
13:45 moritz_ on the command line, before starting parrot
13:45 slavik moritz_: not exactly same as -Xmx though ...
13:46 PerlJam masak: did you see the comments on your proposal ?  :)
13:46 masak yes.
13:46 masak I will. thinking about it now.
13:46 payload joined #perl6
13:50 f00li5h joined #perl6
13:50 molaf joined #perl6
13:51 f00li5h joined #perl6
14:06 masak slightly more elaborate schedule: http://gist.github.com/360097
14:06 masak PerlJam, moritz_: how's that?
14:06 jaldhar joined #perl6
14:07 lichtkind joined #perl6
14:08 moritz_ masak: much better
14:08 PerlJam indeed
14:08 ignacio_ joined #perl6
14:08 CokeBot9000 slavik: -Xmx doesn't exist yet.
14:08 * masak posts it
14:08 slavik CokeBot9000: is it something that is planned though?
14:09 CokeBot9000 slavik: http://trac.parrot.org/parrot/ticket/827 if you want to find out when it shows up.
14:10 slavik nice
14:10 slavik thanks
14:10 ascent__ joined #perl6
14:11 PerlJam masak: I worry a little bit that pack/unpack are going to be more problematic than anyone thinks.
14:11 masak PerlJam: yes, I think it might be.
14:11 masak it's certainly the thing needing spec the most.
14:11 moritz_ depends on how much of (un)pack you actually want to implement
14:12 masak on the other hand, I expect that one to be the hard one, and I expect to be ahead of schedule by then.
14:12 masak I've already looked at pack once or twice before as well. the thing it needs most is free tuits.
14:13 jnthn moritz_: Is there some trick needed to make things I post on rakudo.org actually show up?
14:13 jnthn moritz_: Oh, maybe just cache...
14:14 moritz_ jnthn: good question... the Copenhagen release announcement only showed up for non-authenticated users when I posted it twice :/
14:14 jnthn moritz_: ah, it's done it now.
14:15 masak \o/ method postcircumfix:<{ }> works fine on master! \o/
14:15 masak now, *that's* a reason to upgrade right there! :)
14:17 moritz_ there are lots of cool things that work in master :-)
14:17 CokeBot9000 o/\o !
14:18 * moritz_ wonders with whom CokeBot9000 is dancing
14:21 meppl joined #perl6
14:22 smash_ are there any plans to add things to src/core/IO/, like for example src/core/IO/Cwd.pm ?
14:23 alester joined #perl6
14:23 moritz_ smash_: if the spec talks about IO::Cwd, then rakudo will have it one day...
14:23 moritz_ smash_: however the current IO:: hierarchy in the specs is overly complicated, and not likely to be implemented as-is
14:23 smash_ moritz_: let me search the spec
14:24 PerlJam which is why we need ingy hacking on rakudo and the spec :)
14:25 CokeBot9000 moritz_: it's a high five!
14:25 * masak was just going to say that
14:28 smash_ can't seem to find a straight answer
14:30 moritz_ I trust you found http://perlcabal.org/syn/S32/IO.html ?
14:30 masak this seems to be interesting reading for people who have plans for Perl 6's CPAN: http://blogs.perl.org/users/brian_d_foy/2010/04/what-could-a-completely-different-cpan-client-do.html
14:33 Psyche^ joined #perl6
14:36 constant joined #perl6
14:36 constant joined #perl6
14:37 smash_ moritz_: yes, thks
14:41 justatheory joined #perl6
14:54 frzntoz joined #perl6
14:56 nihiliad joined #perl6
15:00 * ingy sees the .pm6 patch was applied
15:00 ingy yay!
15:00 * ingy dances
15:00 moritz_ ingy: yes, just didn't get around to closing the ticket yet
15:01 ingy moritz_: I just read the git log
15:05 CokeBot9000 ingy: first hit is free.
15:07 masak all hits are free. it's Artistic 2.0 :)
15:08 pugssvn r30337 | moritz++ | [t/spec] test loading of modules ending in .pm6
15:08 * moritz_ dumb
15:09 pugssvn r30338 | moritz++ | [t/spec] add test module which I forgot in last commit, moritz--
15:10 masak ingy: while I'm here: I know I've asked this before, but whatever happened to kwid? it was such a nice format, but all links to its specifications online are broken :(
15:10 masak s/I'm/you're/
15:17 payload left #perl6
15:20 moritz_ rakudo: class A::B { }; class A { }; say "lives"
15:20 p6eval rakudo 6b5469: OUTPUT«lives␤»
15:21 moritz_ BEGIN { @*INC.push('pugs/t/spec/packages') }; use A::A;
15:21 moritz_ rakudo: BEGIN { @*INC.push('pugs/t/spec/packages') }; use A::A;
15:22 p6eval rakudo 6b5469: OUTPUT«Unable to find module 'A::A'.␤current instr.: 'perl6;Perl6;Module;Loader;need' pc 34932 (src/gen/role_pm.pir:824)␤»
15:22 moritz_ rakudo: BEGIN { @*INC.push('/home/p6eval/pugs/t/spec/packages') }; use A::A;
15:22 p6eval rakudo 6b5469: OUTPUT«Null PMC access in type()␤current instr.: 'perl6;D;!class_init_17' pc 403 (EVAL_3:188)␤»
15:22 jnthn epic fail!
15:22 jnthn wtf. :-/
15:22 moritz_ rakudo: BEGIN { @*INC.push('/home/p6eval/pugs/t/spec/packages') }; use B::Grammar;
15:22 jnthn Anyway, seems it found the module...
15:22 p6eval rakudo 6b5469:  ( no output )
15:22 moritz_ it did
15:23 moritz_ rakudo: BEGIN { @*INC.push('/home/p6eval/pugs/t/spec/packages') }; use B::Grammar; class B { }; say "alive"
15:23 p6eval rakudo 6b5469: OUTPUT«Illegal redeclaration of symbol 'B'␤current instr.: 'perl6;Perl6;Grammar;_block249' pc 40351 (src/gen/perl6-grammar.pir:360)␤»
15:23 * moritz_ wanted to find out if RT #73912 was fixed
15:24 moritz_ but it seems it still fails if the class declaration was in a different file
15:26 moritz_ anyway, you can use the trick with the absolute path to try to load any .pm file in the pugs repo through p6eval
15:26 moritz_ .oO( how very safe )
15:28 masak o.O
15:28 masak #perl6 -- giving the black-hat p6eval hackers LHF on a regular basis :P
15:29 masak good thing not many people have commit access to the Pugs repo... :P
15:37 szbalint heheh
15:41 simcop2387 joined #perl6
15:45 smash_ omg, i actually got a function working in src/core !!!
15:47 masak \o/
15:49 smash_ http://gist.github.com/360202
15:49 smash_ of course now the test file from spec is not working
15:52 ingy masak: kwid will be coming back soon
15:52 masak ingy: \o/
15:52 ingy masak: it's part of the Acmeism trilogy
15:53 masak of which I know absolutely nothing.
15:53 ingy C'Dent, TestML and Kwid
15:54 ingy C'Dent is for writing modules that work anywhere. TestML is for the unit tests that run anywhere, and Kwid (not the final name) is about doc that works everywhere
15:54 masak ah.
15:55 ingy I plan to start releasing cdent mods soom, and so will need all three
15:56 ingy kwid is just a dialect (the one you like) of a doc compilation system
15:56 ingy same as cdent, you compile into a common tree form and emit to an existing native form
15:57 M_o_C joined #perl6
15:58 ingy masak: and Acmeism is my philosophy that all language hackers need to work together
15:58 ingy make modules, not war
15:58 masak ingy: I agree. :)
15:58 ingy masak: you are an Acmeist
15:58 ingy I'll get you a t-shirt :)
15:58 masak "when you don't create things, you become defined by your tastes rather than ability. your tastes only narrow & exclude people. so create." -- _why
15:59 ingy why++
16:00 ingy I know why's real name...
16:00 ingy it's Why
16:00 ingy it really is
16:00 ingy I won't say his last name though
16:00 REPLeffect just don't create so much that you burn out and leave the internet altogether
16:00 ingy he must have had hippy parents
16:00 CokeBot9000 I'm guessing "Not."
16:01 ingy haha
16:01 TimToady Knot maybe
16:01 TimToady or Knott
16:01 TimToady as in 's Berry Farm
16:01 ingy I first met Why in a Shari's in Salt Lake City
16:01 [particle] haven't been to Knott's in a very long time
16:01 [particle] is it still around?
16:01 ingy isn't it up near Duluth?
16:02 TimToady I remember when they didn't charge admission, and the only ride was the Calico Mine
16:02 [particle] anahiem, or so
16:02 TimToady near the Magic Kingdom
16:02 ingy TimToady: you can use .pm6 modules now :)
16:02 TimToady the original one...
16:02 ingy next to your .pm modules
16:02 ingy enjoy
16:03 PerlJam ingy: so ... you think something will come of kwid this time?   Maybe if you change the name it would help  :)
16:03 ingy PerlJam: already done
16:03 TimToady yes, though, of course, that doesn't necessarily help me with P5
16:03 TimToady I'll have to rename STD.pm to STD.pm6 for that to help
16:04 ingy do it
16:04 TimToady and make Cursor.pm follow the same policy
16:04 masak I could imagine using kwid for documenting my Perl 6 methods.
16:04 * TimToady hears and obeys
16:04 PerlJam yeah, I don't see the problem with just doing it
16:05 ingy PerlJam: the problems always come later :)
16:05 TimToady though often the problems came earlier too
16:05 PerlJam sure, but we adapt.
16:05 TimToady the adept adapt
16:05 * CokeBot9000 must be getting old and is tired of adapting.
16:06 PerlJam The only real problem is when we're forced to adapt quicker than we can handle.
16:06 TimToady Early adapters...
16:06 ingy TimToady: I'll adopt that idea
16:06 PerlJam ("we" as in "humans in general")
16:07 PerlJam Hmm.
16:07 PerlJam "early adapters" give the chasm a new, useful meaning too perhaps  :)
16:08 ingy someone needs to write pm6.vim
16:08 pmurias ingy: what would it do?
16:08 TimToady We, the early adept, help the early adapters to help the early adopters...
16:08 PerlJam how would it differ from perl6.vim?
16:08 ingy sorry, I wasn't aware
16:09 ingy does it recognize .pm6 yet?
16:09 PerlJam doubtful
16:09 TimToady doesn't even recognize .pm, since that's ambiguous
16:09 ingy nod
16:09 TimToady generally need a vim: line
16:09 ingy do we know the maintainer?
16:09 ingy :)
16:10 moritz_ ingy: http://github.com/petdance/vim-perl
16:10 PerlJam There's two I think.  One in the pugs repo and one on github
16:10 moritz_ the github one is more up to date
16:11 justatheory joined #perl6
16:11 TimToady but I still use the other one out of laziness
16:11 alester the pugs one is not canonical.
16:11 alester At some point I need to make an installer for the vim-perl project.
16:11 TimToady .oO(and gitophobia?)
16:13 moritz_ it's just software -- nothing to be afraid of
16:13 ingy TimToady: I thought gitophobia was so last decade
16:13 ingy it's nice like perl
16:14 TimToady I have Pre Traumatic Stress Disorder
16:14 PerlJam git *so* has the perl-nature.  I can't imagine any Perl people having gitophobia.
16:15 TimToady it seems to have a great deal of the Perl 5 nature to me...maybe that's the problem...
16:15 ingy PerlJam++
16:15 PerlJam TimToady: that could very well be true.
16:16 jnthn when is git 6 coming out, dammit?
16:16 PerlJam jnthn: christmas ;)
16:16 jnthn \o/
16:16 TimToady they're blocking on Perl 6
16:17 [particle] git definitely stole impatience from perl.
16:18 [particle] the git developers couldn't even wait until they had an api
16:19 jnthn Unfortunately, I'm still too lazy to learn how to use it.
16:20 TimToady "TWO BITS!!!!!!'  --Roger Rabbit
16:21 TimToady .o(somebody mention hubris, quick)
16:21 araujo joined #perl6
16:21 smash_ can anyone run '$ make t/spec/S16-io/getc.t' from rakudo root directory to verify if it's failling for me only ? thks
16:22 * PerlJam still thinks that's crazy
16:23 PerlJam Does rakudo parse orelse ?
16:24 payload joined #perl6
16:24 * PerlJam doubts
16:24 moritz_ rakudo: say 1 orelse 2
16:24 p6eval rakudo 6b5469: OUTPUT«Confused at line 11, near "say 1 orel"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
16:24 moritz_ nope
16:24 jnthn no
16:24 TimToady PerlJam: #11947 You know, this sort of thing is amenable to experimental observation. --MJD
16:25 moritz_ smash_: where's your patch?
16:25 smash_ moritz_: don't have it yet
16:25 PerlJam TimToady: Indeed.  But sometimes it's more useful is *someone else* performs the experiment :)
16:25 * moritz_ currently in a messed-up rakudo branch
16:26 moritz_ smash_: I can test it, but it's going to take a while before I get there
16:26 PerlJam s/is/if/
16:26 moritz_ smash_: but since it's not listed in t/spectest.data, it's likely to fail in rakudo
16:27 smash_ damn, that's the only test for 'getc'
16:28 moritz_ smash_: you can simplify the test file not to use 'orelse'
16:29 moritz_ just 'or' would be a suitable approximation
16:29 smash_ tried that already, but that's not the only problem with that test file
16:29 moritz_ and test files are meant to be as simple as possible, unless wrt the feature being tested
16:30 masak swimming &
16:31 pugssvn r30339 | moritz++ | [t/spec] simplified getc.t for smash++
16:31 moritz_ smash_: didn't like the print $fh:, now changed to $fh.print:
16:31 smash_ yeap, didin't like that print either
16:31 moritz_ now the first failure I get is 'Could not find sub &getc'
16:32 smash_ moritz_: great, thks!
16:33 dual joined #perl6
16:44 ash__ joined #perl6
16:44 ash__ i think i found a bug
16:44 ash__ rakudo: class A { method postcircumfix:<<( )>>($stuff) { say $stuff } }; A.new.(4);
16:44 p6eval rakudo 6b5469: OUTPUT«invoke() not implemented in class 'A'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
16:44 ash__ you should be able to define with << >> as well as < > right?
16:44 moritz_ rakudo: class A { method postcircumfix:<( )>($stuff) { say $stuff } }; A.new.(4);
16:44 p6eval rakudo 6b5469: OUTPUT«Capture()<0x58d2070>␤»
16:45 [particle] see if masak++ found it first
16:45 dalek rakudo: 6b54693 | (Ingy dot Net)++ | src/Perl6/Module/Locator.pm:
16:45 dalek rakudo: Patched rakudo to look for .pm6 modules.
16:45 dalek rakudo: Per the plan devised by Larry and Jonathan.
16:45 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
16:45 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6b54693398c22f657f5d6c924164e1b1144aaeaa
16:45 moritz_ rakudo: class A { method postcircumfix:«( )»($stuff) { say $stuff } }; A.new.(4);
16:45 p6eval rakudo 6b5469: OUTPUT«invoke() not implemented in class 'A'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
16:45 jnthn ash__: Should, guess we don't support that yet.
16:46 ash__ << >> < > and « » all sorta mean the same thing though, right? just if your using unicode vs if you need to define a < or something? i just wanted to make sure
16:47 ash__ also, i was wondering if this is correct
16:47 moritz_ actually <<...>> and «...» also interpolate
16:47 ash__ rakudo: class A { method postcircumfix:<( )>($stuff) { ... } };  say A.^methods(:local);
16:47 p6eval rakudo 6b5469: OUTPUT«postcircumfix:<( )>␤»
16:47 ash__ i kinda figured that would put out postcircumfix:( )
16:48 ash__ not with the < >, because then you depend on if you used < > vs <<  >> vs unicode ones
16:48 jnthn ash__: No, it's correct
16:48 jnthn ash__: Even if you use the others we canonicalize to <...>
16:48 ash__ okay, just checking
16:48 ash__ ah, well that might be the problem
16:48 jnthn So writing <<( )>> should still get you <( )> in there
16:48 jnthn I guess we're failing to do that at the moment though.
16:48 ash__ rakudo: class A { method postcircumfix:«( )»($stuff) { say $stuff } }; A.^methods(:local).say;
16:48 p6eval rakudo 6b5469: OUTPUT«postcircumfix:«( )»␤»
16:49 jnthn Yeah, that's wrong.
16:49 ash__ okay, got ya
16:50 ash__ doing << >> does the same thing, it prints postcircumfix:<<( )>>
16:50 jnthn yeah
16:50 jnthn should just be postcircumfix:<( )>
16:51 jnthn We probably get operators wrong in a similar way.
16:51 jnthn rakudo: sub postfix:<!>($n) { [*] 1..$n }; 10!
16:51 jnthn rakudo: sub postfix:<!>($n) { [*] 1..$n }; say 10!
16:51 p6eval rakudo 6b5469:  ( no output )
16:51 p6eval rakudo 6b5469: OUTPUT«3628800␤»
16:51 jnthn rakudo: sub postfix:<<!>>($n) { [*] 1..$n }; say 10!
16:51 p6eval rakudo 6b5469: OUTPUT«3628800␤»
16:51 jnthn oh.
16:52 jnthn We get it right there...
16:52 jnthn rakudo: sub postfix:<<!>>($n) { [*] 1..$n }; &postfix:<!>(10)
16:52 p6eval rakudo 6b5469:  ( no output )
16:52 jnthn yeah
16:52 jnthn OK, just methods need da fix.
16:53 ash__ calling &postfix:<!> should of worked there right?
16:54 jnthn Yeah
16:54 jnthn Those work fine.
16:55 ash__ oh, that did work, i thought it didn't, oops
16:56 ash__ what kind of terminals accept unicode input? or is it repr thats not right?
16:57 ash__ trying &postfix:«!»(3).say; locally didn't work, but i think its either my terminal or repr
16:57 ash__ repl i mean
16:57 moritz_ the repl and -e doesn't like non-ASCII chars
16:58 ash__ okay, thats fine
16:58 cdarroch joined #perl6
16:58 cdarroch joined #perl6
17:00 moritz_ I've started a branch to implement the Cool class, and let most builtin classes inherit from it
17:00 moritz_ but when I make Integer inherit from Any instead of Cool, it dies while compiling Test.pm
17:00 moritz_ method HOW not found in class Integer
17:01 moritz_ it's in the 'cool' branch on github
17:01 ash__ isn't it Int? Integer is from parrot, i think
17:01 jnthn Does Cool inherit from Any?
17:01 moritz_ yes
17:02 moritz_ proto = p6meta.'new_class'('Cool', 'parent'=>'Any')
17:02 jnthn Just Int has that problem, or any class?
17:03 moritz_ not sure
17:03 moritz_ i changed and reverted some bits, need to recompile agian to test
17:03 mberends joined #perl6
17:04 mberends_ joined #perl6
17:04 moritz_ need to buy some nom, will be back later
17:05 smash_ t/spec/S16-io/getc....1..1
17:05 smash_ ok 1 - getc() works even for utf-8 input
17:05 smash_ ok
17:05 smash_ \o/
17:11 pugssvn r30340 | pmurias++ | [mildew] updated to current STD
17:11 pugssvn r30340 | move t/eval.t, t/int.t and t/caller_my_pseudo_packages.t to t-failing
17:11 pugssvn r30341 | pmurias++ | [mildew] implemented INFERRED-TYPE-TEST
17:12 mberends joined #perl6
17:27 SmokeMachine joined #perl6
17:29 Trashlord joined #perl6
17:31 ash__ joined #perl6
17:31 * mberends has enormous respect for the amount of thought behind http://datetime.perl.org/?Modules
17:31 phenny mberends: 13:00Z <masak> tell mberends that I'm slowly converging on a 'complete' Temporal spec, but I am now having some doubts about the thing with time zones and leap seconds that I'd like to discuss with you before I push.
17:32 ignacio_ joined #perl6
17:32 pugssvn r30342 | lwall++ | [STD et al.] rename .pm to .pm6 for all p6 modules in this dir
17:32 pugssvn r30342 | [Cursor] prefer .pm6 over .pm in any particular directory when searching for p6 code
17:32 pugssvn r30342 | [Actions.pm] handle prefix metaops without spewing yaml dumps
17:34 REPLeffect joined #perl6
17:34 mberends good, .pm6 clears up ambiguities. Better roll that into proto as well.
17:35 colomon joined #perl6
17:37 mberends hi colomon, how are you enduring your house move?
17:38 pausenclown_ when designing the DOM classes for an XML Parser, should one stick to the W3C nomenclature?
17:40 mberends pausenclown_: preferably, but not if it hurts, presumably
17:43 pugssvn r30343 | lwall++ | [Actions] botched previous patch semantically
17:44 slavik moritz_: the Perl6 book, can I consider it "authoritative" ?
17:45 pausenclown_ something that hurts is probably reimplementing a NodeList ( http://www.w3schools.com/dom/dom_nodelist.asp ) =)
17:45 PerlJam slavik: how about "useful" ?
17:46 TimToady it has authors
17:46 colomon mberends: we are now officially out of our old house.
17:46 moritz_ slavik: no
17:46 slavik thanks
17:48 PerlJam slavik: The spec is the only thing that is "authoritative"
17:48 moritz_ jnthn: the error occurs for any class... class A { }; say A.WHAT => Method 'HOW' not found for invocant of class 'Integer'
17:48 colomon mberends: (Typing this from my very much "some assembly needed" new office.)  Most of our stuff is either at my in-laws or on my moving truck scheduled to arrive tomorrow.  Am exhausted.  Occasional fits of sentimentality at leaving the my most stable residence since before college.
17:48 moritz_ PerlJam: and even that is only partially authorotative
17:48 ignacio__ joined #perl6
17:48 pausenclown_ unless where it isn't.
17:49 CokeBot9000 moritz_: does the book project have a test target (to make sure all the examples work?)
17:50 PerlJam Hmm.  I wonder if we even differentiate between "complete example" and "snippet".  The former could have a test target, but the latter can only be syntax checked.
17:51 pugssvn r30344 | lwall++ | [Cursor] ignore .pm files that contain 'package Foo;'
17:52 jnthn moritz_: OK
17:52 CokeBot9000 PerlJam, moritz_: having done that for the parrot docs, I can probably whip something up.
17:52 jnthn moritz_: I has a WANT for nom now, but I can look later.
17:52 moritz_ CokeBot9000: that would be cool
17:52 moritz_ jnthn: no hurry
17:52 CokeBot9000 moritz_: hokay. I think I even have a commit bit.
17:52 smash_ moritz_: the 'getc' test is passing
17:53 moritz_ smash_: then ship it!
17:53 PerlJam looks like all we have are '=begin programlisting ... =end programlisting'
17:53 moritz_ http://science.slashdot.org/story/10/04/08/1610212/Japanese-Build-a-Virtual-Hugging-Vest?from=rss&amp;utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+Slashdot%2Fslashdot+(Slashdot)
17:53 moritz_ of course we had that before, virtually
17:54 PerlJam And I'm fairly sure they don't all stand alone as full fledged programs
17:54 smash_ moritz_: have to go now, i'll ship it later
17:55 jnthn moritz_: I just thought that and was like "wow, a meatspace hugme!"
17:55 jnthn s/thought/saw/
17:55 mberends an online hugvest party will be the Next Big Thing after the webcam party!
17:55 stephenlb joined #perl6
17:55 colomon git pull
17:55 colomon From git@github.com:rakudo/rakudo
17:55 colomon * [new branch]      cool
17:55 colomon ?!
17:56 REPLeffect joined #perl6
17:56 Su-Shee mberends: you're sooo late... there's already remote hugging for over a decade now... :)
17:56 moritz_ colomon: A branch where I try to implement class Cool
17:56 Su-Shee hello everyone.
17:57 * moritz_ hugs Su-Shee
17:57 PerlJam moritz_: cool  :)
17:57 Su-Shee moritz_: it's even a highlighted hug!
17:58 moritz_ PerlJam: I thought you'd say that
18:02 slavik what will class cool do?
18:02 moritz_ look cool, mostly
18:02 moritz_ see S02
18:02 moritz_ colomon: btw our new proposed #rs time is Tuesday, 18:30 UTC - would that work for you?
18:05 nihiliad joined #perl6
18:11 rgrau` joined #perl6
18:14 petdance joined #perl6
18:18 CokeBot9000 joined #perl6
18:26 TimToady std: use MONKEY_TYPING;
18:26 p6eval std 30344: OUTPUT«ok 00:01 106m ./lib/MONKEY_TYPING.pm6␤ok 00:01 107m␤»
18:27 pausenclown_ rakudo: class A { method x { 1 } }; class B { has A $.a handles <x>; }; say B.new.x
18:27 p6eval rakudo 6b5469: OUTPUT«Method 'x' not found for invocant of class 'B'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
18:28 mikehh joined #perl6
18:28 pausenclown_ std: class A { method x { 1 } }; class B { has A $.a handles <x>; }; say B.new.x
18:28 p6eval std 30344: OUTPUT«ok 00:01 108m␤»
18:30 TimToady note that STD only does syntax and shallow semantics
18:32 colomon moritz_: cool!
18:33 colomon moritz_: As far as I know that will work for me in general, don't really have a schedule yet but I would expect most weekday afternoons will be open.
18:33 moritz_ ok
18:37 TimToady actually, I remember Knott's Berry Farm from before it even had the Calico Mine.  Just a duck pond, restaurant, chapel, and real train.  Oh, and the volcano with sound effects produced by amplifying the sound of a piano hammer hitting a screen door.
18:38 TimToady the chapel had a cool blacklight paining of the transfiguration
18:38 TimToady "Theme park?  What's that?"
18:40 sjohnson anyone up for some perl golf?
18:40 PerlJam Perl 6 golf?
18:41 sjohnson i'm still on my perl 5 training wheels
18:43 moritz_ jnthn: it seems that descalarref dereferences too much when Int inherits from Cool, not Any
18:44 mberends joined #perl6
18:51 rgrau joined #perl6
18:53 moritz_ previous diagnostics was wrong: the error happens at startup
18:57 TimToady does Clang ignore the first part or the second part of a conflict?
18:57 * moritz_ has no idea
18:57 moritz_ I think the error location is at the first conflict marker
18:58 moritz_ but I don't know if the rest is ignored or not
18:58 TimToady yes, but it continues and parses one side or the other
18:58 moritz_ right
18:58 moritz_ I hope you're not planning to do error recovery in STD.pm :-)
18:59 TimToady oh, it'll be fatal, but maybe not till CHECK time
18:59 moritz_ why not?
18:59 TimToady cascading errors are so much fun
19:01 TimToady balancing that is the possibility that something later will shed light on something that happened earlier
19:01 moritz_ perl 5 has such errors
19:01 moritz_ first it complains about non-declared variables (under 'use strict')
19:01 TimToady yes, but it's not a one-pass parser really
19:01 moritz_ and only later complains about syntax errors
19:01 mberends joined #perl6
19:02 TimToady so less likely to emit the first error first
19:02 * moritz_ hopes so
19:02 PerlJam I'd like a previous "$x undeclared" error to somehow hide future "$x undeclared" errors sometimes.
19:03 PerlJam i.e., I really only need to see where the cascade started, not where it went
19:03 TimToady std: $x; $x;
19:03 p6eval std 30344: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable $x is not predeclared at /tmp/2QHIIZnPvT line 1:␤------> [32m$x[33m⏏[31m; $x;[0m␤FAILED 00:01 108m␤»
19:03 moritz_ std: $x; $y; $x
19:03 p6eval std 30344: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable $x is not predeclared at /tmp/S8XVCUPA2R line 1:␤------> [32m$x[33m⏏[31m; $y; $x[0m␤FAILED 00:01 106m␤»
19:03 TimToady yes, well, that's because it's fatal
19:03 moritz_ well, it reports only the first error anyway :-)
19:04 moritz_ std: my $x; my $x; my $x
19:04 p6eval std 30344: OUTPUT«Potential difficulties:␤  Useless redeclaration of variable $x (see line 1) at /tmp/5u4s4bt8u2 line 1:␤------> [32mmy $x; my $x[33m⏏[31m; my $x[0m␤  Useless redeclaration of variable $x (see line 1) at /tmp/5u4s4bt8u2 line 1:␤------> [32mmy $x; my $x; my
19:04 p6eval ..$x[33m⏏[31m<EOL>[0m…
19:04 TimToady in a panic-stricken sort of way
19:04 moritz_ panic++
19:04 ash__ joined #perl6
19:05 TimToady well, there's some code in there to remove dup warnings, but that is apparently not triggering it
19:05 PerlJam TimToady: I'm operating under a future universe where you've moved the fatality to CHECK time  :)
19:09 moritz_ TimToady: under no strict;, how are undeclared variables scoped?
19:10 ShaneC joined #perl6
19:10 ShaneC left #perl6
19:20 solu joined #perl6
19:24 pausenclown_ std: my @a = 1,2,3; print @a[-1]
19:24 p6eval std 30344: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of [-1] subscript to access final element; in Perl 6 please use [*-1] at /tmp/lsEDt4I3LE line 1:␤------> [32mmy @a = 1,2,3; print @a[-1][33m⏏[31m<EOL>[0m␤FAILED 00:01 108m␤»
19:24 moritz_ rakudo: my @a = 1,2,3; print @a[-1]
19:24 p6eval rakudo 6b5469: OUTPUT«Cannot use negative index on arrays␤current instr.: '&die' pc 17293 (src/builtins/Junction.pir:404)␤»
19:24 pausenclown_ rakudo: my @a = 1,2,3; print @a[*-1]
19:25 p6eval rakudo 6b5469: OUTPUT«3»
19:25 pausenclown_ kk
19:26 smash_ joined #perl6
19:27 smash_ hello everyone
19:28 pugssvn r30345 | moritz++ | [perl6.org] fix links to STD.pm
19:30 moritz_ welcome back smash_
19:31 moritz_ rakudo: { redo }
19:31 p6eval rakudo 6b5469: OUTPUT«Warning␤»
19:32 moritz_ rakudo: say (* ~~ Whatever).WHAT
19:32 p6eval rakudo 6b5469: OUTPUT«Int()␤»
19:32 Su-Shee alpha: my @fingers = <thump index middle ring pinky>; my ouch = @fingers.splice(2, 1); @fingers.say; @ouch.say;
19:32 p6eval alpha 30e0ed: OUTPUT«Malformed declaration at line 10, near "ouch = @fi"␤in Main (file <unknown>, line <unknown>)␤»
19:32 Su-Shee alpha: my @fingers = <thump index middle ring pinky>; my @ouch = @fingers.splice(2, 1); @fingers.say; @ouch.say;
19:32 p6eval alpha 30e0ed: OUTPUT«thumpindexringpinky␤middle␤»
19:33 Su-Shee alpha: my @fingers = <thump index middle ring pinky>; my @ouch = @fingers.splice(2, 1, 'toe'); @fingers.say; @ouch.say;
19:33 p6eval alpha 30e0ed: OUTPUT«thumpindextoeringpinky␤middle␤»
19:36 Su-Shee alpha: my @fingers = <thump index middle ring pinky>; @fingers.splice(2) <== ('toe', 'wood', 'somethingweird'); @fingers.say
19:37 p6eval alpha 30e0ed: OUTPUT«Feed operators are not yet implemented in Rakudo, sorry␤in sub »
19:49 bkeeler Morning all
19:49 * jnthn back from da noms
19:49 jnthn o/, bkeeler
19:50 jnthn moritz_: Is the latest fejl pushed in the cool branch?
19:51 mberends joined #perl6
19:52 bkeeler Oh and Tuesday is fine for #rs
19:52 Su-Shee can I call classes like Bag and Range and such container classes?
19:53 jnthn o/ mberends
19:54 smash_ can i push a change to src/core/IO.pm, by my tests it doesn't break anything and makes t/spec/S16-io/getc.t pass ?
19:55 jnthn smash_: Can I glance the diff first?
19:55 smash_ jnthn: of course
19:57 smash_ jnthn: http://gist.github.com/360460 thks
19:57 jnthn moritz_: oh my, what an error. :-/
19:58 jnthn smash_: Seems that the indenting is inconsistent with the rest of the file in the method?
19:59 jnthn Other than that, it looks OK.
20:00 mberends o/ jnthn, just getting used to ".pm6"
20:01 jnthn :-)
20:01 jnthn I'll have to get used to that too.
20:01 smash_ jnthn: fixed, refresh.. i also added getc.t to spectest.data
20:02 jnthn +1
20:02 jnthn moritz_: The backtrace appears to be plne hrovno too.
20:02 jnthn *hrovna
20:03 jnthn ...though not sure that idiom works in Slovak. :-)
20:03 justatheory joined #perl6
20:04 PerlJam Perhaps it's just that I'm an American, but certain consonants just shouldn't be juxtaposed   :-)
20:07 jnthn PerlJam: Strbske Plesso ma zmrzlinu v trhe!
20:07 jnthn moritz_: Gah. It's an...error reporring fail.
20:07 jnthn class Parameter is cool {
20:07 jnthn Note lowercase c
20:07 jnthn Should be Cool
20:07 PerlJam jnthn: is that real language?   I can't pronounce the z-word
20:08 jnthn zmrzlina = ice cream :-)
20:08 CokeBot9000 jnthn: that was pretty much the only word Google translate got. =-)
20:08 jnthn Well, Strbske Plesso is a place name.
20:08 jnthn trh is a market square.
20:09 jnthn It was a crappy sentence really, I was just going for nice looking consonant clusters. :-
20:09 dalek rakudo: 8681735 | smashz++ |  (2 files):
20:09 dalek rakudo: Implement getc funcion in IO, add getc.t to spectest.data
20:09 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/86817357bcfbdab19475c675247f58af28a558e7
20:09 PerlJam I need google translate to give me a pronunciation guide and an audio file
20:12 sjohnson std: razzle
20:12 p6eval std 30345: OUTPUT«Undeclared routine:␤   'razzle' used at line 1␤ok 00:01 108m␤»
20:13 jnthn PerlJam: The r acts slighly vowelish.
20:14 jnthn At least it's not as bad as http://en.wikipedia.org/wiki/Str%C4%8D_prst_skrz_krk
20:14 jnthn (has an ogg :-))
20:14 PerlJam zmer-zlin-u is roughly how I chunk it and say it.
20:15 jnthn zmrz-li-nu is I think the right way
20:15 PerlJam um ... the ogg there sounds like an insect talking to me  :)
20:16 Su-Shee PerlJam: if you pronounce it less sharp and with more shh and add french nasals, you get polish. :)
20:17 PerlJam that's funny because the french are always *not* pronouncing consonants  :)
20:18 Su-Shee you just need the ongs and engs and angs and all ;)
20:18 jnthn PerlJam: Yeah, the ogg does sound a bit...mechanical... :-)
20:18 bkeeler Reminds me of an Onion headline back when:  "Clinton deploys vowels to Bosnia"
20:18 frettled skrr skrrk
20:18 Su-Shee *haha*
20:19 jnthn Vowels are overrated.
20:19 * bkeeler knows where his vowel is
20:19 PerlJam The other day I saw someone whose last name was "Michaux" and I wondered how the pronunciation of that differs from "Michaud"
20:19 frettled Brits are the worst, they have a hidden wovel: w
20:19 bkeeler That's Welsh
20:20 PerlJam what bkeeler said
20:20 bkeeler Lovely sounding language, Welsh
20:20 PerlJam (the only word I know of where w is used as a vowel is "cwm")
20:20 bkeeler Looking back I should have gone to university in Wales instead of Lancaster, just so I could pick it up
20:21 frettled PerlJam: try pronouncing "why" a bit more carefully next time ;)
20:21 PerlJam frettled: :-P
20:22 frettled Sure, the Welsh use it more obviously as a wovel.  :)
20:22 bkeeler After three years I sounded like someone from Coronation Street :(
20:24 PerlJam of course there's "auld lang syne" which many Americans "know" except for the words  ;)
20:24 * jnthn doesn't know the words
20:24 jnthn It's one of those awkward moments at new years parties.
20:25 jnthn Where about half the people actually know the words...and the other half not. :-)
20:25 * PerlJam doubts half of any crowd actually knows the words
20:25 bkeeler I sure don't
20:25 jnthn You know the words to anything after enough drinks.
20:25 PerlJam exactly :)
20:25 bkeeler But I rather dislike the song, so I don't see myself bothering to learn them
20:26 * frettled doesn't know it.
20:26 * frettled would have to google it.
20:26 Su-Shee we just drink instead. ;)
20:27 jnthn That sounds so much simpler. :-)
20:27 Guest95102 joined #perl6
20:27 Su-Shee you can add kissing. requires no singing as well. :)
20:28 frettled Aha, it's that one!
20:34 TimToady I tend to think of Welsh w as a strange-looking omega  :)
20:38 moritz_ jnthn: thanks, will look more into it tomorrow
20:38 jnthn moritz_: k
20:39 jnthn std: class Foo is InheritingFromNonExistentClass { }
20:39 p6eval std 30345: OUTPUT«ok 00:01 108m␤»
20:39 jnthn Heh. I guess since it's a trait, there's only so much you can do...
20:40 jnthn I guess a multi candidate for catching such failures could try and do something a bit smarter though.
20:43 jnthn rakudo: class Foo is InheritingFromNonExistentClass { }
20:43 p6eval rakudo 6b5469: OUTPUT«Could not find sub &substr␤current instr.: 'perl6;Signature;_block21375' pc 485386 (src/gen/core.pir:72064)␤»
20:43 jnthn ah ffs.
20:48 bkeeler moritz_: So I was looking at your refactor_mob_generation branch
20:48 bkeeler moritz_: Still around?
20:51 bkeeler moritz_: Anyway, the thing that bothers me is it looks like it's adding an extra copy of all the captured things.  Seems like that might have a performance impact, since MATCH is called a *lot* during a parse
20:52 bkeeler moritz_: I'll time a few setting compiles and see, I suppose
20:59 Exodist_ joined #perl6
21:00 mdxi_ joined #perl6
21:05 masak joined #perl6
21:05 masak ahoy, #perl6!
21:05 bkeeler o/ masak
21:06 TimToady yoha!
21:06 frettled Is the masakbot ready for a recharge?
21:07 * bkeeler injects masakbot with fresh bug juice
21:07 masak does it hurt?
21:07 frettled I don't know, did it??
21:07 * masak levels up
21:07 frettled \o/
21:07 masak no, it feels quite alright :)
21:08 bkeeler Masak is now a level 42 Champion Bug Slayer, armed with a +4 can of RAID
21:08 jnthn \o/
21:08 masak :)
21:12 wknight8111 joined #perl6
21:13 bkeeler Is there a way to flag a pir sub to be run at program exit?
21:13 jnthn Add it as an END phaser
21:13 bkeeler Well, I'm thinking as part of nqp actually
21:13 jnthn Ah
21:13 jnthn Then no, I don't think so.
21:13 pmurias joined #perl6
21:13 bkeeler I want to count the number of times cursor's MATCH gets called
21:15 bkeeler One of these days I'm gonna add Dtrace support to parrot
21:19 jnthn bkeeler: Well, you could always hack Compiler.pir to print it at exit
21:19 bkeeler Yeah, I guess
21:20 pmurias in regards to adding the polymorphic representation and runloop to p5 as a thing separate from smop it seems a better plan than adding smop integration in one go
21:22 ruoso pmurias, I'm getting quite convinced about it
21:29 pmurias ruoso: what i'm i not sure is how can we avoid the performance penalty
21:30 ruoso pmurias, I'm getting a discussion on that topic on #p5p now... :)
21:30 ruoso (well not exactly performance, but anyway)
21:31 * pmurias switches irssi windows ;)
21:31 pugssvn r30346 | masak++ | [S32::Temporal] big change, based on much discussion
21:31 pugssvn r30346 |
21:31 pugssvn r30346 | A number of people spent last Sunday discussing various solutions to
21:31 pugssvn r30346 | the Temporal module. This is the result; probably a better idea to read
21:31 pugssvn r30346 | the new file rather than the diff. Briefly, the Temporal you're seeing
21:31 pugssvn r30346 | here is a stripped-down version of CPAN's DateTime; simple, yet powerful.
21:32 jnthn masak++
21:32 masak mberends++ lue++
21:32 mberends no, masak++ this time ;)
21:32 masak mberends: I couldn't have done it without you :)
21:33 jnthn mberends++ too then :-)
21:33 mberends my job on it begins tomorrow morning, following up the theory with a little more practice :)
21:33 frettled jnthn++ for ++-ing enough people
21:33 masak I'd like to add that we're expecting to add some more bells and whistles to the above commit: time zones, formatters, strftime, strptime, and DateTime::Duration (including some additive arithmetic ops).
21:34 masak but what just landed is a reasonably minimal, yet potent/extensible core.
21:34 jnthn Start small, get an implementation, play with it, iterate. :-)
21:34 masak we know what we want this time. it helps a lot.
21:35 masak basically, this is a subset of CPAN's DateTime.
21:35 masak perhaps the biggest design hesitation I faced was whether to make DateTime objects immutable, and have the "set" methods produce new objects instead.
21:36 mberends masak: for the implementation, would it be feasible to store the timezone as an integer offset, in units of seconds?
21:36 masak there were some advantages to that, including method chaining.
21:36 masak in the end, I left them as mutable, and we use lvalue public accessors to change the attributes.
21:36 PerlJam The last modified data is still Apr 5  :)
21:37 PerlJam er, date
21:37 masak PerlJam: hm, so it is.
21:37 jnthn That's why we need an implementation of date/time handling. ;-)
21:38 IllvilJa joined #perl6
21:38 pugssvn r30347 | masak++ | [S32::Temporal] adjusted date :)
21:38 frettled heh
21:38 masak mberends: I haven't thought much about that. either I'd store it as seconds, or I'd leave the string as it is, i.e. '+0200' etc.
21:39 frettled It depends on where you want to have the conversion cost, doesn't it?
21:39 masak mberends: haven't really looked what CPAN's DateTime is doing there; seems it might always be creating a DateTime::TimeZone object.
21:39 frettled Remember not to optimize for the rare cases.
21:41 * PerlJam wonders what it means for a DateTime object to have a timezone
21:41 PerlJam and what happens when you specify DateTimes that can't exist in the timezone?
21:41 masak PerlJam: there are two 'modes' for a DateTime object: either it has a fixed timezone, or it has a special timezone called 'floating'.
21:41 masak PerlJam: read the new spec!
21:41 mberends (underlying thought is, what will the methods need to do with a "-0800" anyway)
21:41 PerlJam yeah, I'm reading, but slowly
21:42 masak PerlJam: (it explicitly says it doesn't disallow times that can't exist in the timezone. this is because it doesn't have the data (in Perl 6 core) to check it. if you want checking, you have to define your own timezone or load a module)
21:43 masak mberends: some formatting methods will need to output that.
21:47 PerlJam This time stuff is very much like surveying.  You survey an elevation (for instance) and you get a number, but what's the number relative to?  You then have your choice of "standards" to choose from.  But in order for you  to talk about the elevation of your point relative to someone else's data, you'll have to pick a standard that is at least convertable to/from their standard.
21:47 masak seems to me there are two such standards, somewhat at odds with each other.
21:47 masak one is UTC.
21:47 masak the other is 'floating'.
21:48 masak UTC is the dead-simple time zone to use when doing datetime arith.
21:48 masak CPAN's DateTime advises to put the DateTime objects in this timezone as much as possible.
21:48 masak 'floating' is for when a timezone doesn't really make sense.
21:49 masak sometimes you have no way of knowing the time zone of a datetime coming in from the outside.
21:49 ruoso masak, note that you lose all the calendar-awareness
21:49 masak sometimes you explicitly don't care, and wish to avoid all side effects of DST, leap seconds and the like.
21:49 masak right.
21:50 mberends UTC has no daylight saving, therefore no impossible values or values that occur twice.
21:50 masak which is why we can easily put it in core.
21:51 ruoso masak, the DateTime you described is just the Gregorian DateTime
21:52 PerlJam one calendaring system at a time!  :)
21:52 ruoso and the Duration part is missing
21:52 * ruoso points to the revision before lue's commit
21:53 masak ruoso: yes, I just sent an email to p6l saying what's missing.
21:53 masak ruoso: and yes, it's just the Gregorian DateTime. and note that the word "Gregorian" is gone from the spec :)
21:54 ruoso masak, but note that Duration and Gregorian::Duration are two different things
21:54 ruoso as well as DateTime and Gregorian::DateTime
21:54 masak ruoso: Duration is the one coupled with Instant?
21:54 ruoso plain Duration, yes
21:55 masak we're planning to call the DateTime one DateTime::Duration, just like on CPAN.
21:55 ruoso and what about different calendar systems?
21:56 masak what about them?
21:56 ruoso you might have a calendar where the concept of "month" does not exist
21:56 mberends there will be modules...
21:56 masak ruoso: what mberends said.
21:56 masak ruoso: I think ease of use here means not overdesigning things.
21:56 masak cf Java.
21:57 tri1 joined #perl6
21:57 masak actually, let me be less humble about that point. I'm all for supporting other calendars, but for me the scale tilts way in favor of giving good support for good ol' Gregor.
21:58 ruoso but it's a matter in the same area of why you can't coerce a Buf to a Str without an encoding...
21:58 frettled IOW: FFF
21:58 masak other calendars will be very much possible, just not at the expense of the default.
21:58 masak ruoso: no, I don't think it is.
21:59 masak I think in 99.9% of the cases, when people reach for Date and Time, they reach for Gregorian dates and times.
21:59 jnthn Indeed.
21:59 masak the names of the months will be different, but they will still be months.
21:59 masak and if not, please check out that module over there.
21:59 jnthn +1 to keeping what's in core minimal.
22:00 ruoso my concern is about getting a basic type overspecialized
22:00 mberends The Temporal synopsis should also specify what functionality should be in the core executable, and what should be implemented in modules that have to be loaded with 'use' commands.
22:00 masak 99.9% of the cases is not overspecializing!
22:00 jnthn Getting a basic type overcomplexified is just as valid a concern.
22:00 diakopter masak: http://en.wikipedia.org/wiki/Indian_national_calendar
22:01 frettled masak: nice response from John Williams regarding week thingy
22:01 * masak looks
22:01 mberends that will be the plan for locales and named time zones
22:01 masak nod.
22:02 masak I actually had John Williams' exact thought, so maybe we'll go that way.
22:02 masak problem is, it's slightly disorienting in that it steps away from the value in :to<> always being the smallest unit that's *not* truncated.
22:03 masak in fact, I'll write that in a reply now.
22:03 frettled I'm pondering how this DateTime thingy can be implemented without adverse performance (i.e. the Perl 5 DateTime problem).
22:05 ruoso frettled, the problem is that DateTime is damn hard
22:05 frettled ruoso: not just
22:06 frettled ruoso: some parts of DateTime are rather easy, such as how to pretty-print given a known set of values.
22:06 frettled e.g. the output of localtime() in P5
22:06 ruoso masak, anyway... about locales and format, that's probably the part to be most copied from P5 DateTime
22:06 masak we've scrapped locales completely for now.
22:06 masak planning to steal formats wholesale.
22:06 ruoso masak, i.e.: look for the DateTime::Format::* modules on CPAN
22:06 masak aye.
22:07 frettled Doing the easy stuff ought to be quick, doing the hard stuff doesn't.  Also, that it's possible to do the hard stuff shouldn't slow down the easy stuff by orders of magnitude (not even one).
22:07 masak most of the format modules will stay modules in Perl 6, methinks.
22:07 masak but we'll spec how to make them. :)
22:07 ruoso masak, yes yes
22:07 frettled Some of that is design (or specification) dependent, but I suspect most is implementation dependent.
22:07 ruoso frettled, if you need simple quick math, just use Instants
22:07 frettled ruoso: math? huh?
22:07 ruoso that doesn't have to provide all the insane semantics
22:08 * ruoso needs to go now...
22:08 frettled Never has my blog's title been more apt.  :)  http://howcaniexplainthis.blogspot.com/2009/06/datetime-performance-hit.html
22:09 pugssvn r30348 | Darren_Duncan++ | S32-Temporal : fold nanosecond into second, fixing regression and inconsistency with the rest of the Synopsis
22:10 masak frettled++
22:10 xabbu42 joined #perl6
22:10 masak wow, that was fast :)
22:11 frettled one of the quickest patch-patches ever?
22:11 masak I don't mind. those nanoseconds felt weird :)
22:11 masak hours, mintues and seconds is much more symmetric.
22:11 frettled yup
22:12 * jnthn wonders if there's some analogy with ceil/floor/round and getting to the nearest fooday
22:12 masak I need to sleep for a bit now.
22:12 masak please keep up the good discussion. :)
22:12 masak &
22:12 jnthn o/
22:12 frettled masak: excellent idea, I'll follow suit (but in my own bed)
22:13 frettled oops, discussion crash :)
22:13 snarkyboojum_ joined #perl6
22:20 mberends joined #perl6
22:22 arnsholt joined #perl6
22:44 snarkyboojum_ left #perl6
22:47 jrtayloriv joined #perl6
23:01 cotto_work joined #perl6
23:16 justatheory joined #perl6
23:16 pugssvn r30349 | lwall++ | [STD] distinguish continuable-but-fatal "sorry" messages from immediately fatal panics
23:16 pugssvn r30349 | [CORE.setting] add 'note' function
23:16 pugssvn r30349 | [gimme5] translate note to print STDERR
23:26 pausenclown_ joined #perl6
23:36 lichtkind joined #perl6
23:40 lue o hey there everyone!
23:41 m6locks yhalothar
23:43 ruoso joined #perl6
23:48 lue how exactly do you use StrPos?
23:49 _jaldhar joined #perl6
23:56 lue std: say ("a".."c").list[0..**-1]
23:56 p6eval std 30349: OUTPUT«ok 00:01 109m␤»
23:57 lue rakudo: say ("a".."c").list[0..**-1]
23:57 p6eval rakudo 868173: OUTPUT«Method 'Num' not found for invocant of class 'Block'␤current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)␤»

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

Perl 6 | Reference Documentation | Rakudo