»ö« | perl6-projects.org/ | nopaste: sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is your friend!
Set by Tene on 14 May 2009.
wayland76 DanielC: re undeclared modules; it's if you have two modules that refer to each other. 00:00
DanielC ok 00:01
DanielC imagines module HURD referring to module HIRD and module HIRD referring to module HURD. 00:02
wayland76 Exactly 00:03
DanielC So Perl 6 won't barf if two modules do that?
wayland76 So when you go class HURD { has HIRD $hi; }
it complains
So the synopsis says class HURD { has ::HIRD $hi; } will work 00:04
DanielC k
wayland76 But Rakudo didn't do that last week when I tried it
In fact, it caused exciting errors :)
But you *can* predeclare, so it's not a big problem 00:05
To predeclare, go class HIRD {...} class HURD { has HIRD $child; } class HIRD { has HURD $parent; }
And yes, the ... is actual code, not something I'm leaving out 00:06
And it's not the ... operator :)
DanielC I was about to ask.
and that too :-)
Very interesting.
00:08 lichtkind joined
lichtkind jnthn: excuse had a weird disconnect 00:08
DanielC you are excused.
lichtkind haha 00:09
DanielC :)
lichtkind i suppose operator methods can also be wrapped
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 :)
sjohnson looks behind
lichtkind wayland76: thanks, im only intersted in theory :)
00:11 jferrero left
DanielC lichtkind: Are you implementing something? Or just curious? 00:12
wayland76 If he was implementing something, he'd be interested in practise :)
DanielC :) 00:13
wayland76: He might be implementing a Perl 6 compiler :-)
lichtkind DanielC: i write tutoriels articles and talks about that
DanielC lichtkind: Are you going to write about Perl 6? 00:14
lichtkind DanielC: i do that since 2 years:)
DanielC :-)
wayland76 ZuLuuuuuu, DanielC: I think a grapheme can include multiple characters, no?
DanielC wayland76: Ask TimToady. I'm over my head here. 00:15
I thought I knew what a grapheme was, and then I learned that the world is not as simple as I thought.
lichtkind DanielC: are you interested in helping with the translation in english? 00:17
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
DanielC sagt man "verbessern"?
lichtkind DanielC: yes
DanielC :-)
TimToady a grapheme can contain multiple codepoints
lichtkind DanielC: my english isnt perfect eather
DanielC: want we start with the tut or the articles? 00:19
DanielC ich denke, es ist besser als mein Deutsch.
Pick something short and simple.
TimToady bbl &
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.
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.
wayland76 (ie. After DanielC, whose English seems pretty good :) )
DanielC :-)
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:21 agentzh left
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)
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.
eternaleye: What is a codepoint?
lichtkind DanielC: the tutorials is at wiki.perl-community.de/cgi-bin/fosw.../PerlTafel 00:24
DanielC *click*
lichtkind the translation i wanted to put into official perl 6 wiki
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"?
s/sound/length/?
DanielC wayland76: How does coper differ from copper? (except that one is not a word)
wayland76 DanielC: A better example is "bitter" vs. "biter" 00:27
skids coper would be one who copes, pronounced with a long o.
eternaleye long o (saying the name of the letter) versus short o ("ah")
wayland76 bitter has a short "i", "biter" has a long "i", as in someone who bites
DanielC wayland76: How would you pronounce "bitter" and "biter"?
ah
biter -> someone who bites 00:28
wayland76 biter = /baiter/
DanielC wayland76: I didn't know that. Thanks.
wayland76 (sorry I couldn't get proper IPA -- I need another keyboard layout methinks)
DanielC tries to think of other examples
eternaleye wayland76: Except baiter is an entirely different word pronounced a third way - isn't English sensible?
DanielC cuter vs cutter 00:29
wayland76 Well, I did linguistics (only one unit), so I picked up these things :)
Yes, but I put it in slashes for IPA representation :)
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!
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.
skids: ha ha ha ha
eternaleye DanielC: Cutter comes from cut (one who cuts, the slang implication being themselves) 00:31
wayland76 Matterhorn?
skids DanielC: a lot of them end in e because it'sthe e that makes the vowel long (if there is no double consonant)
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.
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)
DanielC water vs matter -> sound the same
eternaleye DanielC: No, they don't
wayland76 No they don't
DanielC wait... why does water not sound like mate? 00:33
skids but closer that waiter and matter.
eternaleye W - aw - ter vs m - aa - tter
skids s/that/than/
waiter = w ay ter
wayland76 /water/ vs. /mæter/
eternaleye mate = m ay t
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
but clearly that doesn't work.
wayland76 .ety water
skids no,. that would be consistent.
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. [...]" - etymonline.com/?term=water
DanielC skids :)
wayland76 No IPA :(
eternaleye DanielC: Water has the same 'a' as the german word for Father, IIRC 00:35
skids though, wader is w ay der
eternaleye vater
DanielC wayland76: The IPA is of limited use here because *I* don't know it.
00:35 bacek joined
wayland76 Ah, ok :) 00:35
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.
yeah
eternaleye DanielC: Ultimately, a text-based communication medium is a very, _very_ ineffective way to learn how to pronounce english words ;D
wayland76 There are always words that don't follow the rules.
skids Basically you have to know the vowel sound of the original word to get any sense of consistency (however illusional)
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..
DanielC eternaleye: yeah
eternaleye DanielC: Every rule in english is broken more times that anyone has bothered counting
DanielC skids: How do you say water in English then?
skids Or if it is not a popular one.
wayland76 Well, it has a long "a", but it's a different long a than "father", etc
skids oh, damn, now you've got me turned around.
eternaleye <eternaleye> DanielC: Water has the same 'a' as the german word for Father, IIRC (vater)
skids lol. 00:38
s1n skids: water isn't a popular english word?
skids I was trying tosay it like waiter in my head.
wayland76 I drink water myself :)
skids :-)
eternaleye If we needed any more proof that Perl[\d*] was designed for, by, and starring linguists, this is it.
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
wayland76 (back in 5) 00:39
00:39 minazo joined
DanielC eternaleye: And thing is, linguistics really is what I love most about Perl. 00:39
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.
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
00:41 Time`s_Witness left
skids (because cuteer would be a long e) 00:41
wayland76 (back)
skids See it all makes sense, until it doesn't. 00:42
wayland76 English would be better with macrons :)
DanielC wayland76: If I wrote scrable instead of scrabble would the "a" be pronounced as "ay" ?
wayland76 yes
DanielC thanks 00:43
skids fable, able
^^ long as
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)
DanielC wayland76: Thanks for explaining the rule about double consonants. This is something that has bugged me for *years*.
eternaleye uh oh, something's wrong with p6eval 00:44
rakudo: say "hi"
p6eval rakudo 606252: OUTPUT«hi»
00:44 fridim_ left
eternaleye wtf? it gave no output in PM 00:44
wayland76 Thanks to everyone for the examples :)
00:44 fridim_ joined
DanielC Thanks to everyone for helping me with English pronunciation. 00:45
wayland76 eternaleye: I get the same thing
skids goes to get a glass of water
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!
rakudo: say "o\c[COMBINING UMLAUT]"
p6eval rakudo 606252: OUTPUT«perl6regex parse error: Unrecognized character name COMBINING UMLAUT at offset 19, found 'C'␤in Main (src/gen_setting.pm:0)␤»
eternaleye ...
In PM that gave no output either. Something's fishy.
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
DanielC stoopid English
cotto DanielC, don't try to make sense of it. It isn't rational. It simply is. 00:48
wayland76 No, let him try
skids DanielC: English especially likes to be irregular around words used to describe the language itself, as it makes things extra confusing.
wayland76 He may be able to help Noam Chomsky :)
DanielC skids: :-)
cotto I once hired a pronun to help around the house.
skids Are there amature nuns? 00:49
DanielC he he
s1n or anti-nuns?
00:49 fridim_ left
wayland76 According to Pratchett, there are Satanic Nuns :) 00:50
00:51 fridim_ joined
s1n so we have pronuns and antinuns 00:51
wayland76 Who were trying to serve the AntiChrist
skids and electruns?
DanielC If language worked like that, antimatter would be Satanic matter.
wayland76 Or electro-nuns?
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)
Or Satanists. Your Calvinist type condemns them all 00:53
(Little-known fact: until about 1900, Calvinists and many other Protestants believed that the Pope was the Anti-Christ mentioned in the Bible)
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 :)
And if you want irregular words, I like "ghoti" 00:55
00:55 xinming_ joined
wayland76 (pronouned /fish/ ) 00:55
DanielC Incidentally, it's not Dutch at all, is it? Amish is a German descent. Right?
skids Maybe we should advise DanielC to learn Creole first.
Or Appalachian
DanielC skids: I know a creole language... (Spanish)
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>
p6eval rakudo 606252: OUTPUT«Camelia is a butterfly␤Foghorn Leghorn is a rooster␤King Kong is an ape␤»
wayland76 DanielC: When they came through customs, they were asked "What nationality", and they said "Deutch", and they got put down as "Dutch"
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" :)
skids an hamburger? 00:58
cotto That's an historical oddity.
eternaleye an hero?
wayland76 an history lesson
an honourable thing to do 00:59
Technically, all correct :)
DanielC But there are good phonetic reasons for "a" vs "an"
cotto what's the regex to match a silent "h"?
s1n wrong, you only add the "n" if the first phonetic sound is a vowel
eternaleye See, the only one I agree with is the honorable one, because it's pronounced like 'onorable'
wayland76 But probably considered a little archaic these days
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.
s1n correct, that why it's "an honorable" and "a history"
DanielC exactly
eternaleye [RFC] Introduce a new normalization level in Parrot which composes graphemes into phonemes
DanielC So it is not a historical oddity, really. 01:01
skids NCI -- native call interface. NES -- native english speaker.
s1n btw, wayland76, it's "honor" not "honour", silly british :)
DanielC (ok, all language is a historical oddity, but you get my meaning)
wayland76 I'm an honourable Australian, thanks :)
s1n same thing
01:01 fridim_ left
DanielC s1n: USian English is just gradually converging with Spanish. 01:02
eternaleye uh oh
wayland76 and I'm right about "an history" too. See comments further down the page at www.englishforums.com/English/AHist...l/post.htm
s1n DanielC: USian? nice
eternaleye "left-pondian"
skids an hermano? 01:03
01:05 mikehh joined
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 :)
s1n wayland76: oh didn't see that 01:06
besides, american english is the only language that matters, right? (awaits the barbs) :)
wayland76 no worries :)
01:07 cls_bsd joined
wayland76 Δεαθ το τηε Αμεριψαν ΑντιΨηριστ! 01:07
Sorry
s1n clearly, that is encrypted text :)
wayland76 Δεαθ το τε Αμερικαν ΑντιΧριστ 01:08
That's better :)
ךך ישןך ֡מאקרמשאןםמשךןדאצ
(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
*Apologies even :)
s1n: Seriously, though, few of the classics are written in American English :) 01:10
skids www.spellingsociety.org/aboutsss/le...tspel1.php 01:11
01:11 xinming left
DanielC One of these days I want to learn Tengwar so I can impress all my friends. 01:11
s1n wayland76: depends on what you call classics 01:12
wayland76 s1n: "Great Books of the Western World" -- see Wikipedia page for list
xorg doesn't have a Tengwar keyboard layout
en.wikipedia.org/wiki/Great_Books_o...tern_World 01:14
DanielC Miguel de Cervantes yay! 01:15
wayland76 re: Cut Spelling; see Shavian
Personally I'm not supporting any changes to English that don't include macrons, þ, and ð 01:16
Oh, and æ
DanielC What are macrons?
wayland76 macr¯on 01:17
My keyboard is having trouble with it. Just a mo 01:18
Needs to go above the vowel, anyway
cotto lmgtfy.com/?q=macrons
wayland76 But it's a straight line instead of a angled, curvy, or wavy one
Indicates a long vowel 01:19
s1n i'll do without macrons, thank you
english is rich enough, we don't need those hacks :)
skids lughs hysterically. Didn't know about lmgtfy.com
wayland76 s1n: I'm resigned to the way things are -- this is in response to skids' proposal for spelling reform
skids Oh not my proposal. 01:20
wayland76 to lugh (v.) to worship the Celtic god Lugh
skids I just think it's funny how you really can read it without noticing.
DanielC he he he, I love lmgtfy.com !
skids lmgtfy.com/?q=lugh 01:21
sjohnson god i wish i had known about this site when my sister asked me this: www.google.com/search?btnG=1&q=...er+history
oops
it took out the lmgtfy
lmgtfy.com/?q=delete%20internet%20e...%20history
wayland76 And what had she been doing? :-} (That's an evil grin, there) 01:22
skids It's not evil without eyebrows. >-} 01:23
wayland76 Ah, thanks :)
01:23 [S]unbeam left
wayland76 I'll try to file that for future reference :) 01:23
01:23 H1N1 joined
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:23
wayland76 My IRC client doesn't seem to do combining characters :( 01:24
Or dead keys, rather
DanielC My keys are mostly alive. 01:26
wayland76 ( DanielC -- are you unfamiliar with the term "dead keys"?) 01:27
DanielC no, I'm just being silly.
It's 3:30am. I get silly at 3:00am.
I should go to bed...
night y'all 01:28
01:28 DanielC is now known as DanielC_zzzz
wayland76 'night 01:28
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.
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
s1n where i used that first example you gave me with the box call 01:31
whoa, nopaste is over, gotta find another service :/
sjohnson rakudo: my $str = "set 15"; given $str { when /^set (\d+)$/ { print $1; } } 01:32
p6eval rakudo 606252: ( no output )
01:32 justatheory left
sjohnson rakudo: my $str = "set 15"; given $str { when /^set (\d+)$/ { print "[$1]"; } } 01:32
p6eval rakudo 606252: ( no output )
01:32 Whiteknight left
sjohnson rakudo: my $str = "set 15"; given $str { when /^set/ { print "[$1]"; } } 01:32
p6eval rakudo 606252: OUTPUT«Use of uninitialized value␤[]»
sjohnson rakudo: my $str = "set 15"; given $str { when /^set/ { print "match"; } } 01:33
p6eval rakudo 606252: OUTPUT«match»
sjohnson rakudo: my $str = "set 15"; given $str { when /^set \d+/ { print "match"; } }
p6eval rakudo 606252: ( no output )
s1n pmichaud: pastebin.com/d4ee0eed1
buubot s1n: The paste d4ee0eed1 has been copied to erxz.com/pb/17876
01:33 Whiteknight joined
sjohnson pmichaud: do you have any thoughts on the last query i ran with the rakudo? 01:34
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"; } }
rakudo: my $str = "set 15"; given $str { when /^set\ \d+/ { print "match"; } }
p6eval rakudo 606252: OUTPUT«match» 01:36
skids If you want spaces to count you have to have a :sigspace adverb. 01:37
01:38 H1N1 left
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: »
sjohnson skids: what about returning the matches like this?
pmichaud parens capture to $0, $1, $2, etc.
so you probably want $0 there
sjohnson rakudo: my $str = "set 15"; given $str { when /^set\ (\d+)/ { print "match: $0"; } }
p6eval rakudo 606252: OUTPUT«match: 15»
skids rakudo: my $str = "set 15"; given $str { when /^set\ \d+/ { print "match $/[0]"; } }
p6eval rakudo 606252: OUTPUT«match set 15[0]»
sjohnson hmm, won't that whole "\ " thing start to really get annoying after a while?
pmichaud sjohnson: then use 'set ' 01:40
eternaleye s1n: $obj."$foo" is what you want
01:40 lichtkind_ joined
pmichaud or even rule 01:40
sjohnson rakudo: my $str = "set 15"; given $str { when 'set (\d+)' { print "match: $0"; } }
p6eval rakudo 606252: ( no output )
eternaleye rakudo: my Str $obj = 'FOO'; my $foo = 'lc'; say $obj."$foo";
p6eval rakudo 606252: OUTPUT«foo␤» 01:41
s1n eternaleye: you're right, that works
pmichaud rakudo: my $str = "set 15"; given $str { when /^ 'set ' \d+/ { print "match $0"; } }
p6eval rakudo 606252: OUTPUT«Use of uninitialized value␤match »
s1n what's the difference though, they're both Str objects?
pmichaud rakudo: my $str = "set 15"; given $str { when /^ 'set ' (\d+)/ { print "match $0"; } }
p6eval rakudo 606252: OUTPUT«match 15»
pmichaud rakudo: my $str = "set 15"; given $str { when /^ set ' ' (\d+)/ { print "match $0"; } }
sjohnson hmm i suppose then that the p6 /regex/ things are totally different than p5
p6eval rakudo 606252: OUTPUT«match 15»
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?
p6eval rakudo 606252: OUTPUT«Malformed regex definition at line 2, near "/^ set (\\d"␤in Main (src/gen_setting.pm:0)␤»
sjohnson is confused
pmichaud rakudo: my $str = "set 15"; given $str { when rule {^ set (\d+) } { print "match $0"; } }
p6eval rakudo 606252: OUTPUT«match 15»
eternaleye Hm, I wonder how slurpy generators work with the magical '...' operator.
pmichaud sjohnson: yes, /x is the default for Perl 6 regexes. See S05.
sjohnson rakudo: my $str = "set 15"; given $str { when rule {^set (\d+)} { print "match $0"; } } 01:43
p6eval rakudo 606252: OUTPUT«match 15»
pmichaud s1n: the difference may be that $obj."$foo" is syntactically different from $obj.$foo
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.
sjohnson =over
skids rakudo: my $str = "set 15"; given $str { when /^set\ (foo=\d+)/ { print "match $/{foo}"; } }
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?
err.. /x
pmichaud sjohnson: because it makes for more readable regexes
s1n pmichaud: ah okay, i couldn't use the Sub directly because i wanted to call it on a different class
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.
sjohnson is "rule" the only way to shut it off?
case m/^copy (\d+) (\d+)$/
pmichaud rule doesn't actually shut it off, it just makes the whitespace means something different
if you want to match a literal, use '...'
sjohnson in p5, looks prett readable and functions as it should
pmichaud in the case of "copy" above, rule actually does better than the p5 version (more) 01:47
for example:
wayland76 m/^copy' '(\d+) (\d+)$/
?
m/^copy\s+(\d+)\s+(\d+)$/
pmichaud my $str = "copy 15 20"; say $str ~~ rule { ^ copy (\d+) (\d+) };
sjohnson though the last one functions better, it is far less readable
skids Most of the time you do not want ' ' anyway, you want <ws>
pmichaud rakudo: my $str = "copy 15 20"; say $str ~~ rule { ^ copy (\d+) (\d+) };
p6eval rakudo 606252: OUTPUT«copy 15 20␤»
pmichaud note that it worked even though there are multiple spaces between 'copy', '15', and '20' 01:48
sjohnson what did the little ^ do
?
wayland76 Start of line?
pmichaud start of string
sjohnson oh
duh
i should have known that
just not used to seeing it around space i suppose 01:49
pmichaud also:
sjohnson stupid brain
pmichaud rakudo: my $str = "supercopy 15 20"; say $str ~~ rule { copy (\d+) (\d+) };
p6eval rakudo 606252: OUTPUT«␤»
pmichaud note that "rule" is smart enough to detect that "copy" needs to be a word by itself
wayland76 Oh, auto ^$ ?
Ah,
sjohnson i suppose i will have to really go to town learning the difference 01:50
wayland76 anticipates
pmichaud not that so much, as the fact that ws in the rule means that there have to be word boundaries
i.e., whitespace in a rule won't match between two word characters
sjohnson at least in p6 the (\d) works 01:51
pmichaud rakudo: my $str = "alot"; say $str ~~ rule { a (.*) };
p6eval rakudo 606252: OUTPUT«␤»
pmichaud rakudo: my $str = "a lot"; say $str ~~ rule { a (.*) };
wayland76 ok; not 100% sure I have that, but I need to play with it, not hear more examples :)
p6eval rakudo 606252: OUTPUT«a lot␤»
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
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;
wayland76 anticipates LTM :) 01:52
pmichaud wayland76: I suspect we're still at least two months away from LTM, unless I have a breakthrough.
skids rakudo: "JAN07" ~~ /$<month>=(\w\w\w) $<day>=(\d\d)/; $/<day>.say 01:53
p6eval rakudo 606252: OUTPUT«07␤»
wayland76 Oh well :). I thought it might be a while
wayland76 needs slangs for his Tree module
:)
(not to pester you -- pmichaud++ :) ) 01:54
skids anticipates <jan feb mar> and jan<*uary>
eternaleye skids: $<var>=(stuff) will give you a Match object, $<var>=[stuff] just gives a string and may be faster/simpler/etc
pmichaud I don't mind the pestering at all... just don't want to be giving people false expectations
01:54 minazo left
wayland76 ok then 01:55
wayland76 cracks the whip :)
skids eternaleye++
pmichaud actually, both $<var>=(...) and $<var>=[...] end up with Match objects
the difference is in how any nested captures are handled.
(at least, that's the primary difference)
eternaleye pmichaud: Ah
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]
$<var>=[... (\w+) ...] means that the nested parens will be stored in $[0]
01:56 Whiteknight left
eternaleye pmichaud: OIC 01:57
01:57 lichtkind left
wayland76 with SUPER:: 01:57
eternaleye rakudo: "Foobarfoo" ~~ m/$<var>=[Foo(...)foo]/; say $<var>.WHAT 01:58
p6eval rakudo 606252: OUTPUT«Match()␤»
wayland76 Or at least, that's implied in a couple of places, but not specced anywhere
eternaleye rakudo: "Foobarfoo" ~~ m/$<var>=[Foo(...)foo]/; say $<var>
rakudo: "Foobarfoo" ~~ m/$<var>=[Foo(...)foo]/; say $<0>
p6eval rakudo 606252: OUTPUT«Foobarfoo␤»
rakudo 606252: OUTPUT«Use of uninitialized value␤␤»
pmichaud (try $[0] or $0 ) 01:59
s1n wayland76: that seems to cause null pmc with invoke
pmichaud (rakudo doesn't understand $<0> yet)
eternaleye rakudo: "Foobarfoo" ~~ m/$<var>=[Foo(...)foo]/; say $0
p6eval rakudo 606252: OUTPUT«bar␤»
s1n rakudo: class A { method foo { say "foo" } }; class B is A { method foo { SUPER::foo; } }; my B $bb .= new; $bb.foo;
p6eval rakudo 606252: OUTPUT«Null PMC access in invoke()␤in method B::foo (/tmp/MZeKpAH85v:2)␤called from Main (/tmp/MZeKpAH85v:2)␤»
pmichaud rakudo doesn't understand SUPER:: yet. And I'm not even sure what that would mean,e xactly.
s1n okay, just curious
eternaleye pmichaud: Because of multiple inheritance?
s1n i'll have to work around it
pmichaud eternaleye: ye.
*yes.
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 :)
pmichaud I'm wondering if "SUPER::" is not meant to be literal in the spec there.
wayland76: that's because I've made about 2 months of progress :-)
eternaleye s1n: You can always say A::foo
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 )
wayland76 pmichaud: Yeah, I figured that. I'm just extrapolating. LTM around... Feburary next year :)
s1n hmm
eternaleye ...Or not
pmichaud wayland76: oh, I hope not that long.
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 :)
Oh, good
:)
pmichaud also, I _really_ hope we're using something a lot closer to STD.pm before then.
wayland76 s1n: Roles are probably what you want :)
skids No you don't, then I'll stop holding off on filing bugs that are parse failures :-)
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;
pmichaud: I guess I thought the idea was LTM first, STD next. But I'll take your word for it 02:04
Btw, I think there are some P5isms in STD, so it may need some work :)
pmichaud the idea is LTM first, STD next
which is why LTM needs to be done well before February
02:05 araujo joined
wayland76 Ah, now I can reread your comments and put the emphasis in the right places :) 02:05
pmichaud *another reason why
wayland76 I thought you were saying STD before LTM :)
rakudo: role A { method foo { say "foo" } }; class B does A { method foo { SUPER::foo; } }; my B $bb .= new; $bb.foo;
p6eval rakudo 606252: OUTPUT«Null PMC access in invoke()␤in method B::foo (/tmp/CEhmk4Ojvu:2)␤called from Main (/tmp/CEhmk4Ojvu:2)␤»
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
TimToady you want nextsame in any case, not SUPER
wayland76 Oh, wait, what about things like "nextsame"
pmichaud "nextsame" works, fvvo "works"
wayland76 GMTA, although I'm not sure about me in this case :) 02:07
rakudo: role A { method foo { say "foo" } }; class B does A { method foo { nextsane; } }; my B $bb .= new; $bb.foo;
p6eval rakudo 606252: OUTPUT«Could not find non-existent sub nextsane␤»
wayland76 rakudo: role A { method foo { say "foo" } }; class B does A { method foo { nextsame; } }; my B $bb .= new; $bb.foo;
p6eval rakudo 606252: OUTPUT«Null PMC access in find_method()␤in method B::foo (/tmp/bF91t4TlOc:2)␤called from Main (/tmp/bF91t4TlOc:2)␤»
wayland76 Well, looks like I'm as sane as the next person then :)
skids Not surprising nothing sane here to be found.
pmichaud looks like Rakudo is missing anything matching "sane" 02:08
Somehow I knew that. :-)
afk # walk
wayland76 enjoy :)_
Think about LTM :)
02:08 gkurts left, gkurts joined
sjohnson pmichaud: will Perl 6 have a function that does a generic sort like the unix: sort -g command 02:11
without having to write sort( $a <=> $b) all the time, etc
like gsort()
gsort(keys(%hash)).say
which would handle the #'s better 02:12
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:13
sjohnson 0 1 11 2 20 30 02:14
TimToady or it's trivial to make your own generic sort
sjohnson the age old sort problem... needs to die a painful death
TimToady sort &gsort, @list
sjohnson sort &gsort, @list
TimToady my &gsort ::= &sort.assuming(&generic_sorter);
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"
all the time
TimToady that's just .sort(+*)
sjohnson will any of this stuff work in p5?
i'm only bringing these thigns up as i am programming in p5 as we speak
TimToady not likely, it all falls out the design cleanup
sjohnson and running into annoyances
TimToady dinner & 02:16
eternaleye buubot: spack sublanguage
buubot eternaleye: S02-bits.pod:1
eternaleye buubot: spack braid
buubot eternaleye: Sorry, I couldn't find any matches for: braid
skids buubot: spack slang 02:17
buubot skids: Sorry, I couldn't find any matches for: slang
skids hrm, slang is definitely in there.
eternaleye buubot: spack sublang 02:18
buubot eternaleye: S02-bits.pod:1
skids it's in the "Names" section
eternaleye skids: Thanks
skids Not that that narrows it down very much
but text search slang 02:19
eternaleye yeah, running svn up now
s1n wayland76: ping 02:26
wayland76 present 02:27
02:27 Kisu joined
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:28
s1n wayland76: see PM 02:32
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?
skids there's probably a libreadline module for p5 02:35
meppuru good night 02:36
skids n8
02:36 cognominal left
meppuru ;) 02:36
02:37 meppuru left
wayland76 Term::Readline actually 02:37
sjohnson thanks
wayland76 And IIRC, it requires an implementation module, eg. Term::Readline::GNU
sjohnson wayland76: either one i was curiusa bout
p5/p6 02:38
pmichaud sjohnson: if you want to do a numeric sort, it's just 02:42
@list.sort({ +$_ }) 02:43
lambdabot Unknown command, try @list
pmichaud rakudo: my @a = <12 2 45 03>; say @a.sort({ +$_ })
p6eval rakudo 606252: OUTPUT«2031245␤»
pmichaud rakudo: my @a = <12 2 45 03>; say @a.sort({ +$_ }).perl;
p6eval rakudo 606252: OUTPUT«["2", "03", "12", "45"]␤»
02:43 xinming joined
pmichaud hmmm 02:43
oh wait, that's right. :-) 02:44
rakudo: my @a = <12 2 -45 03>; say @a.sort({ +$_ }).perl;
p6eval rakudo 606252: OUTPUT«["-45", "2", "03", "12"]␤»
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
azawawi good morning 02:45
s1n good night :)
azawawi it is 5:45am here
pmichaud or yes, what TimToady had: .sort(+*)
pmichaud wonders if that works in rakudo 02:46
rakudo: my @a = <12 2 -45 03>; say @a.sort( +* ).perl;
p6eval rakudo 606252: OUTPUT«Use of uninitialized value␤invoke() not implemented in class 'Float'␤in Main (/tmp/xSvHb1Xbdn:2)␤»
pmichaud guess not.
I'm guessing we don't do prefix ops on Whatever yet.
02:46 xinming_ left
azawawi std: 00o7; 02:46
p6eval std 26956: OUTPUT«##### PARSE FAILED #####␤Whitespace is required between alphanumeric tokens at /tmp/YiqfGtHYQQ line 1:␤------> 00o7;␤ expecting any of:␤ POST␤ postfix␤ postfix_prefix_meta_operator␤ standard stopper␤ terminator␤ whitespace␤Other potential
..difficulties:␤ Leading 0 …
pmichaud azawawi: that 00 prefix is a killer. 02:47
azawawi std: 0123o7;
p6eval std 26956: OUTPUT«##### PARSE FAILED #####␤Whitespace is required between alphanumeric tokens at /tmp/AIvp33m4Lj line 1:␤------> 0123o7;␤ expecting any of:␤ POST␤ postfix␤ postfix_prefix_meta_operator␤ standard stopper␤ terminator␤ whitespace␤Other potential
..difficulties:␤ Leading …
azawawi std: 01.23o7;
p6eval std 26956: OUTPUT«##### PARSE FAILED #####␤Whitespace is required between alphanumeric tokens at /tmp/TP5PpwyXQt line 1:␤------> 01.23o7;␤ expecting any of:␤ POST␤ postfix␤ postfix_prefix_meta_operator␤ standard stopper␤ terminator␤ whitespace␤FAILED 00:02 35m␤»
azawawi pmichaud: this is good
TimToady: thx for the bugfix 02:48
s1n azawawi: what kind of radix is that??
azawawi s1n: which one?
s1n 01.23o7 02:49
azawawi s1n: it is not valid; just was testing it...
s1n oh okay
azawawi tests fakexecutables on the latest rakudo... 02:50
pmichaud: any update on fakexecutable support on rakudo? :) 02:52
pugs_svn r26957 | wayland++ | Actually named the components 02:53
02:55 lichtkind_ left
wayland76 See? I left out [S22] on the commit. I'm a baaaaad boy! 02:56
02:57 ZuLuuuuuu left, ZuLuuuuuu joined 03:02 Scorp2us joined
Tene azawawi: are you blocking on that? 03:03
pmichaud azawawi: no, no update 03:10
wayland76 Does Perl 6 have a test module? Ie. a Test::More equivalent? 03:16
obra_ Yes 03:17
wayland76: how much have you looked at the test suite?
wayland76 For Rakudo? Not at all. I'll look now. Thanks :) 03:18
03:19 FurnaceBoy left, Scorp1us left
pmichaud note that "look at the test suite" should mean "check t/spec in pugs" 03:20
rakudo's local test suite doesn't use Test.pm
(except to test that it loads)
TimToady I'm thinking we should add: okay got(), &[eq], "expected", 'message' 03:28
or some variant thereof 03:29
03:29 justatheory joined 03:31 unitxt joined
azawawi pmichaud: yeah blocked a bit since Padre::Plugin::Perl6 has "Generate Perl 6 executable" and "Generate Perl 6 PIR" menu options. 03:36
pmichaud: but not a big deal :)
pmichaud: i just like to follow up stuff
03:37 justatheory left 03:39 alester joined
sjohnson TimToady: if you don't mind me asking, what is your secret to remembering the kanji? 03:47
03:49 LylePerl left
wayland76 The USB ports under the hair at the back of his head 03:50
03:58 davidad joined
sjohnson heh 04:00
gabiruh w 15 04:01
woops..
sjohnson heh 04:02
04:05 skids left
wayland76 Have we worked out where library files for Rakudo go? 04:09
ie. Test.pm ?
04:14 gkurts left
wayland76 /usr/lib/perl6? 04:15
pmichaud: ping (if so, see question above) 04:24
04:24 d4l3k_ joined, [particle]2 joined 04:25 [particle]1 left, dalek left, jiing_ left 04:26 d4l3k_ is now known as dalek 04:27 jiing_ joined
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:35
wayland76 Well, I can already build against an installed Parrot 04:36
Rakudo RPM on top of Parrot RPM
pmichaud is that "installed parrot with the build tree not present"? 04:37
wayland76 pmichaud: See trac.parrot.org/parrot/ticket/712
04:37 unitxt left
pmichaud I did see the ticket. 04:37
wayland76 Well, "installed parrot with the build tree renamed to "foo"
So I expect it couldn't find any of those files ? 04:38
sjohnson hows it going wayland
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.
wayland76 sjohnson: hi :)
pmichaud: Ok, I'll dump them in /usr/lib/perl6, and we can change it later
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)
is there an easy way for me to get the patch out of Trac? 04:42
nm, I found it. "Original format" at bottom of page.
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:45
pmichaud which extra files get installed? 04:46
and more to the point, I'm curious how we get the dynops to load/run 04:47
(when building/testing rakudo)
wayland76 With the -X option, maybe?
oh, now that I think about it, maybe I didn't move the Rakudo build directory, just the Parrot one
I'll check things out in a minute 04:48
pmichaud oh, I'm not concerned about the Rakudo build dir
obviously we need Rakudo's build dir around when building Rakudo
wayland76 The extra files are llisted in MANIFEST.configure.generated
pmichaud so, how does the "perl6" fakecutable pass a -X option to parrot? 04:49
wayland76 ( llisted is in honour of the llama book)
Not sure. I just chucked some -X options into the makefile, and it works :). 04:50
pmichaud into Rakudo's makefile?
wayland76 Yes
pmichaud where's that patch?
wayland76 On RT
I'll find the ticket #
#66056
rt.perl.org/rt3/Ticket/Display.html?id=66056 04:51
pmichaud I've already vetoed the use of recursive Makefiles.
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 :)
pmichaud Yes, Allison and I disagree on that particular point. 04:53
do we absolutely need --build-root ?
wayland76 I also noticed they're not attached to the patch. My bad
I think so. RPM wants to build in a particular directory. 04:54
But we can make the default whatever you think sensible
pmichaud does Parrot have that?
wayland76 I'll investigate...
Oh, it gets passed to make install, instead of Configure.pl 04:56
As DESTDIR
is that what you'd prefer?
pmichaud I'd probably need to investigate a bit.
if Parrot doesn't have a --build-dir option, I'm not sure that Rakudo needs one. 04:57
OTOH, if most other packages use --build-dir, then perhaps Rakudo should have one.
wayland76 Well, if we're going to be changing that patch anyway, I could try to change it
pmichaud oh, the patch will change, yes.
Let me see if I can first fix the dynops/dynpmc generation to not require the recursive makefiles, and check those into rakudo master
could you tell me where to find the ops and pmc Makefile.in ? 04:59
wayland76 Just a moment, I'll post the files -- I thought they were in the patch, but obviously not 05:00
05:01 xinming_ joined
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:01
pmichaud I just need to look at the files, I'm not going to apply them as a patch. 05:02
05:06 xinming left 05:08 justatheory joined, frew|wor1 joined
wayland76 Bad news. I just convinced git to delete them :( 05:13
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
it looks as though it's putting the files into dynext
wayland76 Basically, I did a "git commit", and then a "git push"
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
pmichaud that works for me
wayland76 Yes, it's putting them in dynext
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: www.cs.utexas.edu/users/misra/scann...ngPhil.pdf
en.wikipedia.org/wiki/Dining_philos..._solution\
Ergh, that backslash shouldn't be there. 05:17
05:17 justatheory left
wayland76 pmichaud: Ok. 05:18
sjohnson hey wayland76 sorry to interrupt if you're busy right now 05:19
but are you interested in learning any 2nd languages?
wayland76 sjohnson: Only Koine Greek and Hebrew
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
sjohnson or are you just curious about Palestine politics?
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
I'm interested in reading the Bible in the original, is my reason
sjohnson thanks for being honest 05:22
is it called the Torah?
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
The Old Testament part of the Bible is, IIRC, what Jews call the Torah 05:23
sjohnson is the TOrah what you spoke of?
oh i c
my uncle is into that too
so i can understand
although i think he's too lazy to read it in its original form 05:24
mostly just reads translations of the Torah
wayland76 But accorrding to Wikipedia, it has various meanings
sjohnson i can definitely agree with what you are doing
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
sjohnson: No, I understand that 05:26
Often the original is better, although I'm told that's not always the case
(In fact, I've seen that's not always the case)
sjohnson i can agree with that in my analogy 05:27
05:27 frew|wor1 left
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:27
using more forceful language to enunciate the main points of the speech, which made it far more entertaining to watch 05:28
even if it wasn't 100% accurate
wayland76 Like "Somebody set us up the bomb"? :)
sjohnson heh
not that bad :)
actually, now that you mention that
they must have had a darn good english editor to edit the final subtitles
cause it didn't contain any "engrish"
but anyways..
i consider my hobbies my religion as they give me great happiness and i enjoy life because of them 05:31
i suppose this is enough motivation for me to learn japanese
as well as programming (perl mostly), billiards, sleight of hand , etc 05:32
wayland76 pmichaud: Yay! Thanks to RPM, I hadn't completely lost them :) 05:33
sjohnson: I guess it depends what you consider the purpose of religion is 05:34
sjohnson well, there is knowing the meaning of life
and there is also living a life of happiness with peace of mind
wayland76 sjohnson: This is off-topic -- I'll continue via /msg 05:35
sjohnson *oops*
:)
05:36 ssm joined
wayland76 Well, I don't mind off-topic, but religion and politics traditionally have the potential for pointless flamewars and upsetting people, so... :) 05:37
sjohnson thus is true 05:41
05:41 DanielC_ joined
sjohnson plus all this conversation appears on teh bl0gz 05:41
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:42
05:54 xinming joined 05:58 DanielC_zzzz left 05:59 huma joined, cognominal joined
pugs_svn r26958 | azawawi++ | [S:H:P6] Version 0.58 removes old perl6.vim support 06:00
r26958 | azawawi++ | [S:H:P6] and bundles STD with the '00o7' leading zeros int radix fix. TimToady++
06:04 alester left, masak joined
masak hello, I'm new to Perl 6, but perhaps someone will have mercy on me and my n00b question. 06:05
I'd like to define a new keyword in my program. how do I do that?
06:07 unitxt joined
wayland76 It depends on the keyword. :) 06:07
masak I actually have a concrete example. let's call the keyword 'supposing', for lack of a better (free) term. 06:08
say $area supposing ($length, $area) = 42, $length ** 2; 06:09
basically, a statement-postfix declarator (whose variables go out of scope immediately) 06:10
06:10 DemoFreak joined
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:10
pmichaud sleeptime here... be back in a few hrs 06:12
then I'll work on rakudo build/install, and answer hackathon questions (if any)
06:13 xinming_ left
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:13
06:14 presh joined
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:15
06:17 payload left, presh left
wayland76 masak: Just assign your grammar to $~MAIN, IIRC 06:18
masak wayland76: so, 'grammar MyPerlDialect is STD { ... }; $~MAIN = MyPerlDialect;' ? 06:19
06:20 brunov left
wayland76 Something like that 06:21
But I don't believe it works in the current Perl implementations yet :) 06:22
masak oh, I know that.
06:22 presh joined
masak I just want something extra awesome to end my talk with today. 06:22
I will have been showing them things that work for an hour at that point. :)
wayland76 Ok. I hoping my message wasn't projected on the big screen right now :) 06:23
sjohnson heh
06:25 cognominal left
masak wayland76: no, I'm not that late with the slides. :) 06:25
a couple of hours left. 06:26
wayland76 Just remembering NPW
06:27 xinming_ joined
masak yeah. :) 06:32
06:32 azawawi left
wayland76 masak: I think $~MAIN is in the specs 06:37
masak wayland76: aye. S02.
but only the variable is mentioned, not exactly how to use it.
wayland76 I'm not sure what happens if you make that assignment in the middle of some existing code, though :) 06:38
masak bah, how else would I do it? :P 06:39
wayland76 for (1..100) { if( $_ == 57) { $~MAIN = MyPerlDialect; }
Well, but that's at the top level
cf. my example :)
masak ok, gotta go catch a train. see you later. 06:40
06:40 masak left
sjohnson see ya 06:40
wayland76 o/ 06:43
06:43 iblechbot joined 06:50 xinming left 06:52 LadyLunacy joined 06:54 bacek left
ZuLuuuuuu in perl 6, can we use characters other than letters|under score in identifiers? 06:59
Khisanth you can use numbers :p 07:02
but I believe you can use unicode chars too 07:03
wayland76 And -
Tene and ' 07:04
Khisanth hmm but you can do that in perl5 too
Tene I assumed 'letters' included unicode.
ZuLuuuuuu I ment ascii letter characters by letters :) 07:05
Khisanth actually can't you just change the rule for identifier? :)
Matt-W Goood morning #perl6
Tene ZuLuuuuuu: you can use any letter in unicode, including ascii. :)
Matt-W Khisanth: you could, but you'd need to be careful it didn't break the ability to parse other things
Tene letter == alphabetic.
ZuLuuuuuu I see, then we can use any unicode characters in perl6 as identifier
Matt-W no, any unicode letters 07:06
Tene for example, my $☕ isn't a valid variable name.
Matt-W not any random unicode punctuation marks
Tene iirc
Tene checks.
ZuLuuuuuu oh ok
Matt-W the most unusual thing is - being allowed
we're starting to use that a lot, it seems to read better than _
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 $☕
Matt-W Tene: Bug!!
ZuLuuuuuu: yeah it's full of them :) I'm using them in Form.pm as well
something about a method called fit-in-width() is much nicer than fit_in_width() 07:08
easier to type on an english keyboard, too
07:08 LadyLuna1y left
ZuLuuuuuu in turkish keyboard too actually 07:08
we have to use shift+- to make _
but
in typogrophical point of view I guess _ is more readable than -
in provides more white space 07:09
*it
07:09 pochi joined
ZuLuuuuuu and feels more like a space 07:09
07:10 dakkar joined
Matt-W sometimes the hyphenation is good though 07:11
like Form::TextFormatting::left-justify
at least, it works in English :)
wayland76 rakudo: my $ασδφ = "hello"; my $a~~~ = "hi"; print $ασδφ 07:14
p6eval rakudo 606252: OUTPUT«No applicable methods.␤in Main (/tmp/c17arOeGjH:2)␤»
wayland76 ?
rakudo: my $ασδφ = "hello"; print $ασδφ
p6eval rakudo 606252: OUTPUT«hello»
ZuLuuuuuu rakudo: my $ışıltı = "hello"; print $ışıltı 07:15
p6eval rakudo 606252: OUTPUT«hello» 07:16
ZuLuuuuuu impressive :)
sjohnson l33t speak
rakudo: my $蜘蛛 = "hi"; say $蜘蛛; 07:17
p6eval rakudo 606252: OUTPUT«hi␤»
07:19 eternaleye left 07:21 DanielC_ is now known as DanielC
DanielC moin 07:25
sjohnson hi
Matt-W hi 07:38
sjohnson mat! 07:39
bbiab in 0 mins
oops
30
ZuLuuuuuu we cannot assign hashes to a scalar variable in perl 6 nor in perl 5 right?
DanielC ZuLuuuuuu: Why would you want to? 07:40
ZuLuuuuuu: If you are really determined, you can use the binding operator :=
ZuLuuuuuu I don't want to :) I saw a code in perl 6 which I suspect assigns a hash to a scalar
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
ZuLuuuuuu the code is this 07:41
07:41 alexn_org left, alexn_org joined
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
ZuLuuuuuu *rthat=that
Matt-W it's perfectly acceptable to do that
it's a little bit like putting a reference to a hash in a scalar in Perl 5, but not quite.
ZuLuuuuuu this was not possible in perl 5 right?
07:42 frew|wor1 joined
Matt-W no in perl 5 you had to explicitly make it be a hash reference 07:42
ZuLuuuuuu ok thanks
DanielC You could already do that in Perl 5: $a = { foo => "bar" }
Matt-W Perl 6 handles a lot of that more transparently
DanielC I always thought it was a reference.
Matt-W like $stuff{$key} will work 07:43
rather than $stuff->{$key} as perl 5 requires
ZuLuuuuuu can we do $a = { foo => "bar" } in perl 5?
Matt-W yes
{ } there constructs an anonymous hash
in fact, it does in perl 6 too, if there's a list of pairs inside it
DanielC Matt-W: Do you need the eval() line in Perl 6? What does the eval() accomplish? 07:44
07:44 fridim_ joined
DanielC I'm not generally a fan of evals. 07:44
Matt-W DanielC: compiles a string as if it was code
DanielC I know but...
Matt-W the eval is not necessary to make the hash
it must be there for another reason
or just experimentation
ZuLuuuuuu actually it was $string 07:45
I replaced it
DanielC ah
ZuLuuuuuu it is read from a file
Matt-W ah right
ZuLuuuuuu assign to $string
Matt-W that would explain it
DanielC that was the reason for the eval then.
Matt-W bit dangerous though
ZuLuuuuuu and then evaluated
DanielC Matt-W: Yeah, dangerous, that's why I don't like eval.
ZuLuuuuuu yes it is noted in the readme that it is a temporary solution and changed later
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
Matt-W DanielC: no 07:47
07:47 payload joined
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
because eval works with blocks as well as strings
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...
Matt-W yes
well it should be
TimToady eval makes no sense on a hash
Matt-W it's possible the compiler might think it's a hash, but I would hope it doesn't :)
TimToady why would you hope that?
Matt-W Because eval makes no sense on a hash
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...
Matt-W So if I give eval something in { } I hope it thinks it's a block :)
but it does look an awful lot like a hash in that case, yes
TimToady {} has no clue that it's in an eval
eval is not a macro
Matt-W and it's got a pair in it, so is the rule that it's a hash?
TimToady it only knows what to do with strings 07:50
yes
Matt-W oh! Did eval BLOCK go away in perl 6?
TimToady there's no eval-block in p6
try block instead
Matt-W DanielC: please listen to TimToady instead of me
aaah
DanielC TimToady: So the two versions are actually equivalent? $a = { foo => "bar" } and $a = eval( {foo => "bar"} ) ?
TimToady the second one MAKES NO SENSE!!! 07:51
Matt-W what would eval do with a hash?
07:51 agentzh joined
DanielC I dunno, that was going to be my next question. 07:51
Matt-W rakudo: $a = eval({foo => "bar"}); say $a.perl;
p6eval rakudo 606252: OUTPUT«Symbol '$a' not predeclared in <anonymous> (/tmp/upkPcIuTRr:2)␤in Main (src/gen_setting.pm:3166)␤»
DanielC I'm not the one who posted that idea initially.
Matt-W rakudo: my $a = eval({foo => "bar"}); say $a.perl;
p6eval rakudo 606252: OUTPUT«Parameter type check failed on call to 'eval'.␤in Main (/tmp/c0Ui0hoyhF:2)␤»
07:52 agentzh left
TimToady if it did anything with it, it would coerce it to a string and try to eval that 07:52
which would be a syntax error
07:52 agentzh joined
TimToady or at least "no such routine as foo or bar" 07:53
DanielC Syntax error then.
Matt-W Rakudo appears to have eval prototyped to only take a string
TimToady but as you see rakudo doesn't even get that far
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
ZuLuuuuuu another question: if "$myHash = %aHash" assigns the "%aHash" Hash object to "$myHash" then what does "%myHash = %aHash" do?
07:54 agentzh left 07:55 agentzh joined, agentzh left, agentzh joined
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:55
much like in p5, except what flows are pairs rather than alternating keys and values 07:56
ZuLuuuuuu hmmm thanks
Matt-W TimToady: the first one doesn't copy the hash, correct? 07:57
TimToady correct
07:57 agentzh left
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.
Matt-W righty-ho
07:57 agentzh joined 07:58 agentzh left
TimToady flow is not a technical term 07:58
I was just talking about the values passing from the rhs to the lhs
DanielC ah
07:58 agentzh joined 07:59 agentzh left, frew|work left 08:00 agentzh joined
TimToady zzz & 08:00
08:00 agentzh left, agentzh joined 08:01 agentzh left 08:05 agentzh joined 08:08 eMaX joined
DanielC Anyone know who Sam Vilain is? Mark Overmeer has mentioned him a couple of times, saying "I talked to Sam Vilain". 08:11
08:12 donaldh joined
BinGOs Goes by the nickname mugwump 08:15
DanielC thanks 08:17
08:19 mara_aram left 08:39 renormalist left 08:41 renormalist joined, renormalist left 08:44 renormalist joined 08:45 payload left 08:47 renormalist left, renormalist joined
DanielC lichtkind: ping? 08:48
@tell lichtkind Looks like there is already an English version of the page you gave me: www.perlfoundation.org/perl6/index....rl_tablets 08:50
lambdabot Consider it noted.
08:55 renormalist left 08:57 renormalist joined, synth left 09:00 zamolxes joined 09:10 renormalist left, renormalist joined 09:11 renormalist left, renormalist joined 09:12 renormalist left, ZuLuuuuuu left 09:13 renormalist joined 09:16 cognominal joined 09:19 renormalist left 09:20 renormalist joined 09:21 payload joined, renormalist left 09:23 renormalist joined, renormalist left 09:26 xinming joined 09:27 xinming_ left 09:31 renormalist joined, cognominal left
DanielC Has anyone here read Mark Overmeer's papers? 09:32
wayland76 Not I. I think I skimmed one once 09:42
From what I could see, he's more interested in replacing CPAN-the-server 09:43
Whereas I'm more interested in replacing CPAN-the-package-manager
DanielC ok 09:45
wayland76 But like I said, I haven't looked over it carefully
DanielC I'm thinking more about the package manager.
So I guess that in a conversation with Mark O. we are not likely to be on the same wavelength.
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:46
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?
DanielC renormalist: Ok. You know him better than I do. I'll assume you are right.
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?
wayland76 That's the one
DanielC I replied.
renormalist DanielC: I just know him from some conferences and it was always fun to talk to him, so I can just recommend him. :-)
wayland76 Ok, I'm still backlogging after an hour away
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.
wayland76 Except maybe for what obra_ wants us to do (ie. use existing infrastructure)
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.
His papers look quite long.
wayland76 (if obra_ is getting pinged, we're talking about www.cpan6.org/ and the papers already listed there)
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:51
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
wayland76 There's no conflict with what I want to do.
As long as he's open to what package-based systems need
Incidentally, this Software::Packager thing that I want to port from Perl 5 would not be CPAN-specific 09:54
It would be a component that 6PAN-fetcher would be able to call upon to do packaging stuff for it
But if other software wanted to do packaging stuff with it too, that should work as well
DanielC I'm sure that Software::Packager would be useful to a lot of people besides CPAN developers.
wayland76 And I want to keep it that way :) 09:55
DanielC y
09:55 ZuLuuuuuu joined
DanielC o/ ZuLuuuuuu 09:55
ZuLuuuuuu hi 09:56
09:57 xinming_ joined
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:58
wayland76: But as far as RPM/DEB is concerned "perl5" and "perl6" are unrelated packages. 09:59
wayland76: If you wanted multiple versions of the same module installed, you would have to do something like that.
wayland76 I've seen Debian do that 10:00
And RPM sometimes chooses to do that, but it's not necessary
Let me give the kernel example
kernel-2.6.27.5-117.local.fc10.i686 10:01
package = kernel
version = 2.6.27.5
release = 117-local
distro = fc10
arch = i686 10:02
10:02 Jedai joined
wayland76 (I'm not 100% sure about "distro" there) 10:02
DanielC k
wayland76 The -local on the release is because I built my own kernel
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...
wayland76 exactly
DanielC hm
wayland76 If you do rpm -i then it installs multiple 10:04
DanielC Maybe I'm wrong about RPM/DEB
wayland76 but if you do rpm -U then it upgrades
DanielC I see.
wayland76 However, I believe that the RPM has to be built in a special way to allow for multiples
ie. not have files that try to go in the same place
10:05 mberends joined
wayland76 but we'd have to worry about that stuff anyway 10:05
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
I don't know what the "prerm" script is.
prerm => pre-remove
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...
DanielC In contrast: dpkg -r (remove) => (1) Run prerm (2) Remove installed files (3) Run postrm script. 10:08
wayland76 Hmm. That doesn't seem to allow for it, does it 10:13
DanielC dunno 10:14
wayland76 You'll notice that -i does the postrm script too
DanielC checks again
wayland76 That's definitely an upgrade, instead of an install
DanielC that's dpkg we are talking about, right?
wayland76 (step 5 in my man page)
man dpkg
cat /etc/debian-version says 3.1 10:15
It's a machine I have access to, but not mine
DanielC Yes, dpkg -i does look like an upgrade to me.
I might be wrong...
10:16 xinming left
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
So we need at least a backup solution for FOO-type packages.
s/packages/package managers/
wayland76 Well, Yes, I agree. User choice = good 10:17
10:17 icwiener joined
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
But since the usual case will be inside, I think that should be the default
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)
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
DanielC We can't require people to be root to be able to install a module. That's something PHP would do :)
dakkar (that's what I do)
wayland76 Yes 10:20
I've long advocated the use of /home/username/local/*
ie. /home/username/local/bin and /home/username/local/lib
except maybe it should be .local
DanielC I currently use ~/.local
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
10:21 tulcod joined
wayland76 I think that there should be an install script in each 10:21
10:21 cognominal joined
wayland76 Package managers know what to do with an install script 10:21
And if we run it outside the pm, then we can tell the install script where to put it 10:22
The "where to put it" issue and the "package manager or otherwise" issue are separate issues, but both essential
10:23 pmurias joined
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:25
wayland76 Well, I don't know, but I'm not sure I've communicated clearly, so let me try again 10:26
I'll give examples from RPM, and we'll see what we get
RPM has a "build script" and an install script
Ideally, the build script would do ./configure && make 10:27
and the install script would do make install DESTDIR=$RPM_BUILD_ROOT
Often there are some other things that need to go into these scripts, but that's the ideal case
10:28 masak joined
wayland76 Then, say $RPM_BUILD_ROOT points at ~/src/rpm/BUILD/package-version/ ... 10:28
masak is at the Stockhom hackathon
pmichaud: oh hai.
I'll try to shove people in here as much as I can.
wayland76 It will install everything in there as though it were the root directory
10:28 hanekomu joined
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
So the question is not whether the package manager supports it, but whether "make install" supports it
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.
wayland76 Welcome visitors! :) Take us to your leader! (Oh, wait...) :)
That title must be an exaggeration for a 1-hour talk :) 10:31
10:31 perlmongo joined
mberends masak++ # incredible content compression 10:31
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
wayland76 Hail perlmongo!
perlmongo hail ! :-)
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?
wayland76 Other stuff is good, but can come later
DanielC wayland76: Ok. So the end-user is the one who makes the package.
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 amoc left
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!
wayland76 RPM can also put things in a different folder, I believe, although I've never tried that
10:34 mickej joined
wayland76 RPM uses variables like %{_libdir} which translate to eg. /usr/lib 10:35
But could be made to point elsewhere if someone so desired
10:35 viklund joined
wayland76 For example, say a sysadmin decided that all official Fedora packages belong in /usr/* whereas all other packages belong in /opt/* 10:35
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.
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...
wayland76 ...then you have the same problem Perl 5 has :)
And may want to build *outside* the package manager 10:38
That's one good reason we allow that option :)
DanielC Yeah.
yeah
wayland76 But even if you want a server with no toolchain installed...
You build everything on your dev box
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 *
DanielC masak: Cool
masak DanielC: I know! :)
wayland76 masak: So should we greet everyone who joins the channel? :)
DanielC Maybe we can get lambdabot to greet everyone. 10:40
masak wayland76: sure, go ahead.
wayland76 (incidentally, for new people, Daniel and I are discussing how CPAN could be better under Perl 6)
lambdabot: @help
lambdabot help <command>. Ask for help for <command>. Try 'list' for all commands
wayland76 lambdabot: @list
lambdabot code.haskell.org/lambdabot/COMMANDS
Matt-W masak: now give the same presentation in Esperanto 10:43
masak: next week, you'll be flown to Hawaii to present it in Lojban 10:44
masak Matt-W: sounds fantastic. :)
mberends Matt-W: could you transpose the presentation to C Sharp Major? 10:45
Matt-W mberends: only if it was sung - and in a major key 10:47
wayland76 mberends: For oboe? That would be cruel
Matt-W wayland76: it would be cruel for just about anything
except harp
because you just set your harp to C# major and play :)
wayland76 ...or piano :)
Or if you have a full set of harmonics or tin whistles 10:48
Matt-W is sort of considering getting a harp
wayland76 I have a Guitarolin 10:50
(Don't bother Googling, you won't find it :) ) 10:51
(Or rather, you'll find something, but it won't be what I have) 10:52
10:58 viklund left 11:02 payload left 11:07 Muixirt joined
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:07
"Per la kv-metodo vi ricevas liston de paroj el via haŝ-objekto..." 11:08
11:08 ejs joined 11:10 viklund joined 11:11 viklund left, viklund joined 11:15 renormalist left 11:20 donaldh left, donaldh joined 11:22 ZuLuuuuuu left 11:23 iblechbot left
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?
wayland76 And some guy asked him why he used Latin instead of Esperanto :)
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?
He replaced sigils with Latin case-endings
masak I saw it. 11:26
it's insanely... insane.
wayland76 Ok, just making sure :). Anyway, Damians excuse was that his Latin was poor, but his Esperanto was non-existant
perlmongo I once saw Damians talk about Klingon arithmetic i perl. 11:28
masak ooh, Klingon arithmetic!
perlmongo: is there a CPAN module? 11:29
jnthn ...this channels range of topics always makes it a curiosity to wander in to... 11:30
hi all :-)
masak "...intellectual omnivores..."
jnthn: ahoj! 11:31
jnthn masak: ahoj! ako sa mas?
masak jnthn: dobre, dobre. a ty?
jnthn masak: Mam sa dobre. Isiel som do krcmy vcera vecer. ;-)
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.
jnthn
.oO( did that come from Google Translate )
11:33
masak aye. :)
11:33 davidad left
pugs_svn r26959 | wayland++ | [S22] Updated bad terminology that I created yesterday to the better 11:33
r26959 | wayland++ | terminology that Mark Overmeer created ages ago.
masak I had to fall back to it. ENOTENOUGHSLOVAK.
jnthn: was the krcmy enjoyable? 11:35
jnthn (krcma nominative) Yes, it was. :-) 11:37
Was warm enough to sit outside.
11:37 payload joined 11:38 daemon left
masak ah. krcma. 11:39
jnthn: so, what's a krcma? :)
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
masak: Dunno
masak jnthn: ah. I guess I could have caught that from the context.
jnthn Note that actually it's krčma
masak ok.
jnthn If I coulda been bothered to type the character with the mark.
(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. :)
jnthn masak: Actually, I've found it easier than I would have expected to learn to cope without them. 11:42
pmichaud good morning #perl6 11:44
masak pmichaud: morning, pm.
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
masak viklund: o_O 11:46
viklund (when I put in coordinates)
masak viklund: I was not aware of that. :/
pmichaud masak: (november's Test.pm) -- last I recall, I was in favor of adopting november's Test.pm into rakudo 11:47
11:48 jbt joined
masak pmichaud: I could make it easier for you by preparing a patch for review. 11:49
11:50 amoc joined 11:52 xinming_ left
pmichaud masak: I think I was in favor of that also :-) 11:53
(that is, of me having a patch for review)
masak pmichaud: :) I forget. I'll do it now. 11:56
masak.org/carl/stockholm.pm/perl6.pdf # my hackathon talk
pmichaud well, I wasn't necessarily requiring _you_ to be the one to generate the patch for review
sounds like a useful hackathon project for someone, though :-)
11:56 muixirt2 joined
masak I'm motivated enough to do it myself, but people are invited to steal the task from me. :) 11:57
11:57 Muixirt left 11:58 muixirt2 is now known as muixirt 11:59 krakan joined 12:01 xinming joined
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
r26961 | pmurias++ | [re-mildew] removed incorrectly set $?BLOCK and $?ROUTINE
r26962 | pmurias++ | [re-smop] added PRIMITIVES::get_interpreter
r26963 | pmurias++ | [re-smop] added interpreter.FETCH
r26964 | pmurias++ | Revert "[re-mildew] removed incorrectly set $?BLOCK and $?ROUTINE"
r26964 | pmurias++ |
r26964 | pmurias++ | This reverts commit b0bcfc9e2f524fbdd317bf57771736f5bd5f2eeb.
r26965 | pmurias++ | [re-smop][re-mildew]
r26965 | pmurias++ | added an Exception role it is now used in t/throw_inside_catch.t
r26965 | pmurias++ | removed OutOfItemsException
masak viklund: I can't either at present. :(
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. (gist.github.com/119917)
bbiab 12:08
12:08 payload left
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.
masak pmurias: because it's very tempting to see new syntax being added to a program. 12:10
12:11 payload joined
pmurias masak: what i asked is why is factorial choosen, not why operator overloading showed off 12:12
s/choosen/choosed/ 12:13
masak s/choosed/chosen/ :)
pmurias: I don't know. factorial shows off both op overloading and metaoperators, so it's nice that way.
wayland76 And it's very short :) 12:14
And hasn't been built-in, like a lot of the other familiar ones
12:20 daemon joined, jbt left
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
12:21 daemon left
pmichaud I'm sure if someone came up with another example, it would be used :-) 12:21
masak viklund: can you build Druid? 12:22
(I can't.)
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
Can Rakudo do custom quotes?
pmichaud not yet.
masak pmichaud: in the error "Can't find ./Module in @INC" -- shouldn't that be @*INC?
wayland76 ok
Is that after LTM?
pmichaud wayland76: Yes. 12:24
masak: Probably.
wayland76 That's what I thought :)
pmichaud: While we're on Masak's topic, could we get @INC printed in that message?
pmichaud wayland76: patches welcome. :-)
wayland76: short of that, file a ticket :-) 12:25
wayland76 Or does that need Parrot_print_path_str?
pmichaud @INC is just an Array
lambdabot Unknown command, try @list
viklund masak: Yes I can build, and after the build the Vertical/Horizontal worked??
masak pmichaud: I'll change to @*INC, and might come back to printing it too.
viklund: o_O
wayland76 masak++ :)
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:27
12:32 ZuLuuuuuu joined
literal masak: we should do some more thinking on the filesystem layout of the docs soon 12:32
viklund masak: I believe you haven't added web's lib to PERL6LIB when you compile druid 12:33
pmichaud jnthn: ping
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)␤»
..elf 26965: OUTPUT«Permission denied at ./elf_h line 324.␤»
..pugs: OUTPUT«*** Cannot use this control structure outside a 'routine' structure␤ at /tmp/3tJjZE4wrB line 1, column 6-21␤»
pmurias perl6: say "alive";
p6eval elf 26965, pugs, rakudo 606252: OUTPUT«alive␤»
pmurias perl6: my $foo = fail "xyz";$foo.foo;
p6eval rakudo 606252: OUTPUT«Can't return outside a routine␤in Main (/tmp/9Om9WZXmpS:2)␤» 12:35
..elf 26965: OUTPUT«Undefined subroutine &GLOBAL::fail called at (eval 125) line 3.␤ at ./elf_h line 5881␤»
..pugs: OUTPUT«*** Cannot use this control structure outside a 'routine' structure␤ at /tmp/x0OPdh6WEJ line 1, column 6-21␤»
12:36 sri_kraih joined
jnthn pmichaud: pong 12:36
12:36 meppl joined
pmichaud is there a switch to turn on the backtraces in Rakudo? 12:36
jnthn "turn on"?
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.
pmichaud how about a global flag?
as opposed to command-line option?
jnthn pmichaud: It's just a case of not pushing the error handler though.
We could have a global flag for it too.
Though that needs a re-compile.
I'd fine a command line option useful. 12:38
pmichaud okay.
jnthn *find
Feel free to do a global flag for now though.
If you just want a quick fix.
Or quicker, temporarily comment out the push_eh :-)
pmichaud that's a bit more of a pain than I want... yes, comment out sounds good.
I wasn't planning to spend the day debugging parrot issues :-( 12:39
jnthn oh, latest Parrot breaks stuff for us?
pmichaud epicly.
jnthn shit.
pmichaud well, maybe just a minor miniseries instead of an epic
gist.github.com/119917
still, not fun. 12:40
jnthn Yeah, of those only slice and indirect_notation are known. 12:42
pmichaud after building on latest parrot, the following fails
my $x = 1 + 0i; say $x - $x;
uh oh 12:43
I think I know what broke.
jnthn pmichaud: I've been working against 39176 and that one didn't have those issues. 12:44
fwiw
pmichaud yes, that's a huge help.
thanks.
jnthn My suspicions are some of the MMD related changes. 12:45
12:45 iblechbot joined
pmichaud actually, it appears to be a namespace related change 12:45
jnthn oh.
dalek kudo: 77b920a | masak++ | src/builtins/eval.pir:
[src/builtins/eval.pir] s/@INC/@*INC/
pmichaud okay, I have an easy example. 12:47
gist.github.com/119933
now it's time to start bisecting.
DanielC Question: Does Larry Wall work on Rakudo or just the Perl 6 spec? 12:48
pmichaud DanielC: mainly on STD.pm and the spec 12:49
DanielC What is STD.pm ?
pmichaud the "official" grammar
masak pmichaud: if people want to know what features work in Rakudo today, what file or URL do I send them to?
pmichaud masak: rakudo.org/status, I think
jnthn oops, forgot to eat and now all light-headed.
jnthn -> lunch
12:50 sri_kraih_ left
DanielC pmichaud: Is that used by most Perl 6 implementations? 12:50
pmichaud rakudo.org/status probably needs an update
DanielC: for Rakudo and Pugs, no.
I think elf uses it. I'm not sure about smop.
DanielC k
12:52 JDlugosz_ joined, finanalyst joined, FurnaceBoy joined 13:02 mizioumt joined, alester joined 13:05 alester left 13:08 nihiliad left 13:09 allbery_b left
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
My computer is half frozen...
13:16 drbean left
pmurias DanielC: smop uses STD 13:17
13:17 drbean joined
DanielC String handling is really inefficient in Rakudo (substr). 13:18
Matt-W Most things are really inefficient in Rakudo at the moment
DanielC nods 13:19
13:21 Chillance joined 13:30 perlmongo left
jnthn back...and wondering why the hail storm started while he was walking back rather than a couple of minutes later... 13:31
13:32 cmarcelo joined 13:34 iblechbot left
DanielC Is this correct Perl 6: while ($line = $*IN) { do_something($line); } ? 13:39
masak DanielC: no. 13:40
DanielC :-(
masak DanielC: you assign $*IN, a filehandle, to $line.
DanielC What is the right way to do what I mean?
masak DanielC: for $*IN.lines -> $line { do-something($line) }
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
13:42 abra joined
DanielC (ie. skip lines of input until a condition is met and then do something with the following lines) 13:42
PerlJam DanielC: perhaps you want while $*IN.get -> $line { ... } # then 13:43
masak DanielC: no, it will not do what I think you mean.
DanielC What is the difference between .get and .lines? Does .lines return the entire array all at once?
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
(lazily)
DanielC So, if I want to break and then continue reading in another loop, it looks like .get is what I want.
PerlJam (I still think they should be spelt .gimme(1) and .gimme(*) though 13:45
)
jnthn PerlJam: Happiness is just a monkey patch away. ;-)
masak PerlJam: write a module that adds a synonym method. that's possible today.
jnthn: I like that slogan. :)
PerlJam jnthn: yeah except I really don't like "gimme" textually, just the concept :) 13:46
13:46 decasm joined
PerlJam maybe .get == .get(1) and .get(*) to get them all. 13:46
or if .get(*) is the common case, .get == .get(*) 13:47
13:47 exodist joined
PerlJam (you see I have trouble making decisions sometimes :) 13:47
13:48 skids joined 13:54 ssm left
pasteling "DanielC" at 78.49.51.115 pasted "Program dies" (20 lines, 679B) at sial.org/pbot/36901 13:54
PerlJam DanielC: s/break/last/ 13:55
DanielC Hi all. I have a problem with a program dying.
ah
thanks
13:55 ssm joined
Matt-W hah 13:55
how's that for fast service
DanielC :-)
Matt-W PerlJam++
DanielC PerlJam++
Matt-W tries not to fall asleep
(it makes a bad impression on the managers) 13:56
13:59 hanekomu left
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)␤»
masak jnthn: is the above wrong somehow? I have corresponding code in Druid, so I'm pretty sure it used to work. 14:00
jnthn masak: well, your constructor isn't constructing an object...:-S 14:01
masak jnthn: how is that an error?
oh!
I see.
I doubt that's the problem in the Druid code, though. 14:02
ok, I'll pop back later tonight.
14:02 masak left
jnthn masak: I did do some changes to bless/CREATE etc. 14:02
oh, he's gone
14:02 viklund left, alester joined
DanielC Damn it. "uc" is still broken. ( $foo = $*IN.get; $foo = uc $foo ) => "no ICU lib loaded in method Any::uc" 14:03
14:03 kidd joined
DanielC I need "uc" to make the stupid program work. 14:03
mberends rakudo: my $foo="abc"; $foo.uc.say 14:04
p6eval rakudo 77b920: OUTPUT«ABC␤»
DanielC mberends: You need to use $*IN to reproduce the error. 14:05
mberends tries...
DanielC mberends: Because when you read from $*IN Perl 6 assumes UTF-8.
14:06 nihiliad joined
DanielC mberends: I sent sample code to the Rakudo bugs mailing list. 14:06
s/mailing list/emal address/
jnthn DanielC: It's not really a bug.
DanielC That was a couple of days ago.
jnthn: Do you have access to the bug report I filed? It only happens with "uc", not with "lc". 14:07
14:07 sparc left
jnthn DanielC: You just need to have ICU around/findable by Parrot. 14:07
14:07 allbery_b joined
DanielC jnthn: Can you explain why the bug would affect uc but not lc? 14:08
jnthn Yes, that's a curious inconsistency.
DanielC exactly
pmichaud use.perl.org/comments.pl?sid=43077&cid=68843 # comments welcome 14:09
mberends DanielC: I cannot reproduce the error on debian stable :/
pmichaud mberends: do you have ICU installed? 14:10
(if so, that would be why you can't reproduce the error :-)
DanielC *click*
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
jnthn pmichaud: post looks good 14:19
14:24 muixirt2 joined
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.
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)␤»
pmichaud That's why I'm starting to look at the question of "when do we no longer call Rakudo a 'development release'?"
I'm hoping it will make a good BOF session and/or hallway discussion at YAPC::EU
(and possibly YAPC::NA)
literal as soon as you start thinking og backward compatability, maybe? :)
s/og/of/
pmichaud literal: I already think of backward compatibility. See my post.
literal ah 14:26
pmichaud In general, with each Rakudo release we aim for the following:
1. Anything that is in the current Perl 6 specification and that worked in the previous release continues to work in the new release.
pugs_svn r26966 | pmurias++ | [re-smop] started working on Failure 14:29
r26966 | pmurias++ | PrototypeHOW calls UNKNOWN_METHOD if a method is missing
mberends rakudo: class A { has $.x; method new(:$xx!){self.bless(x=>$xx+1)};}; A.new(xx=>1).x.say
pugs_svn r26967 | pmurias++ | [re-smop] SMOP_MOLD_DEBUG is enabled only if both the
r26967 | pmurias++ | SMOP_MOLD_DEBUG compile flag and env variable are set
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)␤»
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 »
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
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)?
pmichaud
.oO( Hmm. Stars are mostly gas, so passing * must be really like...)
14:33
14:33 lichtkind joined
TimToady mberends: the problem is syntactic 14:33
lichtkind return quasi { say "foo" }; means that this term is returned but not executed?
lambdabot lichtkind: You have 1 new message. '/msg lambdabot @messages' to read it.
jnthn mberends: spec was clarified there a bit 14:34
mberends: No it's *not* self, self is the protoobject
TimToady which is immutable
jnthn mberends: To create a new candidate to bless you can do self.CREATE()
TimToady which is mutable
jnthn mberends: That bit now follows the spec. However, our BUILD is still wrong.
mberends me tries locally...
lichtkind DanielC: right the link you found was my startpoint so feel free to edit there :) 14:35
DanielC lichtkind: So, rather than start from scratch, you want me to review your translation? 14:36
lichtkind DanielC: that would be also helpful
DanielC ok
lichtkind DanielC: but most parts are not translated yet
DanielC: the project slept since i started a bit :) 14:37
DanielC ok
lichtkind fine :)
DanielC lichtkind: Ok, so I can help complete the translation.
lichtkind thats what i asked for yesterday, :)
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 :)
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
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++
p6eval rakudo 77b920: OUTPUT«2␤»
DanielC lichtkind: Sure. 14:40
lichtkind: afk
14:40 muixirt left, pjcj left
TimToady wayland76: definition of oboe: An ill wind that nobody blows good. 14:40
pmurias TimToady: so do i have to check if someone stored the exception somwhere? 14:42
14:43 brunov joined
TimToady only if it's stored in $! 14:43
(by fail, presumably)
normal GC doesn't care whether an object it's destroying happens to be a Failure 14:44
14:45 icwiener_ joined 14:46 icwiener left
pmurias so $! forces a garbage collection run on every scope exit? 14:46
TimToady probably best not to call it garbage collection 14:48
it just looks for unhandled exceptions via $!
could be a single bit 14:49
which says whether there is a list of unhandled exceptions to consider
14:50 muixirt2 is now known as muixirt
TimToady one would like to optimize the case of no exceptions were thrown 14:50
since exceptions are, er, supposed to be exceptional
14:52 LadyLuna1y joined
pmurias TimToady: that would mean that a valid refcounting implementation of Perl 6 would have to handle reference cycles 14:57
TimToady o_O 14:59
I'm not talking about garbage collection AT ALL
it's just a list as a data structure within $! 15:00
has nothing to do with with refcounting
except to the extent any data is refcounted
15:01 mikehh left
TimToady unless resumable exceptions keeping a continuation causes cycles, but I think you're nuts to use refcounting anyway 15:02
long ago I hooked up Java with Perl, and mixing GC with p5's refcounting wasn't much of an issue
so I don't think the argument of p5 interoperability really flies 15:03
15:04 ejs left 15:08 LadyLunacy left 15:13 unitxt left
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:13
jnthn pmurias: It sounds like you're relying on reference counting to do something that is maybe better implemented another way. 15:15
pmurias like relying on it to reclaim memory ;) 15:16
jnthn pmurias: To me handling the unthrowns in $! felt like a kind of block exit thing. 15:19
erm, unhandleds
throwing then
gah :-)
15:20 donaldh left
pmurias jnthn: you have to have something resembling a mark phase of the gc to check if exceptions are alive 15:20
15:20 donaldh joined
jnthn pmurias: huh? 15:20
skids $jnthn_touchtyping_cache.visit
jnthn pmurias: It's about handled, not liveness, no?
pmurias unhandled and dead exceptions are thrown 15:21
jnthn oh, hmm, I see the wording in S04 that you're referring to. 15:22
pmurias IMHO that's also the most usefull behavior 15:24
15:27 nated left, muixirt2 joined 15:36 ZuLuuuuuu left
TimToady pmurias: that sounds completely overdesigned to me 15:38
$! is lexically scoped, and just cleans up at block exit 15:39
that's all
jnthn TimToady: The spec mentions gc which is maybe the source of confusion.
TimToady and I've already disavowed that term several times now...
skids
.oO(fix spec?)
15:42
TimToady hmm, looks like audrey wrote that paragraph
jnthn skids: Yes, that was what I was hinting at. :-)
15:42 muixirt left 15:43 Chillance left
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
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.
it's been confusing for many.
TimToady or foo() // bar() would not work right 15:45
15:45 mickej left
TimToady *if* $! has a record of any failures that weren't handled, then and only then do we have to think about them 15:45
the paragraph in question is trying to make it possible to return the current exception as part of a data value 15:46
I think that's probably overdesign, as I said
pmichaud overdesign--
TimToady we don't care about exceptions as data values, they're just data 15:47
we only care about the ones that were registered with the current $!
and I think if you want to poke an unhandled exception into a data structure, that must be done explicitly 15:48
so $! simply fails with any unhandled exceptions listed in $!
that is, the block exit fails
skids So it's essentially trying to make it so we can do with thrown exceptions what Failure() does with unthrown?
15:49 icwiener_ left
TimToady I don't understand your question 15:49
skids That's OK I don't understand what I'm asking about :-)
15:50 muixirt2 is now known as muixirt, icwiener joined
skids
.oO("depth first" learning gets you over your head in Perl6/Parrot)
15:51
TimToady more precisely, the block exit dies on unhandled exceptions, which is how unthrown exceptions will typically get thrown 15:52
anyway, I'll work on the paragraph in question 15:53
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 )
DanielC On my computer Rakudo says Statement not terminated properly at line 1, near "keys %h;"
pmichaud need a comma 15:56
sort { $^a cmp $^b }, keys %h
simpler is
DanielC ah
pmichaud sort { +$^a }, keys %h
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)
DanielC pmichaud: The real sort I want is { %h{$^a} <=> %h{$^b} || $^a cmp $^b }
pmichaud: I just picked a simpler sort for testing.
15:57 dakkar left
pmichaud DanielC: Oh. Then I think you want: 15:58
%h.sort { .value }
er
%h.sort: { .value }
oops 15:59
DanielC Will that sort by value THEN key?
pmichaud %h.sort: { +.value }
Yes, I'm pretty sure it does.
oh, wait, I guess not.
DanielC :)
pmichaud it sorts by value, but not key (because it's a stable sort, and hash keys aren't guaranteed to be in order)
DanielC Btw, do you need the : after sort? What does the : do?
pmichaud without the : the %h.sort looks like %h.sort() 16:00
DanielC %h.sort: { +.value || +.key } ?
DanielC is just guessing
pmichaud no, that won't work.
DanielC oh well
pmichaud The spec does say it's possible to have an array of comparators, but Rakudo doesn't have that yet.
Anyway:
%h.sort: { $^a.value <=> $^b.value || $^a.key cmp $^b.key } 16:01
DanielC cool
16:02 decasm left
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
pmichaud it returns a list of pairs.
and the pairs will be in sorted order
yes, if you assign it to a hash, they can be out-of-order again
DanielC I could put it straight into the for loop: for (%h.sort: ...) -> $k,$v { ... }
is that the right thing to do? 16:03
skids You may have to .kv to explode
pmichaud not quite, because .sort produces a list of pairs
so you'd get one pair in $k and the next in $v 16:04
I don't know if .kv on a list of pairs works just yet.
(thinking)
skids Oh, but .kv on a list of pairs is (0,pair1)(1,pair2)
pmichaud you can certainly do
DanielC for (%h.sort: ...) -> $item { $item.key ... $item.value } ?
pmichaud for %h.sort: ... -> $p { ...... right, what you just wrote
DanielC thanks 16:05
pmichaud oh!
even easier
for %h.sort: ... { .key ... .value }
DanielC nice
pmichaud for %h.sort({ .value }) { say .key, "\t", .value; } 16:06
(display a hash, sorted by value)
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.
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
std: my %h = (c =>3,a =>4,b =>4); my @keys = sort { $^a cmp $^b } keys %h;
p6eval std 26967: OUTPUT«##### PARSE FAILED #####␤Statements must be separated with semicolon at /tmp/xx7kHgjcgG line 1:␤------> b =>4); my @keys = sort { $^a cmp $^b } keys %h;␤ expecting any of:␤ infix or meta-infix␤ infix stopper␤ standard stopper␤ statement␤
..statement modifier loop␤ te…
TimToady well, maybe that's not completely accurate...
DanielC TimToady: Thanks.
TimToady but at least it points out that something is missing 16:08
pmichaud (note that rakudo gave basically the same information here :-)
DanielC TimToady: Well, it says that the parse failed.
pmichaud Statement not terminated properly at line 1, near "keys %h;"
TimToady I should probably catch the missing comma error
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
you want <=> || leg
pmichaud right, it's "leg" for string comparison.
DanielC What is leg?
pmichaud "less-than/equal-to/greater-than"
but in a string since instead of a numeric one. 16:10
*sense
DanielC I want to sort numerically by value, then asciibetically by key.
16:10 sjohnson left
pmichaud right, that's leg 16:10
TimToady l : < :: e : = :: g : >
pmichaud "cmp" is a more generic comparison operator
DanielC so what's cmp?
TimToady dispatched by type
pmichaud the exact definition of which is still being mulled over by TimToady++ :-)
DanielC ok
TimToady so sorts numbers numerically and strings stringically 16:11
the question is what to do on a type mismatch
probably multi infix:<cmp> ($a,$b) { $a leg $b }
skids
.oO(stringentially?)
DanielC Should I use leg because it's faster or because cmp will do the wrong thing?
TimToady unless that turns out to be inconsistent
we have not yet defined cmp to do the wrong thing :) 16:12
DanielC :-)
TimToady the Q is, how does a Num compare with a Str 16:13
16:13 Chillance joined, sjohnson joined
TimToady I think the default cmp above probably is inconsistent due to the vagaries of stringification 16:14
DanielC k
TimToady one consistent approach would be to order the types
such that Num < Str, for instance
but that's not what people quite expect either
FurnaceBoy this question was recently raised on Erlang list. 16:15
TimToady it's an interesting problem
FurnaceBoy indeed 16:16
TimToady one would like to avoid circularities in orderings
FurnaceBoy there's also the principle of least surprise to consider.
it came up on the list because someone got a surprise P)
:)
pmichaud same here :)
TimToady yes, you want 42 < 42chickens < 43
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
FurnaceBoy haha
TimToady pmichaud: :P
DanielC pmichud: they do?
pmichaud DanielC: they're not supposed to, but they did
TimToady they both fail, i presume
DanielC ugh 16:18
pmichaud no, Parrot chose the type of comparison based on the left operand
DanielC ugh!
pmichaud so 3 cmp "b" ends up being 1 because 3 > "b"
and "b" cmp 3 ends up being 1 because "b" > "3"
er, "b" gt "3"
TimToady currently cmp is defined only on the same type arguments
like eqv 16:19
FurnaceBoy topic was , "{1} > 100 returns true ?!"
thread: www.nabble.com/%7B1%7D-%3E-100-retu...67619.html 16:20
number < atom < reference < fun < port < pid < tuple < list < bit string
oh, that isn't less-than
yes a same-type comparison can prevent surprises, or at least, convert them into an electric shock 16:22
PHP suffers greatly in this area, having so many silent coercions
TimToady it's probably impossible to be both dwimmy and consistent, because people expect different things
FurnaceBoy true 16:23
skids
.oO(somehow "dwim" has not made it to keyword status)
TimToady however, we can be consistent and *mostly* dwimmy with sufficient effort
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)
TimToady skids: doesn't need a keyword, when it has a symbol, namely *
FurnaceBoy Huffmanism ! 16:24
:)
TimToady actually, they wanted 3 sets like Perl 6
16:24 sjohnson left
TimToady but they don't know that yet 16:24
skids That's a french dwim. It dwims, but resents you for it. 16:25
skids lunch, hopefully waitress dwims. 16:26
FurnaceBoy bon appetit
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:32
a general sort needs to be a single routine with a single policy 16:33
that ignores the actual types to some extent
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
so Buf < Complex < Int < Num < Str, or some such
that's the only way cmp can be consistent 16:35
and the a general sort is just sort &gcmp, @list
or some such
16:37 unitxt joined
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
the typey one is what cmp defaults to 16:38
FurnaceBoy yeah type then value
DanielC TimToady: Can users create their own types in Perl 6? (e.g. like you can in Haskell)
TimToady multi infix:<cmp> (Any $a, Any $b) { $a.WHAT leg $b.WHAT }
certainly 16:39
depending, of course, on precisely what you mean by "type"
DanielC How can cmp sort by type if it doesn't know ahead of time what types are available? 16:40
16:40 hudnix left
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.
TimToady see multi above
16:40 sjohnson joined, Psyche^ joined 16:41 cmarcelo left
DanielC Buf < Complex < Int < Num < Str 16:41
This is alphabetical. I just didn't know if you meant that in general.
ah, yes you did
sorry
TimToady I always mean things in general, except when I mean them in specific. 16:43
xalbo I think people will find 3 < 2.5 to be very surprising. 16:44
DanielC Float < Int => 3.5 < 2 ?
TimToady there is no Float 16:45
it's Num
DanielC ok
TimToady I'm just saying, if we use MMD cmp, we have to do it that way to be consistent
I'm not saying that sort has to default to cmp
well, I implied it, I suppose 16:46
but I'm not saying it now :)
jnthn Also, there's nothing to stop us defining multi infix:<cmp>(Num, Int)
and :(Int, Num)
When there is a reasonable answer 16:47
DanielC Is Int not a type of Num ?
jnthn Though the combinations may expode.
DanielC: Yes-ish. :-)
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, rindolf joined
rindolf Hi all. 16:49
DanielC o/
16:52 sjohnson left 16:55 donaldh left 16:56 alexn_org left
lichtkind quasi quoting means that te quoted is ment literaly (as code)? 16:56
16:57 Patterner left, Psyche^ is now known as Patterner 17:00 payload left
TimToady a quasi quote compiles the code to an AST and returns that 17:03
17:03 alester left
TimToady the quasi quote may contain quasi-unquotes that execute internally and their results placed into the AST 17:03
17:03 sjohnson joined 17:05 rindolf left 17:07 iblechbot joined 17:09 zamolxes left 17:13 pjcj joined 17:21 icwiener left 17:22 sjohnson left 17:23 sjohnson1 joined
jnthn Rain all weekend. That's probably going to work out well for Rakudo... 17:25
17:27 mib_0rq9ne joined, hanekomu joined
literal it's raining tuits 17:28
17:28 cmarcelo joined 17:33 hanekomu left 17:35 presh left 17:36 cdpruden joined 17:37 presh joined
FurnaceBoy awesome 17:39
i need some
preferably big round ones
17:40 zamolxes joined
DanielC What is the Perl 6 equivalent of qw(one two three) ? 17:43
skids <one two three> 17:44
DanielC thanks
skids volunteers new england's rain for the rakudo effort. 17:45
You can come by and pick it up *immediately*
PerlJam wouldn't mind having some rain here (we're about 8" below normal for this time of year) 17:46
17:46 kidd left 17:47 xinming left
DanielC buubot: random 17:47
buubot DanielC: 837209142089260781897614733910247202
DanielC hmm... that's not what I had in mind.
PerlJam rakudo: say rand
p6eval rakudo 77b920: OUTPUT«0.683458038912253␤» 17:48
DanielC thanks
Can you do @arr.rand and extract a random element from an array?
jnthn DanielC: @arr.pick 17:49
literal .pick
DanielC thanks
literal rakudo: say <foo bar baz>.pick
p6eval rakudo 77b920: OUTPUT«foo␤»
PerlJam DanielC: or, if you really *Want* to use rand for that: @array[rand * @array] # :-)
DanielC :) 17:50
PerlJam btw, @array.pick(*) gives you all elements of the array in random order.
DanielC my @C = <Comprehensively Conspicuously Continuously Completely Certainly>; 17:51
my @P = <Pathological Perplexing Powerful Pervasive Pedestrian>;
say @C.pick ~ " " ~ @P.pick ~ " Archive Network";
:-)
literal @A = <Archive Array Anthology>; 17:52
lambdabot Maybe you meant: . ? @ v
17:52 cmarcelo left
DanielC literal: thanks 17:53
What's the name of that dictionary robot? I want to look up anthology.
TimToady hmm, @array[*.rand] should work eventually too, methinks
literal DanielC: dunno, but here is something -> dictionary.reference.com/browse/anthology
TimToady and is extensible to @array[*.rand; 0] and such
DanielC literal: *click* 17:54
Matt-W TimToady: cool!
DanielC Perl 6 arrays are impressive.
literal: Anthology is good... 17:55
17:55 ZuLuuuuuu joined
literal DanielC: also, @N = <Network Nest>; 17:55
DanielC thanks
TimToady anthology ought to be the study of flowers :)
17:57 unitxt_ joined, unitxt_ left
TimToady ...such as camelias 18:00
FurnaceBoy :) 18:06
FurnaceBoy looks for a pistil 18:07
18:07 mizioumt1 joined 18:08 mizioumt1 left
sbp hmm. when people use new languages, they often use flashcards 18:08
I wonder if perl6 flashcards would be useful
18:08 mizioumt1 joined
sbp I can imagine a set for the operators, say, might be handy 18:09
*people learn
lichtkind TimToady: thanks
18:10 unitxt left 18:12 mizioumt1 left 18:14 tedv joined 18:15 bloonix joined
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:17
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
p6eval rakudo 77b920: ( no output )
jnthn tedv: Hi! :-)
tedv: Yes, help is most welcome.
tedv: There are various projects that you might wish to get involved in - www.perl6-projects.org/ is a good overview 18:19
tedv yeah I've heard of both rakudo and pugs
jnthn tedv: There's more than one compiler project underway, but the most advanced and actively developed is Rakudo.
18:19 presh left
tedv and I have no haskell skills anyway 18:20
jnthn Same. ;-)
tedv haskall?
18:20 unitxt joined, synth left
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:20
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.
Yes, there's a lot to dig in to.
Building the codebase is a good first step.
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
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 eMaX left
jnthn Yeah, there is that. 18:23
Certainly there's a lot of non-trivial stuff done too.
TimToady jnthn++ is being modest 18:25
tedv modest in what direction? 18:26
is the remaining stuff "very hard" or "there's lots of non-hard stuff left"?
probably both 18:27
jnthn tedv: A bit of both I expect. 18:28
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. :-)
TimToady he's being modest about how much of the hard stuff he's done already :)
tedv heh yeah 18:30
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"
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
rakudo: my $num = "9"; say ++$num;
TimToady well, there's been nine years of thinking put into it so far...
p6eval rakudo 77b920: OUTPUT«10␤»
sbp rakudo: my $num = "-9"; say ++$num;
p6eval rakudo 77b920: OUTPUT«-10␤»
sbp rakudo: my $num = -9; say ++$num;
p6eval rakudo 77b920: OUTPUT«-8␤»
tedv nine years of thinking will help you find the right answer IF it exists, but it won't solve, say, the halting problem
TimToady tedv: if you want to discuss any of those, we'd be delighted
sbp ought there be dwimming for signed numerical rangechars?
tedv well how do junctions work internally? 18:32
jnthn sbp: Wow, that's beautiful. :-)
tedv it seems like if you misuse them
you could easily end up blow your computational complexity
lichtkind can macros be overwritten, i mean a new macro with same name override the old entry in the namespace?
TimToady certainly, but we tend to classify those as "Doctor it hurts when I do this...Well, then don't do that" problems
tedv like (1 | 2) + (3 | 4) * (5 | 6) has a lot of possible options
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
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
and can't figure out why things run so slow
but usually that's an issue with their algorithm design, not with perl
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.
FurnaceBoy wonders if there is any similarity with Icon generators
18:34 kidd joined
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
FurnaceBoy tedv++ 18:35
tedv like... java worked hard so that it was difficult for people to write the "wrong" syntax
jnthn TimToady: Aye, but that can be said of many other features too. ;-)
tedv and people just end up writing the wrong algorithms for which the "right" syntax is needlessly complex
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
tedv do junctions enforce uniqueness on results? Like will (1 | -1) * (2 | -2) internally become (-2 | 2), or (-2 | -2 | 2 | 2)
pmichaud sometimes hammerization is the right way to do it :-)
tedv: depends on the junction. 18:37
Tene When all you have is a hammer, it's HAMMERTIME!
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.
pmichaud rakudo: ((1 | -1) * (2 | -2)).perl.say
tedv since the latter is not effective for people who don't understand what the alternative "right thing" is anyway
TimToady then you've come to the right place :)
p6eval rakudo 77b920: ( no output )
pmichaud p6eval has become much less useful lately
TimToady pugs: ((1 | -1) * (2 | -2)).perl.say
pmichaud rakudo: (1 | -1).perl.say
p6eval pugs: OUTPUT«((-2 | 2))␤» 18:38
rakudo 77b920: ( no output )
jnthn pmichaud: I think p6eval's time or resource limit might have been set a little too tightly...
pmichaud jnthn: I remarked about this a couple of days also, hoping someone would lift it a bit.
No such luck.
TimToady rakudo: ((1 | -1) * (2 | -2)).perl.say
p6eval rakudo 77b920: OUTPUT«any(any(2, -2), any(-2, 2))␤»
TimToady the extra space after the colon?
pmichaud rakudo: (1 | -1).perl.say
18:38 mizioumt joined
p6eval rakudo 77b920: OUTPUT«any(1, -1)␤» 18:38
pmichaud rakudo: (1 | -1).perl.say
TimToady o_O
p6eval rakudo 77b920: OUTPUT«any(1, -1)␤»
pmichaud I claim resource limit. 18:39
jnthn hah, it's inscrutable.
tedv hmmm so apparently rakudo doesn't enforce uniqueness and pugs does
jnthn pmichaud: Dispatch refactor is coming along OKish.
TimToady we're here to unscrew the inscrutable
jnthn pmichaud: I...think. :-)
pmichaud jnthn: excellent. With latest parrot trunk our S14-role error has seemingly disappeared, unless someone fudged/regressed it
I now have an error in S16-filehandles/open.t, though.
jnthn S14-role one?
I didn't know we had an issue there. 18:40
pmichaud whatever error we were getting with parrot trunk (I forget which)
jnthn S12-methods/indirect.t or somehting
pmichaud yeah, that one
jnthn oh, I'm very happy that's fixed.
What was it?
pmichaud I don't know, it just disappeared on its own.
jnthn ...oh. 18:41
pmichaud I'm guessing it might've been related to some other patches that got un-done in Parrot.
jnthn Oh well, I'm not complaining.
pmichaud me either.
jnthn Did you do something related to PMCProxy creation/caching?
pmichaud This morning, yes.
I fixed the bug that was introduced yesterday in r39220
jnthn OK, but a little longer ago there was a patch relating to that very topic and that was what broke it. 18:42
So you almost certainly fixed it with your patch.
pmichaud it could be that also.
jnthn pmichaud++
pmichaud at any rate, PMCProxy creation is now likely to be "correct" for the current state of things in Parrot.
jnthn OK, excellent.
pmichaud hopefully we get our spectest speed back, too -- about to test that.
and it looks like the S16-filehandles/open.t error is the exit-double-free-bug
jnthn oh noes...not another one. 18:43
pmichaud sure, but at least it's not a regression for me at the moment :-/
jnthn oh fail...I forgot about the whole, dinner thing.
lichtkind pmichaud: this tricolor garbage collector is now operable? 18:44
pmichaud tricolor... what?!
jnthn pmichaud: You know, the GC that is orange, and hot pink, amd luminous green too! 18:45
sbp rakudo: for 0 ..^ 3 { say $_ }
p6eval rakudo 77b920: OUTPUT«0␤1␤2␤»
sbp rakudo: for 0 .. ^3 { say $_ }
p6eval rakudo 77b920: OUTPUT«0␤1␤2␤3␤»
jnthn
.oO( I really need food... )
lichtkind pmichaud: last yoers gsoc project for parrot
pmichaud lichtkind: I don't know -- I didn't follow it closely.
lichtkind pmichaud: i just want to know if it went into parrot source
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
lichtkind pmichaud: thanks 18:47
18:47 mib_0rq9ne left, mizioumt left
sbp actually, thinking about it, ranges for hyper-operations? 18:47
18:47 mizioumt joined
sbp can you junctify ranges? 18:48
rakudo: 0 .. 1 | 0 .. 2
p6eval rakudo 77b920: ( no output )
sbp rakudo: for 0 .. 1 | 0 .. 2 { say $_ }
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)␤»
sbp okay!
TimToady | is tighter than .. 18:49
sbp ah
tedv rakudo: (0 .. 1) | (0 .. 2)
p6eval rakudo 77b920: ( no output )
sbp rakudo: for (0 .. 1) | (0 .. 2) { say $_ }
p6eval rakudo 77b920: OUTPUT«Junction()<0xb61bfc10>␤» 18:50
sbp makes sense, okay
jnthn sbp: The say should auto-thread there. 18:51
pmichaud no.
say takes a slurpy list
jnthn oh, yes
pmichaud: OK, but *something* at some point should auto-thread, no? 18:52
pmichaud I don't think so, in that example.
jnthn oh.
pmichaud the junction should be smarter about stringifying, but that's about it.
lichtkind pmichaud: and the other project with native call interface was sucessful? 18:53
18:54 jferrero joined
pmichaud lichtkind: I don't remember, alas. 18:54
lichtkind pmichaud: which nickname has jerry gay? 18:55
pmichaud lichtkind: particle 18:56
lichtkind thanks
pmurias what's the english name for $! or even better what's the name of it's class?
pmichaud "dollar-bang"?
lichtkind hahaha
tedv I wish google search handled symbols 18:57
PerlJam their code search doesn't grook symbols?
tedv like when you want to find out what $& or $~ mean... Is $~ even bound? 18:58
symbols are stripped out
a search for "perl -i" will give the same results as "perl i"
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
though obviously that doesn't work for chinese 18:59
18:59 sjohnson1 left
tedv code search handles symbols 18:59
but just a "what does this thing do" in google's general search won't
pmichaud rakudo: say qw(xyz).perl; 19:00
p6eval rakudo 77b920: ( no output )
pmichaud rakudo: say qw (xyz).perl;
p6eval rakudo 77b920: ( no output ) 19:01
19:02 ruoso joined
sbp hmm. S03:43 and S03:974 mention sin as a unary operator 19:03
but then S29:725 says sin is in the Numeric modules, not a default
bug? or something I don't understand?
ruoso HellO! 19:04
sbp hey ruoso
PerlJam sbp: you don't understand that "in Numeric" is not mutually exclusive with "default" :)
sbp PerlJam: well just above that it says "not part of the default namespace any more"
finanalyst rakudo: my $x = <a> => sub { say 'hi' }; $x.value() 19:05
p6eval rakudo 77b920: ( no output )
pmurias ruoso: hi!
ruoso hi pmurias 19:06
pmurias ruoso: i have turned instance_storage from a HoH into a H
PerlJam And it burns through things..()
finanalyst rakudo: my %x = <a> Z sub { say 'hi' }; %x<a>()
PerlJam oops
p6eval rakudo 77b920: OUTPUT«hi␤»
PerlJam rakudo: my $x = <a> => sub { say 'hi' }; $x.value.()
p6eval rakudo 77b920: ( no output )
ruoso pmurias, but private attributes will clash that way 19:07
sbp I just wanted to see whether sin(π) gave 0, really
pmurias not if they have a unique private_name
ruoso: the package name is not unique
finanalyst can anyone tell me how to call code held in the value part of a Pair?
ruoso pmurias, but $.^!instance_storage{$?PACKAGE}<$!attr> is 19:08
pmichaud rakudo: my $x = <a> => 1; $x.value.say
p6eval rakudo 77b920: OUTPUT«1␤»
pmichaud rakudo: my $x = <a> => { say 'hi' }; $x.value.WHAT.say
p6eval rakudo 77b920: OUTPUT«Block()␤»
pmichaud rakudo: my $x = <a> => { say 'hi' }; $x.value()()
p6eval rakudo 77b920: OUTPUT«hi␤»
finanalyst why ()() ?
pmichaud rakudo: my $x = <a> => { say 'hi' }; ($x.value)() 19:09
p6eval rakudo 77b920: OUTPUT«hi␤»
PerlJam pmichaud: and why did $x.value.() not work?
pmichaud without the second set of parens, it just gives back the sub but doesn't invoke it.
$x.value.() is the same as $x.value()
(which is the same as $x.value)
PerlJam rakudo: say rand(); say rand.(); 19:10
p6eval rakudo 77b920: OUTPUT«0.0592697729161991␤0.26436817585224␤»
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'
the sigil and twigil are a part of the name
pmurias so what's the difference between name and private_name? 19:13
19:13 hercynium joined
finanalyst pmichaud: thanx 19:14
19:14 sjohnson joined
PerlJam pmurias: has $.foo; # name == $.foo, private name == $!foo (maybe) 19:14
PerlJam is only vaguely aware of what you're talking about :)
pmichaud the attributes name is always with the ! twigil. The use of the . indicates generation/use of an accessor method. 19:15
19:15 mizioumt left
pmichaud has $.foo # attribute name == $!foo, generates 'foo' accessor method 19:15
19:16 mizioumt joined
pmichaud say $!foo # access attribute directly 19:16
say $.foo # use 'foo' accessor method
ruoso pmurias, "name" is there so you can know how the attribute was originally declared... 19:17
has $.attr; has $!other;
dalek kudo: 951ffe5 | pmichaud++ | build/PARROT_REVISION:
Bump PARROT_REVISION to get some recent changes, including get_subid.
pmurias ruoso: i could use a Attribute.id or similiar 19:18
.UID? 19:20
jnthn is back 19:23
sbp rakudo: say 1..2 X 5..6
p6eval rakudo 77b920: OUTPUT«15162526␤» 19:24
pmichaud rakudo: for 1..2 X 5..6 { say "$^a, $^b"; } 19:26
19:26 jferrero left
p6eval rakudo 77b920: OUTPUT«1, 5␤1, 6␤2, 5␤2, 6␤» 19:26
19:28 eMaX joined, cdpruden left
sbp rakudo: say 'a' .. 'z' 19:29
p6eval rakudo 77b920: OUTPUT«abcdefghijklmnopqrstuvw»
sbp rakudo: say 'a' .. 'e'
p6eval rakudo 77b920: OUTPUT«abcde␤»
sbp why is the trailing z and newline trimmed in the first?
19:29 kcwu left
sbp oh, and the x and y. hmm 19:29
PerlJam rakudo: say 'a' .. 'z' 19:30
p6eval rakudo 77b920: OUTPUT«abcdefghij»
cotto rakudo: say 0 .. 50
PerlJam resource limits
p6eval rakudo 77b920: OUTPUT«0123456789101112»
PerlJam (it ran out of time)
sbp really? to say 'a' .. 'z'? hmm
thanks
pmichaud yes, it seems to me that p6eval's limits are set a tad too tight.
sbp rakudo: say 'a􏿽xCC􏿽x88' .. 'e􏿽xCC􏿽x88' 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␤»
pmichaud (rakudo rebuild currently taking place... try again in a few mins)
sbp okay, thanks
19:34 finanalyst left
pochi there's a 5 sec. timeout set on p6eval 19:35
pmichaud increasing that to 6 would probably make a big difference.
sbp it is, after all, perl*6*
pmichaud rakudo: say 'a'..'z' 19:36
p6eval rakudo 77b920: OUTPUT«sh: ./perl6: No such file or directory␤»
19:37 jferrero joined
pmurias ruoso: i'll add a storage_name property to Attribute (generated from the attributes name and the $?PACKAGE) 19:38
s/property/attribute/
sbp rakudo: say 'a􏿽xCC􏿽x88' .. 'e􏿽xCC􏿽x88' 19:39
p6eval rakudo 951ffe: ( no output )
Tene rakudo: say 'hi' 19:40
p6eval rakudo 951ffe: OUTPUT«hi␤»
Tene rakudo: say 'a'..'f'
p6eval rakudo 951ffe: OUTPUT«abcdef␤»
bloonix rakudo: say 'a' .. 'z' 19:41
p6eval rakudo 951ffe: OUTPUT«abcdefghijklmnopqrstuvwxyz␤»
bloonix rebuild done
19:42 mizioumt left, hercynium left
sbp what's up with this? 19:42
rakudo: <a b> X~ '.' X~ <1 2>
19:42 mizioumt joined
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
(S03:1686) 19:43
Tene rakudo: say 'a􏿽xCC􏿽x88' .. 'e􏿽xCC􏿽x88'
p6eval rakudo 951ffe: ( no output )
sbp rakudo: say <a b> X~ <1 2>
p6eval rakudo 951ffe: OUTPUT«a1a2b1b2␤»
Tene rakudo: say <a b> X~ '.' 19:44
p6eval rakudo 951ffe: OUTPUT«a.b.␤»
sbp rakudo: say (<a b> X~ '.') X~ <1 2>
p6eval rakudo 951ffe: OUTPUT«a.1a.2b.1b.2␤»
sbp rakudo: say <a b> X~ <.> X~ <1 2>
p6eval rakudo 951ffe: OUTPUT«too many arguments passed (3) - 2 params expected␤in Main (src/gen_setting.pm:3166)␤»
Tene X is list-associativity
pochi how difficult would it be to get readline support in the rakudo shell? 19:45
19:46 nihiliad left
Tene pochi: it should have it. 19:46
sbp rakudo: <1 2> X <a b> Z <p q>
p6eval rakudo 951ffe: ( no output )
sbp rakudo: say <1 2> X <a b> Z <p q>
p6eval rakudo 951ffe: OUTPUT«1paq␤»
pochi hm, did I miss a compilation flag or something? 19:47
Tene pochi: check the output of parrot's Configure.pl 19:48
sbp rakudo: say <1 2> X (<a p>, <b q>) 19:49
p6eval rakudo 951ffe: OUTPUT«1a1p1b1q2a2p2b2q␤»
pochi Does your platform support readline................done. 19:50
sbp [[[
but:
@a X @b Z @c
is parsed as:
@a X (@b Z @c)
]]] — S03:89
Tene sbp: I see the problem with X~... looking for a fix...
sbp doesn't look like it currently is
thanks
also, typo 'disambiguoate' at S03:103 19:51
pmichaud Rakudo uses readline functionality by default if Parrot provides it. 19:52
19:52 nihiliad joined
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:52
pochi I was a bit confused by that "done" :) 19:53
sjohnson pochi: cute nickname
pochi ty :)
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.
Tene oh, no, that's built by build/gen_metaop.pir 19:55
pmichaud I thought tha.... right
skids rakudo: class XT is Int { has $.xtra is rw; }; my $x of XT = 3;
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?
pmichaud it probably needs to be fixed in both src/builtins/op.pir and in gen_metaop
sbp rakudo: say @@(<a b> X <1 2>)
p6eval rakudo 951ffe: OUTPUT«say requires an argument at line 2, near " @@(<a b> "␤in Main (src/gen_setting.pm:2400)␤»
sbp but: 19:57
say @@(<a b> X <1 2>)
['a', '1'], ['a', '2'], ['b', '1'], ['b', '2']
— S03:1658
pmichaud rakudo doesn't know @@( yet
sbp 'k
Tene yes, that's what I thought.
I don't know the right way to get the associativity, though, or the full list of what needs to be wht^Hat.
pmichaud the associativity is already taken care of by being 'equiv'=>'infix:X'
we just need to fix the function calls to accept a list of arguments.
in other words, Rakudo is already parsing @a X~ @b X~ @c as list associative. 19:58
and calling X~ with three arguments
19:58 mizioumt1 joined
Tene right. 19:58
pmichaud (which infix:X~ fails on, because it's expecting two) 19:59
Tene rakudo needs a newer parrot... updating parrot...
pmichaud oh happiness! r39239 gives us back our spectest speed, plus we get a boost from chromatic++'s other speed improvements 20:00
Tene :)
man, I haven't updated parrot in a while.
PerlJam pmichaud: what does it look like now?
skids claps rapidly
Tene Where have i been?
sbp rakudo: 1 ... { -$_ }
p6eval rakudo 951ffe: OUTPUT«Statement not terminated properly at line 2, near "... { -$_ "␤in Main (src/gen_setting.pm:0)␤»
20:00 ZuLuuuuuu left
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
PerlJam sbp: I don't think rakudo understands that form of ...
sbp what form does it understand? 20:02
pmichaud rakudo: 28 * 60 + 45
p6eval rakudo 951ffe: ( no output )
pmichaud rakudo: say 28 * 60 + 45
p6eval rakudo 951ffe: OUTPUT«1725␤»
pmichaud rakudo: say 34 * 60
p6eval rakudo 951ffe: OUTPUT«2040␤»
pmichaud rakudo: say (2040-1725)/2040.0
p6eval rakudo 951ffe: OUTPUT«0.154411764705882␤»
pmichaud 15% improvement.
DanielC @karma DanielC
lambdabot You have a karma of 4
PerlJam sbp: sub foo { ... } 20:03
DanielC @karma DanielC
lambdabot You have a karma of 4
sbp ah
shame, I like its series operator guise
PerlJam DanielC++ (for all the neocpan discussion) 20:04
DanielC :-)
sbp “If the right operand is * (Whatever) and the sequence is obviously arithmetic or geometric, the appropriate function is deduced” — ?!
PerlJam sbp: perl is magic! :)
sbp going to be fun testing that!
DanielC PerlJam: I was trying to test if I got karma points for committing to perl6-examples. It looks like I don't.
PerlJam DanielC: does one of the bots watch perl6-examples? 20:05
DanielC I dunno
You mean it's not all the same?
PerlJam nope
DanielC ok 20:06
PerlJam the bot has to know which repos to watch for commits.
DanielC I guess it would be too easy to get karma points for examples.
skids pugs: class XT is Int { has $.xtra is rw; }; my $x of XT = 3; $x.say;
p6eval pugs: OUTPUT«*** ␤ Unexpected "of"␤ expecting "?", "!", trait, "=", infix assignment or operator␤ at /tmp/eNr0A7W7Qq line 1, column 46␤»
PerlJam pugs: class XT is Int { has $.xtra is rw; }; my Int $x = 3; 20:07
p6eval pugs: ( no output )
pmichaud std: say qw(DeeDee Ramone);
p6eval std 26967: OUTPUT«Undeclared names:␤ DeeDee used at 1 ␤ Ramone used at 1 ␤Undeclared routine:␤ qw used at 1 ␤ok 00:02 35m␤»
PerlJam skids: remember, pugs is frozen in time from a while ago :)
pugs: class XT is Int { has $.xtra is rw; }; my XT $x = 3; # your example 20:08
p6eval pugs: ( no output )
skids didn't know "$x of" was that new
pugs: class XT is Int { has $.xtra is rw; }; my XT $x = 3; $x.say;
p6eval pugs: OUTPUT«3␤»
20:08 mizioumt left
dalek kudo: c36d4f2 | pmichaud++ | src/parser/grammar.pg:
Correct qw() and other quotes-that-are-really-functions (TimToady++).
20:09
pmichaud pugs: class XT is Int { has $.xtra is rw; }; say ?(3 ~~ XT);
p6eval pugs: OUTPUT«␤»
PerlJam skids: that's probably a bug that's already been reported since it seems to be general.
pmichaud pugs: class XT is Int { has $.xtra is rw; }; my XT $x; $x = 3; $x.say;
p6eval pugs: OUTPUT«3␤»
pmichaud I claim pugs is wrong here. 20:10
PerlJam rakudo: class A {}; class B is A {}; my B $b = A.new;
p6eval rakudo 951ffe: OUTPUT«Type mismatch in assignment; expected something matching type B but got something of type A()␤in Main (/tmp/Z1qDR5ghwd:2)␤»
jnthn pmichaud: Agree.
pmichaud pugs: class XT is Int { has $.xtra is rw; }; say ?(3 ~~ Int);
jnthn pmichaud: But Pugs never AFAIK enforced type constraints on variables.
p6eval pugs: OUTPUT«1␤»
skids What I'm trying to wrap my head around is the fact that some classes have these invisible attributes.
That is, their primary value. 20:11
pmichaud I don't understand.
PerlJam skids: they aren't invisible if you give them an accessor :)
skids Well, "self" of an Int has a value.
But self also has all the class baggage
pmichaud what "class baggage"? 20:12
skids If you cad class X { has Int $f }, .f is it's own class.
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 tedv left
pmichaud with class X { has Int $f } -- we simply have a $!f attribute that is constrained to hold values that ~~ Int 20:13
(or undefs) 20:14
skids PerlJam: exactly, and how one might do that other than "is Int"ing another class.
PerlJam skids: I think you're in the realm of operator overloading.
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
20:15 makkabutta joined
skids PerlJam: yeah, but is seems like that still leaves Int and friends as some privilaged voodoo thing. 20:16
skids thinks it would be more consistent if there was a default attribute name for the builtin classes. 20:17
PerlJam "default attribute name"?
skids like a .val
PerlJam oh
skids But something not collide-prone 20:18
Unless it's like that already and I'm just not seeing it because it's a private attrib? 20:20
20:20 cdpruden joined, amoc left
PerlJam skids: so, let's say there is a method called .VAL, you would want 3.VAL == 3 ? 20:20
skids Well, sorta. Mainly I'd like to be able to talk unabiguously about that attribute. 20:22
Tene sbp: fixed the X~ stuff.
skids Not necessarily in code.
20:23 amoc joined
Tene just pushed. 20:23
I think it might need to happen for some of the other meta-ops
unsure.
pmichaud Tene: does the commit also fix the user-generated metaops? 20:24
Tene doubtful.
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.
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.
pmichaud skids: I thought that was the basic principal of OO :-)
*principle
"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 kudo: 92c78fa | tene++ | (2 files):
Fix cross meta ops to work with more than two args

  sbp++
20:26 mizioumt1 left
skids pmichaud: sure, it's just that it looks like a seam, even if it isn't really. 20:26
20:27 mizioumt joined
pmichaud I guess I'm just not seeing the seam. 20:27
class Y is X { ... }; my Y $x = X.new; # I would expect this to nearly always fail. 20:29
because an X is not a Y
skids OK, point taken. 20:31
20:31 hercynium joined
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:32 mizioumt left 20:33 mizioumt joined
cdpruden with that, though -- should .recv return more or less immediately? 20:33
it winds up waiting until a timeout, then it returns the banner, and a message that says it timed out.
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
pochi pmichaud++: pulling in libreadline-dev and recompiling worked great
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 sial.org/pbot/36905 20:36
mberends cdpruden, Tene: that .recv stalls in my Net::SMTP module as well.
cdpruden This is essentially what I was trying for, though
oh, hehe, yes, I was just starting to hack on a Net::SMTP module as well :)
pmichaud rakudo: say 'a'..'z'; 20:37
p6eval rakudo 92c78f: OUTPUT«abcde»
pmichaud rakudo: say 'a'..'z';
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
p6eval rakudo 92c78f: OUTPUT«3␤3␤»
pmichaud I'm guessing the bot must be _really_ slow, though.
Tene rakudo: use IO::Socket::INET; my $s = IO::Socket::INET.new; $s.open(q/pleasedieinafire.net/, 9876); $s.recv().perl.say;
p6eval rakudo 92c78f: OUTPUT«"omg hai doods\n"␤»
Tene :)
pmichaud on my system, ./perl6 -e "say 'a'..'z'" runs in under 1.0 second
and that's not even my _fast_ system. 20:39
Tene 0.4s for me
pochi 1.2s for me
pmichaud are we sure that it's a 5s timeout? Or perhaps something else is going on with p6eval?
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
pochi I think it's the "alarm 5" that is doing it
pmichaud where is p6eval so I can look at it?
cdpruden does recv only return when it hits eof?
(meaning the parrot recv, actually) 20:41
20:42 lisppaste3 joined
bloonix p6eval runs on my machine 20:42
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"␤»
pochi pmichaud: svn.pugscode.org/pugs/misc/evalbot
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 cdpruden left
Tene sbp++ 20:45
pmichaud Tene: I'll work on fixing the custom metaop generation for Xop 20:46
hercynium join #perl
oops
pmichaud Tene: did you ever find out what was going on with that weird unicode variable?
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.
hercynium ah... hey, anybody here with ops in #perl, both here and on MAGNet?
Tene which is probably right, as ☕ isn't a letter, iirc
sbp ah! it's bottable, cool
hercynium I'm working from a cafe and it looks like some luser got the IP banned :(
sbp how comes p6eval picked it up?
despite the fact that it rebuilt rakudo before you fixed this
which I presume is a daily cron 20:48
Tene sbp: rebuilds regularly.
pmichaud sbp: it's a 30 minute cron
sbp oh. surprised I've not noticed its build downtime before. thanks
PerlJam I thought it was a 60 minute cron 20:49
(top of the hour only. I've never noticed a problem at the bottom of the hour)
pmichaud since Tene++'s push has been since the top of the hour, it has to be more often than that :-) 20:50
skids (at least, for those of us who schedule hourly jobs on the 0) 20:51
:-)
pmichaud also, I have:
19:36 <p6eval> rakudo 77b920: OUTPUT«sh: ./perl6: No such file or directory␤»
which means the rebuild was taking place at the bottom of the hour.
bloonix 0,15,30,45 * * * * perl /home/evalenv/build-rakudo.pl
sbp heh, we were all wrong 20:52
PerlJam no, just right to varying degrees.
sbp hehe
pmichaud I just missed the 30 minute cycle that was offset 15 minutes from the one I knew about :-)
PerlJam Just like Newton is still right, even though Einstein refined his results a litt.e :)
er, little
20:53 ejs joined
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:53
bloonix pmichaud: do you want a login to the box? 20:54
pmichaud that would work, too :-)
bloonix moritz administrates the machine, I am just the owner ^^
PerlJam It doesn't run on one of the feathers?
pmichaud I'm just surprised that rakudo is taking >5s to run some of these short programs.
bloonix there are different crons on that machine 20:55
21:01 daemon joined
mberends Tene: could you please try that last recv() on an SMTP server port 25? For me it hangs every time :-( 21:04
21:07 pmurias left
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␤»
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
skids So how would one refer to X's !x attribute, regardless of the object's subclass, then, or is rakudo wrong? 21:16
21:20 M_o_C joined
jnthn pmichaud: Down to six test files with failures now I think. 21:21
pmichaud: However, got some others that pass all tests and appear to then explode on exit. :-| 21:22
21:22 Whiteknight joined
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:23
skids PerlJam: that doesn't seem sane. 21:24
What if Y was REALLY opaque.
Erm, x even
or even X
21:25 abra left
jnthn skids: I think Rakudo may well be wrong there. 21:25
PerlJam skids: I think it's insane to have two attributes with the same name. 21:26
21:26 amoc left
jnthn PerlJam: Not really - you shouldn't have to know the attribute names of your parent classes. 21:26
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...
jnthn Sure you wouldn't do it purposefully.
21:28 ejs left
skids (...or trust it not to change underneath you via upgrade) 21:28
21:28 donaldh joined 21:29 donaldh left
PerlJam skids: what would you expect this to do: class X { has $.x; }; class Y is X { has $.x } ? 21:29
jnthn: you too 21:30
skids PerlJam: if it's $.x, it is public API and has to be documented.
jnthn PerlJam: Both X and Y have an attribute $!x
21:30 ruoso left
jnthn PerlJam: If you instantiate a Y and call .x you'll get the accessor in Y. 21:30
$obj.X::x would (when implemented) yet you the one from x 21:31
erm, form X.
skids (and what jnthn said :-)
21:31 kate21de left
skids leaves work on mission to increase his carbon footprint (and get home) 21:36
I really should bit the bullet and move.
PerlJam jnthn: yeah, that seems right I guess. I was letting possible implementation details leak into my thinking. 21:37
jnthn oh noes! 21:39
oh, interesting
.can on a Junction is a little curious.
PerlJam But that means that use of $!foo should probably be discouraged.
jnthn Because you don't know if it can without seeing if all of its values can? 21:40
Hmm.
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
21:47 iblechbot left
TimToady anywhere you can see $!foo, it's perfectly fine to use it, as long as you don't really mean $.foo instead :) 21:47
bloonix w 21:48
21:48 nihiliad left
TimToady and submethods should generally always use $!foo 21:49
Eevee rakudo: say [**] 2, 2, 4 21:50
p6eval rakudo 92c78f: OUTPUT«256␤»
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;
TimToady doesn't break at all 21:51
neither $!x is visible outside its immediate class
they are completely independent
jnthn PerlJam: Rakudo has $.bug in that attribute lookups are currently too virtual.
PerlJam TimToady: so the $!x in foo() is always the $!x from X ? 21:52
TimToady $!x lookups?
PerlJam: yes
jnthn TimToady: Yes
TimToady that's the whole point of the ! 21:53
jnthn TimToady: I know they shouldn't be, but Rakudo doesn't yet. :-)
Eevee rakudo: (2, 2, 4).reverse.reduce: { $^b ** $^a }
p6eval rakudo 92c78f: ( no output )
21:53 mizioumt left
Eevee rakudo: say((2, 2, 4).reverse.reduce: { $^b ** $^a }) 21:53
p6eval rakudo 92c78f: OUTPUT«65536␤»
Eevee wow
rakudo has come a long way
21:53 Whiteknight left
PerlJam TimToady: this is something I know, but clearly there's something blocking visceral understanding :) 21:53
21:53 skids left
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
TimToady so $.x is always virtual, while $!x never is. 21:55
$.x is the wart on the nose of the (outermost) mask over your face, while $!x is the itch on your nose 21:56
if you don't expose a method saying "my nose itches", nobody will ever know it
jnthn eww.
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;
TimToady perhaps N layers of clothes would be a better metaphor...
21:59 Guest55951 joined, lichtkind left
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:01
jnthn is getting optimistic of having the dispatcher ready-ish for pushing tomorrow. 22:02
22:02 bkeeler left, szabgab left, jrockway left, Tene left
sjohnson should try rakudo one of these days 22:03
22:03 bkeeler joined, szabgab joined, jrockway joined, Tene joined
Tene TimToady.unwrap() 22:03
22:04 Tene left
PerlJam rakudo: my $x; class T { $x = 5 } 22:04
p6eval rakudo 92c78f: OUTPUT«Lexical '$x' not found␤»
PerlJam That's known right?
22:04 Tene joined
pmichaud Yes. 22:04
The problem is that at the point that the $x = 5 executes (BEGIN), we haven't even finished parsing its outer block yet.
so it doesn't have a lexical. 22:05
pmichaud@timtowtdi:~/rakudo$ time PERL6LIB=lib ./perl6 -e "use Safe; say 'a'..'z'" 22:09
abcdefghijklmnopqrstuvwxyz
real0m1.786s
still under 2s on the evalbot box.
So I'm not sure what's eating up the other ~2 seconds.
22:11 Guest55951 is now known as patman000
jnthn pmichaud: And getting rid of the 5 second limit helps? 22:12
pmichaud I don't have that sort of access (afaik)
jnthn ah, ok
pmichaud I've tried running my own copy of evalbot on the box but I don't know exactly how to configure it.
so I'm unable to get it started. 22:13
bloonix pmichaud: you should talk with moritz about that 22:14
pmichaud agreed, but I think he's away for a few weeks :-(
bloonix holiday?
pmichaud iirc, yes.
bloonix ah, yes, norway
the problem is not the bot itself... there are different cronjobs on the machine 22:15
pmichaud I'm not sure I understand what the cronjobs have to do with it. 22:16
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?
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 :)
pmichaud I don't think it's a cronjob, because
rakudo: say 'a'..'z';
p6eval rakudo 92c78f: OUTPUT«abcdefghijklmnopqrstuvwxyz␤»
pmichaud rakudo: say 'a'..'z';
p6eval rakudo 92c78f: OUTPUT«abcdefghijklmnopqrstuvwxyz␤»
pmichaud oh great, it's working now. :-(
earlier it was consistently failing.
bloonix but it shouldn't
pmichaud rakudo: say 'a'..'z';
p6eval rakudo 92c78f: OUTPUT«abcdefghijklmnopqrstuvwxyz␤»
pmichaud rakudo: say 'a'..'z'; 22:19
p6eval rakudo 92c78f: OUTPUT«abcdefghijklmnopqrstuvwxyz␤»
pmichaud hmmpf.
okay, it must be that it's competing with cron tasks.
bloonix PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7436 evalenv 25 0 98.0m 95m 1980 R 94.0 9.6 0:51.27 tryfile
pmichaud rakudo: say 'a'..'z';
p6eval rakudo 92c78f: OUTPUT«abcdefghijklmnopqrstuvwxyz␤»
pmichaud oh well, I give up for now. 22:20
time to work on other things. bloonix++ for letting me experiment a bit.
bloonix I change the cron and write moritz a email 22:21
cotto rakudo: say 0 .. 50 22:30
p6eval rakudo 92c78f: OUTPUT«012345678910111213141516171819202122232425262728293031»
cotto rakudo: say 0 .. 50 22:31
p6eval rakudo 92c78f: OUTPUT«012345678910111213141516171819202122232425262728293031»
cotto rakudo: say 65536 .. 65556
p6eval rakudo 92c78f: OUTPUT«655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556␤» 22:32
sjohnson rakudo: 1..3.say 22:41
p6eval rakudo 92c78f: OUTPUT«3␤»
sjohnson rakudo: (1..3).say
p6eval rakudo 92c78f: OUTPUT«123␤»
bloonix rakudo: class Foo-1.000;
p6eval rakudo 92c78f: OUTPUT«Unable to parse class definition at line 2, near "-1.000;"␤in Main (src/gen_setting.pm:1440)␤»
DanielC pmichaud: Are people supposed to get karma points if they commit to perl6-examples? 22:42
Infinoid Does perl6-examples have an rss/atom feed? Where's it hosted? 22:48
22:49 davidad joined
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.
DanielC Infinoid: Ok. I would like that, since its the only place I'm committing to right now. 22:52
Maybe pmichaud is around.
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 22:56 patman000 left
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>;
p6eval rakudo 92c78f: OUTPUT«Unable to parse class definition at line 2, near ";"␤in Main (src/gen_setting.pm:1440)␤»
pugs_svn r26969 | lwall++ | [S04] typos 22:58
pmichaud I'm around. 23:00
TimToady I'm around the bend.
bkeeler rakudo: my $foo = 3; class Bar { method a() { say $foo } }; Bar.new.a 23:01
p6eval rakudo 92c78f: OUTPUT«Lexical '$foo' not found␤»
pmichaud for perl6-examples: "forgiveness is better than permission"
bkeeler Is that supposed to work?
pmichaud in rakudo, lexicals inside of class definitions currently don't work.
TimToady we just had that question about an hour ago
pmichaud (i.e., lexicals that look outside of the class definition)
bkeeler Aha, I'm only half paying attention
pmichaud Infinoid: I'm certainly okay with a dalek feed from perl6-examples, or any other repo I'm working with 23:02
23:02 M_o_C left
Infinoid Great. Are these listed somewhere? 23:02
TimToady sorry, only 57 minutes ago :)
Infinoid For #parrot, the vast majority of feeds are autoconfigured by scraping trac.parrot.org/parrot/wiki/Languages 23:03
23:03 amoc joined
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
github.com/perl6/perl6-examples 23:04
Infinoid Can do
DanielC: And yes, jnthn definitely counts as a power that be, too :) 23:05
DanielC :-)
jnthn <rave>I got the power!</rave>
Infinoid jnthn++
DanielC heh 23:06
Infinoid Hooray for cheesy 80's house music
pmichaud my power is all tied up in &infix:<**> at the moment.
TimToady boom boom chicka chicka
[**] == power reduction
pmichaud ouch!
TimToady bows 23:07
Infinoid Someday I will make music using perl6 hyper-operators
pmichaud I'm guessing that TimToady++ is feeling a bit better today :-)
TimToady yes, my 6-day headache seems to be receding
pmichaud Good. I'm on day 3 of mine, but it's receding also.
anyway, time to fetch dinner. 23:08
23:08 LadyLuna1y left 23:14 fridim_ left 23:18 skids joined 23:22 hercynium left 23:23 eMaX left
jnthn -> sleep 23:24
23:30 Whiteknight joined 23:38 muixirt left 23:41 tulcod left
Eevee what are the plans for the p6 standard library? 23:42
23:45 justatheory left, armagad joined
TimToady see perlcabal.org/syn/ 23:45
particularly S32
23:46 exodist left
TimToady other than that, we plan to minimize the standard library and depend on distributions/network 23:48
as linux does
*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?
*than Perl 5
TimToady I didn't say that :)
Eevee oh hey this stuff is new to me
TimToady it will have lots of built-in functions
but not as many as PHP 23:50
DanielC :-)
Eevee as many as PHP would be an impressive feat
DanielC PHP has an absurd number of built-ins... like 10 sort functions.
TimToady s/im/de
DanielC Eevee: No, it wouldn't.
Eevee: 10 sort functions?
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.
Eevee well, many of them were also around before PHP had any OO
or namespacing
TimToady indeed, which is why I'm not worried about p6 in that regard
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
PHP already has problems with parameters
DanielC and PHP's functions are very inconsistently named too.
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
DanielC What is MMD?
TimToady multi-method dispatch 23:54
DanielC I'm not familiar with that.
TimToady usually just multiple dispatch around here
when you say $a op $b, there can be multiple op routines that are candidates
it picks the best one and calls it
DanielC ok... 23:55
TimToady is true of all function calls in p6
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
TimToady rakudo: say 1i + 1i
p6eval rakudo 92c78f: OUTPUT«0+2i␤»
TimToady calls Complex::infix:<+>
DanielC Complex is part of the standard language? 23:56
cool
TimToady specifically infix:<+>(Complex $x, Complex $y)
DanielC rakudo: my $a = 2 + 1i; $b = 1 + 3i; say $a + $b
p6eval rakudo 92c78f: OUTPUT«Symbol '$b' not predeclared in <anonymous> (/tmp/MuThCxuV9D:2)␤in Main (src/gen_setting.pm:3166)␤»
DanielC rakudo: my $a = 2 + 1i; my $b = 1 + 3i; say $a + $b
p6eval rakudo 92c78f: OUTPUT«3+4i␤»
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)
DanielC cool
TimToady most of the plumbing is built into p6 23:57
Eevee yeah
TimToady and most of the time you don't even have to think about it
DanielC Eevee: Did you know that PHP even has a str_rot13 function as part of the standard library?
Eevee yes
DanielC crazy
Eevee don't worry I know the horrors of PHP's standard lib
DanielC has to use PHP at work 23:58
TimToady I would at least generalize it to $str.caesar(13)
DanielC PHP is a nice templating language, but I wouldn't like to use it or the core program logic. 23:59
TimToady: Yeah... PHP functions have zero generalization.
I just checked... 16 sort functions.
TimToady which, for some people, is where they think