Perl 6 - the future is here, just unevenly distributed

IRC log for #rosettacode, 2013-08-24

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

All times shown according to UTC.

Time Nick Message
00:06 skinkitten joined #rosettacode
00:06 skinkitten hi I just started algorithms part 1 by robert sedgewick on coursera and he starts with the union find algorithm. Why isn't that on rosetta code?
00:09 TimToady because you haven't added it yet?
00:09 skinkitten ahahhahahaa
00:10 TimToady and also because, I suspect, many of us haven't heard of "union find" before this
00:11 skinkitten oh
00:11 TimToady not everyone learns things in the same order :)
00:12 skinkitten tell that to a university program
00:12 TimToady which one? :)
00:12 skinkitten all
00:12 TimToady .oO(find the union of all university programs...)
00:14 TimToady anyway, it's a wiki, so you're allowed to add draft tasks
00:14 TimToady encouraged to, even
00:14 TimToady but only if you program in a language I like :P
00:14 TimToady (just kidding)
00:15 skinkitten which languages do you know? like?
00:16 TimToady I've programmed in a lot of languages, but I'm partial to Perl, and especially Perl 6
00:18 * TimToady wonders what the etymology of "partial" is in that context...
00:18 skinkitten I think you're the first one I've encountered who mentions perl as the language they like
00:19 TimToady http://www.perl6.org/ for a reference
00:19 fedaykin "Perl 6"
00:19 TimToady well, it matches how I think :)
00:20 TimToady but I'm known to be prejudiced in the matter :)
00:20 skinkitten You tihnk like this? http://rosettacode.org/wiki/Man_or_boy_test#Perl_6
00:20 fedaykin "Man or boy test - Rosetta Code" http://rldn.net/3je
00:20 skinkitten that looks really cryptic to me
00:21 TimToady you'd have to know a few things to read that one, sure
00:23 skinkitten whats with the &
00:23 skinkitten ?? and !!
00:23 lambdabot and !!
00:23 skinkitten and $k
00:23 TimToady ??!! is just the ternary operator ?:
00:23 TimToady but perl 6 doesn't waste two good characters on it
00:24 TimToady the & is a "sigil" indicating a shorthand type declaration, Routine in this case
00:24 mwn3d TimToady: "partial to perl"...you're a silly guy
00:24 TimToady $ is more common in perl, indicating a scalar value, @ an array, % an associative array, called "hash" in perl culture
00:25 TimToady other than that, the bare {...} creates a closure, which man-or-boy needs to work right
00:26 TimToady but I certainly wouldn't point someone to that one as their first example :)
00:26 skinkitten give me a first example then
00:26 TimToady do you prefer OO or FP?
00:26 skinkitten give me both
00:26 skinkitten but I know OO better
00:26 TimToady okay, lemme think
00:26 mwn3d skinkitten: see [[Rosetta Code:Add a task]] for help
00:26 fedaykin http://rosettacode.org/wiki/Rosetta_Code:Add_a_task (Doesn't exist, try http://rosettacode.org/wiki/Special:Search/Rosetta%20Code:Add%20a%20task )
00:27 mwn3d Oh...case insensitive...[[Rosetta Code:Add a Task]]
00:27 fedaykin http://rosettacode.org/wiki/Rosetta_Code:Add_a_Task
00:30 TimToady http://rosettacode.org/wiki/Forest_fire#Perl_6 is kind of a fun one
00:30 fedaykin "Forest fire - Rosetta Code"
00:31 skinkitten why are people still creating languages?
00:31 TimToady but kind of big for a first example
00:32 TimToady because the rest of them still suck :)
00:32 skinkitten hahahaha
00:32 TimToady and a lot of people think they can do better
00:32 TimToady but there are a lot of different ideas about "better"
00:32 skinkitten 木 what is that
00:33 timotimo a tree
00:34 TimToady http://rosettacode.org/wiki/Knapsack_problem/Unbounded#Perl_6 might be a more straightforward OO example
00:34 fedaykin "Knapsack problem/Unbounded - Rosetta Code" http://rldn.net/YDgX
00:34 TimToady skinkitten: that's Chinese/Japanese for the concept "tree", and happens to look like one :)
00:34 TimToady kinda
00:35 TimToady just as 馬 is horse, if you can recognize the mane flowing on top, and the four (very small) legs underneath :)
00:36 TimToady 魚 looks a bit more like "fish", with its nose at the top and its tail at the bottom
00:37 skinkitten dude you're a genius
00:37 skinkitten break this down for ^$!height X ^$!width -> $i, $j {
00:37 skinkitten what is that
00:37 TimToady just interested in too many things :)
00:37 TimToady ah, that's call the "cross" operator because it makes all the pairs of two different lists
00:38 TimToady in this case the prefix ^ says the range 0 upto but not including $!height (or $!width)
00:38 TimToady the ! is an extra "sigil" indicating that it is an attribute of the current object
00:39 TimToady Perl 6 thinks that strange objects should look strange :)
00:39 TimToady so $.foo is a public attribute you can call .foo on, while $!foo is a private attribute you can't
00:40 TimToady it's a little weird, but you can always tell by looking whether you have a normal variable or a weird one
00:40 TimToady so it's one of those things that enhances readability, but only after you learn it, which puts off some people :)
00:41 TimToady the -> $i, $j {...} is just how we write lambdas
00:42 TimToady so basically, it just maps the entire coordinate system to $i and $j each time through the loop
00:45 skinkitten wow ok
00:45 skinkitten high level
00:45 TimToady something like http://rosettacode.org/wiki/Averages/Pythagorean_means#Perl_6 would be more in the FP idiom
00:45 fedaykin "Averages/Pythagorean means - Rosetta Code" http://rldn.net/8Je
00:46 TimToady yeah, Perl 6 is meant not so much as a first programming language as a last programming language :)
00:47 skinkitten ahahahhahaa
00:47 TimToady but that doesn't mean we don't trying to make it pretty easy to learn too
00:48 skinkitten i'm typing it out, to get my fingers and mind seeing what its doing but its making my head spin. In the best way possible. I love my head spinning this way :)
00:48 TimToady and we're hoping to skip this generation and attract kids at some point, hence the butterfly on http://www.perl6.org
00:48 fedaykin "Perl 6"
00:49 TimToady well, not skip, really, but most of this generation is stuck in Python or Ruby, so it's a long-term goal :)
00:50 skinkitten ahahahhah I'm that generation
00:50 skinkitten I started learning java yesterday so, big mile stone for me
00:50 skinkitten but I'm hooked with computer science, I really want to get creative
00:50 TimToady as we say in our community: Have the appropriate amount of fun. :)
00:51 TimToady well, Perl has always been aimed at people who want to be creative, so that community tends to attract those folks
00:52 TimToady btw, we just ported Perl 6 to run on the JVM, kinda sorta, so your Java learning might not be all wasted :)
00:53 TimToady but best of luck with your CS, and don't let the mean people discourage you
00:54 skinkitten I like the mind bending aspects
00:54 skinkitten pushing my brain to its limits
00:55 * TimToady wishes more people were like that...
00:56 TimToady dinner &
00:56 TimToady oh, and feel free to hang out on #perl6 if like, they're a fun bunch o' folk
00:56 TimToady really afk &
00:56 skinkitten ok thanks
00:57 skinkitten does larry wall hang out there?
01:01 mwn3d skinkitten: seems likely
01:02 mwn3d He seems like an IRC kind of guy
01:09 eMBee lol!!!
01:10 eMBee skinkitten: do you know who you just talked to?
01:24 skinkitten larry wall === mwn3d
01:24 mwn3d No I'm not that famous
01:24 mwn3d Or famous at all
01:25 skinkitten my head exploded& that explains my response time
01:25 skinkitten so whats eMBee talking about?
01:25 skinkitten who did I talk to?
01:26 skinkitten mwn3d: ?
01:28 mwn3d I was gonna keep the secret but I'm sure you'd guys it eventually...mr toady is the man you're looking for
01:35 skinkitten wow my head exploded, so I called larry wall a genius before actually knowing he is in fact larry wall. Creator of perl, owner of killer mustache.
01:36 skinkitten I have to go medidate on this and go back to work ahahahahahaha
01:37 skinkitten I wonder what other giants are in this channel
03:25 isomorphismes joined #rosettacode
03:25 eMBee :-)
07:54 BenBE joined #rosettacode
15:31 bugmagnet joined #rosettacode
15:50 mwn3d1 joined #rosettacode
16:38 mwn3d joined #rosettacode
16:48 skinkitten joined #rosettacode
17:15 sirdancealot joined #rosettacode
19:17 mwn3d joined #rosettacode
19:37 mwn3d joined #rosettacode
20:07 mwn3d1 joined #rosettacode
20:35 mwn3d joined #rosettacode
21:23 kpreid joined #rosettacode
23:41 mwn3d1 joined #rosettacode
23:47 RRR2 joined #rosettacode

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