Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-01-30

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
23:00 TimToady and the hallmark of it is strict one-pass parsing; TTIAR comes in a distant second
23:01 TimToady one should easily be able to write a macro that defeats the TTIAR rule for an expression, but we don't allow macros to backup and reparse the input differently
23:01 TimToady AST rewriting is the limit for left-hand material
23:02 TimToady so a macro infix can parse its RHS funny, but not its LHS
23:02 timotimo hmm. that seems like a logical conclusion to one-pass-parsing
23:02 timotimo but a macro infix should still be able to do funny stuff with the parse result of the LHS
23:02 timotimo at the very least thunk it, like you mentioned above
23:02 TimToady sure, like thunkify it
23:02 TimToady yes
23:03 timotimo that seems like a high-wattage example :)
23:03 timotimo .o( thunkify, brotha! )
23:04 TimToady however, I'll note that R&& and friends are still going to surprise people reading LTR
23:04 TimToady one-pass is also useful for preventing confusion in the reader
23:04 timotimo aye
23:05 TimToady "Oh, gee, there's an assignment to this variable, it must be a declaration."
23:05 * TimToady glares at Ruby and such
23:06 timotimo since i started doing perl6, i've become annoyed by languages that don't have an equivalent of "my"
23:07 timotimo gnite o/
23:07 TimToady o/
23:08 lue timotimo: same, though at least in C/C++ you have to prefix it with a type, so that's kind of a 'my' :)
23:10 TimToady then there's Go
23:11 segomos_ TTIAR?
23:12 TimToady two terms in a row
23:12 TimToady p: 42 "hike"
23:12 camelia rakudo-parrot 04c4fb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/kY7Q_lgd67â�¤Two terms in a rowâ�¤at /tmp/kY7Q_lgd67:1â�¤------> [32m42 [33mâ��[31m"hike"[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or meta-infixâ�¤ …»
23:12 TimToady the way in which P6 code is self-clocking
23:13 lue TimToady: I'm less enthused about languages that require imports for basic things, of which Go somehow feels worse than usual.
23:13 TimToady well, that's just reductionism/minimalism rearing one of its ugly heads
23:14 TimToady human languages are never minimalistic
23:14 lue I've gotten over how C++ does it, at least :)
23:14 TimToady Easiest way to get over how language X does something is to get over language X.
23:15 TimToady (for non-extensible languages)
23:16 lue I'm taking that Go tour to reacquaint myself with it a bit.    "Notice that the type comes after the variable name."    this feels like they were trying too hard to be different.
23:18 berekuk joined #perl6
23:21 raiph joined #perl6
23:22 Sqirrel joined #perl6
23:28 stevan_ joined #perl6
23:32 berekuk joined #perl6
23:41 xinming_ joined #perl6
23:46 psch m: enum foo <bar baz>; bar.^mro.say; Int.^mro.say; True.^mro.say; # this is what RT #72580 comes down to, isn't it?
23:46 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=72580
23:46 camelia rakudo-moar 04c4fb: OUTPUT«(foo) (Int) (Cool) (Any) (Mu)␤(Int) (Cool) (Any) (Mu)␤(Bool) (Cool) (Any) (Mu)␤»
23:46 psch of note, enum resolves via Int to Cool, Bool doesn't it (but should?)
23:47 psch -it
23:48 berekuk joined #perl6
00:01 TimToady added some explanation for the beauty of the Perl 6 entry on http://rosettacode.org/wiki/Brace_expansion lest anyone's eyes glaze over
00:03 TimToady psch: yes, but there may be some bootstrapping issues; rakudo has to use a big circularity saw at that spot, and might have difficulty making it look unsawn there
00:04 TimToady because Bool has to be defined very early in the setting
00:07 psch okay, i guess i have to look much closer at this to get there
00:07 psch the HOW for Bool gets Cool via add_parent, but there's nothing later on to put it below Int, which seems to be what's missing for the ticket
00:09 btyler_ joined #perl6
00:16 jnthn Well, just 'cus there's a ticket after it doesn't automatically mean the spec agrees...
00:16 dalek specs: 27b8a23 | larry++ | S99-glossary.pod:
00:16 dalek specs: define "circularity saw" and "biab"
00:16 dalek specs: review: https://github.com/perl6/specs/commit/27b8a233c8
00:17 psch jnthn: right, is there anything specced wrt Bool smartmatching against type objects?
00:18 jnthn .oO( I need to fetch my circularity saw, biab... )
00:18 jnthn psch: I can't think of a bit of the spec that says Bool ~~ Int should be true, off hand...
00:18 psch niecza thinks it should work at least
00:18 psch n: say  True ~~ Int
00:18 camelia niecza v24-109-g48a8de3: OUTPUT«True␤»
00:19 psch the ticket implies Bool is specced as an Enum
00:20 psch similary does http://doc.perl6.org/type/Bool by calling it 'enum Bool'
00:20 psch although i guess none of those are set in stone
00:21 TimToady the intent is for Bool to behave like enum Bool <False True> to the extent we can hide the circularity saw
00:22 TimToady m: enum Boul <Fals Tru>; say False ~~ Int
00:22 camelia rakudo-moar 04c4fb: OUTPUT«False␤»
00:22 TimToady m: enum Boul <Fals Tru>; say Fals ~~ Int
00:22 camelia rakudo-moar 04c4fb: OUTPUT«True␤»
00:23 TimToady hopefully that can be fixed at some point, but I'm sure there's a thing or two that is higher on jnthn++'s list :)
00:26 psch right, i probably should get into the habit of asking for reasonably-important-but-not-overly-difficult things i could look at instead of jumping at random tickets :)
00:27 jnthn At the moment, trying to hack something up for my FOSDEM talk is fairly high... :)
00:28 TimToady Bool is defined as an enum at http://perlcabal.org/syn/S12​.html#Built-in_Enumerations
00:29 TimToady course, it's tainted by being in proximity to the Taint enum...
00:34 TimToady and the Intness of a (non-string) enum is specced at http://perlcabal.org/syn/S12.html#Value_Generation
00:41 psch so there should be the role Boolean somewhere? rakudo doesnt do that at the moment, but lets built-in types declare .Bool themselves
00:42 psch unless that's just an example to illustrate how it behaves
00:43 TimToady that bit of the spec is perhaps more handwavey; if no use case arises for a Boolean role, there's little need to introduce one
00:46 psch i see
00:46 psch thanks for the explanations
00:58 psch anyway, sleep o/
01:05 araujo joined #perl6
01:16 TimToady http://rosettacode.org/wiki/Memory​_layout_of_a_data_structure#Perl_6 in order to stay 4 solutions ahead of J :)
01:25 jnap joined #perl6
01:26 jnthn sleep time...'night o/
01:27 TimToady o/
01:27 colomon \o
01:27 skids joined #perl6
01:28 skids o/
01:29 TimToady o/⋯⋯⋯\o   <-- incipient kendou battle
01:30 TimToady o_/⋯⋯⋯\_o   <-- well, more like this
01:45 stevan_ joined #perl6
01:53 clsn MONKEY_TYPING doesn't really type the monkeys.  Or generally adding a method (with ^add_method or something) to a class doesn't propagate it to the child classes, because classes build a method cache at compose time or something.  Hmm.
01:59 diakopter I always envision MONKEY_TYPING meaning "enable genetic algorithm on my code to evolve improvement by random mutation"
02:00 diakopter million monkeys and all
02:01 colomon diakopter: what it should really do is toss the problem to #perl6
02:01 colomon a million monkeys are probably less effective than 20 #perl6ers.  ;)
02:01 diakopter well no that's MONKEY_FLOOD
02:02 diakopter use MONKEY_TYPOS;
02:16 TimToady clsn: that augmenting does not invalidate the cache is a known problem, I believe
02:16 TimToady and I think it would be BARREL_OF_MONKEYS here
02:16 TimToady or MONKEY_SPEC_MONKEY_DO
02:16 clsn Probably.  I suppose it isn't particularly hard to expect, given that we use a cache.
02:17 TimToady it's said that there are only two difficult problems in CS; off-by-one errors, and cache coherence
02:17 TimToady but those are really the same error
02:17 TimToady caches are inherently off-by-one
02:18 clsn Thing is, how do you go invalidating the cache?  Parent classes/roles don't know their derivatives, do they?  So they can't tell them.  And checking at method-call time defeats the purpose of a cache (though checking is faster than rebuilding a cache).
02:19 TimToady well, you can do like P5 does and invalidate *all* the caches
02:19 TimToady that's pretty easy with a generation counter
02:20 clsn I suppose there are worse plans.  Or if you're already going to search through everything, go through ALL the classes and find the descendants, maybe.
02:21 TimToady well, you can notice your generation changed, then do a quick check to see if you need to do more work than just up your own generation counter
02:21 clsn Yeah.
02:23 colomon joined #perl6
02:24 TimToady leg-o'lamb &
02:25 [Coke] (generation counter) tcl uses that to track if builtins have been overridden.
02:25 jnap joined #perl6
02:33 konnjuta joined #perl6
02:33 konnjuta how to turn off strict and warnings in rakudo?
02:44 colomon konnjuta: as far as I know we don't support that yet.
02:44 * colomon has frequently been wrong, mind you.
02:44 konnjuta thanks
02:49 stevan_ joined #perl6
02:50 dayangkun_ joined #perl6
03:03 jercos Ahahah, when I originally saw the nude method for Rats, I sorta assumed it meant that you were seeing the rational seperated from its clothing, i.e., "in the nude", rather than the NUmerator and DEnominator :D
03:04 jercos I guess technically either one fits, but I now strongly suspect the latter is the original intent.
03:07 clsn jercos: That's what I assumed too.
03:09 colomon things like that from TimToady, you should probably assume both meanings were there from the start.  ;)
03:14 TimToady almost certainly :)
03:16 TimToady you can't be a good language designer if you don't know how to make things serve multiple purposes simultaneously
03:19 btyler joined #perl6
03:20 BenGoldberg n: say <6/9>.nude
03:20 camelia niecza v24-109-g48a8de3: OUTPUT«2 3␤»
03:22 bjz joined #perl6
03:24 * clsn thinks (elem) (and ∈, and I guess (cont) and ∋) should be defined so that if it's a range, it works like ~~.  That is, 6.1 ∈ 6..8 (which is currently not the case).  So there.
03:26 jnap joined #perl6
03:28 colomon clsn: it's an interesting question.  I've pondered a bit what it would take to support more procedural sets.
03:28 TimToady what if you wanted a set of ranges?
03:29 clsn Ranges behave like mathematical intervals (when they're not behaving like lists), so it just seemed natural.
03:29 clsn I guess something like that could be asked about a lot of "smart" operators.
03:30 TimToady Mäsak's Law: For every DWIM, there's a corresponding WAT.
03:31 colomon masak++
03:32 clsn Besides, if it's a set of ranges, the range will be on the left, not the right.
03:33 clsn Mäsak's point is a good one.
03:35 TimToady but see also http://rosettacode.org/wiki​/Set_of_real_numbers#Perl_6
03:38 TimToady otoh, it's not clear when someone writes 0..^10 whether they mean a set of integers or a set of reals, it's kind of ambiguous in P6
03:38 TimToady hence a type that is explicitly real intervals
03:38 cognominal joined #perl6
03:38 clsn 0...^10 is explicitly integers.  0..^10 behaves like an interval wrt smart-matching anyway.
03:39 TimToady yes, it's intentionally ambiguous, but if you overload it too much, your DWIM turns to WAT
03:40 TimToady forcing people to write all their slices with ... rather than .. is construed to be a pain in the nether regious
03:41 TimToady so if you want, you can use the IvSet and define ∈, and then there's no ambiguity
03:41 colomon module?
03:41 TimToady but this is opening a can of worms, for all the sets that's are defined by rule rather than enumeration
03:41 TimToady those sets are defined via 'subset' currently
03:42 TimToady and we don't attempt to do set theory with 'em, much
03:44 TimToady we're not really trying to turn P6 into a symbolic math engine
03:45 clsn <TimToady> forcing people to write all their slices with ... rather than .. is construed to be a pain in the nether regious -- I guess for historical reasons?  After all, a slice really is an index that's a list, why shouldn't it be ... ?
03:45 TimToady it can be ... as well as ..
03:45 colomon TimToady: I think we need to keep subset clearly distinct, for sure.
03:45 TimToady but there's a lot of integer history for .. in Perlland
03:46 TimToady .. is one of those semi-allomorphic beasties you get in Perl that tries to be a little dwimmy, at the expense of not generalizing completely in any one direciton
03:47 TimToady ... is much more specificly generalizable :)
03:48 TimToady so yeah, .. is just an interval, until you use it in a list, and then it biases toward something discrete
03:48 clsn That's the thing; .. is ambiguous.  ... we know is integers, but .. we're treating a little like this and a little like that.  I guess I see it leaning a little farther toward that.  6.1 ∉ 5..7 seems strange.
03:49 TimToady well, surely you should write things like [5..7) instead :P
03:49 clsn I figure if it's not being a list, it's being an interval.  The question is which is it when it's on the right of ∈.  The operator makes sense either way, with different results.
03:49 clsn Well, we know P6 has its own notation, using ^.. instead of (], etc.
03:50 TimToady yeah, I'm not arguing strongly here
03:51 TimToady but if we did that, we'd certainly have to make it a different type so that the dispatch happens correctly
03:51 clsn You mean, make a new type of Interval distinct from Range?
03:51 TimToady or that the dwim doesn't have to be mediated by Set each time
03:52 TimToady no, a new type of Set, like IvSet, which the dwimmer for not having a set on the right of ∈ would target
03:52 TimToady or RealSet, or whatever we'd call it
03:53 TimToady but the demand for the feature as a built-in is not high
03:53 TimToady as colomon says, probably a module
03:53 TimToady or at minimum something that demand loads the defs
03:53 clsn Considering Ranges are always Numeric (probably should be Real; what does (3+2i)..(9-6i) mean?), we can be pretty detailed regarding the params of the multi dispatch to catch the cases in question (I'm here still assuming using Range).
03:54 TimToady r: say "a".."z"
03:54 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«"a".."z"␤»
03:54 clsn Oops, forgot, good point.
03:54 TimToady r: print "a".."z"
03:54 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«abcdefghijklmnopqrstuvwxyz»
03:54 clsn I suppose I should say that interval-type ranges (the ones that match as intervals with ~~) are always numeric.
03:54 TimToady course in P5 .. was overloaded with flipflop semantics
03:56 clsn multi sub:<∈> (Numeric $n, Range $range) { ... } would home in on just the cases in question pretty well.  Something for the module/defs.
03:56 TimToady as long as nobody else added a conflicting multi
03:57 clsn That's always true.
03:57 TimToady but it should beat out the Any,Any dwims that Set provides
03:57 clsn Right.  And properly lose to other kinds of ∈-matching.
03:58 TimToady anyway, as you can see from the RC entry (which I wrote), it has certainly been thunk about
03:58 jeffreykegler joined #perl6
03:59 TimToady by and large, P6 has moved in the direction of less dwimmy ops, with certain key exceptions
03:59 TimToady notably ~~
03:59 thou joined #perl6
03:59 TimToady and .. is differently dwimmy from P5
03:59 clsn As you said, .. was overloaded in various ways in P5.
04:00 TimToady and even if we define ∈, I suspect most folks find it easier to type ~~
04:01 clsn True, though ∈ looks better.  Just seemed weird when I found it wasn't true that 6.1∈5..7.  Most people will use ~~ for a lot of things, which is sort of the point.
04:01 TimToady modules will happen, and somedoay some of them will become standard
04:01 TimToady *day
04:08 konnjuta r: say "A" .. "z"
04:08 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«"A".."z"␤»
04:08 konnjuta r: say "A".."z"
04:08 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«"A".."z"␤»
04:08 konnjuta r: say "a".."Z"
04:08 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«"a".."Z"␤»
04:10 clsn r: sub circumfix:<[ )> ([$a, $b]) { $a ..^ $b }; say [3,6)
04:10 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«3..^6␤»
04:10 clsn Heh. :)
04:12 TimToady congratulations, you just destroyed the array composer :)
04:12 TimToady good thing you didn't destroy parenthesized expressions...
04:13 konnjuta r: print ":".."~"
04:13 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY​Z[\]^_`abcdefghijklmnopqrstuvwxyz{|}~»
04:13 clsn Yeah, that would come next.  I'm pleased the unbalanced brackets didn't break things.  I mean, more than usual.
04:14 TimToady r: sub circumfix:<[ )> ([$a, $b]) { $a ..^ $b }; say [1,2,3,4,5]
04:14 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Unable to parse expression in circumfix:sym<[ )>; couldn't find final $stopper �at /tmp/tmpfile:1�------> [32m([$a, $b]) { $a ..^ $b }; say [1…»
04:14 TimToady ooh, interpolation failure :)
04:14 konnjuta r: print "\x3A"..\x7E"
04:14 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Two terms in a rowâ�¤at /tmp/tmpfile:1â�¤------> [32mprint "\x3A"..\x7E[33mâ��[31m"[0mâ�¤    expecting any of:â�¤        argument listâ�¤      â€¦Â»
04:14 lue Yeah, I've occasionally wondered about 4..6 being an implicitly integer thing myself. But it's not too hard to deal with (there's ... for less discrete things after all)
04:14 konnjuta r: print "\x3A".."\x7E"
04:14 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY​Z[\]^_`abcdefghijklmnopqrstuvwxyz{|}~»
04:15 clsn lue: on the contrary, ... is for discrete things.
04:15 konnjuta r: print "x3A".."x7E"
04:15 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«x3Ax3Bx3Cx3Dx3Ex3Fx3Gx3Hx3Ix3Jx3Kx3Lx3​Mx3Nx3Ox3Px3Qx3Rx3Sx3Tx3Ux3Vx3Wx3Xx3Yx3Zx4Ax4​Bx4Cx4Dx4Ex4Fx4Gx4Hx4Ix4Jx4Kx4Lx4Mx4Nx4Ox4Px4​Qx4Rx4Sx4Tx4Ux4Vx4Wx4Xx4Yx4Zx5Ax5Bx5Cx5Dx5Ex5​Fx5Gx5Hx5Ix5Jx5Kx5Lx5Mx5Nx5Ox5Px5Qx5Rx5Sx5…»
04:15 lue clsn: perhaps s/less discrete/higher resolution/
04:15 konnjuta r: print "x0".."x7F"
04:16 lue (decimals have greater resolution/precision/* than integers. .. for integers only, ... does decimals too)
04:16 konnjuta r: print "\x0".."\x7F"
04:16 TimToady but it doesn't do all of them
04:16 lue r: sub circumfix:<[ [> ([$a, $b]) { $a ..^ $b }; say [3,6[ # for the non-US out there :)
04:16 camelia rakudo-moar 04c4fb: OUTPUT«(timeout)x0x1x2x3x4x5x6x7x8x9y0y1y2y3y​4y5y6y7y8y9z0z1z2z3z4z5z6z7z8z9aa0aa1aa2aa3aa​4aa5aa6aa7aa8aa9ab0ab1ab2ab3ab4ab5ab6ab7ab8ab​9ac0ac1ac2ac3ac4ac5ac6ac7ac8ac9ad0ad1ad2ad3ad​4ad5ad6ad7ad8ad9ae0ae1ae2ae3ae4ae5ae6ae7ae8ae​9af0af1af2af3af4af5af6af7af8af9ag0ag1a…»
04:16 camelia ..rakudo-jvm 04c4fb: OUTPUT«(timeout)x0x1x2x3x4x5x6x7x8x9y0y1y2y3y​4y5y6y7y8y9z0z1z2z3z4z5z6z7z8z9aa0aa1aa2aa3aa​4aa5aa6aa7aa8aa9ab0ab1ab2ab3ab4ab5ab6ab7ab8ab​9ac0ac1ac2ac3ac4ac5ac6ac7ac8ac9ad0ad1ad2ad3ad​4ad5ad6ad7ad8ad9ae0ae1ae2ae3ae4ae5ae6ae7ae8ae​9af0af1af2af3af4af5af6af7af8af9ag0ag1ag…»
04:16 camelia ..rakudo-parrot 04c4fb: OUTPUT«(timeout)x0x1x2x3x4x5x6x7x8x9y0y1y2y3​y4y5y6y7y8y9z0z1z2z3z4z5z6z7z8z9aa0aa1aa2aa3​aa4aa5aa6aa7aa8aa9ab0ab1ab2ab3ab4ab5ab6ab7ab​8ab9ac0ac1ac2ac3ac4ac5ac6ac7ac8ac9ad0ad1ad2a​d3ad4ad5ad6ad7ad8ad9ae0ae1ae2ae3ae4ae5ae6ae7​ae8ae9af0af1af2af3af4af5af6af7af8af9ag0ag…»
04:16 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Unable to parse expression in subscript; couldn't find final ']' �at /tmp/tmpfile:1�------> [32m say [3,6[ # for the non-US out there :)[33m…»
04:17 clsn lue: Ah, I see what you mean.  But it's still just a list, not a "range"
04:18 lue clsn: I think I was too attached in my image of various sets of numbers as being on continuum of relative discreteness :P
04:18 clsn Ah.  So they're discretely continuous.  Or something.
04:18 * TimToady sprinkles some cantor dust
04:20 * TimToady tries to make a pun on floaters...
04:20 lue .oO(dear math(s): there's a reason almost no programming language does the []/[)/(]/() thing (doubly so for []/[[/]]/][). Please update your notation to preserve and/or restore peoples' sanity.)
04:22 * lue ponders a Math::HyperReal module...
04:22 TimToady .oO(dear ASCII: please include a lot more brackets, includes ones only for the mathematicians)
04:23 lue r: sub circumfix:<⟦ ⟦> ([$a, $b]) { $a ..^ $b }; say ⟦3,6⟦
04:23 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«3..^6␤»
04:23 clsn Who needs ASCII?  Perl6 supports Unicode; we can do ⦃⦄, ⸨⸩...
04:24 clsn Yes, exactly.
04:24 clsn I've been playing around with using ⦃⦄ mostly.
04:24 lue I'm pretty sure ⟦ has an existing meaning though...
04:24 TimToady alas, and it's one of the few labeled "MATHEMATICAL"
04:24 clsn I don't think I have keystrokes for ⟦ (I do for ⦃)
04:24 lue "In formal semantics, double brackets, ⟦ ⟧, also called Strachey brackets, are used to indicate the semantic evaluation function."
04:25 lue clsn: same for me, I've got the compose keys for ⦃⦄, but not ⟦⟧ IIRC.
04:25 clsn Yeah, I have an enormous XCompose file that I keep adding to...
04:26 lue I'd love to know what ⊏ means, by the way. It came in an XCompose file I downloaded a while ago, and I still have no clue what it is.
04:26 lue It's called "SQUARE IMAGE OF", and is one of a set of symbols similar to ⊂ and friends.
04:26 skids Designating certain sets of unicode brackets as never being considered balanced delimiters for bra-ket notation and such might be nice.
04:27 clsn Oh, the mathematical operators sections of Unicode have lots of lovely symbols.
04:27 jnap joined #perl6
04:27 lue skids: I think Perl 6 shouldn't be the one to break Unicode rules though :)
04:28 clsn I just like the look of ⟅⟆...
04:28 lue I still say ⟅⟆ is the obvious choice for Bag literal :)
04:28 skids lue: coincidentally I was wondering about "image of" and "original of" myself, but about ⊷
04:28 lue .u ⊷
04:28 yoleaux U+22B7 IMAGE OF [Sm] (⊷)
04:29 TimToady perl6: say ⟅<a b b c d d>⟆
04:29 camelia niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/tmpfile line 1:â�¤------> [32msay[33mâ��[31m ⟅<a b b c d d>⟆[0mâ�¤â�¤Confused at /tmp…»
04:29 camelia ..rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Two terms in a rowâ�¤at /tmp/tmpfile:1â�¤------> [32msay [33mâ��[31m⟅<a b b c d d>⟆[0mâ�¤    expecting any of:â�¤        argument listâ�¤  â€¦Â»
04:29 clsn ⟅⟆⟨⟩⟪⟫⟬⟭⟮⟯⦑⦒⦓⦔⦕⦖⦗⦘⧼⧽⧘⧙⧚⧛⸢⸣⸤⸥⸨⸩「」『』
04:29 clsn <lue> I still say ⟅⟆ is the obvious choice for Bag literal :) -- have to agree with you there.
04:29 TimToady coulda sworn I saw ⟅⟆ defined somewhere in P6land
04:29 lue TimToady: if anywhere, probably one of several other times I've brought it up here :P
04:30 TimToady alas, math overloads {} for sets
04:30 lue rn: say Q"Literal string\" eq 「Literal String\」
04:30 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Two terms in a rowâ�¤at /tmp/tmpfile:1â�¤------> [32msay Q"Literal string\" eq [33mâ��[31m「Literal String\ã€�[0mâ�¤    expecting any of:â�¤  â€¦Â»
04:30 camelia ..niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0m��Bogus term at /tmp/tmpfile line 1:�------> [32msay Q"Literal string\" eq [33m�[31m「Literal String\�[0m��Parse failed��»
04:31 raydiak .u ⟅
04:31 yoleaux U+27C5 LEFT S-SHAPED BAG DELIMITER [Ps] (⟅)
04:31 TimToady it really is for bags
04:31 raydiak really is the obvious choice...
04:33 konnjuta what characters are valid for postfix and prefix  custom operators?
04:33 clsn Most of  them.
04:33 lue konnjuta: all the ones that aren't blank, IIRC
04:34 skids http://shapecatcher.com/ # just to make clsn more dangerous :-)
04:34 konnjuta how about alphabets?
04:34 konnjuta sub postfix:<p>($N) { [*] 2..$N };
04:34 konnjuta say p6;
04:34 konnjuta returns error
04:35 lue r: sub prefix:<I>($a) { say $a }; my $b = 12; say I$b;
04:35 clsn You said postfix and used it as prefix.
04:35 clsn skids: ;)
04:35 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«12␤True␤»
04:35 clsn sub postfix:<p>($N) { [*] 2..$N }; say 7p
04:35 clsn r: sub postfix:<p>($N) { [*] 2..$N }; say 7p
04:36 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«5040␤»
04:36 lue .oO( die unless ⧜ < $a < ∞; )
04:38 TimToady konnjuta: note that p6 will still parse as an identifier under longest token matching, so you'd have to say p 6
04:39 konnjuta r: sub prefix:<p>($N) { [*] 2..$N }; say p 7;
04:39 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«5040␤»
04:39 TimToady might still not work
04:39 TimToady well, I guess it does
04:39 TimToady thought it might parse as a listop
04:40 TimToady std: : sub prefix:<p>($N) { [*] 2..$N }; say p 7;
04:40 camelia std 09dda5b: OUTPUT«[31m===[0mSORRY![31m===[0m�Preceding context expects a term, but found infix : instead at /tmp/zeUB1kCweC line 1:�------> [32m<BOL>[33m�[31m: sub prefix:<p>($N) { [*] 2..$N }; say [0m�Parse failed�FAILED 00:01 122m�»
04:40 konnjuta r: my $num = 7; sub postfix:<p>($N) { [*] 2..$N }; say $num p;
04:40 TimToady std: sub prefix:<p>($N) { [*] 2..$N }; say p 7;
04:40 clsn Of course, we have single-character … and ‥ in Unicode.  And we can use ∀(...) for all(...).  I am surprised that ≥ and ≤ aren't already defined.
04:40 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Two terms in a rowâ�¤at /tmp/tmpfile:1â�¤------> [32mpostfix:<p>($N) { [*] 2..$N }; say $num [33mâ��[31mp;[0mâ�¤    expecting any of:â�¤       …»
04:40 camelia std 09dda5b: OUTPUT«ok 00:01 132m␤»
04:40 lue The only real symbol I can find for infinitesimal is ε, but I'm not a fan of that somehow. Come to think of it, ⧜ could possibly be a better choice.
04:40 lue clsn: ∀ does not mean "all()", it means "for all", a.k.a for $thing { }  :)
04:40 TimToady well, there're lots of epsilons
04:41 lue say $_ ∀ 2..10
04:41 TimToady in fact, there are 38 epsilons in Unicode
04:41 bjz_ joined #perl6
04:42 SamuraiJack joined #perl6
04:42 clsn lue: yeah, I can see that too.
04:42 lue This discussion is one of those times I wish search engines stepped out of the ASCII age :/
04:42 TimToady ∄ that feature
04:47 * clsn experiments with being evil and defining circumfix:<RLO PDF> ...
04:49 clsn r: sub prefix:<‮> ($a) {$a.flip}; say ‮"hello"
04:49 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«olleh␤»
04:50 clsn That's using prefix; didn't quite work out with circumfix first time I tried...
04:51 lue clsn: what is PDF? And did you try LRO in its place?
04:51 clsn r: sub circumfix:<‮ ‬> ($a) { $a.flip }; say ‮"hello"‬;
04:52 camelia rakudo-jvm 04c4fb: OUTPUT«(timeout)»
04:52 camelia ..rakudo-parrot 04c4fb, rakudo-moar 04c4fb: OUTPUT«olleh␤»
04:52 clsn That's actually cooler than it looks, since the string was actually "hello"...
04:52 clsn PDF is Pop Directional Formatting or something like that.
04:52 clsn Wait, I think PDF is supposed to be used after RLE, not RLO.
04:53 konnjuta r: sub postfix:<$_>($N) { 8 } ; say 5$_
04:53 camelia rakudo-jvm 04c4fb: OUTPUT«(timeout)»
04:53 camelia ..rakudo-parrot 04c4fb, rakudo-moar 04c4fb: OUTPUT«8␤»
04:53 clsn I guess not, though, since things behaved right when I used it.
04:54 konnjuta r: sub postfix:<$_>($N) { 8 } ; say $_$_ for 1..5
04:54 camelia rakudo-jvm 04c4fb: OUTPUT«(timeout)»
04:54 camelia ..rakudo-parrot 04c4fb, rakudo-moar 04c4fb: OUTPUT«8␤8␤8␤8␤8␤»
04:54 konnjuta wow!
04:56 clsn And you can do assorted evil things, apparently, like making BOM an operator, and various other invisibles.  But not any of the spaces at least.
04:58 clsn I played with this some in my "pretty-mode.el", which replaces various things in programming languages with Unicode characters on-screen.  mostly just for laughs.  So == becomes ≟, logical AND/OR symbols, ␣ for ' ', and so on...
05:00 clsn https://github.com/clsn/pretty-mode.el
05:02 clsn clsn &
05:28 jnap joined #perl6
05:46 raiph joined #perl6
05:49 raiph .tell TimToady "a direct translation to Haskell": http://www.reddit.com/r/readablecode/comments/1​w6exe/p6_crosswalk_braceexpansionparses/cf229at
05:49 yoleaux raiph: I'll pass your message to TimToady.
05:53 jeffreykegler left #perl6
06:01 TimToady of course, I've changed it since then...
06:01 yoleaux 05:49Z <raiph> TimToady: "a direct translation to Haskell": http://www.reddit.com/r/readablecode/comments/1​w6exe/p6_crosswalk_braceexpansionparses/cf229at
06:03 TimToady and the Haskell version should be added to RC
06:05 zby_home_ joined #perl6
06:05 raiph oh! you got rid of the alt/alts code duplication. very nice.
06:09 Sqirrel joined #perl6
06:14 kanishka joined #perl6
06:15 TimToady "This is better because we used a monad, so wah, wa-waa, wawawa wa wawa wa waaah."  <-- what most mere mortals hear
06:17 TimToady on top of that, there's too many keywords :)
06:22 kanishka perl6 say 3
06:22 kanishka perl6: say3
06:22 camelia rakudo-jvm 04c4fb: OUTPUT«(timeout)»
06:22 camelia ..rakudo-parrot 04c4fb, rakudo-moar 04c4fb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared routine:â�¤    say3 used at line 1. Did you mean '&say'?â�¤â�¤Â»
06:22 camelia ..niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤    'say3' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_…»
06:23 kaleem joined #perl6
06:27 [Sno] joined #perl6
06:29 konnjuta r: say .chars for "zt".."zz"
06:29 camelia rakudo-jvm 04c4fb: OUTPUT«(timeout)»
06:29 camelia ..rakudo-parrot 04c4fb, rakudo-moar 04c4fb: OUTPUT«2␤2␤2␤2␤2␤2␤2␤»
06:29 konnjuta r: say .unpack("H*",$_) for "zt".."zz"
06:29 camelia rakudo-jvm 04c4fb: OUTPUT«(timeout)»
06:29 camelia ..rakudo-parrot 04c4fb, rakudo-moar 04c4fb: OUTPUT«No such method 'unpack' for invocant of type 'Str'␤  in block  at /tmp/tmpfile:1␤␤»
06:30 konnjuta pack and unpack not yet implemented on rakudo?
06:30 TimToady you just fed $_ to it two different ways
06:31 TimToady but I don't think they are very implemented
06:31 TimToady p: say unpack("H*", "a")
06:31 camelia rakudo-parrot 04c4fb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/UDROnc4FvLâ�¤Undeclared routine:â�¤    unpack used at line 1. Did you mean '&pack'?â�¤â�¤Â»
06:31 TimToady heh
06:32 TimToady p: say .comb».ord.base(16) for 'zt' .. 'zz'
06:32 camelia rakudo-parrot 04c4fb: OUTPUT«No such method 'base' for invocant of type 'Parcel'␤  in block  at /tmp/NrpT2myO6k:1␤␤»
06:33 TimToady p: say .comb».ord».base(16) for 'zt' .. 'zz'
06:33 camelia rakudo-parrot 04c4fb: OUTPUT«7A 74␤7A 75␤7A 76␤7A 77␤7A 78␤7A 79␤7A 7A␤»
06:33 kanishka p: say 10
06:33 camelia rakudo-parrot 04c4fb: OUTPUT«10␤»
06:34 TimToady p: say .ords».base(16) for 'zt' .. 'zz'
06:34 camelia rakudo-parrot 04c4fb: OUTPUT«7A 74␤7A 75␤7A 76␤7A 77␤7A 78␤7A 79␤7A 7A␤»
06:35 TimToady p: say .ords.fmt('%02x',',') for 'zt' .. 'zz'
06:35 camelia rakudo-parrot 04c4fb: OUTPUT«7a,74␤7a,75␤7a,76␤7a,77␤7a,78␤7a,79␤7a,7a␤»
06:36 xenoterracide joined #perl6
06:36 konnjuta thanks for that
06:37 moritz \o
06:37 TimToady o/
06:37 diakopter how many of those comb ord feeds can each of moar and parrot due wo timing out camelia
06:38 diakopter um. do.
06:39 diakopter I'm curious about the 》overhead
06:39 diakopter or however you type it
06:39 diakopter >>
06:40 diakopter ■□●○■□●○■□●○■□●○■□●○■□●○■□●○■□●○
06:40 diakopter °•○●o.O°○●•
06:41 quester joined #perl6
06:42 Guest53720 joined #perl6
06:53 xenoterracide joined #perl6
06:58 darutoko joined #perl6
07:06 FROGGS joined #perl6
07:08 FROGGS o/
07:24 sqirrel_ joined #perl6
07:29 jnap joined #perl6
07:42 konnjuta r: say ++<<(1,2,3)
07:42 camelia rakudo-jvm 04c4fb: OUTPUT«Cannot modify an immutable value␤  in sub prefix:<++> at gen/jvm/CORE.setting:4342␤  in sub prefix:<++> at gen/jvm/CORE.setting:1756␤  in sub hyper at gen/jvm/CORE.setting:16639␤  in sub hyper at gen/jvm/CORE.setting:16598␤  in sub METAOP_HYPER_PR…»
07:42 camelia ..rakudo-moar 04c4fb: OUTPUT«No such method 'STORE' for invocant of type 'Int'␤  in sub prefix:<++> at src/gen/m-CORE.setting:4342␤  in sub prefix:<++> at src/gen/m-CORE.setting:1756␤  in sub hyper at src/gen/m-CORE.setting:16636␤  in sub hyper at src/gen/m-CORE.setting:16595…»
07:42 camelia ..rakudo-parrot 04c4fb: OUTPUT«Cannot modify an immutable value␤  in sub prefix:<++> at gen/parrot/CORE.setting:4346␤  in sub prefix:<++> at gen/parrot/CORE.setting:1760␤  in sub hyper at gen/parrot/CORE.setting:16910␤  in sub hyper at gen/parrot/CORE.setting:16865␤  in sub …»
07:42 konnjuta r: my @a=(1,2,3); say ++<<@a
07:42 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«2 3 4␤»
07:43 konnjuta hyper operators not working on anonymous lists?
07:43 FROGGS konnjuta: that is not the problem, the problem is that you are doing this:
07:43 FROGGS p: ++1
07:43 camelia rakudo-parrot 04c4fb: OUTPUT«Cannot modify an immutable value␤  in sub prefix:<++> at gen/parrot/CORE.setting:4346␤  in sub prefix:<++> at gen/parrot/CORE.setting:1760␤  in block  at /tmp/zjh63C1o3r:1␤␤»
07:44 FROGGS you are trying to increment the elements of that list, which are immutable
07:44 FROGGS r: my @a=(1,2,3); ++<<@a; say @a
07:44 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«2 3 4␤»
07:44 FROGGS it is not happening on a copy of the elements
07:53 immortal joined #perl6
07:54 konnjuta r: say 1 <<+<< (1,2,3)
07:54 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«2 3 4␤»
07:54 Rotwang joined #perl6
07:55 konnjuta thanks
07:55 FROGGS :o)
07:58 zakharyas joined #perl6
07:59 kanishka joined #perl6
08:05 berekuk joined #perl6
08:09 tgt joined #perl6
08:11 berekuk joined #perl6
08:12 FOSScookie joined #perl6
08:14 FOSScookie So, with perl6 I could do something similar with it as with javac and compile the source code to bytecode and then share the bytecode with .class files and all which can be run like 'java -jar yyyy'?
08:16 moritz FOSScookie: currently there's no way to combine all the dependencies into a single .jar file
08:17 moritz (like the Perl 6 runtime and compiler, which you need for EVAL and the likes)
08:17 FOSScookie moritz: Is there a plan for that functionality?
08:18 moritz FOSScookie: I don't know; I'm not much of a JVM hacker, and don't have any such plans
08:18 moritz others might have them
08:22 arnsholt I've been thinking a bit about bundling NQP and all of its deps as a single runnable JAR, but that's a bit tricky
08:22 arnsholt Looks like we have to write our own classloader to load the bundled JARs
08:31 tadzik and call the bundles .jarjar
08:33 moritz and distribute it through the bing servers :-)
08:34 raydiak is it possible to build r-j in such a way that it could be bundled with your app and used portably instead of forcing prospective users to compile rakudo themselves? not necessarily as a single runnable JAR
08:35 raydiak I mean, I'm assuming for one reason or another, that I can't just copy my perl6-j install to another machine and expect it to work
08:35 pdcawley joined #perl6
08:38 FROGGS I would probably prefer a staticperl6: a single file that contains your app including the resource files plus perl6-m plus modules
08:38 tadzik a six pack
08:38 FROGGS there is such a thing for Perl 5, called staticperl
08:39 FROGGS it is awesome fast still, because it does not zip itself
08:39 FROGGS (good for games)
08:39 FROGGS though, this was linux only I believe
08:40 FROGGS and you had to build it on a very old machine, to make it run everywhere (I used a debian 3 or so)
08:41 tadzik :o
08:42 raydiak that sounds much more ideal, but I meant maybe something that is possible right this moment or with a minimal amount of tweaking to makefiles or some such
08:42 quester left #perl6
08:44 FOSScookie joined #perl6
08:46 raydiak are there bits in there which are specific to your computer's configuration, or is it as portable as any other java app?
08:47 FROGGS well, it records you osname for example
08:47 FROGGS and other build information, which is then used by nativecall
08:48 raydiak ah, so not portable then
08:48 hoelzro morning #perl6
08:48 raydiak good morning hoelzro
08:50 FROGGS raydiak: well, we could add a cache somewhere that gets invalidated when somebody moves it to another machine
08:50 FROGGS though, probing for make toolchains is not that easy
08:51 FROGGS well, it is easy, easy to do the wrong thing
08:51 FROGGS hi hoelzro
08:53 raydiak I'm basically wondering about a way around the build requirements entirely other than distributing your app as a QEMU image
08:54 moritz docker!
08:56 timotimo much backlog
08:56 timotimo so discuss
08:58 raydiak ah, I see...hadn't heard of it; took a minute to find the buried slide that explains what it is
09:03 moritz basically a tool to deploy images into linux containers
09:04 raydiak this looks fun: http://bit.ly/14RYL6x
09:08 raydiak now I understand...I didn't realize that "linux container" meant something specific
09:09 dmol joined #perl6
09:12 moritz it's like solaris zones or *bsd jails
09:12 moritz so some form of isolation without a hypervisor
09:14 raydiak any reason moar couldn't be compiled as a redistributable binary in the future?
09:14 FROGGS that should work out I think
09:14 FROGGS that should work already when I think about it
09:20 masak morning, #perl6
09:21 raydiak "./moar: cannot execute binary file"
09:22 raydiak that might be coming from 64-bit to 32-bit though, now that I think about it
09:24 raydiak yep; I don't have a 32-bit machine with moar built or another 64-bit linux machine to test on; will have to pursue this later unless someone else tries it out in the meantime
09:28 FROGGS raydiak: moar does not work on 32bits at all yes
09:28 FROGGS yet*
09:28 FROGGS masak: morning
09:29 raydiak FROGGS: thank you for saving me hours of wondering what I'm doing wrong when the build fails :)
09:29 hoelzro tadzik: ping
09:30 FROGGS raydiak: ohh, I did not want to stop you from fixing it :o)
09:31 jnap joined #perl6
09:31 tadzik hoelzro: pong
09:34 raydiak FROGGS: it's a thought, though I hope it gets fixed in less time than it takes me to learn C well enough to fix it
09:34 FROGGS I am not sure that somebody intends to work on it :/
09:34 FROGGS time to step in masak!
09:34 FROGGS :P
09:36 raydiak ah, I forget...my hardware is antequated; perhaps it's not relevant to the modern world?
09:36 raydiak 32-bit support, I mean
09:37 FROGGS no, the goal is to support 32bit too
09:37 FROGGS Run all the languages! /o/
09:37 FROGGS err, wait
09:38 FROGGS Run on all the platforms! /o/
09:42 PZt joined #perl6
09:46 masak <TimToady> Mäsak's Law: For every DWIM, there's a corresponding WAT.
09:46 masak TimToady: an *equal and opposite* WAT, to be exact ;)
09:46 masak (mirroring Newton's third law of motion)
09:47 raydiak I'm fading fast...g'night #perl6
09:47 masak there are so many examples of this.
09:47 masak DWIM: "ooh, let's make parentheses on sub and method calls optional"
09:47 masak (several years pass)
09:48 masak WAT: "turns out we can't provide the DWIM without surprising *someone* about TTIAR with methods calls"
09:48 masak (e.g. '$obj.meth $arg' doesn't work, and needs to be either '$obj.meth($arg)' or '$obj.meth: $arg')
09:49 hoelzro tadzik: Jollas are on sale over the weekend due to FOSDEM
09:49 hoelzro 40 EUR off, but it's something =)
09:52 pecastro joined #perl6
09:53 FROGGS gnight raydiak
09:53 dakkar joined #perl6
10:11 kivutar joined #perl6
10:11 atroxaper joined #perl6
10:13 jnthn o/
10:13 masak \o
10:14 FROGGS morning jnthn
10:21 ribasushi joined #perl6
10:22 ribasushi joined #perl6
10:23 ggoebel1113 joined #perl6
10:31 tadzik hoelzro: oh, oh, hmmmmm
10:31 jnap joined #perl6
10:33 tadzik not on shop.jolla.com tho
10:33 hoelzro tadzik: there's a code
10:33 tadzik ah
10:36 hoelzro tadzik: https://lists.sailfishos.org/piperm​ail/devel/2014-January/003211.html
10:40 masak oh, the DWIM/WAT example I mentioned before is better stated like this:
10:40 masak DWIM: "ooh, let's make parens optional!"
10:40 kanishka2 joined #perl6
10:41 masak WAT: "hey, why can't I put whitespace between $obj and .meth :("
10:41 tadzik hoelzro: tempting tempting :)
10:41 hoelzro tadzik: just thought I would throw that out there =)
10:42 hoelzro I think it's on sale for a week
10:42 tadzik yeah, until 9 Feb
10:42 hoelzro (if I understand the e-mail correctly)
10:42 tadzik no need to hurry with making up my mind :)
10:42 hoelzro indeed!
10:43 tadzik if I'll own 2 half-working phones, that's like 1 fully working phone :P
10:43 moritz you can speak into one and hear from the other one?
10:43 tadzik so that's what "The Other Half" is about...
10:43 moritz so that you have to do a three-way conference on each call
10:46 ribasushi what is WAT short for? :)
10:46 jnthn WAT is short for what.
10:46 masak which is short for "whaaaaaaaaat!"
10:46 masak :P
10:46 ribasushi ah, WTF in russian
10:46 ribasushi ok ;)
10:47 moritz bacek's WTF :-)
10:47 masak ribasushi: https://www.destroyallsoftware.com/talks/wat
10:56 Alula joined #perl6
10:58 rindolf joined #perl6
11:19 tgt joined #perl6
11:21 woolfy1 joined #perl6
11:24 lizmat joined #perl6
11:29 tgt joined #perl6
11:31 zakharyas joined #perl6
11:44 kurahaupo_mobile joined #perl6
12:05 amkrankruleuen joined #perl6
12:05 amkrankruleuen joined #perl6
12:17 * masak reads http://www.modernperlbooks.com/mt/2014/01/f​atal-warnings-are-a-ticking-time-bomb.html with fascination
12:18 masak there's an essence to all of this that affects both Perl 5 and Perl 6, and many other languages out there.
12:18 masak how to upgrade not just a language, but also its dependent code.
12:18 masak how to upgrade not just a module but also the modules that depend on it.
12:18 tadzik hm, Mark&LazySweep looks interesting
12:19 masak moritz++ once said that this upgrading problem feels like the big unsolved problem of our time, or something like that.
12:19 moritz that must have been a clever moritz at that time :-)
12:20 zby_home_ joined #perl6
12:24 masak moritz++ # clever :)
12:33 jnap joined #perl6
12:40 regreg joined #perl6
12:41 tgt joined #perl6
12:48 sqirrel_ joined #perl6
12:55 nwc10 no warnings; is pretty "cool" too, as it disables all deprecation warnigs
12:56 nwc10 ie you should be disabling only the warning(s) you know isn't relevant
12:56 * nwc10 didn't work this one out with foresight
13:04 masak it's tricky.
13:05 nwc10 agree. But there are ways to shoot yourself in the foot, and these are best identified and avoided
13:06 * nwc10 misses bacek
13:11 masak to me, that's what the CPAN is: a big repository, with tooling and community around it, to minimize the risk of foot-shooting.
13:11 masak the back-and-forth is often at least as interesting as the tasks the modules are meant to perform :)
13:19 nwc10 but chromatic has it spot on - they are called warnings for a reason, and if others do stuff that makes it impossible to add new warnings, then those others are not being helpful (to put it politely)
13:19 nwc10 "wrong", to be blunt.
13:20 moritz RONG, to be blunt
13:20 nwc10 "you get to keep both pieces"
13:20 regreg joined #perl6
13:25 regreg2 joined #perl6
13:34 jnap joined #perl6
13:37 ribasushi moritz: http://blogs.perl.org/users/peter_rabbit​son/2014/01/fatal-warnings-are-a-ticking​-time-bomb-via-chromatic.html#comments
13:37 ribasushi (his comments are completely borken)
13:38 regreg joined #perl6
13:39 regreg perl6? say 3?
13:39 regreg perl6: say 3;
13:39 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb, niecza v24-109-g48a8de3: OUTPUT«3␤»
13:41 rindolf joined #perl6
13:42 dalek joined #perl6
13:42 SamuraiJack joined #perl6
13:50 masak ribasushi: hehe, "fire and replace yourself" :P
13:51 ribasushi masak: it was an obfuscation contender ;)
13:51 masak I can imagine ;)
13:52 ribasushi masak: it is linked in my 2nd comment
13:55 masak aye.
13:56 smls joined #perl6
14:02 pecastro joined #perl6
14:05 ajr joined #perl6
14:11 V_ joined #perl6
14:11 kbaker joined #perl6
14:16 [Coke] .u ☑
14:16 yoleaux U+2611 BALLOT BOX WITH CHECK [So] (☑)
14:18 [Coke] .u ☐
14:18 yoleaux U+2610 BALLOT BOX [So] (☐)
14:18 varna joined #perl6
14:20 varna left #perl6
14:20 masak [Coke]: if you want us to vote, just say so. :P
14:21 [Coke] someone internally posted that they used these ASCII characters to do something in excel.
14:21 masak "these ASCII characters"?
14:21 * masak is a little confused
14:22 [Coke] so was the guy that posted.
14:22 bonsaikitten joined #perl6
14:23 moritz ctrl + ASCII-characters do stuff in excel :-)
14:23 moritz =SUM(A1-A5); # also ASCII characters
14:23 jnthn joined #perl6
14:23 mathw joined #perl6
14:23 Bucciarati joined #perl6
14:24 Alula joined #perl6
14:24 Gothmog_ joined #perl6
14:24 bloonix joined #perl6
14:24 avar joined #perl6
14:24 avar joined #perl6
14:27 Grimnir_ joined #perl6
14:35 jnap joined #perl6
14:40 pdcawley joined #perl6
14:42 jnap joined #perl6
14:43 pdcawley joined #perl6
14:54 masak by the way, this one is doing the rounds on Twitter right now: https://twitter.com/JeffSpeckA​ICP/status/428152172925038593 -- qualifies as an autopun, with a negative determinant.
14:54 thou joined #perl6
14:55 masak it's a little bit interesting, because the "use" part is mostly non-verbal.
14:57 * moritz amused
14:59 tadzik heh, I guess it would be Poland-specific if I said "it's funny because you don't have even one job after the college"
14:59 diakopter pretty cute, since there's obviously room for the whole sign to fit if it's just shifted right some
14:59 masak diakopter: yeah. that's the "Planning" bit, I guess :P
15:00 timotimo tadzik: you had *zero* jobs!
15:00 tadzik :>
15:02 atroxaper joined #perl6
15:10 PerlJam Is that pic photoshopped?
15:10 btyler joined #perl6
15:13 tgt joined #perl6
15:16 ggoebel1113 joined #perl6
15:17 xenoterracide joined #perl6
15:21 timotimo o/ from a train station
15:24 FROGGS o/
15:26 raiph joined #perl6
15:29 diakopter i like trains
15:29 timotimo :)
15:29 * hoelzro listens to I Like Trains now
15:32 btyler_ joined #perl6
15:32 diakopter btw enabling parallel build of libtommath made the entire thing build from scratch in like 2 seconds
15:32 diakopter cl.exe /MP that is
15:33 diakopter I'll try it for the moar .c later
15:39 * [Coke] wonders if it's worth pinging bioperl folks and making sure they'd be happy with six.
15:41 FROGGS [Coke]: do they tend to need nativecall?
15:43 [Coke] I have no idea. joining their channel and attempting to blend in now.
15:43 PerlJam [Coke]++
15:45 FROGGS [Coke]++
15:57 aindilis joined #perl6
15:59 Psyche^_ joined #perl6
15:59 tgt joined #perl6
16:04 ajr joined #perl6
16:09 smls joined #perl6
16:12 masak wow, I just had this awesome idea for a hackathon.
16:13 timotimo a hackathon?
16:13 timotimo that sounds great!
16:13 masak called "Let's Make a Language", it would start with a simple language in NQP.
16:14 masak and then a dedicated team would spend a weekend simply discussing and implementing features on that language, and having them play well together.
16:14 timotimo oh, kind of like the RaNIW, but with a focus on making your own idea come true
16:14 timotimo rather than implementing a rubyish/phpish
16:14 PerlJam ... and would end with Javascript ;)
16:14 FROGGS cool! then we could run rakudo-js on top of nqp!
16:14 masak PerlJam: my idea was basically "and end with what JavaScript would have been if we'd had all of today's knowledge about early design mistakes".
16:15 PerlJam masak: Wait... who chooses the language?  I think Coke would appreciate it if people hacked on partcl for a week  :)
16:15 masak hehe.
16:15 masak this is just the seed of an idea right now.
16:15 masak I'm not proposing we do this, just toying around with the thought.
16:16 FROGGS I'd propose a hackathon about RT tickets :o)
16:16 masak in fact, there would need to be some more meat to the idea before *I* committed to it.
16:16 masak FROGGS++ # I like that.
16:16 dalek specs: d528d11 | pmichaud++ | S99-glossary.pod:
16:16 dalek specs: circularity saw:  s/breakage/resulting splice/
16:16 dalek specs:
16:16 dalek specs: ...since the use of the saw is actually a patched thing, not a broken thing
16:16 dalek specs: review: https://github.com/perl6/specs/commit/d528d11afe
16:16 masak FROGGS: with a score board "how many RT tickets did we close this weekend?"
16:16 FROGGS and the goal would be to get rid of 100 tickets
16:16 FROGGS yeah
16:16 masak I'll shelve my language hackathon idea for now.
16:17 masak I like FROGGS++' idea better :)
16:17 FROGGS *g*
16:19 masak I'll go out on a limb and say we don't have the tooling/machinery to make a language hackathon (in the way I envision it) effective/agile/fun.
16:19 masak but maybe getting that tooling is a goal worth striving for.
16:22 bluescreen10 joined #perl6
16:23 masak ...or maybe the extreme simplicity and agility that I'm picturing would simply cause Alan Perlis to appear and hand me a lollipop.
16:24 TimToady today is last call for OSCON talks...
16:27 * jnthn is doing a bunch of European workshops, which probably gives him a full enough schedule.
16:30 TimToady but then us Americans will just get stupider
16:31 btyler joined #perl6
16:44 skids joined #perl6
16:46 jeffreykegler joined #perl6
16:46 rjbs There is talk of implementing ($x < $y < $z) in p5.
16:46 rjbs I am wondering whether you futurists who have done this already have any interesting pointers or caveats to share.
16:49 TimToady is a shame you can't combine the precedence of == with it in P5
16:51 smls rjbs: FYI, here's the spec: http://perlcabal.org/syn/S0​3.html#Chained_comparisons
16:51 treehug88 joined #perl6
16:51 TimToady it's a little trickier in our case because we have to be able to generate the appropriate function for it when we curry
16:51 rjbs smls: thanks
16:52 TimToady but I don't see P5 having that problem soon
16:52 rjbs TimToady: Oh, I didn't know about that == bit.
16:52 rjbs Heh.
16:52 * timotimo recently implemented the code to do the proper currying of chained operators :3
16:53 TimToady so basically we have to think in terms of a function call like chaining($x, &[<], $y, &[<], $z) or so
16:54 TimToady that has to be smart enough to evaluate $y only once
16:55 TimToady well, I guess if you pass it as an argument to a function, one evaluation comes for free
16:55 rjbs heh
16:56 rjbs and the chain can be arbitrarily long, it seems, yes?
16:56 TimToady yup
16:57 rjbs Yves O. is on holiday and looking at doing this for fun.  We'll see what comes back.  Based on his previous talk about it, I expect to see something supporting exactly two comparisons.
16:57 rjbs Thanks!
16:58 TimToady yer welcome
16:58 rjbs (I'm slightly suspicious that such an implementation would be met by a counterimplementation by one of another small handful of people extending it to arbitrary length...)
16:59 smls TimToady: but if you pass them all as args to a function, wouldn't that break the short-circuiting?
17:00 rjbs pass as lazily-evaluated arguments :)
17:05 TimToady smls: yeah, that's an issue
17:06 TimToady r: say 1 < 0 < die "oops"
17:06 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«False␤»
17:07 TimToady so the third, fifth, etc args need to be thunks
17:08 dalek rakudo-star-daily: b8a8922 | coke++ | log/ (5 files):
17:08 dalek rakudo-star-daily: today (automated commit)
17:08 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/b8a89224ac
17:13 [Coke] modules/perl6-lwp-simple failed today.
17:13 [Coke] DBIsh still failing.
17:13 timotimo isn't it high time for the star release?
17:13 timotimo tadzik, weren't you the star releaser this month?
17:13 [Coke] timotimo: ^^
17:13 [Coke] modules are failing, we need to fix those.
17:14 timotimo ah
17:14 timotimo fair enough
17:14 * timotimo looks at DBIish
17:17 kaleem joined #perl6
17:18 kaleem joined #perl6
17:18 timotimo i can't open that file in vim
17:20 [Coke] :?
17:20 benabik joined #perl6
17:21 kbaker joined #perl6
17:21 timotimo it completely eats up one cpu core
17:21 timotimo probably syntax highlighting gone haywire
17:21 timotimo i don't see where reset_errstr and set_errstr are supposed to come frmo
17:22 timotimo ah, there it is
17:22 bjz joined #perl6
17:23 FROGGS joined #perl6
17:23 timotimo apparently my jvm has disappeared
17:24 timotimo i've got a commit that probably fixes DBIish, but i'll test it before i push
17:25 timotimo and for that i have to build a rakudo first
17:26 timotimo do we know if the lwp-simple failure is legit?
17:39 vendethiel I, I'm trying out perl and I tried to do in perl6 a snippet I've read a lot in perl5 : while (<>) { chomp; s/blah/bla/; say $_; }
17:40 vendethiel However, it seems that 1) the way to write that in perl6 is (usually ...) for lines() { say $_; }, but then $_ is readonly. 2) chomp's arity is now always 1
17:41 vendethiel So, I'm wondering if the best way now is to *always* name your for variables
17:41 [Coke] m: say slurp.lines.chomp.subst(/men/, 'boys')
17:41 camelia rakudo-moar 04c4fb: OUTPUT«There were three boys came out of the West Their fortunes for to try And these three men made a solemn vow John Barleycorn must die  They've ploughed, they've sewn, they've harrowed him in Threw clouds upon his head And these three men made a solemn vow Jo…»
17:41 jnthn lines gives you ready-chomp'd stuff
17:41 [Coke] m: say slurp.lines.chomp.subst(/men/, 'boys')
17:41 camelia rakudo-moar 04c4fb: OUTPUT«There were three boys came out of the West Their fortunes for to try And these three men made a solemn vow John Barleycorn must die  They've ploughed, they've sewn, they've harrowed him in Threw clouds upon his head And these three men made a solemn vow Jo…»
17:41 [Coke] gah.
17:42 TimToady you need a :g
17:42 [Coke] listen to jnthn++ :)
17:42 jnthn [Coke]: You're turning it into one bick string with chomp there :)
17:42 jnthn uh, big
17:42 TimToady vendethiel: Perl 6 is in many ways a different language
17:42 [Coke] m: say slurp.lines.subst(/men/, 'boys', :g)
17:42 camelia rakudo-moar 04c4fb: OUTPUT«There were three boys came out of the West Their fortunes for to try And these three boys made a solemn vow John Barleycorn must die  They've ploughed, they've sewn, they've harrowed him in Threw clouds upon his head And these three boys made a solemn vow …»
17:42 vendethiel TimToady, I realize that, that's why I'm intrigued
17:42 TimToady especially in the parts that are most irregular in Perl 5
17:43 PerlJam vendethiel: and "naming your variables" is orhtogonal to the other things you mention
17:43 PerlJam orthogonal even
17:43 TimToady r: for lines() { s:g/men/boys/; .say }
17:43 camelia rakudo-jvm 04c4fb: ( no output )
17:43 camelia ..rakudo-moar 04c4fb: OUTPUT«(signal SEGV)»
17:43 camelia ..rakudo-parrot 04c4fb: OUTPUT«Cannot assign to a readonly variable or a value␤  in sub infix:<=> at gen/parrot/CORE.setting:16362␤  in block  at /tmp/tmpfile:1␤␤»
17:44 vendethiel exactly that error.
17:44 TimToady right, you need an 'is copy'
17:44 TimToady r: for lines() -> $_ is copy { s:g/men/boys/; .say }
17:44 camelia rakudo-jvm 04c4fb: ( no output )
17:44 camelia ..rakudo-parrot 04c4fb: OUTPUT«There were three boys came out of the West␤Their fortunes for to try␤And these three boys made a solemn vow␤John Barleycorn must die␤␤They've ploughed, they've sewn, they've harrowed him in␤Threw clouds upon his head␤And these three boys ma…»
17:44 camelia ..rakudo-moar 04c4fb: OUTPUT«(signal SEGV)»
17:44 PerlJam wow
17:44 jnthn wtf...
17:45 TimToady the default is to assume 'is rw', but that requires the input to be mutable
17:45 TimToady and lines returns immutables
17:45 benabik r-m: lines() # golfed?
17:45 camelia rakudo-moar 04c4fb: OUTPUT«(signal SEGV)»
17:45 vendethiel can't I do something like ::lines() ? I read the synopsis 1, 3 and 12 so I've seen some syntax but not sure where it's applicable
17:46 timotimo do we need something like <-> as an alternative to -> that gives you an is copy $_ instead? :P
17:46 TimToady what do you think the :: means?
17:46 jnthn benabik: Ugh. That's a regression...
17:46 PerlJam timotimo: we already have <-> :)
17:46 vendethiel TimToady: I've seen a =:: $b (or ::=, ha !) as (object) copy
17:46 TimToady but <-> implies rw, not copy
17:46 timotimo PerlJam: yeah, but <-> is for ... yes
17:46 benabik jnthn: Just a small one.  ;-)
17:46 jnthn benabik: Odd, it works out fine for me.
17:47 timotimo IO gets re-worked completely in the near future anyway :P
17:47 benabik jnthn: `perl6-m -e 'lines()'` gives me "Unhandled exception: Failed to close filehandle: bad file descriptor", but I think that's a completely separate issue.
17:48 jnthn benabik: I don't...
17:48 vendethiel TimToady: `for lines() <-> $_ { s/a//: }` seems to give me the same error, though
17:49 TimToady yes, I just said it would
17:49 TimToady <-> $_ is the default in any case, but you need 'is copy' semantics there
17:49 vendethiel oh, I thought "read write" would allow me to write :P
17:49 PerlJam vendethiel: $_ is still aliased to whatever you're iterating over, so if you iterate immutables, you have the same problem.
17:49 TimToady it allows you to write back to the original variable
17:50 TimToady but there is no variable here
17:50 jnthn It needs the incoming thing to be writable...
17:52 vendethiel jnthn, TimToady: I see, thanks :)! So the shortest way is `for lines() -> $_ is copy ...` ? I'll go with that
17:52 TimToady vendethiel: otoh, we don't feel the need for 'is copy' all that often.  why do you want to to modify $_ in place?  we have other ways of doing things now
17:52 TimToady for instance:
17:52 TimToady r: for lines() { .subst(/men/,'boys',:g).say }
17:52 camelia rakudo-jvm 04c4fb: ( no output )
17:52 camelia ..rakudo-parrot 04c4fb: OUTPUT«There were three boys came out of the West␤Their fortunes for to try␤And these three boys made a solemn vow␤John Barleycorn must die␤␤They've ploughed, they've sewn, they've harrowed him in␤Threw clouds upon his head␤And these three boys ma…»
17:52 camelia ..rakudo-moar 04c4fb: OUTPUT«(signal SEGV)»
17:52 vendethiel TimToady: just to call s//; etc in-place, nothing fancy
17:53 vendethiel yeah, I'm probably better off using that syntax
17:53 timotimo how about this:
17:53 timotimo r: lines()>>.subst(/men/, 'boys', :g)>>.say
17:53 camelia rakudo-jvm 04c4fb: ( no output )
17:53 camelia ..rakudo-moar 04c4fb: OUTPUT«(signal SEGV)»
17:53 camelia ..rakudo-parrot 04c4fb: OUTPUT«Without a little Barleycorn␤Nor so loudly to blow his horn␤␤And little Sir John and the nut-brown bowl␤And little Sir John and the nut-brown bowl␤For he's ground him between two stones␤To cut him skin from bone␤␤And there they made a sole…»
17:54 timotimo oh, haha
17:54 timotimo silly me :)
17:54 vendethiel this is like groovy's .* ?
17:54 jnthn timotimo: Not if you want them in order :P
17:54 timotimo r: lines()>>.subst(/men/, 'boys', :g).map: .say
17:54 camelia rakudo-moar 04c4fb: OUTPUT«(signal SEGV)»
17:54 camelia ..rakudo-parrot 04c4fb: OUTPUT«Nil␤Method 'count' not found for invocant of class 'Bool'␤current instr.: '' pc 331388 (src/gen/p-CORE.setting.pir:139424) (gen/parrot/CORE.setting:7326)␤called from Sub 'reify' pc 331234 (src/gen/p-CORE.setting.pir:139345) (gen/parrot/CORE.setting…»
17:54 camelia ..rakudo-jvm 04c4fb: OUTPUT«Nil␤Unhandled exception: Method 'count' not found for invocant of class 'Bool'␤  in  (gen/jvm/CORE.setting:7322)␤  in reify (gen/jvm/CORE.setting:7321)␤  in  (gen/jvm/CORE.setting:7235)␤  in reify (gen/jvm/CORE.setting:7207)␤  in gimme (gen/jvm/…»
17:54 TimToady *.say
17:55 jnthn p: .subst(/men/, 'boys', :g).say for lines(); # how I'd do it if this really is all that's needed
17:55 camelia rakudo-parrot 04c4fb: OUTPUT«There were three boys came out of the West␤Their fortunes for to try␤And these three boys made a solemn vow␤John Barleycorn must die␤␤They've ploughed, they've sewn, they've harrowed him in␤Threw clouds upon his head␤And these three boys ma…»
17:55 timotimo on, no, that's not right
17:55 timotimo [A[A*.say
17:55 timotimo bleeeh, very laggy ssh connection :(
17:56 timotimo tunnels are the bane of my ircsistence
17:59 TimToady vendethiel: if you'd like to compare Perl 6 with other languages, you probably want to look at http://rosettacode.org/wiki/Category:Perl_6
18:00 vendethiel timotimo: yeah, just tried `[1, 2].succ`
18:00 vendethiel timotimo: yeah, just tried `[1, 2]>>succ`
18:01 vendethiel jnthn: indeed, that works too :)
18:01 TimToady r: say [1,2]».succ
18:01 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«2 3␤»
18:01 vendethiel not a bit ASCII fan :p
18:01 TimToady you need both the hyper and the dot
18:02 Ayiko hi, *
18:03 TimToady o/
18:03 vendethiel yes indeed, I actually have it in my code haha. (TimToady, timotimo, jnthn )>>++ then ;)
18:03 vendethiel (with the dot, damn)
18:03 TimToady dot is optional with ++
18:04 vendethiel oh, okay. Well, 'twould fail because I can't modify that in-place anyway, but the idea is here: p
18:04 TimToady ++ works there because [] is an array of varaibles
18:04 thou joined #perl6
18:05 smls p: say <2 4 6 8>.sort :descending;
18:05 camelia rakudo-parrot 04c4fb: OUTPUT«2 4 6 8␤»
18:05 smls ^^ Why no error/warning about unknown attribute?
18:05 TimToady r: my $array := [1,2]; $array»++; say $array
18:05 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«2 3␤»
18:05 jnthn smls: See S12 section titled Interface Consistency
18:06 [Sno] joined #perl6
18:06 Ayiko what's the canonical way to test if 2 arrays are equal?  "[and] @a Z== @b" ?
18:06 TimToady just use eqv
18:06 moritz Ayiko: define "equal"?
18:06 TimToady @a eqv @b
18:06 vendethiel TimToady: not even sure what's the difference in practice about (1, 2) vs [1, 2], need to read about lists vs arrays
18:06 Ayiko equal value at same location for each array
18:06 moritz the problem with [and] @a Z== @b is that will false-positive array with different lengths
18:07 TimToady so use eqv
18:07 moritz [1] eqv ['1'] returns False
18:07 Ayiko hrm, can't be that simple :s
18:07 moritz that might or might not be that simple
18:07 smls jnthn: thanks
18:07 moritz erm
18:07 moritz desired
18:08 moritz r: say [1] eqv $_ for '1', 1
18:08 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«False␤False␤»
18:08 TimToady yes, eqv will assume you aren't doing silly things with types
18:08 moritz r: say [1] eqv [$_] for '1', 1
18:08 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«False␤True␤»
18:08 TimToady r: say [1] ~~ ['1']
18:08 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«False␤»
18:08 spider-mario joined #perl6
18:08 TimToady r: say ['1'] ~~ [1]
18:08 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«False␤»
18:09 TimToady I thought that was recursively defined back to ~~
18:09 moritz though note that array ~~ also magifies *
18:09 moritz might or might not be desired
18:10 TimToady nope, goes to ===
18:10 jnthn Yeah, just found it does ===
18:10 moritz r: say [1, 2, 3, 4] ~~ [1, *, 4]
18:10 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«True␤»
18:10 Ayiko r: say <0 1 2> eqv ^3; say ^3 eqv (0,1,2)
18:10 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«False␤False␤»
18:10 moritz ^3 is a Range
18:11 moritz r: say (^3).list eqv (0, 1, 2).list
18:11 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«True␤»
18:11 Ayiko r: say (^3).list eqv <0 1 2>.list
18:11 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«False␤»
18:12 TimToady n: say <0 1 2> === (^3).list
18:12 camelia niecza v24-109-g48a8de3: OUTPUT«False␤»
18:12 TimToady perl6: say +«<0 1 2> === (^3).list
18:12 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb, niecza v24-109-g48a8de3: OUTPUT«False␤»
18:12 benabik r: say <0 1 2>.list.perl
18:12 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«("0", "1", "2").list␤»
18:12 TimToady perl6: say +«<0 1 2> eqv (^3).list
18:12 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb, niecza v24-109-g48a8de3: OUTPUT«False␤»
18:13 TimToady perl6: say <0 1 2>».Int eqv (^3).list
18:13 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb, niecza v24-109-g48a8de3: OUTPUT«False␤»
18:13 TimToady say waht?
18:13 moritz list vs. Parcel?
18:14 TimToady perl6: say <0 1 2>».Int.list eqv (^3).list
18:14 camelia niecza v24-109-g48a8de3: OUTPUT«False␤»
18:14 camelia ..rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«True␤»
18:14 moritz p6: say  <0 1 2>».Int.^name
18:14 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«Parcel␤»
18:14 camelia ..niecza v24-109-g48a8de3: OUTPUT«Array␤»
18:14 moritz .oO( eqv surprises even TimToady )
18:14 TimToady well, eqv and === are designed to be picky
18:14 TimToady my flu-enhanced brane is no match
18:16 vendethiel TimToady: may I ask, is there a "full list of operators with examples", or are synopsis the best read for that ?
18:16 TimToady perl6: say [<0 1 2>».Int] eqv [^3]
18:16 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb, niecza v24-109-g48a8de3: OUTPUT«True␤»
18:16 TimToady the synopses won't give a lot of examples; RC is better for examples, but of course, is not indexed by operator used
18:17 PerlJam p6: say @(<0 1 2>».Int) eqv @((^3))
18:17 TimToady maybe someone should remedy that...
18:17 camelia niecza v24-109-g48a8de3: OUTPUT«False␤»
18:17 camelia ..rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«True␤»
18:17 PerlJam oops, too many parens
18:17 TimToady @ only guarantees positional, it doesn't guarantee a particular type as [] does
18:19 TimToady p6: say @(<0 1 2>).WHAT
18:19 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb, niecza v24-109-g48a8de3: OUTPUT«(List)␤»
18:20 TimToady p6: say @(^3).WHAT
18:20 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb, niecza v24-109-g48a8de3: OUTPUT«(List)␤»
18:20 PerlJam n: say @(<0 1 2>».Int).perl; say @(^3).perl;
18:20 camelia niecza v24-109-g48a8de3: OUTPUT«[val("0"), val("1"), val("2")].list␤(0, 1, 2).list␤»
18:21 Ayiko r: say (1 <<Z==>> (1,1,1,1,1)) # bug? it works with « »
18:21 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Missing << or >>â�¤at /tmp/tmpfile:1â�¤------> [32msay (1 <<Z==>>[33mâ��[31m (1,1,1,1,1)) # bug? it works with « »[0mâ�¤    expecting any of:…»
18:21 TimToady the problem there is that ==> is an operator, and wins under LTM
18:22 jnthn TimToady: Does that go away with our changing it to a sequencer, ooc?
18:22 TimToady r: say (1 <<[==]>> (1,1,1,1,1))
18:22 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«True True True True True␤»
18:22 jnthn TimToady: um, or statement sep, or whatever it become...
18:22 jnthn *became
18:23 TimToady that might fix that particular case
18:23 TimToady but => will still be an operator
18:24 TimToady not a problem here
18:24 TimToady anyway that's why we have the [op] disambiguating syntax
18:25 TimToady perl6: my @a = <a b c>; @a Z~= <x y z>
18:25 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb, niecza v24-109-g48a8de3: ( no output )
18:26 TimToady perl6: my @a = <a b c>; @a Z~= <x y z>; say @a
18:26 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«a b c␤»
18:26 camelia ..niecza v24-109-g48a8de3: OUTPUT«ax by cz␤»
18:26 TimToady perl6: my @a = <a b c>; @a [Z~]= <x y z>; say @a
18:26 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Preceding context expects a term, but found infix = instead�at /tmp/tmpfile:1�------> [32mmy @a = <a b c>; @a [Z~]=[33m�[31m <x y z>; say …»
18:26 camelia ..niecza v24-109-g48a8de3: OUTPUT«ax by cz␤»
18:26 TimToady perl6: my @a = <a b c>; @a Z[~=] <x y z>; say @a
18:26 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«a b c␤»
18:26 camelia ..niecza v24-109-g48a8de3: OUTPUT«ax by cz␤»
18:27 TimToady rakudo is not coming off very well here, compared to niecza++
18:27 Ayiko r: sub infix:<[Z==]>($a, $b) { $a != $b }; say (1 <<[Z==]>> (1,1,1,1,1))
18:27 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«False False False False False␤»
18:28 TimToady r: sub infix:<Z==>($a, $b) { $a != $b }; say (1 <<[Z==]>> (1,1,1,1,1))
18:29 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«False False False False False␤»
18:29 TimToady you get those brackets on the right for free
18:29 TimToady r: sub infix:<Z==>($a, $b) { $a != $b }; say (1 <<[[[[Z[==]]]]]>> (1,1,1,1,1))
18:29 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«True True True True True␤»
18:30 TimToady but overriding the built-in meanings of meta-operators is generally considered a bad idea
18:30 TimToady (except perhaps to optimize)
18:31 Ayiko I was optimizing for confusion :)
18:32 TimToady we already good at that
18:37 Ayiko I was optimizing for confusion :)
18:37 Ayiko eh
18:37 timotimo i fixed the warnings in DBIish and the tests still pass
18:37 Ayiko yay for 2 keyboards
18:37 colomon \o/
18:37 dalek DBIish: bf5de44 | (Timo Paulssen)++ | lib/DBDish/Pg.pm6:
18:37 dalek DBIish: use the now public errstr in one more place.
18:37 dalek DBIish: review: https://github.com/perl6/DBIish/commit/bf5de44646
18:37 moritz timotimo++
18:37 timotimo that was easy :P
18:38 Ayiko well, another question then: is (^1000).combinations supposed to be lazy, NYI or temporarily out of order?
18:38 timotimo combinations uses gather/take
18:38 timotimo as does permutations
18:39 Ayiko p: say (^50).combinations.first( { True } ).perl; say 'done'
18:39 camelia rakudo-parrot 04c4fb: OUTPUT«(timeout)»
18:39 timotimo :(
18:40 timotimo oh my
18:40 timotimo Missing or wrong version of dependency 'lib/MIME/Base64/PIR.pm6'
18:40 timotimo build stage failed for LWP::Simple: Failed building lib/LWP/Simple.pm
18:40 timotimo is there a known workaround for that?
18:40 telex joined #perl6
18:41 colomon there's a pure p6 Base64, I believe.
18:41 timotimo yeah, but a bit further up it said it successfully installed that.
18:41 colomon it's clearly trying to call the non-pure-p6 version.
18:41 timotimo yeah, but it's on parrot
18:42 colomon I guess that's not so much a "known workaround" as a "you might be able to do this with lots of work."
18:42 timotimo :o
18:42 ajr joined #perl6
18:43 TimToady combinations and permutations are supposed to be lazy, yes.
18:44 TimToady you very often want to use the in search-ish algorithms that want to short-circuit when they've found something
18:44 TimToady *them
18:45 TimToady r: say <a b c d e f g>.combinations(4)[^20]
18:45 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«a b c d a b c e a b c f a b c g a b d e a b d f a b d g a b e f a b e g a b f g a c d e a c d f a c d g a c e f a c e g a c f g a d e f a d e g a d f g a e f g␤»
18:45 TimToady r: say <a b c d e f g h i j k>.combinations(4)[^20]
18:45 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«a b c d a b c e a b c f a b c g a b c h a b c i a b c j a b c k a b d e a b d f a b d g a b d h a b d i a b d j a b d k a b e f a b e g a b e h a b e i a b e j␤»
18:45 TimToady r: say <a b c d e f g h i j k>.combinations(1..4)[^20]
18:45 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«a b c d e f g h i j k a b a c a d a e a f a g a h a i a j␤»
18:46 TimToady seems lazy here
18:46 TimToady r: say <a b c d e f g h i j k l m o p q r s t u v w x y z>.combinations(1..4)[^20]
18:46 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«a b c d e f g h i j k l m o p q r s t u␤»
18:46 TimToady r: say <a b c d e f g h i j k l m o p q r s t u v w x y z>.combinations(1..*)[^20]
18:46 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«a b c d e f g h i j k l m o p q r s t u␤»
18:46 TimToady r: say <a b c d e f g h i j k l m o p q r s t u v w x y z>.combinations()[^20]
18:46 TimToady yeah, bug
18:47 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«(timeout)»
18:47 TimToady r: say <a b c d e f g h i j k l m o p q r s t u v w x y z>.combinations(0..*)[^20]
18:47 kbaker joined #perl6
18:47 TimToady doesn't seem to want to start at 0
18:47 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«(timeout)»
18:47 TimToady is probably confusing the combinations sub into looping
18:49 vendethiel TimToady: just saw your answer, thanks. I read "RFC" first, but what's RC? rosetta code?
18:52 TimToady yes
18:53 TimToady except when it's "release candidate"
18:53 TimToady p: say <a b c>.combinations(0)
18:53 camelia rakudo-parrot 04c4fb: OUTPUT«␤»
18:54 vendethiel yes, definitely :). I'll try to go through some of these, even if I need to ctrl-f each time :P
18:54 TimToady p: say <a b c>.combinations(0..*)
18:54 camelia rakudo-parrot 04c4fb: OUTPUT«a b c a b a c b c a b c␤»
18:55 vendethiel TimToady: <a b> is ['a', 'b'] or ('a', 'b') ?
18:55 TimToady ()
18:55 Ayiko m: (^20).combinations(1..5)[^50].map: *.say
18:55 camelia rakudo-moar 04c4fb: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10​␤11␤12␤13␤14␤15␤16␤17␤18␤19␤0 1␤0 2␤0 3␤0 4␤0 5␤0 6␤0 7␤0 8␤0 9␤0 10␤0 11␤0 12␤0 13␤0 14␤0 15␤0 16␤0 17␤0 18␤0 19␤1 2␤1 3␤1 4␤1 5␤1 6␤1 7␤1 8␤…»
18:55 Ayiko m: (^20).combinations(1..5)[50].map: *.say
18:55 camelia rakudo-moar 04c4fb: OUTPUT«(timeout)»
18:56 Ayiko asking for 1 element is not lazy any more? :(
18:56 timotimo yeah, something must be wrong here
18:57 vendethiel Ayiko: was this syntax introduced recently ? (^20).combinations doesn't seem to work here
18:57 TimToady yes, it's recentish
18:57 japhb_ joined #perl6
18:57 timotimo ^20 is very old, but .combinations is new-ish
18:57 TimToady and combinations with a default of 0..* is even more recent
18:57 Ayiko last msi installer of star doesn't have it
18:58 timotimo right.
18:58 timotimo sounds about right, yeah :(
18:58 TimToady that's one of the reasons we're playing with it here...
18:59 vendethiel Ayiko: my question exactly :P
18:59 vendethiel ty
18:59 Ayiko so I'm running my perl6 in a fresh compile on a linux vm now (doesn't help performance when trying an encoder/decoder prog for all 1000! permutations)
19:00 jnap joined #perl6
19:01 TimToady 1000! is a big number
19:02 TimToady r: sub postfix:<!>($n) { [*] 2..$n }; say 1000!
19:02 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«40238726007709377354370243392300398571​937486421071463254379991042993851239862902059​204420848696940480047998861019719605863166687​299480855890132382966994459099742450408707375​991882362772718873251977950595099527612087…»
19:02 TimToady r: sub postfix:<!>($n) { [*] 2..$n }; say 1000!.chars
19:02 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«2568␤»
19:03 Ayiko I should wait for a few performance improvements then? :(
19:03 TimToady so about 25 googles
19:03 TimToady *googols
19:03 TimToady er, no, more than that
19:03 grondilu 25.68?
19:03 TimToady yeah :)
19:04 Ayiko and the encoder will fail way before reaching combinations of 950 elements I guess
19:04 TimToady this does not sound like a scalable solution to me
19:05 Ayiko the question at http://codegolf.stackexchange.com/questions/194​98/add-an-integer-to-a-set-and-take-it-back-out didn't set scalability as a requirement :)
19:05 moritz m: sub fac-len($x) { ceil ($x * $x.log - $x) / 10log }; say fac-len(1000)
19:05 camelia rakudo-moar 04c4fb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/VLqQFHTTav�Unable to parse expression in block; couldn't find final '}' �at /tmp/VLqQFHTTav:1�------> [32mc-len($x) { ceil ($x * $x.log - $x) / 10[33m�[31mlog }; say fac-len(1000)[0m� …»
19:05 moritz m: sub fac-len($x) { ceil ($x * $x.log - $x) / 10.log }; say fac-len(1000)
19:05 TimToady not without some way to short circuit entire sets of subpermutations
19:05 camelia rakudo-moar 04c4fb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/b2FD2S0bmaâ�¤Undeclared routine:â�¤    ceil used at line 1â�¤â�¤Â»
19:05 moritz m: sub fac-len($x) { ceiling ($x * $x.log - $x) / 10.log }; say fac-len(1000)
19:05 camelia rakudo-moar 04c4fb: OUTPUT«2566␤»
19:06 moritz m: say (2568 - 2566) / 2578
19:06 camelia rakudo-moar 04c4fb: OUTPUT«0.000776␤»
19:06 moritz m: say (2568 - 2566) / 2568
19:06 camelia rakudo-moar 04c4fb: OUTPUT«0.000779␤»
19:06 TimToady it's bad enough trying to solve http://rosettacode.org/wiki/ABC_Problem with permutations
19:06 moritz pretty good approximation for a physicst :-)
19:07 grondilu you forgot 1/2*log(2*pi*$x)
19:07 TimToady that's because he's a physicist :P
19:08 moritz grondilu: that's only O(log($x))
19:08 grondilu well yeah, I guess that does not matter indeed.
19:10 grondilu m: sub fac-len($x) { ceiling ($x * $x.log - $x + .5*log(2*pi*$x)) / 10.log }; my $y = fac-len(1000); say ($y - 2568) / 2568;   # just to check, though
19:10 camelia rakudo-moar 04c4fb: OUTPUT«0␤»
19:11 TimToady physicists only really believe in 0, 1, 2, i, and occasionaly pi
19:11 TimToady e can be derived from those...
19:12 timotimo .o( supermutations? )
19:12 TimToady hence it was a great shock to them when quarks showed up with fractional charges
19:13 Sqirrel joined #perl6
19:15 moritz well, it was 1 / (1 + 2) after all :-)
19:20 TimToady indeed
19:21 TimToady oh, they also believe in c, but they always set it to 1, so it doesn't matter
19:28 * colomon is finding it very hard to focus on $work after spending the first five hours of the day reading aloud to his son.
19:29 PerlJam colomon: just read your work aloud to your son next time  :)
19:29 timotimo wow, five hours of reading?
19:29 colomon PerlJam: I suspect he would definitely prefer another Patricia Wrede book.
19:30 colomon timotimo: 255 page book, we started it sometime after he got home from preschool yesterday afternoon and finished it just in time to leave for preschool today.
19:31 moritz colomon: time for you son to learn reading himself :-)
19:32 PerlJam My 8 yr old son yesterday read a 100+ page book in a few hours.  It's amazing what can happen when you take away the XBox and Nintendo DS  ;)
19:33 colomon moritz: I wouldn't object to it.  :)
19:33 timotimo hah
19:37 smls What facilities does P6 provide for validating/postprocessing things assigned to lvalue methods?
19:38 smls IMO lack of such facilities was the reason why lvalue routines never really caught on in Perl 5 outside of the built-in ones like substr.
19:39 smls But P6 uses them for 'has $.foo is rw', with the official reasoning (afaik) that the attribute is still private and the accessor only an autogenerated method that the author of the class may replace with a custom one in the future without breaking backwards compatibility.
19:39 timotimo smls: you can have Proxy, as well as a "where" type constraint on the variable
19:40 * PerlJam isn't sure where "postprocessing" fits in with lvalue assignment.
19:41 smls ah ok, there's something about Proxy's in S06
19:41 timotimo "Proxies"
19:41 timotimo 's is for genitive, not for plurals :)
19:41 smls :)
19:41 timotimo er ... no, that's german
19:41 smls PerlJam: what if the underlying representation of the class changes?
19:43 smls e.g. you used to implement all your attributes using the normal syntax, but later decide to combine multiple ones into a single array attribute without changing their accessor APIs
19:45 berekuk joined #perl6
19:47 PerlJam oh, I guess it's just a point-of-view difference.   I'd call that "preprocessing"  (what you do to the assigned value in order so that it fits in the appropriately shaped slots)
19:48 smls fair enough
19:48 jnap joined #perl6
19:51 smls r: my @a = 1, 2, 3; sub a0 is rw { @a[0] }; a0() = 5; say @a;
19:51 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«5 2 3␤»
19:51 smls ^^ ok so apparently in the example I gave, a proxy wouldn't even be necessary... :)
19:52 colomon r: my @a = 1, 2, 3; sub a0 is rw { @a[0] }; a0(= 5; say @a;
19:52 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Preceding context expects a term, but found infix = instead�at /tmp/tmpfile:1�------> [32m = 1, 2, 3; sub a0 is rw { @a[0] }; a0(=[33m�[31…»
19:53 colomon r: my @a = 1, 2, 3; sub a0 is rw { @a[0] }; a0 = 5; say @a;
19:53 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Preceding context expects a term, but found infix = instead�at /tmp/tmpfile:1�------> [32m = 1, 2, 3; sub a0 is rw { @a[0] }; a0 =[33m�[31…»
19:53 colomon () needed.  hmm.
19:53 smls probably not when it's a method though
19:54 colomon r: class A { has @.a; method a is rw { @.a[0]; }; }; my $a = A.new; $a.a = 10; say $a.a
19:54 camelia rakudo-moar 04c4fb: OUTPUT«(timeout)»
19:54 camelia ..rakudo-jvm 04c4fb: OUTPUT«java.lang.StackOverflowError␤␤»
19:54 camelia ..rakudo-parrot 04c4fb: OUTPUT«maximum recursion depth exceeded␤current instr.: 'print_exception' pc 138749 (src/gen/p-CORE.setting.pir:59212) (gen/parrot/CORE.setting:10940)␤called from Sub 'a' pc 186 ((file unknown):113) (/tmp/tmpfile:1)␤called from Sub 'a' pc 208 ((file unkno…»
19:54 colomon r: class A { has @.b; method a is rw { @.b[0]; }; }; my $a = A.new; $a.a = 10; say $a.a
19:54 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«10␤»
19:55 colomon nice
19:55 smls yep
19:55 PerlJam r: class A { has @.a; method a is rw { @!a[0]; }; }; my $a = A.new; $a.a = 10; say $a.a
19:55 camelia rakudo-parrot 04c4fb, rakudo-jvm 04c4fb, rakudo-moar 04c4fb: OUTPUT«10␤»
19:55 PerlJam FYI
19:55 colomon PerlJam++
19:59 vendethiel Uuh, what's <<[Z==]>> ? "Just" a combinations of "<<", (a combination of "Z" and "==") and ">>" ?
20:00 PerlJam vendethiel: It's a hypered Z==
20:00 colomon Z== is the zip numeric equality tester
20:00 colomon [Z==] is the same
20:00 vendethiel that I know, the other part I don't :p
20:00 Ayiko m: say ((1,10) <<+>> (3,4,5))
20:00 camelia rakudo-moar 04c4fb: OUTPUT«4 14 6␤»
20:00 colomon and <<   >> around it hypers it, as PerlJam says
20:01 colomon presumably it would compare arrays of lists.
20:02 vendethiel okay, so if list A is longed than list B, when B is done it'll just call the operator with A[n] and B[*-1]
20:04 Ayiko B[0] again, repeats the shorter list
20:04 Ayiko m: say ((1,10) <<+>> (3,4,5,6,7))
20:04 camelia rakudo-moar 04c4fb: OUTPUT«4 14 6 16 8␤»
20:05 vendethiel OH. Okay ! Thanks Ayiko
20:05 Ayiko m: say ((1,10) >>+>> (3,4,5,6,7))
20:05 camelia rakudo-moar 04c4fb: OUTPUT«4 14␤»
20:05 vendethiel compared to X that will, on the other hand, generate every possible value
20:05 Ayiko m: say ((1,10) <<+<< (3,4,5,6,7))
20:05 camelia rakudo-moar 04c4fb: OUTPUT«4 14 6 16 8␤»
20:05 vendethiel yeah I'm on the wiki, I saw that =)
20:06 vendethiel nice nice, thanks. wrapping my head around it
20:08 itz woot! nearly FOSDEM
20:16 xenoterracide joined #perl6
20:23 Rotwang joined #perl6
20:28 jeffreykegler left #perl6
20:32 eternaleye joined #perl6
20:33 kaare_ joined #perl6
20:35 kaare__ joined #perl6
20:39 kivutar joined #perl6
20:40 kaare_ joined #perl6
20:41 sqirrel_ joined #perl6
20:44 prammer joined #perl6
20:46 kaare_ joined #perl6
20:51 wdnch joined #perl6
20:51 wdnch hey guys
20:51 wdnch i have a quick question. who can help me?
20:51 colomon o/
20:51 colomon what do you want to ask?
20:51 * colomon may not be able to help, but probably someone will
20:52 wdnch i wrote a python code which using basic regex
20:52 jnap joined #perl6
20:52 wdnch i tried to change datetime format like dd-mm-yy to mm-dd-20yy
20:53 wdnch but my code convert 01/30/1401 to 30-01-201401
20:54 FROGGS wdnch: do you want to fiddle with a string or do you want to work with a datetime object?
20:54 kaare_ joined #perl6
20:56 rurban1 joined #perl6
20:57 [Coke] joined #perl6
20:58 FROGGS but 01/30/1401 is not dd-mm-yy
20:58 FROGGS that looks more like mm/dd/yyww
20:58 FROGGS no, strip the ww
20:58 FROGGS p: say "01/30/1401" ~~ / [\d\d]+ % '/' /
20:58 FROGGS what's up with camelia?
20:58 camelia rakudo-parrot 04c4fb: OUTPUT«「01/30/14」␤␤»
20:58 * [Coke] 's screen apparently just freaked out on feather.
20:58 FROGGS wdnch: the above should work (for a certain definition of "work")
20:58 FROGGS p: say "01/30/1401" ~~ / [\d\d?]+ % '/' / # maybe better
20:58 camelia rakudo-parrot 04c4fb: OUTPUT«「01/30/14」␤␤»
20:59 FROGGS p: say "01/30/1401" ~~ / (\d\d?)+ % '/' / # with captures
20:59 camelia rakudo-parrot 04c4fb: OUTPUT«「01/30/14」␤ 0 => 「01」␤ 0 => 「30」␤ 0 => 「14」␤␤»
20:59 wdnch actually it is better to dont change if 2digit/2digit/2digit format
21:01 wdnch some strings is like "0101/30/14" or "30/30/14a"
21:01 FROGGS p: my regex dd { \d\d }; say "01/30/1401" ~~ / <m=.dd> '/' <d=.dd> '/' <y=.dd> / # with named captures
21:01 camelia rakudo-parrot 04c4fb: OUTPUT«「01/30/14」␤ m => 「01」␤ d => 「30」␤ y => 「14」␤␤»
21:03 FROGGS [Coke]: kill it with fire :P
21:03 FROGGS p: my regex dd { \d\d }; say "0101/30/14" ~~ / <m=.dd> '/' <d=.dd> '/' <y=.dd> /
21:03 FROGGS p: my regex dd { \d\d }; say "30/30/14a" ~~ / <m=.dd> '/' <d=.dd> '/' <y=.dd> / # 30 months might be a bit much though
21:03 camelia rakudo-parrot 04c4fb: OUTPUT«「01/30/14」␤ m => 「01」␤ d => 「30」␤ y => 「14」␤␤»
21:03 camelia rakudo-parrot 04c4fb: OUTPUT«「30/30/14」␤ m => 「30」␤ d => 「30」␤ y => 「14」␤␤»
21:03 smls wdnch: Python uses a different regex syntax than Perl 6 though, so if you're trying to implement this in Python you'll probably get better help on a channel dedicated to that lnaguage.
21:03 treehug8_ joined #perl6
21:03 benabik joined #perl6
21:04 wdnch is it true usage froggs? (r'\.dd/\.dd/\.dd', string)
21:07 FROGGS true
21:07 FROGGS wdnch: I have no idea about Python, sorry
21:08 wdnch ok thanks a lot anyway
21:12 raiph joined #perl6
21:13 wdnch left #perl6
21:17 dayangkun_ joined #perl6
21:17 dalek perl6-roast-data: 23bd17b | coke++ | / (3 files):
21:17 dalek perl6-roast-data: today (automated commit)
21:17 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/23bd17b4c3
21:19 rurban1 joined #perl6
21:30 rurban1 joined #perl6
21:33 beastd joined #perl6
21:36 bjz joined #perl6
21:43 panchiniak joined #perl6
21:44 virtualsue joined #perl6
21:46 erkan joined #perl6
21:46 erkan joined #perl6
21:46 smls joined #perl6
21:48 FOSScookie joined #perl6
21:49 FOSScookie left #perl6
21:53 jnap joined #perl6
22:03 ajr joined #perl6
22:10 berekuk joined #perl6
22:12 tgt joined #perl6
22:15 masak 'night, #perl6
22:15 diakopter o/
22:19 tadzik timotimo: I am
22:20 tadzik timotimo: (the star releaser)
22:20 tadzik the release date is tomorrow :)
22:20 tadzik I sort of hoped that module failures will go away
22:20 berekuk joined #perl6
22:22 diakopter just don't include failing ones :)
22:23 tadzik or checkout older revisions :)
22:23 tadzik tomorrow is opensource day
22:24 spider-mario joined #perl6
22:39 [Coke] do the star instructions indicate that you should try to pull the latest version of the odules?
22:40 tadzik not sure
22:40 tadzik I never did Star before :o
22:45 BenGoldberg joined #perl6
22:50 arnsholt joined #perl6
22:53 jnap joined #perl6
22:56 * lue wonders if Perl6::MIME::Base64 still needs special treatment.
22:57 tadzik it does for panda :/
22:58 lue tadzik: so the ATTENTION I put in the release guide probably still applies then.
22:58 tadzik okayo

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

Perl 6 | Reference Documentation | Rakudo