pugscode.org/ | sial.org/pbot/perl6
Set by agentzh on 7 June 2007.
offby1 "salomonic" ... involving skis? 00:01
maybe he means "salmonic" -- involving tasty fish 00:02
moritz cries about the amount of classical education that seems to be lost ;)
offby1 cries about misspellings of "Solomonic" 00:03
moritz offby1: I've got a good excuse, I'm not a native speaker...
offby1 you are excused
moritz and in German that guy is called "Salomon"
dduncan moritz, I agree 00:05
about that salmon solution
moritz what would you like with it? chips? *g* 00:06
dduncan nah
besides, normally chips are eaten with cod 00:07
or a cod-like fish
moritz so what would you eat with salmon? rice? 00:08
moritz doesn't like most kinds of fish 00:09
dduncan I mainly have my salmon by itself, actually 00:10
with salt
dduncan that said, I once had it served with coconut, that was nice 00:11
that was more fancy than usual, though 00:12
moritz well, have fun pondering about tasty food, I'll get some sleep in the mean time ;) 00:13
dduncan one combination I don't think I've had before, though, is fish with any kind of hash, if I recall
and I'll to work
moritz bye &
dduncan yup
meppl good night 00:38
meppl good morning 06:57
evanl hi 08:59
we're on yapc::beijing 2007
Tene :D! 09:00
evanl agent zhang has been given us some wonderful presentations about how to contribute to pugs and UML::Class:Simple
evanl he's great 09:00
:)
evanl ! 09:09
hi chaos
hi sunnavy
chaoslawful_ wow~ 09:10
chaoslawful_ wow~lucky to meet u here, evan 09:11
hmisty hehe
evanl nick server told me the nickname is owned by someone else, so faint 09:12
chaoslawful_ er...maybe just a cache problem...i met this problem before 09:14
evanl ok:)
we're on yapc::beijing 2007 just now
pity you're not here
many excellent guys have given a lot of wonderful presentations 09:15
chaoslawful_ that's really a pity...
evanl r u all ok in baglore?
sunnavy hi, evanl
evanl hi sunnavy 09:16
chaoslawful_ ya, i'm fine here.
evanl great to hear that
chaoslawful_ much cooler than beijing
sunnavy chaow, hi, I heard you went to India
s/chaow/chaoslawful/
chaoslawful_ hi, sunnavy. yep, i have to stay at bangalore for 3 weeks
evanl o i told them you'll stay for 2 months...sorry 09:17
sunnavy evanl, you must be hmisty ;-)
evanl haha yes 09:18
sunnavy I'm back from YAPC::Beijing, for there'll be a dinner for my friends' graduations. 09:19
evanl oh. so where'r u now?
@school?
lambdabot Unknown command, try @list
evanl \@school?
sunnavy 西王庄, aha 09:20
evanl o great irc can show chinese 09:21
chaos, ur network seems not good...
chaoslawful__ yep...i'm accessing internet with a CDMA card...
evanl ... 09:22
chaoslawful__ the signal is very bad...such a pain...
sunnavy utf8 is great
evanl haha
don't u have LAN connections?
chaoslawful__ nop...
sunnavy oh, it's horrible. 09:23
evanl chaos, do you always come here? 09:25
sunnavy aha, this's my first time to talk to evanl and chaos here 09:26
gaal moose 14:46
lumi Elk 14:49
gaal caribou! 14:52
offby1 glances around nervously. 14:53
mouse!
<Kock>how'm I doing?</Koch>
gaal you're emitting invalid XML
offby1 so I am. 14:54
s/k/h/
good thing you're an accepting parser 14:55
gaal (Is that supposed to be Kenneth Koch, of Variations on a Theme by William Carlos Williams fame?)
tag souffle
offby1 nope, it's supposed to be Ed Koch, mayor of New York in the '80s (?) who was known for asking strangers on the street "How'm I doing?"
His catch-phrase as Mayor was "How'm I doing?" When walking down the street, he would often use that question as a greeting to the people he talked to. 14:56
-- en.Wikipedia.org/wiki/Ed_Koch
lambdabot Title: Ed Koch - Wikipedia, the free encyclopedia
gaal 80ies eh? I bet he got "ballsy but about to get mugged" a lot
lumi The good ol' days 14:58
offby1 NYC mayors get mugged rarely, what with the bodyguards and all 15:03
gaal I was about to wonder out loud when the practice of retaining bodyguards started and then I realized it was obviously much older than US politics. 15:04
offby1 "In mid-1976, he was threatened with murder by Uruguayan secret police. " 15:05
lumi Way to blow your cover, guys 15:06
daxim_ Koch is also the alter ego of Kosh, along with Karsh. "The avalanche has already started. It is too late for the pebbles to vote." google.com/search?q=site%3Atruemean...e.com+koch 15:10
lambdabot Title: site:truemeaningoflife.com koch - Google Search
offby1 stares blankly
diotalevi Is the reduce operator foldl or foldr depending on the associativity of the base operator? 18:09
Tene diotalevi: haskell? 18:15
diotalevi Oh sorry, Perl 6. 18:16
|Jedai| eval: [-] [5..7]
buubot |Jedai|: Error: syntax error at eval line 1, near "-]"
diotalevi I forget Perl 6 also strongly implies Haskell these days.
Tene ?eval [*] 1..10
evalbot_r16675 3628800 18:16
diotalevi Given [+] 1 .. 3, does that mean ((1+2)+3) or (1+(2+3)) always or does it vary depending on the associativity of the operator being reduced? 18:17
Tene ?eval [say] 1..5
evalbot_r16675 Error: ␤Unexpected "1"␤expecting operator
moritz Tene: say is a method, not an op 18:18
Tene nods
diotalevi Also, does reduce only work for unary and binary operators?
rhr diotalevi: it uses the associativity of the operator
moritz diotalevi: how would reduce with an unary operator? 18:19
|Jedai| I can't think of a right associative operator right now (brain-dead after a feast)
Tene ?eval sub infix:<foo> { say $^a,'->',$^b; return $^a + $^b }; 5 foo 6
evalbot_r16675 OUTPUT[->␤] 0
rhr ** is right assoc
Tene ?eval sub infix:<foo> { say $^a,'-> $b; return $a + $b }; 5 foo 6
evalbot_r16675 Error: ␤Unexpected end of input␤expecting "\\", variable name or "'"
|Jedai| No, in Pugs it isn't
diotalevi So can I override the associativity? Perhaps I cared to be foldr instead of foldl or whatever.
Tene ?eval sub infix:<foo> ($a,$b) { say "$a,-> $b"; return $a + $b }; 5 foo 6
|Jedai| ?eval 1**5**6 18:20
evalbot_r16675 OUTPUT[5,-> 6␤] 11
1
Tene ?eval sub infix:<foo> ($a,$b) { say "$a,-> $b"; return $a + $b }; [foo] 1..3
evalbot_r16675 OUTPUT[1,-> 2␤3,-> 3␤] 6
rhr ?eval [**] 2..4
Tene ?eval sub infix:<foo> ($a,$b) { say "$a->$b"; return $a + $b }; [foo] 1..6
evalbot_r16675 2417851639229258349412352/1
OUTPUT[1->2␤3->3␤6->4␤10->5␤15->6␤] 21
|Jedai| Sorry, it is 18:21
Tene How to specify associativity on an operator?
|Jedai| Ok, [**] is foldr
foldr infix:<**>
diotalevi imagines a list of values where + is left associative for some and right associative for others. 18:24
rhr Tene: is assoc<whatever> (in S06) 18:26
S06:1609
Tene ?eval sub infix:<foo> is assoc<right> ($a,$b) { say "$a->$b"; return $a + $b }; [foo] 1..6 18:27
evalbot_r16675 Error: ␤Unexpected "<right"␤expecting trait or block
Tene ?eval sub infix:<foo> is assoc('right') ($a,$b) { say "$a->$b"; return $a + $b }; [foo] 1..6
evalbot_r16675 OUTPUT[5->6␤4->11␤3->15␤2->18␤1->20␤] 21
Tene diotalevi: that a good example? 18:28
rhr++
diotalevi Tene, of mixed associative operator? No.
Tene diotalevi: no, of reduce with a right-associative operator
diotalevi But that's ok. fold[lr]ness for a reduction is a property of the operator plus the data. 18:29
diotalevi supposes this might mean a programmer can't look at code and know whether he is getting foldl or foldr because perl is notorious for allowing values to be crazy reality bending things. 18:30
diotalevi wouldn't normally expect reality bending values though.
Tene junctions! 18:31
rhr I don't see how the data can affect the associativity
|Jedai| rhr : Can't a multi variant of an operator have different associativity ? 18:34
|Jedai| rhr: I would rather it can't but ... 18:34
diotalevi 0, 1, 2.5, 3 is a list of four elements, three ints and one float. Perhaps float's + or int's + operator's associativity were defined differently. 18:35
rhr I guess it could, that be pretty crazy :)
|Jedai| I don't remember the Synopsys section
rhr *would be
|Jedai| I think consistent associativity should be enforced for all multi variant
diotalevi shrugs. Why? 18:36
You can't allow someone to shoot their own foot off?
|Jedai| Because it's too confusing and you can use two different operators instead ?
diotalevi "too confusing" is an illegal statement in perl. 18:37
I think.
moritz perl has always given you more than enough rope to hang yourself, your neighbour and his whole family
rhr of course you could specify list or chain associativity and do whatever you want internally
|Jedai| diotalevi: I can if it really brings more power to the knowledgable perlist
moritz if you want to ;)
diotalevi is in the "write more rope" camp of perl.
jjore With infinite mutability comes freaking infinite power. Or something. 18:39
moritz infinit rope through infinite lists! YaY!
jjore Yay!
jjore salts his white fish and potato and lutefisk with the darkest magics. It's good seasoning. 18:40
jjore was just thinking of bland and white foods.
tre Norwegian. 18:41
jjore has an even better idea. Evaluating the infix:+ operator replaces the implementation of the infix:+ operator with the same thing but opposite associativity. 18:45
You know, just to be evil.
jjore demurs slightly. Ok, not the + operator, make it the foo operator. 18:46
?eval sub infix:<foo> is assoc('right') ($a,$b) { eval q[sub infix:<foo> is assoc('left') ($a,$b) { return $a + $b }]; return $a + $b }; [foo] 1..3 18:50
evalbot_r16675 6
jjore k... now to get delayed expressions.
?eval sub infix:<foo> is assoc('right') ($a,$b) { eval q[sub infix:<foo> is assoc('left') ($a,$b) { return sub { $a + $b } }]; return sub { $a + $b }}; [foo] 1..3 18:51
evalbot_r16675 sub {Syn "block" {App &infix:+ (: Var $a, Var $b)}}
jjore ?eval sub infix:<foo> is assoc('right') ($a,$b) { eval q[sub infix:<foo> is assoc('left') ($a,$b) { return sub { $a + $b } }]; return sub { $a + $b }}; ([foo] 1..3).Dump 18:51
evalbot_r16675 Error: No such method in class Sub: &Dump
Limbic_Region try ~() or .perl 18:52
jjore ?eval sub infix:<foo> is assoc('right') ($a,$b) { eval q[sub infix:<foo> is assoc('left') ($a,$b) { return sub { $a + $b } }]; return sub { $a + $b }}; ([foo] 1..3).perl
evalbot_r16675 "sub \{Syn \"block\" \{App \&infix:+ (: Var \$a, Var \$b)}}"
Limbic_Region that didn't do what I expected
jjore wants dmq's DDS.
gaal remoose
jjore: the zero is also a property of the op 18:53
and re:scope of the associativity... it's basically lexical
jjore "the zero is also a property of the op?"
gaal like basically all weird effects in Perl 6 18:54
?eval my @a = (); [+] @a
evalbot_r16675 0
Limbic_Region happy Father's day to all that fit the category
gaal "zero" of infix:<+> == 0
I misread that as happy feather day
gaal ?eval my @a = (); [*] @a 18:55
evalbot_r16675 1
gaal "zero" of infix:<*> == 1
Limbic_Region infix * is smart
gaal not smarter than other ops.
jjore Oh, right.
Limbic_Region well, there is a difference between, knowledge, wisdom, and intelligence
jjore is somewhat hoping weird effects aren't required to be lexical. Global world changing weirdness is a wonderful thing. 18:56
gaal jjore: since you used haskellish terminology: Perl unifies foldr/foldl, and almost also scanr/scanl
Limbic_Region looks like the parrot squad is really close to having the perl 6 sanity tests passing
moritz yes, indeed 18:57
jjore I er... was speaking other list based languages at that moment. I still don't mean Haskell when I say fold. 18:57
gaal there was a beautiful while where [] in list context was a scan
jjore What is scan?
gaal oh, okay. 18:58
scan ("produce" rather than "reduce" in longhand in Perl 6) is keep intermediate values
?eval [\+] 1, 2, 3
evalbot_r16675 (1, 3, 6)
jjore foldl is much more likely to mean Oz to me right now and almost never any of you.
I've been reading the CTM book recently www.info.ucl.ac.be/~pvr/book.html. 18:59
lambdabot Title: Concepts, Techniques, and Models of Computer Programming
jjore It covers much more concurrency, various styles of declarative programming, and various kinds of search. 19:01
gaal sounds interesting, thanks for the link!
jjore I spent $50 of my employer's money and for me... well worth it. 19:02
You do have to get over the idea of looking at lots of Oz code though.
And if you want to use the Oz IDE you also have to use Emacs. It's what it was implemented in.
s/Oz IDE/Mozart IDE/. Oz is the language, Mozart is an implementation. 19:03
gaal oh, for a minute there I thought the content was available online :/ 19:04
jjore No, sorry.
There is a wiki though.
The US edition is $70, the eastern economy edition is $50. 19:05
cj happy fathers' day, fathers :)
jjore I opted for cheap. The pages are kind of thin though. One of my co-workers said it'd make it unreadable for him. I haven't noticed.
meppl good night 19:09
Limbic_Region has a project he would like to do in Mozart or Alice but will likely end up writing it in Java since he hasn't the time to learn either one
rindolf Hi all. 19:12
Hi gaal
jjore What's the project?
Limbic_Region perfect order magic cube of 10
its like a magic square on steroids 19:15
jjore Oh, that. 19:16
Limbic_Region Between work being crazy lately, going to be a Dad again, and dealing with Jean's immigration stuff - I haven't had any free time for some time now 19:18
jjore The point to using Oz (or Alice, I suppose) would be to get the don't-know non-determinism search mechanism or to get good concurrency. 19:19
Limbic_Region mostly the good concurrency 19:20
but also because the idea for reducing the search space is constraint programming
jjore So then if its the concurrency you're after there's also Erlang.
jjore doesn't know any of Erlang, Alice, or Standard ML. 19:21
Limbic_Region well, from what I have read of Alice, it is very similar to Mozart but does the concurrency for free plus some extra bells and whistles 19:21
Limbic_Region is sure you have seen it, but en.wikipedia.org/wiki/Alice_programming_language 19:23
so really the combination of constraint programming and concurrency
what I would really like to have is the ability to describe a problem, provide the constraints I can think of, and have some tool spit out other constraints that must also be true that I hadn't thought of 19:24
jjore "concurrency for free?" 19:34
What's that?
Tene suggestions for API for "run this block, but kill it if it takes more than $num seconds to run"? 19:35
perhaps a timeout parameter to 'do'? 19:37
avar suggests alarm 19:48
jjore That's two blocks. 19:52
One to run indefinitely, the other to wait for the time period to elapse and kill the former.
Does Perl 6 have anything to say about concurrency? I didn't see anything on dev.perl.org/perl6/doc/synopsis.html that was obvious. 20:21
lambdabot Title: Synopses - perl6
moritz jjore: I think most of that is not yet specced 20:23
jjore: there are just some things like auto-concurrency that are specced in some cases
jjore I'm aware that junctions have a little bit already requested. 20:24
But beyond that...
Tene jjore: docs/Perl6/Spec/Concurrency.pod
Aankhen`` Tene: That spec seems outdated, I think. 20:47
Aankhen`` jjore: Perl 6 is slated to get the unified events & threads model <www.seas.upenn.edu/~lipeng/homepage...y.html> with STM on top. 20:48
jjore: And, according to TimToady, the underlayer will have "Erlang-ish semantics". Whatever that means. :-)
jjore is quite happy to hear of Erlangish things happening. 20:56
It likely means dataflow variables. 20:57