Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-01-21

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 skids Damn I missed that whole fun role discussion.
00:02 vendethiel is claim speeced?
00:02 * vendethiel would like to read up the exact semantics :)
00:02 masak not spec'd yet.
00:03 masak I think the best two sources right now are Ovid's perl6/specs issue, and the recent backlog.
00:03 TimToady such as "you didn't hear it from me"
00:05 skids class A does B[1] does B[2] { method meth_in_both_Bs { ...how do we say we want to use B[1]'s meth_in_both_Bs... } # this needs syntax
00:06 skids maybe something like "class C does B[1] as FOO does B[2] as BAR { method x () { BAR::x() } }
00:07 TimToady std: role B[$x] { ... }; class Foo does B[1] does B[2] { method foo { self.B[1]::foo() } }
00:07 camelia std f9b7f55: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Confused at /tmp/J4OfS_nRYe line 1:â�¤------> [32mB[1] does B[2] { method foo { self.B[1]:[33mâ��[31m:foo() } }[0mâ�¤    expecting any of:â�¤    coloncircumfixâ�¤ signatureâ�¤Parse failedâ�¤FAILED 00:01 142mâ�¤Â»
00:07 TimToady hmm
00:07 TimToady well, one could alias to simple names first
00:07 skids ^^
00:08 jnthn hah
00:08 * TimToady would rather use existing alias stuff
00:08 jnthn Stage parse      : Method 'log' must be resolved by class Int because it exists in multiple roles (Numeric, Real)
00:09 * TimToady snerks
00:09 TimToady Name it and claim it!
00:09 masak oh noes, what have we created
00:09 TimToady so clarity!
00:10 TimToady such rigorous!
00:10 masak much disambig
00:11 jnthn We'll see how many I end up with :)
00:11 TimToady as long as you always end up with :) you'll do fine
00:11 masak you're getting them one at a time? have fun. :P
00:12 jnthn I'm really not expecting all that many :P
00:12 TimToady sorry to worry you about the panic
00:12 TimToady hope it didn't throw you...
00:13 masak puns to die for
00:13 TimToady jnthn will remain composed
00:13 * masak .oO( nobody excepts the punnish inquisition! )
00:14 TimToady who asked?
00:14 masak the Punns.
00:14 TimToady you're not supposed to answer a rhetorical puns
00:15 TimToady *pun
00:15 skids punnish inquision is insquisitionately punnful
00:17 TimToady except pun it's not
00:17 vendethiel TimToady: won't work (aliasing)
00:18 TimToady std: role B[$x] { method foo {} }; constant B1 = B[1]; constant B2 = B[2]; class Foo does B1 does B2 { method foo { self.B1::foo() } }
00:18 camelia std f9b7f55: OUTPUT«ok 00:01 142m␤»
00:19 TimToady if not, it would be fore semantic reasons, not syntactic
00:19 TimToady *for
00:19 skids My only problem with that is yoru role parameters can be large, so it's a DRY violation.
00:20 vendethiel well, it won't work because NYI
00:21 TimToady m: role B[$x] { method foo { say $x } }; constant B1 = B[1]; constant B2 = B[2]; class Foo does B1 does B2 { method foo { self.B1::foo() } }
00:21 camelia rakudo-moar f9cb17: ( no output )
00:21 TimToady m: role B[$x] { method foo { say $x } }; constant B1 = B[1]; constant B2 = B[2]; class Foo does B1 does B2 { method foo { self.B1::foo() } }; Foo.new
00:21 camelia rakudo-moar f9cb17: ( no output )
00:21 TimToady m: role B[$x] { method foo { say $x } }; constant B1 = B[1]; constant B2 = B[2]; class Foo does B1 does B2 { method foo { self.B1::foo() } }; Foo.new.foo
00:21 camelia rakudo-moar f9cb17: OUTPUT«1␤»
00:21 TimToady there you go, implemented just fine
00:21 skids That works.
00:22 skids OK, so we do have syntax for that.
00:23 TimToady maybe an 'is cached' on the role would help B[1] to work as reference to existing instantiation
00:24 TimToady or is that the mixin cache jnthn++ was already talking about?
00:25 jnthn That's very much related to the stuff I'm doing, yes
00:27 skids m: class A { }; A.HOW.WHAT.say; role B { }; B.HOW.WHAT.say; constant C = B; C.HOW.WHAT.say # \o/ and it wasn't punning behind our backs.
00:27 camelia rakudo-moar f9cb17: OUTPUT«(Perl6::Metamodel::ClassHOW)␤(Perl6::Metamodel::ParametricRoleGroupHOW)␤(Perl6::Metamodel::ParametricRoleGroupHOW)␤»
00:31 skids Though I guess it would have blown up if it was punning because does vs is.
00:33 TimToady m: class A {}; class B does A {}  # just checking
00:33 camelia rakudo-moar f9cb17: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/fuANEJ1007�A is not composable, so B cannot compose it�at /tmp/fuANEJ1007:1�------> �»
00:34 TimToady tra la la BOOM dee ay!
00:37 dalek rakudo/claim-prototype: 2f91a50 | jnthn++ | src/Perl6/Actions.nqp:
00:37 dalek rakudo/claim-prototype: Claiming a proto is OK.
00:37 dalek rakudo/claim-prototype: review: https://github.com/rakudo/rakudo/commit/2f91a50892
00:37 dalek rakudo/claim-prototype: c326906 | jnthn++ | src/core/ (4 files):
00:37 dalek rakudo/claim-prototype: Add claim as needed in some CORE.setting roles.
00:37 dalek rakudo/claim-prototype: review: https://github.com/rakudo/rakudo/commit/c3269060d0
00:37 dalek rakudo/claim-prototype: 3946ec8 | jnthn++ | src/Perl6/Metamodel/ (4 files):
00:37 dalek rakudo/claim-prototype: Make claim inside of a role work.
00:37 dalek rakudo/claim-prototype:
00:37 dalek rakudo/claim-prototype: This doesn't make it work yet inside of a class, and private methods
00:37 dalek rakudo/claim-prototype: will need a look (some factoring out needed, no doubt). But it should
00:37 dalek rakudo/claim-prototype: let us explore the idea some more.
00:37 dalek rakudo/claim-prototype: review: https://github.com/rakudo/rakudo/commit/3946ec8f7d
00:38 jnthn > role A { method m() { } }; role B does A { method m() { } }; class C does B { }
00:38 jnthn Method 'm' must be resolved by class C because it exists in multiple roles (A, B)
00:38 jnthn > role A { method m() { } }; role B does A { claim method m() { } }; class C does B { }
00:38 jnthn (no complaints)
00:38 TimToady \o/
00:38 skids So... how does all the above apply to attributes...
00:38 skids jnthn++
00:39 TimToady if C also does A does it blow up again
00:39 jnthn TimToady: Not yet, because I didn't implement the bits needed for "claim" inside of class to work.
00:40 TimToady role A { method m() { } }; role B does A { claim method m() { } }; class C does B does A { } # should blow up anyway
00:40 jnthn skids: No changes there.
00:40 TimToady there's no claim inside of class, so not sure what you mean
00:40 jnthn > role A { method m() { } }; role B does A { claim method m() { } }; class C does B does A { }
00:40 jnthn Method 'm' must be resolved by class C because it exists in multiple roles (A, B)
00:40 TimToady okay, good
00:40 jnthn TimToady: Yer right, I misread :)
00:41 TimToady that was my "you didn't hear it from me" policy
00:42 jnthn I still have some beer left so I guess I can look at patching things so claim works inside of class also
00:42 TimToady but aren't they always claimed?
00:42 TimToady wrt roles?
00:43 TimToady or are you thinking wrt ancestral classes?
00:43 jnthn Oh, hmm
00:43 jnthn Well, it depends what we want
00:43 jnthn role A { method m() { } }; class C does A { method m() { } }
00:43 jnthn Does that method decl need "claim"?
00:43 TimToady not currently
00:43 jnthn I know that! Nothing needed it a few minutes ago :P
00:43 TimToady we assume claim semantics for classes vs roles already
00:44 jnthn OK, if we'll not make that need claim then my work here is done... :)
00:44 TimToady but someone could 'use claim-jumping;' or so and require claim on overrides of ancestral methods
00:44 skids mixins?
00:45 TimToady mixins are just run-time composition
00:45 jnthn skids: Mixins use the normal role composition code.
00:46 skids so do they have to claim to override a class method?
00:46 jnthn No
00:46 skids And if they do claim, that's fine too?
00:46 jnthn Mixin = create an anonymous subclass that composes the role(s) being mixed in, and switch the type of the object being mixed into to it.
00:47 TimToady claim only relates to the ancestors of the role
00:47 TimToady the new anonymous class behaves as a class, not a role
00:47 TimToady so doesn't need any claim tostake its claim
00:47 TimToady class warfare, and all that
00:48 TimToady .oO("Tut, tut.  Nobody goes there anymore, it's too crowded.")
00:48 jnthn TimToady: Other questions to ponder: should an unrequired "claim" be a warning/error, and should I make claim not usable in classes by default (that is, you have to do a MOP-extending module for it to work)?
00:49 jnthn At the moment it lets you write class C { claim method m() { } } even though it means nothing...which is probably not so great. :)
00:49 TimToady a warning seems reasonable, and claim is currently role specific
00:49 jnthn OK
00:50 dalek rakudo/claim-prototype: c08695c | jnthn++ | src/Perl6/Metamodel/ClassHOW.nqp:
00:50 dalek rakudo/claim-prototype: claim is currently only for roles.
00:50 dalek rakudo/claim-prototype:
00:50 dalek rakudo/claim-prototype: At least, in the default MOP.
00:50 dalek rakudo/claim-prototype: review: https://github.com/rakudo/rakudo/commit/c08695cacf
00:51 jnthn Hm, maybe I should write the MOP module to make it meaningful in classes as part of my FOSDEM talk on twiddling knobs... :)
00:51 jnthn It's about 2am so the warning can wait. :) And I'll leave the branch for interested folks to evaluate.
00:52 masak jnthn++
00:52 skids o/
00:52 * TimToady is late for his nap too...
00:52 jnthn We shouldn't land it until after the Thursday release.
00:52 TimToady Bam! says Chef Jnthn.
00:52 jnthn 'cus it'll probably have some ecosystem fallout - or at least, we don't have time to evaluate that.
00:56 silug joined #perl6
00:56 risou_awy joined #perl6
00:57 skids m: role A [ $x ] is cached { }
00:57 masak oh, it will.
00:57 camelia rakudo-moar f9cb17: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/uUlJ5ZWG6t�'A' cannot inherit from 'cached' because it is unknown.�at /tmp/uUlJ5ZWG6t:1�------> �»
00:57 masak I'm currently working on code it will affect.
00:58 jnthn That's what you claim!
00:58 masak :P
00:59 masak 'night, #perl6
00:59 skids o/
01:00 jnthn I should prolly rest also
01:00 jnthn 'night o/
01:08 Timbus joined #perl6
01:14 yeahnoob joined #perl6
01:20 Alina-malina joined #perl6
01:24 vendethiel too much backlog, can somebody sum up what claim does?
01:24 vendethiel say "the one I got from a role doesn't matter?"
01:39 dayangkun joined #perl6
01:40 vendethiel think I got it from the commit -- it's the role's role (ha) to mark a method as "taking precedence over others imported from other roles"
01:41 TimToady momentarily give me the override authority of a class here, but then I'm just a role again
01:41 dalek doc: 08b6365 | skids++ | lib/Language/traps.pod:
01:41 dalek doc: Add simple trap example for Captures
01:41 dalek doc: review: https://github.com/perl6/doc/commit/08b6365519
01:42 vendethiel m: role A { method x { 1 } }; role B { claim method x { 2 } }; class C does A does B { }; say C.new.x
01:42 camelia rakudo-moar f9cb17: OUTPUT«===SORRY!===␤None of the parametric role variants for 'B' matched the arguments supplied.␤Cannot invoke null object␤»
01:42 vendethiel ^ TimToady?
01:42 TimToady NYI except in a branch
01:42 vendethiel yeah I know, I mean -- is the 2 supposed to pop up?
01:43 TimToady no, that's still ambiguous
01:43 vendethiel ha
01:43 TimToady leave out the 'does A' on teh class
01:43 TimToady then it should work
01:43 TimToady jnthn showed it working like that above
01:43 vendethiel and B should do A?
01:43 TimToady right
01:43 TimToady yeah
01:44 TimToady you can't claim from cousins, only from direct role ancestors
01:44 vendethiel alright, I see. as "role inheritance" is implemented as "copy-pasting", you need a way to say "hey I don't care about my precedessors"
01:44 vendethiel s/ced/dec/
01:45 TimToady basically you only do this to make a role that encompasses and compensates for other badly designed roles
01:46 TimToady "pretend those roles did this"
02:23 chenryn joined #perl6
02:42 chenryn joined #perl6
02:58 chenryn joined #perl6
03:18 Psyche^ joined #perl6
03:36 chenryn joined #perl6
03:40 d^_^b joined #perl6
03:40 dj_goku joined #perl6
03:47 ggherdov joined #perl6
03:53 Alina-malina joined #perl6
03:55 noganex joined #perl6
03:58 fhelmberger joined #perl6
04:13 anaeem1_ joined #perl6
04:16 chenryn joined #perl6
04:23 adu joined #perl6
04:23 pnu joined #perl6
04:26 anaeem1_ joined #perl6
04:27 ggherdov joined #perl6
04:51 chenryn joined #perl6
05:13 chenryn_ joined #perl6
05:37 chenryn_ joined #perl6
06:01 chenryn_ joined #perl6
06:31 yeahnoob joined #perl6
06:32 yeahnoob joined #perl6
06:33 yeahnoob joined #perl6
06:33 yeahnoob joined #perl6
06:40 bjz joined #perl6
06:42 Rounin joined #perl6
07:14 chenryn_ joined #perl6
07:26 jluis joined #perl6
07:28 bjz joined #perl6
07:28 dalek roast: 8c62c13 | TimToady++ | S02-types/pair.t:
07:28 dalek roast: colon invocant test no longer needs to be skipped
07:28 dalek roast: review: https://github.com/perl6/roast/commit/8c62c138e8
07:28 kaleem joined #perl6
07:31 yeahnoob joined #perl6
07:34 gfldex joined #perl6
07:38 bjz joined #perl6
07:41 FROGGS joined #perl6
07:55 * FROGGS believes that our signatures, gradual types, and even things that ought to be too simple to be very useful (enums), are all most awesome...
07:55 FROGGS method c14n(Bool :$comments = False, Str :$xpath, xmlC14NMode :$exclusive = XML_C14N_1_1, :@inc-prefixes) {
07:55 FROGGS [...]
07:55 FROGGS my $bytes = xmlC14NDocDumpMemory(self.doc, $nodes, +$exclusive, $prefixes, +$comments, $result);
07:56 FROGGS (xmlC14NMode is an enum)
07:57 dayangkun joined #perl6
07:57 moritz "surprisingly awesome"
07:57 bjz joined #perl6
07:57 rindolf joined #perl6
07:59 FROGGS moritz: yes, when I do real life coding (rather then working on the compiler), I am often astonished how convenient Perl 6 is
08:05 xprime joined #perl6
08:27 darutoko joined #perl6
08:32 sergot morning o/
08:33 FROGGS TimToady: S02:3720 needs to be revised for object hash constructors, right?
08:33 synopsebot Link: http://perlcabal.org/syn/S02.html#line_3720
08:33 FROGGS though my browser shows that thewrong anchor
08:33 FROGGS TimToady: the line I am talking about is: "    '' => { .say }      :{ .say }       adverbial block (not allowed on names)"
08:34 Kristien joined #perl6
08:35 zakharyas joined #perl6
08:35 arnsholt FROGGS++ # LibXML!
08:37 FROGGS arnsholt: is is fun, really :o)
08:37 FROGGS (especially because it works well)
08:38 xinming_ joined #perl6
08:40 arnsholt Even better!
08:49 virtualsue joined #perl6
08:50 abraxxa joined #perl6
08:54 virtualsue_ joined #perl6
09:20 Kristien Why is it that I get an infinite list when I pass the output of Z to map, but not if I don't?
09:20 Kristien https://gist.github.com/rightfold/17f8814b9d77edadd987
09:20 Kristien I expected it to print (Pair) just four times
09:22 telex joined #perl6
09:23 masak good antenoon, #perl6
09:24 masak Kristien: me too.
09:24 masak looks like a bug.
09:24 Kristien It also happens when I don't use ==>
09:27 kjs_ joined #perl6
09:28 molaf__ joined #perl6
09:31 Hor|zon_ joined #perl6
09:33 dakkar joined #perl6
09:37 rurban joined #perl6
09:39 jnthn morning, #perl6
09:39 mvuets joined #perl6
09:40 nwc10 good UGT, jnthn
09:40 nwc10 how are your coffee supplies?
09:41 sjn Universal Greeting Time <3
09:42 jnthn Coffee supplies are very low, but enough for the bootstrap cup :)
09:42 jnthn And I need to go shopping for lunch anyways. :)
09:55 Rounin That was a good idea
09:57 Rounin We could try to invent some location-independent names for IRC usage, though... Like, "good boring"
09:57 moritz Rounin: not necessary. It's *always* morning in UGT
09:57 Rounin moritz: Amazing!
09:57 Rounin I believe thou art a sage.
09:57 moritz ... except when you go to sleep, then it's always evening/night
09:58 Rounin I should tell this to my boss
09:58 Rounin No more coming in at reasonable hours
09:58 moritz create your own time zone, in which all hours are reasonable
09:59 Rounin That would be nice... With enough night owls, we could even offer 24/7 customer support
09:59 Rounin ... At least, a certain amount of the time, assuming someone came in at each hour
10:00 moritz geographically diverse companies make use of time zones so that many ops teams don't have to do night shifts
10:02 Rounin Yes... Unfortunately, we're a Swedish company, and I'm in Norway, which is in the same time zone
10:03 Rounin I'm pretty sure I could walk to Sweden without stopping to sleep, even... Though it's a stretch
10:03 moritz start an office in Hong Kong and one in the US, and you're good :-)
10:03 moritz (easier said than done, I know)
10:04 Rounin We're probably working on it, hehe... Today, Norway, tomorrow, the world
10:04 ab5tract Kristien: it isn't clear to me what's going on there
10:04 ab5tract i haven't dug into the Whatever wizardry much yet
10:05 ab5tract ah, masak++ already mentioned that it's probably a bug
10:10 fhelmberger joined #perl6
10:13 kjs_ joined #perl6
10:17 El_Che jnthn: I will make your fosdem talk +5m longer for estethic reasons (so it shows 10.30-19 in the schedule overview)
10:17 El_Che jnthn: but you are not getting it :)
10:17 jnthn I'm talking for 8.5 hours?!
10:17 btyler bring some water
10:18 btyler and maybe a phonebook to read
10:18 El_Che mm, system doesn't allow it
10:19 El_Che jnthn: whatever time you need man :)
10:19 ab5tract has anyone ever recited entire Apocalypses in public? :)
10:19 El_Che filibustering the devroom? don't put idea's in this guys' minds :)
10:19 jnthn :D
10:20 El_Che I was looking at the schedule and we have a 10:30-18:55 program (until 19:00 allowed)
10:21 jnthn But that's surely a marketing opportunity? "Attend our track's final talk, and you've a 5 minute advantage on getting to the pub!"
10:21 El_Che autch. The ruby devroom only has talkes between 11:10-16:30
10:23 El_Che java has a two day full program. Those guys are verbose :)
10:26 El_Che jnthn: so it's up to you to keep people enthused about perl6 until TimToady's talk sunday :)
10:26 jnthn Takes a while to configure the PresenterObserver, which obvious is done by a PresenterObserverBuilder obtained from a PresenterObserverBuilderFactory...
10:26 Kristien jnthn: http://docs.spring.io/spring-framework/docs/2.5.x/api/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.html
10:27 El_Che The PresenterObserverBuilderFactory has its issues in openjdk so we ending using the oracle jvm after signing a NDA document and sacrificing all our goats in front of their lawyers
10:28 jnthn Kristien: Didn't do Spring, but have worked with enough large Java codebases to know I wasn't even exagerating. :)
10:29 El_Che where do you put Spring in your cv? Java-expert or XML-expert? :)
10:32 arnsholt El_Che: Masochist =p
10:33 jnthn So, same section as "Perl 6 compiler implementor"? :)
10:34 rindolf joined #perl6
10:34 Kristien El_Che: under "Favourite Season"
10:36 moritz as "last name" for me :-)
10:37 Kristien I'd love to have Perl on the JVM, though.
10:37 moritz (my family name, "Lenz", is an old-ish German word for spring)
10:38 El_Che moritz: so you will port spring to p6? :)
10:39 moritz El_Che: not likely :-)
10:39 El_Che (nowadays it required less xml as it used to do thx to annotations)
10:40 El_Che (the modern dutch word for Spring is "Lente")
10:41 Kristien As a Dutch person I can confirm that.
10:41 jnthn Kristien: I guess you already know that the Rakudo Perl 6 compiler can run on/produce code for the JVM? :)
10:41 Kristien Yeah, but I don't know more about it than that, e.g. w.r.t. Java interop.
10:42 jnthn psch++ here has been doing a lot of work on that lately
10:44 jnthn https://github.com/peschwa/eigmip6/blob/master/tritone-in-c.pl6 was an example recently posted here
10:46 Kristien shiny
10:46 Kristien "# boilerplate starts here"
10:49 nwc10 I like jnthn's plan for what to do with the 5 minutes
10:54 FROGGS "El_Che: java has a two day full program. Those guys are verbose :)" -- That was also my thought :D
10:55 Kristien ab5tract: here is a more clear example:
10:55 Kristien https://gist.github.com/rightfold/c6073a4af093edac2f35
10:55 El_Che FROGGS: well, once the VM is started, they are pretty fast :)
11:01 denis_boyun_ joined #perl6
11:04 vendethiel Kristien: oh, you're rightfold? long time no see
11:04 Kristien yeah, who are you? :P
11:05 vendethiel Kristien: 'think I was vendethiel as well on stackoverflow's c++ chat thingie
11:05 vendethiel well, "c++", that's to redefine
11:06 Kristien oh Lounge<C++>?
11:06 vendethiel yeah
11:06 vendethiel (livescript guy)
11:06 Kristien ooooh nice
11:06 Kristien your name was just "ven"
11:07 vendethiel oh, sorry
11:11 masak Kristien: vendethiel++ has many nicks. even we are confused ;)
11:11 * vendethiel remembers introducing himself to lizmat as "nami-doc", which made her very confused... Whoooops
11:13 Kristien vendethiel: I am incidentally working on a JS alternative of which the acronym is also "LS" :(
11:13 Kristien I just noticed right now. :(
11:13 vendethiel well, it's not like "livescript" was a "new name" anyways
11:13 ab5tract "< Kristien> I'd love to have Perl on the JVM, though."   <---- you do know that this is up and working, right?
11:13 vendethiel but yeah, I remember you working on lasagna already
11:13 Kristien ab5tract, yeah but Rakudo isn't production-ready yet AFAIK
11:14 vendethiel got pretty far, eh?
11:15 Kristien compiler can compiler various things now
11:15 vendethiel clojure-style lambdas, racket-style contracts, protocols (from elixir? not sure who created that)
11:15 Kristien Clojure and Elixir
11:17 Kristien nothing type-related has been implemented yet and I'm still not fully statisfied with my ideas
11:22 xfix joined #perl6
11:41 ab5tract is this fairly normal for a Java import? "use com::jsyn::instruments::JSynInstrumentLibrary:from<Java>:jar<jsyn-20150105.jar>;" .. note i'm not talking about a jvm import in rakudo, but an import within java itself
11:58 H2O1 joined #perl6
12:09 arnsholt ab5tract: If you're thinking about the number of elements in the "path", it's a reasonably short one for Java =)
12:14 Kristien joined #perl6
12:25 booly-yam-6137 joined #perl6
12:38 psch hi #perl6 \o
12:39 psch we probably also need something equivalent to javas «import namespace.*;»
12:41 psch although afaik that's more or less deprecated in java already, so maybe we don't
12:42 psch eh, discouraged, not deprecated
12:53 leont joined #perl6
12:57 TuxCM joined #perl6
13:15 Kristien joined #perl6
13:15 FROGGS psch: look at S11, there already is something or it might fit in the picture
13:16 H2O1 joined #perl6
13:17 H2O1 left #perl6
13:22 booly-yam-6137 joined #perl6
13:22 kaleem joined #perl6
13:23 psch FROGGS: i'm not seeing it.  my thought also was rather narrowly scoped onto jvm-interop, fwiw
13:27 psch FROGGS: the fitting thing i see is "export propagates upwards"
13:28 psch and we could assume every java package is export and thus import everything down-package
13:29 FROGGS ahh, I guess I had a thinko here
13:29 psch but that feel slightly horrid and likely breaks on very high packages, e.g. «use java:from<Java>» most definitely clobbers all over the name space, as there's at least two List classes in there
13:30 FROGGS «import namespace.*;» would import everything in that namespace?
13:30 psch yes, but not below
13:30 FROGGS that does not feel very perlish
13:30 psch note there's strong opinions against on-demand-importation in java, and no real advantages to it: http://javadude.com/articles/importondemandisevil.html
13:34 psch right, i'm actually perfectly fine with not emulating on-demand-importation of java classes for our interop
13:34 psch i mean, java folks say "don't do that", so there's no real point.  also the java notion of "package" doesn't fit with ours anyway
13:42 spider-mario joined #perl6
13:43 rindolf joined #perl6
13:50 btyler joined #perl6
13:52 booly-yam-6137 joined #perl6
13:59 Kristien I never use that feature in any language.
13:59 Kristien Not because it can break in the future, but because it gets incredibly difficult to figure out where names come from if you have multiple such imports.
14:08 * vendethiel loves qualified imports
14:08 vendethiel I prefer to spell out everything I want to import... (or have them qualified)
14:08 vendethiel scala takes a different route than java's, though, with its import objects
14:10 rurban joined #perl6
14:11 booly-yam-6137 joined #perl6
14:11 Kristien yeah scala imports are funny
14:12 Kristien import foo.bar.{Baz, Qux} is good
14:13 FROGGS what does that do?
14:14 Kristien same as import foo.bar.Baz; import foo.bar.Qux
14:14 FROGGS ahh
14:14 vendethiel + package objects
14:14 Kristien in Scala you can do stuff like val foo = new Foo; import foo.someMethodOnFoo; someMethodOnFoo()
14:15 Kristien but that's rarely useful; overkill feature IYAM
14:15 vendethiel "overkill feature" is a nice way to define scala
14:19 Kristien well, it's consistent
14:19 Kristien you can replace packages by objects or variables and the imports will still work
14:21 vendethiel eh, sometimes, scala's import is c++'s using (like the case Kristien described above)
14:22 ab5tract careful there.. scala may be the closest thing to perl 6 that's currently in production :)
14:24 vendethiel C++, scala, perl6, they all have that little "bloat" :P
14:27 Kristien vendethiel: more like D's alias
14:28 Kristien C++' using works only on types
14:28 vendethiel no, it doesn't -- you can import methods, for example, a parent class's constructor
14:29 vendethiel struct A { A(int); }; struct B : A { using A::A; }
14:29 Kristien oh right
14:29 Kristien duh :P
14:30 Kristien I was thinking about using Foo = Bar;
14:31 vendethiel right (more useful with templates, though) + c++ has using namespaces (which is arguable like import x.*; and a misfeature for many)
14:33 skids joined #perl6
14:37 adu joined #perl6
14:42 moritz you can use namespaces like that, but you don't have
14:42 moritz you can say std::cout everywhere if you want
14:42 vendethiel that's usually what people do, yes :)
14:42 vendethiel good ide will offer you to use namespace (and unuse them)
14:42 vendethiel IDEs*, even
14:50 daxim p6: class Foo { has @bars; has $quux; for @bars -> $bar { if $bar.name === $quux { } } }
14:50 camelia rakudo-moar f9cb17: OUTPUT«(signal SEGV)»
14:50 camelia ..rakudo-parrot f9cb17: OUTPUT«Can only use repr_get_attr_obj on a SixModelObject␤  in block <unit> at /tmp/tmpfile:1␤␤»
14:50 daxim my confidence in using rakudo for a new project is 0
14:51 gtodd ab5tract: I think scala calls itself perl8 .... www.perl8.org ... :-)
14:52 jnthn daxim: Then don't.
14:52 PerlJam Perl is "dead" but everybody still wants to be like Perl.
14:53 tadzik hah
14:53 PerlJam daxim: why 0 exactly?  because of that one segfault?
14:53 vendethiel some compile-time stuff is still fragile :)
14:54 daxim because of persistent problems.  every time I use it or attempt to package it, I quickly run into baffling showstopper problems
14:54 skids I suppose that matters if you are into writing self-writing code. :-/
14:55 daxim sometimes I file issues, sometimes I don't.  that's because the turnaround on github is on the order of weeks and months
14:55 skids What's baffling about the above?  You defined attributes and then tried to use them without instantiating an object to hold them?
14:55 daxim dude, it crashes.
14:55 daxim prio 5 bug
14:56 psch m: class Foo { has @bar; for @bar { } } # golfed
14:56 camelia rakudo-moar f9cb17: OUTPUT«(signal SEGV)»
14:56 booly-yam-6137 joined #perl6
14:56 moritz skids: it should produce a proper error message
14:56 jnthn Correct. Also note:
14:56 tadzik (I am to blame for years-long turnover for packaging problems)
14:56 skids Yeah, and that should probably be fixed, but it didn't crash on code anyone would actually want to run.
14:56 jnthn m: class Foo { has @!bar; for @!bar { } }
14:56 camelia rakudo-moar f9cb17: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/yDlnkLVAU_�Variable @!bar used where no 'self' is available�at /tmp/yDlnkLVAU_:1�------> [32mclass Foo { has @!bar; for @!bar[33m�[31m { } }[0m�»
14:56 gtodd didn't it give an error meessage ?
14:56 gtodd oh wait
14:56 jnthn Just about everybody declares their attributes like that.
14:57 arnsholt Is there a semantic difference between has $foo and has $!foo?
14:57 psch is has without twigil actually legal?
14:57 jnthn So yes, it wants fixing. No, I'm not surprised - given most code I've seen - nobody found it sooner.
14:57 psch std: class Foo { has $x }
14:57 camelia std f9b7f55: OUTPUT«ok 00:00 137m␤»
14:57 vendethiel jnthn: I think that's in the line of the constant-level bugs I've found previously
14:57 moritz psch: it is, but it's seldomly used
14:57 psch apparently so
14:57 vendethiel m: class A { has $b; }; A.new.b.push(3); A.new.b.push(5); say A.new.b.perl
14:57 camelia rakudo-moar f9cb17: OUTPUT«No such method 'b' for invocant of type 'A'␤  in block <unit> at /tmp/ofsZKxFrT3:1␤␤»
14:57 jnthn psch: Yeah, it installs a compile-time lexical alias that is mapped to an attribute lookup if we ever see it. It's a sop to folks who don't like twigils.
14:58 gtodd tadzik: panda++ :-)
14:58 vendethiel m: class A { has $b; method x { $!b } }; A.new.x.push(3); A.new.x.push(5); say A.new.x.perl
14:58 camelia rakudo-moar f9cb17: OUTPUT«Cannot modify an immutable Any␤  in method push at src/gen/m-CORE.setting:1772␤  in block <unit> at /tmp/B2JJ3c5SHk:1␤␤»
14:59 skids m: class A { has $b is rw; method x { $!b } }; A.new.x.push(3); A.new.x.push(5); say A.new.x.perl
14:59 camelia rakudo-moar f9cb17: OUTPUT«useless use of 'is rw' on $!b  in any  at src/Perl6/World.nqp:1846␤␤Cannot modify an immutable Any␤  in method push at src/gen/m-CORE.setting:1772␤  in block <unit> at /tmp/__eYV36urN:1␤␤»
14:59 vendethiel m: class A { has $b; method x is rw { $!b } }; A.new.x.push(3); A.new.x.push(5); say A.new.x.perl
14:59 camelia rakudo-moar f9cb17: OUTPUT«Any␤»
14:59 vendethiel skids: the rw needs to be on the method :)
14:59 skids Oops, right
15:00 skids m: class A { has $b; method x is rw { $!b } }; A.new.x.push(3); A.new.x.push(5); say A.new.x.perl
15:00 camelia rakudo-moar f9cb17: OUTPUT«Any␤»
15:00 psch m: class A { has $b; method x is rw { $!b //= [] } }; A.new.x.push(3); A.new.x.push(5); say  A.new.x.perl
15:00 camelia rakudo-moar f9cb17: OUTPUT«[]␤»
15:01 skids I got it.
15:01 skids m: class A { has $b; method x is rw { $!b //= [] } }; $a = A.new; $a.x.push(3); $a.x.push(5); say $a.x.perl
15:01 camelia rakudo-moar f9cb17: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/bem4uL6RgFâ�¤Variable '$a' is not declaredâ�¤at /tmp/bem4uL6RgF:1â�¤------> [32m $b; method x is rw { $!b //= [] } }; $a[33mâ��[31m = A.new; $a.x.push(3); $a.x.push(5); sa[0mâ�¤    expecting any…»
15:02 jnthn Any reason not to write has @!b (or has @b, if you must...)
15:02 skids m: class A { has $b; method x is rw { $!b //= [] } }; my $a = A.new; $a.x.push(3); $a.x.push(5); say $a.x.perl
15:02 camelia rakudo-moar f9cb17: OUTPUT«[3, 5]␤»
15:02 vendethiel jnthn: because $ is easier to type and has .push anyways :P
15:02 skids class A { has $b; method x is rw { $!b } }; $a = A.new; $a.x.push(3); $a.x.push(5); say
15:03 skids gargh.  ENOCAFFEINE
15:03 skids m: class A { has $b; method x is rw { $!b } }; $a = A.new; $a.x.push(3); $a.x.push(5); say
15:03 camelia rakudo-moar f9cb17: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/aJSwBmtW6nâ�¤Variable '$a' is not declaredâ�¤at /tmp/aJSwBmtW6n:1â�¤------> [32mA { has $b; method x is rw { $!b } }; $a[33mâ��[31m = A.new; $a.x.push(3); $a.x.push(5); sa[0mâ�¤    expecting any…»
15:03 psch oh right, of course it's always Any (or []) if the new A isn't stored anywhere...
15:03 skids dammit I give up.
15:03 vendethiel skids: warning: say; without arguments won't work :p
15:03 vendethiel psch: yeah
15:03 skids I can't cut and paste worth crap this morning apparently.
15:04 skids Sounds like a good time to go play with something mission critical.
15:07 * PerlJam reads backlog on claim
15:29 gtodd mission critical is not part of my world ...  but I have observed that confidence in many areas of human endeavor is sort of binary: it fluctuates from 0 to 1 and back again :-)
15:34 kaleem joined #perl6
15:38 abraxxa joined #perl6
15:44 pmurias joined #perl6
15:45 dalek nqp-js: d37cae8 | (Pawel Murias)++ | src/vm/js/ (4 files):
15:45 dalek nqp-js: Pass test 75.
15:45 dalek nqp-js:
15:45 dalek nqp-js: Implement nqp::curcode, nqp::getcodeobj, nqp::setcodeobj.
15:45 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/d37cae82c4
15:45 tully-the-geek joined #perl6
15:48 Kristien joined #perl6
15:50 pmurias psch: re explicit import lists isn't a big argument for always using them in java land that the IDE autocompletion inserts them?
15:50 Kristien On a scale from grep to OpenSSL, how buggy is Rakudo at the moment?
15:50 psch pmurias: that's definitely a big part of the argument, yes
15:51 psch pmurias: but even without that i don't think we should have «use org.whatevs.*:from<Java>», because of the different semantics behind "package" and how we handle exportation in general
15:53 psch pmurias: module Foo { module Bar is export { module Baz is export { } } }; import Foo; # imports Bar and Baz (and their exports), as far as i understand S11
15:53 psch and doing that with java interop is begging to have things break
15:53 jnthn Kristien: Depends what you're doing. If you're dealing with most of the key language features that have been implemented for quite a while, not very. If you're looking at the concurrency stuff - it's newer and needs plenty of polish yet.
15:54 skids gtodd: sometimes I find there's nothing like walking a tightrope to get your head back in the game.
15:54 Kristien jnthn: OK
15:54 jnthn (Though those bits work better on JVM.)
15:55 jnthn I've had cases where I spent the whole day writing stuff using Rakudo and didn't run into anything; there I was doing stuff with grammars, objects, bit of I/O, usual data structures...
15:56 mr-foobar joined #perl6
15:56 hoelzro o/ #perl6
15:56 PerlJam these days, I don't usually run into rakudo bugs unless I'm *trying* to.
15:56 hoelzro dwarring: thanks for the suggestion on the CSS module
15:59 vendethiel Kristien: also, some segfaults if you want to try the more "compile-time" part of the language :p
16:00 vendethiel m: role A[::T] {...}; role A[Int] { constant T = Bool; }; role A[Str] { constant T = Int }; sub foo(::T --> A[T]) { Nil }
16:00 camelia rakudo-moar f9cb17: ( no output )
16:00 vendethiel m: role A[::T] {...}; role A[Int] { constant T = Bool; }; role A[Str] { constant T = Int }; sub foo(::T --> A[T]) { Nil }; foo(5)
16:00 camelia rakudo-moar f9cb17: OUTPUT«Type check failed for return value; expected 'A[T]' but got 'Any'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:649␤  in sub foo at /tmp/gjwtwvJsGC:1␤  in block <unit> at /tmp/gjwtwvJsGC:1␤␤»
16:00 vendethiel m: role A[::T] {...}; role A[Int] { constant T = Bool; }; role A[Str] { constant T = Int }; sub foo(::T --> A[T]::T) { Nil }; foo(5)
16:00 camelia rakudo-moar f9cb17: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/hUBGSUTRho�Missing block�at /tmp/hUBGSUTRho:1�------> [32mconstant T = Int }; sub foo(::T --> A[T][33m�[31m::T) { Nil }; foo(5)[0m�»
16:01 jnthn vendethiel: I hope you're filing any of those you find :)
16:01 vendethiel jnthn: not really, I think I was told my "general case" was filled already
16:02 jnthn OK
16:02 vendethiel with the recursive role constant... thing
16:02 jnthn Sounds familiar :P
16:02 vendethiel .oO( and for that I'm sorry :p )
16:15 dalek perl6-roast-data: 4359c55 | coke++ | / (5 files):
16:15 dalek perl6-roast-data: today (automated commit)
16:15 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/4359c55f6c
16:15 Kristien joined #perl6
16:18 vendethiel m: role Nat { ... }; role Zero does Nat { constant VAL = 0; }; role Suc[::N] does Nat { constant VAL = 1 + N::VAL; };
16:18 camelia rakudo-moar f9cb17: OUTPUT«===SORRY!===␤Cannot call method 'at_key' on a null object␤»
16:18 vendethiel jnthn: ^ the error
16:18 Kristien I want to learn everything about Perl 6.
16:19 vendethiel that was quick :P
16:20 jnthn vendethiel: I think that should whine that you can't compose a role that is only stubbed...
16:20 vendethiel uh? so only classes could be allow to be stubs?
16:21 jnthn It's not that you can't stub it
16:21 jnthn You'd be free to use it like a type constraint and so forth.
16:21 vendethiel if I can't extend a stub role, how is it useful?
16:21 vendethiel also, what happens when you augment a stub?
16:22 jnthn It's just that roles are spec'd as immutable (and so can't be augmented) because we copy things from them (thus composition is flattening)
16:22 vendethiel then augment a stub class :P?
16:22 jnthn Um...I didn't try that :P
16:22 jnthn m: class Foo { ... }; augment class Foo { }
16:22 camelia rakudo-moar f9cb17: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/3qF2fDkPtcâ�¤augment not allowed without 'use MONKEY_TYPING'â�¤at /tmp/3qF2fDkPtc:1â�¤------> [32mclass Foo { ... }; augment class Foo [33mâ��[31m{ }[0mâ�¤    expecting any of:â�¤        generic…»
16:23 jnthn m: use MONKEY_TYPING; class Foo { ... }; augment class Foo { }
16:23 camelia rakudo-moar f9cb17: ( no output )
16:23 jnthn Guess it is fine with it.
16:23 jnthn And just treats it as supplying the actual definition.
16:23 vendethiel m: use MONKEY_TYPING; class Foo { ... }; augment class Foo { method x { 5 } }; Foo.new.x.say
16:23 camelia rakudo-moar f9cb17: OUTPUT«5␤»
16:23 vendethiel alright :-)
16:23 jnthn I think in terms of what the MOP sees here, it's the same set of calls if you didn't have the augment there.
16:24 jnthn Except first asking ClassHOW if augment is allowed.
16:27 vendethiel I really need to take a look a how to parse Foo[X]::Y... I'm going to make it segfault quite a lot, I'm sure
16:28 masak yay
16:29 [Tux] joined #perl6
16:30 PerlJam jnthn: when does the copying happen for roles?   in vendethiel's Nat example,  role Nat { }; role Zero does Nat { };   does the copying from Nat to Zero happen when building the Zero role or does it happen whenever the role is composed into a class?
16:30 vendethiel I really want to try that `:(::T -> Foo[T]::Type)` thing :DD
16:31 jnthn PerlJam: The problem in vendethiel's example is actually the constant referencing a type variable that was never instantiated yet.
16:31 jnthn PerlJam: The copying actually happens when the role is finally composed into a class
16:32 jnthn So we can defer whining until that happens, but not really beyond it.
16:32 vendethiel jnthn: isn't N::VAL the correct syntax, then?
16:32 jnthn vendethiel: The problem as I see it is that constant happens at BEGIN time, as we parse.
16:32 vendethiel so it's a bug :P?
16:33 jnthn Well, there's a bug, but it's not going to do what you want.
16:33 vendethiel awww =(
16:33 jnthn You're doing the equivalent of
16:33 vendethiel I thought it was going to do the instantiation of the code inside the role only as the role was created
16:34 jnthn sub foo(::T) { constant blah = T.someting }
16:34 Rounin joined #perl6
16:34 vendethiel I... see what you mean
16:34 jnthn vendethiel: Yes, if you write "my" instead of constant then it will.
16:34 vendethiel can I use subset instead of constant, then?
16:34 vendethiel yeah, but if I use "my", I'm not really at the type-level anymore :P
16:35 jnthn Are you expecting the body of a role to behave like some kind of macro that defers evaluation of all BEGIN-time things inside of the role?
16:36 vendethiel yes.
16:36 jnthn OK. It doesn't.
16:36 vendethiel if it's parameterized, I'm expecting it doesn't try anything unless it gets its parameters
16:36 vendethiel like I'm not expecting a sub to be evaluated before I pass it its parameters
16:37 jnthn Yes, but if you write constant inside of a sub and refer to a parameter, you're in the same situation, simply because it's spec'd as "evalue the RHS of the constant at BEGIN time, after we parse it"
16:37 jnthn *evaluate
16:37 vendethiel so, subset is at the same time?
16:37 jnthn Also set up at BEGIN time, yes.
16:37 vendethiel mmh, too bad
16:38 kaleem joined #perl6
16:38 jnthn Feels like this is more in macro space.
16:39 vendethiel well, I'm trying to get values to act as types, so not really
16:41 vendethiel (or rather, types as values, but it's already the case in the Perl6 sense)
16:42 gtodd how will people use MONKEY_TYPING in real world perl6 ? :-)
16:42 vendethiel .oO( poorly )
16:43 jnthn Sparingly, I hope... :P
16:43 skids .oO(SRPMS is a pain in the head)
16:43 vendethiel I hope people won't repeat the same mistake ruby did
16:43 gtodd as a way to augment a class and get an idea for ... errm a better class of class
16:43 vendethiel .oO( ruby on rails is cool, but did it really warrant trading my soul to the devil? )
16:44 pmurias vendethiel: hopefully we avoid the bad things about ruby culture
16:44 vendethiel that's an entirely, unrelated matter
16:45 gtodd having to type "use MONKEY_TYPING ; " means the person at the keyboard will be forced into a frame of mind ...
16:46 pmurias like rubish module name or using a cute custom made page instead of good documentation
16:46 telex joined #perl6
16:46 gtodd can we haz perl6 books with those matte gloss covers ?
16:46 Otterpocket joined #perl6
16:47 gtodd ruby books tend to have matte finish ...  perl books tend to be shiny and ... errm
16:47 gtodd wait ... that's an entirely, unrelated matter
16:48 muraiki_ joined #perl6
16:58 japhb Any particular reason that die($failure) isn't defined to die($failure.exception)?  (Barring that it should only happen for a concrete Failure, of course.)
16:59 ab5tract jnthn: so it turns out that the moar probe stuff dislikes fish shell
16:59 ab5tract that appears to have been the issue i was having last week
17:01 jnthn ab5tract: Oh... I don't know the probe stuff much or the fish shell at all, unfortunately...
17:01 * jnthn bbiab
17:01 masak should .indent(*) warn about a line that contains too little indent, when that line only contains whitespace?
17:02 masak (it currently does in Rakudo; I'm wondering whether it's better for it not to)
17:03 ab5tract yeah, i will poke at it a bit to see if i can understand why. it could also be at the rakudobrew level, perhaps
17:04 ab5tract fish shell: the shell for programmers who never became sysadmins but still like to write shell scripts without crying
17:04 masak m: role R[$x] { method foo { $x } }; role S[$x] does R[$x] { method bar { self.foo } }; say S["OH HAI"].new.bar
17:04 camelia rakudo-moar f9cb17: OUTPUT«(Mu)␤»
17:04 japhb masak: I'm provisionally against a warning in that case.
17:04 masak ^^ bug?
17:04 masak japhb: yeah, I'm not convinced either.
17:09 masak it would be really awesome if the above role thing would bind `$x` all the way through from S to R.
17:09 masak I could accept if it didn't, but there'd have to be a decent reason. :)
17:10 * vendethiel hopes there's no such reason... :-)
17:15 nine In a talk about Inline::Perl5 and Inline::Python, what would you like to hear/see?
17:17 gtodd demystify the magic  of FFI ... "try this at home!!"
17:17 gtodd errm NativeCall
17:17 nine masak: does it currently warn about completely empty lines?
17:18 masak nine: it does not. and that's by spec.
17:18 booly-yam-6137 joined #perl6
17:18 nine gtodd: in other words a look under the hood. I can show how easy it was to implement, yes.
17:18 Kristien joined #perl6
17:19 gtodd nine: yeah that ... and then some of those tricks that show how well it works ... didn't you run catalyst or something :-D
17:19 nine gtodd: indeed I did. Any other suggestions for examples?
17:20 gtodd you could show simple little scripts "this is my first perl5 sysadmin script I ever wrote ... I can't throw it away just because I use perl5 ... BING  ... oh I don't have to"
17:21 regreg joined #perl6
17:21 Mso150 joined #perl6
17:22 gtodd "oh no ... over a 4 year period I learned Catalyst and made a blog !!  should I just rm -rf ?? or ... wait!! It works too!"
17:23 nine I'll definitely show some DBIx::Class example. That probably reaches much more people than Catalyst.
17:23 gtodd nine: is one use case ... mixing in perl5 modules to do something and then hand off to perl6 for overall program logic etc?
17:23 gtodd like a glue language for the duct tape of the web?
17:24 nine gtodd: yes, that's actually the most simple use case. Use Perl 5 modules in Perl 6 programs.
17:24 gtodd do I remember correctly that you have files that mix 5 and 6 ? that makes people wake up put down their phones :-)
17:25 nine My problem is that using Perl 5 modules is as simple as use Inline::Perl5; use Petal:from<Perl5>;
17:25 nine There's not that much to show :)
17:25 PerlJam That doesn't sound like a problem to me  :)
17:26 PerlJam Pick some of the heavy hitters of Perl 5 modules, and show that you can use each of them.
17:26 nine gtodd: yes, mixing Perl 5 and 6 is what makes using Catalyst or DBIx::Class feasible.
17:26 psch Moose!
17:26 psch scnr
17:26 gtodd hehe .... masak or moritz or well lots of people have sample perl5 code "translated" into perl6 ... it might be neat to show the sample perl5 code work followed by the perl6 translation ....
17:26 nine psch: there's even a test file that tests interaction with Moose objects ;)
17:26 gtodd Moose6
17:26 psch nine++
17:27 PerlJam Take all of the P5 rosettacode examples, and run them in P6
17:27 gtodd haha
17:27 nine What are the heavy hitters of Perl 5? Apart from Moose and DBIx::Class...
17:27 gtodd tests would be neat ...  running perl5 tests in perl6
17:29 gtodd you probably want to show off how perl5-ish perl6 can be so morphing perl5 code into perl6 would distract ...
17:29 gtodd Mojo?
17:29 PerlJam Isn't there a site that shows the Perl modules that are most depended upon?
17:29 gtodd Mojolicious ...
17:30 gtodd is stand alone though
17:31 FROGGS joined #perl6
17:31 jdv79 PerlJam: this?:  http://ali.as/top100/
17:32 PerlJam yeah! that's the one
17:32 jdv79 i would if its up to date
17:32 jdv79 *wonder
17:33 nine Moose does not seem to be in the top 100
17:33 PerlJam Didn't Alias go off and join the Microsoft cult or something?
17:34 jdv79 sounds right
17:34 gfldex joined #perl6
17:35 gtodd nine: what about some bigish application like Bugzilla :-D
17:35 kurahaupo1 joined #perl6
17:36 gtodd nine: no wait that would be *unpossible* !
17:37 kurahaupo1 joined #perl6
17:38 nine Why would it?
17:38 Kristien Since I started learning Perl 6 I became happier.
17:38 Kristien This may purely be a coincidence, though.
17:38 FROGGS Kristien: :D
17:38 FROGGS me too
17:38 kurahaupo1 joined #perl6
17:39 gtodd :-D
17:39 gtodd nine: just joshing ;-)
17:40 gtodd nine: maybe running perlcritic or using PPI would be impressive ...
17:40 gtodd not sure ...
17:40 Kristien Does Perl 6 have the goatse operator?
17:40 japhb What should 'die(Failure)' do?  Right now, it chokes:
17:40 japhb m: die Failure;
17:40 camelia rakudo-moar f9cb17: OUTPUT«Cannot look up attributes in a type object␤  in method <anon> at src/gen/m-CORE.setting:14282␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2737␤  in any find_method at src/gen/m-Metamodel.nqp:988␤  in method Str at src/gen/m-CORE.settin…»
17:40 gtodd only perl can parse perl .. until now ... :-D
17:40 nine I guess "usefull to the audience" would be better than just impressive.
17:41 japhb I'm thinking it should just turn die(Failure) into die('Failure'):
17:41 japhb die 'Failure'
17:41 japhb m: die 'Failure'
17:41 camelia rakudo-moar f9cb17: OUTPUT«Failure␤  in block <unit> at /tmp/CjqI65tkkT:1␤␤»
17:42 anaeem1_ joined #perl6
17:43 rmgk_ joined #perl6
17:43 pmurias gtodd: PPI from Perl6 doesn't seem to be incredibly impressive
17:44 gtodd Kristien: aka Saturn ? =( )=
17:44 Kristien :O
17:44 Kristien yeah :p
17:44 gtodd well think of what it is meant to do ...
17:45 psch m: sub circumfix:<=( )=>($x) { "pls no" }; say =( 5 )=
17:45 camelia rakudo-moar f9cb17: OUTPUT«pls no␤»
17:46 gtodd pmurias: you are right .... what if perlcritic/PPI could pass over the  perl5 code and make it go blinky blinky just as that line was executed ? :-D
17:47 pmurias blinky blinky?
17:47 nine HTML::Parser seems like a nice example
17:47 gtodd pmurias: assuming we are running the code from inside an editor :)
17:48 anaeem1_ joined #perl6
17:48 skids Maybe just practical examples of using superior Perl6 features with a P5 library makes a quick script easier.
17:48 denis_boyun_ joined #perl6
17:49 nine skids: I would be very greatful for even one such example :)
17:50 gtodd nine: I think people that have applications  will continue to run them with perl5 .. so that is more a way to exercise and impress the audience with how good IP5 is ... more likely people have libraries or complex modules they don't want to rewrite or would find it convenient to reuse ... so practically looking at that kind of thing (with a bit of the Catalyst wow stuff) would be be best
17:51 bronco_creek joined #perl6
17:52 bronco_creek Woohoo.  Just built my first perl6 script for actual work.
17:52 gtodd nine: say someone has some fancy custom automated login and authentication stuff in perl5 that they use from a sort of top level application to errm orchestrate something or another .... being able to keep using that while writing a new tool (maybe in house or not customer facing yet but super fast and easy to write) would show how power of perl6 can fit with perl5 tools
17:53 gtodd nine: you could create a fake scenario like that :-)
17:54 nine gtodd: exactly. While other Perl 6 talks tell people why they want to use Perl 6, I want to tell them how they can actually do this while sitting on huge Perl 5 code bases.
17:57 rindolf joined #perl6
17:58 jack_rabbit joined #perl6
17:59 gtodd say perl6 is making someone happy and when later they go to fix or update some portion of a large perl5 $DAYJOB application just for kicks they write something in perl6 "to see how it works" and it takes only an hour and blows their mind. They think: "Wow if only I ddin't have to rewrite the other 80% of the app ....".  I::P5 means you don't have to ... examples ... hmm
18:01 tgt joined #perl6
18:03 dalek specs: e684a38 | TimToady++ | S02-bits.pod:
18:03 dalek specs: interaction of :{} with other adverbialoids
18:03 dalek specs: review: https://github.com/perl6/specs/commit/e684a3894c
18:03 panchiniak joined #perl6
18:05 gtodd nine: some corporate environments love java but have perl5 installed  because ... well ... how can't you
18:06 bronco_creek I used the XML module.  Wished for more examples of how to traverse/process the data once it is in a p6 data structure.
18:06 jluis_ joined #perl6
18:09 hoelzro an XPath module would be nice
18:09 masak <Kristien> Since I started learning Perl 6 I became happier.
18:09 gtodd nine: if that were possible maybe showing how you can leverage perl5 libraries with I::P5  from perl6-j would be a practical demo ...
18:09 masak Kristien: this should be the only reason anyone ever needs.
18:11 bronco_creek Yes to an XPath module.  Even something like Matt Sargeant's old XPathScript.
18:14 nwc10 09:38 <jnthn> Yeah, if you're going to do that it really wants to be only  enabled with some flag.
18:14 nwc10 09:38 <jnthn> For *developers* to enable if they find it useful
18:14 nwc10 mischan
18:15 nwc10 (sorry)
18:15 nwc10 (context will not be made available, even if bribes of decent beer are offered)
18:18 anaeem1 joined #perl6
18:21 kjs_ joined #perl6
18:23 jnthn m: role R[::T] { method foo { T } }; role S[::T] does R[T] { method bar { self.foo } }; say S[Int].new.bar
18:23 camelia rakudo-moar f9cb17: OUTPUT«(Int)␤»
18:23 * muraiki_ offers indecent beer
18:23 jnthn masak: You can do it with type vars, it seems
18:23 ab5tract nine: i've been toying with interpreter pools
18:23 jnthn masak: Not quite sure about the variable case, in part 'cus I can't remember how on earth the type var case works :P
18:24 ab5tract it could be interesting to do some async stuff in p6 while spinning jobs out to p6
18:24 ab5tract sorry, out to p5
18:27 pmurias "interesting" = "full of crazy segfaults?"
18:28 ab5tract pmurias: why would that necessarily be the case?
18:29 ab5tract just make sure you are careful about when and where you access the return values of a given interpreter pool
18:29 jnthn You'd have to make sure you weren't in one Perl 5 interpreter from two threads at once, but wrapping it inside an actor/monitor (OO::Actors/OO::Monitors) could help :)
18:29 jnthn (Help to ensure that in a good way, I mean.)
18:29 ab5tract jnthn: i was looking for those modules the other day..
18:30 ab5tract *member of a given interpreter pool
18:31 jnthn ab5tract: They be in l'ecosystem... :)
18:31 mvuets joined #perl6
18:32 dalek rakudo/nom: 41d51f4 | peschwa++ | src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java:
18:32 dalek rakudo/nom: Fiddling for jvm-fields via a proper HOW.
18:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/41d51f437e
18:32 dalek rakudo/nom: 47d08d9 | peschwa++ | src/vm/jvm/ (2 files):
18:32 dalek rakudo/nom: Add support for .^methods and .^add_methods on Java objects.
18:33 dalek joined #perl6
18:33 FROGGS_ joined #perl6
18:33 jnthn psch++ # JVM interop patches
18:33 * timotimo likes
18:37 jluis_ joined #perl6
18:39 vendethiel masak: I tried to introduce him to perl6 a while ago, but he didn't like it at first :P
18:40 anaeem___ joined #perl6
18:42 rurban joined #perl6
18:42 panchiniak left #perl6
18:45 anaeem1 joined #perl6
18:45 regreg joined #perl6
18:48 masak vendethiel: well, it wouldn't surprise me if people fall in love with "first languages" a bit more quickly, but "last languages" are more of an acquired taste.
18:50 timotimo vendethiel: who is "him"?
18:50 vendethiel Kristien
18:50 timotimo k
18:50 * timotimo is afk again
18:50 PerlJam I think BASIC was my first language and it didn't engender any feeling of "love" and barely generated some "like"  :)
18:52 masak PerlJam: BASIC was my first language too. but I don't think it's that good a "first language", by today's measure.
18:52 masak Python is. LOGO is. there's probably more excellent examples which elude me now.
18:53 PerlJam Scheme  ;>
18:53 masak yeah.
18:53 masak I almost put Smalltalk on that list, too.
18:54 pmurias how do people with zero experience react to smalltalk?
18:55 * TimToady thinks that's a rather small population for various external reasons
18:55 masak I think a bunch of children were exposed to Smalltalk back in the day.
18:56 TimToady I think that's why we got Logo
18:56 nine I'll see if XML::XPath fits into my talks since there doesn't seem to be a replacement in Perl 6 yet.
18:56 PerlJam I should try to teach smalltalk to my children and see what happens
18:56 PerlJam (though only one of my children seems to have the right mindset to take to any kind of programming)
18:57 PerlJam nine: that's also a good way to encourage someone to write a replacement  :)
18:57 FROGGS_ hoelzro: I am currently porting XML::LibXML, and XPaths are working already
18:57 PerlJam or if you're juxtaposed with a talk on grammars, get a newbie excited about P6
18:58 * geekosaur found BASIC as a first language incredibly motivating... to find something else and make it work on his machine >.>
18:59 muraiki_ early on in learning programming I made a webapp using Pharo Smalltalk and the Seaside framework. I really enjoyed it, learned a lot, and miss many things about working in Smalltalk. Perl 5 is my second most recent language, and it was more of an acquired taste :)
19:01 geekosaur (in fact, if anything BASIC kinda ruined me in the sense that my second language was C and it was such a huge step up that for years I missed how lousy a language it was)
19:02 PerlJam I *think* my route went BASIC -> ASM -> Pascal -> AutoLISP -> C -> C++ -> bunches of other stuff (shell, awk, perl, smalltalk, scheme, effiel, prolog, etc.)  I bet there are few people learning programming today that start off with BASIC and ASM any more.
19:02 hoelzro FROGGS_++
19:02 hoelzro thanks for mentioning it!
19:02 * FROGGS_ did it in this order: Amiga Basic, Turbo Pascal, PHP, Perl 5, C, Perl 6
19:02 muraiki_ I did C back in the day in some horrible programming classes, did something completely different, then last year switched careers to be a programmer.
19:03 geekosaur also I do not generally count asm as a language; more as a motivation to develop languages...
19:03 FROGGS_ hoelzro: traversing structures is the next bigger step
19:03 nine I loved coding asm back then :)
19:03 muraiki_ so I guess it went C -> python -> racket -> smalltalk -> clojure -> javascript -> some haskell -> perl5 -> elixir
19:03 jercos FROGGS_: that's eerily close to my history, but with QBASIC/GW-BASIC, and no pascal step.
19:03 jercos :D
19:04 kurahaupo1 joined #perl6
19:05 FROGGS_ ohh, I forgot about javascript... but I guess that what almost everybody has to know, at least for webstuff
19:06 PerlJam geekosaur: I was doing x86 asm at home to learn how computers worked closer to the metal, and whatever motorola chipset Apple IIe used at school because UCSD pascal didn't do all of the things I wanted it to  :)
19:06 muraiki_ I actually almost sent that without putting js in. it's like a given now, hehe
19:06 FROGGS_ muraiki: exactly :o)
19:06 geekosaur IIe was not motorola. MOS Technologies 6500 series
19:06 geekosaur ...admittedly MOS Tech was founded by disgruntled Moto engineers
19:06 jercos FROGGS_: JavaScript and PHP feel incredibly similar to me :|
19:07 muraiki_ and I realize that I idle here but I've only written like 6 lines of perl 6 code. I am excited for p6 though! :)
19:07 skids nine: unfortunately I've just recently started coding some personal work scripts in P6 so I don't have a big library to draw from.  Also my P6 isn't very idiomatic yet :-).
19:07 FROGGS_ jercos: similar? not in the slightest I'd say
19:07 jercos I mean there are obvious differences, like a lack of sigils, but some of the quirks in comparisons are the same for example.
19:07 jercos The object system is totally different, but hey, the object system was brand new when I learned PHP :p
19:08 FROGGS_ well, yeah, it like designing a language at a weekend without thinking about it
19:08 PerlJam jercos: javascript has a "standard library" with inconsistent parameter passing conventions?
19:08 skids nine: but it is not hard to contrive a way to take a random P5 50-liner, pretend it needs to get its input data from some source only reachable via a P5 module, and recode the 50-liner in P6 idiomatically.
19:08 jercos No. JavaScript only has anything resembling a "standard library" at all recently.
19:09 anaeem1 joined #perl6
19:10 jercos But parameters are passed to functions similarly, with extra arguments flowing off the end, and no type checking, arrays are magic (except when they're not)
19:10 jercos I'm not saying a JavaScript engine can run PHP code >.>
19:11 PerlJam jercos: are you sure you're not describing Perl 5? ;)
19:11 muraiki_ lol
19:11 jercos Hah, no, PHP and JavaScript both make a passable effort at binding function arguments :p
19:12 jercos The transition from PHP to Perl 5 *was* surprisingly easy though. I think I made myself a cheat-sheet of everything I needed to look up on perldoc to start writing things in Perl 5...
19:12 PerlJam yeah, that's a big wart on P5 I think.  Moreso than the lack of "builtin" objects like everyone else has.
19:14 jercos Yeah that sits somewhere up with "tie" on the tuit count
19:22 TimToady m: role R[$x] { method foo { $x } }; role S[::T $x] does R[T] { method bar { self.foo } }; say S[Int].new.bar
19:22 camelia rakudo-moar f9cb17: OUTPUT«(Int)␤»
19:22 TimToady m: role R[$x] { method foo { $x } }; role S[::T $x] does R[$x] { method bar { self.foo } }; say S[Int].new.bar
19:22 camelia rakudo-moar f9cb17: OUTPUT«(Mu)␤»
19:22 TimToady m: role R[$x] { method foo { $x } }; role S[::T $x] does R[$x.WHAT] { method bar { self.foo } }; say S[Int].new.bar
19:22 camelia rakudo-moar f9cb17: OUTPUT«(Mu)␤»
19:22 TimToady m: role R[$x] { method foo { $x } }; role S[::T T $x] does R[$x.WHAT] { method bar { self.foo } }; say S[Int].new.bar
19:23 camelia rakudo-moar f9cb17: OUTPUT«None of the parametric role variants for 'S' matched the arguments supplied.␤Cannot call ''; none of these signatures match:␤:(::$?CLASS ::::?CLASS $, T ::T $x)␤  in any specialize at src/gen/m-Metamodel.nqp:2258␤  in any specialize at src/gen/m-Me…»
19:25 TimToady seems to simply be not setting up $x's binding soon enough to participate in the does
19:26 TimToady though obviously it considers the variable to be declared already
19:27 * TimToady still thinks those errors should try to describe "the arguments supplied"
19:28 TimToady hmm, ::::?CLASS ?
19:28 skids TimToady++ +1 errors that briefly say what was fed in.
19:30 anaeem1 joined #perl6
19:30 Kristien joined #perl6
19:31 anaeem1__ joined #perl6
19:32 jnthn m: sub foo(Int $x) { }; foo("")
19:32 camelia rakudo-moar f9cb17: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/wv_Hntm8SAâ�¤Calling 'foo' will never work with argument types (str)â�¤    Expected: :(Int $x)â�¤at /tmp/wv_Hntm8SA:1â�¤------> [32msub foo(Int $x) { }; [33mâ��[31mfoo("")[0mâ�¤Â»
19:32 jnthn Those ones already have it :)
19:32 jnthn +1 to the others getting it also :)
19:32 skids m: role R[$x] { method foo { $x } }; role S[::T $x] { also does R[$x.WHAT]; method bar { self.foo } }; say S[Int].new.bar
19:32 camelia rakudo-moar f9cb17: OUTPUT«(Mu)␤»
19:33 avuserow (backlog) nine: Could Inline::Perl5 be used to add a plugin written in P6 to something like Bot::BasicBot? That would be neat to see. Gradual way to transition into P6 code
19:33 TimToady skids: nice try, but I don't think it's scoping, but rather timing
19:34 Mso150_a joined #perl6
19:34 TimToady and probably related to perceived non-genericity
19:36 skids I think that "also" form could have slightly different semantics to allow disambiguation for stuff like "my $x; role A [ $x ] { }; role B does A [ 1 ] does C [ $x ] { }
19:36 skids as in "could" hypothetically.
19:36 TimToady well...I think mixins already cut that particular Gordian Knot
19:37 anaeem1_ joined #perl6
19:37 TimToady and 'also' is meant to hoist declarations to the surrounding declaration
19:37 TimToady as long as they don't need to be known at the {
19:37 dwarring joined #perl6
19:38 TimToady so I wouldn't want to overload that with timing semantics, I don't think
19:39 Kristien Hmm, weird.
19:39 TimToady pay no attention to the wizards skulking behind the curtains...
19:39 Kristien sub f(@xs) { [&&] @xs Z== reverse @xs } f([1, 2, 1, 2, 1]) works now, whereas it didn't like an hour ago.
19:40 TimToady m: sub f(@xs) { [&&] @xs Z== reverse @xs }; say f([1, 2, 1, 2, 1])
19:40 camelia rakudo-moar 20aa85: OUTPUT«True␤»
19:41 Kristien yeah with semicolon
19:41 TimToady m: sub f(@xs) { all @xs Z== reverse @xs }; say f([1, 2, 1, 2, 1])
19:41 camelia rakudo-moar 20aa85: OUTPUT«all(True, True, True, True, True)␤»
19:42 Kristien Wunderbar.
19:42 nine avuserow: yes, should indeed be possible. At least with v6-inline.
19:43 TimToady m: sub f(@xs) { @xs eqv reverse @xs }; say f([1, 2, 1, 2, 1])
19:43 camelia rakudo-moar 20aa85: OUTPUT«True␤»
19:43 TimToady I'd probably use eqv there
19:44 TimToady especially since it might short-circuit on the first falsification for you
19:45 TimToady 'course, that's really doing twice as many comparisons as necessary
19:46 zakharyas joined #perl6
19:51 regreg joined #perl6
19:52 gtodd Kristien: just curious:   why did you do it  with Z== and  [&&] ? .....   sub f(@xs) { [&&] @xs Z== reverse @xs };
19:52 Kristien because I'm bad at Perl 6.
19:52 gtodd Kristien: hehhe I like finding out how peoples minds solve problems though :-D
19:52 Kristien Z and […] are about the only features I know anything about at all :P
19:52 TimToady actually, it shows quite a nice grasp of the metoperators
19:52 gtodd Kristien: ok
19:53 TimToady *meta
19:53 TimToady .oO(I never metaametaoperator I didn't like...)
19:53 TimToady s/aa/a
19:53 gtodd Kristien: it's like in your mind you laid out the list and its reverse and checked to see if the elements were  equivalent
19:54 Kristien Hmm, the problem I raised a few hours ago is also gone.
19:54 TimToady it's magic :)
19:54 Kristien :m say map({ $_ }, ((0..*) Z=> ("Hi", "Hello", "World", "!")))
19:54 Kristien I think I have an old version of Rakudo at my work machine.
19:54 moritz m:
19:54 moritz not :m
19:54 Kristien oh oops :v
19:54 Kristien m: say map({ $_ }, ((0..*) Z=> ("Hi", "Hello", "World", "!")));
19:54 camelia rakudo-moar 20aa85: OUTPUT«0 => Hi 1 => Hello 2 => World 3 => !␤»
19:55 gtodd Kristien: which is a cool way to think about it ... :-)
19:55 Kristien On my work Machine it prints 0 => Hi 0 => Hi 0 => Hi 0 => Hi 0 => Hi 0 => Hi 0 => Hi 0 => Hi 0 => Hi ...
19:55 TimToady that probably works because you added parens around the Z=>
19:56 ab5tract jnthn: am i wielding OO::Monitors incorrectly? https://gist.github.com/ab5tract/4c2b8cc439d8470cbfda
19:56 anaeem1__ joined #perl6
19:58 gtodd Kristien: since I am bad at Perl6 and things like [&&] are hard to google for .. I would've taken another approach :-)
20:00 TimToady Kristien: that's a very odd failure mode, failure to progress on a Z
20:00 TimToady I don't think I've ever seen anything like it
20:00 Kristien Only happens with map
20:00 Kristien if I remove map it works as expected
20:00 Kristien It's on Gentoo's latest Rakudo version, which may be outdated. Doesn't happen on Homebrew's latest version of Rakudo.
20:01 gtodd Kristien: first I would've made this mistake:
20:01 gtodd m: my @a = 1,2,1,2,1; my @b = 1,2,1,2,2; sub f(@xs) { @xs == reverse @xs }; f(@a).say ; f(@b).say
20:01 camelia rakudo-moar 20aa85: OUTPUT«True␤True␤»
20:01 gtodd googled for a bit ....
20:02 TimToady Kristien: what does perl6 -v tell you?
20:02 gtodd and then used eqv
20:02 Kristien On my home PC: This is perl6 version 2014.09 built on parrot 6.7.0 revision 0
20:02 Kristien On my work PC I have no idea since I have no access to it right now.
20:03 anaeem1 joined #perl6
20:04 skids Yeah, that's old.  Once you are hooked, you'll want to at least built Star to get perl6-m.  Before you know it though you'll be loitering outside guthub fiending for the latest patch. It's a brutal addiction. :-)
20:05 ab5tract gtodd: this reminds me that i wanted to mention -- perhaps part of 6.0 should be clearing out as much outdated information from google results
20:05 gtodd Kristien: so ... I conclude a) you are smart but humble; or b) you have used Haskell  ;-)
20:05 gtodd Kristien: but you will get very good at perl6 very quickly
20:05 ab5tract Kristien: rakudobrew is highly recommended :)
20:05 gtodd ab5tract: hmm good point
20:06 Kristien gtodd: I have used too many languages to list them here. :P
20:06 TimToady gtodd: a and b are not mutually exclusive
20:07 gtodd ab5tract: a new perl6 user (esp one who has used other languages knows what they are looking for)  could start getting very productive amazingly fast only to smash into outdated docs ...
20:08 TimToady but yeah, we tend to stick close to the current monthly (or minutely) version because it's actually more stable than the "stable" old versions that tend to show up in distribs
20:08 moritz gtodd: which is why any help in keeping doc.perl6.org up-to-date is highly appreciated
20:09 gtodd ab5tract: since the advents are a useful resource ... corrections in the comments could help if code examples no longer work
20:10 jnthn ab5tract: Hard to tell; I wrote the whole thing in a few hours 'cus that's all I had... Does it reproducably fail that way, and could you --ll-exception?
20:15 gtodd and TimToady probably has a way to download all perl6 code from rosettacode.org and magically ensure that it still works :)
20:16 Sqirrel joined #perl6
20:16 ab5tract jnthn: curiously, it fails differently when using perl6-debug-m
20:17 dalek joined #perl6
20:17 skids gtodd: I believe a lot of the advent examples end up in the roast suite.
20:17 * FROGGS_ turns $xml_doc->documentElement->firstChild->toStringC14N(1) into $xml-doc.root[0].c14n(:comments) and does not know if he should feel good or not
20:17 ab5tract "Internal error: Unwound entire stack and missed handler"
20:17 jnthn ab5tract: perl6-debug-m hasn't got much clue what to do with threads yet :(
20:17 virtualsue joined #perl6
20:17 arnsholt FROGGS_: Oooh, that looks pretty nice!
20:18 ab5tract jnthn: ah... another notch for 6.0 :)
20:18 Kristien gtodd: I'm involved in language design and implementation
20:18 ab5tract so then yeah, it's 100% reproducible
20:18 ab5tract if i s/start/await start/, it gives the same error
20:19 jnthn ab5tract: OK, if you've a moment please drop a link to the gist in a github issue, so I don't forget I need to look at it
20:19 FROGGS_ arnsholt: one aha moment I had ten minutes ago is the [*-1] behaviour you get for free when adding a .elems and .at_pos to you class
20:20 FROGGS_ so, ->lastChild is just [*-1], and I guess doing it that way makes it more composable in the end
20:20 FROGGS_ (doing slices and things like that)
20:22 arnsholt Yeah, definitely
20:22 gtodd skids: I *knew it* ;-) ... sort of magical
20:23 gtodd Kristien: you've come to the right place :-D
20:23 gtodd Kristien: I'm just an old and unknown perl5 weanie
20:24 dalek doc: 13e8ddb | moritz++ | lib/Language/functions.pod:
20:24 dalek doc: Add some initial docs on multis
20:24 dalek doc: review: https://github.com/perl6/doc/commit/13e8ddb8c4
20:24 abraxxa1 joined #perl6
20:24 brrt joined #perl6
20:25 PerlJam gtodd: what's your CPAN id?
20:25 gtodd hehe
20:25 gtodd unknown :-D
20:26 PerlJam That would be a neat CPAN id. :)
20:26 gtodd heheh
20:27 [Coke] m: my $c='c'; say $c++
20:27 camelia rakudo-moar 20aa85: OUTPUT«c␤»
20:27 [Coke] m: my \c = 'c'; say c++
20:27 camelia rakudo-moar 20aa85: OUTPUT«Cannot modify an immutable Str␤  in sub postfix:<++> at src/gen/m-CORE.setting:2158␤  in block <unit> at /tmp/7woezJQhbU:1␤␤»
20:27 [Coke] at least one of those looks wrong.
20:28 FROGGS_ m: my $c='c'; say $++c
20:28 camelia rakudo-moar 20aa85: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/RAWE7FsLPyâ�¤Two terms in a rowâ�¤at /tmp/RAWE7FsLPy:1â�¤------> [32mmy $c='c'; say $++[33mâ��[31mc[0mâ�¤    expecting any of:â�¤        infix stopperâ�¤        infix or meta-infixâ�¤        pos…»
20:28 FROGGS_ m: my $c='c'; say ++$c
20:28 camelia rakudo-moar 20aa85: OUTPUT«d␤»
20:28 FROGGS_ that .succ's :o)
20:28 skids Ow.
20:28 FROGGS_ I'd vote for both being correct
20:28 Kristien gtodd: Perl 5 is fun!
20:29 [Coke] FROGGS_: why does the sigil matter there
20:29 PerlJam Where do the synopses talk about things like \c ?
20:29 [Coke] ?
20:29 moritz [Coke]: because $ implies a scalar container
20:30 moritz [Coke]: whereas \c means "store whatever you got there", and what you've got is a Str, not a Str in the container
20:30 [Coke] I would have expected a note on \ under sigils.
20:30 PerlJam moritz: so, \c is more of an alias?
20:31 moritz it's not really a sigil, because it's not used everyhwere
20:31 * PerlJam is weak on the exact semantics of foo
20:31 moritz I mean, it's only used on assignment/binding, not on access to the thing
20:31 moritz PerlJam: yes
20:31 ab5tract so you need a container to .succ, then? so is the distinction between $c and \c the difference between an "object" and a "value"?
20:31 [Coke] moritz: fair enough on container vs. not. thanks.
20:32 gtodd Kristien: for sure :) perl5++  ...
20:32 ab5tract so if you're type defines a method succ, *and* you are in a container, you can use it?
20:32 [Coke] regarding docs, I don't expect a full declaration, just a note for someone looking for docs on where to go. (probably better for just docs)
20:32 ab5tract grrr... s/you're/your/
20:32 moritz [Coke]: where on doc.perl6.org would you expect it?
20:33 ab5tract moritz: ECATEGORYFAIL
20:33 Kristien m: my $x = "perl5"; $x++; say $x; # gtodd
20:33 camelia rakudo-moar 20aa85: OUTPUT«perl6␤»
20:34 DarkLoord joined #perl6
20:35 PerlJam Kristien: the only problem is that once you get to "perl9", the next ++ gives you "perm0"  (But maybe the language *needs* that radicalism then :)
20:35 moritz m: my \a = 42; a = 35;
20:35 camelia rakudo-moar 20aa85: OUTPUT«Cannot modify an immutable Int␤  in block <unit> at /tmp/V0mpwOYGBe:1␤␤»
20:36 DarkLoord test
20:36 DarkLoord test
20:36 moritz DarkLoord: plan before you test!
20:36 nwc10 that's not a real test - you missed "please ignore"
20:37 raydiak Dubious test result no plan found in TAP output
20:37 moritz raydiak++ thinks along the same lines as me
20:37 raydiak :)
20:37 FROGGS_ Two terms in a row near: test⏏test
20:38 ab5tract moritz: i spoke too soon.. http://doc.perl6.org/language/variables#___top
20:38 ab5tract http://doc.perl6.org/language/variables#Sigils
20:38 vendethiel m: my \a = 5; a := 6; say a
20:38 camelia rakudo-moar 20aa85: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/stJEOKWI1O�Cannot use bind operator with this left-hand side�at /tmp/stJEOKWI1O:1�------> [32mmy \a = 5; a := 6[33m�[31m; say a[0m�»
20:39 ab5tract and thus i find what [Coke] was looking for .. http://doc.perl6.org/language/variables#Sigilless_variables
20:39 vendethiel the < twigil? what?
20:40 regreg joined #perl6
20:40 vendethiel m: 'a' ~~ / ( a ) /; say $<a;
20:40 camelia rakudo-moar 20aa85: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Av6CD6JZ5vâ�¤Unable to parse quote-words subscript; couldn't find right angle quoteâ�¤at /tmp/Av6CD6JZ5v:1â�¤------> [32m'a' ~~ / ( a ) /; say $<a;[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤ …»
20:40 FROGGS_ vendethiel: $<foo>
20:40 moritz vendethiel: pseudo twigil
20:40 vendethiel that's not a twigil
20:40 TimToady well, it is, but it requires a corresponding > is all
20:40 moritz what is it, then?
20:40 masak DarkLoord: you can't test twice without writing any code inbetween :)
20:40 masak moritz: a circumgil! :D
20:40 dalek doc: 9666759 | moritz++ | lib/Language/variables.pod:
20:40 dalek doc: Link to sigilless vars earlier
20:40 dalek doc: review: https://github.com/perl6/doc/commit/9666759ba5
20:40 TimToady masak: was checking for cosmic ry interactions
20:41 zakharyas joined #perl6
20:41 TimToady *ray  <- there was one
20:41 moritz there was your catcher in the ray
20:41 tgt joined #perl6
20:42 * masak .oO( ♫ rye, a drop of golden sun ♫ )
20:42 vendethiel psch: https://github.com/peschwa/eigmip6/blob/master/tritone-in-c.pl6#L22-L24
20:42 vendethiel couldn't that be `my ($root, $third, $fifth) = $num-to-Notes{$in, ($in + 4) % 12, ($in + 7) % 12}` ?
20:43 DarkLoord join #freakshow
20:43 FROGGS_ DarkLoord: we'll just stay in this one
20:44 vendethiel the repl on windows is... ugh
20:44 ab5tract how extensible is the current repl?
20:44 vendethiel I can't even type { inside of the repl. any accentuated letter will crash it with "invalid utf8"
20:44 ab5tract can it be loaded from a script with custom I/O for instance?
20:44 * TimToady would like to see it scrapped and replaced with something much more incestuous with the prser
20:44 TimToady ooh, another cosmic ray hit
20:45 ab5tract hehe
20:45 FROGGS_ look, a squirrel!
20:45 moritz vendethiel: is your terminal configured to use UTF-8?
20:45 ab5tract TimToady: i'm not sure if i ever elaborated on the Explore module concept i had
20:45 vendethiel moritz: I'm using cmd.exe
20:45 * raydiak hopes the cosmos stops hitting him soon
20:45 vendethiel m: my %a; %a{'a'..'z'} = 1..*; my ($a, $b, $c) = %a{'e', 'g', 'f'}; say $b
20:45 camelia rakudo-moar 20aa85: OUTPUT«7␤»
20:45 moritz vendethiel: and is it configured to use UTF-8?
20:45 ab5tract the perl6 repl could resemble something like an ipython notebook
20:46 vendethiel moritz: I don't think that's configurable
20:46 moritz vendethiel: I think it is
20:47 vendethiel can't find it in the options
20:47 FROGGS_ cp-something something
20:47 moritz mode con codepage prepare $something
20:47 ab5tract i imagine it being trivial to load up a 'view' onto the source code of any given method/operator/library/etc
20:47 DarkLoord join #freakshow
20:47 FROGGS_ vendethiel: http://ss64.com/nt/chcp.html
20:47 moritz http://stackoverflow.com/questions/14109024/how-to-make-unicode-charset-in-cmd-exe-by-default
20:47 ab5tract add comments, experi[ment|ence]s ..
20:47 DarkLoord join #freakshow
20:48 FROGGS_ vendethiel: so it would be chcp 65001
20:48 moritz DarkLoord: add a / in front
20:48 vendethiel I can't even type accents anymore
20:48 FROGGS_ ohh, what a fopaux
20:49 vendethiel .oO( faux pas )
20:49 ab5tract runnable code snippets, pipe-able outputs, even potentially providing compunits as modules in a patching environment
20:49 FROGGS_ :P
20:49 FROGGS_ so, the repl could also make for a good gsoc project
20:49 jnthn Could actually, yeah
20:50 anaeem___ joined #perl6
20:51 dalek doc: 6beb0c9 | moritz++ | lib/Language/variables.pod:
20:51 dalek doc: Link to Match documentation in context of $/ variables
20:51 dalek doc: review: https://github.com/perl6/doc/commit/6beb0c9cc8
20:54 dalek mu: 47c6ff9 | FROGGS++ | misc/gsoc-2015/ideas.md:
20:54 dalek mu: add the REPL as a gsoc task
20:54 dalek mu: review: https://github.com/perl6/mu/commit/47c6ff9a96
20:54 gtodd ab5tract: ++
20:54 dalek doc: 134f23f | moritz++ | lib/Language/variables.pod:
20:54 dalek doc: Add a paragraph and example for the "our" scope declarator
20:54 dalek doc: review: https://github.com/perl6/doc/commit/134f23f38a
20:54 gtodd for repl idea :)
21:02 ilbot3 joined #perl6
21:02 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
21:02 TimToady it's probably impractical lazily too :)
21:02 TimToady at least until the GLR
21:03 moritz m: say [*] 1..9
21:03 camelia rakudo-moar 20aa85: OUTPUT«362880␤»
21:03 TimToady but if you want to enumerate them all, then why not eagerly?
21:03 grondilu because I can't see what is happening in real time.
21:03 TimToady much more cache friendly
21:03 grondilu (for debugging)
21:04 grondilu plus it's hard to get an idea of how fast it's going if it's doing all in row
21:04 Mso150_a joined #perl6
21:05 TimToady I just temporarily compile a note into the setting when I want to know something like that :)
21:05 TimToady anyway, I think it was something like 8 times faster at the time I made the change
21:05 skids Would getting the build/install systems in order (e.g. not building things during config stage, only rebuild what changed) be too mundane for GSoC?
21:06 TimToady though I could be confusing that with something else
21:06 grondilu well, if you tll me that after the GLR we may switch back to lazy behavior, I'm fine with that and can wait.
21:06 TimToady the GLR can hopefully negotiate from end to end whether the whole thing is eager or lazy
21:07 TimToady so we can have our cake and eat it too
21:07 zakharyas joined #perl6
21:07 dalek doc: c1579c3 | moritz++ | lib/Language/variables.pod:
21:07 dalek doc: temp declarator: better/correcter explanation
21:07 dalek doc: review: https://github.com/perl6/doc/commit/c1579c3681
21:07 dalek doc: 4e7b547 | moritz++ | lib/Language/traps.pod:
21:07 dalek doc: Consistent spelling for "Perl 6"
21:07 dalek doc: review: https://github.com/perl6/doc/commit/4e7b547bbf
21:08 skids sorry
21:08 moritz skids: no problem
21:08 ab5tract gtodd: what i guess i expect is some way to issue commands to a 'pool' of repls with arbitrary scopes and states (essentially akin to how Inline::Perl5 works, in a way)
21:08 gtodd ab5tract: oops not sure how that got private messaged
21:08 dalek mu: f06f24c | raydiak++ | docs/feather/syn_index.html:
21:08 dalek mu: Fix broken stylesheet url
21:08 kaare_ joined #perl6
21:08 dalek mu:
21:08 dalek mu: There isn't much difference (yet), which is why nobody noticed it's been broken for a month
21:08 dalek mu: review: https://github.com/perl6/mu/commit/f06f24cc20
21:09 dalek doc: deac9aa | moritz++ | lib/Language/classtut.pod:
21:09 dalek doc: more consistent "Perl 6" spelling
21:09 dalek doc: review: https://github.com/perl6/doc/commit/deac9aa0ce
21:09 gtodd ab5tract: cool
21:24 denis_boyun_ joined #perl6
21:25 psch vendethiel: yeah, i suppose so.  it could also coerce to Notes instead of having that awkward %notes hash
21:27 muraiki_ joined #perl6
21:27 psch vendethiel: but i didn't know about enum coercion yet, and haven't done anything more with that repo since then either
21:30 raydiak moritz: is there a reason for text::smartlinks to be generating html 4 transitional instead of something more modern, or at least more strict?
21:30 DarkLoord joined #perl6
21:30 raydiak and if I change it...is it used by anything besides design.perl6.org?
21:31 raydiak looking at lining up the doctypes on syn_index.html and text::smartlinks output, so I can use the same header/footer inserts everywhere in the new design...maybe switch it all to html5? thoughts/feelings?
21:32 Kristien I wanna write some program in Perl 6 to give it a try.
21:33 skids do it. doitdoitdoitdoit!
21:33 skids :-)
21:34 TimToady if you're looking for ideas, there's always http://rosettacode.org/wiki/Reports:Tasks_not_implemented_in_Perl_6
21:34 Kristien I always wanted to write an uptime monitor.
21:34 moritz raydiak: only hysterical raisins for html 4
21:34 TimToady but you should write something that you find motivating :)
21:34 moritz raydiak: html5 didn't exist when text::smartlinks was written, iirc
21:35 * TimToady wonders what percentage of browsers out there still look cross-eyed at html5
21:35 raydiak very, *very* small
21:35 Kristien IE
21:35 moritz IE != IE
21:35 raydiak XPers using IE, but that's not gonna last much longer either
21:36 PerlJam lots of browsers on government computers that are running old version of Windows, IE, etc.
21:36 raydiak if you are using IE 8, you are likely very used to looking at the web through broken glasses
21:36 raydiak by now
21:36 skids Kristien: You could give Inline::Perl5 a run for its money trying Net::SNMP.  I don't think anyone's done that yet.
21:37 moritz perl6.org README says "IE8 still needs to be considered (2014-03). IE7 and below can be ignored."
21:37 masak IE8 seems to be at 10% currently. http://www.theie8countdown.com/
21:37 skids (If SNMP doesn't make you tear up.  Sometimes it does that to me.)
21:38 * raydiak is happy to give that 10% one more reason to stop making my life difficult
21:38 vendethiel masak: wow, we're in 2013 already? :P
21:38 moritz where I'd say "considered" means "should be somewhat readable", not "needs to be perfectly rendered"
21:39 raydiak hm
21:41 raydiak guess I'll stick with 4 strict, better than getting it done and finding it fundamentally broken on a target platform
21:46 Kristien Is it already possible to spawn processes?
21:46 moritz Kristien: there's shell() and run() and qx//
21:47 japhb Also Proc::Async
21:48 moritz that needs documentation
21:48 Kristien ah thanks
21:49 moritz oh, and run and shell are also undocumented :(
21:49 moritz (on doc.perl6.org, that is)
21:50 dalek doc: d27cb96 | moritz++ | TODO:
21:50 dalek doc: Add run/shell/Proc::Async TODOs
21:50 dalek doc: review: https://github.com/perl6/doc/commit/d27cb9655a
21:51 Mso150 joined #perl6
21:52 psch hah, first time merging a PR on github and apparently i thanked ven++ in the commit message of the merge
21:53 psch instead of leaving the original commit message in there...
21:55 * raydiak wonders where theie8countdown.com gets its data and how recently it was updated...those are not the numbers seen at statcounter, w3counter, etc
21:57 * masak .oO( masak's law of data: The Data Is Always Wrong )
22:02 PerlJam masak: I think that's more true of "real time data" than historical data usually.
22:03 Ele1 joined #perl6
22:04 raydiak I tend to check several sources and do a sort of weighted average, unless they're in obvious disagreement...which at least holds up in most discussions, in spite of whole-hearted agreement with Masak's Law of Data :)
22:05 Ele1 left #perl6
22:05 masak raydiak: clearly, the consensus view between my law and your addendum is: (a) check several sources, and then (b) the data is still wrong :P
22:05 PerlJam raydiak: that sounds wisdom-of-the-crowd-ish
22:06 Kristien Hmm, start and Promise aren't in scope even though I have Rakudo 2014.09.
22:07 raydiak PerlJam: maybe...that's where the "weighted average" comes in, which is where, in an even less-rigorous fashion, I use my experience and intuition to decide which sources to trust more than others
22:08 pmurias joined #perl6
22:09 raydiak masak: I'd say that's factually accurate, for at least some definitons of "wrong"...just not a position that's going to do much for most debates, other than stop them dead on both sides :)
22:10 masak *nod*
22:10 * raydiak used to tell people "you don't know anything until you realize you know nothing"
22:11 masak knowledge is tricky.
22:12 PerlJam masak: yeah ... but how do you *know* that?  ;)
22:13 masak I have all this data that... dang.
22:14 * raydiak finally understands...and retires to build a cabin in the remote wilderness
22:17 Kristien japhb: in which version of Rakudo Star should Proc::Async be available?
22:17 Kristien > added experimental support for Proc::Async, MoarVM only for now
22:17 Kristien Oh. :v
22:18 lsm-desktop joined #perl6
22:27 booly-yam-6137 joined #perl6
22:34 denis_boyun_ joined #perl6
22:35 bjz joined #perl6
22:42 telex joined #perl6
22:47 bjz joined #perl6
22:50 kjs_ joined #perl6
23:04 booly-yam-6137 joined #perl6
23:25 skids joined #perl6
23:26 booly-yam-6137 joined #perl6
23:29 rurban joined #perl6
23:38 araujo joined #perl6
23:41 masak m: class A { trusts ::B; method !foo { say "OH HAI" }; class B { method bar { $*a!foo() } }; method baz { my $*a = self; B.new.bar } }; A.new.baz
23:41 camelia rakudo-moar 20aa85: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Bh4Ig7A9fL�No such private method 'foo' for invocant of type 'B'�at /tmp/Bh4Ig7A9fL:1�------> [32m HAI" }; class B { method bar { $*a!foo([33m�[31m) } }; method baz { my $*a = self; B.new…»
23:41 masak several questions:
23:41 masak (a) can I call a private method in one class from another?
23:41 masak (b) is the above the way to do it?
23:42 masak (c) should I rather place the `trusts` before the (nested) caller class, or after it? do both work?
23:42 masak (d) should the above work? is it a bug that it doesn't?
23:47 jnthn masak: There's multiple things wrong with your code.
23:47 jnthn masak: First, private method calls are not virtual, and must always be qualified; failing to do so implicitly takes the surrounding class.
23:48 jnthn masak: Second, you need to stub B, then trusts B;
23:48 masak qualified, as in `$*a!A::foo()` ?
23:48 jnthn The error message tells you the first, btw, 'cus it says it's looking for it in B
23:48 jnthn Yes.
23:48 masak thank you.
23:49 masak m: class A { class B { ... }; trusts B; method !foo { say "OH HAI" }; class B { method bar { $*a!A::foo() } }; method baz { my $*a = self; B.new.bar } }; A.new.baz
23:49 jnthn Finally, $*a contains an instance of B, not A? :)
23:49 camelia rakudo-moar 20aa85: OUTPUT«OH HAI␤»
23:49 masak jnthn++
23:49 masak no, it contains an A.
23:50 jnthn Oh :)
23:50 masak I'm not 100% clear on why `trusts ::B;` doesn't work.
23:50 jnthn Note that since private methods aren't virtual, you get compile-time typo detection.
23:50 masak *nod*
23:50 jnthn Because trusts happens at BEGIN time.
23:51 masak this is the first time I've felt I've wanted *both* Java's "qualified self" notation *and* `trusts`.
23:51 jnthn And is an immediate MOP call to .add_trusts or so.
23:51 BenGoldberg joined #perl6
23:52 jnthn I'm sure the reason is hidden in the code I can't see, but if A is an aggreate with B inside of it, then a lexical class B and a normal method might be enough...
23:54 masak a normal method is what I've ended up with, at least as a workaround.
23:54 masak I'll see if I end up turning them back into private methods and the working solution above.
23:56 jnthn *nod*
23:56 adu joined #perl6
23:58 masak as an author of grammars, I still find it annoying and difficult that grammars generally fail, that is, return a failing match -- *unless* you use the `~` combinator, in which case they nqp::die with an exception that can't be properly caught using a CATCH.
23:59 masak in effect, that gives grammars three possible outcomes: success, failure, or death-because-of-failgoal.

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

Perl 6 | Reference Documentation | Rakudo