pugscode.org/ | nopaste: sial.org/pbot/perl6 | ?eval [~] <m oo se> | We do Haskell, too | > reverse . show $ foldl1 (*) [1..4]
Set by diakopter on 25 June 2007.
diakopter hears a pin drop 02:12
TimToady just practicing... 02:18
Aankhen`` faints from shock. 02:21
Limbic_Region TimToady - do you read use.perl journals? 02:22
Aankhen`` spontaneously combusts.
diakopter /alias shh mode #perl6 +R
Limbic_Region specifically, the one from Phil Crow?
use.perl.org/~philcrow/journal/33683 02:23
lambdabot Title: Journal of philcrow (3401)
TimToady yes, the alias is what I was practicing :)
Limbic_Region in a nutshell, he is writing the Java to Perl 6 thingy for Tim Bunce for DBI2 and needs help with classes and constructors in perl 6 02:24
I attempted to point him here
Limbic_Region calls it a night
TimToady @foo 02:29
lambdabot Maybe you meant: faq ft todo yow
TimToady er, no, I didn't mean faq ft todo yow! 02:30
diakopter @faq 02:32
lambdabot The answer is: Yes! Haskell can do that.
diakopter @ft
lambdabot ft: scripts/FT/FTbase.hs:211:16-29: Irrefutable pattern failed for pattern (w : ws)
diakopter sweet
Aankhen`` TimToady: You just *think* you didn't mean it. 02:33
diakopter wonders if lambdabot can be set to ignore unidentified nicks 02:34
who writes/maintains/hosts lambdabot
gaal dons @ #haskell i think
(moose all)
diakopter (moose any) 02:35
Aankhen`` Hola gaal. :-)
gaal heya Aankhen`` :)
Aankhen`` What's new? 02:36
TimToady diakopter: Yes! Haskell can do that.
diakopter @faq Can Haskell do that? 02:37
lambdabot The answer is: Yes! Haskell can do that.
gaal @google slacklining
lambdabot en.wikipedia.org/wiki/Slackline
Title: Slacklining - Wikipedia, the free encyclopedia
TimToady @faq Can Haskell screw with your mind?
lambdabot The answer is: Yes! Haskell can do that.
gaal Aankhen``: been trying that out, it's fun!
diakopter @faq Who can do that?
lambdabot The answer is: Yes! Haskell can do that.
gaal they should rename @google to @wikipedia :) 02:38
diakopter notes that Haskell must have lots of tuits, round ones even.
gaal can Haskell solve the halting problem?
gaal > sequence [[1,2],[10,20,30]] 02:41
lambdabot [[1,10],[1,20],[1,30],[2,10],[2,20],[2,30]]
gaal (That is a demonstration of the question, "can haskell golf make your brain hurt?") 02:42
TimToady ?eval 1,2 X 1,2,30 02:43
?eval 1,2 X 1,2,30
evalbot_r16845 ((1, 1), (1, 2), (1, 30), (2, 1), (2, 2), (2, 30))
TimToady er, I mean
gaal ("given a list of lists, construct all possible lists that have elements from each of the list". answer, use the list monad")
TimToady ?eval 1,2 X 10,20,30
evalbot_r16845 ((1, 10), (1, 20), (1, 30), (2, 10), (2, 20), (2, 30))
TimToady ?eval 1,2 X~X 10,20,30
evalbot_r16845 Error: No such subroutine: &X
gaal does that work for longer inputs? that is more than two lists? 02:44
TimToady ?eval 1,2 X 3,4 X 5,6
evalbot_r16845 ((1, 3, 5), (1, 3, 6), (1, 4, 5), (1, 4, 6), (2, 3, 5), (2, 3, 6), (2, 4, 5), (2, 4, 6))
gaal awesome!
TimToady I hear you snickering
diakopter > sequence [[1,2],[3,4],[5,6]]
lambdabot [[1,3,5],[1,3,6],[1,4,5],[1,4,6],[2,3,5],[2,3,6],[2,4,5],[2,4,6]] 02:45
gaal haskell and perl are friendly contenders in golf
who'da {thunk} it
TimToady ?eval [X](1,2;3,4;5,6)
evalbot_r16845 ((1, 2, 3, 4, 5, 6),)
TimToady ENOIMPL
Aankhen`` gaal: That's evil.
TimToady ?eval [X] [1,2],[3,4],[5,6]
evalbot_r16845 ((1, 3, 5), (1, 3, 6), (1, 4, 5), (1, 4, 6), (2, 3, 5), (2, 3, 6), (2, 4, 5), (2, 4, 6))
gaal Aankhen``: >>= is concatMap in the list monad 02:46
Aankhen`` gaal: Actually, I meant this: <@gaal> who'da {thunk} it
gaal forces the pun, er, i mean, thunk 02:47
Aankhen`` brutally murders gaal.
gaal please don't do that!
Aankhen`` Too late, you should have spoken up sooner.
TimToady <thunk>!
gaal PRE {say "please don't do that" }
Aankhen`` Curses. 02:48
Very well, you win this round, Mr. Yahas.
TimToady POST { "laughs best
"}
gaal Do Haskell cops eat out at Thunkin' Donuts?
Aankhen`` Note to self: brutally murder gaal over and over again. 02:49
gaal ok that's walking the slackline a little to low
on sale in Bad Pun and Beyond: Metaphor Mixer! 02:50
*too
TimToady et too, brute? 02:51
diakopter POST { "laughs loudest?" } 02:57
TimToady END { "left standing" } 02:58
diakopter POST { "holding the rope" }
gaal BEGIN { my $light } # oops, now it's out of scope 02:59
TimToady BEGIN { my COMPILING::<$light> } # now it's not 03:00
FIRST { @lawyers».kill } 03:02
diakopter loses his siblings
and father for that matter
TimToady that's what you call, raising the bar... 03:03
diakopter `cept in this case, the bench is above the bar 03:04
diakopter darn, I'm sure there was a pun in there somewhere :| 03:05
TimToady well, don't press it
diakopter smacks his forehead
package Foo; # implies use v5; or does use v5; still have to appear somewhere? 03:08
"This form is illegal in the middle of a Perl 6 file." - how does perl6 [or ./parrot perl6.pbc] know it's a Perl 6 file? only if it has 'use v6;' at the [very?] top? 03:10
(asking about S10 here)
diakopter I'll take that as a yes (no), no (see S11, module Foo; also works) 03:28
diakopter TimToady: re S11's "Anything matching <alpha>+ \: \S+ is treated as an author(ity)" - (many types of) URIs can contain whitespace (if it's inside quotes)... 03:47
dduncan question ... in regards to this part of S03 describing sort comparisons, it says Order::Increase, Order::Same, or Order::Decrease (which numerify to -1, 0, or +1) 04:57
so does that mean that Increase corresponds to -1 ?
TimToady dduncan: see both p5 and p6: 05:51
?eval 1 <=> 2
evalbot_r16845 -1
amnesiac TimToady, p6 still supports to tell it what sorting algorithm to use for the sort call? 05:52
dduncan so, my question was whether eg -1 corresponded to ::Increase or ::Decrease
TimToady do you think going from 1 to 2 is an increase?
dduncan I follow you now that this interpretation is given 05:53
TimToady C's sort originally defined it in terms of subtraction, so <=> and friends have always returned -1 for increasing
dduncan before I was interpreting the names as to be what to do if you were sorting the 2 values, what you do with the first one's position in a list
so eg given 1 <=> 2, you would be decreasing the 1 relative to the 2 in the sorted list, if you move it at all 05:54
TimToady I think most p6 sorts will not use <=> or cmp, but a 1-ary extractor
dduncan that was my confusion ... I don't know if its worth updating the synopsis to clarify the intended interpretation of the names or not 05:55
eg, "if you increase lhs, do you move towards rhs"
or something like that 05:56
question: might it be worth naming these ::Before and ::After instead, which could then parallel the &before and &after operators, if I remember their names correctly 05:57
TimToady well, pugs should really be returning Order::Increasing much like it returns Bool::True
and you shouldn't be concerned with the values of the enum
dduncan I'm not concerned about the enum's values so much as that I was confused by the documentation, as it looked like 1 <=> would return increase when I thought it looked like it shoud return ::decrease 05:58
dduncan er 1 <=> 2 05:58
but still, I now understand your interpretation
TimToady "as you move from left to right, the values are increasing"
dduncan actually, as I think more, increase|decrease are better names for this than before|after, since they describe the 2 comparands together, and not just the first one 06:01
maybe
Aankhen`` Uhzactly.
dduncan separately ... maybe this has been discussed to death already, but does every type have a default ordering semantics, perhaps using their memory address, or would we get a fail when trying to sort 2 values that aren't of a normally ordinal type? 06:03
eg, what should happen if you try to sort a list of Any ?
fail or some non-important Object provided default? 06:04
I mean the generic sort, not the string/num casting one
TimToady cmp, not leg or <=>
uses eqv semantics rather than ===, so based on canonicalization of some kind 06:05
don't know what the default canonicalization for eqv is though
wolverian list of Any? heresy! 06:06
TimToady certainly an arbitrary one can be imposed for types that don't support an explicit cmp operation
wolverian (but old heresy, so it's okay)
dduncan okay
meppl good morning 07:06
dduncan I second that notion 07:10
Aankhen`` I take exception to that idea! 07:11
pugs_svnbot r16846 | Darren_Duncan++ | trunk: 08:09
: ext/Muldis-DB/ : in (Core|Catalog|Num|Temporal|Spatial).pod, fleshed out the DESCRIPTION, added type hierarchy diagrams, did some reordering; in Core.pod, added the Order data type
diff: dev.pugscode.org/changeset/16846
lambdabot Title: Changeset 16846 - Pugs - Trac
pasteling "evalbot_r16845" at 193.200.132.135 pasted "Pugs build failure" (6 lines, 278B) at sial.org/pbot/26036 08:10
lumi 3 bot streak 08:12
moritz re 08:13
moritz Aankhen``: agentzh++ tried to allow some gb* encodings (or one, rather), and that broke the utf8 in some places 08:16
Aankhen``: maybe we should remove POST from the abbreviation list because it can be a post condition to a sub/method as well as parrot-thingy ;) 08:21
Aankhen`` moritz: Regarding gb* encodings, where did they come in? After all, you can only have one encoding per page. :-S 08:47
moritz diakopter++ # deleting spam in irc logs
Aankhen`` moritz: As for the POST thing, hmm, good point. I figured the uppercase would protect it, but I guess you'd get too many false positives with the block traits.
moritz Aankhen``: all output is utf-8 encoded, but each line is decoded separately, so far latin1 and utf8 where supported 08:48
pugs_svnbot r16847 | Aankhen++ | trunk:
: * [irclog] abbreviations: removed POST, added PAM.
diff: dev.pugscode.org/changeset/16847
lambdabot Title: Changeset 16847 - Pugs - Trac
Aankhen`` moritz: Ah, decoding.
moritz: Well, I do feel I should point out again that browsers are seeing the logs as UTF-8 anyway right now. :-P 08:49
…but you know that already. Ahem.
Aankhen`` goes back to reading stuff. 08:50
moritz Aankhen``: the problem is that with agentz's stuff some of it broke, e.g. utf8 strings where encoded as something different
s/encoded/decoded/
no, encoded ;)
Aankhen`` Oh, okay. 08:51
Sorry for being so slow.
I think it's past my bedtime, but as usual I refuse to sleep.
moritz good choice ;) 08:54
wolverian eek, why is 'view' on feather elvis? 09:52
it's cute and all, but I don't know it.. 09:53
BinGOs you don't know vi?
wolverian I've only used vim
BinGOs it's all vaguely the same. 09:54
wolverian vague isn't enough for "just works" :)
moritz wolverian: probably controlled via update-alternatives 09:55
wolverian yeah.
riffraff hi 10:36
moritz rehi 12:29
fglock hi 12:30
DarkWolf84 hi 12:31
:)
moritz fglock: do you know if kp6 parses/compiles Prelude.pm? 12:37
fglock moritz: not likely; the current kp6 grammar is very simple 12:38
v6.pm might parse it
moritz fglock: ok.. I'll try once I have my laptop back
fglock re kp6 - should I use 'blib/' for compiled files, and 'lib/' for hand-written ones? 12:40
moritz I think it makes sense, yes
fglock my problem is, I have more than one perl5 backend
so I thought about using lib5/, blib5/, lib5regex/, blib5regex/, lib5mo/, ... 12:41
moritz what about $backend/blib/ ? 12:41
fglock that's cleaner 12:42
moritz or blib/$backend/ ?
I don't know, just random mooses
erm, thoughts ;)
fglock and kp6/lib/ for the kp6 source files? 12:43
moritz well, kp6 is already in a dir of its own
moritz I just imagine having a vast number of emitters, and each using a top level directory 12:44
not a good idea
so perhaps blib/$backend/
fglock I mean, v6/v6-KindaPerl6/lib --> v6/v6-KindaPerl6/kp6/lib
but currently we also have:
v6/v6-MiniPerl6-JVM/ 12:45
which is one level up
moritz do you consider the different backends to be different projects? 12:46
fglock hmm, it depends - under the "kp6-roadmap", they are side-projects 12:48
moritz I would include them in v6-KindaPerl6/ because every time the AST (or something) changes, they have to be adapted as well 12:50
fglock Pugs has blib, blib6, lib, src/perl6, src/perl5, perl5, ... 12:56
diakopter moritz: on #parrot, Coke mentioned that it was he who had previously objected to the public logging of $parrot, but that he is now ambivalent. 12:59
fglock src/ and lib/ are about the same thing, in Perl land 13:01
moritz diakopter: aye. If he revises his decision, I'll log ;) 13:02
bloonix hi moritz 13:03
moritz hi bloonix ;)
fglock how about: src-perl6/ src-perl5/ blib-perl5/ src-perl5-regex/ src-perl5-mo/ src-groovy/ blib-groovy/ ...
ugh
diakopter moritz: that's what I mean; he revised his decision...
moritz diakopter: "beeing ambivalent" sounds as if he's not sure... 13:04
diakopter no, it means he has no preference either way.
moritz ok 13:05
so I have an "official" green light?
diakopter well if you'd like further confirmation, ask on a list or a channel where Coke is :) 13:07
Limbic_Region coke hangs out on #parrot on irc.perl.org 13:08
diakopter hee hee 13:09
moritz perhaps it's better if I ask on the list, because on IRC it always happens that somebody doesn't backlog and misses a question
diakopter 13:28 < coke_> At one point I didn't want it logged. I'm ambivalent now. 13:11
13:46 <@TimToady> I am always ambivalent...except when I'm not...
13:50 <@TimToady> Oh, wait, this channel isn't logged, so I shouldn't waste good quotes here. :)
(yesterday)
Limbic_Region yeah, #parrot is neither logged nor provides for a tellbot
fglock decides to quit bikeshedding 13:21
Limbic_Region fglock - there is absolutely no problem repainting the shed once it is built - it is when the walls themselves are made of various different colors of dried paint that you have to worry 13:22
moritz ;-) 13:23
Limbic_Region prefers yak shaving over bike shedding 13:24
pasteling "evalbot_r16847" at 193.200.132.135 pasted "Pugs build failure" (6 lines, 278B) at sial.org/pbot/26037 13:49
pugs_svnbot r16848 | fglock++ | trunk:
: [kp6] added lib5regex/ for p6regex-on-p5regex runtime files
diff: dev.pugscode.org/changeset/16848
lambdabot Title: Changeset 16848 - Pugs - Trac
fglock Limbic_Region: no yaks here, does westie grooming counts? 13:53
Limbic_Region fglock - it counts if you say it does cause anyone else is too far removed from the problem to know if it is applicable or not 13:59
fglock sigh 14:04
moritz Limbic_Region: why does it have to be so complicated? *g* 14:07
pugs_svnbot r16849 | fglock++ | XXX-HACK-SVNBOT-SUBST-0.1422160877013151: 14:55
: [kp6] re-add lib5regex
r16850 | fglock++ | XXX-HACK-SVNBOT-SUBST-0.1422160877013151:
: [kp6] try to fix commit error???
diff: dev.pugscode.org/changeset/16850
lambdabot Title: Changeset 16850 - Pugs - Trac
fglock what's up? I can't add lib5regex/ 14:56
HTTP Path Not Found: PROPFIND request failed on '/pugs/!svn/bc/16839/v6/v6-KindaPerl6/lib5regex': '/pugs/!svn/bc/16839/v6/v6-KindaPerl6/lib5regex' path not found
moritz fglock: judging from pugs_svnbot's output you're not in trunk, but in some weird branch
fglock how did I got there? 14:57
get
moritz I don't know, subversion is a mistery for me :(
fglock the diff is empty 14:59
Limbic_Region I didn't realize Linus was such a prick but after watching what he had to say about people that use subversion I am not impressed 15:00
args did he use the word "nazi" ? 15:01
moritz args: afaict not
zamolxes 'mental institution', 'masturbation' , 'idiots' ..
Limbic_Region just a sec, I didn't watch all 70 minutes so it is a possibility 15:02
args then he thinks that svn is still superior to gnome :)
moritz is he a KDE fanboy?
Limbic_Region use.perl.org/~kid51/journal/33649
lambdabot Title: Journal of kid51 (5328)
fglock lunch & 15:03
wolverian moritz, more than a gnome fanboy, certainly..
Limbic_Region he says that anyone who disagrees with him is ugly and stupid
wolverian and he says he knows he's a git :) 15:05
avar Limbic_Region: You're misrepresenting him, it's quite obvious from the talk that he's half serious 15:10
The issues he points out with cvs and subversion are valid
moritz i think many tech people tend to be more honest than polite 15:12
diakopter TimToady: perhaps Coke's request for 'trace add execution' could be handled with an override of ';' 15:20
avar diakopter: why not overload the runloop? 15:44
diakopter avar: I don't know enough to understand that concept (much more than barely). I was looking for a way to do it at the parsing level, since for a trace, the developer usually cares about the statements they have made, not whatever the optimizer has turned their program into 15:57
avar: although of course, they *should* care more about the optimizer's results....
Limbic_Region avar - I am sorry, but if you thought it was obvious that he was in any way joking, I have to disagree with you. 16:04
avar - and I was not at all offended by the critisim of cvs and subversion - I was upset by what he had to say regarding the people involved 16:05
TimToady diakopter: certainly anything is possible at the compilation stage. and we have to be careful about what we mandate at the run stage 17:25
avar: there might not *be* a runloop in some implementations
avar which is why it's probably best to solve this by altering your ast to call subs before and after rather than oveloarding a syntactic statement delimiter 17:27
TimToady but it's still something the compiler is choosing, which is proper because it has performance ramifications 17:28
you're just attaching it to the node that is often produced by ; instead :)
now, what we *could* do is mandate that the compiler compile both the optimized and pessimized forms of output, and then pick one, but then you slow down the compiler a bit, or at least require the runtime to be able to re-emit with different characteristics 17:30
the latter can actually get you compiled code that runs faster than C 17:31
because if you can reemit, you can do so with the knowledge of which branches were taken historically
of course, switching to a different compilation of the same code has issues 17:32
which I think are mostly solved by saying that we don't try to switch in mid routine, but just pick an implementation at routine entry and go with it
though in some ways you'd like finer granularity 17:33
inserting "switch points" where things are sane is, alas, an *interesting* problem 17:34
TimToady and interesting questions arise like "when I invoke this loop block, is it really a new function call, or has it been assumed to be part of its surrounding context" 17:35
but requiring hookable things of the runtime tends to produce results like P5's tie, which pessimizes every variable access because the compiler can't know which variables are someday going to be tied 17:37
TimToady likewise, if the runtime has to keep every statement discrete because someone *might* start up a debugger on it, then we've limited optimizations involving code motion and constant subexpression removal 17:38
(again, in the absence of run-time code re-emission) 17:39
jrockway just take the haskell approach and say that debugging is useless :) 17:40
"perl6 makes bugs impossible" [to find]
:)
dmq notes the similarty between tie and $& in p5
TimToady that's another example
dmq tie is worse tho. :-( 17:41
TimToady yes, you pay that penalty whether or not it's used anywhere else
dmq yeah
and afaict tie doesnt admit some kind of hinting approach to work around the issue
wheras $& does 17:42
TimToady basically, in parrot terms, it's the difference between a language than can use int and str registers, vs one that is always limited to pmcs
the p6 solution to both the tie and $& problems is lexical scoping 17:43
dmq doesnt follow
ties can cross lexical boundaries.. 17:44
i can see how lexical scoping helps with $&, but with tie i dont follow
avar what do you mean lexical boundaries? You tie a lexical or global variable, right? 17:45
TimToady: The tie optimization problem is a more general issue: magic
TimToady the p6 compiler is allowed to assume that a variable is never tied unless explicitly declared as tieable 17:46
dmq im still not following. 17:47
TimToady a binding of a tied variable to an untieable variable must coerce to the current variable's storage constraints
unboxing it, as it were
dmq ok, so if you pass a tie into a subroutine its value is converted to an untied copy? 17:48
TimToady if I have sub foo (int $x) the compiler can use an integer register
you can pass a tied variable to it, but you won't get at the tie via $x
it converts to int at binding time
dmq which reduces the utility of tieing, but for a good payoff
imo
TimToady it makes explicit what p5 is doing with the two sets of flags for whether we've actually evaluated the magic yet 17:49
which is part of the kludginess of magic
Limbic_Region Anyone able to use Net::Google::Calendar mind doing me a favor? 17:50
I need the result of $event->content->body() in a plain text file 17:51
fglock dmq: ping 18:16
diakopter TimToady: how would one go about wrapping or otherwise overriding the ';' if you wanted the trace at compile time? 18:38
TimToady diakopter: you'd derive a grammar, define your own "rule statement" that calls into the STD statement rule and then tweaks the returned value 18:45
you don't really want to attach it to the ';' literal because the parser doesn't know enough at that point 18:46
diakopter ah 18:48
pugs_svnbot r16851 | fglock++ | trunk: 19:30
: [kp6] updated EmitPerl5Regex to mop
r16852 | fglock++ | trunk:
: [kp6] updated lib5regex Match.pm
diff: dev.pugscode.org/changeset/16852
lambdabot Title: Changeset 16852 - Pugs - Trac
devbot6 planet6: Jesse Vincent: A trio of Perl 6 microgrants <use.perl.org/~jesse/journal/33708?from=rss> 21:23
obra congrats, fglock, juerd, steve 21:25
Juerd obra: Thank you, and your company of course :) 21:38
"interested in submitting a Perl 6 microgrant" 21:39
shouldn't that be *request* or *proposal*? :)
obra fixing
yes
thanks
Juerd I'll try to answer the mail tomorrow, by the way. 21:40
I'm off to bed now
Good localtime :)
obra night 21:48
meppl good night 22:31
pugs_svnbot r16853 | lwall++ | trunk: 23:22
: [STD] 1st EXPR expect_term hoisted to statement level for longest-token analysis
diff: dev.pugscode.org/changeset/16853
lambdabot Title: Changeset 16853 - Pugs - Trac
pasteling "evalbot_r16852" at 193.200.132.135 pasted "Pugs build failure" (6 lines, 278B) at sial.org/pbot/26051 23:25
pugs_svnbot r16854 | Darren_Duncan++ | trunk: 23:59
: ext/Muldis-DB/ : similarly to Core.pm, updated AST.pm and PhysType.pm to rearrange existing types, and add another literal type, Order
diff: dev.pugscode.org/changeset/16854
lambdabot Title: Changeset 16854 - Pugs - Trac