Camelia, the Perl 6 bug

IRC log for #perl6, 2012-05-11

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:04 cognominal_ joined #perl6
00:06 TimToady diakopter: yes, LTM is supposed to be transitive
00:15 xinming_ joined #perl6
00:21 dalek tablets: 595cc97 | (Herbert Breunung)++ | docs/appendix-g-glossary.txt:
00:21 dalek tablets: sharpen explanation of scope
00:21 dalek tablets: review: https://github.com/perl6/tablets/commit/595cc9792a
00:43 replore joined #perl6
00:45 integral joined #perl6
00:45 integral joined #perl6
00:45 tokuhirom joined #perl6
01:02 lestrrat joined #perl6
01:06 scott_ joined #perl6
01:07 havenn joined #perl6
01:07 fgomez joined #perl6
01:19 tyatpi joined #perl6
01:35 shinobicl joined #perl6
01:58 havenn joined #perl6
02:11 scott_ joined #perl6
02:34 orafu joined #perl6
02:41 lestrrat joined #perl6
03:12 tyatpi joined #perl6
03:12 sivoais joined #perl6
03:28 leprevost joined #perl6
03:28 colomon joined #perl6
03:54 shinobicl left #perl6
03:54 shinobicl joined #perl6
04:01 shinobicl hi
04:02 shinobicl i don't know if it is possible to implement, i'm not familiarized with the github api... but, could be possible to add a "medal" in modules.perl6.org to the modules that have wikis?
04:08 shinobicl left #perl6
04:17 shinobicl_ joined #perl6
04:33 noam_ joined #perl6
04:38 shinobicl_ left #perl6
05:05 alvis``` joined #perl6
05:10 diakopter joined #perl6
05:10 TimToady joined #perl6
05:12 snarkyboojum joined #perl6
05:16 moritz oh shark
05:19 sorear o/
05:22 birdwindupbird joined #perl6
05:26 noam_ joined #perl6
05:27 noam_ joined #perl6
05:37 mdupont joined #perl6
05:37 snearch joined #perl6
05:41 kaleem joined #perl6
05:51 tadzik oh shark
05:53 alvis```` joined #perl6
05:54 rsimoes joined #perl6
06:05 cognominal___ joined #perl6
06:11 scott_ joined #perl6
06:22 wtw joined #perl6
06:22 adu joined #perl6
06:24 adu hi [Coke]
06:25 adu perl6: (a => 1).HOW
06:25 p6eval pugs, rakudo d61049, niecza v17-3-gdaf09af:  ( no output )
06:25 adu perl6: (a => 1).WHAT
06:26 p6eval pugs, rakudo d61049, niecza v17-3-gdaf09af:  ( no output )
06:26 adu perl6: (a => 1).WHICH
06:26 p6eval pugs, rakudo d61049, niecza v17-3-gdaf09af:  ( no output )
06:26 adu rakudo: (a => 1).WHAT
06:26 p6eval rakudo d61049:  ( no output )
06:29 sorear adu: I think you're missing something.
06:30 adu what am I missing?
06:30 moritz somthing that produces output :-)
06:30 adu rakudo: say (a => 1).WHAT
06:30 p6eval rakudo d61049: OUTPUT«Pair()␤»
06:30 adu lame, there should be a REPL
06:30 moritz there is
06:30 moritz on the command line
06:30 moritz we have experimented with showing the return value instead of output
06:31 moritz but it was very confusing at times
06:31 adu oh
06:31 sorear when people run the same command four times, it makes me wonder what they are thinking
06:31 moritz so we decided it's less confusing to just require a say or a print somewhere
06:31 moritz sorear: it wasn't the same four times
06:31 sorear s/same/excessively similar/
06:32 moritz r: say (a => 1).WHICH
06:32 p6eval rakudo d61049: OUTPUT«Pair|-395195434␤»
06:32 adu I've been learning perl for about 3 days
06:32 adu give me a break
06:32 sorear exactly
06:33 sorear I want to know what you were thinking
06:33 adu well, I have seen code with all of those methods
06:33 sorear I can't put myelf in your shoes because I've known perl for far too long
06:33 sorear unless I ask
06:33 adu I was hoping one of them would give me something interesting
06:34 adu and I thought "perl6:" would give me what I ask for, instead of what I ask to print
06:34 moritz ah well, now you know better :-)
06:34 adu ok
06:34 moritz lesson learned, everybody happy, peace spreads over the world
06:35 adu well, if I were the botmaster, then I would have 2 bots, perl6io (requiring "say") and perl6 (ignoring io and auto-printing $_.Str)
06:38 moritz that would be worth experimenting with, I think
06:55 jnthn monring
06:56 jnthn uh, however you spell it...
06:56 * jnthn slurps the coffee harder
06:57 adu hi jnthn
06:58 jnthn hi
06:58 adu did we have a conversation?
06:58 jnthn I...think I've seen you here before. :)
06:59 adu :)
06:59 adu I'm probably one of 50 people writing a scheme for parrot
07:00 jnthn moritz: Hmm...Rakudo release seems to be quite early this month...
07:00 sorear I'm not sure Parrot has 50 users, total
07:00 jnthn Next week, iiuc
07:00 * jnthn gets to work on $dayjob
07:03 tadzik adu: then people would just forget to write 'p6io' instead of 'p6', I guess
07:04 adu tadzik: that was my rationale
07:04 tadzik I don't see a point then :)
07:05 adu tadzik: the point is that if you can remember to put a "say" in front of whatever it is that you are interested in, then you can also remember to add an io to the name
07:05 tadzik okay
07:06 adu my guess is that if you are are not aware of either, then you are aware of neither
07:07 adu hmm, too many are's
07:07 * adu must be a pirate
07:12 brrt joined #perl6
07:16 cognominal joined #perl6
07:16 fhelmberger joined #perl6
07:19 mikec__ morning
07:22 kresike joined #perl6
07:23 sorear hello mikec__
07:27 cognominal joined #perl6
07:31 moritz jnthn: aye, early release, but we have already done a bunch of awesome stuff done since the point release
07:46 sorear moritz: what do you think of adu's proposal?
07:46 moritz sorear: it might be worth trying
07:47 moritz sorear: otoh the confusion when we mixed output and return values is likely to reappear if we do it
07:48 fglock joined #perl6
07:50 rafl joined #perl6
07:51 goraki joined #perl6
07:52 dalek rakudo/nom: 9df9957 | moritz++ | src/core/Rat.pm:
07:52 dalek rakudo/nom: Rat.ceiling which does not go through Num
07:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9df9957000
07:53 dalek roast: 049170f | moritz++ | S32-num/rounders.t:
07:53 dalek roast: Rat.ceiling unfudges
07:53 dalek roast: review: https://github.com/perl6/roast/commit/049170f253
08:02 goraki left #perl6
08:03 goraki joined #perl6
08:04 TimToady perl6: https://gist.github.com/2648301
08:05 sorear sleep&
08:05 p6eval pugs: OUTPUT«*** ␤    Unexpected " {"␤    expecting operator or block construct␤    at /tmp/5M_ObBSlpf line 17, column 26␤»
08:05 p6eval ..rakudo d61049, niecza v17-3-gdaf09af: OUTPUT«0.00000000dc␤0.000000la␤-101010.111111​111111111111111111111111111111111111111101␤»
08:05 TimToady moritz: ^^ here's a version that does other bases than just 10
08:05 TimToady using the same size-by-denominator rule
08:07 moritz TimToady: fwiw $r.denominator.base($base).chars + 1  is probably slower than $!denominator.log($base).ceiling
08:07 TimToady yes, I suspect you're right
08:07 moritz erm, needs +1 too
08:08 moritz in Rat.Str, should $base be a named argument?
08:08 TimToady not clear whether you want to replace the decimal version or multi this alongside
08:09 TimToady Oh, likely, but .base(16) presumably calls that
08:09 cognominal joined #perl6
08:09 TimToady dunno how your internals are set up, actually
08:10 TimToady just thought I'd do the base version as a kind of puzzle, since the current .base() always truncates at 6 digits
08:13 TimToady it's also likely that we want hand optimized versions for common bases, esp decimal
08:13 TimToady anyway, have fun, TimToady is also wandering off to bed... &
08:23 alim joined #perl6
08:27 SatoAmbush joined #perl6
08:27 jnthn moritz: Yes, the ChangeLog already is looking nice :)
08:31 dalek rakudo/nom: 6a660de | moritz++ | docs/ChangeLog:
08:31 dalek rakudo/nom: three more changelog items
08:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6a660deb56
08:32 tadzik oh, it's release week, indeed
08:33 moritz tadzik: and you're the release manager, iirc :-)
08:33 tadzik oh, it's not :)
08:33 tadzik 2012-05-17   Rakudo #52 tadzik
08:33 moritz yeah, 6 days
08:33 kaleem joined #perl6
08:33 tadzik cool
08:34 moritz r: say Date.new('2012-05-17') - Date.today
08:34 p6eval rakudo 9df995: OUTPUT«6␤»
08:42 lestrrat joined #perl6
08:43 broquain1 joined #perl6
08:45 broquaint joined #perl6
08:50 goraki How does one go about helping with the tablets (beginner style helping, spell checking, for instance)?
08:51 masak r: module Next { our sub thursday { next_wd(4) } }; say Next::thursday - Date.today
08:51 p6eval rakudo 9df995: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&next_wd' called (line 1)␤»
08:51 masak r: module Next { our sub thursday { next_wd(4) }; sub next_wd($wd) { (Date.today.succ ... *.day-of-week != $wd)[*-1] } }; say Next::thursday - Date.today
08:51 p6eval rakudo 9df995: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \$v, Mu *%_)␤␤  in method Numeric at src/gen/CORE.setting:666␤  in sub prefix:<-> at src/gen/CORE.setting:2230␤  in block <anon> at /tmp/kn5DmsSsWV:1␤␤»
08:51 masak r: module Next { our sub thursday { next_wd(4) }; sub next_wd($wd) { (Date.today.succ ... *.day-of-week != $wd)[*-1] } }; say Next::thursday
08:51 p6eval rakudo 9df995: OUTPUT«2012-05-12␤»
08:52 masak hrm.
08:52 moritz goraki: submit a pull request on github
08:52 moritz goraki: if we like your changes, you'll get a commit bit very soon
08:52 masak r: module Next { our sub thursday { next_wd(4) }; sub next_wd($wd) { (Date.today.succ ... *.day-of-week == $wd)[*-1] } }; say Next::thursday
08:52 p6eval rakudo 9df995: OUTPUT«2012-05-17␤»
08:52 masak \o/
08:52 masak r: module Next { our sub thursday { next_wd(4) }; sub next_wd($wd) { (Date.today.succ ... *.day-of-week == $wd)[*-1] } }; say Next::thursday - Date.today
08:52 p6eval rakudo 9df995: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \$v, Mu *%_)␤␤  in method Numeric at src/gen/CORE.setting:666␤  in sub prefix:<-> at src/gen/CORE.setting:2230␤  in block <anon> at /tmp/P5Z3zJmt5e:1␤␤»
08:52 masak r: module Next { our sub thursday { next_wd(4) }; sub next_wd($wd) { (Date.today.succ ... *.day-of-week == $wd)[*-1] } }; say Next::thursday() - Date.today
08:52 moritz goraki: https://github.com/perl6/tablets has the sources
08:52 p6eval rakudo 9df995: OUTPUT«6␤»
08:52 masak \o/
08:53 goraki moritz: cool, will do that. thanks.
08:53 * moritz is glad to see an influx of contributors
08:55 * masak .oO( influx:<contributors> )
08:58 moritz r: sub influx:<contributors>() { }
08:58 p6eval rakudo 9df995: OUTPUT«===SORRY!===␤Cannot add tokens of category 'influx'␤at /tmp/5rfPMwZkko:1␤»
08:58 moritz that one used to be a NPMCA
09:01 masak o/ it's fun to stay at the N-P-MC-A o/
09:02 masak doesn't scan as well, methinks...
09:02 moritz masak: I think that dance requires more than one hand to be raised :-)
09:02 masak oh, those were music notes... :)
09:02 masak .u note
09:02 phenny U+266A EIGHTH NOTE (♪)
09:03 masak next time I'll use that one. less ambiguous. :)
09:03 moritz unimasak++
09:03 * masak runs and registers unimasak.com
09:03 masak "It slices. It dices. It submit bug reports!"
09:04 masak submits*
09:04 moritz heh, interview question: write a palindrom checker. I wonder how many applicants consider grapheme clusters :-)
09:05 masak shouldn't the language or a core-ish library just supply a method that reverses strings on a glyph level?
09:05 masak that would seem to be what you'd want most of the time.
09:06 moritz do you know any language that does?
09:06 masak no.
09:06 moritz p6 is supposed to, but no compiler does it
09:06 moritz libicu can probably do it
09:08 moritz unrelated: http://www.msnbc.msn.com/id/47363062/ns/​technology_and_science-science/t/zoo-chi​mp-makes-elaborate-plots-attack-humans/
09:12 masak it would be interesting to analyze IRC rituals from the viewpoint of primate territorial behavior.
09:13 moritz interesting, and possibly scary :-)
09:14 DrEeevil hrm, the feces-flinging aspect would explain a lot
09:14 drschumtzenberg joined #perl6
09:15 masak yeah, nihil novi sub sole.
09:15 moritz phenny: "nihil novi sub sole"?
09:15 phenny moritz: "nihil novi sub sun" (it to en, translate.google.com)
09:15 moritz meh
09:15 masak phenny: la en "nihil novi sub sole"?
09:15 phenny masak: "nothing new under the sun" (la to en, translate.google.com)
09:15 moritz "nothing new under the sun"?
09:15 masak language guessing fail.
09:16 moritz phenny: en la "language guessing fail"?
09:16 phenny moritz: "lingua coniectura inminutus" (en to la, translate.google.com)
09:16 masak why would GT even think that Latin and Italian are even remotely... oh wait :P
09:18 DrEeevil nothing new under the shoesole? ;)
09:18 masak there's this scene from "Sopranos" where a guy describes the fall of the Roman empire to the mafiosos, and asks rhethorically "and where are those Romans now?" -- they reply "You're talking to them, you klutz" :)
09:18 masak (but some other word than "klutz", probably)
09:20 dalek tablets: 438d7be | (Hayden Stainsby)++ | docs/appendix-b-grouped.txt:
09:20 dalek tablets: Corrected a couple of minor grammatical errors.
09:20 dalek tablets: review: https://github.com/perl6/tablets/commit/438d7bea8a
09:20 dalek tablets: ad6d316 | moritz++ | docs/appendix-b-grouped.txt:
09:20 dalek tablets: Merge pull request #8 from hds/master
09:20 dalek tablets:
09:20 dalek tablets: Appendix B grammatical change
09:20 dalek tablets: review: https://github.com/perl6/tablets/commit/ad6d3165c0
09:21 daxim joined #perl6
09:26 cognominal_ joined #perl6
09:31 sisar joined #perl6
09:46 NamelessTee joined #perl6
09:51 moritz r: enum Stringish a => 'some a', b => 'some b'; say a
09:51 p6eval rakudo 6a660d: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Stringish' called (line 1)␤Undefined routine '&enum' called (line 1)␤Undefined routine '&a' called (line 1)␤»
09:52 moritz r: enum Stringish (a => 'some a', b => 'some b'); say a
09:52 p6eval rakudo 6a660d: OUTPUT«===SORRY!===␤This type cannot unbox to a native integer␤»
09:56 moritz jnthn: in the enum action method, is there a good reason to use the constant folder instead of $*W.compile_time_evaluate (now that we have it)?
10:00 localhost joined #perl6
10:03 bbkr joined #perl6
10:10 masak tias?
10:11 moritz takes quiet some time :/
10:12 * masak hugs moritz
10:13 masak maybe I'll have time to try it locally during the day.
10:13 jnthn .oO( but loud goes quite fast! )
10:13 jnthn moritz: No, that code pre-dates BS
10:14 tadzik "maybe I'll have time to try it locally during the day." Hugging moritz? :)
10:14 moritz jnthn: ah, that was to support -1 as a value, right?
10:15 masak tadzik: most things in this world are eventually consistent. hugs, however, are immediate. :)
10:15 jnthn right
10:15 tadzik :)
10:15 jnthn masak: So hugs don't scale out well?
10:15 tadzik it's hard to hug someone who scales out well :P
10:16 masak jnthn: as someone who has once been at the bottom of a 6-person hug pile, I can emphatically say that hugs don't scale out well.
10:16 * masak .oO( or is that "scale up"? )
10:16 tadzik oh, do you know the game of Grenade too? P
10:16 tadzik :P
10:16 mikec__ hugs scale better horizontally than vertically
10:16 masak tadzik: no, this wasn't a game. this was spontaneous physical therapy.
10:16 mikec__ due to gravity
10:17 tadzik I see
10:17 lestrrat joined #perl6
10:18 moritz I have a patch locally that makes 'enum A (x => "foo")' survive
10:19 moritz but, it still coerces to Int silently somewhere
10:19 jnthn moritz: The whole enum code is very Int-centric today
10:19 jnthn moritz: The way it should be done is to call .succ
10:19 jnthn Instead of assuming int, coercing, adding one, etc.
10:20 moritz jnthn: that's why my patch does
10:20 moritz jnthn: though it only changes Actions.pm so far, neither World nor EnumHOW
10:20 jnthn moritz: OK, then I get the fail is in the world method to add the enum element
10:20 moritz s/why/what/
10:20 jnthn That method can probably become way simpler I suspect
10:20 jnthn I think EnumHOW should be totally comfortable with non-numeric enums.
10:20 bbkr joined #perl6
10:20 jnthn It shoudl only be compiler changes that are needed.
10:21 moritz well, what it currently does is to box into the enum type
10:21 moritz so I think I must fix boxability of it somehow
10:22 * jnthn finds the code on github
10:22 jnthn (may have to disappear to help folks doing regexercises at any point :))
10:22 dalek rakudo/enum-nonint: 417d760 | moritz++ | src/Perl6/Actions.pm:
10:22 dalek rakudo/enum-nonint: start to make enums less int centric
10:22 dalek rakudo/enum-nonint: review: https://github.com/rakudo/rakudo/commit/417d76010e
10:22 moritz in particular, method create_enum_value in World
10:22 moritz my $val := pir::repr_box_int__PiP($value, $enum_tpe_obj);
10:23 moritz the $enum_type_obj is of the type that it creates for that enum, right?
10:23 moritz so in   enum A <b c>, that's A
10:23 jnthn Yes
10:24 moritz so I need to fix $*OFTYPE somehow
10:25 jnthn uh
10:25 jnthn At the moemtn it assumes you have to declare up front if you want a strign based enum
10:25 jnthn our Str enum A <b c>;
10:26 jnthn $*OFTYPE holsd the Str there
10:26 jnthn But I guess maybe that is not the whole story.
10:26 moritz is that what the spec says?
10:26 jnthn It certainly says you can put a type there.
10:26 jnthn However, i think enum A (:b('lol'));
10:27 jnthn Is also meant to work out.
10:27 sisar joined #perl6
10:27 moritz so... we defer constructing the enum type object until we know what type it's made of?
10:27 jnthn Which there ain't anything in palce to support right now.
10:28 jnthn Yeah, we'd have to re-order things as they current stand
10:28 jnthn That is Ok though.
10:28 jnthn I think it's fairly clear that all of the values have to have the same type too.
10:29 moritz it seems that Perl6::Metamodel::BaseType already supports setting the base type later
10:29 jnthn In the case there's an OFTYPE we should check all the values conform to that. In the case there's not, we take the type of the first value and ensure the rest are the same.
10:29 moritz right
10:30 jnthn Yeah, but you may need to know the base type in order to make elements.
10:30 jnthn In fact, probably do.
10:30 moritz yes
10:30 jnthn The code int he World method that sets $!value should just set whatever is passed in though, not re-box.
10:31 moritz but it means we can do this order: create enum type object with unknown base type, then look at the first pair, then set the base_type
10:31 jnthn nom: enum A <b c>; say A.^mro
10:31 p6eval rakudo 6a660d: OUTPUT«A() Int() Cool() Any() Mu()␤»
10:31 jnthn Yes we can.
10:31 jnthn Additionally...
10:31 moritz and only then install the first pair
10:31 jnthn Since the enum type always singly inherits from the base type, you can create the enum value by:
10:32 jnthn 1) cloning the value
10:32 jnthn 2) reblessing it into the enum type
10:32 moritz how do I do the reblessing?
10:32 moritz I thought we didn't support that :-)
10:32 jnthn See Misin.pm
10:32 jnthn er
10:32 jnthn Mixin
10:32 jnthn Sure we do, otherwise we couldn't have does and but ;)
10:33 moritz pir::repr_change_type__0PP \o/
10:33 moritz anyway, lunch first
10:33 moritz I hope I'll learn a bit more details about our MOP in the process
10:33 jnthn We support it as long as the MRO of the target type has the current type's MRO as its suffix.
10:35 MContagious joined #perl6
11:09 erkan joined #perl6
11:09 erkan joined #perl6
11:13 dalek tablets: b64d1fe | (Herbert Breunung)++ | docs/appendix-b-grouped.txt:
11:13 dalek tablets: explanation to junctions table in B
11:13 dalek tablets: review: https://github.com/perl6/tablets/commit/b64d1fef34
11:13 dalek tablets: a4e7f32 | (Herbert Breunung)++ | docs/appendix-b-grouped.txt:
11:13 dalek tablets: Merge branch 'master' of github.com:perl6/tablets
11:13 dalek tablets: review: https://github.com/perl6/tablets/commit/a4e7f32f84
11:13 snearch joined #perl6
11:25 broquaint joined #perl6
11:33 moritz r: say pir::defined(Int)
11:33 p6eval rakudo 6a660d: OUTPUT«Method 'gist' not found for invocant of class 'Integer'␤  in sub say at src/gen/CORE.setting:6616␤  in block <anon> at /tmp/2I5AOP7NeH:1␤␤»
11:33 moritz r: say nqp::p6box_i(pir::defined(Int))
11:33 p6eval rakudo 6a660d: OUTPUT«0␤»
11:33 moritz nqp: sub f($x?) { say(pir::isnull($x)) }
11:33 p6eval nqp:  ( no output )
11:33 moritz nqp: sub f($x?) { say(pir::isnull($x)) }; f()
11:33 p6eval nqp: OUTPUT«0␤»
11:36 moritz n: our Str enum A (b => 'c'); say A::b
11:36 p6eval niecza v17-3-gdaf09af: OUTPUT«b␤»
11:36 moritz n: our Str enum A (b => 'c'); say A::b.Str
11:36 p6eval niecza v17-3-gdaf09af: OUTPUT«b␤»
11:36 moritz n: our Str enum A (b => 'c'); say A::b.value
11:36 p6eval niecza v17-3-gdaf09af: OUTPUT«c␤»
11:38 domidumont joined #perl6
11:39 masak <jnthn> We support it as long as the MRO of the target type has the current type's MRO as its suffix.
11:40 masak am I correct in concluding that this means that we allow downcasts (to a deriveder type) but not upcasts (to a baser type).
11:40 masak s/\./?/
11:40 moritz sounds correct
11:44 JimmyZ joined #perl6
11:45 masak hm. perhaps I'm just used to downcasts from Java. but there the distinction between runtime type and static type is made in a way that's not made in Perl 6.
11:45 mucker joined #perl6
11:46 masak (i.e. you're allowed to downcast if the runtime type of your object is same-or-deriveder than the type you're downcasting to)
11:47 masak and maybe just as well that downcasts don't work, 'cus they would be a devious way to break object invariants. and we don't need more of those.
11:48 moritz well, the Java downcasts are always just about the static type
11:48 masak right.
11:48 moritz I don't think you can actually change the dynamic type of an object
11:48 masak good point.
11:49 masak so in Perl 6 we're "actually" casting, whereas in Java it's more about changing the type of a pointer.
11:49 alim joined #perl6
11:51 moritz at run time, the java cast is actually just a type check
11:51 masak in the case of a downcast, yes.
11:51 masak in the case of an upcast, I don't see why there'd need to be a check.
11:52 moritz erm, is there an explicit upcast, ever?
11:52 masak sure there is.
11:52 moritz what's the use case?
11:52 masak can't think of any, but it's part of the language.
11:52 masak Liskov would suggest that all explicit upcasts are misguided, sure.
11:53 moritz I was just about to write that :-)
11:53 masak but there are badly written generic types out there, etc.
11:53 masak writing good generics in Java is hard :/
11:53 moritz because of type erasure?
11:54 masak no, because... hm.
11:55 masak I think it's mostly a syntax thing. plus having to care about covariance and contravariance as a generic API author.
11:55 masak .NET syntax makes similar situations seem almost trivial, from what I've seen.
11:55 masak s/\.NET/C#/
11:58 moritz hm, fudging in the base_type later into an enum doesn't seem to work :(
11:58 moritz it accesses the mro before that
11:58 moritz and the mro depends on the base tyep
11:58 moritz *type
11:58 moritz touch beans.
11:58 * moritz idly wonders if "tough beans" comes from the Java world
11:59 masak public static <T extends Comparable<? super T>> void sort(List<T> list) // know why there's both 'extends' and 'super' in a *nested* generic type there? for *sort*? well, I do, and I think it sucks.
12:00 moritz I can see why you need the 'extends'
12:00 moritz but why the 'super'?
12:00 * moritz a java noob
12:00 masak the 'extends' comes from the fact that you're sorting a list of elements that aren't necessarily Comparable objects (in fact, you can't instantiate Comparable since it's an interface).
12:01 masak the 'super' comes from the fact that the callback .compare used in Comparable takes T values (whatever they are) as parameters. things that take parameters are sinks, and thus contravariant.
12:02 moritz uff
12:02 masak it's all really interesting! but when I explain it to people, their brains explode. :/ I'd prefer to code in a language where it was obvious instead. C# seems to do better on that front.
12:02 moritz I see what you mean (re "it sucks")
12:02 masak yeah.
12:03 masak notice also how the generic type manages to be *recursive* (it declares and references T).
12:03 masak saying essentially "the type T must extend the type Comparable which is generic on things that the type T can have as a base type".
12:04 * masak 's brain asplodes
12:04 moritz the way I understand Liskov, "that the type T can have as a base type" could be replaced by just "T", no?
12:05 moritz in a sane programming language, that is :-)
12:05 drschumtzenberg joined #perl6
12:05 masak no, that's not the problem.
12:06 masak generics are a wider concept than covariance and contravariance. simply, generics are invariant by default.
12:06 masak that's what you get when you write Type<T>
12:07 masak to switch on covariance you do Type<? extends T>. to switch on contravariance you do Type<? super T>.
12:07 masak so far, it's all good. the only reason it gets messy so far as I can see is that you need to care about those concepts at all.
12:07 masak C# solves it all with some where-clause syntax. much nicer.
12:08 masak then again, C# generics were made with the hindsight of Java generics :)
12:08 moritz can't the compiler know where covariance and where contravariance is required?
12:11 masak interesting question.
12:11 masak I don't know. but it's tied to what you do with the data, so at minimum it's tricky.
12:13 bjarneh joined #perl6
12:14 masak we like to think that arrays are covariant. i.e. Array[Banana] <: Array[Fruit]. but that's only true for read-only Arrays.
12:14 masak elsewise you'd be able to upcast the Banana Array to a Fruit Array and insert a Pear.
12:15 masak similarly, write-only arrays are contravariant :P
12:15 moritz also known as KitchenSink
12:19 dalek rakudo/enum-nonint: 24a3016 | moritz++ | src/ (3 files):
12:19 dalek rakudo/enum-nonint: [enum] defer creation of type object until we know the base type
12:19 dalek rakudo/enum-nonint:
12:19 dalek rakudo/enum-nonint: now setting compilation blows up in term:sym<name> with Can only use nqp_get_sc_for_object with a SixModelObject
12:19 dalek rakudo/enum-nonint: review: https://github.com/rakudo/rakudo/commit/24a30163ab
12:21 snearch joined #perl6
12:29 moritz https://en.wikipedia.org/wiki/Covariance_and_​contravariance_%28computer_science%29#Eiffel Citation needed!
12:30 woosley joined #perl6
12:33 masak well, Liskov is a convention in most languages.
12:34 dalek rakudo/nom: 4cfdb7c | moritz++ | src/Perl6/Actions.pm:
12:34 dalek rakudo/nom: get rid of two Q:PIR blocks
12:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4cfdb7c7cd
12:34 moritz well
12:34 moritz depends on how you phrase it
12:34 moritz you can always throw an exception in a method in a derived class
12:35 moritz so the compiler cannot generally enforce Liskov substitutability
12:35 masak right.
12:35 cognominal joined #perl6
12:35 moritz but as far as compile time type checks are concerned, nearly all statically typed languages enforce Liskov
12:36 masak as far as compile time type checks *on one single class at a time* are concerned.
12:36 masak there's this example with a Child <: Person going to a Pediatrist <: Doctor.
12:37 masak and you end up with a situation where you, in statically typed languages, can't make Persons go only to the type of Doctor they were meant to.
12:40 tokuhirom joined #perl6
12:41 fh1920 joined #perl6
12:53 bbkr hm, 'use URI;' from latest Star release segfaults on my machine (OS X 10.7.3 and 10.7.4), is it known issue?
12:53 timotimo r: use URI;
12:53 p6eval rakudo 6a660d: OUTPUT«===SORRY!===␤Could not find URI in any of: /home/p6eval/.perl6/lib, /home/p6eval/nom-inst2/lib/parrot/​4.3.0-devel/languages/perl6/lib␤»
12:53 timotimo star: use URI;
12:53 p6eval star 2012.04: OUTPUT«(signal SEGV)»
12:54 timotimo at least i just reproduced it :)
12:55 mikec__ haha
12:55 PacoAir joined #perl6
12:55 * masak submits rakudobug
12:57 bbkr IETF::RFC_Grammar loads fine
12:59 not_gerd joined #perl6
13:00 not_gerd r: https://gist.github.com/2659460
13:00 p6eval rakudo 6a660d: OUTPUT«42/1 = 42.0␤1/5 = 0.02␤-4/3 = -1.(03)...␤19/12 = 1.058(3)...␤1/97 = 0.(001030927835051546391752577319587​628865979381443298969072164948453608​2474226804123711340206185567)...␤»
13:00 not_gerd ^ Rat to Str conversion handling repeated decimals
13:00 not_gerd still off-by-one somewhere, though
13:01 not_gerd there's a superfluous 0
13:06 jnthn masak: Your question about casts is odd. repr_change_type isn't casting. If anything, it's a coercion, but in-place.
13:07 lutok joined #perl6
13:07 masak jnthn: casting, coercion. compare and contrast.
13:09 jnthn Casting changes how you view a reference (and may or may not check that's sane; Java/C# check, C doesn't).
13:10 jnthn Coercion actually causes a change in representation.
13:10 [Coke] (writing scheme for parrot!) Hey, we could have used you 12 years ago.
13:10 jnthn They are often confused because many C family languages use the same syntax for both.
13:12 masak ah.
13:12 masak jnthn++ # 'splainin'
13:12 masak note that I got pretty close with some of the comments I made (e.g. "all Java does is change the type of a pointer")
13:14 jnthn Yeah, though that maybe makes it sound like it's actually mutating something. Whereas in reality it compiles to an "is it OK to proceed" check :)
13:16 masak nodnod.
13:20 plutoid joined #perl6
13:28 isBEKaml joined #perl6
13:29 [Coke] phenny: tell adu folks in #parrot are interested in your interest in scheme on parrot. (on irc.perl.org)
13:29 phenny [Coke]: I'll pass that on when adu is around.
13:29 tyatpi joined #perl6
13:38 tadzik bbkr: does it help if you recompile URI? Or remove its .pirs?
13:39 bbkr checking..
13:39 tadzik URI is one of the things that precompile non-deterministically :/
13:41 bbkr tadzik: removing URI.pir fixed this issue
13:44 tadzik interesting. Here it doesn't segfault, i merely fails to load a module
13:44 tadzik 'No STable at index 4' or so
13:47 adu joined #perl6
13:48 not_gerd p6: https://gist.github.com/2659460
13:48 p6eval rakudo 4cfdb7: OUTPUT«42/1 = 42.0␤1/5 = 0.2␤-4/3 = -1.(3)...␤19/12 = 1.58(3)...␤1/97 = 0.(01030927835051546391752577319587​62886597938144329896907216494845360​82474226804123711340206185567)...␤»
13:48 p6eval ..niecza v17-3-gdaf09af: OUTPUT«Use of uninitialized value in numeric context␤  at /home/p6eval/niecza/lib/CORE.setting line 1224 (warn @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 262 (Any.Numeric @ 6) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.se…
13:48 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "nom"␤    expecting operator, ":" or ")"␤    at /tmp/W6AxW_JLlU line 11, column 24␤»
13:54 dalek niecza: e5b869e | (Solomon Foster)++ | lib/CORE.setting:
13:54 dalek niecza: Add Rat.Rat and Rat.norm.
13:54 dalek niecza: review: https://github.com/sorear/niecza/commit/e5b869e04a
13:55 [Coke] NORM!
13:57 dalek roast: 7dd4b68 | (Solomon Foster)++ | S32-num/rat.t:
13:57 dalek roast: Change Rat.Str test to match current spec, add related tests and simple test for Rat.norm.
13:57 dalek roast: review: https://github.com/perl6/roast/commit/7dd4b68389
14:01 shinobicl_ joined #perl6
14:16 not_gerd left #perl6
14:16 mucker joined #perl6
14:21 kaleem joined #perl6
14:29 smash left #perl6
14:29 smash joined #perl6
14:30 skids joined #perl6
14:37 cogno_ joined #perl6
14:41 cogno_ Jnthn++ # explaining casting, coercion
14:42 masak &
14:42 thou joined #perl6
14:52 goraki joined #perl6
14:53 goraki left #perl6
14:56 shinobicl joined #perl6
14:57 goraki joined #perl6
15:01 jnthn decommute &
15:02 lucas_ joined #perl6
15:08 * flussence wishes `cpan` had a --install-required-modules-automat​ically-until-this-command-stops-sp​itting-out-missing-module-errors=, or something
15:09 lucas_ Hello
15:09 [Coke] flussence: like "cpanm --installdeps" or something?
15:09 lucas_ Is there a pure Perl 5 implementation of Perl 6?
15:09 [Coke] lucas_: allo.
15:09 geekosaur there is a setting that will accomplish that (o conf follow somethingorother...)
15:09 KyleHa joined #perl6
15:10 KyleHa Hello #perl6
15:10 flussence [Coke]: sort of, but more dwimmy and works on arbitrary source trees where the author was too lazy to specify deps correctly :)
15:10 [Coke] flussence: mmm.
15:10 mikec__ i was thinking about that just now
15:11 KyleHa When I build and spectest Rakudo on OS X, three of the files fail. Is that expected?
15:14 [Coke] spectests are under flux all the time, so that can happen.
15:14 [Coke] can you git blame the files and see if those are new tests?
15:15 cogno joined #perl6
15:15 [Coke] If so, they need to be fudged.
15:16 KyleHa A couple of them are broken because I don't have ICU.
15:17 [Coke] ah. usually we block that out at the test level by tagging the file in t/spectest.data with #icu
15:17 [Coke] s/test level/file level/
15:17 * [Coke] supposes we could skip a test if no icu with some clever fudge directives.
15:20 isBEKaml joined #perl6
15:21 cogno joined #perl6
15:30 KyleHa And the third one really is new.
15:32 dalek roast: 07d8486 | (Kyle Hasselbacher)++ | S32-num/rat.t:
15:32 dalek roast: skip Rat.norm test for Rakudo
15:32 dalek roast: review: https://github.com/perl6/roast/commit/07d84868e5
15:32 dalek rakudo/nom: ddbf78c | (Kyle Hasselbacher)++ | t/spectest.data:
15:32 dalek rakudo/nom: mark S02-names-vars/perl.t and S32-str/indent.t as requiring ICU
15:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ddbf78c71c
15:33 [Coke] you might need to add a reason to that skip.
15:33 KyleHa My commit was premature anyway; I haven't actually tested it.
15:36 [Coke] I know pugs gets antsy on a skip with no reason. not sure if rakudo does also.
15:36 dalek roast: b868a5f | (Kyle Hasselbacher)++ | S32-num/rat.t:
15:36 dalek roast: add a reason to my skip
15:36 dalek roast: review: https://github.com/perl6/roast/commit/b868a5f9b5
15:36 KyleHa Blah. I'm rusty.
15:40 Psyche^ joined #perl6
15:40 prammer deadline to submit presentations to Strange Loop is today. https://thestrangeloop.com/sessi​ons-page/call-for-presentations
15:41 dalek roast: 011c563 | (Kyle Hasselbacher)++ | S32-num/rat.t:
15:41 dalek roast: another skip for Rat.norm
15:41 dalek roast: review: https://github.com/perl6/roast/commit/011c563c93
15:53 KyleHa All tests successful.
15:53 KyleHa Files=645, Tests=20188, 617 wallclock secs ( 9.38 usr  3.07 sys + 1849.02 cusr 129.00 csys = 1990.47 CPU)
15:53 KyleHa Result: PASS
15:53 KyleHa Booyah, as it were.
15:54 cogno joined #perl6
15:54 jnthn KyleHa: Thanks for cleaning up :)
15:55 * jnthn likes it when all tests pass
15:55 jnthn KyleHa++
15:55 moritz Rat.norm is easy to implement
15:55 moritz method norm() { self }
15:55 KyleHa You're welcome. I live to serve.
15:55 moritz 'cause our rats are always normalized
16:02 goraki in the per6 tablets, under Number Literals, what's the bit about the +?
16:02 goraki "The + and can act also as operator that convert into the
16:02 goraki numerical context, which still means: take from left to right all
16:02 goraki digits and stop with the first none number character."
16:03 moritz r: say +"123"
16:03 p6eval rakudo 4cfdb7: OUTPUT«123␤»
16:03 moritz r: say (+"123").Int
16:03 p6eval rakudo 4cfdb7: OUTPUT«123␤»
16:03 moritz r: say (+"123").WHAT
16:03 p6eval rakudo 4cfdb7: OUTPUT«Int()␤»
16:03 moritz goraki: though it's not quite correct, I think
16:03 moritz goraki: because it fails if there are trailing non-number characters
16:03 moritz r: say +'123foo'
16:03 p6eval rakudo 4cfdb7: OUTPUT«Cannot convert string to number: trailing characters after number in '123⏏foo' (indicated by ⏏)␤  in method gist at src/gen/CORE.setting:8769␤  in sub say at src/gen/CORE.setting:6616␤  in block <anon> at /tmp/pyjW8YL72O:1␤␤»
16:03 goraki moritz: right, got it.
16:04 goraki moritz: that's correct behaviour isn't it?
16:04 moritz goraki: I think so, yes
16:04 goraki not just a rakudo thing?
16:04 moritz p6: say +'123foo'
16:04 alim joined #perl6
16:04 p6eval pugs: OUTPUT«123␤»
16:04 p6eval ..rakudo 4cfdb7: OUTPUT«Cannot convert string to number: trailing characters after number in '123⏏foo' (indicated by ⏏)␤  in method gist at src/gen/CORE.setting:8769␤  in sub say at src/gen/CORE.setting:6616␤  in block <anon> at /tmp/w_BccO__uc:1␤␤»
16:04 p6eval ..niecza v17-4-ge5b869e: OUTPUT«Unhandled exception: Cannot parse number: 123foo␤  at /home/p6eval/niecza/lib/CORE.setting line 1366 (die @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3405 (ANON @ 10) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3407 (NumSyntax.str2num @ 4) ␤  a…
16:04 dalek rakudo/nom: 372e6b7 | moritz++ | src/core/Rat.pm:
16:04 dalek rakudo/nom: implement Rat.norm
16:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/372e6b728d
16:04 moritz goraki: niecza and rakudo agree, that's a good sign
16:05 TimToady p6: say +' 123 '
16:05 p6eval pugs, rakudo 4cfdb7, niecza v17-4-ge5b869e: OUTPUT«123␤»
16:05 dalek roast: 7372a63 | moritz++ | S32-num/rat.t:
16:05 dalek roast: unfudge Rat.norm tests for rakudo
16:05 dalek roast: review: https://github.com/perl6/roast/commit/7372a630fa
16:06 TimToady p6: say +"123\n"
16:06 p6eval pugs, rakudo 4cfdb7, niecza v17-4-ge5b869e: OUTPUT«123␤»
16:06 TimToady goodgood
16:06 goraki right, cool. thanks.
16:06 TimToady p6: say +'123 but is anyone cheating?'
16:06 p6eval niecza v17-4-ge5b869e: OUTPUT«Unhandled exception: Cannot parse number: 123 but is anyone cheating?␤  at /home/p6eval/niecza/lib/CORE.setting line 1366 (die @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3405 (ANON @ 10) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3407 (NumSyn…
16:06 p6eval ..pugs: OUTPUT«123␤»
16:06 p6eval ..rakudo 4cfdb7: OUTPUT«Cannot convert string to number: trailing characters after number in '123⏏ but is anyone cheating?' (indicated by ⏏)␤  in method gist at src/gen/CORE.setting:8769␤  in sub say at src/gen/CORE.setting:6616␤  in block <anon> at /tmp/Ki6_h42_zA:1␤␤»
16:10 goraki well, I'm making some grammatical changes to tablet-2, I'll update the description to reflect what should happen (failure).
16:17 sisar joined #perl6
16:17 goraki r: say :36<abigradixendswithz>
16:17 p6eval rakudo 372e6b: OUTPUT«2956745512291279405828343255␤»
16:17 goraki that's neat.
16:17 thelazydeveloper joined #perl6
16:18 Vlavv_ joined #perl6
16:19 dalek nqp/toqast: e997116 | kboga++ | / (2 files):
16:19 dalek nqp/toqast: Adds the hash qast op
16:19 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/e9971163c8
16:19 dalek nqp/toqast: 7923535 | jonathan++ | / (2 files):
16:19 dalek nqp/toqast: Merge pull request #37 from kboga/toqast-op-hash
16:19 dalek nqp/toqast:
16:19 dalek nqp/toqast: Toqast op hash
16:19 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/792353597e
16:20 TimToady p6: say (:36<abigradixendswithz>/36**8).base(36)
16:20 p6eval rakudo 372e6b: OUTPUT«use of uninitialized value of type Any in string context  in block <anon> at /tmp/KXfh61rFkX:1␤␤ABIGRADIXE.NDSI␤»
16:20 p6eval ..pugs: OUTPUT«*** No such method in class Rat: "&base"␤    at /tmp/dm8cIHBN0X line 1, column 5 - line 2, column 1␤»
16:20 p6eval ..niecza v17-4-ge5b869e: OUTPUT«Unhandled exception: Unable to resolve method base in class Rat␤  at /tmp/9ehhuOpoIV line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3842 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3843 (module-CORE @ 65) ␤  at /home/p6…
16:21 TimToady eh, rakudo?
16:22 goraki r: say :60[12,34,56];
16:22 p6eval rakudo 372e6b: OUTPUT«===SORRY!===␤Malformed radix number␤at /tmp/UnrFPbAufi:1␤»
16:22 TimToady p6: say (:36<abigradixendswithz>/:36<10000000>).base(36)
16:22 p6eval rakudo 372e6b: OUTPUT«use of uninitialized value of type Any in string context  in block <anon> at /tmp/NT4kNN0Ikn:1␤␤ABIGRADIXEN.DSIT␤»
16:22 p6eval ..niecza v17-4-ge5b869e: OUTPUT«Unhandled exception: Unable to resolve method base in class Rat␤  at /tmp/b84GuIogMA line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3842 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3843 (module-CORE @ 65) ␤  at /home/p6…
16:22 p6eval ..pugs: OUTPUT«*** No such method in class Rat: "&base"␤    at /tmp/jQZFxI0xD5 line 1, column 5 - line 2, column 1␤»
16:23 goraki rakudo doesn't support radices larger than 36, right?
16:26 goraki p6: say :60[12,34,56];
16:26 p6eval niecza v17-4-ge5b869e: OUTPUT«Unhandled exception: :16[...] syntax NYI␤  at /home/p6eval/niecza/lib/CORE.setting line 1366 (die @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3463 (unbase @ 6) ␤  at /tmp/R0EKsMPciW line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting l…
16:26 p6eval ..rakudo 372e6b: OUTPUT«===SORRY!===␤Malformed radix number␤at /tmp/GVMF6tmGjt:1␤»
16:26 p6eval ..pugs: OUTPUT«45296␤»
16:29 not_gerd joined #perl6
16:29 TimToady I note that rakudo's .base(36) truncates rather than rounding the last digit
16:30 not_gerd r: 0.base(2)
16:30 p6eval rakudo 372e6b: OUTPUT«Invalid character in ASCII string␤  in method base at src/gen/CORE.setting:2675␤  in block <anon> at /tmp/Q2mGETUICu:1␤␤»
16:30 not_gerd ^ bug ?
16:30 TimToady seems
16:32 not_gerd TimToady: I also posted https://gist.github.com/2659460 earlier today, which prints the repeating decimals representation of a Rat
16:33 not_gerd no idea if such a function is worth adding to the spec...
16:33 TimToady I wrote one of those two days ago :)
16:33 not_gerd TimToady: did it detect cycles?
16:34 not_gerd this version prints the *exact* representation of the rational
16:34 sftp joined #perl6
16:34 TimToady let me dig it up
16:34 NamelessTee joined #perl6
16:34 gfldex since both niecza and rakudo are about to become self-aware shortly, here some friendly friday advice: http://www.youtube.com/watch?v​=-G3RoBHMu-o&amp;feature=g-u-u
16:36 TimToady r: https://gist.github.com/2660818
16:36 p6eval rakudo 372e6b: OUTPUT«241025348275725.3352␤0.000142857 (repeat 6)␤18446744073709551616.0103092783505154​6391752577319587628865979381443298969072​1649484536082474226804123711340206185567 (repeat 96)␤»
16:36 TimToady not_gerd: there's mine
16:38 TimToady but the long repeats made it seem like it was not going to be worth it for a default, anyway
16:39 Vlavv_ joined #perl6
16:41 not_gerd TimToady: thanks - I actually saw one of your versions in the log, but that didn't print the cycle
16:42 not_gerd I agree that it's not a good idea as a .Str, but could be added as a new method on Rat
16:42 PerlJam repeats beyond a few digits don't seem particularly useful to me.
16:42 TimToady troo
16:42 PerlJam (as far as human consumption goes)
16:42 not_gerd r: https://gist.github.com/2659460
16:42 p6eval rakudo 372e6b: OUTPUT«42/1 = 42.0␤1/5 = 0.2␤-4/3 = -1.(3)␤19/12 = 1.58(3)␤1/97 = 0.(0103092783505154639175257731958​7628865979381443298969072164948453​6082474226804123711340206185567)␤»
16:43 not_gerd the bracket notation is one of several conventional representations if you can't add an overbar
16:48 TimToady sorry, was on phone with two different people
16:49 TimToady yes, I was gonna do overbars, but decided not to after I saw the "repeat 96" on /97
16:50 mucker joined #perl6
16:51 TimToady also because overbars don't actually render right in gnome-terminal yet
16:52 not_gerd what would be a good name for such a method?
16:52 not_gerd digits?
16:52 not_gerd digital?
16:53 spaceships joined #perl6
16:53 sisar n: my $a = 'abc'; my @rray = $a.split(''); say @rray[0]; say @rray[1];
16:53 p6eval niecza v17-4-ge5b869e: OUTPUT«␤a␤»
16:53 sisar r: my $a = 'abc'; my @rray = $a.split(''); say @rray[0]; say @rray[1];
16:53 p6eval rakudo 372e6b: OUTPUT«a␤b␤»
16:53 TimToady
16:54 TimToady hmm, the overbar renders in right in the ir clog, except for not really be over...
16:54 sisar ^^ when i spilt 'abc' with '' as delimiter, the first element is 'a' right?
16:54 masak in Gnome Terminal it also renders on the side.
16:54 TimToady no, there's a '' on the front
16:54 TimToady use .comb to do that
16:55 sisar oh so its a rakudobug ?
16:55 sisar & not nieczabug ?
16:55 TimToady arguably niecza is more consistent with how /''/ would split
16:56 sisar masak: would you be so kind to report this rakudobug?
16:56 TimToady p6: my $a = 'abc'; my @rray = $a.split(/''/); say @rray[0]; say @rray[1];
16:56 p6eval pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.​13.20120203/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** Can't locate P…
16:57 p6eval ..rakudo 372e6b, niecza v17-4-ge5b869e: OUTPUT«␤a␤»
16:57 TimToady they both think there's a null string in that case before the first empty match
16:57 * masak submits rakudobug
16:57 TimToady so I'd argue for consistency, especially when .comb is available
16:57 masak re https://rt.perl.org/rt3/Tic​ket/Display.html?id=112850 -- should this kind of downcasting bless be allowed?
16:58 sisar masak++
17:00 TimToady masak: it seems odd, but I'd like to understand why it doesn't work better before saying it fills a much-needed gap
17:01 masak aye.
17:01 TimToady and what the right way to do whatever it was that it was trying to do...
17:01 masak :)
17:02 PacoAir joined #perl6
17:02 TimToady this is likelier to happen after I wake up, or after jnthn++ opines on the subject, or both...
17:03 birdwind1pbird joined #perl6
17:08 ponbiki joined #perl6
17:10 moritz fwiw if we support it, we should use a different method
17:10 TimToady certainly, it's not cheap to keep a hash entry per digit
17:11 TimToady hmm, my version uses .perl for the key, but maybe an object hash will work now with Rat keys
17:13 TimToady wait, rationals can be enumerated, so we should store them in a sparse array. :D
17:14 not_gerd r: 0.base(2)
17:14 p6eval rakudo 372e6b: OUTPUT«Invalid character in ASCII string␤  in method base at src/gen/CORE.setting:2675␤  in block <anon> at /tmp/tMz4ZKDcIh:1␤␤»
17:14 not_gerd that's actually a bug in libtommath
17:14 masak doesn't the first (non-invocant) positional argument to .bless function as a kind of "backend storage" to the object being blessed? that is, if it's a hash, the hash is used to store the attributes. if it's an opaque repr object, that's used. etc
17:14 * masak submits not_gerd's rakudobug
17:15 masak not_gerd++
17:15 moritz masak: yes
17:16 moritz masak: (re bless)
17:16 moritz masak: that's why I suggested to have a different method
17:16 masak aye.
17:16 TimToady well, the question is what is the interface to the backend, and can 13 reasonably represent something that can supply that interface
17:16 TimToady oh, that's what you were replying to
17:16 * TimToady misunderforstood
17:18 * TimToady thought you were asking about a repeating-digits Rat.Str
17:19 TimToady which should also be a separate method, if supplied
17:20 sisar phenny: tell sorear, re http://irclog.perlgeek.de/​perl6/2012-05-10#i_5573433, turns out it was actually a rakudobug & not a nieczabug :)
17:20 phenny sisar: I'll pass that on when sorear is around.
17:21 Chillance joined #perl6
17:21 shinobicl_ joined #perl6
17:22 * not_gerd needs to shutdown Irssi so he can rebase cygwin, build a parrot and fix his bug...
17:22 not_gerd left #perl6
17:22 flussence .oO( what, he doesn't have dedicated IRC hardware like everyone else? :)
17:24 masak poor fellow.
17:25 sisar .oO ( sarcasm-detected successfully ! yay !)
17:25 plobsing joined #perl6
17:25 masak I was being sarcastic? :)
17:26 sisar :)
17:26 sisar wrong definition of sarcasm :/
17:26 TimToady mē genoito!
17:27 sjn o/
17:27 TimToady well, μὴ γένοιτο really
17:28 masak sjn! \o/
17:28 sisar phenny: "μὴ γένοιτο"
17:28 sisar phenny: "μὴ γένοιτο" en
17:28 TimToady doesn't it need a ?
17:28 masak yes.
17:28 sisar phenny: "μὴ γένοιτο" ?
17:28 masak and no space :P
17:29 masak phenny: "μὴ γένοιτο"?
17:29 phenny masak: "Certainly not!" (el to en, translate.google.com)
17:29 sisar phenny:"μὴ γένοιτο" ?
17:29 masak wrong no space :P
17:29 adu Γνῶθι σεαυτόν
17:29 phenny adu: 13:29Z <[Coke]> tell adu folks in #parrot are interested in your interest in scheme on parrot. (on irc.perl.org)
17:30 adu thanks phenny
17:31 sisar phenny: "μὴ γένοιτο" ?
17:31 sisar phenny: "μὴ γένοιτο"?
17:31 phenny sisar: "Certainly not!" (el to en, translate.google.com)
17:31 TimToady phenny: en el "Know thyself"?
17:31 phenny TimToady: "Γνώθι σ 'αυτόν" (en to el, translate.google.com)
17:31 sisar masak: no space between " and ?
17:31 TimToady he just said that
17:31 masak right.
17:32 KyleHa joined #perl6
17:32 sisar <masak> wrong no space :P
17:32 sisar ^ that ... nevermind :)
17:33 * masak never minds :)
17:33 adu never mind is one of the hardest phrases to translate
17:34 masak a never mind is a terrible thing to waste.
17:34 sisar adu: aye
17:36 Tene adu: I started a scheme on parrot quite a while back; I don't know what your interest is, but feel free to do whatever you'd like with it: https://github.com/tene/steme/
17:36 KyleHa1 joined #perl6
17:37 Tene I'd be rather surprised if it actually worked against modern parrot, though
17:37 adu Tene: thanks, the only other surviving scheme I could find was Eclectus
17:37 adu and it's got some bitrot
17:37 Tene that was dead before I started on steme, I believe.
17:38 adu well, I've already written a scheme, so I'm not really aiming for self-learning, now I'd like to aim for stability and speed
17:40 spider-mario joined #perl6
17:42 TimToady some time we need to think about how to give Pair lists in p6 a bit more of a List API
17:42 adu Tene: I'd like to have two sublanguages, for data and expressions, but when I try and put them in the same .pbc the HLLCompiler complains, any ideas?
17:42 not_gerd joined #perl6
17:42 Tene adu: what's the complaint?
17:43 not_gerd hm.. something went wrong in re-building my rakudo:
17:43 not_gerd elements() not implemented in class 'PMCProxy'
17:43 benabik joined #perl6
17:43 Tene and, can you show me code?
17:43 not_gerd should I apply https://github.com/libtom/libtommath/pull/6 to NQP's copy of libtommath anyway?
17:43 TimToady p6: my $pl = a => b => c => Nil; say $pl.list.perl
17:43 p6eval niecza v17-4-ge5b869e: OUTPUT«("a" => "b" => "c" => Nil, ).list␤»
17:43 p6eval ..rakudo 372e6b: OUTPUT«("a" => "b" => "c" => Nil,).list␤»
17:43 p6eval ..pugs: OUTPUT«*** No such subroutine: "&Nil"␤    at /tmp/Yf0Xt3K7hp line 1, column 25-28␤»
17:44 sorear good * #perl6
17:44 phenny sorear: 17:20Z <sisar> tell sorear re http://irclog.perlgeek.de/​perl6/2012-05-10#i_5573433, turns out it was actually a rakudobug & not a nieczabug :)
17:44 sorear Tene! o/
17:44 Tene sorear: ?
17:44 * TimToady wonders if Pair.list could usefully return an iterator down the conslist
17:44 sorear Tene: long time no see, that is all
17:45 Tene Ah, right, I forget that I don't speak up much in here, although I usually follow the channel pretty actively.
17:45 jnthn not_gerd: Go ahead :)
17:45 sisar .oO( we should have a 'nr' or 'rn' for p6eval, when you want niecza and rakudo but not pugs )
17:45 adu Tene: I don't remember
17:46 TimToady p6-p:
17:46 Tene adu: if you can reproduce it, I'd be glad to investigate.
17:47 sisar p6-p: say "I actually work !"; #checkin'
17:47 noam joined #perl6
17:47 sisar :)
17:48 TimToady moritz: no, 'tough beans' was already an idiom when I was young.
17:48 noam joined #perl6
17:49 dalek nqp: 7e25971 | (Gerhard R)++ | 3rdparty/libtommath/bn_mp_radix_size.c:
17:49 dalek nqp: fix bug in libtommath's mp_radix_size()
17:49 dalek nqp: review: https://github.com/perl6/nqp/commit/7e25971480
17:49 noam joined #perl6
17:49 sisar not_gerd++
17:49 * not_gerd hopes that actually works ;)
17:49 adu Tene: I tried reproducing it, but I'm getting a different error now because I don't have any actions associated with my grammar
17:50 Tene That shouldn't make it impossible to compile; just to run, I'd expect.
17:50 noam joined #perl6
17:50 adu Tene: ya, it runs now, I think it must have been a name clash
17:50 Tene That's what I suspected.
17:51 adu anyways, I was going to call it "dreme"
17:52 Tene I like it.
17:53 adu Tene: or maybe I could fork steme?
17:53 rsimoes joined #perl6
17:53 * not_gerd leaves again to fight with cygwin
17:53 not_gerd left #perl6
17:53 Tene adu: no need to fork; you can take it over.
17:53 adu oh ok
17:53 Tene I haven't done anything with it in years.
17:53 adu 2 according to github
17:55 adu well, I can't promise anything yet, I'm still learning perl6
17:55 Tene adu: I can transfer the repo to you if you'd like, or you could just fork it, or whatever else.  Just let me know if you'd like me to do anything.
17:56 adu right now I'd like to see if I can get a RPL going
17:56 adu if I can do that, then I'd like to fork/transfer but not before
17:57 adu currently my REPL says "Unable to obtain PAST from Regex;Match"
17:58 wolfman2000 joined #perl6
17:58 adu actually, I will probably only use parts of "pct/actions.pm"
17:59 adu anyways, gtg
17:59 mdupont joined #perl6
18:03 noam joined #perl6
18:05 not_gerd joined #perl6
18:05 * not_gerd just built parrot, nqp and rakudo from scratch because he typed perl6 instead of ./perl6
18:05 not_gerd anyway, 0.base(2) now work
18:06 jnthn \o/
18:06 moritz r: say 0.base(2)
18:06 p6eval rakudo 372e6b: OUTPUT«Invalid character in ASCII string␤  in method base at src/gen/CORE.setting:2675␤  in block <anon> at /tmp/NipINQEEcL:1␤␤»
18:06 moritz not_gerd: do you have local patches?
18:07 moritz ah, just saw the patch on #parrot
18:07 not_gerd moritz: nope, already pushed to NQP (jnthn gave to go-ahead)
18:07 moritz not_gerd++
18:07 not_gerd ^the
18:09 moritz not_gerd: I'll submit your patch to upstream
18:09 mdupont_ joined #perl6
18:09 jnthn moritz: I think not_gerd++ already gave them a pull request :)
18:10 moritz oh
18:10 not_gerd moritz: yup - and incidentally, there's a 4 months old one from you still open :(
18:12 moritz not_gerd: I'll pester them on IRC
18:28 fglock joined #perl6
18:28 noam joined #perl6
18:30 noam joined #perl6
18:36 birdwindupbird joined #perl6
18:38 KyleHa joined #perl6
18:39 adu joined #perl6
18:41 colomon joined #perl6
18:45 wolfman2000 joined #perl6
18:49 masak p6: v6;
18:49 p6eval niecza v17-4-ge5b869e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Action method value:version not yet implemented at /tmp/9igT0vMaQs line 1:â�¤------> [32mv6[33mâ��[31m;[0mâ�¤â�¤Unhandled exception: Unable to resolve method statement_level in class Anyâ�¤  at /home/p6eval/niecza/src/NieczaActions…
18:49 p6eval ..rakudo 372e6b: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&v6' called (line 1)␤»
18:49 p6eval ..pugs: OUTPUT«*** No such subroutine: "&v6"␤    at /tmp/rqKNLdbIXi line 1, column 1-3␤»
18:50 masak heh. universal disacclaim.
18:50 moritz anyway, I don't think that a bare v6; should be the same as use v6;
18:51 masak sorear: today I met someone who thought it was pronounced "Niceh Perl 6". almost, but not quite, like "nicer" :)
18:52 moritz masak: you meet people who have heard of niecza? where? how?
18:53 geekosaur (Nietzsche Perl 6?)
18:53 masak moritz: it was a former colleague of mine who was proud that he was following the Planet Perl 6 feed. and apparently the last post I made was about this nicer Perl thingie.
18:54 masak moritz: gives some perspective. this guy is a relatively community-uninvolved Perl 5 user.
18:58 moritz TimToady: are Version objects supposed to be immutable?
18:58 moritz r: say 2 cmp 'a'
18:58 p6eval rakudo 372e6b: OUTPUT«Increase␤»
18:58 sorear I'd be astonished if version objects were mutable in any implementaiton
19:00 TimToady I would think so
19:00 diakopter I pronounce it nee-ehk-zuh in my head; is that wrong?
19:00 TimToady so == immutable
19:00 TimToady cz == ch
19:00 TimToady how do you pronounce Czeck?
19:00 moritz the soft ch like in the Scottish 'loch'?
19:00 TimToady nyet
19:00 diakopter oh
19:01 moritz oh, like the "check"
19:01 TimToady knee-eh-cha in tradition English sound-out-ese
19:02 moritz that's roughly how I pronounce it too :-)
19:02 masak you are correct :)
19:02 TimToady funny that there's no term for sound-out-ese
19:02 sorear I would consider either of those right, and 'nicer' wrong
19:02 TimToady (that I can think of)
19:02 masak TimToady: "poor man's IPA"? :)
19:02 moritz std: v3.3beta
19:02 p6eval std 8632387: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Whitespace is required between alphanumeric tokens at /tmp/vyQnTPxKQg line 1:â�¤------> [32mv3.3[33mâ��[31mbeta[0mâ�¤Two terms in a row at /tmp/vyQnTPxKQg line 1:â�¤------> [32mv3.3[33mâ��[31mbeta[0mâ�¤    expecting any of:â�¤ POSTâ�¤   infix or …
19:02 TimToady it's pretty poor alright
19:02 moritz std: v3.3.0
19:02 p6eval std 8632387: OUTPUT«ok 00:00 40m␤»
19:02 moritz std: v3.3.*
19:02 p6eval std 8632387: OUTPUT«ok 00:00 40m␤»
19:03 masak English orthography does not lend itself very well to sounding out anything, really.
19:03 TimToady std: v3.3.42+
19:03 p6eval std 8632387: OUTPUT«ok 00:00 40m␤»
19:03 TimToady even English
19:03 jnthn Whenever I see IPA, I parse it as Indian Pale Ale, and then get confused, and then realize...oh yeah...the other IPA.
19:03 * TimToady keeps wishing there were an offical IPA block in Unicode...
19:04 TimToady except IPA is a mishmash of everything else
19:04 cognominal_ joined #perl6
19:04 moritz and where's the official IRA block? :-)
19:04 TimToady that wasn't a rho
19:05 TimToady or an er, if your name is Cyril
19:06 TimToady H & R Block might provide IRAs to USians...
19:07 alester joined #perl6
19:07 sorear When I see IRA, I always parse it initially as Irish Republican Army
19:08 moritz is v1.1 ~~ v0+
19:08 sorear also, I have tried and failed repeatedly to learn how IPA works
19:08 cognominal joined #perl6
19:08 sorear it seems like something I need to learn eventually, bhut it just isn't happening :|
19:09 moritz sorear: re IRA, that's what I meant :-)
19:09 TimToady well, you really can't learn it independently of a phonetics instructor, if you don't know how to make the sounds
19:09 noam joined #perl6
19:10 * TimToady demonstrates an interlabial lateral (known from a tribe in New Guinea)
19:12 TimToady and to learn phonetics you have to spend an inordinate amount of time "unlearning" your mother tongue
19:13 TimToady "inordinate" is a funny word :)
19:13 cognominal joined #perl6
19:14 masak r: v6;
19:14 p6eval rakudo 372e6b: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&v6' called (line 1)␤»
19:15 moritz std: v6.3_5
19:15 p6eval std 8632387: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Whitespace is required between alphanumeric tokens at /tmp/LzeUOUnEe3 line 1:â�¤------> [32mv6.3[33mâ��[31m_5[0mâ�¤Two terms in a row at /tmp/LzeUOUnEe3 line 1:â�¤------> [32mv6.3[33mâ��[31m_5[0mâ�¤    expecting any of:â�¤     POSTâ�¤   infix or meta…
19:16 cognominal joined #perl6
19:16 moritz should probably parse  <decint> | '*'
19:18 cognominal_ joined #perl6
19:22 noam joined #perl6
19:22 moritz r: my $a = *; my $b = *; say $a === $b;
19:22 p6eval rakudo 372e6b: OUTPUT«False␤»
19:24 masak meh. whatevers.
19:26 noam joined #perl6
19:29 fibo joined #perl6
19:29 moritz I have local patch for Version. It's so not going to work :-)
19:29 fibo left #perl6
19:29 fibo joined #perl6
19:30 masak well, write wrong code first ;)
19:32 sorear n: my $a = *; my $b = *; say $a === $b;
19:32 p6eval niecza v17-4-ge5b869e: OUTPUT«True␤»
19:32 sorear this is an optimization leaking out
19:32 sorear is it a problem?
19:33 moritz I don't thikn so
19:33 moritz I don't see a value in having multiple Whatever instances
19:33 moritz n: my $a = *; my $b = *; say $a ~~ $b;
19:33 p6eval niecza v17-4-ge5b869e: OUTPUT«True␤»
19:33 moritz r: my $a = *; my $b = *; say $a ~~ $b;
19:33 p6eval rakudo 372e6b: OUTPUT«True␤»
19:33 moritz p6: say 'whatever' ~~ (my $x = *)
19:33 p6eval niecza v17-4-ge5b869e: OUTPUT«Potential difficulties:â�¤  $x is declared but not used at /tmp/3c0MZz65EF line 1:â�¤------> [32msay 'whatever' ~~ (my [33mâ��[31m$x = *)[0mâ�¤â�¤Trueâ�¤Â»
19:33 p6eval ..rakudo 372e6b: OUTPUT«True␤»
19:33 p6eval ..pugs: OUTPUT«␤»
19:38 jnthn Rakudo should prolly do the same optimization Niecza does ;)
19:39 moritz jnthn: I want to call a rakudo-space method (Version.new) with an RPA interpolated into the argument list
19:40 moritz ie $type.new(|@rpa)
19:40 moritz from NQP, that is
19:40 moritz how do I do that?
19:40 moritz I get
19:40 moritz Method 'list' not found for invocant of class 'ResizablePMCArray'
19:40 moritz (at least I think that's the problem, not 100% sure yet)
19:41 moritz oh wait, I might be wrong
19:41 moritz the problem is probably my stupidity :-)
19:41 moritz I did
19:41 moritz for @($<vnum>) -> $v { }
19:42 moritz but $<vnum> already is an RPA
19:43 moritz now I'm curious if we get through the setting :-)
19:43 moritz otoh there is no version literal in the setting -- why should it blow up while compiling the setting?
19:44 moritz ouch
19:44 moritz because version literals LTM-win against the sub call v6-split(...);
19:45 moritz even though I wrote it as    token version { 'v' { } ... }
19:45 moritz so only the 'v' should LTM
19:45 moritz meh, stupid nqp
19:50 masak nqp doesn't have '::'?
19:50 moritz nqp: say('ab' ~~ /a::b/)
19:50 p6eval nqp: OUTPUT«:: not yet implemented at line 1, near "b/)"␤current instr.: 'nqp;HLL;Grammar;panic' pc 22008 (src/stage2/gen/NQPHLL.pir:7047) (src/stage2/gen/NQPHLL.pm:329)␤»
19:50 masak dang.
19:53 cognominal joined #perl6
19:57 colomon Is there a nice way to make a link from one spot in the specs to another?
20:02 jnthn moritz: Even the "v" LTM-ing is a longer literal prefix than the totally illiteral sub call v6-split
20:04 colomon TimToady: ping?
20:05 colomon TimToady: errr, unping?
20:10 NamelessTee joined #perl6
20:14 [Coke] r: loop { my $a = * }
20:14 p6eval rakudo 372e6b: OUTPUT«(timeout)»
20:14 shinobicl_ joined #perl6
20:16 havenn joined #perl6
20:18 masak [Coke]: yeah, but at the end of that loop, $a is *really* Whatever!
20:18 * [Coke] was just seeing if we got some sort of explosion.
20:19 masak phenny: "Äddi"?
20:19 phenny masak: "additive" (sv to en, translate.google.com)
20:19 masak what? no!
20:19 [Coke] r: "masak reports rakudobugs".comb.pick.join.say
20:19 p6eval rakudo 372e6b: OUTPUT«u␤»
20:19 [Coke] r: "masak reports rakudobugs".comb.pick(*).join.say
20:19 p6eval rakudo 372e6b: OUTPUT«dpmrkero utgsabsauokr as␤»
20:19 masak dpmrkero! \o/
20:20 masak utgsabsauokr. as.
20:20 snearch joined #perl6
20:20 cognominal_ joined #perl6
20:21 masak r: sub shuffle($_) { .pick(*) }; say "coke summarizes spectest runs".comb.&shuffle.join
20:21 p6eval rakudo 372e6b: OUTPUT«i ee cuuroskpstsamctersnz sme␤»
20:22 masak in other news, I vote for &shuffle ==> CORE
20:22 masak well, and .shuffle ;)
20:22 masak .=shuffle reads better than .=pick(*)
20:24 colomon n: say 3141592653589793238/1000000000000000000.nude
20:24 p6eval niecza v17-4-ge5b869e: OUTPUT«Unhandled exception: Unable to resolve method nude in class Int␤  at /tmp/f7hGSEEiMe line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3842 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3843 (module-CORE @ 65) ␤  at /home/p6…
20:24 colomon n: say (3141592653589793238/1000000000000000000).nude
20:24 p6eval niecza v17-4-ge5b869e: OUTPUT«1570796326794896619 500000000000000000␤»
20:24 plobsing joined #perl6
20:30 dalek specs: 1cbef9e | (Solomon Foster)++ | S (2 files):
20:30 dalek specs: Try to make the rules and examples for Rat.perl, Rat.gist, and Rat.Str consistent.
20:30 dalek specs: review: https://github.com/perl6/specs/commit/1cbef9e02c
20:30 colomon TimToady++: would deeply appreciate it if you'd look over that commit and see if it matches what you are thinking.
20:31 orphu joined #perl6
20:33 TimToady .oO(Ints are already half nude...)
20:36 [Coke] r: say pi.comb
20:36 p6eval rakudo 372e6b: OUTPUT«3 . 1 4 1 5 9 2 6 5 3 9 4 2 4 8␤»
20:37 [Coke] r: say pi.comb.pick(*).join # close enough!
20:37 p6eval rakudo 372e6b: OUTPUT«1418423395456.92␤»
20:39 cognominal joined #perl6
20:41 TimToady colomon: the first diff is a bit inaccurate; the rounding off has nothing to do with the repeating element; it's determined only by the size of the denominator after the integer part is subtracted.
20:42 TimToady the only think it has to do with the repeating part is that it rounds if and only if there would be a repeating fraction
20:43 TimToady the rest looks good
20:44 noam joined #perl6
20:45 cognominal_ joined #perl6
20:46 TimToady well, plus the min 6 digits rule
20:46 TimToady r: say 1/97
20:46 p6eval rakudo 372e6b: OUTPUT«0.010309␤»
20:47 TimToady that actually repeats after 96 digits
20:47 TimToady r: say 1/97000000
20:47 p6eval rakudo 372e6b: OUTPUT«0.000000010␤»
20:49 lichtkind joined #perl6
20:49 colomon Actually, it rounds off if and only if it is not exactly expressible as a finite decimal, right?
20:50 spaceships joined #perl6
20:50 TimToady didn't I just say that?
20:50 TimToady only inside out?
20:50 colomon you said repeating fraction
20:50 colomon oh, right
20:50 TimToady not exactly expressible == would be repeating
20:51 colomon right, because these are rational
20:51 colomon TimToady++
20:51 colomon errr, doesn't that make the text I have correct?  I mean, I could add "finite" before "exact decimal"
20:51 colomon ...
20:52 TimToady it doesn't calculating the rounding position based on the repeating position
20:52 TimToady *ate
20:52 TimToady "and rounds off the repeating decimal" seems to suggest that
20:53 TimToady depending on how you read it
20:53 TimToady I can see how it is meant the other way
20:53 NamelessTee joined #perl6
20:53 TimToady it's just ambiguous
20:53 colomon fair enough
20:54 colomon is there a way to make a proper link to S32 there?
20:54 TimToady and it doesn't say how it does choose where to round off
20:54 colomon TimToady: I was trying to avoid repeating all the rules in S32.  :)
20:55 TimToady I usually go to the html page and steal from the table of contents for those pages...
20:55 TimToady oh, you mean a proper pod link
20:55 * TimToady doesn't know
20:55 colomon yes
20:55 colomon drat
20:56 TimToady everything wants to be rewritten in Pod 6 anyway...
20:56 lestrrat joined #perl6
20:56 TimToady s/in Pod 6/ / too
20:57 pyrimidine left #perl6
20:57 TimToady and the whole thing could use a reorganization as well
21:00 colomon "Stringifying a rational via C<.gist>
21:00 colomon or C<.Str> returns an exact decimal number if possible, and otherwise rounds
21:00 colomon off the repeated decimal based on the number of digits in the fractional
21:00 colomon part of numerator." ?
21:06 TimToady no, the denominstor
21:06 TimToady and it's only the residual denominator after the integer part has been removed and the rat renormalized
21:07 TimToady maybe that's the same
21:08 adu joined #perl6
21:09 TimToady I guess by definition the integer part will be some multiple of the original denominator, so subtracting it out will never cause reduction of the remainder
21:09 TimToady anyway, we can just say "based on the size of the denominator"
21:11 fgomez joined #perl6
21:12 colomon Done
21:13 dalek specs: a424107 | (Solomon Foster)++ | S02-bits.pod:
21:13 dalek specs: Incorporate TimToady++'s suggestions.
21:13 dalek specs: review: https://github.com/perl6/specs/commit/a424107c47
21:16 TimToady colomon++
21:16 sisar joined #perl6
21:31 masak 'night, #perl6
21:32 sorear bye
21:33 jnthn wtf
21:33 jnthn The NQP build fails. :/
21:34 jnthn nqplexinfo.obj : error LNK2001: unresolved external symbol Parrot_x_panic_and_exit
21:34 jnthn src\pmc\nqp_group.dll : fatal error LNK1120: 1 unresolved externals
21:34 jnthn .oO( shoudn't that be x_Parrot :P )
21:38 dalek tablets: 0191646 | (Herbert Breunung)++ | docs/appendix- (2 files):
21:38 dalek tablets: minor linkfixes and expanded on callframe methods
21:38 dalek tablets: review: https://github.com/perl6/tablets/commit/01916462db
21:44 Chillance joined #perl6
21:44 adu joined #perl6
21:44 dalek nqp: 9ddfc35 | jnthn++ | tools/build/PARROT_REVISION:
21:45 dalek nqp: Bump to a Parrot that builds on MSVC.
21:45 dalek nqp: review: https://github.com/perl6/nqp/commit/9ddfc35ddd
21:46 dalek rakudo/nom: 6c6056d | jnthn++ | tools/build/NQP_REVISION:
21:46 dalek rakudo/nom: Bump to get MSVC Parrot build fix and the libtommath radix fix.
21:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6c6056d0e3
21:50 NamelessTee joined #perl6
21:51 jnthn What's the difference - if any - between <|w> and <wb> ?
21:56 PerlJam I don't think there is one
21:57 PacoAir joined #perl6
21:58 cognominal___ joined #perl6
22:08 cognominal joined #perl6
22:09 fgomez joined #perl6
22:21 cognominal joined #perl6
22:26 Tene joined #perl6
22:26 Tene joined #perl6
22:31 dalek rakudo/nom: cc71885 | jnthn++ | src/Perl6/ (2 files):
22:31 dalek rakudo/nom: Implement < a b c > syntax in regexes. Note that it doesn't do LTM yet; it'll get it automatically once alternations start to do so.
22:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cc7188553a
22:38 jnthn std: / <|> /
22:38 p6eval std 8632387: OUTPUT«ok 00:00 41m␤»
22:38 * jnthn wonders what that one means :)
22:39 skids joined #perl6
22:41 plobsing joined #perl6
22:45 sorear jnthn: semantic error
22:46 jnthn sorear: ?
22:46 sorear jnthn: what follows <|> is a name of a boundary type; these are currently limited to b, w, and g, iirc
22:46 jnthn sorear: Yeah, STD very deliberately parses <|> as well as <|foo> though.
22:46 jnthn n: /<|>/
22:46 p6eval niecza v17-4-ge5b869e: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unrecognized regex assertion at /tmp/UQkF28jC5x line 1:â�¤------> [32m/<[33mâ��[31m|>/[0mâ�¤â�¤Parse failedâ�¤â�¤Â»
22:49 havenn joined #perl6
22:53 dalek roast: e53b228 | jnthn++ | S05-metasyntax/angle-brackets.t:
22:53 dalek roast: Correct misunderstanding of the spec in the tests. Unfudging for Rakudo.
22:53 dalek roast: review: https://github.com/perl6/roast/commit/e53b228779
22:53 sorear jnthn: I have expressed the opinion in the past that that is a bug in STD.
22:53 * sorear pokes TimToady
22:54 jnthn sorear: Inclined to agree.
23:16 shinobicl joined #perl6
23:18 carlin_ joined #perl6
23:19 dalek tablets: 0c0d226 | (Herbert Breunung)++ | docs/appendix- (2 files):
23:19 dalek tablets: explain and link precedence
23:19 dalek tablets: review: https://github.com/perl6/tablets/commit/0c0d226653
23:23 cognominal_ joined #perl6
23:29 lichtkind gud night
23:37 constantined left #perl6
23:49 fibo joined #perl6
23:57 whiteknight joined #perl6

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs