Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-05-29

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 wayland76 DanielC: re undeclared modules; it's if you have two modules that refer to each other.
00:01 DanielC ok
00:02 * DanielC imagines module HURD referring to module HIRD and module HIRD referring to module HURD.
00:03 wayland76 Exactly
00:03 DanielC So Perl 6 won't barf if two modules do that?
00:03 wayland76 So when you go class HURD { has HIRD $hi; }
00:03 wayland76 it complains
00:04 wayland76 So the synopsis says class HURD { has ::HIRD $hi; } will work
00:04 DanielC k
00:04 wayland76 But Rakudo didn't do that last week when I tried it
00:04 wayland76 In fact, it caused exciting errors :)
00:05 wayland76 But you *can* predeclare, so it's not a big problem
00:05 wayland76 To predeclare, go class HIRD {...} class HURD { has HIRD $child; } class HIRD { has HURD $parent; }
00:06 wayland76 And yes, the ... is actual code, not something I'm leaving out
00:06 wayland76 And it's not the ... operator :)
00:06 DanielC I was about to ask.
00:06 DanielC and that too :-)
00:06 DanielC Very interesting.
00:08 lichtkind joined #perl6
00:08 lichtkind jnthn: excuse had a weird disconnect
00:08 DanielC you are excused.
00:09 lichtkind haha
00:09 DanielC :)
00:09 lichtkind i suppose operator methods can also be wrapped
00:10 * DanielC looks around for someone who knows Perl 6
00:10 wayland76 lichtkind: I'd say that's so in theory.  I don't know about Rakudo :)
00:10 * sjohnson looks behind
00:10 lichtkind wayland76: thanks, im only intersted in theory  :)
00:12 DanielC lichtkind: Are you implementing something? Or just curious?
00:12 wayland76 If he was implementing something, he'd be interested in practise :)
00:13 DanielC :)
00:13 DanielC wayland76: He might be implementing a Perl 6 compiler :-)
00:13 lichtkind DanielC: i write tutoriels articles and talks about that
00:14 DanielC lichtkind: Are you going to write about Perl 6?
00:14 lichtkind DanielC: i do that since 2 years:)
00:14 DanielC :-)
00:14 wayland76 ZuLuuuuuu, DanielC: I think a grapheme can include multiple characters, no?
00:15 DanielC wayland76: Ask TimToady. I'm over my head here.
00:15 DanielC I thought I knew what a grapheme was, and then I learned that the world is not as simple as I thought.
00:17 lichtkind DanielC: are you interested in helping with the translation in english?
00:18 DanielC lichtkind: Warum nicht? Ich muss mein Deutsch verberssern.
00:18 wayland76 Yeah, I skimmed the backlog, saw nothing, but now I've seen the more in-depth discussion; don't listen to me, I have vague notions, but no real grasp
00:18 DanielC sagt man "verbessern"?
00:18 lichtkind DanielC: yes
00:18 DanielC :-)
00:18 TimToady a grapheme can contain multiple codepoints
00:18 lichtkind DanielC: my english isnt perfect eather
00:19 lichtkind DanielC: want we start with the tut or the articles?
00:19 DanielC ich denke, es ist besser als mein Deutsch.
00:19 DanielC Pick something short and simple.
00:19 TimToady bbl &
00:20 eternaleye DanielC: Basically, a grapheme can contain multiple codepoints (usually one that can stand alone and zero or more combining codepoints), and codepoints can have many representations depending on the encoding.
00:20 wayland76 If the articles are short, and have been translated, I could take the time to skim them for errors
00:20 DanielC lichtkind: Pick the shortest one you have and we'll see how it goes.
00:20 wayland76 (ie. After DanielC, whose English seems pretty good :) )
00:20 DanielC :-)
00:21 eternaleye So in ASCII and UTF8, a SPACE character is 0x2. It may be another number in another encoding, but it's still the SPACE grapheme
00:21 sjohnson 0x20
00:22 lichtkind DanielC: some parts are short but its more a strategic decission to take the series of articles its like a written story or the pages tutorials thats more like an lexikon
00:22 eternaleye sjohnson: Really? I thougt it was the second bit from the right (left being the big end)
00:22 DanielC wayland76: I would appreciate your review. Although my English is excellent, there are some errors I consistently make. For example, I really struggle with double consonants (e.g. copper, struggle). I often omit them, because I think about language phonetically, and double consonants sound the same as single consonants.
00:22 DanielC eternaleye: What is a codepoint?
00:24 lichtkind DanielC: the tutorials is at http://wiki.perl-community.de/cgi-bin​/foswiki/view/Wissensbasis/PerlTafel
00:24 DanielC *click*
00:24 lichtkind the translation i wanted to put into official perl 6 wiki
00:26 eternaleye DanielC: The numeric representation of a single unit of 'characterness'. So a SPACE is a single codepoint, and an A with a combining circumflex accent is two codepoints (unless you use the one where they already combined them, but that's just a mess)
00:26 wayland76 DanielC: You realise the double consonant alters the vowel sound of the previous syllable, just like words that end in "e"?
00:26 wayland76 s/sound/length/?
00:26 DanielC wayland76: How does coper differ from copper? (except that one is not a word)
00:27 wayland76 DanielC: A better example is "bitter" vs. "biter"
00:27 skids coper would be one who copes, pronounced with a long o.
00:27 eternaleye long o (saying the name of the letter) versus short o ("ah")
00:27 wayland76 bitter has a short "i", "biter" has a long "i", as in someone who bites
00:27 DanielC wayland76: How would you pronounce "bitter" and "biter"?
00:27 DanielC ah
00:28 DanielC biter -> someone who bites
00:28 wayland76 biter = /baiter/
00:28 DanielC wayland76: I didn't know that. Thanks.
00:28 wayland76 (sorry I couldn't get proper IPA -- I need another keyboard layout methinks)
00:28 * DanielC tries to think of other examples
00:28 eternaleye wayland76: Except baiter is an entirely different word pronounced a third way - isn't English sensible?
00:29 DanielC cuter vs cutter
00:29 wayland76 Well, I did linguistics (only one unit), so I picked up these things :)
00:29 wayland76 Yes, but I put it in slashes for IPA representation :)
00:30 eternaleye wayland76: I know, I'm just poking fun at my native language having more variety than Bertie Bott's Every Flavour Beans
00:30 skids DanielC: you expect English to be consistent? Hah!
00:30 DanielC wayland76: Can you give me an example where a word doesn't derive from a word that ends in 'e'? For example, cuter comes from cute.
00:30 DanielC skids: ha ha ha ha
00:31 eternaleye DanielC: Cutter comes from cut (one who cuts, the slang implication being themselves)
00:31 wayland76 Matterhorn?
00:31 skids DanielC: a lot of them end in e because it'sthe e that makes the vowel long (if there is no double consonant)
00:32 wayland76 hence the difference between "bit" and "bite"
00:32 DanielC eternaleye: Yeah, but I'm looking for an example of words with a single or a double consonant, to test wayland76's suggestion that the double consonant changes the vowel sound.
00:32 eternaleye DanielC: Also, the e-ending -> er isn't consistend meaning-wise: bite -> biter is "one who", while cute -> cuter is the superlative (indicating a hight degree of the adjective)
00:32 DanielC water vs matter -> sound the same
00:32 eternaleye DanielC: No, they don't
00:32 wayland76 No they don't
00:33 DanielC wait... why does water not sound like mate?
00:33 skids but closer that waiter and matter.
00:33 eternaleye W - aw - ter vs m - aa - tter
00:33 skids s/that/than/
00:33 skids waiter = w ay ter
00:33 wayland76 /water/ vs. /mæter/
00:33 eternaleye mate = m ay t
00:34 eternaleye and mate is completely unrelated to matter, and sounds very different
00:34 DanielC If mate = m ay t then water = w ay t er
00:34 DanielC but clearly that doesn't work.
00:34 wayland76 .ety water
00:34 skids no,. that would be consistent.
00:34 phenny "O.E. wæter, from P.Gmc. *watar (cf. O.S. watar, O.Fris. wetir, Du. water, O.H.G. wazzar, Ger. Wasser, O.N. vatn, Goth. wato 'water'), from PIE *wodor/*wedor/*uder-, from root *wed- (cf. Hittite watar, Skt. udnah, Gk. hydor, O.C.S., Rus. voda, Lith. vanduo, O.Prus. [...]" - http://etymonline.com/?term=water
00:34 DanielC skids :)
00:34 wayland76 No IPA :(
00:35 eternaleye DanielC: Water has the same 'a' as the german word for Father, IIRC
00:35 skids though, wader is w ay der
00:35 eternaleye vater
00:35 DanielC wayland76: The IPA is of limited use here because *I* don't know it.
00:35 bacek joined #perl6
00:35 wayland76 Ah, ok :)
00:36 wayland76 I think "water" is the word that doesn't follow the rules here
00:36 DanielC etermaleye: I know how to say water in English :-)  I'm just pointing out that it's not consistent with wayland76's rules.
00:36 DanielC yeah
00:36 eternaleye DanielC: Ultimately, a text-based communication medium is a very, _very_ ineffective way to learn how to pronounce english words ;D
00:36 wayland76 There are always words that don't follow the rules.
00:36 skids Basically you have to know the vowel sound of the original word to get any sense of consistency (however illusional)
00:37 DanielC If "cute" follows the rule by being a long u then "water" should have a long "a" and it doesn't.
00:37 skids water isn't an English word..
00:37 DanielC eternaleye: yeah
00:37 eternaleye DanielC: Every rule in english is broken more times that anyone has bothered counting
00:37 DanielC skids: How do you say water in English then?
00:37 skids Or if it is not a popular one.
00:37 wayland76 Well, it has a long "a", but it's a different long a than "father", etc
00:37 skids oh, damn, now you've got me turned around.
00:37 eternaleye <eternaleye> DanielC: Water has the same 'a' as the german word for Father, IIRC (vater)
00:38 skids lol.
00:38 s1n skids: water isn't a popular english word?
00:38 skids I was trying tosay it like waiter in my head.
00:38 wayland76 I drink water myself :)
00:38 skids :-)
00:38 eternaleye If we needed any more proof that Perl[\d*] was designed for, by, and starring linguists, this is it.
00:39 s1n water pronounced way-ter is only going to be from a heavy accent, it's not the proper pronounciation
00:39 DanielC he he
00:39 Time`s_Witness joined #perl6
00:39 wayland76 (back in 5)
00:39 minazo joined #perl6
00:39 DanielC eternaleye: And thing is, linguistics really is what I love most about Perl.
00:40 skids anyway, cut is the original word and has a short u, do to add er == "one who" and preserve the short u, you need to use a double t.
00:40 DanielC My gf is probably tired of me telling her about all the cool linguistic features of Perl.
00:41 skids But cute is the original word for cuter, and in order to ad the er = superlative all you need to do to preserve the vowel sound is add an r.
00:41 Time`s_Witness left #perl6
00:41 skids (because cuteer would be a long e)
00:41 wayland76 (back)
00:42 skids See it all makes sense, until it doesn't.
00:42 wayland76 English would be better with macrons :)
00:42 DanielC wayland76: If I wrote scrable instead of scrabble would the "a" be pronounced as "ay" ?
00:42 wayland76 yes
00:43 DanielC thanks
00:43 skids fable, able
00:43 skids ^^ long as
00:43 wayland76 (according to normal rules.  But if you pronounced the "a" like in "water", people would be unsurprised, but would have to file the correct pronunciation in their memory)
00:43 DanielC wayland76: Thanks for explaining the rule about double consonants. This is something that has bugged me for *years*.
00:44 eternaleye uh oh, something's wrong with p6eval
00:44 eternaleye rakudo: say "hi"
00:44 p6eval rakudo 606252: OUTPUT«hi»
00:44 eternaleye wtf? it gave no output in PM
00:44 wayland76 Thanks to everyone for the examples :)
00:44 fridim_ joined #perl6
00:45 DanielC Thanks to everyone for helping me with English pronunciation.
00:45 wayland76 eternaleye: I get the same thing
00:45 * skids goes  to get a glass of water
00:46 DanielC Which reminds me, I keep trying to write "pronunciation" as "pronounciation" and I don't understand why the latter is no right. After all, don't you write "pronoun" and "pronounce"?
00:46 eternaleye Aha! It's utf8 trouble!
00:46 eternaleye rakudo: say "o\c[COMBINING UMLAUT]"
00:46 p6eval rakudo 606252: OUTPUT«perl6regex parse error: Unrecognized character name COMBINING UMLAUT at offset 19, found 'C'␤in Main (src/gen_setting.pm:0)␤»
00:46 eternaleye ...
00:46 eternaleye In PM that gave no output either. Something's fishy.
00:47 eternaleye Actually, in PM, that gave no output and caused the next two commands to give no output
00:47 wayland76 DanielC: I'm not sure, but it's probably something to do with the shortening of non-stressed vowels
00:47 DanielC stoopid English
00:48 cotto DanielC, don't try to make sense of it.  It isn't rational.  It simply is.
00:48 wayland76 No, let him try
00:48 skids DanielC: English especially likes to be irregular around words used to describe the language itself, as it makes things extra confusing.
00:48 wayland76 He may be able to help Noam Chomsky :)
00:48 DanielC skids:  :-)
00:48 cotto I once hired a pronun to help around the house.
00:49 skids Are there amature nuns?
00:49 DanielC he he
00:49 s1n or anti-nuns?
00:50 wayland76 According to Pratchett, there are Satanic Nuns :)
00:51 fridim_ joined #perl6
00:51 s1n so we have pronuns and antinuns
00:51 wayland76 Who were trying to serve the AntiChrist
00:51 skids and electruns?
00:51 DanielC If language worked like that, antimatter would be Satanic matter.
00:51 wayland76 Or electro-nuns?
00:52 cotto a Calvinist would say they're all elect
00:52 wayland76 No, a Calvinist would say they're not (assuming we're talking Catholics here)
00:53 wayland76 Or Satanists.  Your Calvinist type condemns them all
00:53 wayland76 (Little-known fact: until about 1900, Calvinists and many other Protestants believed that the Pope was the Anti-Christ mentioned in the Bible)
00:54 skids Let's get back to badly irregular words.  Like Amish.
00:54 wayland76 Well, once you know that it's a Pennsylvania Dutch word it all makes sense :)
00:55 wayland76 And if you want irregular words, I like "ghoti"
00:55 xinming_ joined #perl6
00:55 wayland76 (pronouned /fish/ )
00:55 DanielC Incidentally, it's not Dutch at all, is it? Amish is a German descent. Right?
00:55 skids Maybe we should advise DanielC to learn Creole first.
00:55 skids Or Appalachian
00:55 DanielC skids: I know a creole language... (Spanish)
00:56 s1n i thought creole was more french
00:56 eternaleye rakudo: multi sub infix:<ö>( $l, $r ) { say "$l is " ~ ( $r ~~ m/^<+[aeiouAEIOU]>/ ?? "an " !! "a " ) ~ $r; }; ( "Camelia", "Foghorn Leghorn", "King Kong" ) »ö« <butterfly rooster ape>
00:56 p6eval rakudo 606252: OUTPUT«Camelia is a butterfly␤Foghorn Leghorn is a rooster␤King Kong is an ape␤»
00:56 wayland76 DanielC: When they came through customs, they were asked "What nationality", and they said "Deutch", and they got put down as "Dutch"
00:57 DanielC wayland76: Yeah, that's it. I had forgotten. Deutsch... "Dutch"
00:57 wayland76 eternaleye: You left "h" out of the things that require an "an" :)
00:58 skids an hamburger?
00:58 cotto That's an historical oddity.
00:58 eternaleye an hero?
00:58 wayland76 an history lesson
00:59 wayland76 an honourable thing to do
00:59 wayland76 Technically, all correct :)
00:59 DanielC But there are good phonetic reasons for "a" vs "an"
00:59 cotto what's the regex to match a silent "h"?
00:59 s1n wrong, you only add the "n" if the first phonetic sound is a vowel
00:59 eternaleye See, the only one I agree with is the honorable one, because it's pronounced like 'onorable'
00:59 wayland76 But probably considered a little archaic these days
01:00 DanielC If the following word starts with a consonant sound you say "a" and if it starts with a vowel sound you say "an".
01:00 skids cotto: I think it calls out to a dynamically loaded native english speaker.
01:00 s1n correct, that why it's "an honorable" and "a history"
01:00 DanielC exactly
01:00 eternaleye [RFC] Introduce a new normalization level in Parrot which composes graphemes into phonemes
01:01 DanielC So it is not a historical oddity, really.
01:01 skids NCI -- native call interface.  NES -- native english speaker.
01:01 s1n btw, wayland76, it's "honor" not "honour", silly british :)
01:01 DanielC (ok, all language is a historical oddity, but you get my meaning)
01:01 wayland76 I'm an honourable Australian, thanks :)
01:01 s1n same thing
01:02 DanielC s1n: USian English is just gradually converging with Spanish.
01:02 eternaleye uh oh
01:02 wayland76 and I'm right about "an history" too.  See comments further down the page at http://www.englishforums.com/English​/AHistoryVsAnHistory/dncdl/post.htm
01:02 s1n DanielC: USian? nice
01:02 eternaleye "left-pondian"
01:03 skids an hermano?
01:05 mikehh joined #perl6
01:05 s1n wayland76: it might be acceptable in other forms of english (old, british, indian, etc), but not it's not overly common in modern american english
01:05 wayland76 s1n: That's why I said it might be considered a little archaic these days :)
01:06 s1n wayland76: oh didn't see that
01:06 s1n besides, american english is the only language that matters, right? (awaits the barbs) :)
01:06 wayland76 no worries :)
01:07 cls_bsd joined #perl6
01:07 wayland76 Δεαθ το τηε Αμεριψαν ΑντιΨηριστ!
01:07 wayland76 Sorry
01:07 s1n clearly, that is encrypted text :)
01:08 wayland76 Δεαθ το τε Αμερικαν ΑντιΧριστ
01:08 wayland76 That's better :)
01:08 wayland76 ֽךך ישןך ֡מאקרמשאןםמשךןדאצ
01:09 wayland76 (Apoligies to Hebrew and Greek speakers -- I shouldn't type English with other-language layouts, although I *did* try to accomodate Greek a little :)
01:09 wayland76 *Apologies even :)
01:10 wayland76 s1n: Seriously, though, few of the classics are written in American English :)
01:11 skids http://www.spellingsociety.org/​aboutsss/leaflets/cutspel1.php
01:11 DanielC One of these days I want to learn Tengwar so I can impress all my friends.
01:12 s1n wayland76: depends on what you call classics
01:12 wayland76 s1n: "Great Books of the Western World" -- see Wikipedia page for list
01:12 wayland76 xorg doesn't have a Tengwar keyboard layout
01:14 wayland76 http://en.wikipedia.org/wiki/Gr​eat_Books_of_the_Western_World
01:15 DanielC Miguel de Cervantes yay!
01:15 wayland76 re: Cut Spelling; see Shavian
01:16 wayland76 Personally I'm not supporting any changes to English that don't include macrons, þ, and ð
01:16 wayland76 Oh, and æ
01:16 DanielC What are macrons?
01:17 wayland76 macr¯on
01:18 wayland76 My keyboard is having trouble with it.  Just a mo
01:18 wayland76 Needs to go above the vowel, anyway
01:18 cotto http://lmgtfy.com/?q=macrons
01:18 wayland76 But it's a straight line instead of a angled, curvy, or wavy one
01:19 wayland76 Indicates a long vowel
01:19 s1n i'll do without macrons, thank you
01:19 s1n english is rich enough, we don't need those hacks :)
01:19 * skids lughs hysterically.  Didn't know about lmgtfy.com
01:19 wayland76 s1n: I'm resigned to the way things are -- this is in response to skids' proposal for spelling reform
01:20 skids Oh not my proposal.
01:20 wayland76 to lugh (v.) to worship the Celtic god Lugh
01:20 skids I just think it's funny how you really can read it without noticing.
01:20 DanielC he he he, I love lmgtfy.com !
01:21 skids http://lmgtfy.com/?q=lugh
01:21 sjohnson god i wish i had known about this site when my sister asked me this:  http://www.google.com/search?btnG=1&amp;q​=delete+internet+explorer+browser+history
01:21 sjohnson oops
01:21 sjohnson it took out the lmgtfy
01:21 sjohnson http://lmgtfy.com/?q=delete%20inter​net%20explorer%20browser%20history
01:22 wayland76 And what had she been doing? :-}  (That's an evil grin, there)
01:23 skids It's not evil without eyebrows. >-}
01:23 wayland76 Ah, thanks :)
01:23 wayland76 I'll try to file that for future reference :)
01:23 H1N1 joined #Perl6
01:23 s1n pmichaud: i played with that example you gave me and i have a question, if i use the prefix:<~> operator on the return, i get a Perl6Str instead of a Str. how do i get a Str from the PIR code instead?
01:24 wayland76 My IRC client doesn't seem to do combining characters :(
01:24 wayland76 Or dead keys, rather
01:26 DanielC My keys are mostly alive.
01:27 wayland76 ( DanielC -- are you unfamiliar with the term "dead keys"?)
01:27 DanielC no, I'm just being silly.
01:27 DanielC It's 3:30am. I get silly at 3:00am.
01:27 DanielC I should go to bed...
01:28 DanielC night y'all
01:28 wayland76 'night
01:29 sjohnson the standard Switch; statement in the core module in perl 5 is flaky as hell
01:29 pmichaud s1n:  there isn't a huge difference between a Perl6Str and a Str.  If a difference is showing up, I'd be curious about where.
01:30 s1n pmichaud: if i try $obj."foo", it works, but if i do $obj.$foo where $foo was supposed to be "foo" it fails
01:30 sjohnson case m/^set (\d+)$/ { $hash_position = $1; } # won't work in Perl 5's use Switch; core module
01:31 s1n where i used that first example you gave me with the box call
01:31 s1n whoa, nopaste is over, gotta find another service :/
01:32 sjohnson rakudo:  my $str = "set 15";   given $str {   when /^set (\d+)$/ { print $1; } }
01:32 p6eval rakudo 606252:  ( no output )
01:32 sjohnson rakudo:  my $str = "set 15";   given $str {   when /^set (\d+)$/ { print "[$1]"; } }
01:32 p6eval rakudo 606252:  ( no output )
01:32 sjohnson rakudo:  my $str = "set 15";   given $str {  when /^set/ { print "[$1]"; } }
01:32 p6eval rakudo 606252: OUTPUT«Use of uninitialized value␤[]»
01:33 sjohnson rakudo:  my $str = "set 15";   given $str {  when /^set/ { print "match"; } }
01:33 p6eval rakudo 606252: OUTPUT«match»
01:33 sjohnson rakudo:  my $str = "set 15";   given $str {  when /^set \d+/ { print "match"; } }
01:33 p6eval rakudo 606252:  ( no output )
01:33 s1n pmichaud: http://pastebin.com/d4ee0eed1
01:33 buubot s1n: The paste d4ee0eed1 has been copied to http://erxz.com/pb/17876
01:33 Whiteknight joined #perl6
01:34 sjohnson pmichaud: do you have any thoughts on the last query i ran with the rakudo?
01:35 s1n pmichaud: btw, the .WHAT still returns a "Str()" on the return value
01:35 skids my $str = "set 15";   given $str {  when /^set\  \d+/ { print "match"; } }
01:35 skids rakudo: my $str = "set 15";   given $str {  when /^set\  \d+/ { print "match"; } }
01:36 p6eval rakudo 606252: OUTPUT«match»
01:37 skids If you want spaces to count you have to have a :sigspace adverb.
01:39 sjohnson rakudo: my $str = "set 15";   given $str {  when /^set\  (\d+)/ { print "match: $1"; } }
01:39 p6eval rakudo 606252: OUTPUT«Use of uninitialized value␤match: »
01:39 sjohnson skids: what about returning the matches like this?
01:39 pmichaud parens capture to $0, $1, $2, etc.
01:39 pmichaud so you probably want $0 there
01:39 sjohnson rakudo: my $str = "set 15";   given $str {  when /^set\  (\d+)/ { print "match: $0"; } }
01:39 p6eval rakudo 606252: OUTPUT«match: 15»
01:39 skids rakudo: my $str = "set 15";   given $str {  when /^set\  \d+/ { print "match $/[0]"; } }
01:39 p6eval rakudo 606252: OUTPUT«match set 15[0]»
01:39 sjohnson hmm, won't that whole "\ " thing start to really get annoying after a while?
01:40 pmichaud sjohnson:  then use 'set '
01:40 eternaleye s1n: $obj."$foo" is what you want
01:40 lichtkind_ joined #perl6
01:40 pmichaud or even rule
01:40 sjohnson rakudo: my $str = "set 15";   given $str {  when 'set (\d+)' { print "match: $0"; } }
01:40 p6eval rakudo 606252:  ( no output )
01:40 eternaleye rakudo: my Str $obj = 'FOO'; my $foo = 'lc'; say $obj."$foo";
01:41 p6eval rakudo 606252: OUTPUT«foo␤»
01:41 s1n eternaleye: you're right, that works
01:41 pmichaud rakudo: my $str = "set 15";   given $str {  when /^ 'set ' \d+/ { print "match $0"; } }
01:41 p6eval rakudo 606252: OUTPUT«Use of uninitialized value␤match »
01:41 s1n what's the difference though, they're both Str objects?
01:41 pmichaud rakudo: my $str = "set 15";   given $str {  when /^ 'set ' (\d+)/ { print "match $0"; } }
01:41 p6eval rakudo 606252: OUTPUT«match 15»
01:41 pmichaud rakudo: my $str = "set 15";   given $str {  when /^ set ' ' (\d+)/ { print "match $0"; } }
01:41 sjohnson hmm i suppose then that the p6 /regex/ things are totally different than p5
01:41 p6eval rakudo 606252: OUTPUT«match 15»
01:42 pmichaud rakudo: my $str = "set 15";   given $str {  when rule /^ set (\d+)/ { print "match $0"; } }
01:42 sjohnson isn't that just like forcing a /x option like in p5 on Perl 6?
01:42 p6eval rakudo 606252: OUTPUT«Malformed regex definition at line 2, near "/^ set (\\d"␤in Main (src/gen_setting.pm:0)␤»
01:42 * sjohnson is confused
01:42 pmichaud rakudo: my $str = "set 15";   given $str {  when rule {^ set (\d+) } { print "match $0"; } }
01:42 p6eval rakudo 606252: OUTPUT«match 15»
01:42 eternaleye Hm, I wonder how slurpy generators work with the magical '...' operator.
01:42 pmichaud sjohnson: yes, /x is the default for Perl 6 regexes.  See S05.
01:43 sjohnson rakudo: my $str = "set 15";   given $str {  when rule {^set (\d+)} { print "match $0"; } }
01:43 p6eval rakudo 606252: OUTPUT«match 15»
01:43 pmichaud s1n: the difference may be that $obj."$foo"  is syntactically different from $obj.$foo
01:44 sjohnson Because C</x> is default:
01:44 pmichaud according to S12, in order for   $obj.$foo to work, $foo must be a Callable object.  A Str wouldn't qualify.
01:44 sjohnson =over
01:44 skids rakudo: my $str = "set 15";   given $str {  when /^set\  (foo=\d+)/ { print "match $/{foo}"; } }
01:45 p6eval rakudo 606252: OUTPUT«perl6regex parse error: LHS of alias must be lvalue at offset 63, found '='␤in Main (src/gen_setting.pm:3166)␤»
01:45 sjohnson pmichaud: not to sound like a complete jackass, but is there a good reason for why \x is default in P6?
01:45 sjohnson err.. /x
01:45 pmichaud sjohnson: because it makes for more readable regexes
01:45 s1n pmichaud: ah okay, i couldn't use the Sub directly because i wanted to call it on a different class
01:46 pmichaud sjohnson: and because whitespace and other non-alphanumerics are now always meta
01:46 skids Perl6 expects people to use really very complex rgexes made up of lots of parts.
01:46 sjohnson is "rule" the only way to shut it off?
01:46 sjohnson case m/^copy (\d+) (\d+)$/
01:46 pmichaud rule doesn't actually shut it off, it just makes the whitespace means something different
01:46 sjohnson in p5, looks prett readable and functions as it should
01:46 pmichaud if you want to match a literal, use '...'
01:47 pmichaud in the case of "copy" above, rule actually does better than the p5 version (more)
01:47 pmichaud for example:
01:47 wayland76 m/^copy' '(\d+) (\d+)$/
01:47 wayland76 ?
01:47 wayland76 m/^copy\s+(\d+)\s+(\d+)$/
01:47 pmichaud my $str = "copy   15   20";  say $str ~~ rule { ^ copy (\d+) (\d+) };
01:47 sjohnson though the last one functions better, it is far less readable
01:47 skids Most of the time you do not want ' ' anyway, you want <ws>
01:47 pmichaud rakudo: my $str = "copy   15   20";  say $str ~~ rule { ^ copy (\d+) (\d+) };
01:47 p6eval rakudo 606252: OUTPUT«copy   15   20␤»
01:48 pmichaud note that it worked even though there are multiple spaces between 'copy', '15', and '20'
01:48 sjohnson what did the little ^ do
01:48 sjohnson ?
01:48 wayland76 Start of line?
01:48 pmichaud start of string
01:48 sjohnson oh
01:48 sjohnson duh
01:48 sjohnson i should have known that
01:49 sjohnson just not used to seeing it around space i suppose
01:49 pmichaud also:
01:49 sjohnson stupid brain
01:49 pmichaud rakudo: my $str = "supercopy   15   20";  say $str ~~ rule { copy (\d+) (\d+) };
01:49 p6eval rakudo 606252: OUTPUT«␤»
01:49 pmichaud note that "rule" is smart enough to detect that "copy" needs to be a word by itself
01:49 wayland76 Oh, auto ^$ ?
01:49 wayland76 Ah,
01:50 sjohnson i suppose i will have to really go to town learning the difference
01:50 * wayland76 anticipates
01:50 pmichaud not that so much, as the fact that ws in the rule means that there have to be word boundaries
01:50 pmichaud i.e., whitespace in a rule won't match between two word characters
01:51 sjohnson at least in p6 the (\d) works
01:51 pmichaud rakudo: my $str = "alot";  say $str ~~ rule { a (.*) };
01:51 p6eval rakudo 606252: OUTPUT«␤»
01:51 pmichaud rakudo: my $str = "a lot";  say $str ~~ rule { a (.*) };
01:51 wayland76 ok; not 100% sure I have that, but I need to play with it, not hear more examples :)
01:51 p6eval rakudo 606252: OUTPUT«a lot␤»
01:51 sjohnson in the Core Module in Perl 5.8.8 that I'm using, the switch/case will not throw the (\d+) into a match var
01:51 eternaleye I can't wait for the magical '...' operator, so I can do this: sub nextprime( *@existing ) { my $current = @existing[*-1]; while ++$current { return $current unless $current % any( @existing ) == 0; }; }; .say for 2, 3 ... &nextprime;
01:52 * wayland76 anticipates LTM :)
01:52 pmichaud wayland76: I suspect we're still at least two months away from LTM, unless I have a breakthrough.
01:53 skids rakudo: "JAN07" ~~ /$<month>=(\w\w\w) $<day>=(\d\d)/; $/<day>.say
01:53 p6eval rakudo 606252: OUTPUT«07␤»
01:53 wayland76 Oh well :).  I thought it might be a while
01:53 * wayland76 needs slangs for his Tree module
01:53 wayland76 :)
01:54 wayland76 (not to pester you -- pmichaud++ :) )
01:54 * skids anticipates <jan feb mar> and jan<*uary>
01:54 eternaleye skids: $<var>=(stuff) will give you a Match object, $<var>=[stuff] just gives a string and may be faster/simpler/etc
01:54 pmichaud I don't mind the pestering at all... just don't want to be giving people false expectations
01:55 wayland76 ok then
01:55 * wayland76 cracks the whip :)
01:55 skids eternaleye++
01:55 pmichaud actually, both $<var>=(...)  and $<var>=[...]   end up with Match objects
01:55 pmichaud the difference is in how any nested captures are handled.
01:55 pmichaud (at least, that's the primary difference)
01:55 eternaleye pmichaud: Ah
01:56 s1n how would i call the parent method of an overloaded method in a class, like super.method in Java?
01:56 pmichaud $<var>=(... (\w+) ...)    means that the nested parens will be stored in   $<var>[0]
01:56 pmichaud $<var>=[... (\w+) ...]   means that the nested parens will be stored in $[0]
01:57 eternaleye pmichaud: OIC
01:57 wayland76 with SUPER::
01:58 eternaleye rakudo: "Foobarfoo" ~~ m/$<var>=[Foo(...)foo]/; say $<var>.WHAT
01:58 p6eval rakudo 606252: OUTPUT«Match()␤»
01:58 wayland76 Or at least, that's implied in a couple of places, but not specced anywhere
01:58 eternaleye rakudo: "Foobarfoo" ~~ m/$<var>=[Foo(...)foo]/; say $<var>
01:58 eternaleye rakudo: "Foobarfoo" ~~ m/$<var>=[Foo(...)foo]/; say $<0>
01:58 p6eval rakudo 606252: OUTPUT«Foobarfoo␤»
01:58 p6eval rakudo 606252: OUTPUT«Use of uninitialized value␤␤»
01:59 pmichaud (try  $[0]  or $0 )
01:59 s1n wayland76: that seems to cause null pmc with invoke
01:59 pmichaud (rakudo doesn't understand $<0> yet)
01:59 eternaleye rakudo: "Foobarfoo" ~~ m/$<var>=[Foo(...)foo]/; say $0
01:59 p6eval rakudo 606252: OUTPUT«bar␤»
01:59 s1n rakudo: class A { method foo { say "foo" } }; class B is A { method foo { SUPER::foo; } };  my B $bb .= new; $bb.foo;
01:59 p6eval rakudo 606252: OUTPUT«Null PMC access in invoke()␤in method B::foo (/tmp/MZeKpAH85v:2)␤called from Main (/tmp/MZeKpAH85v:2)␤»
01:59 pmichaud rakudo doesn't understand SUPER:: yet.  And I'm not even sure what that would mean,e xactly.
01:59 s1n okay, just curious
01:59 eternaleye pmichaud: Because of multiple inheritance?
01:59 s1n i'll have to work around it
01:59 pmichaud eternaleye: ye.
01:59 pmichaud *yes.
02:00 s1n is there a way to do the same with roles?
02:00 wayland76 Incidentally, 2 months to LTM is better than the 4 months that were expected last August :)
02:00 pmichaud I'm wondering if "SUPER::" is not meant to be literal in the spec there.
02:00 pmichaud wayland76: that's because I've made about 2 months of progress :-)
02:00 eternaleye s1n: You can always say A::foo
02:01 eternaleye rakudo: class A { method foo { say "foo" } }; class B is A { method foo { A::foo; } };  my B $bb .= new; $bb.foo;
02:01 p6eval rakudo 606252:  ( no output )
02:01 wayland76 pmichaud: Yeah, I figured that.  I'm just extrapolating.  LTM around... Feburary next year :)
02:01 s1n hmm
02:01 eternaleye ...Or not
02:01 pmichaud wayland76: oh, I hope not that long.
02:02 pmichaud wayland76: I have grant payments that depend on LTM being finished, and I could use the $$$.
02:02 wayland76 pmichaud: I home not either.  I'm willing to wait and see :)
02:02 wayland76 Oh, good
02:02 wayland76 :)
02:02 pmichaud also, I _really_ hope we're using something a lot closer to STD.pm before then.
02:02 wayland76 s1n: Roles are probably what you want :)
02:02 skids No you don't, then I'll stop holding off on filing bugs that are parse failures :-)
02:03 pmichaud skids: sure, but then the parse failures are STD.pm issues, and not Rakudo ones :-)
02:03 wayland76 role A { method foo { say "foo" } }; class B does A { method foo { SUPER::foo; } };  my B $bb .= new; $bb.foo;
02:04 wayland76 pmichaud: I guess I thought the idea was LTM first, STD next.  But I'll take your word for it
02:04 wayland76 Btw, I think there are some P5isms in STD, so it may need some work :)
02:04 pmichaud the idea is LTM first, STD next
02:04 pmichaud which is why LTM needs to be done well before February
02:05 araujo joined #perl6
02:05 wayland76 Ah, now I can reread your comments and put the emphasis in the right places :)
02:05 pmichaud *another reason why
02:05 wayland76 I thought you were saying STD before LTM :)
02:05 wayland76 rakudo: role A { method foo { say "foo" } }; class B does A { method foo { SUPER::foo; } };  my B $bb .= new; $bb.foo;
02:05 p6eval rakudo 606252: OUTPUT«Null PMC access in invoke()␤in method B::foo (/tmp/CEhmk4Ojvu:2)␤called from Main (/tmp/CEhmk4Ojvu:2)␤»
02:06 pmichaud I'm quite certain that SUPER:: isn't implemented in Rakudo, and any attempt to get it to work will fail because Rakudo thinks that "SUPER::" is a namespace.
02:06 wayland76 SUPER isn't even specced properly
02:06 TimToady you want nextsame in any case, not SUPER
02:06 wayland76 Oh, wait, what about things like "nextsame"
02:06 pmichaud "nextsame" works, fvvo "works"
02:07 wayland76 GMTA, although I'm not sure about me in this case :)
02:07 wayland76 rakudo: role A { method foo { say "foo" } }; class B does A { method foo { nextsane; } };  my B $bb .= new; $bb.foo;
02:07 p6eval rakudo 606252: OUTPUT«Could not find non-existent sub nextsane␤»
02:07 wayland76 rakudo: role A { method foo { say "foo" } }; class B does A { method foo { nextsame; } };  my B $bb .= new; $bb.foo;
02:07 p6eval rakudo 606252: OUTPUT«Null PMC access in find_method()␤in method B::foo (/tmp/bF91t4TlOc:2)␤called from Main (/tmp/bF91t4TlOc:2)␤»
02:07 wayland76 Well, looks like I'm as sane as the next person then :)
02:07 skids Not surprising nothing sane here to be found.
02:08 pmichaud looks like Rakudo is missing anything matching "sane"
02:08 pmichaud Somehow I knew that.  :-)
02:08 pmichaud afk # walk
02:08 wayland76 enjoy :)_
02:08 wayland76 Think about LTM :)
02:08 gkurts joined #perl6
02:11 sjohnson pmichaud: will Perl 6 have a function that does a generic sort like the unix:  sort -g command
02:11 sjohnson without having to write sort( $a <=> $b) all the time, etc
02:11 sjohnson like gsort()
02:11 sjohnson gsort(keys(%hash)).say
02:12 sjohnson which would handle the #'s better
02:13 TimToady the default sort uses cmp, which sorts each type appropriately within the type, and we can arrange a generic cross-type cmp to coerce mismatches
02:14 sjohnson 0 1 11 2 20 30
02:14 TimToady or it's trivial to make your own generic sort
02:14 sjohnson the age old sort problem... needs to die a painful death
02:14 TimToady sort &gsort, @list
02:14 sjohnson sort &gsort, @list
02:14 TimToady my &gsort ::= &sort.assuming(&generic_sorter);
02:15 eternaleye sjohnson: There's also %hash.keys.sort( *.Num )
02:15 sjohnson a core module or something for that would be kind of handy instead of having to "redefine the wheel"
02:15 sjohnson all the time
02:15 TimToady that's just .sort(+*)
02:15 sjohnson will any of this stuff work in p5?
02:15 sjohnson i'm only bringing these thigns up as i am programming in p5 as we speak
02:15 TimToady not likely, it all falls out the design cleanup
02:15 sjohnson and running into annoyances
02:16 TimToady dinner &
02:16 eternaleye buubot: spack sublanguage
02:16 buubot eternaleye: S02-bits.pod:1
02:16 eternaleye buubot: spack braid
02:16 buubot eternaleye: Sorry, I couldn't find any matches for: braid
02:17 skids buubot: spack slang
02:17 buubot skids: Sorry, I couldn't find any matches for: slang
02:17 skids hrm, slang is definitely in there.
02:18 eternaleye buubot: spack sublang
02:18 buubot eternaleye: S02-bits.pod:1
02:18 skids it's in the "Names" section
02:18 eternaleye skids: Thanks
02:18 skids Not that that narrows it down very much
02:19 skids but text search slang
02:19 eternaleye yeah, running svn up now
02:26 s1n wayland76: ping
02:27 wayland76 present
02:27 Kisu joined #perl6
02:28 wayland76 (well, kinda present.  I'm getting distracted by the CPAN discussion on the mailing list, which I'll need to catch up with)
02:32 s1n wayland76: see PM
02:34 sjohnson anyone know the Perl way to make the uparrow key not write the ^[[A text, but instead, repeat what a <STDIN> is asking that you inputted before?
02:34 wayland76 P6 or P5?
02:35 skids there's probably a libreadline module for p5
02:36 meppuru good night
02:36 skids n8
02:36 meppuru ;)
02:37 wayland76 Term::Readline actually
02:37 sjohnson thanks
02:37 wayland76 And IIRC, it requires an implementation module, eg. Term::Readline::GNU
02:37 sjohnson wayland76: either one i was curiusa bout
02:38 sjohnson p5/p6
02:42 pmichaud sjohnson:  if you want to do a numeric sort, it's just
02:43 pmichaud @list.sort({ +$_ })
02:43 lambdabot Unknown command, try @list
02:43 pmichaud rakudo:  my @a = <12 2 45 03>;   say @a.sort({ +$_ })
02:43 p6eval rakudo 606252: OUTPUT«2031245␤»
02:43 pmichaud rakudo:  my @a = <12 2 45 03>;   say @a.sort({ +$_ }).perl;
02:43 p6eval rakudo 606252: OUTPUT«["2", "03", "12", "45"]␤»
02:43 xinming joined #perl6
02:43 pmichaud hmmm
02:44 pmichaud oh wait, that's right.  :-)
02:44 pmichaud rakudo:  my @a = <12 2 -45 03>;   say @a.sort({ +$_ }).perl;
02:44 p6eval rakudo 606252: OUTPUT«["-45", "2", "03", "12"]␤»
02:45 pmichaud rakudo:  my @a = <12 2 -45 03>;   say @a.sort({ .abs }).perl;
02:45 p6eval rakudo 606252: OUTPUT«["2", "03", "12", "-45"]␤»
02:45 azawawi joined #perl6
02:45 azawawi good morning
02:45 s1n good night :)
02:45 azawawi it is 5:45am here
02:45 pmichaud or yes, what TimToady had:    .sort(+*)
02:46 * pmichaud wonders if that works in rakudo
02:46 pmichaud rakudo:  my @a = <12 2 -45 03>;   say @a.sort( +* ).perl;
02:46 p6eval rakudo 606252: OUTPUT«Use of uninitialized value␤invoke() not implemented in class 'Float'␤in Main (/tmp/xSvHb1Xbdn:2)␤»
02:46 pmichaud guess not.
02:46 pmichaud I'm guessing we don't do prefix ops on Whatever yet.
02:46 azawawi std: 00o7;
02:46 p6eval std 26956: OUTPUT«##### PARSE FAILED #####␤Whitespace is required between alphanumeric tokens at /tmp/YiqfGtHYQQ line 1:␤------> [32m00[31mo7;[0m␤    expecting any of:␤    POST␤   postfix␤   postfix_prefix_meta_operator␤      standard stopper␤ terminator␤     whitespace␤Other potential
02:46 p6eval ..difficulties:␤  Leading 0 …
02:47 pmichaud azawawi: that 00 prefix is a killer.
02:47 azawawi std: 0123o7;
02:47 p6eval std 26956: OUTPUT«##### PARSE FAILED #####␤Whitespace is required between alphanumeric tokens at /tmp/AIvp33m4Lj line 1:␤------> [32m0123[31mo7;[0m␤    expecting any of:␤  POST␤   postfix␤   postfix_prefix_meta_operator␤      standard stopper␤ terminator␤     whitespace␤Other potential
02:47 p6eval ..difficulties:␤  Leading …
02:47 azawawi std: 01.23o7;
02:47 p6eval std 26956: OUTPUT«##### PARSE FAILED #####␤Whitespace is required between alphanumeric tokens at /tmp/TP5PpwyXQt line 1:␤------> [32m01.23[31mo7;[0m␤    expecting any of:␤ POST␤   postfix␤   postfix_prefix_meta_operator␤      standard stopper␤ terminator␤     whitespace␤FAILED 00:02 35m␤»
02:47 azawawi pmichaud: this is good
02:48 azawawi TimToady: thx for the bugfix
02:48 s1n azawawi: what kind of radix is that??
02:48 azawawi s1n: which one?
02:49 s1n 01.23o7
02:49 azawawi s1n: it is not valid; just was testing it...
02:49 s1n oh okay
02:50 * azawawi tests fakexecutables on the latest rakudo...
02:52 azawawi pmichaud: any update on fakexecutable support on rakudo? :)
02:53 pugs_svn r26957 | wayland++ | Actually named the components
02:56 wayland76 See?  I left out [S22] on the commit.  I'm a baaaaad boy!
02:57 ZuLuuuuuu joined #perl6
03:02 Scorp2us joined #perl6
03:03 Tene azawawi: are you blocking on that?
03:10 pmichaud azawawi: no, no update
03:16 wayland76 Does Perl 6 have a test module?  Ie. a Test::More equivalent?
03:17 obra_ Yes
03:17 obra_ wayland76: how much have you looked at the test suite?
03:18 wayland76 For Rakudo?  Not at all.  I'll look now.  Thanks :)
03:20 pmichaud note that "look at the test suite" should mean "check t/spec in pugs"
03:20 pmichaud rakudo's local test suite doesn't use Test.pm
03:20 pmichaud (except to test that it loads)
03:28 TimToady I'm thinking we should add: okay got(), &[eq], "expected", 'message'
03:29 TimToady or some variant thereof
03:29 justatheory joined #perl6
03:31 unitxt joined #perl6
03:36 azawawi pmichaud: yeah blocked a bit since Padre::Plugin::Perl6 has "Generate Perl 6 executable" and "Generate Perl 6 PIR" menu options.
03:36 azawawi pmichaud: but not a big deal :)
03:36 azawawi pmichaud: i just like to follow up stuff
03:39 alester joined #perl6
03:47 sjohnson TimToady: if you don't mind me asking, what is your secret to remembering the kanji?
03:50 wayland76 The USB ports under the hair at the back of his head
03:58 davidad joined #perl6
04:00 sjohnson heh
04:01 gabiruh w 15
04:01 gabiruh woops..
04:02 sjohnson heh
04:09 wayland76 Have we worked out where library files for Rakudo go?
04:09 wayland76 ie. Test.pm ?
04:15 wayland76 /usr/lib/perl6?
04:24 wayland76 pmichaud: ping (if so, see question above)
04:24 d4l3k_ joined #perl6
04:24 [particle]2 joined #perl6
04:27 jiing_ joined #perl6
04:35 pmichaud wayland76: we have not.  I'm waiting for us to be able to build against an installed Parrot before I worry too much about installed library files.
04:36 wayland76 Well, I can already build against an installed Parrot
04:36 wayland76 Rakudo RPM on top of Parrot RPM
04:37 pmichaud is that "installed parrot with the build tree not present"?
04:37 wayland76 pmichaud: See https://trac.parrot.org/parrot/ticket/712
04:37 pmichaud I did see the ticket.
04:37 wayland76 Well, "installed parrot with the build tree renamed to "foo"
04:38 wayland76 So I expect it couldn't find any of those files ?
04:38 sjohnson hows it going wayland
04:39 wayland76 pmichaud: hence my question about libraries :)
04:39 pmichaud wayland76: until that patch is accepted, I'm still in the situation that rakudo doesn't build against an installed parrot.
04:39 wayland76 sjohnson: hi :)
04:39 wayland76 pmichaud: Ok, I'll dump them in /usr/lib/perl6, and we can change it later
04:40 wayland76 So maybe just a warning that it's heading in your direction :)
04:40 pmichaud also, let me see how far we get with an installed parrot (with your patches)
04:42 pmichaud is there an easy way for me to get the patch out of Trac?
04:42 pmichaud nm, I found it.  "Original format" at bottom of page.
04:45 wayland76 Most of the patch is centred around getting Parrot to include extra files in the install, and the rest is centred around getting the RPM spec file to behave
04:46 pmichaud which extra files get installed?
04:47 pmichaud and more to the point, I'm curious how we get the dynops to load/run
04:47 pmichaud (when building/testing rakudo)
04:47 wayland76 With the -X option, maybe?
04:47 wayland76 oh, now that I think about it, maybe I didn't move the Rakudo build directory, just the Parrot one
04:48 wayland76 I'll check things out in a minute
04:48 pmichaud oh, I'm not concerned about the Rakudo build dir
04:48 pmichaud obviously we need Rakudo's build dir around when building Rakudo
04:48 wayland76 The extra files are llisted in MANIFEST.configure.generated
04:49 pmichaud so, how does the "perl6" fakecutable pass a -X option to parrot?
04:49 wayland76 ( llisted is in honour of the llama book)
04:50 wayland76 Not sure.  I just chucked some -X options into the makefile, and it works :).
04:50 pmichaud into Rakudo's makefile?
04:50 wayland76 Yes
04:50 pmichaud where's that patch?
04:50 wayland76 On RT
04:50 wayland76 I'll find the ticket #
04:50 wayland76 #66056
04:51 wayland76 http://rt.perl.org/rt3/Tic​ket/Display.html?id=66056
04:51 pmichaud I've already vetoed the use of recursive Makefiles.
04:52 pmichaud I don't want to have a build/src_Makefile.in or build/ops_Makefile.in
04:52 wayland76 Hmm.  A pity.  Allison wrote those, and I don't know what they do :)
04:53 pmichaud Yes, Allison and I disagree on that particular point.
04:53 pmichaud do we absolutely need --build-root ?
04:53 wayland76 I also noticed they're not attached to the patch.  My bad
04:54 wayland76 I think so.  RPM wants to build in a particular directory.
04:54 wayland76 But we can make the default whatever you think sensible
04:54 pmichaud does Parrot have that?
04:54 wayland76 I'll investigate...
04:56 wayland76 Oh, it gets passed to make install, instead of Configure.pl
04:56 wayland76 As DESTDIR
04:56 wayland76 is that what you'd prefer?
04:56 pmichaud I'd probably need to investigate a bit.
04:57 pmichaud if Parrot doesn't have a --build-dir option, I'm not sure that Rakudo needs one.
04:57 pmichaud OTOH, if most other packages use --build-dir, then perhaps Rakudo should have one.
04:57 wayland76 Well, if we're going to be changing that patch anyway, I could try to change it
04:57 pmichaud oh, the patch will change, yes.
04:57 pmichaud Let me see if I can first fix the dynops/dynpmc generation to not require the recursive makefiles, and check those into rakudo master
04:59 pmichaud could you tell me where to find the ops and pmc Makefile.in ?
05:00 wayland76 Just a moment, I'll post the files -- I thought they were in the patch, but obviously not
05:01 xinming_ joined #perl6
05:01 wayland76 No, it needs a whole new patch; there's other stuff missing too.  Let me beat git into submission for 10 minutes or so
05:02 pmichaud I just need to look at the files, I'm not going to apply them as a patch.
05:08 justatheory joined #perl6
05:08 frew|wor1 joined #perl6
05:13 wayland76 Bad news.  I just convinced git to delete them :(
05:14 wayland76 I still have some older versions around
05:14 pmichaud no problem, I think I'm able to get what I need from partcl's build system
05:14 pmichaud it looks as though it's putting the files into dynext
05:14 wayland76 Basically, I did a "git commit", and then a "git push"
05:15 pmichaud so I guess parrot is looking in dynext/ by default for dynops and dynpmcs
05:15 wayland76 whoops, commit, then revert, and it deleted the files, instead of putting them back like they were before the commit
05:15 pmichaud that works for me
05:15 wayland76 Yes, it's putting them in dynext
05:16 pmichaud that's different from what mk_language_shell is doing with its dynpmcs and dynops
05:16 eternaleye Anyone working on concurrency: An interesting resource-management model is linked to from the Wikipedia article on the dining philosophers' problem. Wikipedia has a clear, succinct description, but the actual paper is here: http://www.cs.utexas.edu/users/mis​ra/scannedPdf.dir/DrinkingPhil.pdf
05:16 eternaleye http://en.wikipedia.org/wiki/Din​ing_philosophers_problem#Chandy_.2F_Misra_solution\
05:17 eternaleye Ergh, that backslash shouldn't be there.
05:18 wayland76 pmichaud: Ok.
05:19 sjohnson hey wayland76 sorry to interrupt if you're busy right now
05:19 sjohnson but are you interested in learning any 2nd languages?
05:19 wayland76 sjohnson: Only Koine Greek and Hebrew
05:20 sjohnson hebrew, do you have a Jewish background?
05:20 wayland76 Although I did 4 years of French in high school, and would pick it up again if I were near French speakers
05:20 sjohnson or are you just curious about Palestine politics?
05:21 wayland76 No Jewish background that I know of, although my Dad had some German ancestors, and everyone who knows Jews says he looks like a Jew
05:21 wayland76 I'm interested in reading the Bible in the original, is my reason
05:22 sjohnson thanks for being honest
05:22 sjohnson is it called the Torah?
05:22 wayland76 But if I were to learn them (especially Hebrew, which is living, whereas Koine Greek is dead), I'd do it properly and learn to speak it
05:23 wayland76 The Old Testament part of the Bible is, IIRC, what Jews call the Torah
05:23 sjohnson is the TOrah what you spoke of?
05:23 sjohnson oh i c
05:23 sjohnson my uncle is into that too
05:23 sjohnson so i can understand
05:24 sjohnson although i think he's too lazy to read it in its original form
05:24 sjohnson mostly just reads translations of the Torah
05:24 wayland76 But accorrding to Wikipedia, it has various meanings
05:24 sjohnson i can definitely agree with what you are doing
05:25 sjohnson i myself, am learning Japanese so i can understand Anime it in its original form... hopefully this isn't a bad example
05:25 wayland76 Just for the record, the New Testament part of the Bible (which Jewishly-religious Jews don't accept) is written in Koine Greek, which is part way between Classical Greek and Modern Greek
05:26 wayland76 sjohnson: No, I understand that
05:26 wayland76 Often the original is better, although I'm told that's not always the case
05:26 wayland76 (In fact, I've seen that's not always the case)
05:27 sjohnson i can agree with that in my analogy
05:27 sjohnson i watched an anime that was translated by koreans that didnt know japanese, so they did a half-assed job, but they did a real good job making it more entertaining
05:28 sjohnson using more forceful language to enunciate the main points of the speech, which made it far more entertaining to watch
05:28 sjohnson even if it wasn't 100% accurate
05:28 wayland76 Like "Somebody set us up the bomb"? :)
05:28 sjohnson heh
05:28 sjohnson not that bad :)
05:28 sjohnson actually, now that you mention that
05:28 sjohnson they must have had a darn good english editor to edit the final subtitles
05:28 sjohnson cause it didn't contain any "engrish"
05:28 sjohnson but anyways..
05:31 sjohnson i consider my hobbies my religion as they give me great happiness and i enjoy life because of them
05:31 sjohnson i suppose this is enough motivation for me to learn japanese
05:32 sjohnson as well as programming (perl mostly), billiards, sleight of hand , etc
05:33 wayland76 pmichaud: Yay!  Thanks to RPM, I hadn't completely lost them :)
05:34 wayland76 sjohnson: I guess it depends what you consider the purpose of religion is
05:34 sjohnson well, there is knowing the meaning of life
05:34 sjohnson and there is also living a life of happiness with peace of mind
05:35 wayland76 sjohnson: This is off-topic -- I'll continue via /msg
05:35 sjohnson *oops*
05:35 sjohnson :)
05:36 ssm joined #perl6
05:37 wayland76 Well, I don't mind off-topic, but religion and politics traditionally have the potential for pointless flamewars and upsetting people, so... :)
05:41 sjohnson thus is true
05:41 sjohnson plus all this conversation appears on teh bl0gz
05:41 DanielC_ joined #perl6
05:42 wayland76 Oh, yes.  Maybe I should post my irrefutable proof that I'm right, and everyone else is wrong.  After people adjust to that, we'll have an era of universal cosmic peace and harmony :)
05:54 xinming joined #perl6
05:59 huma joined #perl6
05:59 cognominal joined #perl6
06:00 pugs_svn r26958 | azawawi++ | [S:H:P6] Version 0.58 removes old perl6.vim support
06:00 pugs_svn r26958 | azawawi++ | [S:H:P6] and bundles STD with the '00o7' leading zeros int radix fix. TimToady++
06:04 masak joined #perl6
06:05 masak hello, I'm new to Perl 6, but perhaps someone will have mercy on me and my n00b question.
06:05 masak I'd like to define a new keyword in my program. how do I do that?
06:07 unitxt joined #perl6
06:07 wayland76 It depends on the keyword.  :)
06:08 masak I actually have a concrete example. let's call the keyword 'supposing', for lack of a better (free) term.
06:09 masak say $area supposing ($length, $area) = 42, $length ** 2;
06:10 masak basically, a statement-postfix declarator (whose variables go out of scope immediately)
06:10 DemoFreak joined #perl6
06:10 masak please help me with this question. I've only started to learn Perl 6, and I don't know all the cool tricks yet.
06:12 pmichaud sleeptime here... be back in a few hrs
06:12 pmichaud then I'll work on rakudo build/install, and answer hackathon questions (if any)
06:13 masak I assume I'd have to derive a grammar from STD, no? and add some kind of statement_control rule. but how do I substitute in my new language variant to the running parser?
06:14 presh joined #perl6
06:15 masak hm, perhaps easiest to add to either statement_mod_cond or statement_mod_loop, though that feels a bit Wrong... bu the alternative is to modify the 'statement' token, and that's a bit daunting.
06:18 wayland76 masak: Just assign your grammar to $~MAIN, IIRC
06:19 masak wayland76: so, 'grammar MyPerlDialect is STD { ... }; $~MAIN = MyPerlDialect;' ?
06:21 wayland76 Something like that
06:22 wayland76 But I don't believe it works in the current Perl implementations yet :)
06:22 masak oh, I know that.
06:22 presh joined #perl6
06:22 masak I just want something extra awesome to end my talk with today.
06:22 masak I will have been showing them things that work for an hour at that point. :)
06:23 wayland76 Ok.  I hoping my message wasn't projected on the big screen right now :)
06:23 sjohnson heh
06:25 masak wayland76: no, I'm not that late with the slides. :)
06:26 masak a couple of hours left.
06:26 wayland76 Just remembering NPW
06:27 xinming_ joined #perl6
06:32 masak yeah. :)
06:37 wayland76 masak: I think $~MAIN is in the specs
06:37 masak wayland76: aye. S02.
06:37 masak but only the variable is mentioned, not exactly how to use it.
06:38 wayland76 I'm not sure what happens if you make that assignment in the middle of some existing code, though :)
06:39 masak bah, how else would I do it? :P
06:39 wayland76 for (1..100) { if( $_ == 57) { $~MAIN = MyPerlDialect; }
06:39 wayland76 Well, but that's at the top level
06:39 wayland76 cf. my example :)
06:40 masak ok, gotta go catch a train. see you later.
06:40 sjohnson see ya
06:43 wayland76 o/
06:43 iblechbot joined #perl6
06:52 LadyLunacy joined #perl6
06:59 ZuLuuuuuu in perl 6, can we use characters other than letters|under score in identifiers?
07:02 Khisanth you can use numbers :p
07:03 Khisanth but I believe you can use unicode chars too
07:03 wayland76 And -
07:04 Tene and '
07:04 Khisanth hmm but you can do that in perl5 too
07:04 Tene I assumed 'letters' included unicode.
07:05 ZuLuuuuuu I ment ascii letter characters by letters :)
07:05 Khisanth actually can't you just change the rule for identifier? :)
07:05 Matt-W Goood morning #perl6
07:05 Tene ZuLuuuuuu: you can use any letter in unicode, including ascii. :)
07:05 Matt-W Khisanth: you could, but you'd need to be careful it didn't break the ability to parse other things
07:05 Tene letter == alphabetic.
07:05 ZuLuuuuuu I see, then we can use any unicode characters in perl6 as identifier
07:06 Matt-W no, any unicode letters
07:06 Tene for example, my $☕  isn't a valid variable name.
07:06 Matt-W not any random unicode punctuation marks
07:06 Tene iirc
07:06 * Tene checks.
07:06 ZuLuuuuuu oh ok
07:06 Matt-W the most unusual thing is - being allowed
07:06 Matt-W we're starting to use that a lot, it seems to read better than _
07:07 ZuLuuuuuu yes actually, I saw identifiers with - in novembwer-wiki and that's why I asked the question :)
07:07 Tene ... huh.  apparently infinite loop when trying to use $☕
07:07 Matt-W Tene: Bug!!
07:07 Matt-W ZuLuuuuuu: yeah it's full of them :) I'm using them in Form.pm as well
07:08 Matt-W something about a method called fit-in-width() is much nicer than fit_in_width()
07:08 Matt-W easier to type on an english keyboard, too
07:08 ZuLuuuuuu in turkish keyboard too actually
07:08 ZuLuuuuuu we have to use shift+- to make _
07:08 ZuLuuuuuu but
07:08 ZuLuuuuuu in typogrophical point of view I guess _ is more readable than -
07:09 ZuLuuuuuu in provides more white space
07:09 ZuLuuuuuu *it
07:09 pochi joined #perl6
07:09 ZuLuuuuuu and feels more like a space
07:10 dakkar joined #perl6
07:11 Matt-W sometimes the hyphenation is good though
07:11 Matt-W like Form::TextFormatting::left-justify
07:11 Matt-W at least, it works in English :)
07:14 wayland76 rakudo: my $ασδφ = "hello"; my $a~~~ = "hi"; print $ασδφ
07:14 p6eval rakudo 606252: OUTPUT«No applicable methods.␤in Main (/tmp/c17arOeGjH:2)␤»
07:14 wayland76 ?
07:14 wayland76 rakudo: my $ασδφ = "hello"; print $ασδφ
07:14 p6eval rakudo 606252: OUTPUT«hello»
07:15 ZuLuuuuuu rakudo: my $ışıltı = "hello"; print $ışıltı
07:16 p6eval rakudo 606252: OUTPUT«hello»
07:16 ZuLuuuuuu impressive :)
07:16 sjohnson l33t speak
07:17 sjohnson rakudo:  my $蜘蛛 = "hi";  say $蜘蛛;
07:17 p6eval rakudo 606252: OUTPUT«hi␤»
07:25 DanielC moin
07:25 sjohnson hi
07:38 Matt-W hi
07:39 sjohnson mat!
07:39 sjohnson bbiab in 0 mins
07:39 sjohnson oops
07:39 sjohnson 30
07:39 ZuLuuuuuu we cannot assign hashes to a scalar variable in perl 6 nor in perl 5 right?
07:40 DanielC ZuLuuuuuu: Why would you want to?
07:40 DanielC ZuLuuuuuu: If you are really determined, you can use the binding operator :=
07:40 ZuLuuuuuu I don't want to :) I saw a code in perl 6 which I suspect assigns a hash to a scalar
07:41 DanielC Did it use := ?
07:41 ZuLuuuuuu my $stuff = eval( {"673364.989" => {"user_name" => "johan"}, "673766.5765" => {"user_name" => "johan"}} );
07:41 alexn_org joined #perl6
07:41 ZuLuuuuuu the code is this
07:41 alexn_org joined #perl6
07:42 ZuLuuuuuu it might be because of the lack of my knowledge of perl 5 rthat I think there is a hash assignment going on
07:42 Matt-W that puts the Hash object into $stuff
07:42 ZuLuuuuuu *rthat=that
07:42 Matt-W it's perfectly acceptable to do that
07:42 Matt-W it's a little bit like putting a reference to a hash in a scalar in Perl 5, but not quite.
07:42 ZuLuuuuuu this was not possible in perl 5 right?
07:42 frew|wor1 joined #perl6
07:42 Matt-W no in perl 5 you had to explicitly make it be a hash reference
07:42 ZuLuuuuuu ok thanks
07:42 DanielC You could already do that in Perl 5:  $a = { foo => "bar" }
07:42 Matt-W Perl 6 handles a lot of that more transparently
07:42 DanielC I always thought it was a reference.
07:43 Matt-W like $stuff{$key} will work
07:43 Matt-W rather than $stuff->{$key} as perl 5 requires
07:43 ZuLuuuuuu can we do $a = { foo => "bar" } in perl 5?
07:43 Matt-W yes
07:43 Matt-W { } there constructs an anonymous hash
07:43 Matt-W in fact, it does in perl 6 too, if there's a list of pairs inside it
07:44 DanielC Matt-W: Do you need the eval() line in Perl 6? What does the eval() accomplish?
07:44 fridim_ joined #perl6
07:44 DanielC I'm not generally a fan of evals.
07:44 Matt-W DanielC: compiles a string as if it was code
07:44 DanielC I know but...
07:44 Matt-W the eval is not necessary to make the hash
07:44 Matt-W it must be there for another reason
07:44 Matt-W or just experimentation
07:45 ZuLuuuuuu actually it was $string
07:45 ZuLuuuuuu I replaced it
07:45 DanielC ah
07:45 ZuLuuuuuu it is read from a file
07:45 Matt-W ah right
07:45 ZuLuuuuuu assign to $string
07:45 Matt-W that would explain it
07:45 DanielC that was the reason for the eval then.
07:45 Matt-W bit dangerous though
07:45 ZuLuuuuuu and then evaluated
07:45 DanielC Matt-W: Yeah, dangerous, that's why I don't like eval.
07:45 ZuLuuuuuu yes it is noted in the readme that it is a temporary solution and changed later
07:46 DanielC Matt-W: Is $a = { foo => "bar" } the same as $a = eval( {foo => "bar"} )  ?
07:46 ZuLuuuuuu it currently is the method of november-wiki to keep data in files
07:47 Matt-W DanielC: no
07:47 payload joined #perl6
07:47 Matt-W DanielC: in the second one, you're passing to eval a block containing one pair, so $a would then have the pair foo => "bar" in it
07:47 Matt-W because eval works with blocks as well as strings
07:48 Matt-W and in that form serves as part of the exception-handling mechanism
07:48 DanielC ah... so in the latter case the { } is not an anonymous hash but a block...
07:48 Matt-W yes
07:48 Matt-W well it should be
07:48 TimToady eval makes no sense on a hash
07:48 Matt-W it's possible the compiler might think it's a hash, but I would hope it doesn't :)
07:48 TimToady why would you hope that?
07:48 Matt-W Because eval makes no sense on a hash
07:49 DanielC Matt-W: How would you call the item foo in each case?
07:49 TimToady yes, well, that's a hash, not a block...
07:49 Matt-W So if I give eval something in { } I hope it thinks it's a block :)
07:49 Matt-W but it does look an awful lot like a hash in that case, yes
07:49 TimToady {} has no clue that it's in an eval
07:49 TimToady eval is not a macro
07:49 Matt-W and it's got a pair in it, so is the rule that it's a hash?
07:50 TimToady it only knows what to do with strings
07:50 TimToady yes
07:50 Matt-W oh! Did eval BLOCK go away in perl 6?
07:50 TimToady there's no eval-block in p6
07:50 TimToady try block instead
07:50 Matt-W DanielC: please listen to TimToady instead of me
07:50 Matt-W aaah
07:50 DanielC TimToady: So the two versions are actually equivalent? $a = { foo => "bar" } and $a = eval( {foo => "bar"} ) ?
07:51 TimToady the second one MAKES NO SENSE!!!
07:51 Matt-W what would eval do with a hash?
07:51 agentzh joined #perl6
07:51 DanielC I dunno, that was going to be my next question.
07:51 Matt-W rakudo: $a = eval({foo => "bar"}); say $a.perl;
07:51 p6eval rakudo 606252: OUTPUT«Symbol '$a' not predeclared in <anonymous> (/tmp/upkPcIuTRr:2)␤in Main (src/gen_setting.pm:3166)␤»
07:51 DanielC I'm not the one who posted that idea initially.
07:51 Matt-W rakudo: my $a = eval({foo => "bar"}); say $a.perl;
07:51 p6eval rakudo 606252: OUTPUT«Parameter type check failed on call to 'eval'.␤in Main (/tmp/c0Ui0hoyhF:2)␤»
07:52 TimToady if it did anything with it, it would coerce it to a string and try to eval that
07:52 TimToady which would be a syntax error
07:52 agentzh joined #perl6
07:53 TimToady or at least "no such routine as foo or bar"
07:53 DanielC Syntax error then.
07:53 Matt-W Rakudo appears to have eval prototyped to only take a string
07:53 TimToady but as you see rakudo doesn't even get that far
07:54 DanielC That's what I would have thought if I had seen that in code. I was surprised when ZuLuuuuuu posted that here. Hence my question.
07:54 TimToady and just as well, to prevent people from trying the block form
07:54 ZuLuuuuuu another question: if "$myHash = %aHash" assigns the "%aHash" Hash object to "$myHash" then what does "%myHash = %aHash" do?
07:55 agentzh joined #perl6
07:55 agentzh joined #perl6
07:55 TimToady evaluates %aHash in list context, which pulls out a list of pairs, and assigns those to %myHash, which builds a new hash of the pairs
07:56 TimToady much like in p5, except what flows are pairs rather than alternating keys and values
07:56 ZuLuuuuuu hmmm thanks
07:57 Matt-W TimToady: the first one doesn't copy the hash, correct?
07:57 TimToady correct
07:57 TimToady %ahash in item context is just itself as an object
07:57 DanielC What is a flow? I assume it's the thing hashes use internally. I always thought that hashes were more reasonably thought of as pairs rather than alternating keys and values.
07:57 Matt-W righty-ho
07:57 agentzh joined #perl6
07:58 TimToady flow is not a technical term
07:58 TimToady I was just talking about the values passing from the rhs to the lhs
07:58 DanielC ah
07:58 agentzh joined #perl6
08:00 agentzh joined #perl6
08:00 TimToady zzz &
08:00 agentzh joined #perl6
08:05 agentzh joined #perl6
08:08 eMaX joined #perl6
08:11 DanielC Anyone know who Sam Vilain is? Mark Overmeer has mentioned him a couple of times, saying "I talked to Sam Vilain".
08:12 donaldh joined #perl6
08:15 BinGOs Goes by the nickname mugwump
08:17 DanielC thanks
08:41 renormalist joined #perl6
08:44 renormalist joined #perl6
08:45 payload left #perl6
08:47 renormalist joined #perl6
08:48 DanielC lichtkind: ping?
08:50 DanielC @tell lichtkind  Looks like there is already an English version of the page you gave me: http://www.perlfoundation.org​/perl6/index.cgi?perl_tablets
08:50 lambdabot Consider it noted.
08:57 renormalist joined #perl6
09:00 zamolxes joined #perl6
09:10 renormalist joined #perl6
09:11 renormalist joined #perl6
09:13 renormalist joined #perl6
09:16 cognominal joined #perl6
09:20 renormalist joined #perl6
09:21 payload joined #perl6
09:23 renormalist joined #perl6
09:26 xinming joined #perl6
09:31 renormalist joined #perl6
09:32 DanielC Has anyone here read Mark Overmeer's papers?
09:42 wayland76 Not I.  I think I skimmed one once
09:43 wayland76 From what I could see, he's more interested in replacing CPAN-the-server
09:43 wayland76 Whereas I'm more interested in replacing CPAN-the-package-manager
09:45 DanielC ok
09:45 wayland76 But like I said, I haven't looked over it carefully
09:45 DanielC I'm thinking more about the package manager.
09:45 DanielC So I guess that in a conversation with Mark O. we are not likely to be on the same wavelength.
09:46 DanielC wayland76: About the package manager, do you think that the issue with multiple versions, authors, etc is solvable? I'm not an expert on RPM or DEB...
09:47 renormalist DanielC: why not? Mark is quite adaptive and open minded guy, imho. And he is for sure interested ni other aspects of the CPAN than he currently works on.
09:47 wayland76 Well, to a certain extent with RPM, which is the one I know about.  Did you see my recent mailing list post?
09:47 DanielC renormalist: Ok. You know him better than I do. I'll assume you are right.
09:48 wayland76 DanielC: Well, I think Mark O.'s stuff and our stuff could be made to work together, and will need to be
09:48 DanielC wayland76: About multiple kernel versions?
09:48 wayland76 That's the one
09:48 DanielC I replied.
09:48 renormalist DanielC: I just know him from some conferences and it was always fun to talk to him, so I can just recommend him. :-)
09:48 wayland76 Ok, I'm still backlogging after an hour away
09:49 wayland76 I think Mark O's stuff has lots of good ideas in it, and most of it doesn't explicitly contradict the stuff we want to do
09:49 DanielC renormalist: Ok. I haven't met him (or anyone here). To me he is just a bunch of little characters that appear in my inbox every once in a while.
09:49 wayland76 Except maybe for what obra_ wants us to do (ie. use existing infrastructure)
09:50 wayland76 And that's a discussion I'd prefer to leave to Mark and obra_ :)
09:50 DanielC I can't comment on Mark O's stuff because I'm not familiar with it.
09:50 DanielC His papers look quite long.
09:50 wayland76 (if obra_ is getting pinged, we're talking about http://www.cpan6.org/ and the papers already listed there)
09:51 DanielC Too bad I'll miss YAPC. August is generally a great month for me to go to a conference. But I'll be on my honey moon and my wife will kill me if I take her to a Perl conference for our honey moon :)
09:53 wayland76 If I look at the table of contents, it looks like Mark O wants to make the server software do trust and security and things like that
09:53 DanielC y
09:53 wayland76 There's no conflict with what I want to do.
09:53 wayland76 As long as he's open to what package-based systems need
09:54 wayland76 Incidentally, this Software::Packager thing that I want to port from Perl 5 would not be CPAN-specific
09:54 wayland76 It would be a component that 6PAN-fetcher would be able to call upon to do packaging stuff for it
09:54 wayland76 But if other software wanted to do packaging stuff with it too, that should work as well
09:54 DanielC I'm sure that Software::Packager would be useful to a lot of people besides CPAN developers.
09:55 wayland76 And I want to keep it that way :)
09:55 DanielC y
09:55 ZuLuuuuuu joined #perl6
09:55 DanielC o/   ZuLuuuuuu
09:56 ZuLuuuuuu hi
09:57 xinming_ joined #perl6
09:58 DanielC wayland76: AFAIK the way RPM and DEB allow multiple versions of the same software is by making entirely different packages. Like, one package might be called "perl5" and have version 5.8.0 and a different package might be called "perl6" and have version 6.0.1.
09:59 DanielC wayland76: But as far as RPM/DEB is concerned "perl5" and "perl6" are unrelated packages.
09:59 DanielC wayland76: If you wanted multiple versions of the same module installed, you would have to do something like that.
10:00 wayland76 I've seen Debian do that
10:00 wayland76 And RPM sometimes chooses to do that, but it's not necessary
10:00 wayland76 Let me give the kernel example
10:01 wayland76 kernel-2.6.27.5-117.local.fc10.i686
10:01 wayland76 package = kernel
10:01 wayland76 version = 2.6.27.5
10:01 wayland76 release = 117-local
10:01 wayland76 distro = fc10
10:02 wayland76 arch = i686
10:02 Jedai joined #perl6
10:02 wayland76 (I'm not 100% sure about "distro" there)
10:02 DanielC k
10:02 wayland76 The -local on the release is because I built my own kernel
10:03 wayland76 I'm trying to get xorg recent versions to work with multiple display cards, but it's broken, and needs a kernel patch to make it not work differently :)
10:03 DanielC Anyways, the package is called "kernel" but somehow RPM lets you have multiple versions installed...
10:03 wayland76 exactly
10:03 DanielC hm
10:04 wayland76 If you do rpm -i then it installs multiple
10:04 DanielC Maybe I'm wrong about RPM/DEB
10:04 wayland76 but if you do rpm -U then it upgrades
10:04 DanielC I see.
10:04 wayland76 However, I believe that the RPM has to be built in a special way to allow for multiples
10:04 wayland76 ie. not have files that try to go in the same place
10:05 mberends joined #perl6
10:05 wayland76 but we'd have to worry about that stuff anyway
10:06 DanielC "dpkg -i" => "If another version of the same package was installed before the new installation, execute prerm script of the old package"
10:06 DanielC I don't know what the "prerm" script is.
10:06 DanielC prerm => pre-remove
10:07 DanielC Ok, so "dpkg -i" does not actually remove the previously installed files, but it does run the "pre-remove" script of the earlier version.
10:07 wayland76 Let me check...
10:08 DanielC In contrast: dpkg -r (remove) =>  (1) Run prerm (2) Remove installed files (3) Run postrm script.
10:13 wayland76 Hmm.  That doesn't seem to allow for it, does it
10:14 DanielC dunno
10:14 wayland76 You'll notice that -i does the postrm script too
10:14 * DanielC checks again
10:14 wayland76 That's definitely an upgrade, instead of an install
10:14 DanielC that's dpkg we are talking about, right?
10:14 wayland76 (step 5 in my man page)
10:14 wayland76 man dpkg
10:15 wayland76 cat /etc/debian-version says 3.1
10:15 wayland76 It's a machine I have access to, but not mine
10:15 DanielC Yes, dpkg -i does look like an upgrade to me.
10:15 DanielC I might be wrong...
10:16 DanielC In any case, we should consider the possibility of some package manager FOO that does not support multiple versions of the same software installed.
10:16 DanielC So we need at least a backup solution for FOO-type packages.
10:16 DanielC s/packages/package managers/
10:17 wayland76 Well, Yes, I agree.  User choice = good
10:17 icwiener joined #perl6
10:18 wayland76 I want to be able to install things inside the packaging system, but want to allow for others who might need to install things outside the packaging system
10:18 wayland76 But since the usual case will be inside, I think that should be the default
10:18 DanielC Yes. Even if everyone agrees that using the package manager is better, some times it may simply not be possible (the PM doesn't support the right features)
10:19 DanielC Oh! Here is another thought: CPAN must be able to install modules in our home directory (non-root).
10:19 dakkar and in application-specific directories, maybe
10:19 DanielC We can't require people to be root to be able to install a module. That's something PHP would do :)
10:19 dakkar (that's what I do)
10:20 wayland76 Yes
10:20 wayland76 I've long advocated the use of /home/username/local/*
10:20 wayland76 ie. /home/username/local/bin and /home/username/local/lib
10:20 wayland76 except maybe it should be .local
10:20 DanielC I currently use ~/.local
10:21 dakkar which means, one of the "destinations" should be a directory or a tarball, in addition to a system package or invocation of the system package manager
10:21 tulcod joined #perl6
10:21 wayland76 I think that there should be an install script in each
10:21 cognominal joined #perl6
10:21 wayland76 Package managers know what to do with an install script
10:22 wayland76 And if we run it outside the pm, then we can tell the install script where to put it
10:22 wayland76 The "where to put it" issue and the "package manager or otherwise" issue are separate issues, but both essential
10:23 pmurias joined #perl6
10:25 DanielC wayland76: They may not be all separate, if the package manager has poor support for changing the install path. Do all package managers support this feature?
10:26 wayland76 Well, I don't know, but I'm not sure I've communicated clearly, so let me try again
10:26 wayland76 I'll give examples from RPM, and we'll see what we get
10:26 wayland76 RPM has a "build script" and an install script
10:27 wayland76 Ideally, the build script would do ./configure && make
10:27 wayland76 and the install script would do make install DESTDIR=$RPM_BUILD_ROOT
10:27 wayland76 Often there are some other things that need to go into these scripts, but that's the ideal case
10:28 masak joined #perl6
10:28 wayland76 Then, say $RPM_BUILD_ROOT points at ~/src/rpm/BUILD/package-version/   ...
10:28 * masak is at the Stockhom hackathon
10:28 masak pmichaud: oh hai.
10:28 masak I'll try to shove people in here as much as I can.
10:28 wayland76 It will install everything in there as though it were the root directory
10:28 hanekomu joined #perl6
10:29 mberends masak: happy hackathon!
10:29 wayland76 Afterwards, RPM zips up that directory, and when you install the RPM, it puts the files in / instead
10:29 wayland76 So the question is not whether the package manager supports it, but whether "make install" supports it
10:30 wayland76 and since we'll be creating the "make install" ourselves, we can *make* it do it
10:30 masak mberends: thank you! I just finished a one-hour presentation of Most of Perl 6.
10:30 wayland76 Welcome visitors! :)  Take us to your leader! (Oh, wait...) :)
10:31 wayland76 That title must be an exaggeration for a 1-hour talk :)
10:31 perlmongo joined #perl6
10:31 mberends masak++ # incredible content compression
10:32 DanielC wayland76: Ok... but the user doesn't do all this compilation, it is the packager (ie. us). Right? So RPM still needs to allow the end-user to put the files in a place other than were we said.
10:32 masak mberends: I talked fast, and I skipped details. :P
10:32 wayland76 Hail perlmongo!
10:32 perlmongo hail !  :-)
10:33 wayland76 DanielC: The thing I want working at the start is that the user downloads, builds the package, and installs
10:33 DanielC masak: Is this a Perl hackathon?
10:33 wayland76 Other stuff is good, but can come later
10:33 DanielC wayland76: Ok. So the end-user is the one who makes the package.
10:34 wayland76 At least initially, but with other stuff planned
10:34 DanielC wayland76: With that setup, I'm sure that any package manager will work.
10:34 wayland76 That also give them The Power!
10:34 DanielC A package manager obviously has to allow the packager to say where to put the files!
10:34 wayland76 RPM can also put things in a different folder, I believe, although I've never tried that
10:34 mickej joined #perl6
10:35 wayland76 RPM uses variables like %{_libdir} which translate to eg. /usr/lib
10:35 wayland76 But could be made to point elsewhere if someone so desired
10:35 viklund joined #perl6
10:35 wayland76 For example, say a sysadmin decided that all official Fedora packages belong in /usr/* whereas all other packages belong in /opt/*
10:36 wayland76 Hail mickej and viklund!
10:36 DanielC wayland76: Oh... but this means that the user needs to have the tool chain for making packages with his package manager... IIRC you can't just use "dpkg" to make DEBs. You need other programs.
10:37 wayland76 DanielC: Initially, yes, but not later on.  But...
10:37 DanielC If you are root that's not a problem, but if you are not root...
10:37 wayland76 ...then you have the same problem Perl 5 has :)
10:38 wayland76 And may want to build *outside* the package manager
10:38 wayland76 That's one good reason we allow that option :)
10:38 DanielC Yeah.
10:38 DanielC yeah
10:38 wayland76 But even if you want a server with no toolchain installed...
10:38 wayland76 You build everything on your dev box
10:39 masak DanielC: it's more or less a Perl 6 hackathon. many people here are Perlers, curious about Perl 6.
10:39 wayland76 Then take the packages you just built, transfer them to the dev box, and go rpm -Uvh *
10:39 DanielC masak: Cool
10:39 masak DanielC: I know! :)
10:39 wayland76 masak: So should we greet everyone who joins the channel? :)
10:40 DanielC Maybe we can get lambdabot to greet everyone.
10:40 masak wayland76: sure, go ahead.
10:40 wayland76 (incidentally, for new people, Daniel and I are discussing how CPAN could be better under Perl 6)
10:40 wayland76 lambdabot: @help
10:40 lambdabot help <command>. Ask for help for <command>. Try 'list' for all commands
10:40 wayland76 lambdabot: @list
10:40 lambdabot http://code.haskell.org/lambdabot/COMMANDS
10:43 Matt-W masak: now give the same presentation in Esperanto
10:44 Matt-W masak: next week, you'll be flown to Hawaii to present it in Lojban
10:44 masak Matt-W: sounds fantastic. :)
10:45 mberends Matt-W: could you transpose the presentation to C Sharp Major?
10:47 Matt-W mberends: only if it was sung - and in a major key
10:47 wayland76 mberends: For oboe?  That would be cruel
10:47 Matt-W wayland76: it would be cruel for just about anything
10:47 Matt-W except harp
10:47 Matt-W because you just set your harp to C# major and play :)
10:47 wayland76 ...or piano :)
10:48 wayland76 Or if you have a full set of harmonics or tin whistles
10:48 * Matt-W is sort of considering getting a harp
10:50 wayland76 I have a Guitarolin
10:51 wayland76 (Don't bother Googling, you won't find it :) )
10:52 wayland76 (Or rather, you'll find something, but it won't be what I have)
11:07 Muixirt joined #perl6
11:07 masak Matt-W: I think giving the presentation in Esperanto wouldn't pose much of a problem. I'd have to improvise with technical Perl terms, because I haven't tried talking about Perl in Eo before.
11:08 masak "Per la kv-metodo vi ricevas liston de paroj el via haŝ-objekto..."
11:08 ejs joined #perl6
11:10 viklund joined #perl6
11:11 viklund joined #perl6
11:20 donaldh joined #perl6
11:24 wayland76 I once saw Damian's Perl in Latin talk
11:24 masak pmichaud: do you recall what blocked the effort to assimilate November's Test.pm into Rakudo's?
11:24 wayland76 And some guy asked him why he used Latin instead of Esperanto :)
11:25 masak wayland76: I'm not sure it's an either-or thing. :)
11:25 wayland76 Well, but did you see Damian's Perl-in-Latin module?
11:26 wayland76 He replaced sigils with Latin case-endings
11:26 masak I saw it.
11:26 masak it's insanely... insane.
11:26 wayland76 Ok, just making sure :).  Anyway, Damians excuse was that his Latin was poor, but his Esperanto was non-existant
11:28 perlmongo I once saw Damians talk about Klingon arithmetic i perl.
11:28 masak ooh, Klingon arithmetic!
11:29 masak perlmongo: is there a CPAN module?
11:30 jnthn ...this channels range of topics always makes it a curiosity to wander in to...
11:30 jnthn hi all :-)
11:30 masak "...intellectual omnivores..."
11:31 masak jnthn: ahoj!
11:31 jnthn masak: ahoj! ako sa mas?
11:31 masak jnthn: dobre, dobre. a ty?
11:31 jnthn masak: Mam sa dobre. Isiel som do krcmy vcera vecer. ;-)
11:32 DanielC perlmongo: Heh I saw that talk many moons ago. IIRC you had to use the word "kill" in most statements.
11:32 masak jnthn: Vím. Ty sa uvádza, že včera.
11:33 jnthn .oO( did that come from Google Translate )
11:33 masak aye. :)
11:33 pugs_svn r26959 | wayland++ | [S22] Updated bad terminology that I created yesterday to the better
11:33 pugs_svn r26959 | wayland++ | terminology that Mark Overmeer created ages ago.
11:33 masak I had to fall back to it. ENOTENOUGHSLOVAK.
11:35 masak jnthn: was the krcmy enjoyable?
11:37 jnthn (krcma nominative) Yes, it was. :-)
11:37 jnthn Was warm enough to sit outside.
11:37 payload joined #perl6
11:39 masak ah. krcma.
11:39 masak jnthn: so, what's a krcma? :)
11:40 jnthn masak: pub
11:40 perlmongo DanielC: yes, and a lot of variations of number of enemies I a) am going to kill, and b) have already killed
11:40 perlmongo masak: Dunno
11:40 masak jnthn: ah. I guess I could have caught that from the context.
11:40 jnthn Note that actually it's krčma
11:40 masak ok.
11:40 jnthn If I coulda been bothered to type the character with the mark.
11:41 jnthn (Most people I converse with online in Slovak don't bother to type them...)
11:41 masak jnthn: well, it's easier for them. they have built-in hat-compensation software in their brains. :)
11:42 jnthn masak: Actually, I've found it easier than I would have expected to learn to cope without them.
11:44 pmichaud good morning #perl6
11:44 masak pmichaud: morning, pm.
11:45 jnthn morning, pmichaud
11:45 viklund masak: The druid prompt confuses me, It says "Vertical:" and a block with h:s appears on the board
11:46 masak viklund: o_O
11:46 viklund (when I put in coordinates)
11:46 masak viklund: I was not aware of that. :/
11:47 pmichaud masak: (november's Test.pm)  -- last I recall, I was in favor of adopting november's Test.pm into rakudo
11:48 jbt joined #perl6
11:49 masak pmichaud: I could make it easier for you by preparing a patch for review.
11:50 amoc joined #perl6
11:53 pmichaud masak: I think I was in favor of that also :-)
11:53 pmichaud (that is, of me having a patch for review)
11:56 masak pmichaud: :) I forget. I'll do it now.
11:56 masak http://masak.org/carl/stockholm.pm/perl6.pdf # my hackathon talk
11:56 pmichaud well, I wasn't necessarily requiring _you_ to be the one to generate the patch for review
11:56 pmichaud sounds like a useful hackathon project for someone, though :-)
11:56 muixirt2 joined #perl6
11:57 masak I'm motivated enough to do it myself, but people are invited to steal the task from me. :)
11:59 krakan joined #perl6
12:01 xinming joined #perl6
12:05 viklund masak: proto didn't compile Druid :(...
12:05 pugs_svn r26960 | pmurias++ | [re-smop] add_methods are added to the punned class using add_method
12:05 pugs_svn r26961 | pmurias++ | [re-mildew] removed incorrectly set $?BLOCK and $?ROUTINE
12:05 pugs_svn r26962 | pmurias++ | [re-smop] added PRIMITIVES::get_interpreter
12:05 pugs_svn r26963 | pmurias++ | [re-smop] added interpreter.FETCH
12:05 pugs_svn r26964 | pmurias++ | Revert "[re-mildew] removed incorrectly set $?BLOCK and $?ROUTINE"
12:05 pugs_svn r26964 | pmurias++ |
12:05 pugs_svn r26964 | pmurias++ | This reverts commit b0bcfc9e2f524fbdd317bf57771736f5bd5f2eeb.
12:05 pugs_svn r26965 | pmurias++ | [re-smop][re-mildew]
12:05 pugs_svn r26965 | pmurias++ | added an Exception role it is now used in t/throw_inside_catch.t
12:05 pugs_svn r26965 | pmurias++ | removed OutOfItemsException
12:05 masak viklund: I can't either at present. :(
12:06 masak viklund: failing inexplicably at compiling Druid::Webapp.
12:06 pmichaud I'm seeing epic spectest fail when attempting to run Rakudo against the Parrot trunk.  (http://gist.github.com/119917)
12:08 pmichaud bbiab
12:09 pmurias masak: why do people always define the factorial as an operator overloading example?
12:09 lambdabot pmurias: You have 1 new message. '/msg lambdabot @messages' to read it.
12:10 masak pmurias: because it's very tempting to see new syntax being added to a program.
12:11 payload joined #perl6
12:12 pmurias masak: what i asked is why is factorial choosen, not why operator overloading showed off
12:13 pmurias s/choosen/choosed/
12:13 masak s/choosed/chosen/ :)
12:13 masak pmurias: I don't know. factorial shows off both op overloading and metaoperators, so it's nice that way.
12:14 wayland76 And it's very short :)
12:14 wayland76 And hasn't been built-in, like a lot of the other familiar ones
12:20 daemon joined #perl6
12:21 masak wayland76: it's almost as if we're holding back incorporating it so that we can use it as a nice example :)
12:21 pmichaud I'm sure if someone came up with another example, it would be used :-)
12:22 masak viklund: can you build Druid?
12:22 masak (I can't.)
12:23 wayland76 I was originally going to do Tree as a bunch of custom operators, but I've decided I need a custom-quoted language
12:23 wayland76 Can Rakudo do custom quotes?
12:23 pmichaud not yet.
12:23 masak pmichaud: in the error "Can't find ./Module in @INC" -- shouldn't that be @*INC?
12:23 wayland76 ok
12:23 wayland76 Is that after LTM?
12:24 pmichaud wayland76: Yes.
12:24 pmichaud masak: Probably.
12:24 wayland76 That's what I thought :)
12:24 wayland76 pmichaud: While we're on Masak's topic, could we get @INC printed in that message?
12:24 pmichaud wayland76: patches welcome.  :-)
12:25 pmichaud wayland76: short of that, file a ticket :-)
12:25 wayland76 Or does that need Parrot_print_path_str?
12:25 pmichaud @INC is just an Array
12:25 lambdabot Unknown command, try @list
12:25 viklund masak: Yes I can build, and after the build the Vertical/Horizontal worked??
12:25 masak pmichaud: I'll change to @*INC, and might come back to printing it too.
12:25 masak viklund: o_O
12:25 wayland76 masak++ :)
12:27 wayland76 btw, pmichaud, I managed to get those git-deleted files back, if you ever decide you need them.  I'll try to get another more useful patch attached to that ticket, with the expectation that I'll have to modify it because of the makefile stuff, but to let people look at the other bits
12:32 ZuLuuuuuu joined #perl6
12:32 literal masak: we should do some more thinking on the filesystem layout of the docs soon
12:33 viklund masak: I believe you haven't added web's lib to PERL6LIB when you compile druid
12:33 pmichaud jnthn: ping
12:34 pmurias perl6: my $foo = fail "xyz";$foo.can("foo");
12:34 p6eval rakudo 606252: OUTPUT«Can't return outside a routine␤in Main (/tmp/G6uxxubqbw:2)␤»
12:34 p6eval ..elf 26965: OUTPUT«Permission denied at ./elf_h line 324.␤»
12:34 p6eval ..pugs: OUTPUT«*** Cannot use this control structure outside a 'routine' structure␤    at /tmp/3tJjZE4wrB line 1, column 6-21␤»
12:34 pmurias perl6: say "alive";
12:34 p6eval elf 26965, pugs, rakudo 606252: OUTPUT«alive␤»
12:34 pmurias perl6: my $foo = fail "xyz";$foo.foo;
12:35 p6eval rakudo 606252: OUTPUT«Can't return outside a routine␤in Main (/tmp/9Om9WZXmpS:2)␤»
12:35 p6eval ..elf 26965: OUTPUT«Undefined subroutine &GLOBAL::fail called at (eval 125) line 3.␤ at ./elf_h line 5881␤»
12:35 p6eval ..pugs: OUTPUT«*** Cannot use this control structure outside a 'routine' structure␤    at /tmp/x0OPdh6WEJ line 1, column 6-21␤»
12:36 sri_kraih joined #perl6
12:36 jnthn pmichaud: pong
12:36 meppl joined #perl6
12:36 pmichaud is there a switch to turn on the backtraces in Rakudo?
12:36 jnthn "turn on"?
12:37 pmichaud the failures I'm seeing are occurring inside the builtins, and iwbn to be able to see the parrot backtrace
12:37 jnthn pmichaud: No, didn't get a command line option in for that yet.
12:37 pmichaud how about a global flag?
12:37 pmichaud as opposed to command-line option?
12:37 jnthn pmichaud: It's just a case of not pushing the error handler though.
12:37 jnthn We could have a global flag for it too.
12:37 jnthn Though that needs a re-compile.
12:38 jnthn I'd fine a command line option useful.
12:38 pmichaud okay.
12:38 jnthn *find
12:38 jnthn Feel free to do a global flag for now though.
12:38 jnthn If you just want a quick fix.
12:38 jnthn Or quicker, temporarily comment out the push_eh :-)
12:38 pmichaud that's a bit more of a pain than I want... yes, comment out sounds good.
12:39 pmichaud I wasn't planning to spend the day debugging parrot issues :-(
12:39 jnthn oh, latest Parrot breaks stuff for us?
12:39 pmichaud epicly.
12:39 jnthn shit.
12:39 pmichaud well, maybe just a minor miniseries instead of an epic
12:39 pmichaud http://gist.github.com/119917
12:40 pmichaud still, not fun.
12:42 jnthn Yeah, of those only slice and indirect_notation are known.
12:42 pmichaud after building on latest parrot, the following fails
12:42 pmichaud my $x = 1 + 0i;  say $x - $x;
12:43 pmichaud uh oh
12:43 pmichaud I think I know what broke.
12:44 jnthn pmichaud: I've been working against 39176 and that one didn't have those issues.
12:44 jnthn fwiw
12:44 pmichaud yes, that's a huge help.
12:44 pmichaud thanks.
12:45 jnthn My suspicions are some of the MMD related changes.
12:45 iblechbot joined #perl6
12:45 pmichaud actually, it appears to be a namespace related change
12:45 jnthn oh.
12:45 dalek rakudo: 77b920a | masak++ | src/builtins/eval.pir:
12:45 dalek rakudo: [src/builtins/eval.pir] s/@INC/@*INC/
12:45 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​7b920ac2891d23bf7dd8c2530c137a8f659ecee
12:47 pmichaud okay, I have an easy example.
12:47 pmichaud http://gist.github.com/119933
12:47 pmichaud now it's time to start bisecting.
12:48 DanielC Question: Does Larry Wall work on Rakudo or just the Perl 6 spec?
12:49 pmichaud DanielC: mainly on STD.pm and the spec
12:49 DanielC What is STD.pm ?
12:49 pmichaud the "official" grammar
12:49 masak pmichaud: if people want to know what features work in Rakudo today, what file or URL do I send them to?
12:49 pmichaud masak:   rakudo.org/status, I think
12:49 jnthn oops, forgot to eat and now all light-headed.
12:49 * jnthn -> lunch
12:50 DanielC pmichaud: Is that used by most Perl 6 implementations?
12:50 pmichaud rakudo.org/status probably needs an update
12:50 pmichaud DanielC: for Rakudo and Pugs, no.
12:50 pmichaud I think elf uses it.  I'm not sure about smop.
12:50 DanielC k
12:52 JDlugosz_ joined #perl6
12:52 finanalyst joined #perl6
12:52 FurnaceBoy joined #perl6
13:02 mizioumt joined #perl6
13:02 alester joined #perl6
13:16 DanielC Jesus! I'm running a benchmark with Rakudo and it is sucking up 67% of my machine's memory and 40% of my CPU time.
13:16 DanielC My computer is half frozen...
13:17 pmurias DanielC: smop uses STD
13:17 drbean joined #perl6
13:18 DanielC String handling is really inefficient in Rakudo (substr).
13:18 Matt-W Most things are really inefficient in Rakudo at the moment
13:19 * DanielC nods
13:21 Chillance joined #perl6
13:30 perlmongo left #perl6
13:31 * jnthn back...and wondering why the hail storm started while he was walking back rather than a couple of minutes later...
13:32 cmarcelo joined #perl6
13:39 DanielC Is this correct Perl 6:  while ($line = $*IN) { do_something($line); }   ?
13:40 masak DanielC: no.
13:40 DanielC :-(
13:40 masak DanielC: you assign $*IN, a filehandle, to $line.
13:40 DanielC What is the right way to do what I mean?
13:41 masak DanielC: for $*IN.lines -> $line { do-something($line) }
13:42 DanielC So, if I write: for $*IN.lines { break if cond($_) }  for $*IN.lines { do_something($_) }   will that do what I think it does?
13:42 abra joined #perl6
13:43 DanielC (ie. skip lines of input until a condition is met and then do something with the following lines)
13:43 PerlJam DanielC: perhaps you want   while $*IN.get -> $line { ... }   # then
13:43 masak DanielC: no, it will not do what I think you mean.
13:43 DanielC What is the difference between .get and .lines? Does .lines return the entire array all at once?
13:44 DanielC I suspect that PerlJam is right and I want $*IN.get
13:44 PerlJam .get reads one thing from the iterator.  .lines reads all things from the iterator
13:44 PerlJam (lazily)
13:44 DanielC So, if I want to break and then continue reading in another loop, it looks like .get is what I want.
13:45 PerlJam (I still think they should be spelt  .gimme(1) and .gimme(*) though
13:45 PerlJam )
13:45 jnthn PerlJam: Happiness is just a monkey patch away. ;-)
13:45 masak PerlJam: write a module that adds a synonym method. that's possible today.
13:45 masak jnthn: I like that slogan. :)
13:46 PerlJam jnthn: yeah except I really don't like "gimme" textually, just the concept  :)
13:46 decasm joined #perl6
13:46 PerlJam maybe .get == .get(1) and .get(*) to get them all.
13:47 PerlJam or if .get(*) is the common case, .get == .get(*)
13:47 exodist joined #perl6
13:47 PerlJam (you see I have trouble making decisions sometimes :)
13:48 skids joined #perl6
13:54 pasteling "DanielC" at 78.49.51.115 pasted "Program dies" (20 lines, 679B) at http://sial.org/pbot/36901
13:55 PerlJam DanielC: s/break/last/
13:55 DanielC Hi all. I have a problem with a program dying.
13:55 DanielC ah
13:55 DanielC thanks
13:55 ssm joined #perl6
13:55 Matt-W hah
13:55 Matt-W how's that for fast service
13:55 DanielC :-)
13:55 Matt-W PerlJam++
13:55 DanielC PerlJam++
13:55 * Matt-W tries not to fall asleep
13:56 Matt-W (it makes a bad impression on the managers)
13:59 masak rakudo: class A::B { method new(:$size = 3) {} }; my A::B $x .= new(:size(8))
13:59 p6eval rakudo 77b920: OUTPUT«Type mismatch in assignment; expected something matching type A::B but got something of type Array()␤in Main (/tmp/EnGMlvJpet:2)␤»
14:00 masak jnthn: is the above wrong somehow? I have corresponding code in Druid, so I'm pretty sure it used to work.
14:01 jnthn masak: well, your constructor isn't constructing an object...:-S
14:01 masak jnthn: how is that an error?
14:01 masak oh!
14:01 masak I see.
14:02 masak I doubt that's the problem in the Druid code, though.
14:02 masak ok, I'll pop back later tonight.
14:02 jnthn masak: I did do some changes to bless/CREATE etc.
14:02 jnthn oh, he's gone
14:02 alester joined #perl6
14:03 DanielC Damn it. "uc" is still broken.  (  $foo = $*IN.get; $foo = uc $foo ) =>  "no ICU lib loaded in method Any::uc"
14:03 kidd joined #perl6
14:03 DanielC I need "uc" to make the stupid program work.
14:04 mberends rakudo: my $foo="abc"; $foo.uc.say
14:04 p6eval rakudo 77b920: OUTPUT«ABC␤»
14:05 DanielC mberends: You need to use $*IN to reproduce the error.
14:05 * mberends tries...
14:05 DanielC mberends: Because when you read from $*IN  Perl 6 assumes UTF-8.
14:06 nihiliad joined #perl6
14:06 DanielC mberends: I sent sample code to the Rakudo bugs mailing list.
14:06 DanielC s/mailing list/emal address/
14:06 jnthn DanielC: It's not really a bug.
14:06 DanielC That was a couple of days ago.
14:07 DanielC jnthn: Do you have access to the bug report I filed? It only happens with "uc", not with "lc".
14:07 jnthn DanielC: You just need to have ICU around/findable by Parrot.
14:07 allbery_b joined #perl6
14:08 DanielC jnthn: Can you explain why the bug would affect uc but not lc?
14:08 jnthn Yes, that's a curious inconsistency.
14:08 DanielC exactly
14:09 pmichaud http://use.perl.org/comments​.pl?sid=43077&amp;cid=68843   # comments welcome
14:09 mberends DanielC: I cannot reproduce the error on debian stable :/
14:10 pmichaud mberends: do you have ICU installed?
14:10 pmichaud (if so, that would be why you can't reproduce the error :-)
14:10 DanielC *click*
14:11 pmichaud looks like my parrot error is somewhere between r39215 and r39225
14:11 mberends yes, lib32icu38 3.8.1 installed
14:11 synth joined #perl6
14:19 jnthn pmichaud: post looks good
14:24 muixirt2 joined #perl6
14:24 mberends pmichaud: (stability) the proof of the pudding is in the eating; the increasing number of Perl 6 projects will confirm the stability of the implementation better than 20k tests, and will highlight the todo areas.
14:24 pmichaud mberends: I agree entirely.
14:25 mberends rakudo: class A { has $.x; method new(:$xx!){self.bless(x=>$xx+1)};}; A.new(1).x.say
14:25 p6eval rakudo 77b920: OUTPUT«invalid arg type in named portion of args␤in method A::new (src/gen_setting.pm:3166)␤called from Main (/tmp/T9fgfFpNPu:2)␤»
14:25 pmichaud That's why I'm starting to look at the question of "when do we no longer call Rakudo a 'development release'?"
14:25 pmichaud I'm hoping it will make a good BOF session and/or hallway discussion at YAPC::EU
14:25 pmichaud (and possibly YAPC::NA)
14:25 literal as soon as you start thinking og backward compatability, maybe? :)
14:25 literal s/og/of/
14:25 pmichaud literal: I already think of backward compatibility.  See my post.
14:26 literal ah
14:26 pmichaud In general, with each Rakudo release we aim for the following:
14:26 pmichaud 1. Anything that is in the current Perl 6 specification and that worked in the previous release continues to work in the new release.
14:29 pugs_svn r26966 | pmurias++ | [re-smop] started working on Failure
14:29 pugs_svn r26966 | pmurias++ | PrototypeHOW calls UNKNOWN_METHOD if a method is missing
14:29 mberends rakudo: class A { has $.x; method new(:$xx!){self.bless(x=>$xx+1)};}; A.new(xx=>1).x.say
14:29 pugs_svn r26967 | pmurias++ | [re-smop] SMOP_MOLD_DEBUG is enabled only if both the
14:29 pugs_svn r26967 | pmurias++ | SMOP_MOLD_DEBUG compile flag and env variable are set
14:29 p6eval rakudo 77b920: OUTPUT«invalid arg type in named portion of args␤in method A::new (src/gen_setting.pm:3166)␤called from Main (/tmp/TqhAHl8o7x:2)␤»
14:30 mberends rakudo: class A { has $.x; method new($xx){self.bless(x=>$xx+1)};}; A.new(1).x.say
14:30 p6eval rakudo 77b920: OUTPUT«invalid arg type in named portion of args␤in »
14:31 pmichaud there is the possibility that we would need to support various workarounds as part of a deprecation cycle, though.
14:31 jnthn mberends: bless requires a candidate to bless as the first arg, iirc
14:32 jnthn mberends: Pass * to have Perl 6 create a default candidate for you.
14:32 mberends jnthn: isn't that self, the protoobject (or am I 2 weeks behind the spec)?
14:33 pmichaud .oO(  Hmm.  Stars are mostly gas, so passing * must be really like...)
14:33 lichtkind joined #perl6
14:33 TimToady mberends: the problem is syntactic
14:33 lichtkind return quasi { say "foo" }; means that this term is returned but not executed?
14:33 lambdabot lichtkind: You have 1 new message. '/msg lambdabot @messages' to read it.
14:34 jnthn mberends: spec was clarified there a bit
14:34 jnthn mberends: No it's *not* self, self is the protoobject
14:34 TimToady which is immutable
14:34 jnthn mberends: To create a new candidate to bless you can do self.CREATE()
14:34 TimToady which is mutable
14:34 jnthn mberends: That bit now follows the spec. However, our BUILD is still wrong.
14:34 mberends me tries locally...
14:35 lichtkind DanielC: right the link you found was my startpoint so feel free to edit there :)
14:36 DanielC lichtkind: So, rather than start from scratch, you want me to review your translation?
14:36 lichtkind DanielC: that would be also helpful
14:36 DanielC ok
14:36 lichtkind DanielC: but most parts are not translated yet
14:37 lichtkind DanielC: the project slept since i started a bit :)
14:37 DanielC ok
14:37 lichtkind fine :)
14:37 DanielC lichtkind: Ok, so I can help complete the translation.
14:37 lichtkind thats what i asked for yesterday, :)
14:38 pmurias TimToady: ruoso told me that you told him that S04:1040 doesn't refer to a real garbage-collection run
14:38 lichtkind DanielC: the other stuff we  do if its finished :)
14:39 TimToady pmurias: yes, it's just doing GC on the internals of $!, presuming it holds all in-flight exceptions somehow
14:39 lichtkind DanielC: this project i consider valuable because its a nicely linked HTML where you ca dfind easily every bit regarding p6 syntax which would be grat help for beginners
14:39 mberends rakudo: class A { has $.x; method new(:$xx!){self.bless(self.CREATE(),x=>$xx+1)};}; A.new(xx=>1).x.say # works locally following S12, thanks TimToady++ jnthn++
14:39 p6eval rakudo 77b920: OUTPUT«2␤»
14:40 DanielC lichtkind: Sure.
14:40 DanielC lichtkind: afk
14:40 TimToady wayland76: definition of oboe: An ill wind that nobody blows good.
14:42 pmurias TimToady: so do i have to check if someone stored the exception somwhere?
14:43 brunov joined #perl6
14:43 TimToady only if it's stored in $!
14:43 TimToady (by fail, presumably)
14:44 TimToady normal GC doesn't care whether an object it's destroying happens to be a Failure
14:45 icwiener_ joined #perl6
14:46 pmurias so $! forces a garbage collection run on every scope exit?
14:48 TimToady probably best not to call it garbage collection
14:48 TimToady it just looks for unhandled exceptions via $!
14:49 TimToady could be a single bit
14:49 TimToady which says whether there is a list of unhandled exceptions to consider
14:50 TimToady one would like to optimize the case of no exceptions were thrown
14:50 TimToady since exceptions are, er, supposed to be exceptional
14:52 LadyLuna1y joined #perl6
14:57 pmurias TimToady: that would mean that a valid refcounting implementation of Perl 6 would have to handle reference cycles
14:59 TimToady o_O
14:59 TimToady I'm not talking about garbage collection AT ALL
15:00 TimToady it's just a list as a data structure within $!
15:00 TimToady has nothing to do with with refcounting
15:00 TimToady except to the extent any data is refcounted
15:02 TimToady unless resumable exceptions keeping a continuation causes cycles, but I think you're nuts to use refcounting anyway
15:02 TimToady long ago I hooked up Java with Perl, and mixing GC with p5's refcounting wasn't much of an issue
15:03 TimToady so I don't think the argument of p5 interoperability really flies
15:13 unitxt left #perl6
15:13 pmurias TimToady: re reference cycles, what i meant is that if you put an $exception in a reference cycle it will get leaked and $! will incorrectly assume it's alive and not throw it
15:15 jnthn pmurias: It sounds like you're relying on reference counting to do something that is maybe better implemented another way.
15:16 pmurias like relying on it to reclaim memory ;)
15:19 jnthn pmurias: To me handling the unthrowns in $! felt like a kind of block exit thing.
15:19 jnthn erm, unhandleds
15:19 jnthn throwing then
15:19 jnthn gah :-)
15:20 pmurias jnthn: you have to have something resembling a mark phase of the gc to check if exceptions are alive
15:20 donaldh joined #perl6
15:20 jnthn pmurias: huh?
15:20 skids $jnthn_touchtyping_cache.visit
15:20 jnthn pmurias: It's about handled, not liveness, no?
15:21 pmurias unhandled and dead exceptions are thrown
15:22 jnthn oh, hmm, I see the wording in S04 that you're referring to.
15:24 pmurias IMHO that's also the most usefull behavior
15:27 nated left #perl6
15:27 muixirt2 joined #perl6
15:38 TimToady pmurias: that sounds completely overdesigned to me
15:39 TimToady $! is lexically scoped, and just cleans up at block exit
15:39 TimToady that's all
15:39 jnthn TimToady: The spec mentions gc which is maybe the source of confusion.
15:39 TimToady and I've already disavowed that term several times now...
15:42 skids .oO(fix spec?)
15:42 TimToady hmm, looks like audrey wrote that paragraph
15:42 jnthn skids: Yes, that was what I was hinting at. :-)
15:43 skids jnthn: whenever you need someone to be annoying, I'm at your disposal :-)
15:43 TimToady at minimum, such behavior is triggered only when $! tells you it knows there are unhandled exceptions
15:43 justatheory joined #perl6
15:44 TimToady and merely checking $! handles the current exception
15:44 pmichaud yay, I am happy to see this particular part of the spec being cleared up.
15:44 pmichaud it's been confusing for many.
15:45 TimToady or foo() // bar() would not work right
15:45 TimToady *if* $! has a record of any failures that weren't handled, then and only then do we have to think about them
15:46 TimToady the paragraph in question is trying to make it possible to return the current exception as part of a data value
15:46 TimToady I think that's probably overdesign, as I said
15:47 pmichaud overdesign--
15:47 TimToady we don't care about exceptions as data values, they're just data
15:47 TimToady we only care about the ones that were registered with the current $!
15:48 TimToady and I think if you want to poke an unhandled exception into a data structure, that must be done explicitly
15:48 TimToady so $! simply fails with any unhandled exceptions listed in $!
15:48 TimToady that is, the block exit fails
15:48 skids So it's essentially trying to make it so we can do with thrown exceptions what Failure() does with unthrown?
15:49 TimToady I don't understand your question
15:49 skids That's OK I don't understand what I'm asking about :-)
15:50 icwiener joined #perl6
15:51 skids .oO("depth first" learning gets you over your head in Perl6/Parrot)
15:52 TimToady more precisely, the block exit dies on unhandled exceptions, which is how unthrown exceptions will typically get thrown
15:53 TimToady anyway, I'll work on the paragraph in question
15:55 DanielC rakudo: my %h = (c =>3,a =>4,b =>4); my @keys = sort { $^a cmp $^b } keys %h;
15:55 p6eval rakudo 77b920:  ( no output )
15:55 DanielC On my computer Rakudo says Statement not terminated properly at line 1, near "keys %h;"
15:56 pmichaud need a comma
15:56 pmichaud sort { $^a cmp $^b }, keys %h
15:56 pmichaud simpler is
15:56 DanielC ah
15:56 pmichaud sort { +$^a }, keys %h
15:57 * skids wonders if JDlugosz might want to tackle a state diagram of the life of an exception.
15:57 pmichaud (the latter is also slightly faster, as the keys are numified once instead of once-per-comparison)
15:57 DanielC pmichaud: The real sort I want is { %h{$^a} <=> %h{$^b} || $^a cmp $^b }
15:57 DanielC pmichaud: I just picked a simpler sort for testing.
15:58 pmichaud DanielC: Oh.  Then I think you want:
15:58 pmichaud %h.sort { .value }
15:58 pmichaud er
15:58 pmichaud %h.sort: { .value }
15:59 pmichaud oops
15:59 DanielC Will that sort by value THEN key?
15:59 pmichaud %h.sort: { +.value }
15:59 pmichaud Yes, I'm pretty sure it does.
15:59 pmichaud oh, wait, I guess not.
15:59 DanielC :)
15:59 pmichaud it sorts by value, but not key (because it's a stable sort, and hash keys aren't guaranteed to be in order)
15:59 DanielC Btw, do you need the : after sort? What does the : do?
16:00 pmichaud without the : the   %h.sort looks like   %h.sort()
16:00 DanielC %h.sort: { +.value || +.key }  ?
16:00 * DanielC is just guessing
16:00 pmichaud no, that won't work.
16:00 DanielC oh well
16:00 pmichaud The spec does say it's possible to have an array of comparators, but Rakudo doesn't have that yet.
16:00 pmichaud Anyway:
16:01 pmichaud %h.sort: { $^a.value <=> $^b.value || $^a.key cmp $^b.key }
16:01 DanielC cool
16:02 decasm left #perl6
16:02 DanielC But if I assign that to a hash, will it get un-sorted again?  %h = %h.sort: ...
16:02 skids Hashes do not order
16:02 pmichaud it returns a list of pairs.
16:02 pmichaud and the pairs will be in sorted order
16:02 pmichaud yes, if you assign it to a hash, they can be out-of-order again
16:02 DanielC I could put it straight into the for loop:  for (%h.sort: ...) -> $k,$v { ... }
16:03 DanielC is that the right thing to do?
16:03 skids You may have to .kv to explode
16:03 pmichaud not quite, because .sort produces a list of pairs
16:04 pmichaud so you'd get one pair in $k and the next in $v
16:04 pmichaud I don't know if .kv on a list of pairs works just yet.
16:04 pmichaud (thinking)
16:04 skids Oh, but .kv on a list of pairs is (0,pair1)(1,pair2)
16:04 pmichaud you can certainly do
16:04 DanielC for (%h.sort: ...) -> $item { $item.key ... $item.value }   ?
16:04 pmichaud for %h.sort: ... -> $p { ......   right, what you just wrote
16:05 DanielC thanks
16:05 pmichaud oh!
16:05 pmichaud even easier
16:05 pmichaud for %h.sort: ... {  .key ... .value }
16:05 DanielC nice
16:06 pmichaud for %h.sort({ .value }) { say .key, "\t", .value; }
16:06 pmichaud (display a hash, sorted by value)
16:07 DanielC It doesn't matter if I use the comon-method or the sort({...}) method, right?
16:07 pmichaud not for the cases we've been discussing, no.
16:07 TimToady DanielC: note that whenever rakudo tells you it can't find the end of the statement, you should probably feed it to STD to get the reall problem
16:07 TimToady std: my %h = (c =>3,a =>4,b =>4); my @keys = sort { $^a cmp $^b } keys %h;
16:07 p6eval std 26967: OUTPUT«##### PARSE FAILED #####␤Statements must be separated with semicolon at /tmp/xx7kHgjcgG line 1:␤------> [32mb =>4); my @keys = sort { $^a cmp $^b } [31mkeys %h;[0m␤    expecting any of:␤        infix or meta-infix␤      infix stopper␤    standard stopper␤ statement␤
16:07 p6eval ..statement modifier loop␤    te…
16:07 TimToady well, maybe that's not completely accurate...
16:07 DanielC TimToady: Thanks.
16:08 TimToady but at least it points out that something is missing
16:08 pmichaud (note that rakudo gave basically the same information here :-)
16:08 DanielC TimToady: Well, it says that the parse failed.
16:08 pmichaud Statement not terminated properly at line 1, near "keys %h;"
16:08 TimToady I should probably catch the missing comma error
16:09 DanielC pmichaud: Ok. They are both equally obscure :-)
16:09 TimToady the other thing I wanted to mention is that <=> || cmp is probably not what you want, if you want string comparison
16:09 TimToady you want <=> || leg
16:09 pmichaud right, it's   "leg" for string comparison.
16:09 DanielC What is leg?
16:09 pmichaud "less-than/equal-to/greater-than"
16:10 pmichaud but in a string since instead of a numeric one.
16:10 pmichaud *sense
16:10 DanielC I want to sort numerically by value, then asciibetically by key.
16:10 pmichaud right, that's leg
16:10 TimToady l : < :: e : = :: g : >
16:10 pmichaud "cmp" is a more generic comparison operator
16:10 DanielC so what's cmp?
16:10 TimToady dispatched by type
16:10 pmichaud the exact definition of which is still being mulled over by TimToady++  :-)
16:11 DanielC ok
16:11 TimToady so sorts numbers numerically and strings stringically
16:11 TimToady the question is what to do on a type mismatch
16:11 TimToady probably multi infix:<cmp> ($a,$b) { $a leg $b }
16:11 skids .oO(stringentially?)
16:11 DanielC Should I use leg because it's faster or because cmp will do the wrong thing?
16:11 TimToady unless that turns out to be inconsistent
16:12 TimToady we have not yet defined cmp to do the wrong thing :)
16:12 DanielC :-)
16:13 TimToady the Q is, how does a Num compare with a Str
16:13 Chillance joined #perl6
16:13 sjohnson joined #perl6
16:14 TimToady I think the default cmp above probably is inconsistent due to the vagaries of stringification
16:14 DanielC k
16:14 TimToady one consistent approach would be to order the types
16:14 TimToady such that Num < Str, for instance
16:14 TimToady but that's not what people quite expect either
16:15 FurnaceBoy this question was recently raised on Erlang list.
16:15 TimToady it's an interesting problem
16:16 FurnaceBoy indeed
16:16 TimToady one would like to avoid circularities in orderings
16:16 FurnaceBoy there's also the principle of least surprise to consider.
16:16 FurnaceBoy it came up on the list because someone got a surprise P)
16:16 FurnaceBoy :)
16:16 pmichaud same here :)
16:16 TimToady yes, you want 42 < 42chickens < 43
16:17 pmichaud I was surprised when      3 cmp "b"   and   "b" cmp 3    both returned the same answer :-)
16:17 TimToady but Int < Str makes 42 < 43 < 42chickens
16:17 FurnaceBoy haha
16:17 TimToady pmichaud: :P
16:17 DanielC pmichud: they do?
16:17 pmichaud DanielC: they're not supposed to, but they did
16:17 TimToady they both fail, i presume
16:18 DanielC ugh
16:18 pmichaud no, Parrot chose the type of comparison based on the left operand
16:18 DanielC ugh!
16:18 pmichaud so   3 cmp "b"  ends up being 1 because   3 > "b"
16:18 pmichaud and "b" cmp 3 ends up being 1 because "b" > "3"
16:18 pmichaud er, "b" gt "3"
16:18 TimToady currently cmp is defined only on the same type arguments
16:19 TimToady like eqv
16:19 FurnaceBoy topic was , "{1} > 100 returns true ?!"
16:20 FurnaceBoy thread: http://www.nabble.com/%7B1%7D-%3E-10​0-returns-true--%21-td23567619.html
16:20 FurnaceBoy number < atom < reference < fun < port < pid < tuple < list < bit string
16:20 FurnaceBoy oh, that isn't less-than
16:22 FurnaceBoy yes a same-type comparison can prevent surprises, or at least, convert them into an electric shock
16:22 FurnaceBoy PHP suffers greatly in this area, having so many silent coercions
16:22 TimToady it's probably impossible to be both dwimmy and consistent, because people expect different things
16:23 FurnaceBoy true
16:23 skids .oO(somehow "dwim" has not made it to keyword status)
16:23 TimToady however, we can be consistent and *mostly* dwimmy with sufficient effort
16:23 FurnaceBoy "What might have been better, 20/20 hindsight, would have been to have 2 separate sets of comparison functions, those that work on anything and those that only work on numbers." (Robert Virding)
16:23 TimToady skids: doesn't need a keyword, when it has a symbol, namely *
16:24 FurnaceBoy Huffmanism !
16:24 FurnaceBoy :)
16:24 TimToady actually, they wanted 3 sets like Perl 6
16:24 TimToady but they don't know that yet
16:25 skids That's a french dwim.  It dwims, but resents you for it.
16:26 * skids lunch, hopefully waitress dwims.
16:26 FurnaceBoy bon appetit
16:32 TimToady I don't think MMD on cmp can produce a consistent dwimmy sort, even with fallback coercions, because MMD types don't partition the data properly for comparing strings with numbers
16:33 TimToady a general sort needs to be a single routine with a single policy
16:33 TimToady that ignores the actual types to some extent
16:34 TimToady so perhaps the default cmp should just order values first on types in alphabetic order, then type-equiv cmp within each of those sets
16:34 TimToady so Buf < Complex < Int < Num < Str, or some such
16:35 TimToady that's the only way cmp can be consistent
16:35 TimToady and the a general sort is just sort &gcmp, @list
16:35 TimToady or some such
16:37 unitxt joined #perl6
16:37 FurnaceBoy yes... I think a general sort needs to order by type, value -- roughly speaking
16:37 TimToady when I say general sort, I mean the dwimmy one, not the typey one
16:38 TimToady the typey one is what cmp defaults to
16:38 FurnaceBoy yeah type then value
16:38 DanielC TimToady: Can users create their own types in Perl 6? (e.g. like you can in Haskell)
16:38 TimToady multi infix:<cmp> (Any $a, Any $b) { $a.WHAT leg $b.WHAT }
16:39 TimToady certainly
16:39 TimToady depending, of course, on precisely what you mean by "type"
16:40 DanielC How can cmp sort by type if it doesn't know ahead of time what types are available?
16:40 TimToady Haskell is capable of (and makes mandatory) rather more precision than Perl does
16:40 DanielC I guess you could sort "alphabetically" by type.
16:40 TimToady see multi above
16:40 sjohnson joined #perl6
16:40 Psyche^ joined #perl6
16:41 DanielC Buf < Complex < Int < Num < Str
16:41 DanielC This is alphabetical. I just didn't know if you meant that in general.
16:41 DanielC ah, yes you did
16:41 DanielC sorry
16:43 TimToady I always mean things in general, except when I mean them in specific.
16:44 xalbo I think people will find 3 < 2.5 to be very surprising.
16:44 DanielC Float < Int => 3.5 < 2 ?
16:45 TimToady there is no Float
16:45 TimToady it's Num
16:45 DanielC ok
16:45 TimToady I'm just saying, if we use MMD cmp, we have to do it that way to be consistent
16:45 TimToady I'm not saying that sort has to default to cmp
16:46 TimToady well, I implied it, I suppose
16:46 TimToady but I'm not saying it now :)
16:46 jnthn Also, there's nothing to stop us defining multi infix:<cmp>(Num, Int)
16:46 jnthn and :(Int, Num)
16:47 jnthn When there is a reasonable answer
16:47 DanielC Is Int not a type of Num ?
16:47 jnthn Though the combinations may expode.
16:47 jnthn DanielC: Yes-ish. :-)
16:48 DanielC Can't you define infix:<cmp>(Num, Num) and be done with it?
16:48 jnthn DanielC: Yes, that'd work too
16:49 mizioumt left #perl6
16:49 rindolf joined #perl6
16:49 rindolf Hi all.
16:49 DanielC o/
16:56 lichtkind quasi quoting means that te quoted is ment literaly (as code)?
17:03 TimToady a quasi quote compiles the code to an AST and returns that
17:03 TimToady the quasi quote may contain quasi-unquotes that execute internally and their results placed into the AST
17:03 sjohnson joined #perl6
17:07 iblechbot joined #perl6
17:13 pjcj joined #perl6
17:23 sjohnson1 joined #perl6
17:25 jnthn Rain all weekend. That's probably going to work out well for Rakudo...
17:27 mib_0rq9ne joined #perl6
17:27 hanekomu joined #perl6
17:28 literal it's raining tuits
17:28 cmarcelo joined #perl6
17:36 cdpruden joined #perl6
17:37 presh joined #perl6
17:39 FurnaceBoy awesome
17:39 FurnaceBoy i need some
17:39 FurnaceBoy preferably big round ones
17:40 zamolxes joined #perl6
17:43 DanielC What is the Perl 6 equivalent of qw(one two three) ?
17:44 skids <one two three>
17:44 DanielC thanks
17:45 * skids volunteers new england's rain for the rakudo effort.
17:45 skids You can come by and pick it up *immediately*
17:46 * PerlJam wouldn't mind having some rain here (we're about 8" below normal for this time of year)
17:47 DanielC buubot: random
17:47 buubot DanielC:  837209142089260781897614733910247202
17:47 DanielC hmm... that's not what I had in mind.
17:47 PerlJam rakudo: say rand
17:48 p6eval rakudo 77b920: OUTPUT«0.683458038912253␤»
17:48 DanielC thanks
17:48 DanielC Can you do @arr.rand and extract a random element from an array?
17:49 jnthn DanielC: @arr.pick
17:49 literal .pick
17:49 DanielC thanks
17:49 literal rakudo: say <foo bar baz>.pick
17:49 p6eval rakudo 77b920: OUTPUT«foo␤»
17:49 PerlJam DanielC: or, if you really *Want* to use rand for that: @array[rand * @array]   # :-)
17:50 DanielC :)
17:50 PerlJam btw,  @array.pick(*)  gives you all elements of the array in random order.
17:51 DanielC my @C = <Comprehensively Conspicuously Continuously Completely Certainly>;
17:51 DanielC my @P = <Pathological Perplexing Powerful Pervasive Pedestrian>;
17:51 DanielC say @C.pick ~ " " ~ @P.pick ~ " Archive Network";
17:51 DanielC :-)
17:52 literal @A = <Archive Array Anthology>;
17:52 lambdabot Maybe you meant: . ? @ v
17:53 DanielC literal: thanks
17:53 DanielC What's the name of that dictionary robot? I want to look up anthology.
17:53 TimToady hmm, @array[*.rand] should work eventually too, methinks
17:53 literal DanielC: dunno, but here is something -> http://dictionary.reference.com/browse/anthology
17:53 TimToady and is extensible to @array[*.rand; 0] and such
17:54 DanielC literal: *click*
17:54 Matt-W TimToady: cool!
17:54 DanielC Perl 6 arrays are impressive.
17:55 DanielC literal: Anthology is good...
17:55 ZuLuuuuuu joined #perl6
17:55 literal DanielC: also, @N = <Network Nest>;
17:55 DanielC thanks
17:55 TimToady anthology ought to be the study of flowers :)
17:57 unitxt_ joined #perl6
18:00 TimToady ...such as camelias
18:06 FurnaceBoy :)
18:07 * FurnaceBoy looks for a pistil
18:07 mizioumt1 joined #perl6
18:08 sbp hmm. when people use new languages, they often use flashcards
18:08 sbp I wonder if perl6 flashcards would be useful
18:08 mizioumt1 joined #perl6
18:09 sbp I can imagine a set for the operators, say, might be handy
18:09 sbp *people learn
18:09 lichtkind TimToady: thanks
18:12 mizioumt1 left #perl6
18:14 tedv joined #perl6
18:15 bloonix joined #perl6
18:17 tedv If I wanted to help do implementation work on perl 6 in my spare time, where would be a good place to start?
18:18 tedv I've been looking for more programming projects, and it seems like perl 6 still needs it.
18:18 jnthn rakudo: (-1 | 2 | -3).abs.perl.say
18:18 p6eval rakudo 77b920:  ( no output )
18:18 jnthn tedv: Hi! :-)
18:18 jnthn tedv: Yes, help is most welcome.
18:19 jnthn tedv: There are various projects that you might wish to get involved in - http://www.perl6-projects.org/ is a good overview
18:19 tedv yeah I've heard of both rakudo and pugs
18:19 jnthn tedv: There's more than one compiler project underway, but the most advanced and actively developed is Rakudo.
18:20 tedv and I have no haskell skills anyway
18:20 jnthn Same. ;-)
18:20 tedv haskall?
18:20 unitxt joined #perl6
18:20 tedv I assume the first step would be installing the code base and making sure I have the same tests pass on my machine as everyone else is
18:21 tedv but if the total number of tests is on the order of 20k, and there's still several thousand left to handle...  Finding a starting point is a bit daunting
18:21 jnthn Rakudo is written in a mixture of Perl 6 (for a lot of the built-ins), NQP (a small subset of Perl 6), PIR (Parrot's intermediate language) and a little bit of C.
18:21 jnthn Yes, there's a lot to dig in to.
18:21 jnthn Building the codebase is a good first step.
18:22 tedv the other thing is... if you're at a point where 70% of the test cases pass, there's a good chance it's the easiest 70%. :)
18:22 jnthn pmichaud++ gave a great presentation on getting into Rakudo not so long back too.
18:22 presh joined #perl6
18:23 jnthn Yes, some of what's left is hard, some of it less so.
18:23 tedv I guess the other option is "boring", but boring stuff needs to get done too
18:23 jnthn Yeah, there is that.
18:23 jnthn Certainly there's a lot of non-trivial stuff done too.
18:25 TimToady jnthn++ is being modest
18:26 tedv modest in what direction?
18:26 tedv is the remaining stuff "very hard" or "there's lots of non-hard stuff left"?
18:27 tedv probably both
18:28 jnthn tedv: A bit of both I expect.
18:29 tedv alright, thanks for the direction.  I'll try to read up some this weekend to get my bearings.
18:29 jnthn tedv: Great. And here is a good place for questions. :-)
18:29 TimToady he's being modest about how much of the hard stuff he's done already :)
18:30 tedv heh yeah
18:30 tedv when I read over a the language specifications, a lot of syntax struck me as "oh, that's really elegant to describe and easy to implement"
18:31 tedv but every once and a while I'd see something and think, "how is that even possible to write such that it executes in a reasonable amount of time?"
18:31 sbp hmm
18:31 sbp rakudo: my $num = "9"; say ++$num;
18:31 TimToady well, there's been nine years of thinking put into it so far...
18:31 p6eval rakudo 77b920: OUTPUT«10␤»
18:31 sbp rakudo: my $num = "-9"; say ++$num;
18:31 p6eval rakudo 77b920: OUTPUT«-10␤»
18:31 sbp rakudo: my $num = -9; say ++$num;
18:31 p6eval rakudo 77b920: OUTPUT«-8␤»
18:31 tedv nine years of thinking will help you find the right answer IF it exists, but it won't solve, say, the halting problem
18:31 TimToady tedv: if you want to discuss any of those, we'd be delighted
18:31 sbp ought there be dwimming for signed numerical rangechars?
18:32 tedv well how do junctions work internally?
18:32 jnthn sbp: Wow, that's beautiful. :-)
18:32 tedv it seems like if you misuse them
18:32 tedv you could easily end up blow your computational complexity
18:32 lichtkind can macros be overwritten, i mean a new macro with same name override the old entry in the namespace?
18:32 TimToady certainly, but we tend to classify those as "Doctor it hurts when I do this...Well, then don't do that" problems
18:32 tedv like (1 | 2) + (3 | 4) * (5 | 6) has a lot of possible options
18:33 * sbp imagines that might be a bad idea, actually, if you have a filename like "picture-001.jpg" and go to ++ it and find it's gone to "picture000.jpg" or something. heh
18:33 tedv true
18:33 tedv one of the biggest problems I see with people developing perl 5 code is that they do things that are *really* easy and don't understand the underlying cost
18:33 tedv and can't figure out why things run so slow
18:33 tedv but usually that's an issue with their algorithm design, not with perl
18:34 tedv or more precisely, with their understanding of what is a unitary operation in perl
18:34 jnthn tedv: Right, and a junction is just a data structure that you can choose to use or not use in your algorithm.
18:34 * FurnaceBoy wonders if there is any similarity with Icon generators
18:34 kidd joined #perl6
18:34 TimToady well, it's a valid point that it can be abused unknowingly by newbies
18:34 tedv that's true of any language though
18:35 FurnaceBoy tedv++
18:35 tedv like... java worked hard so that it was difficult for people to write the "wrong" syntax
18:35 jnthn TimToady: Aye, but that can be said of many other features too. ;-)
18:35 tedv and people just end up writing the wrong algorithms for which the "right" syntax is needlessly complex
18:36 FurnaceBoy tedv, right, Python and Java take a diametric position from TIMTOWTDI
18:36 TimToady hopefully we give people enough right ways to do it that they aren't tempted to hammerize things, but you can't prevent it entirely
18:36 tedv do junctions enforce uniqueness on results?  Like will (1 | -1) * (2 | -2) internally become (-2 | 2), or (-2 | -2 | 2 | 2)
18:36 pmichaud sometimes hammerization is the right way to do it :-)
18:37 pmichaud tedv: depends on the junction.
18:37 Tene When all you have is a hammer, it's HAMMERTIME!
18:37 tedv well I'm a big believer that you should make it easy to do the right thing, not hard to do the wrong thing.
18:37 pmichaud rakudo:  ((1 | -1) * (2 | -2)).perl.say
18:37 tedv since the latter is not effective for people who don't understand what the alternative "right thing" is anyway
18:37 TimToady then you've come to the right place :)
18:37 p6eval rakudo 77b920:  ( no output )
18:37 pmichaud p6eval has become much less useful lately
18:37 TimToady pugs: ((1 | -1) * (2 | -2)).perl.say
18:37 pmichaud rakudo:  (1 | -1).perl.say
18:38 p6eval pugs: OUTPUT«((-2 | 2))␤»
18:38 p6eval rakudo 77b920:  ( no output )
18:38 jnthn pmichaud: I think p6eval's time or resource limit might have been set a little too tightly...
18:38 pmichaud jnthn: I remarked about this a couple of days also, hoping someone would lift it a bit.
18:38 pmichaud No such luck.
18:38 TimToady rakudo: ((1 | -1) * (2 | -2)).perl.say
18:38 p6eval rakudo 77b920: OUTPUT«any(any(2, -2), any(-2, 2))␤»
18:38 TimToady the extra space after the colon?
18:38 pmichaud rakudo: (1 | -1).perl.say
18:38 mizioumt joined #perl6
18:38 p6eval rakudo 77b920: OUTPUT«any(1, -1)␤»
18:38 pmichaud rakudo:  (1 | -1).perl.say
18:38 TimToady o_O
18:38 p6eval rakudo 77b920: OUTPUT«any(1, -1)␤»
18:39 pmichaud I claim resource limit.
18:39 jnthn hah, it's inscrutable.
18:39 tedv hmmm so apparently rakudo doesn't enforce uniqueness and pugs does
18:39 jnthn pmichaud: Dispatch refactor is coming along OKish.
18:39 TimToady we're here to unscrew the inscrutable
18:39 jnthn pmichaud: I...think. :-)
18:39 pmichaud jnthn: excellent.  With latest parrot trunk our S14-role error has seemingly disappeared, unless someone fudged/regressed it
18:39 pmichaud I now have an error in S16-filehandles/open.t, though.
18:39 jnthn S14-role one?
18:40 jnthn I didn't know we had an issue there.
18:40 pmichaud whatever error we were getting with parrot trunk (I forget which)
18:40 jnthn S12-methods/indirect.t or somehting
18:40 pmichaud yeah, that one
18:40 jnthn oh, I'm very happy that's fixed.
18:40 jnthn What was it?
18:40 pmichaud I don't know, it just disappeared on its own.
18:41 jnthn ...oh.
18:41 pmichaud I'm guessing it might've been related to some other patches that got un-done in Parrot.
18:41 jnthn Oh well, I'm not complaining.
18:41 pmichaud me either.
18:41 jnthn Did you do something related to PMCProxy creation/caching?
18:41 pmichaud This morning, yes.
18:41 pmichaud I fixed the bug that was introduced yesterday in r39220
18:42 jnthn OK, but a little longer ago there was a patch relating to that very topic and that was what broke it.
18:42 jnthn So you almost certainly fixed it with your patch.
18:42 pmichaud it could be that also.
18:42 jnthn pmichaud++
18:42 pmichaud at any rate, PMCProxy creation is now likely to be "correct" for the current state of things in Parrot.
18:42 jnthn OK, excellent.
18:42 pmichaud hopefully we get our spectest speed back, too -- about to test that.
18:42 pmichaud and it looks like the S16-filehandles/open.t error is the exit-double-free-bug
18:43 jnthn oh noes...not another one.
18:43 pmichaud sure, but at least it's not a regression for me at the moment :-/
18:43 jnthn oh fail...I forgot about the whole, dinner thing.
18:44 lichtkind pmichaud: this tricolor garbage collector is now operable?
18:44 pmichaud tricolor... what?!
18:45 jnthn pmichaud: You know, the GC that is orange, and hot pink, amd luminous green too!
18:45 sbp rakudo: for 0 ..^ 3 { say $_ }
18:45 p6eval rakudo 77b920: OUTPUT«0␤1␤2␤»
18:45 sbp rakudo: for 0 .. ^3 { say $_ }
18:45 p6eval rakudo 77b920: OUTPUT«0␤1␤2␤3␤»
18:45 jnthn .oO( I really need food... )
18:45 lichtkind pmichaud: last yoers gsoc project for parrot
18:45 pmichaud lichtkind: I don't know -- I didn't follow it closely.
18:45 lichtkind pmichaud: i just want to know if it went into parrot source
18:46 pmichaud lichtkind: not that I'm aware of... I don't think the gc has been touched in parrot trunk.
18:46 * sbp thinks 0 .. ^3 ought to just blow up, cogs and sprockets everywhere... some even landing in the salad
18:47 lichtkind pmichaud: thanks
18:47 sbp actually, thinking about it, ranges for hyper-operations?
18:47 mizioumt joined #perl6
18:48 sbp can you junctify ranges?
18:48 sbp rakudo: 0 .. 1 | 0 .. 2
18:48 p6eval rakudo 77b920:  ( no output )
18:48 sbp rakudo: for 0 .. 1 | 0 .. 2 { say $_ }
18:48 p6eval rakudo 77b920: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤in method Range::true (src/gen_setting.pm:1350)␤called from Main (/tmp/AsADzv5ub4:2)␤»
18:48 sbp okay!
18:49 TimToady | is tighter than ..
18:49 sbp ah
18:49 tedv rakudo: (0 .. 1) | (0 .. 2)
18:49 p6eval rakudo 77b920:  ( no output )
18:49 sbp rakudo: for (0 .. 1) | (0 .. 2) { say $_ }
18:50 p6eval rakudo 77b920: OUTPUT«Junction()<0xb61bfc10>␤»
18:50 sbp makes sense, okay
18:51 jnthn sbp: The say should auto-thread there.
18:51 pmichaud no.
18:51 pmichaud say takes a slurpy list
18:51 jnthn oh, yes
18:52 jnthn pmichaud: OK, but *something* at some point should auto-thread, no?
18:52 pmichaud I don't think so, in that example.
18:52 jnthn oh.
18:52 pmichaud the junction should be smarter about stringifying, but that's about it.
18:53 lichtkind pmichaud: and the other project with native call interface was sucessful?
18:54 jferrero joined #perl6
18:54 pmichaud lichtkind: I don't remember, alas.
18:55 lichtkind pmichaud: which nickname has jerry gay?
18:56 pmichaud lichtkind: particle
18:56 lichtkind thanks
18:56 pmurias what's the english name for $! or even better what's the name of it's class?
18:56 pmichaud "dollar-bang"?
18:56 lichtkind hahaha
18:57 tedv I wish google search handled symbols
18:57 PerlJam their code search doesn't grook symbols?
18:58 tedv like when you want to find out what $& or $~ mean...  Is $~ even bound?
18:58 tedv symbols are stripped out
18:58 tedv a search for "perl -i" will give the same results as "perl i"
18:58 tedv I'm trying to figure out why they do it.  wonder if it has something to do with keeping the alphabet small for tries or bloom filters or something
18:59 tedv though obviously that doesn't work for chinese
18:59 tedv code search handles symbols
18:59 tedv but just a "what does this thing do" in google's general search won't
19:00 pmichaud rakudo:   say qw(xyz).perl;
19:00 p6eval rakudo 77b920:  ( no output )
19:00 pmichaud rakudo:   say qw (xyz).perl;
19:01 p6eval rakudo 77b920:  ( no output )
19:02 ruoso joined #perl6
19:03 sbp hmm. S03:43 and S03:974 mention sin as a unary operator
19:03 sbp but then S29:725 says sin is in the Numeric modules, not a default
19:03 sbp bug? or something I don't understand?
19:04 ruoso HellO!
19:04 sbp hey ruoso
19:04 PerlJam sbp: you don't understand that "in Numeric" is not mutually exclusive with "default"  :)
19:04 sbp PerlJam: well just above that it says "not part of the default namespace any more"
19:05 finanalyst rakudo: my $x = <a> => sub { say 'hi' }; $x.value()
19:05 p6eval rakudo 77b920:  ( no output )
19:05 pmurias ruoso: hi!
19:06 ruoso hi pmurias
19:06 pmurias ruoso: i have turned instance_storage from a HoH into a H
19:06 PerlJam And it burns through things..()
19:06 finanalyst rakudo: my %x = <a> Z sub { say 'hi' }; %x<a>()
19:06 PerlJam oops
19:06 p6eval rakudo 77b920: OUTPUT«hi␤»
19:06 PerlJam rakudo: my $x = <a> => sub { say 'hi' }; $x.value.()
19:06 p6eval rakudo 77b920:  ( no output )
19:07 ruoso pmurias, but private attributes will clash that way
19:07 sbp I just wanted to see whether sin(π) gave 0, really
19:07 pmurias not if they have a unique private_name
19:07 pmurias ruoso: the package name is not unique
19:07 finanalyst can anyone tell me how to call code held in the value part of a Pair?
19:08 ruoso pmurias, but $.^!instance_storage{$?PACKAGE}<$!attr> is
19:08 pmichaud rakudo: my $x = <a> => 1; $x.value.say
19:08 p6eval rakudo 77b920: OUTPUT«1␤»
19:08 pmichaud rakudo: my $x = <a> => { say 'hi' };  $x.value.WHAT.say
19:08 p6eval rakudo 77b920: OUTPUT«Block()␤»
19:08 pmichaud rakudo: my $x = <a> => { say 'hi' };  $x.value()()
19:08 p6eval rakudo 77b920: OUTPUT«hi␤»
19:08 finanalyst why ()() ?
19:09 pmichaud rakudo: my $x = <a> => { say 'hi' };  ($x.value)()
19:09 p6eval rakudo 77b920: OUTPUT«hi␤»
19:09 PerlJam pmichaud: and why did $x.value.() not work?
19:09 pmichaud without the second set of parens, it just gives back the sub but doesn't invoke it.
19:09 pmichaud $x.value.() is the same as $x.value()
19:09 pmichaud (which is the same as $x.value)
19:10 PerlJam rakudo: say rand();  say rand.();
19:10 p6eval rakudo 77b920: OUTPUT«0.0592697729161991␤0.26436817585224␤»
19:11 pmurias ruoso: i assumed the name of the $!attr would be attr and private_name is an unique value
19:11 ruoso pmurias, no... the private_name is '$!attr'
19:11 ruoso the sigil and twigil are a part of the name
19:13 pmurias so what's the difference between name and private_name?
19:13 hercynium joined #perl6
19:14 finanalyst pmichaud: thanx
19:14 sjohnson joined #perl6
19:14 PerlJam pmurias: has $.foo;  # name == $.foo, private name == $!foo  (maybe)
19:14 * PerlJam is only vaguely aware of what you're talking about  :)
19:15 pmichaud the attributes name is always with the ! twigil.  The use of the . indicates generation/use of an accessor method.
19:15 pmichaud has $.foo   # attribute name == $!foo, generates 'foo' accessor method
19:16 mizioumt joined #perl6
19:16 pmichaud say $!foo   # access attribute directly
19:16 pmichaud say $.foo   # use 'foo' accessor method
19:17 ruoso pmurias, "name" is there so you can know how the attribute was originally declared...
19:17 ruoso has $.attr; has $!other;
19:17 dalek rakudo: 951ffe5 | pmichaud++ | build/PARROT_REVISION:
19:17 dalek rakudo: Bump PARROT_REVISION to get some recent changes, including get_subid.
19:17 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9​51ffe5a402952536c964005d1682fe93bb409c4
19:18 pmurias ruoso: i could use a Attribute.id or similiar
19:20 pmurias .UID?
19:23 * jnthn is back
19:23 sbp rakudo: say 1..2 X 5..6
19:24 p6eval rakudo 77b920: OUTPUT«15162526␤»
19:26 pmichaud rakudo:  for 1..2 X 5..6 { say "$^a, $^b"; }
19:26 p6eval rakudo 77b920: OUTPUT«1, 5␤1, 6␤2, 5␤2, 6␤»
19:28 eMaX joined #perl6
19:29 sbp rakudo: say 'a' .. 'z'
19:29 p6eval rakudo 77b920: OUTPUT«abcdefghijklmnopqrstuvw»
19:29 sbp rakudo: say 'a' .. 'e'
19:29 p6eval rakudo 77b920: OUTPUT«abcde␤»
19:29 sbp why is the trailing z and newline trimmed in the first?
19:29 sbp oh, and the x and y. hmm
19:30 PerlJam rakudo: say 'a' .. 'z'
19:30 p6eval rakudo 77b920: OUTPUT«abcdefghij»
19:30 cotto rakudo: say 0 .. 50
19:30 PerlJam resource limits
19:30 p6eval rakudo 77b920: OUTPUT«0123456789101112»
19:30 PerlJam (it ran out of time)
19:30 sbp really? to say 'a' .. 'z'? hmm
19:30 sbp thanks
19:30 pmichaud yes, it seems to me that p6eval's limits are set a tad too tight.
19:31 sbp rakudo: say 'ä' .. 'ë'
19:31 p6eval rakudo 77b920: OUTPUT«./perl6: error while loading shared libraries: libparrot.so.1.2.0: cannot open shared object file: No such file or directory␤»
19:31 pmichaud (rakudo rebuild currently taking place... try again in a few mins)
19:31 sbp okay, thanks
19:35 pochi there's a 5 sec. timeout set on p6eval
19:35 pmichaud increasing that to 6 would probably make a big difference.
19:35 sbp it is, after all, perl*6*
19:36 pmichaud rakudo: say 'a'..'z'
19:36 p6eval rakudo 77b920: OUTPUT«sh: ./perl6: No such file or directory␤»
19:37 jferrero joined #perl6
19:38 pmurias ruoso: i'll add a storage_name property to Attribute (generated from the attributes name and the $?PACKAGE)
19:38 pmurias s/property/attribute/
19:39 sbp rakudo: say 'ä' .. 'ë'
19:39 p6eval rakudo 951ffe:  ( no output )
19:40 Tene rakudo: say 'hi'
19:40 p6eval rakudo 951ffe: OUTPUT«hi␤»
19:40 Tene rakudo: say 'a'..'f'
19:40 p6eval rakudo 951ffe: OUTPUT«abcdef␤»
19:41 bloonix rakudo: say 'a' .. 'z'
19:41 p6eval rakudo 951ffe: OUTPUT«abcdefghijklmnopqrstuvwxyz␤»
19:41 bloonix rebuild done
19:42 sbp what's up with this?
19:42 sbp rakudo: <a b> X~ '.' X~ <1 2>
19:42 mizioumt joined #perl6
19:42 p6eval rakudo 951ffe: OUTPUT«too many arguments passed (3) - 2 params expected␤in Main (src/gen_setting.pm:3166)␤»
19:42 sbp there's an example in S03, @files X~ '.' X~ @extensions
19:43 sbp (S03:1686)
19:43 Tene rakudo: say 'ä' .. 'ë'
19:43 p6eval rakudo 951ffe:  ( no output )
19:43 sbp rakudo: say <a b> X~ <1 2>
19:43 p6eval rakudo 951ffe: OUTPUT«a1a2b1b2␤»
19:44 Tene rakudo: say <a b> X~ '.'
19:44 p6eval rakudo 951ffe: OUTPUT«a.b.␤»
19:44 sbp rakudo: say (<a b> X~ '.') X~ <1 2>
19:44 p6eval rakudo 951ffe: OUTPUT«a.1a.2b.1b.2␤»
19:44 sbp rakudo: say <a b> X~ <.> X~ <1 2>
19:44 p6eval rakudo 951ffe: OUTPUT«too many arguments passed (3) - 2 params expected␤in Main (src/gen_setting.pm:3166)␤»
19:44 Tene X is list-associativity
19:45 pochi how difficult would it be to get readline support in the rakudo shell?
19:46 nihiliad left #perl6
19:46 Tene pochi: it should have it.
19:46 sbp rakudo: <1 2> X <a b> Z <p q>
19:46 p6eval rakudo 951ffe:  ( no output )
19:46 sbp rakudo: say <1 2> X <a b> Z <p q>
19:46 p6eval rakudo 951ffe: OUTPUT«1paq␤»
19:47 pochi hm, did I miss a compilation flag or something?
19:48 Tene pochi: check the output of parrot's Configure.pl
19:49 sbp rakudo: say <1 2> X (<a p>, <b q>)
19:49 p6eval rakudo 951ffe: OUTPUT«1a1p1b1q2a2p2b2q␤»
19:50 pochi Does your platform support readline................done.
19:50 sbp [[[
19:50 sbp but:
19:50 sbp @a X @b Z @c
19:50 sbp is parsed as:
19:50 sbp @a X (@b Z @c)
19:50 sbp ]]] — S03:89
19:50 Tene sbp: I see the problem with X~... looking for a fix...
19:50 sbp doesn't look like it currently is
19:50 sbp thanks
19:51 sbp also, typo 'disambiguoate' at S03:103
19:52 pmichaud Rakudo uses readline functionality by default if Parrot provides it.
19:52 nihiliad joined #perl6
19:52 pmichaud Parrot reports "done" even if readline functionality isn't present.  For example, on my system (Kubuntu 9.04)  I have to explicity install the "libreadline5-dev" package in order to get readline support in Parrot.
19:53 pochi I was a bit confused by that "done" :)
19:53 sjohnson pochi: cute nickname
19:53 pochi ty :)
19:54 Tene pmichaud: src/builtins/op.pir is wrong... it generates infix:X~ as a sub that accepts two params, but X is list-associativity, so it should accept a slurpy and pass it with :flat.
19:54 pmichaud Tene: checking.
19:55 Tene oh, no, that's built by build/gen_metaop.pir
19:55 pmichaud I thought tha.... right
19:55 skids rakudo: class XT is Int { has $.xtra is rw; }; my $x of XT = 3;
19:56 p6eval rakudo 951ffe: OUTPUT«Type mismatch in assignment; expected something matching type XT but got something of type Int()␤in Main »
19:56 Tene do I need to fix it for any others?
19:56 pmichaud it probably needs to be fixed in both src/builtins/op.pir and in gen_metaop
19:56 sbp rakudo: say @@(<a b> X <1 2>)
19:56 p6eval rakudo 951ffe: OUTPUT«say requires an argument at line 2, near " @@(<a b> "␤in Main (src/gen_setting.pm:2400)␤»
19:57 sbp but:
19:57 sbp say @@(<a b> X <1 2>)
19:57 sbp ['a', '1'], ['a', '2'], ['b', '1'], ['b', '2']
19:57 sbp S03:1658
19:57 pmichaud rakudo doesn't know @@( yet
19:57 sbp 'k
19:57 Tene yes, that's what I thought.
19:57 Tene I don't know the right way to get the associativity, though, or the full list of what needs to be whtat.
19:57 pmichaud the associativity is already taken care of by being   'equiv'=>'infix:X'
19:57 pmichaud we just need to fix the function calls to accept a list of arguments.
19:58 pmichaud in other words,   Rakudo is already parsing   @a X~ @b X~ @c as list associative.
19:58 pmichaud and calling X~ with three arguments
19:58 mizioumt1 joined #perl6
19:58 Tene right.
19:59 pmichaud (which infix:X~ fails on, because it's expecting two)
19:59 Tene rakudo needs a newer parrot... updating parrot...
20:00 pmichaud oh happiness!   r39239 gives us back our spectest speed, plus we get a boost from chromatic++'s other speed improvements
20:00 Tene :)
20:00 Tene man, I haven't updated parrot in a while.
20:00 PerlJam pmichaud: what does it look like now?
20:00 * skids claps rapidly
20:00 Tene Where have i been?
20:00 sbp rakudo: 1 ... { -$_ }
20:00 p6eval rakudo 951ffe: OUTPUT«Statement not terminated properly at line 2, near "... { -$_ "␤in Main (src/gen_setting.pm:0)␤»
20:01 sbp also known to be not supported? (or did I do something wrong?)
20:01 pmichaud so, prior to switching to .HLL 'perl6', "make spectest" was approximately ~34 mins on my box.  It's now 28m45
20:01 PerlJam sbp: I don't think rakudo understands that form of ...
20:02 sbp what form does it understand?
20:02 pmichaud rakudo:  28 * 60 + 45
20:02 p6eval rakudo 951ffe:  ( no output )
20:02 pmichaud rakudo:  say 28 * 60 + 45
20:02 p6eval rakudo 951ffe: OUTPUT«1725␤»
20:02 pmichaud rakudo: say 34 * 60
20:02 p6eval rakudo 951ffe: OUTPUT«2040␤»
20:02 pmichaud rakudo: say (2040-1725)/2040.0
20:02 p6eval rakudo 951ffe: OUTPUT«0.154411764705882␤»
20:02 pmichaud 15% improvement.
20:02 DanielC @karma DanielC
20:02 lambdabot You have a karma of 4
20:03 PerlJam sbp:  sub foo { ... }
20:03 DanielC @karma DanielC
20:03 lambdabot You have a karma of 4
20:03 sbp ah
20:03 sbp shame, I like its series operator guise
20:04 PerlJam DanielC++  (for all the neocpan discussion)
20:04 DanielC :-)
20:04 sbp “If the right operand is * (Whatever) and the sequence is obviously arithmetic or geometric, the appropriate function is deduced” — ?!
20:04 PerlJam sbp: perl is magic!  :)
20:04 sbp going to be fun testing that!
20:04 DanielC PerlJam: I was trying to test if I got karma points for committing to perl6-examples. It looks like I don't.
20:05 PerlJam DanielC: does one of the bots watch perl6-examples?
20:05 DanielC I dunno
20:05 DanielC You mean it's not all the same?
20:05 PerlJam nope
20:06 DanielC ok
20:06 PerlJam the bot has to know which repos to watch for commits.
20:06 DanielC I guess it would be too easy to get karma points for examples.
20:06 skids pugs: class XT is Int { has $.xtra is rw; }; my $x of XT = 3; $x.say;
20:06 p6eval pugs: OUTPUT«*** ␤    Unexpected "of"␤    expecting "?", "!", trait, "=", infix assignment or operator␤    at /tmp/eNr0A7W7Qq line 1, column 46␤»
20:07 PerlJam pugs: class XT is Int { has $.xtra is rw; }; my Int $x = 3;
20:07 p6eval pugs:  ( no output )
20:07 pmichaud std:  say qw(DeeDee Ramone);
20:07 p6eval std 26967: OUTPUT«Undeclared names:␤     DeeDee used at 1 ␤        Ramone used at 1 ␤Undeclared routine:␤      qw used at 1 ␤ok 00:02 35m␤»
20:07 PerlJam skids: remember, pugs is frozen in time from a while ago  :)
20:08 PerlJam pugs: class XT is Int { has $.xtra is rw; }; my XT $x = 3;  # your example
20:08 p6eval pugs:  ( no output )
20:08 * skids didn't know "$x of" was that new
20:08 skids pugs: class XT is Int { has $.xtra is rw; }; my XT $x = 3; $x.say;
20:08 p6eval pugs: OUTPUT«3␤»
20:09 dalek rakudo: c36d4f2 | pmichaud++ | src/parser/grammar.pg:
20:09 dalek rakudo: Correct qw() and other quotes-that-are-really-functions (TimToady++).
20:09 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​36d4f22e2735aade4078905d6279ba99bf6ff6a
20:09 pmichaud pugs:  class XT is Int { has $.xtra is rw; };  say ?(3 ~~ XT);
20:09 p6eval pugs: OUTPUT«␤»
20:09 PerlJam skids: that's probably a bug that's already been reported since it seems to be general.
20:09 pmichaud pugs:  class XT is Int { has $.xtra is rw; };  my XT $x;  $x = 3;  $x.say;
20:09 p6eval pugs: OUTPUT«3␤»
20:10 pmichaud I claim pugs is wrong here.
20:10 PerlJam rakudo:  class A {}; class B is A {};  my B $b = A.new;
20:10 p6eval rakudo 951ffe: OUTPUT«Type mismatch in assignment; expected something matching type B but got something of type A()␤in Main (/tmp/Z1qDR5ghwd:2)␤»
20:10 jnthn pmichaud: Agree.
20:10 pmichaud pugs:  class XT is Int { has $.xtra is rw; };  say ?(3 ~~ Int);
20:10 jnthn pmichaud: But Pugs never AFAIK enforced type constraints on variables.
20:10 p6eval pugs: OUTPUT«1␤»
20:10 skids What I'm trying to wrap my head around is the fact that some classes have these invisible attributes.
20:11 skids That is, their primary value.
20:11 pmichaud I don't understand.
20:11 PerlJam skids: they aren't invisible if you give them an accessor :)
20:11 skids Well, "self" of an Int has a value.
20:11 skids But self also has all the class baggage
20:12 pmichaud what "class baggage"?
20:12 skids If you cad class X { has Int $f }, .f is it's own class.
20:13 PerlJam skids: you mean Int is really declared something like this:   class Int { has $!val; }  ?
20:13 pmichaud for something like    3.foo()     inside of method "foo"  the self will be the 3
20:13 pmichaud with   class X { has Int $f }   -- we simply have a $!f attribute that is constrained to hold values that ~~ Int
20:14 pmichaud (or undefs)
20:14 skids PerlJam: exactly, and how one might do that other than "is Int"ing another class.
20:14 PerlJam skids: I think you're in the realm of operator overloading.
20:15 PerlJam skids: assuming I'm right that you want to figure out how to make my X $x = 7; work just like my Int $i = 3;
20:15 makkabutta joined #perl6
20:16 skids PerlJam: yeah, but is seems like that still leaves Int and friends as some privilaged voodoo thing.
20:17 * skids thinks it would be more consistent if there was a default attribute name for the builtin classes.
20:17 PerlJam "default attribute name"?
20:17 skids like a .val
20:17 PerlJam oh
20:18 skids But something not collide-prone
20:20 skids Unless it's like that already and I'm just not seeing it because it's a private attrib?
20:20 cdpruden joined #perl6
20:20 PerlJam skids: so, let's say there is a method called .VAL,  you would want 3.VAL == 3  ?
20:22 skids Well, sorta.  Mainly I'd like to be able to talk unabiguously about that attribute.
20:22 Tene sbp: fixed the X~ stuff.
20:22 skids Not necessarily in code.
20:23 amoc joined #perl6
20:23 Tene just pushed.
20:23 Tene I think it might need to happen for some of the other meta-ops
20:23 Tene unsure.
20:24 pmichaud Tene: does the commit also fix the user-generated metaops?
20:24 Tene doubtful.
20:24 skids Though, as far as a ttangible benefit, not having to do op overloading to get an intrinsic value working might be a benefit of being able to define such for a new class.
20:25 sbp Tene: great, thanks!
20:25 skids Either that, or something somewhere that says, yeah, you cannot see this attribute, but it exists and in order to make it work, operators are defined.
20:25 pmichaud skids:  I thought that was the basic principal of OO :-)
20:25 pmichaud *principle
20:26 pmichaud "you cannot see my attributes, but they exists and in order to use them you can use these operators to do it..."
20:26 dalek rakudo: 92c78fa | tene++ |  (2 files):
20:26 dalek rakudo: Fix cross meta ops to work with more than two args
20:26 dalek rakudo: I think this needs to happen for more metas
20:26 dalek rakudo: sbp++
20:26 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9​2c78fae1ef740d44408259d83dcf3e48ac76a0a
20:26 skids pmichaud: sure, it's just that it looks like a seam, even if it isn't really.
20:27 mizioumt joined #perl6
20:27 pmichaud I guess I'm just not seeing the seam.
20:29 pmichaud class Y is X { ... };    my Y $x = X.new;    # I would expect this to nearly always fail.
20:29 pmichaud because an X is not a Y
20:31 skids OK, point taken.
20:31 hercynium joined #perl6
20:32 cdpruden rakudo: use IO::Socket::INET; my $s = IO::Socket::INET.new; $s.open(q/thor.merit.edu/, 25); $s.recv().perl.say; # don't really expect sockets to be allowed
20:32 p6eval rakudo 92c78f:  ( no output )
20:33 mizioumt joined #perl6
20:33 cdpruden with that, though -- should .recv return more or less immediately?
20:33 cdpruden it winds up waiting until a timeout, then it returns the banner, and a message that says it timed out.
20:35 Tene cdpruden: there's a 5s timeout on the bot
20:35 cdpruden ah, okay.  I wasn't really expecting it to work on the bot, anyway
20:35 pochi pmichaud++: pulling in libreadline-dev and recompiling worked great
20:36 pasteling "cdpruden" at 198.108.62.5 pasted "The recv doesn't return until the server sends the 421 and disconnects" (3 lines, 244B) at http://sial.org/pbot/36905
20:36 mberends cdpruden, Tene: that .recv stalls in my Net::SMTP module as well.
20:36 cdpruden This is essentially what I was trying for, though
20:36 cdpruden oh, hehe, yes, I was just starting to hack on a Net::SMTP module as well :)
20:37 pmichaud rakudo:  say 'a'..'z';
20:37 p6eval rakudo 92c78f: OUTPUT«abcde»
20:37 pmichaud rakudo:  say 'a'..'z';
20:38 p6eval rakudo 92c78f: OUTPUT«abcdef»
20:38 skids rakudo: class X { has $!x = 4; method px { $!x.say } }; class Y is X { has $.x }; my $y of Y;  $y = Y.new(x=>3); $y.x.say; $y.px
20:38 p6eval rakudo 92c78f: OUTPUT«3␤3␤»
20:38 pmichaud I'm guessing the bot must be _really_ slow, though.
20:38 Tene rakudo: use IO::Socket::INET; my $s = IO::Socket::INET.new; $s.open(q/pleasedieinafire.net/, 9876); $s.recv().perl.say;
20:38 p6eval rakudo 92c78f: OUTPUT«"omg hai doods\n"␤»
20:38 Tene :)
20:38 pmichaud on my system,  ./perl6 -e "say 'a'..'z'"    runs in under 1.0 second
20:39 pmichaud and that's not even my _fast_ system.
20:39 Tene 0.4s for me
20:39 pochi 1.2s for me
20:39 pmichaud are we sure that it's a 5s timeout?  Or perhaps something else is going on with p6eval?
20:40 Tene 0.44 for "say 'a'", 0.47 for "say 'a'..'z'"
20:40 cdpruden the smtp one isn't coming back for a different reason than timeout
20:40 pochi I think it's the "alarm 5" that is doing it
20:40 pmichaud where is p6eval so I can look at it?
20:40 cdpruden does recv only return when it hits eof?
20:41 cdpruden (meaning the parrot recv, actually)
20:42 lisppaste3 joined #perl6
20:42 bloonix p6eval runs on my machine
20:43 Tene rakudo: use IO::Socket::INET; my $s = IO::Socket::INET.new; $s.open(q/pleasedieinafire.net/, 9876); $s.recv().perl.say;
20:43 p6eval rakudo 92c78f: OUTPUT«"omg hai doods\n"␤»
20:43 pochi pmichaud: http://svn.pugscode.org/pugs/misc/evalbot
20:45 Tene rakudo: (<foo bar baz> X~ '.' X~ <jpg mp3 txt>).perl.say
20:45 p6eval rakudo 92c78f: OUTPUT«["foo.jpg", "foo.mp3", "foo.txt", "bar.jpg", "bar.mp3", "bar.txt", "baz.jpg", "baz.mp3", "baz.txt"]␤»
20:45 Tene sbp++
20:46 pmichaud Tene: I'll work on fixing the custom metaop generation for Xop
20:46 hercynium join #perl
20:46 hercynium oops
20:46 pmichaud Tene: did you ever find out what was going on with that weird unicode variable?
20:47 Tene pmichaud: I think it was a weird rakudo build... I updated everything and now it just fails, complaining that it can't be parsed
20:47 pmichaud okay.
20:47 hercynium ah... hey, anybody here with ops in #perl, both here and on MAGNet?
20:47 Tene which is probably right, as ☕ isn't a letter, iirc
20:47 sbp ah! it's bottable, cool
20:47 hercynium I'm working from a cafe and it looks like some luser got the IP banned :(
20:47 sbp how comes p6eval picked it up?
20:47 sbp despite the fact that it rebuilt rakudo before you fixed this
20:48 sbp which I presume is a daily cron
20:48 Tene sbp: rebuilds regularly.
20:48 pmichaud sbp:  it's a 30 minute cron
20:48 sbp oh. surprised I've not noticed its build downtime before. thanks
20:49 PerlJam I thought it was a 60 minute cron
20:49 PerlJam (top of the hour only.  I've never noticed a problem at the bottom of the hour)
20:50 pmichaud since Tene++'s push has been since the top of the hour, it has to be more often than that :-)
20:51 skids (at least, for those of us who schedule hourly jobs on the 0)
20:51 skids :-)
20:51 pmichaud also, I have:
20:51 pmichaud 19:36 <p6eval> rakudo 77b920: OUTPUT«sh: ./perl6: No such file or directory␤»
20:51 pmichaud which means the rebuild was taking place at the bottom of the hour.
20:51 bloonix 0,15,30,45 * * * * perl /home/evalenv/build-rakudo.pl
20:52 sbp heh, we were all wrong
20:52 PerlJam no, just right to varying degrees.
20:52 sbp hehe
20:52 pmichaud I just missed the 30 minute cycle that was offset 15 minutes from the one I knew about :-)
20:52 PerlJam Just like Newton is still right, even though Einstein refined his results a litt.e :)
20:52 PerlJam er, little
20:53 ejs joined #perl6
20:53 pmichaud bloonix: any way we could get a timing of    ./perl6 -e "say 'a'..'z'"   on the box, to perhaps find out how long it's taking there?
20:54 bloonix pmichaud: do you want a login to the box?
20:54 pmichaud that would work, too :-)
20:54 bloonix moritz administrates the machine, I am just the owner ^^
20:54 PerlJam It doesn't run on one of the feathers?
20:54 pmichaud I'm just surprised that rakudo is taking >5s to run some of these short programs.
20:55 bloonix there are different crons on that machine
21:01 daemon joined #perl6
21:04 mberends Tene: could you please try that last recv() on an SMTP server port 25? For me it hangs every time :-(
21:07 skids rakudo: class X { has $!x = 4; submethod sx { $!x.say }; method px { sx(self) } }; class Y is X { has $.x }; my $y of Y;  $y = Y.new(x=>3); $y.x.say; $y.px
21:07 p6eval rakudo 92c78f: OUTPUT«3␤3␤»
21:10 ruoso rakudo: sub infix:<mms> { $^a + $^b }; say [mms] 1,2,3,4,5
21:10 p6eval rakudo 92c78f: OUTPUT«15␤»
21:11 kate21de joined #perl6
21:16 skids So how would one refer to X's !x attribute, regardless of the object's subclass, then, or is rakudo wrong?
21:20 M_o_C joined #perl6
21:21 jnthn pmichaud: Down to six test files with failures now I think.
21:22 jnthn pmichaud: However, got some others that pass all tests and appear to then explode on exit. :-|
21:22 Whiteknight joined #perl6
21:23 PerlJam skids: you mean as opposed to Y's $!x attribute?  Because they are the same thing.  you've only got one attribute there.
21:24 skids PerlJam: that doesn't seem sane.
21:24 skids What if Y was REALLY opaque.
21:24 skids Erm, x even
21:24 skids or even X
21:25 jnthn skids: I think Rakudo may well be wrong there.
21:26 PerlJam skids: I think it's insane to have two attributes with the same name.
21:26 jnthn PerlJam: Not really - you shouldn't have to know the attribute names of your parent classes.
21:27 jnthn Or care about them.
21:27 skids PerlJam: true that, but if a situation were to arise where you could not see X's code...
21:27 jnthn Sure you wouldn't do it purposefully.
21:28 skids (...or trust it not to change underneath you via upgrade)
21:28 donaldh joined #perl6
21:29 PerlJam skids: what would you expect this to do:  class X { has $.x; }; class Y is X { has $.x }  ?
21:30 PerlJam jnthn: you too
21:30 skids PerlJam: if it's $.x, it is public API and has to be documented.
21:30 jnthn PerlJam: Both X and Y have an attribute $!x
21:30 jnthn PerlJam: If you instantiate a Y and call .x you'll get the accessor in Y.
21:31 jnthn $obj.X::x would (when implemented) yet you the one from x
21:31 jnthn erm, form X.
21:31 skids (and what jnthn said :-)
21:36 * skids leaves work on mission to increase his carbon footprint (and get home)
21:36 skids I really should bit the bullet and move.
21:37 PerlJam jnthn: yeah, that seems right I guess.  I was letting possible implementation details leak into my thinking.
21:39 jnthn oh noes!
21:39 jnthn oh, interesting
21:39 jnthn .can on a Junction is a little curious.
21:39 PerlJam But that means that use of $!foo should probably be discouraged.
21:40 jnthn Because you don't know if it can without seeing if all of its values can?
21:40 jnthn Hmm.
21:47 pmichaud (discourage $!foo)  I simply think it means that someone writing a class has to think a bit about what's public and what's private.
21:47 TimToady anywhere you can see $!foo, it's perfectly fine to use it, as long as you don't really mean $.foo instead :)
21:48 bloonix w
21:49 TimToady and submethods should generally always use $!foo
21:50 Eevee rakudo: say [**] 2, 2, 4
21:50 p6eval rakudo 92c78f: OUTPUT«256␤»
21:50 PerlJam pm:  class X { has Int $!x;  method foo { ... do something with $!x ... } }; class Y is X { has Str $!x; };  Y.new.foo;  # likely to break unless Y.foo somehow knows to use X-component's $!x;
21:51 TimToady doesn't break at all
21:51 TimToady neither $!x is visible outside its immediate class
21:51 TimToady they are completely independent
21:51 jnthn PerlJam: Rakudo has $.bug in that attribute lookups are currently too virtual.
21:52 PerlJam TimToady: so the $!x in foo() is always the $!x from X ?
21:52 TimToady $!x lookups?
21:52 TimToady PerlJam: yes
21:52 jnthn TimToady: Yes
21:53 TimToady that's the whole point of the !
21:53 jnthn TimToady: I know they shouldn't be, but Rakudo doesn't yet. :-)
21:53 Eevee rakudo: (2, 2, 4).reverse.reduce: { $^b ** $^a }
21:53 p6eval rakudo 92c78f:  ( no output )
21:53 Eevee rakudo: say((2, 2, 4).reverse.reduce: { $^b ** $^a })
21:53 p6eval rakudo 92c78f: OUTPUT«65536␤»
21:53 Eevee wow
21:53 Eevee rakudo has come a long way
21:53 PerlJam TimToady: this is something I know, but clearly there's something blocking visceral understanding  :)
21:54 TimToady you know how you look from the outside, and you know how you feel on the inside.  $!x is the inside, and $.x is the outside, if you're an object
21:54 * PerlJam makes a mental note to play with perl6 OO more
21:55 TimToady so $.x is always virtual, while $!x never is.
21:56 TimToady $.x is the wart on the nose of the (outermost) mask over your face, while $!x is the itch on your nose
21:56 TimToady if you don't expose a method saying "my nose itches", nobody will ever know it
21:56 jnthn eww.
21:58 TimToady the only difference is that each mask gets to have its own set of itches that are invisible to any other masks (or you)
21:58 Tene say 'eww' if ::TimToady.itches;
21:58 TimToady perhaps N layers of clothes would be a better metaphor...
21:59 Guest55951 joined #perl6
22:01 jnthn OK...so I'm down to 1 segfault that I don't understand and two failing test files that I do understand and some possible heisenbugs.
22:02 * jnthn is getting optimistic of having the dispatcher ready-ish for pushing tomorrow.
22:03 * sjohnson should try rakudo one of these days
22:03 bkeeler joined #perl6
22:03 szabgab joined #perl6
22:03 jrockway joined #perl6
22:03 Tene joined #perl6
22:03 Tene TimToady.unwrap()
22:04 PerlJam rakudo: my $x; class T { $x = 5 }
22:04 p6eval rakudo 92c78f: OUTPUT«Lexical '$x' not found␤»
22:04 PerlJam That's known right?
22:04 Tene joined #perl6
22:04 pmichaud Yes.
22:04 pmichaud The problem is that at the point that the $x = 5 executes (BEGIN), we haven't even finished parsing its outer block yet.
22:05 pmichaud so it doesn't have a lexical.
22:09 pmichaud pmichaud@timtowtdi:~/rakudo$ time PERL6LIB=lib ./perl6 -e "use Safe; say 'a'..'z'"
22:09 pmichaud abcdefghijklmnopqrstuvwxyz
22:09 pmichaud real0m1.786s
22:09 pmichaud still under 2s on the evalbot box.
22:09 pmichaud So I'm not sure what's eating up the other ~2 seconds.
22:12 jnthn pmichaud: And getting rid of the 5 second limit helps?
22:12 pmichaud I don't have that sort of access (afaik)
22:12 jnthn ah, ok
22:12 pmichaud I've tried running my own copy of evalbot on the box but I don't know exactly how to configure it.
22:13 pmichaud so I'm unable to get it started.
22:14 bloonix pmichaud: you should talk with moritz about that
22:14 pmichaud agreed, but I think he's away for a few weeks :-(
22:14 bloonix holiday?
22:14 pmichaud iirc, yes.
22:14 bloonix ah, yes, norway
22:15 bloonix the problem is not the bot itself... there are different cronjobs on the machine
22:16 pmichaud I'm not sure I understand what the cronjobs have to do with it.
22:17 bloonix the jobs needs a lot of cpu
22:17 pmichaud yes, but in theory since I'm running the same process on the box, I should see similar slowdowns, yes?
22:18 pmichaud i.e., I'm when I'm running my copy of perl6, it's also competing with the cronjobs
22:18 bloonix yes, if a cronjob is running at the same time :)
22:18 pmichaud I don't think it's a cronjob, because
22:18 pmichaud rakudo:  say 'a'..'z';
22:18 p6eval rakudo 92c78f: OUTPUT«abcdefghijklmnopqrstuvwxyz␤»
22:18 pmichaud rakudo:  say 'a'..'z';
22:18 p6eval rakudo 92c78f: OUTPUT«abcdefghijklmnopqrstuvwxyz␤»
22:18 pmichaud oh great, it's working now.  :-(
22:18 pmichaud earlier it was consistently failing.
22:18 bloonix but it shouldn't
22:18 pmichaud rakudo:  say 'a'..'z';
22:18 p6eval rakudo 92c78f: OUTPUT«abcdefghijklmnopqrstuvwxyz␤»
22:19 pmichaud rakudo:  say 'a'..'z';
22:19 p6eval rakudo 92c78f: OUTPUT«abcdefghijklmnopqrstuvwxyz␤»
22:19 pmichaud hmmpf.
22:19 pmichaud okay, it must be that it's competing with cron tasks.
22:19 bloonix PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
22:19 bloonix 7436 evalenv   25   0 98.0m  95m 1980 R 94.0  9.6   0:51.27 tryfile
22:19 pmichaud rakudo:  say 'a'..'z';
22:19 p6eval rakudo 92c78f: OUTPUT«abcdefghijklmnopqrstuvwxyz␤»
22:20 pmichaud oh well, I give up for now.
22:20 pmichaud time to work on other things.  bloonix++ for letting me experiment a bit.
22:21 bloonix I change the cron and write moritz a email
22:30 cotto rakudo: say 0 .. 50
22:30 p6eval rakudo 92c78f: OUTPUT«012345678910111213141516​171819202122232425262728293031»
22:31 cotto rakudo: say 0 .. 50
22:31 p6eval rakudo 92c78f: OUTPUT«012345678910111213141516​171819202122232425262728293031»
22:31 cotto rakudo: say 65536 .. 65556
22:32 p6eval rakudo 92c78f: OUTPUT«6553665537655386553965540655416​55426554365544655456554665547655486554​965550655516555265553655546555565556␤»
22:41 sjohnson rakudo: 1..3.say
22:41 p6eval rakudo 92c78f: OUTPUT«3␤»
22:41 sjohnson rakudo: (1..3).say
22:41 p6eval rakudo 92c78f: OUTPUT«123␤»
22:41 bloonix rakudo: class Foo-1.000;
22:41 p6eval rakudo 92c78f: OUTPUT«Unable to parse class definition at line 2, near "-1.000;"␤in Main (src/gen_setting.pm:1440)␤»
22:42 DanielC pmichaud: Are people supposed to get karma points if they commit to perl6-examples?
22:48 Infinoid Does perl6-examples have an rss/atom feed?  Where's it hosted?
22:49 davidad joined #perl6
22:51 pugs_svn r26968 | lwall++ | [S04] expand on C<$!> semantics, remove requirement for GC on block exit
22:51 Infinoid DanielC: If the #perl6 powers that be want it, I can easily add a perl6-examples feed to dalek.
22:52 DanielC Infinoid: Ok. I would like that, since its the only place I'm committing to right now.
22:52 DanielC Maybe pmichaud is around.
22:53 Infinoid Yeah, let me know if/when you get an answer back from patrick.  I don't normally pay much attention to this channel, so I don't want to spam it up for you guys unless you actually want it :)
22:53 jnthn I don't have a problem with such a feed.
22:53 LadyLunacy joined #perl6
22:57 DanielC Infinoid: Does jnthn count as the "#perl6 powers that be"? He is an op.
22:57 bloonix rakudo: class Foo:ver<0.001>:auth<cpan:BLOONIX>;
22:57 p6eval rakudo 92c78f: OUTPUT«Unable to parse class definition at line 2, near ";"␤in Main (src/gen_setting.pm:1440)␤»
22:58 pugs_svn r26969 | lwall++ | [S04] typos
23:00 pmichaud I'm around.
23:00 TimToady I'm around the bend.
23:01 bkeeler rakudo: my $foo = 3; class Bar { method a() { say $foo } }; Bar.new.a
23:01 p6eval rakudo 92c78f: OUTPUT«Lexical '$foo' not found␤»
23:01 pmichaud for perl6-examples:  "forgiveness is better than permission"
23:01 bkeeler Is that supposed to work?
23:01 pmichaud in rakudo, lexicals inside of class definitions currently don't work.
23:01 TimToady we just had that question about an hour ago
23:01 pmichaud (i.e., lexicals that look outside of the class definition)
23:01 bkeeler Aha, I'm only half paying attention
23:02 pmichaud Infinoid: I'm certainly okay with a dalek feed from perl6-examples, or any other repo I'm working with
23:02 Infinoid Great.  Are these listed somewhere?
23:02 TimToady sorry, only 57 minutes ago  :)
23:03 Infinoid For #parrot, the vast majority of feeds are autoconfigured by scraping http://trac.parrot.org/parrot/wiki/Languages
23:03 amoc joined #perl6
23:03 Infinoid I don't mind maintaining a feed list by hand for you guys, but I think it will work better if the motivated people can do it themselves :)
23:03 pmichaud the perl6-examples feed is on github
23:04 pmichaud github.com/perl6/perl6-examples
23:04 Infinoid Can do
23:05 Infinoid DanielC: And yes, jnthn definitely counts as a power that be, too :)
23:05 DanielC :-)
23:05 jnthn <rave>I got the power!</rave>
23:05 Infinoid jnthn++
23:06 DanielC heh
23:06 Infinoid Hooray for cheesy 80's house music
23:06 pmichaud my power is all tied up in &infix:<**> at the moment.
23:06 TimToady boom boom chicka chicka
23:06 TimToady [**] == power reduction
23:06 pmichaud ouch!
23:07 * TimToady bows
23:07 Infinoid Someday I will make music using perl6 hyper-operators
23:07 pmichaud I'm guessing that TimToady++ is feeling a bit better today :-)
23:07 TimToady yes, my 6-day headache seems to be receding
23:07 pmichaud Good.  I'm on day 3 of mine, but it's receding also.
23:08 pmichaud anyway, time to fetch dinner.
23:18 skids joined #perl6
23:24 * jnthn -> sleep
23:30 Whiteknight joined #perl6
23:42 Eevee what are the plans for the p6 standard library?
23:45 armagad joined #perl6
23:45 TimToady see http://perlcabal.org/syn/
23:45 TimToady particularly S32
23:48 TimToady other than that, we plan to minimize the standard library and depend on distributions/network
23:48 TimToady as linux does
23:49 TimToady *as the linux kernel does
23:49 DanielC I didn't know that. So Perl 6 will have fewer built-in functions than Perl 6?
23:49 DanielC *than Perl 5
23:49 TimToady I didn't say that :)
23:49 Eevee oh hey this stuff is new to me
23:49 TimToady it will have lots of built-in functions
23:50 TimToady but not as many as PHP
23:50 DanielC :-)
23:50 Eevee as many as PHP would be an impressive feat
23:50 DanielC PHP has an absurd number of built-ins... like 10 sort functions.
23:50 TimToady s/im/de
23:50 DanielC Eevee: No, it wouldn't.
23:50 DanielC Eevee: 10 sort functions?
23:51 Eevee that's what you get for not having first-class functions
23:51 DanielC Part of the reason PHP has so many functions is that there is a lot of needless duplication. Were the functions better designed, there would be fewer of them.
23:51 Eevee well, many of them were also around before PHP had any OO
23:51 Eevee or namespacing
23:51 TimToady indeed, which is why I'm not worried about p6 in that regard
23:52 DanielC Eevee: Not even. You could have a function that takes another parameter instead of making a whole other function.
23:52 Eevee that doesn't work so well when there are no named parameters either
23:52 Eevee PHP already has problems with parameters
23:52 DanielC and PHP's functions are very inconsistently named too.
23:53 DanielC verb_object vs object_verb;  wordstogether vs words_with_underscores
23:53 TimToady between lexical scoping, namespaces, MMD, named parameters, and higher-order programming, p6 doesn't really have to worry much about name pollution
23:53 DanielC What is MMD?
23:54 TimToady multi-method dispatch
23:54 DanielC I'm not familiar with that.
23:54 TimToady usually just multiple dispatch around here
23:54 TimToady when you say $a op $b, there can be multiple op routines that are candidates
23:54 TimToady it picks the best one and calls it
23:55 DanielC ok...
23:55 TimToady is true of all function calls in p6
23:55 Eevee I like stdlibs the size of python's; it's not as unreasonably massive as e.g. Java or .NET, but it has a wealth of common and useful functionality.  CPAN is amazing of course but it's nice to not have to consult it (and worry about dependencies) for simple stuff like fetching over http
23:55 TimToady rakudo: say 1i + 1i
23:55 p6eval rakudo 92c78f: OUTPUT«0+2i␤»
23:55 TimToady calls Complex::infix:<+>
23:56 DanielC Complex is part of the standard language?
23:56 DanielC cool
23:56 TimToady specifically infix:<+>(Complex $x, Complex $y)
23:56 DanielC rakudo: my $a = 2 + 1i; $b = 1 + 3i; say $a + $b
23:56 p6eval rakudo 92c78f: OUTPUT«Symbol '$b' not predeclared in <anonymous> (/tmp/MuThCxuV9D:2)␤in Main (src/gen_setting.pm:3166)␤»
23:56 DanielC rakudo: my $a = 2 + 1i; my $b = 1 + 3i; say $a + $b
23:56 p6eval rakudo 92c78f: OUTPUT«3+4i␤»
23:56 Eevee p5's library is largely plumbing and yet most big cpan packages still depend ultimately on a bunch of other plumbing..  I don't think list/scalar::util are even core (although they won't need to be in p6)
23:56 DanielC cool
23:57 TimToady most of the plumbing is built into p6
23:57 Eevee yeah
23:57 TimToady and most of the time you don't even have to think about it
23:57 DanielC Eevee: Did you know that PHP even has a str_rot13 function as part of the standard library?
23:57 Eevee yes
23:57 DanielC crazy
23:57 Eevee don't worry I know the horrors of PHP's standard lib
23:58 * DanielC has to use PHP at work
23:58 TimToady I would at least generalize it to $str.caesar(13)
23:59 DanielC PHP is a nice templating language, but I wouldn't like to use it or the core program logic.
23:59 DanielC TimToady: Yeah... PHP functions have zero generalization.
23:59 DanielC I just checked... 16 sort functions.
23:59 TimToady which, for some people, is where they think

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

Perl 6 | Reference Documentation | Rakudo