Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-03-09

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:02 rashakil joined perl6
00:38 mako132_ joined perl6
00:40 justatheory joined perl6
00:46 seano joined perl6
00:58 nipotaway is now known as nipotan
01:32 svnbot6 r15531 | lwall++ | add blockless gather form for problem 9
02:03 dvorak joined perl6
02:08 dolmans joined perl6
02:12 svnbot6 r15532 | lwall++ | Add caching version of problem 49
02:17 TimToady_ joined perl6
02:20 dmq joined perl6
02:47 Schwern joined perl6
02:50 Pominx joined perl6
02:55 b00t joined perl6
03:02 nperez joined perl6
03:06 TimToady_ is now known as TimToady
03:12 ccoffey_ joined perl6
03:12 ccoffey_ left perl6
03:13 SamB joined perl6
03:22 specbot6 r14322 | larry++ | overgreedy .* noted by thom++
03:50 Psyche^ joined perl6
03:57 Psyche^_ joined perl6
04:06 Psyche^_ is now known as Patterner
04:10 Yappo joined perl6
04:44 amnesiac joined perl6
05:08 Schwern joined perl6
05:11 audreyt google talk coming up in 50min; wish me luck :)
05:11 TimToady luck!
05:11 TimToady maybe even good luck!
05:11 audreyt also good news: liver-blood-check today shows that I'll probably be fully recovered in 2wk
05:11 audreyt ooh :)
05:15 TimToady 福氣、好運、機遇...
05:16 audreyt 機遇 isn't quite Chinese :D
05:16 audreyt but thanks :D
05:16 TimToady interesting, got it out of my Mandarin dict.
05:17 audreyt means "Opportunity" but not quite used after 1940s
05:17 TimToady that would explain it
05:17 audreyt bbiab :))
05:18 offby1 joined perl6
05:23 Aankhen`` Goodluck, audreyt!
05:24 Aankhen`` Er.
05:24 Aankhen`` Good luck, even.
05:36 audreyt slides: http://pugs.blogs.com/talks/google-pugs.pdf
05:38 Khisanth TimToady: ancient dictionary? :)
05:44 TimToady ancient language!
05:45 Yappo joined perl6
06:04 dec_ joined perl6
06:31 GeJ joined perl6
06:37 rfordinal joined perl6
07:03 iblechbot joined perl6
07:18 jisom joined perl6
07:28 nekokak joined perl6
07:30 Squern joined perl6
07:41 gaal audreyt++
07:41 gaal good morning
07:42 bsb left perl6
07:43 DrSlump joined perl6
07:52 nothingmuch hola gaal
07:53 gaal hey nuffin!
07:53 nothingmuch sup yo you yo
07:53 * nothingmuch is in Incline Village NV
07:53 gaal watch your drink
07:54 nothingmuch no drink now
07:54 nothingmuch driving
07:54 nothingmuch plus have been awake for long
07:54 nothingmuch i doubt I willget anything more than an end of the day beer once or twice for the next 2 weeks
07:54 lumi_ Hi Gaal & emigrant!
07:54 gaal I'm just saying, must be hard to keep it from spilling
07:54 nothingmuch oh
07:54 nothingmuch ha ha ha
07:54 nothingmuch *cough*
07:55 gaal you know, you have a one-track mind. (hahahhaahhaaa)
07:55 gaal hey lumi_ :)
07:55 lumi_ I have a tail
07:55 lumi_ is now known as lumi
07:55 nothingmuch i didn't get that one
07:55 nothingmuch >lumi_ == tail & horns
07:56 nothingmuch or mahybe }lumi-
07:56 nothingmuch antlers are better than horns
07:56 gaal one-track-mind+ADD == ???
07:56 gaal anymoose
07:57 gaal are you starting the less cody part of your excursion? please keep alive etc.
07:57 nothingmuch yep
07:57 nothingmuch tomorrow I do resort stuff
07:57 lumi Where are you excurding?
07:57 nothingmuch getting acclimatized to my board and the altitude
07:57 nothingmuch mammoth mountain resort
07:57 nothingmuch then I have an avalanche course
07:57 nothingmuch then I go to tioga pass
07:58 nothingmuch then I have a mountaineering course
07:58 nothingmuch then I play around in the tahoe region
07:58 nothingmuch by then it's been two weeks and I go home
07:58 lumi Do you learn how to be, or how to cause, an avalanche?
07:58 nothingmuch how to cause
07:59 nothingmuch hopefully i apply the negation of that
07:59 nothingmuch also, how to predict the ease of causing
07:59 gaal lumi: I think it's prep class for manic landscaping
07:59 nothingmuch and how to remove dead bodies from one
07:59 gaal like in the HHGTTG
07:59 the_dormant joined perl6
07:59 lumi Pining for the (autographed) fjords?
07:59 nothingmuch no fjords around here
08:00 gaal any pines at least?
08:00 nothingmuch yes, plenty, i think
08:00 gaal well, they're all pining for the nonexistant fjords. obviously
08:01 gaal huh I just realized audreyt probably put us on projector or something
08:01 gaal *smiles*
08:02 gaal unless it's already over?
08:02 nothingmuch what is already over?
08:02 nothingmuch HELLO EVERYONE WHO ARE YOU AND WHAT ARE YOU DOING?
08:03 lumi Gosh, are we on stage?
08:03 gaal nothingmuch: audreyt's giving (or was giving?) a talke
08:03 gaal s/e$//
08:04 nothingmuch aha
08:05 marmic joined perl6
08:10 nothing joined perl6
08:13 gaal http://svn.pugscode.org down?
08:13 lambdabot Title: Revision 15532: /
08:13 gaal apparently not :/
08:24 BooK joined perl6
08:25 BooK_ joined perl6
08:36 drrho joined perl6
08:45 Schwern joined perl6
08:57 lampus_ joined perl6
08:57 GabrielVieira2 joined perl6
09:09 buetow joined perl6
09:14 elmex joined perl6
09:21 kanru joined perl6
09:30 penk joined perl6
09:56 buetow joined perl6
10:04 IllvilJa joined perl6
10:18 chris2 joined perl6
10:29 iblechbot joined perl6
10:37 gaal this is pretty quick'n'dirty, but I get about 17k dispatches per second with random data with ghci
10:39 Patterner how many do you need? :)
10:39 gaal don't know :) enough for this not to be considered a showstopper bottleneck
10:39 svnbot6 r15533 | gaal++ | * rudimentary benchmarking for dispatch algorithm
10:40 gaal I'd like to run this on a compiled+optimized version too, the numbers are sure to be better
10:42 gaal and indeed they are: just under 37k/sec
10:43 Patterner how do you compile qc-dispatch?
10:43 gaal of course, this greatly depends on the generated samples, how big they are
10:43 gaal Patterner: ghc --make -O misc/pX/audreyt/qc-dispatch.hs
10:43 Patterner I get lots of stuff like "undefined reference to `mtlzm1zi0_ControlziMonadziError_zdf19_closure'"...
10:44 Patterner gaal++
10:45 gaal does --make solve the problem?
10:45 Patterner (34043,29006,36951) (tied/spoiled/okay)  1.835721 seconds
10:45 gaal groovy
10:45 gaal your computer is faster than mine :)
10:45 gaal 2.71 sec here
10:45 Patterner goovy is a java language :)
10:45 Patterner groovy even...
10:46 gaal so is nice
10:46 Patterner size doesn't matter :)
10:47 gaal like audreyt said, this is going to be run a lot, so it has to be fast enough on slower machines too
11:13 mdiep_ joined perl6
11:37 fglock joined perl6
11:37 pbuetow joined perl6
11:44 VanilleBert joined perl6
11:52 devogon joined perl6
11:58 audreyt 0.97039 seconds
12:04 ruoso joined perl6
12:13 gaal audreyt: what cpu are you using?
12:14 gaal I wonder if the algorithm can be made more parallel-friendly
12:21 moritz there seems to be a problem with pugscode.org's DNS
12:21 moritz I can't resolve it anymore (tried in 2 different networks)
12:22 Psyche^ joined perl6
12:23 gaal ah, and I thought it was a local problem with my isp
12:23 TimToady joined perl6
12:23 moritz presumably not ;)
12:23 gaal moritz: try querying dns1.registerfly.com
12:24 gaal # 216.40.47.18
12:25 fglock joined perl6
12:25 moritz I think I'll just wait until it's fixed, I have no particularly pressing issues ;)
12:38 Psyche^ is now known as Patterner
12:39 VanilleBert left perl6
12:52 svnbot6 r15534 | fglock++ | PCR - added stub for 'StrPos' class
13:09 IllvilJa joined perl6
13:09 IllvilJa left perl6
13:20 IllvilJa joined perl6
13:25 dmq juerd: you about?
13:26 Juerd Yes
13:26 the_dormant joined perl6
13:32 iblechbot joined perl6
13:33 f0rth joined perl6
13:51 moritz wow, t/regex/from_perl6_rules/stdrules.t all pass now (partly unexpected)
14:13 moritz is there any reason not to remove the :todo<bug> labels?
14:13 moritz if not I can do it ;-)
14:17 ayrnieu joined perl6
14:18 moritz what does force_todo(@numbers) do?
14:19 [particle] joined perl6
14:20 moritz and do we need it if the tests pass?
14:21 vel joined perl6
14:27 bonesss joined perl6
14:34 gaal moritz: see t/README
14:34 gaal if tests pass, by all means please unTODO them :)
14:34 gaal moritz++
14:34 gaal bbl&
14:38 SCalimlim joined perl6
14:40 Aankhen`` joined perl6
14:44 svnbot6 r15535 | moritz++ | removed :todo<bug> labels for passing test in stdrules.t
14:56 fglock joined perl6
14:59 fglock is there a module that supports 'graphemes' in perl5?
15:02 svnbot6 r15536 | fglock++ | PCR - StrPos - some fixes, docs
15:02 args graphemes?
15:03 amnesiac joined perl6
15:04 fglock args: language-specific multi-byte chars
15:05 args fglock: certainly, but I don't see what you mean by supporting graphemes
15:06 fglock I need: grapheme_count( $str )
15:06 fglock length_as_graphemes()
15:07 args you mean fold casing ? surrogates ?
15:07 moritz ?eval "ähm".graphs
15:08 evalbot_r15534 3
15:08 moritz ?eval "ähm".bytes
15:08 evalbot_r15534 4
15:09 fglock moritz: I wonder is this is just reusing the codepoints() value
15:09 moritz fglock: "use v6" is no viable alternative? *g*
15:09 fglock moritz: this is for the v6 backend :)
15:10 moritz that's what they call recursion ;-)
15:10 fglock ?eval "ähm".codepoints
15:10 evalbot_r15534 Error: No compatible subroutine found: "&codepoints"
15:11 fglock hmm - my S02 must be outdated
15:11 moritz or it's just not implemented
15:14 fglock ?eval "ähm".codes
15:14 svnbot6 r15537 | fglock++ | PCR - s/graphemes/graphs/
15:14 evalbot_r15536 3
15:15 rlb3_work joined perl6
15:15 svnbot6 r15538 | fglock++ | PCR - s/codepoints/codes/
15:17 fglock Sadahiro++ String::Multibyte::Grapheme
15:20 GabrielVieira joined perl6
15:31 svnbot6 r15539 | fglock++ | PCR - StrPos - added 'graphs()'
15:34 rashakil_ joined perl6
15:40 GabrielVieira2 joined perl6
15:42 rashakil__ joined perl6
15:44 GabrielVieira2 is now known as GabrielVieira
15:46 VanilleBert joined perl6
15:48 integral hmm, the svk on feather doesn't seem quite right: it's only r42975 (orig r15256) and neither 'svk pull' nor 'svk up -s' work (they give some weird RA layer 302 Found error).  Anyone able to help fix this?
15:52 Psyche^ joined perl6
15:53 integral Bleh, this is weird. "svn co http://svn.pugscode.org/pugs pugs-svn" works on my own box, but not feather.  And the error from it on feather is the same as svk.
15:53 lambdabot Title: Revision 15539: /
15:54 kolibrie integral: my pugs checkout on feather gets the same 'RA layer request failed' failure
15:55 kolibrie the last time I tried to update on feather (a couple weeks ago), I got 'The mirror is currently locked. This might be because the mirror is
15:55 kolibrie in the middle of a sensitive operation or because a process holding
15:55 kolibrie the lock hung or died.'
15:56 kolibrie do not know if it is in any way related
15:56 * integral doesn't think so, since svn is failing as well as svk
15:57 [particle] try pinging clkao
15:57 ajs_ I just updated twice with no problems
15:57 ajs_ svn
15:57 Psyche^_ joined perl6
15:57 integral ajs_: On feather?
15:58 moritz svn (not on feather) works fine for me as well
15:58 ajs_ sorry, missed that. no, not feather
15:58 integral Right, that's the same as me, it's only on feather that I've got problems.
15:58 kolibrie maybe it has to do with the DNS problem mentioned earlier today
15:59 integral okay, that sounds plausible
16:01 kolibrie from here svn.pugscode.org -> feather.perl6.nl (194.145.200.126)
16:02 kolibrie from feather svn.pugscode.org -> svn.pugscode.org.sbp.kantoor.leaseweb.net (83.149.80.111)
16:03 integral *nod*, I'll just have to wait until things settle then :)
16:06 devogon joined perl6
16:08 Psyche^_ is now known as Patterner
16:08 VanilleBert left perl6
16:09 jdv79 joined perl6
16:12 ajs_ is now known as ajs
16:14 fglock joined perl6
16:34 bernhard joined perl6
16:51 justatheory joined perl6
17:03 forsaken joined perl6
17:06 fglock joined perl6
17:11 Lorn joined perl6
17:11 svnbot6 r15540 | fglock++ | PCR - StrPos - added from_str_graphs()
17:13 TimToady fglock: graphs in Perl 6 may be matched with \X which is short for (?:\PM\pM*)
17:14 fglock TimToady: I'm actually doing the p6-backend work
17:18 kanru joined perl6
17:19 fglock audreyt: re PCR hs_bridge, should it stay as-is, or upgrade to StrPos positions?
17:20 TimToady I mean, the P5 way to do it is \X, not the P6 way
17:21 Jedai joined perl6
17:22 fglock TimToady: ah, much easier than what I was doing - thanks!
17:22 fglock does $pos++ increments .graphs?
17:24 TimToady it increments whatever "char" means in this unicode mode.
17:24 TimToady which is default graphs
17:25 TimToady but under "use codes" or "use bytes" it would be a smaller bite
17:25 TimToady all subject to the maximum and minimum abstraction levels allowed by the stirng
17:26 fglock k
17:26 TimToady a string marked as "max bytes" will always increment by bytes even under a higher level
17:27 TimToady and it is likely an error to increment a "min codes" string under use bytes
17:28 TimToady in other words, it's okay for narrow characters to pretend to be wider, but not the other way around.
17:29 TimToady (as long as Unicode semantics are preserved)
17:30 TimToady (which means it is probably required to know the encoding of the bytes to know how they would have been treated if they'd been codepoints)
17:32 rashakil__ is now known as rashakil
17:34 vel6608 joined perl6
17:38 svnbot6 r15541 | fglock++ | PCR - StrPos - removed String::Multibyte dependency; use \X to count graphs - TimToady++
17:39 kanru joined perl6
17:44 Lorn joined perl6
17:53 svnbot6 r15542 | fglock++ | PCR - StrPos - new methods add_graphs(), add_codes(), clone()
18:00 awwaiid joined perl6
18:01 lichtkind joined perl6
18:05 PerlJam Does <<foo {somesub()} bar>> work?  And if so, what's supposed to happen when somesub returns an array?
18:18 svnbot6 r15543 | fglock++ | PCR - Match.from and Match.to return StrPos objects; 2 new test fails; Pugs still works...
18:18 fglock ?eval sub somesub { <a b c> }; <<foo {somesub()} bar>>
18:18 evalbot_r15539 ("foo", "a", "b", "c", "bar")
18:18 ruoso I was thinking this days... One interesting feature would be to create a regex modifier to allow matching of unaccented characters, like  /a/ with the modifier would match both 'ã' and 'a'
18:19 offby1 I bet you'd find characters where it's not clear if it's accented or not
18:20 offby1 just my general pessimism
18:20 ruoso offby1, that would depend on the locale
18:20 ruoso as \w already does
18:20 fglock ruoso: I think you can - maybe take a look at unicode properties
18:20 ruoso there's Text::Unaccent that does that by mapping
18:21 ruoso but having that as a regex modifier would be really interesting...
18:22 ruoso consider you have a html that you want to make some words bold, but one of these words have an accent, but you still want to make bold the word without the accent...
18:23 PerlJam ruoso: I'm pretty sure that is already specced and is not a regex modifier
18:24 ruoso PerlJam, any clue of what I should look for in the spec?
18:26 PerlJam not really.
18:29 PerlJam But taking your example, you would do something like s/(word&mumble)/<b>$1</b>/g;  where mumble is the thing that would include matching the appropriate unicode properties.
18:30 Jedai But is there really a case where you would like to match ANY accentuation of the same letter ?
18:30 ruoso yes...
18:30 ruoso Jedai, accepting mistyped names
18:31 Jedai Ok...
18:31 ruoso that's quite common in places where you accented letters in people's name
18:31 ruoso s/you /you have /
18:32 Jedai well, not as a regex modifier then ? Rather a letter by letter thing ?
18:32 ruoso letter by letter? hmm
18:33 ruoso doesn't seems like a good idea
18:33 ruoso this is what I do today... so no gain...
18:33 Jedai I mean something like a modifier who take letters as arguments
18:34 ruoso but... why would I need to pass the letters as arguments?
18:35 Jedai If you accept any accent, you accept things really different from what you want
18:35 Jedai It's really the same as Text::Unaccent
18:36 ruoso yeah... except that I can make a s/this/that/ and substitute both 'thís' as 'this' as 'thîs'
18:37 ruoso which is not that simple with p5 regexes
18:37 Jedai Yeah, I see your point :)
18:38 Jedai And it's pretty screwy to do with Text::Unaccent too
18:40 TimToady with Perl 6 you could presumably transform the string to NFD and then under "use codes" match the base character separately from the accents.
18:41 ruoso TimToady, hmm... how the code for that would look like?
18:42 Jedai The joys of unicode...
18:44 TimToady well, depending on how we represent Unicode properties, something like (<-M>)(<M>*) matches any grapheme and splits it into base and accents, assuming NFD
18:45 ruoso hmmm... I see...
18:45 ayrnieu (I lament the loss of the yen operator -- because I have it on my keyboard.  Well, I can still use it for screen's cmd_char.)
18:46 TimToady just use it for backslash.  :Â¥
18:46 TimToady er, :\
18:49 ruoso but still... what if I want to match, but I simply don't want to care about it, as it is for case-sensitiveness....
18:50 TimToady don't want to care about what? the accents?  a<M>*
18:51 TimToady or do you want sugar for lexically scoped not-caring?
18:51 ruoso yeah... but this way I still have to go through all the chars that may be accented and add the <M>* after it
18:51 Lorn joined perl6
18:51 TimToady so you want sugar for lexically scoped not-caring
18:52 ruoso I mean $str = 'João'; $str =~ s/(Joao)/<B>$1</B>/
18:52 TimToady that could likely be arranged.
18:52 TimToady could even temporary match a chunk of string with NFD even if you never explicitly convert
18:52 fglock define your own 'regex_mod_external:<noaccent>' ?
18:53 TimToady maybe able to list the accents you want to ignore
18:54 ruoso optionally, yes... that could be usefull...
18:54 ruoso But I'm more in the sense of just ignoring it, as in ignore-case...
18:54 TimToady maybe just :insert which defaults to :insert(/<M>*/) or some such
18:55 TimToady hmm, insert too generic, but noaccent is kinda long
18:55 TimToady maybe overload :ignore
18:56 fglock :base
18:56 ruoso base seems fine
18:56 TimToady that probably works
18:58 TimToady presumably, like :i, it doesn't care whether you write the pattern with accents either, just normalizes both sides
18:58 ruoso sure...
19:00 [particle] isn't there already :base(n) for math-related stuff?
19:00 TimToady not in regex
19:00 TimToady also, like :i, only applies lexically in this rule, not dynamically in subrules
19:02 * ruoso thinks this solves completely the problem
19:02 svnbot6 r15544 | fglock++ | PCR - ChangeLog - added StrPos
19:06 Squern joined perl6
19:07 fglock brb
19:10 theorb joined perl6
19:16 Khisanth joined perl6
19:20 drupek12 joined perl6
19:25 specbot6 r14323 | larry++ | Add :b/:basechar modifier as suggested by ruoso++.
19:26 ruoso :)
19:28 fglock joined perl6
19:31 Juerd Ooh
19:31 Juerd Now if only we could /sort/ on basechars
19:31 [particle] thanks for not overloading :base
19:32 Juerd So that ń < ö < p
19:34 fglock mm - I wonder if PCR needs a Str class
19:38 TimToady there's a unicode report about sorting that goes into excruciating detail about all that.
19:43 TimToady and we already installed hooks into sort and cmp for alternate collation orders
19:43 TimToady (for some definition of installed that may not include implementation)
19:44 [particle] maybe it's for some definition of already
19:46 Juerd Neat, because Dutch has three different ways of sorting the ij.
19:47 TimToady well, who can explain the Dutch?  Not even the Dutch...
19:47 Juerd Not at all.
19:47 Juerd But ij can be explained :)
19:47 Juerd It started as ii, which was like any double vowel.
19:47 Juerd And started a life of its own.
19:48 TimToady I can, of course, slang the Dutch because my ancestors were Flemish.  :)
19:48 Juerd .oO( that explains a lot )
19:49 moritz did the Flemish invent the Flame war?
19:50 Juerd No, they have yet to invade .nl with caravans.
19:50 TimToady well, there were reasons my ancestors moved away, possibly involving flames
19:50 Juerd Trojan caravans.
19:50 Juerd Making us think they're paying tourists, while in fact they're full of soldiers :)
19:51 Juerd Hm, copper wire is more expensive than UTP, considering that UTP has 8 wires :)
19:51 svnbot6 r15545 | fglock++ | PCR - Grammar::Rule - fixed precedence of conjunctive/disjunctive ops
19:52 moritz can a method have multiple PRE blocks?
19:52 TimToady why not?
19:53 ruoso am I the only one who can't resolve pugscode.org?
19:53 moritz ruoso: this afternoon I had problems as well
19:53 moritz TimToady: is that a "yes"?
19:53 TimToady dunno, but I can ping it
19:53 jesse__ joined perl6
19:53 TimToady we don't usually forbid something unless there's a reason
19:54 TimToady so I really am asking "why not?"
19:54 moritz ok
19:54 TimToady that turns into "yes" only if nobody pipes up with a good reason
19:55 TimToady contrary to popular opinion, I don't actually know the answer to every question just yet.  :)
19:55 moritz my thought was the following: if you have multiple conditions in a PRE-block and you connect them with "and", and one of them fails, you don't know which one failed...
19:55 ruoso whois pugscode.org gives a strange result...
19:56 moritz so a good workaround would be to use multiple PRE blocks
19:56 moritz so that pugs/perl6 tells me which one failed
19:56 TimToady assuming some kind of assert-like mention of the code involved
19:57 moritz ?eval sub f($a is Num) {PRE {$a > 0} PRE {$a < 5} say $a} $f(2); f(50)
19:57 evalbot_r15539 Error: No compatible subroutine found: "$f"
19:57 moritz ?eval sub f($a is Num) {PRE {$a > 0} PRE {$a < 5} say $a} f(2); f(50)
19:57 evalbot_r15539 Error: PRE assertion failed: "&Main::f"
19:57 lampus_ is now known as lampus
19:57 TimToady just Num $a, not $a is Num
19:57 moritz ok
20:00 jesse__ is now known as obra
20:00 moritz so why does the first test in t/closure_traits/pre_post.t fails?
20:01 ozo_ joined perl6
20:01 moritz ?eval sub foo(int $i) { PRE { $i < 5 } return 1; } foo(2);
20:01 evalbot_r15539 1
20:02 moritz at least it fails with r15530
20:04 TimToady Undeclared variable: "$i"
20:05 TimToady perhaps the closure isn't closing
20:06 TimToady it's not an int vs Int distinction
20:07 moritz well, it doesn't work if you substitute int by Num
20:08 TimToady or perhaps it's simply running the PRE before binding anything to $i, given pugs's penchant for belated reporting of undefineds.
20:08 Psyche^ joined perl6
20:08 TimToady anyway, almost certainly a bug
20:09 svnbot6 r15546 | fglock++ | PCR - updated docs, TODO, ChangeLog
20:09 moritz I'm glad to hear that... PRE would be pretty pointless if you couldn't use the arguments
20:09 Lorn joined perl6
20:09 fglock ?eval sub foo(int $i) { PRE { @_[0] < 5 } return 1; } foo(2);
20:09 evalbot_r15539 1
20:09 Juerd What is PRE?
20:10 moritz Juerd: preconditions
20:10 Juerd Eh, I knew that.
20:10 Juerd :)
20:10 Juerd I was reading PRE as yet another acronym, and didn't know that one yet :)
20:10 Juerd Argh. Thanks for being patient with me :)
20:10 moritz Perl Regular... E's?
20:11 Juerd P[ugs|arrot|erl] R[egular|ule|???] E[ngine|???], I was thinking.
20:11 moritz Enigma ;)
20:12 Juerd Perl Reality Enigma.
20:12 TimToady Potentially wRong Expression
20:12 Juerd Hehe
20:12 Juerd PWE { ... }
20:13 moritz Potentially wRong = Partially Right ;)
20:13 TimToady Potentially Other Stupid Thing
20:14 moritz is there something in p6 equivalent to Eiffel's class invariants?
20:14 TimToady Pink Remembering Elephants
20:15 TimToady potentially, though unspecced.  I assume they're equivalent to identical PREs factored out from all the methods
20:16 TimToady so you could implement such a thing by distributing extre PREs to each method
20:16 moritz they are evaluated before and after any method call (except before the initialiser)
20:17 TimToady seems like it would be fairly easy to do even if we don't spec it officially
20:17 moritz so how would I do something like that?
20:18 fglock create a Role that adds PRE to methods...
20:18 TimToady depends on what kind of apparatus the MO folks hand us.
20:18 fglock Class->add_method( 'name', $closure does MyPre )
20:20 fglock does this seem right? VAR(&meth).PRE.push( {...} )
20:21 TimToady something like that, but you shouldn't need VAR
20:22 TimToady &foo.meth already calls a method on the &foo object.
20:22 TimToady only .() would be a problem.
20:22 fglock k
20:30 moritz funny... I've just written a test case that works fine inside eval(), and fails to compile outside of eval() ;)
20:30 TimToady In fact, I don't see any good reason offhand why a method declared inside a sub shouldn't just be considered a method on that &
20:31 fglock mm - anon prototype?  $x = { method {...} }
20:33 fglock with named methods, actually - $x = { method meth {...} }
20:33 moritz should POST have access to internal variables of a sub?
20:34 * PerlJam doesn't quite see the unification of classes and subroutines as a good thing.
20:34 TimToady if they're in lexical scope, but it might not be best practice
20:34 PerlJam perhaps I'm just pessimistic today
20:34 moritz ?eval sub f(Num $i){my $x=$i; return 1; POST {$x > 0}} f(42)
20:34 evalbot_r15539 Error: POST assertion failed: "&Main::f"
20:34 [particle] -Opessimism
20:35 sili joined perl6
20:36 TimToady I mostly just worry about the people who think -Opessimism is -Ofun
20:37 TimToady that set of people contains a lot of illigitimi that I have to non-carborundum
20:39 PerlJam btw, I had another idea for an article on Perl 6.  "Perl 6: Where the heck is it?"   I thought about trying to answer that question myself, but then decided that it would be better if I came up with some of the naysayer's arguments and such and then asked the set of questions to many of the principle players in Perl 6.
20:39 svnbot6 r15547 | moritz++ | Added test cases for subs with multiple (two) PREs or POSTs
20:39 Juerd PerlJam: See also the fears document, for inspiration
20:39 PerlJam People like larry, damian,chromatic,pmichaud,allison, etc.
20:39 PerlJam Juerd: thanks.
20:39 Juerd I got caught up in other work, while writing that.
20:39 Juerd Yet another subproject died :(
20:40 sili slacker
20:40 sili :p
20:40 PerlJam Juerd: leonardo da vinci started bunches of projects that he never finished.  But you have to start them before you can finish them anyway.  :-)
20:41 moritz PerlJam: well, he died. so he wasn't successfull after all ;)
20:41 Patterner joined perl6
20:42 sili dying makes people famous
20:42 PerlJam moritz: I don't know ... some people measure success by how many dreams you can dream.
20:43 Juerd PerlJam: Anyway, it's in quickref
20:43 moritz PerlJam: that's too philosophical for me ;)
20:44 Juerd quickref itself died too. Some of it is in Spec, but AFAIK, that's not maintained anymore either.
20:46 PerlJam I'm going to try to find time to write more about perl 6 this weekend (it might be hard since I'm going to SXSW)
20:46 PerlJam Anything in particular that you guys think is lacking in terms of bring perl6 to the people?
20:47 sili PerlJam: working code
20:47 sili (pugs excluded)
20:47 moritz something cool about rules
20:47 PerlJam sili: pugs is our anchor until perl6-parrot comes alive.
20:48 PerlJam moritz: like what?  Rules aren't cool all by themselves?
20:50 moritz PerlJam: no, but what you can do with them is cool IMHO - so an example would be nice..
20:50 specbot6 r14324 | larry++ | typo from perl++
20:50 specbot6 r14324 | larry++ | clarification that :b includes mark characters in actual matched text
20:50 moritz PerlJam: but then you'd have to explane a lot I guess
20:50 PerlJam moritz: explaining alot is almost the point  :-)   I want people to be comfortable with perl 6.
20:51 PerlJam I guess I could start a tutorial or two.  Or take up Juerd's flag and start fleshing out quickref
20:52 [particle] pj: keep your eye on parrot's object model, which is being implemented *now*. expect perl 6 with object support shortly after
20:52 PerlJam [particle]: is it documented in the pdd?
20:53 [particle] allison, jonathan, and mugwump have been working on the draft pdd
20:53 [particle] it's updated in the repo. i'm writing tests, and jonathan's coding pmcs
20:53 PerlJam I'm guessing parrot's object model closely mimics perl 6's now?
20:53 [particle] there's a pir-based prototype impl in compilers/smop/
20:54 [particle] of course
20:54 [particle] once we have objects and i/o, we'll release 0.5.0
20:54 PerlJam who's RM for that one?
20:54 PerlJam Coke?
20:55 [particle] which one?
20:55 PerlJam 0.5.0
20:55 [particle] dunno, wheever's lucky enough to be the rm when we decide the next release will be 0.5.0
20:55 PerlJam Didn't they go to a rotating RM schedule?
20:55 [particle] yes, but we haven't chosen the release numbers yet
20:55 PerlJam oh, I see.
20:55 [particle] coke's releaseing 0.4.10 this month
20:56 PerlJam Coke++ (like he has a choice ;-)
20:57 PerlJam anyway ... I've got work to do
20:57 * PerlJam &
20:59 fglock left perl6
21:02 Lorn joined perl6
21:08 sili PerlJam: I think a "Learning Perl 6" type wiki would be helpful. there's a lot of documentation out there, but it's not very organized and is dating quickly
21:08 sili it needs to be maintained, most importantly
21:14 Lorn joined perl6
21:20 drupek12 joined perl6
21:21 tene sili: the stuff in svn isn't dating so quickly.
21:22 sili tene: perhaps, but i think if the goal is to start putting perl6 in the hands of users, it needs to be accessible. in other words, a pretty web site
21:22 tene sili: the reason things are dating is because Perl 6 is still in heavy development.
21:23 sili tene: i understand that
21:23 tene However, if you want to volunteer to put together such a website, I'm sure it will be quite appreciated. :)
21:23 sili $newcomer doesn't, and doesn't want to bother with such things
21:24 sili there's a wiki up there somewhere, it just needs to be maintained
21:24 moritz sili: $noewcomer who doesn't want to be bothered with language changes shouldn't use p6 yet ;)
21:24 [particle] ?eval 1 << 29
21:24 evalbot_r15539 Error: ␤Unexpected "<< 29"␤expecting operator
21:25 [particle] ?eval 1 +<< 29
21:25 evalbot_r15539 Error: ␤Unexpected end of input␤expecting block, "\\", variable name, ">>" or "<<"
21:25 [particle] ?eval 1 +< 29
21:25 tene sili: I think moritz is probably right.  The type of user you're trying to appeal to doesn't want to use Perl 6 until it's released.
21:25 evalbot_r15539 536870912
21:25 sili maybe
21:26 moritz tene: on the other hand once it's out we _have_ to have tutorials etc., and then it's too late to write them
21:26 tene how is it too late?
21:27 moritz well, when p6 is released, it will be in all the (tech) news and will get lots of attention...
21:27 moritz and many people will try it...
21:28 moritz and if they can't find suitable documentation they'll just abandon it
21:28 moritz which is not what we want
21:29 beppu joined perl6
21:30 tene That's probably true.
21:45 kolibrie hopefully we'll feel a change in the breeze and know when to write them
21:47 ayrnieu If you build it, the technical writers will come.
21:49 vel joined perl6
21:51 Limbic_Region joined perl6
21:52 vamo joined perl6
21:53 vamo left perl6
21:58 pmurias joined perl6
22:01 justatheory joined perl6
22:02 IllvilJa joined perl6
22:04 pasteling "ajs" at 63.107.91.99 pasted "example of v6 regex parsing failure" (13 lines, 609B) at http://sial.org/pbot/23398
22:04 ajs Am I doing something odd there, or is v6?
22:04 ajs Or does backwhacking in rules just not work very well right now
22:04 ajs ?
22:04 ayrnieu PerlJam - I'd like simple comparisons: 'here is idiomatic $lang code', 'here is functionally similar but idiomatic perl6 code', with comments on anything interesting about the perl6, but otherwise not emphasising the comparison.
22:05 ajs v6 says: "Error in perl 6 parser: parsing error in Expression: ..." ~ $/[0]"
22:07 [particle] sure
22:07 [particle] { return " " ~ $/[0] }
22:07 [particle] probably doesn't like that for some reason
22:07 ajs So it would seem...
22:08 [particle] although i don't see why it wouldn't work
22:08 ajs It almost smells like it's reading the previous "\\" as "\" ... I'll try dumping the P5
22:09 justatheory joined perl6
22:09 ajs Sadly, it never gets far enough to dump
22:10 Psyche^ joined perl6
22:11 justatheory joined perl6
22:11 justatheory joined perl6
22:12 ayrnieu PerlJam - especially where $lang eq perl5, of course, but Ruby is also a good candidate for some things, like monkeypatching examples.
22:16 ajs Yeah, I just changed that { ... "\\" ... } to { ... $bs ... } where I'd set $bs to a backslash, and it worked.
22:17 ajs seems v6 may have problems with escapes in rule-embedded code
22:17 ajs not shocking
22:22 Psyche^ is now known as Patterner
22:35 weinig joined perl6
22:54 Limbic_Region joined perl6
23:02 Belaf joined perl6
23:03 DebolazY joined perl6
23:09 allbery_b so, about versioning:  a non-perler on #lopsa has raised a couple issues
23:09 allbery_b (1) explosive complexity when a program ends up requiring 5 different versions of a perl module
23:09 allbery_b (2) what happens when you end up mixing multiple versions of something like DBI?
23:10 [particle] you get what you deserve?
23:10 [particle] ;)
23:11 allbery_b well, he's worrieid that it might end up becoming common practice.  my take is that it's sufficiently complex and de-huffmanized to suggest "don't do that" but he still worries
23:14 allbery_b personally I'd like to see a system where modules declare (a) version (b) compatibility; consumers declare compatible module versions (or don't, and risk faiure at runtime); (c) p6 finds the "best" single module that conforms or throws a compile time error saying what constraints need to be satisfied
23:14 [particle] if you're using different module versions with different apis in the same scope, that's a problem
23:15 [particle] (if it's even allowed--i imagine it isn't)
23:15 allbery_b the problem is,, wha constitutes scope?
23:15 [particle] a class or module?
23:16 allbery_b in the case of something like DBI, the underlying database foo essentally makes the scope the entire program.  likewise when any module has internal state that isn't instance state
23:16 allbery_b the proposed p6 behavior is IMO only safe for stateless modules
23:17 TimToady not without aliasing
23:17 TimToady it's not like we haven't talked about those issues over and over already...
23:18 [particle] again! again!
23:18 TimToady I think you're ignoring wha'ts already specced on modules that manage exclusive resources
23:18 allbery_b I may have missed them
23:21 TimToady it's also possible that it never made it from apocalypse to spec.  :)
23:21 allbery_b where do I find the spec on exclusive resources?  it's not in S11 wehere I would expect it
23:21 TimToady but we've certainly been discussing it recently
23:21 allbery_b huh
23:22 TimToady in p6l, for instance.
23:23 allbery_b hm, thought I was on p6l
23:24 allbery_b seen lots f discussion about shaped arrays recently, but the only version stuff I've seen is snippets here
23:24 TreyHarris TimToady: yeah, i was just looking, i don't think it made the A->S transition
23:24 TreyHarris allbery_b: do you filter out the svn commit emails?  it's been in a thread whose subject line is one of the commit logs
23:24 TimToady I guess I'll have to fix that then..
23:25 allbery_b nope, I get those
23:25 allbery_b and I check my flters regularly so would notice if somehow they were getting spamfiltered
23:26 TreyHarris allbery_b: check your subject lines for /r14317/
23:27 allbery_b hm, I've been getting those.
23:27 allbery_b okay, so maybe it's the damn drugs doing the filtering :/
23:28 * allbery_b needs to call $doctor and find out if there's some other alternative, this seems to only have downsides currently
23:28 TimToady it's certainly not adequately specced, regardless of how much we've discussed it.
23:30 nperez joined perl6
23:30 * allbery_b hates being drugged asleep half the time and half out of his mind the rest
23:31 theorbtwo joined perl6
23:33 geoffb joined perl6
23:56 jisom joined perl6

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

Perl 6 | Reference Documentation | Rakudo