Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-07-13

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:09 Mouq m: say { :in{1+1}, :start{2+2} }.perl
00:09 camelia rakudo-moar c19ae7: OUTPUT«{"in" => -> ($_? is parcel) { #`(Block|139784554724576) ... }, "start" => -> ($_? is parcel) { #`(Block|139784554725048) ... }}␤»
00:09 Mouq m: say { :in{1+1} :start{2+2} }.perl
00:09 camelia rakudo-moar c19ae7: OUTPUT«{"in" => -> ($_? is parcel) { #`(Block|140100960787408) ... }}␤»
00:18 BenGoldberg joined #perl6
00:29 jnap joined #perl6
00:42 thou joined #perl6
00:52 chenryn joined #perl6
00:58 btyler joined #perl6
01:20 xenoterracide joined #perl6
01:23 atroxaper joined #perl6
01:32 mls joined #perl6
01:34 FROGGS_ joined #perl6
01:41 klapperl joined #perl6
01:53 chenryn joined #perl6
02:02 dylanwh joined #perl6
02:10 noganex joined #perl6
02:30 thou joined #perl6
02:51 thou joined #perl6
02:53 chenryn joined #perl6
02:57 Akagi201 joined #perl6
03:16 btyler joined #perl6
03:58 thou joined #perl6
03:59 _Slade_ joined #perl6
04:15 araujo joined #perl6
04:21 chenryn joined #perl6
04:23 rindolf joined #perl6
04:23 rindolf Hi all.
04:56 firnsy joined #perl6
04:56 firnsy joined #perl6
05:06 chenryn joined #perl6
05:12 kaare_ joined #perl6
05:21 chenryn joined #perl6
05:26 kaare__ joined #perl6
05:26 SamuraiJack joined #perl6
05:28 SamuraiJack_ joined #perl6
05:43 molaf joined #perl6
05:59 khisanth__ joined #perl6
06:09 atroxaper joined #perl6
06:22 chenryn joined #perl6
06:27 virtualsue joined #perl6
06:40 atroxaper_ joined #perl6
06:47 chenryn joined #perl6
06:51 kweetal joined #perl6
07:01 breinbaas joined #perl6
07:06 Rotwang joined #perl6
07:35 anaeem1 joined #perl6
07:40 darutoko joined #perl6
07:52 chenryn joined #perl6
07:58 atroxaper_ Hello, #perl6 !
07:59 atroxaper_ yoleaux didn't pass me message from Mouq :(
08:00 atroxaper_ .tell Mouq I merged your pull request and did some changes. Today I'm going to make a lists render.
08:00 yoleaux atroxaper_: I'll pass your message to Mouq.
08:06 chenryn joined #perl6
08:15 dalek roast: 9618ad9 | (Elizabeth Mattijsen)++ | S02-types/deprecations.t:
08:15 dalek roast: Make %h = {...} deprecation test pass on parrot
08:15 dalek roast: review: https://github.com/perl6/roast/commit/9618ad9499
08:20 dalek rakudo/nom: 4fd4639 | (Elizabeth Mattijsen)++ | src/core/Deprecations.pm:
08:20 dalek rakudo/nom: Make deprecation message insensitive to hash order
08:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4fd4639b95
08:21 lizmat which should fix deprecation message tests on jvm
08:23 anaeem1_ joined #perl6
08:48 dmol joined #perl6
08:50 thou joined #perl6
08:58 SamuraiJack_ joined #perl6
09:01 masak good antenoon, #perl6
09:01 chenryn joined #perl6
09:03 atroxaper_ masak: hello!
09:07 beastd joined #perl6
09:11 telex joined #perl6
09:17 chenryn joined #perl6
09:18 anaeem1_ joined #perl6
09:18 timotimo ohai masak
09:25 chenryn joined #perl6
09:28 chenryn_ joined #perl6
09:29 Alula_ joined #perl6
09:30 atroxaper joined #perl6
09:38 dalek roast: b40d639 | (Elizabeth Mattijsen)++ | S22-package-format/local.t:
09:38 dalek roast: Argh, fudging cannot handle trailing ;
09:38 dalek roast: review: https://github.com/perl6/roast/commit/b40d639ff8
09:41 dalek roast: c4b7322 | (Elizabeth Mattijsen)++ | S22-package-format/local.t:
09:41 dalek roast: Apparently we can't do signals on JVM either
09:41 dalek roast: review: https://github.com/perl6/roast/commit/c4b7322985
09:42 anaeem1 joined #perl6
09:43 vendethiel- joined #perl6
09:47 Psyche^ joined #perl6
09:48 Ven joined #perl6
10:11 * masak dreams of a day when the fudger isn't text-based but based on the parse tree
10:20 dalek rakudo/nom: c0eef70 | (Elizabeth Mattijsen)++ | src/core/CompUnit.pm:
10:20 dalek rakudo/nom: Make method names a bit more consistent
10:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c0eef70af2
10:25 atroxaper joined #perl6
10:27 kurahaupo joined #perl6
10:29 dalek rakudo/nom: 0c38be3 | (Elizabeth Mattijsen)++ | src/core/CompUnit.pm:
10:29 dalek rakudo/nom: Be at least internally consistent
10:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0c38be3fdd
10:33 ariden__ joined #perl6
10:33 chenryn_ joined #perl6
10:33 masak oh, and the whole fudger is ~250 lines of Perl 5 :) that's gotta change, too.
10:34 timotimo you reckon it'll only be 25 lines of perl6 when you're done refactoring? :)
10:34 masak well, challenge accepted.
10:34 masak probably more like 100 lines, though.
10:34 * vendethiel- watches over masak
10:35 masak I wonder what an easy way would be to show it's in feature parity.
10:35 * vendethiel- didn't quite get that last sentence
10:35 masak probably simply to register all the fudged files and compare them.
10:36 masak vendethiel-: if you replace a p5 fudger with a p6 fudger, you don't want them to differ in the output they produce.
10:36 lizmat s/feature parity/same features/
10:36 vendethiel- oh. I thought you mean p5 and p6 ¬¬
10:36 * vendethiel- was thinking of something akin to https://github.com/satyr/coco/wiki/additions
10:37 atroxaper joined #perl6
10:38 thou joined #perl6
10:39 atroxaper joined #perl6
10:40 cibs joined #perl6
10:54 kurahaupo joined #perl6
10:58 cibs joined #perl6
11:04 lizmat fwiw, I think there is something fundamentally wrong in the way that we create pre-compiled versions of modules
11:04 dylanwh joined #perl6
11:04 lizmat Instead of a pre-compiled version of Foo.pm called Foo.moarvm
11:04 masak ok?
11:05 lizmat it should be called Foo.pm.moarvm
11:05 lizmat this will preserve the original extension of the module in the filename
11:05 masak worksforme
11:05 masak that suggestion, I mean.
11:05 lizmat ok
11:06 lizmat I hope jnthn / moritz / tadzik / FROGGS will also agree
11:06 Ven joined #perl6
11:06 moritz +1
11:07 lizmat it should allow v5 and v6 modules with the same name (eg. Foo.pm and Foo.pm6) to co-exist in the same dir as pre-compiled files
11:08 chenryn_ joined #perl6
11:11 xinming_ joined #perl6
11:14 dalek rakudo/nom: 1154641 | (Elizabeth Mattijsen)++ | src/core/CompUnit.pm:
11:14 dalek rakudo/nom: Make sure we have a Bool value
11:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1154641052
11:30 dalek roast: ebc873e | (Elizabeth Mattijsen)++ | S22-package-format/local.t:
11:30 dalek roast: Some more CURLF / CompUnit tests
11:30 dalek roast: review: https://github.com/perl6/roast/commit/ebc873e54f
11:40 molaf_ joined #perl6
11:43 Auzzi joined #perl6
11:43 sue_ joined #perl6
11:45 Ven joined #perl6
11:45 anaeem1_ joined #perl6
11:47 jnthn I don't see people saying C compilers are fundementally wrong because they produce foo.o instead of foo.c.o :P
11:49 vendethiel- can you use v5; inside of a c compiler ?
11:50 vendethiel- .oO( This would explain so much, yet so little )
11:50 lizmat jnthn: well, true but in C, you only have .c
11:50 lizmat in Perl 6, we already have .pm, .pm6
11:50 lizmat and .pl
11:50 vendethiel- (and .t, does those count ?)
11:51 lizmat no
11:51 lizmat because even if we would do a pre-compiled version of a test file
11:52 lizmat it would not work because most likely we would have a different version of the executor running against it
11:52 jnthn It'd be odd to have a .pm6 and a .pm both intended for Perl 6... :)
11:52 lizmat I mean, if neither the test-file or the executor changed
11:53 jnthn Yes, pre-compiling tests sounds kinda useless :)
11:53 lizmat $ ls lib/Test.pm
11:53 lizmat lib/Test.pm
11:53 jnthn Yes, and there's not a Test.pm6 there too :)
11:54 jnthn Anyway, I don't really object to it being Foo.pm.jar or Foo.pm.moarvm; if Rakudo's managing it then it can be called whatever we want it to anyway.
11:54 jnthn Though inferring the .pm file name from the compiled output name feels a tad fragile.
11:55 jnthn (If that was the plan, anyway.)
11:57 lizmat well, yes, that was the plan
11:57 lizmat feels less fragile then having to guess complety, no ?
11:57 lizmat *completely
11:57 * jnthn feared so, and wonders why the more robust suggestion he made a few days ago has been ignored.
11:57 lizmat then that must have slipped my mind...  :-(
11:58 jnthn Or does that not make the filename available early enough?
11:58 lizmat ah, you mean the $?FILES idea?
11:58 jnthn $?FILE, but yeah
11:58 lizmat well, two things:
11:58 jnthn The module loader gets back UNIT of the module
11:59 lizmat but that's just it: you would need to load the module
11:59 lizmat until you find out what the original filename was
11:59 lizmat s/until/before
11:59 jnthn Well, this is all very XY
11:59 jnthn I guess my real question is, why does the inference go in this direction...
12:00 jnthn I'd thought the .pm/.pm6 files were primary, and pre-compiled things serve as a kind of "cached" compilation of the module...
12:00 lizmat but you would want to attempt to load the cached version first, right?
12:00 jnthn So if you're loading a .moarvm file you already know it's the file for a particular comp unit.
12:01 lizmat but that's just it: you currently cannot be sure
12:01 lizmat if you have a Foo.pm, a Foo.pm6 in the same dir
12:01 lizmat one for v5, one for v6
12:02 lizmat then currently you can precomp only one of them
12:02 jnthn then you're probably crazy...but yes, you're right. :)
12:02 lizmat I'm just reminded of Murphy
12:02 lizmat anything that *can* go wrong, will
12:02 jnthn Well, DIHWITD :)
12:03 jnthn But yeah, no real objections to including the full module filename in the precomp name.
12:07 lizmat ok, then I'll try to get that working without breaking anything
12:10 lizmat BTW: $ ls lib/lib.pm6
12:10 lizmat lib/lib.pm6
12:11 lizmat so, 'use lib' refers to lib/lib.pm6, and 'use Test' refers to lib/Test.pm
12:11 jnthn aye :)
12:11 lizmat seems inconsistent to me... any reason for this ?
12:11 jnthn Well, I think we'll just have to live with people using both extensions.
12:11 lizmat agree, but do we need to be inconsistent in the core modules ?
12:12 jnthn Well, it lets us know pretty soon if we break one of the ways :D
12:12 lizmat that's true
12:12 lizmat :-)
12:12 sue__ joined #perl6
12:12 jnthn I think the history of it is simply that Test.pm has been there longer than we have used .pm6 though.
12:12 SamuraiJack joined #perl6
12:12 jnthn So there's no deep reason or anything, afaik. Just history.
12:22 vendethiel- m: class A { method foo { say $.a } }
12:22 camelia rakudo-moar 0c38be: ( no output )
12:22 vendethiel- m: class A { method foo { say $.a } }; A.new
12:22 camelia rakudo-moar 0c38be: ( no output )
12:23 vendethiel- m: class A { method foo { say $.foo } }; A.new.foo
12:23 camelia rakudo-moar 0c38be: OUTPUT«(timeout)»
12:24 jnthn So recursion...
12:25 vendethiel- much deep.
12:27 thou joined #perl6
12:28 atroxaper joined #perl6
12:35 itz_ joined #perl6
12:36 lizmat on recursion, probably:
12:36 lizmat https://gist.github.com/li​zmat/3c4246c57f0a695c7d21
12:36 lizmat a simple syntax error (forgot ;)
12:37 lizmat make settings compile go into oblivion
12:37 FROGGS joined #perl6
12:37 lizmat not sure if something should be done about it though, but could be helpful to know if your working on the settings
12:38 lizmat and all of a sudden, it doesn't complete compilation anymore
12:40 lizmat now first: cycling&
12:41 carlin joined #perl6
12:54 kaare__ joined #perl6
13:04 ChoHag Hah! The bug only shows up when the output is not tee'd into a log file.
13:12 colomon_ joined #perl6
13:12 ggoebel111118 joined #perl6
13:15 dmol joined #perl6
13:24 atroxaper_ joined #perl6
13:24 pecastro_ joined #perl6
13:40 akaseki joined #perl6
13:40 nys joined #perl6
14:15 thou joined #perl6
14:19 zakharyas joined #perl6
14:29 guru joined #perl6
14:29 PotatoGim joined #perl6
14:41 sue_ joined #perl6
14:47 isBEKaml joined #perl6
14:53 massimo joined #perl6
14:55 massimo left #perl6
14:56 chenryn_ joined #perl6
15:03 SamuraiJack_ joined #perl6
15:08 denis_boyun_ joined #perl6
15:16 denis_boyun___ joined #perl6
15:19 hoverboard joined #perl6
15:20 dalek rakudo-star-daily: e35ef30 | coke++ | log/ (13 files):
15:20 dalek rakudo-star-daily: today (automated commit)
15:20 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/e35ef30ef5
15:20 dalek perl6-roast-data: ec1e3b8 | coke++ | / (4 files):
15:20 dalek perl6-roast-data: today (automated commit)
15:20 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/ec1e3b89eb
15:21 [Coke] (fudger based on the parse tree. wouldn't that raise the bar too high for new implementations?)
15:31 carlin joined #perl6
15:43 nbrown joined #perl6
15:51 nbrown joined #perl6
15:59 MilkmanDan joined #perl6
16:00 atroxaper joined #perl6
16:03 thou joined #perl6
16:04 khisanth__ joined #perl6
16:05 denis_boyun joined #perl6
16:09 * psch wonders how useful loading classfiles from $CLASSPATH actually is for j-rakudo
16:10 psch i've hacked it into BootJavaInterop to load those, i.e. 'CLASSPATH=. perl6-j -e"use A:from<java> ..."' where A.class is in . works
16:10 psch previously it only worked with appending . to -Xbootclasspath, iirc
16:11 psch but then, things usually come jar'd anyway, don't they. i haven't actually tested how that works at the moment, but istr that vendethiel-++ had some fun with a friend with that
16:11 psch https://gist.github.com/pe​schwa/0158083bc4e5613a6390 # this is the patch, for reference
16:11 vendethiel- psch: yeah, though I think he stopped to basic stuff like io / stringbuffers, etc
16:12 vendethiel- (and it really wasn't pretty :P)
16:12 psch vendethiel-: did you get beyond loading anything that's not loaded by the java bootclassloader? i.e. stuff that's not in the jre
16:12 vendethiel psch: no clue, I'd need to ask him. But I don't think so.
16:13 vendethiel I really just skimmed over what p6 brings to the table and we hacked for like 1h, so no dwelving deeper
16:13 * vendethiel spent again 3 hours today explaining P6 with his game of life as an example
16:13 psch right, thanks for the info :)
16:14 psch the bigger blocker for neat jvminterop is definitely getting pretty signatures for resolving overloaded methods
16:14 psch in any case, with my patch one *could* write java classes that don't utilize overloading and use those from perl6
16:14 psch and it'd be all clean
16:15 psch but the use still seems limited to me, tbh :)
16:15 psch s/use/usefulness/
16:15 psch because java without any overloading that you probably wrote yourself could just be ported... :D
16:15 vendethiel psch: the usefulness of ? writing P6 class from jvm ?
16:16 vendethiel well, but then, there's a reason we write p6 and not java code ;-)
16:16 vendethiel he (my friend) was especially interested in grammars, that could make some of his code at least 10 times simpler ...
16:17 psch vendethiel: right, i better tosh the patch - it'd just encourage java people *not* to rewrite everything in perl6 ;)
16:17 vendethiel psch: why not ?
16:18 psch vendethiel: because it's a bit of an improvement for interop, i.e. using the existing java code
16:18 psch it was a bit of a silly joke
16:18 psch no one likes rewriting stuff just because
16:18 vendethiel I disagree, we do that all the time ;-)
16:19 psch oh, okay.  shows what i know :)
16:21 vendethiel .oO( I'm okay with them rewriting anything, so long they don't bring those stinky' factories along :P )
16:31 psch vendethiel: http://bash.org/?946461 # you reminded me of this :)
16:32 vendethiel if only it were just a joke ... :(
16:32 _Slade_ joined #perl6
16:33 psch i've only spend about a year actually working with java, in a rather small shop.  over-abstraction didn't really happen there.
16:35 vendethiel well, factories were only created because of the lack of lambdas.
16:36 vendethiel (java's finally catching up with this kind of stuff, after c++ even ...)
16:36 raiph joined #perl6
16:38 sue_ joined #perl6
16:40 psch what i still want to get into jarakudo is patching -I and PERL6LIB into the classpath
16:40 psch but afaiu that means delegating *all* classloading to a custom classloader
16:41 psch as in, the patch above just enables CLASSPATH for perl6-j, but -I and PERL6LIB don't get searched for classfiles
16:41 psch which is obviously not intuitive at all.  on the other hand it's also a bit arcane.
16:42 atroxaper joined #perl6
16:42 psch (i also have no idea in how far lizmat+
16:42 psch (i also have no idea in how far lizmat++'s work on compunits might do things differently there)
16:44 psch (...but if i'm not completely dumb compunits don't play a role in loading :from<java> :)
16:48 * lizmat is backlogging
16:49 virtualsue joined #perl6
16:49 grondilu joined #perl6
16:49 grondilu off topic: antares launch in 3 minutes:  http://spaceflightnow.com/antares/orb2/status.html
16:59 lizmat psch: actually, I'm thinking about creating an API in which class loading can be plugged
17:01 virtualsue joined #perl6
17:01 psch lizmat: 'class' here is the p6-construct?
17:06 psch i'm not sure i'm well-versed enough in the abstract concepts - i just stumbled upon something i thought should work and made it work as i thought it should
17:12 lizmat the problem with all of this, is that in the Perl world, loading a module is really loading a piece of code that hopefully contains that module
17:12 psch in any case i do recognize my patch as band-aid-y - as mentioned, using -I or PERL6LIB instead of CLASSPATH is probably neccessary
17:13 lizmat and that currently all of the module loading code lives in nqp or below that
17:14 lizmat I'm trying to get this to Perl 6 land as much as possible, so that a pluggable Perl6 API becomes more feasible
17:15 lichtkind joined #perl6
17:16 xenoterracide joined #perl6
17:16 psch lizmat: how does this apply to loading java classfiles? should a perl6-m on encountering a use ..:from<java>; check for perl6-j?
17:19 nbrown joined #perl6
17:24 ponbiki joined #perl6
17:27 lizmat a perl6-m should probably die on seeing a use ...:from<Java>
17:28 nbrown joined #perl6
17:28 thou joined #perl6
17:29 timotimo ideally, it'd work :P
17:29 psch in turn that means that a perl6-j encountering a use ...:from<java> checks if it has a .jar and .class capable loader plugged, which goes into Java land to load the class as java and then builds a FFI or somesuch onto the loaded class, right?
17:31 timotimo the FFI stuff already exists
17:32 nbrown joined #perl6
17:32 timotimo it introspects the class you've pulled in and generates java code that knows how the call convention of rakudo/nqp works and calls the appropriate method on the passed instance
17:34 timotimo currently it is only able to figure out the right candidate to call on an "overrided" method if the method is the only one with the given number of arguments
17:34 timotimo at least last time i touched the code it was like that
17:34 timotimo you can find that stuff in the nqp repo somewhere under vm/jvm/.../runtime/...very_long_path.../
17:37 psch timotimo: right, i did see the existing FFI stuff, or rather played with it a bit
17:37 psch that's where i actually came across the need of not wanting to add '.' to the -Xbootclasspath option for perl6-j
17:41 * lizmat is a complete jvm noob
17:43 timotimo lizmat: i was a complete jvm-internals noob before i did that :)
17:44 virtualsue joined #perl6
17:49 nbrown_ joined #perl6
17:51 psch i think that's a distinction to make here though: does pluggable class loading handle loading native code for the corresponding backend? i.e. the java example i already gave, potential PIR code on parrot and non-perl6 moar bytecode?
17:53 psch i don't know if that's been thought of or really seems reasonable, but i think it's worth mentioning... :)
17:53 psch i do actually agree, to an extend, with timotimo's "ideally it would work" with the added caveat "provided perl6-j is available"
17:53 timotimo oh
17:53 timotimo why have a perl6-j, why not just bundle our own sleeker jvm, like Avian?
17:53 timotimo :P
17:54 psch i think you just dropped that ball in your court :)
17:55 psch if only because i'm also quite a jvm noob
18:01 Isp-sec joined #perl6
18:08 virtualsue joined #perl6
18:13 atroxaper joined #perl6
18:20 Alula_ joined #perl6
18:36 zakharyas joined #perl6
18:43 Ven joined #perl6
18:51 dalek rakudo/nom: b25b868 | (Tobias Leich)++ | src/Perl6/World.nqp:
18:51 dalek rakudo/nom: add nqplist helper hllsym for use in slangs
18:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b25b868bd0
18:56 nbrown joined #perl6
19:02 Ven m: role WithValue { method !m { say $.a } }; class B does WithValue { has $.a = 5; method f { self!m } }; say B.new.f;
19:02 camelia rakudo-moar 115464: OUTPUT«5␤True␤»
19:03 Ven so, a class can access the private methods of a role
19:03 Ven m: role WithValue { has $!a = 5; }; class B does WithValue { method f { $!a } }; say B.new.f;
19:03 camelia rakudo-moar 115464: OUTPUT«5␤»
19:03 anaeem1 joined #perl6
19:03 Ven and the fields too. But the inverse is untrue (a role can't accede private stuff from a class)
19:09 Ven Well, it's really hard to explain textually. I'm afraid this learnXinY will actually contain so much, anybody trying to understand it will have to re-read it a few times ...
19:09 Ven Well, I guess I'll go with that for now, and change it to be slower-paced down the road, when it's more advanced
19:18 cognominal FROGGS, I am very excited about your patches about slangs but I don't see the general picutres to make use of slangs.
19:18 masak Ven: one way to view that is, by the time the class is declared, it "knows" about the role and all its components. but the reverse isn't true -- a role, as it is being defined, doesn't "know" about the class(es) it gets mixed into, and so cannot refer to their private things.
19:18 masak Ven: that reasoning works, though it's slightly specious because it reminds me of class inheritance.
19:19 Ven masak: don't get me wrong -- I understand *why* (and am grateful for that ;).), it just makes a tiny bit harder still to explain
19:19 Ven When I try and read stuff, I just feel like there's so much crammed in it ..
19:20 masak a rationale/explanation was what I was aiming to provide above.
19:22 FROGGS cognominal: DSL is all I'm saying :o)
19:22 Ven masak: yeah, I have something like that too, but then again ... It feels like a big chunk of explanations
19:22 Ven p6 is really complex a language.
19:23 cognominal FROGGS: I suppose there is code that motivates these patches.
19:23 FROGGS cognominal: v5, yes
19:23 cognominal ho, thx.
19:24 cognominal FROGGS++
19:25 awwaiid Ven: one thing that I've found is that p6 tends to be a superset of other things. So if you just focus on, say, the bits that are similar to Ruby, then you can progress pretty quickly.
19:26 awwaiid It is just easy to get distracted by the SuperStuff
19:26 Ven yeah, but I can't assume knowledge from other languages.
19:27 Ven For me, I did indeed relate to previous knowledge, but I can't "project" that onto my readers
19:27 awwaiid Maybe you can assume the same progression as other languages. So like stealing the structure of a tutorial in one of the other dynamic languages
19:27 lichtkind_ joined #perl6
19:28 awwaiid but I missed it -- what are you up to?
19:42 Ven awwaiid: a perl 6 "learnxinyminutes"
19:42 SamuraiJack_ joined #perl6
19:43 kivutar joined #perl6
19:43 Ven I have the operators down, the semantics basics, and I'm making good progress on classes.
19:43 Ven It's just that p6 is complex (to be easy)
19:56 Ven m: sub foo(Int $ where * > 10) { True }; sub a { foo(5) };
19:56 camelia rakudo-moar b25b86: ( no output )
19:57 * Ven checks if infix:<*> is pure
19:57 Ven no, it's not. Any reason it's not ? I have a feeling we could check a lot more stuff at compile-time with pure markers
19:58 Ven (ie, if we know the where only has pure calls, we can actually just check at compile time)
20:01 pmurias_ joined #perl6
20:01 pmurias joined #perl6
20:02 nbrown joined #perl6
20:03 pmurias is 'is pure' specced?
20:11 Ven is there a difference between anon sub {} and -> {} ?
20:11 cognominal joined #perl6
20:12 jnthn return
20:14 atroxaper joined #perl6
20:15 moritz sub returns a Routine, which is a return() boundary
20:16 awwaiid innnteresting
20:18 awwaiid hm! that's very intersting. and subtle
20:18 Mouq which means that you can have closures from which you can return out of the outer function
20:18 yoleaux 08:00Z <atroxaper_> Mouq: I merged your pull request and did some changes. Today I'm going to make a lists render.
20:18 timotimo it's a very useful distinction, and easy to remember if you think of sub filter(@bar) { for @bar -> $foo { return $foo if m/hello/ } }
20:19 timotimo in this case you don't want the return inside the for loop to simply skip to the next iteration - in this case you want "next" instead
20:19 Ven uh, that's the diff between -> {} and {}, isn't it ?
20:19 timotimo huh?
20:19 Ven m: sub t(@a){map(-> { return True if $_ }, @a)}; t((1, 2, 3));
20:20 camelia rakudo-moar b25b86: OUTPUT«Unhandled exception: Too many positional parameters passed; got 1 but expected 0␤   at /tmp/uD_2gT1o6M:1  (<ephemeral file>::0)␤ from src/gen/m-CORE.setting:7736  (/home/p6eval/rakudo-inst-2/languages/p​erl6/runtime/CORE.setting.moarvm::631)␤ from src…»
20:20 timotimo m: say &map.signature.perl
20:20 camelia rakudo-moar b25b86: OUTPUT«:(Any |)␤»
20:20 timotimo heh. helpful
20:20 Ven ._.
20:20 awwaiid m:  sub f { my $x = -> { return 5; } ; $x() ; 10 } ;sub g { my $x = sub { return 5; } ; $x() ; 10 } ; say "f=&f() g=&g()"
20:20 camelia rakudo-moar b25b86: OUTPUT«f=5 g=10␤»
20:21 Ven this segfaults on my REPL ....
20:21 Ven so, what's the difference between -> {} and {} then ? "just" for arguments ?
20:21 Ven I guess I got it confused with ruby's distinction between {} and ->{}
20:23 * Mouq doesn't understand the ruby closure syntax, but he hasn't looked much into it
20:23 Ven nobody understands it, we're just faking along at that point.
20:23 Ven Plus, it changes between 1.9 and 2.0, iirc
20:23 timotimo -> ... { } and { } are the same, except the second may be interpreted as a hash if it has the "right" (or "wrong") syntax/content
20:24 * Ven updates his tutorial accordingly
20:28 * Ven added a bunch of stuff
20:29 Ven multi methods, "done", classes, kinda done.
20:33 vendethiel (thanks for your quick answer ! It'd have been pretty bad to fix later on)
20:34 timotimo oh no
20:34 timotimo thank you
20:34 timotimo tutorial work is quite valuable in perl6's current economy
20:37 Ven (proof-reading *very* welcome, at least on the structure for nwo)
20:40 virtualsue_ joined #perl6
20:42 nbrown joined #perl6
20:46 xenoterracide joined #perl6
20:51 silug joined #perl6
20:56 silug joined #perl6
21:00 masak 'night, #perl6
21:12 silug joined #perl6
21:15 nbrown joined #perl6
21:17 silug joined #perl6
21:30 vendethiel joined #perl6
21:34 vendethiel joined #perl6
21:41 nbrown joined #perl6
21:55 hoverboard joined #perl6
21:56 SevenWolf joined #perl6
22:02 kweetal joined #perl6
22:08 nbrown joined #perl6
22:09 araujo joined #perl6
22:09 araujo joined #perl6
22:17 thou joined #perl6
22:23 BenGoldberg joined #perl6
22:26 silug joined #perl6
22:29 thou joined #perl6
22:35 virtualsue_ joined #perl6
22:40 virtualsue joined #perl6
22:40 nbrown joined #perl6
22:56 virtualsue joined #perl6
23:05 dalek roast: 91cf966 | coke++ | S02-names-vars/variables-and-packages.t:
23:05 dalek roast: Fix scoping on sub.
23:05 dalek roast:
23:05 dalek roast: jnthn++
23:05 dalek roast: review: https://github.com/perl6/roast/commit/91cf96606e
23:08 dalek perl6-bench: 20f39e2 | (Geoffrey Broadwell)++ | analyze:
23:08 dalek perl6-bench: Stub in summarize_results_html_history
23:08 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/20f39e21b9
23:08 dalek perl6-bench: 084db6c | (Geoffrey Broadwell)++ | microbenchmarks.pl:
23:08 dalek perl6-bench: Add 'bind' tag to two microbenchmarks
23:08 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/084db6c5c3
23:08 dalek perl6-bench: 0e5a1cf | (Geoffrey Broadwell)++ | / (3 files):
23:08 dalek perl6-bench: Two refactors: move summary common code; stop overusing 'perl'
23:08 dalek perl6-bench:
23:08 dalek perl6-bench: Move much of the common setup done by all (non-JSON) summarizers out to
23:08 dalek perl6-bench: a separate module, and just use it from the various summary routines.
23:08 dalek perl6-bench:
23:08 dalek perl6-bench: Also stop overusing 'perl' where I really mean 'compiler'.  Not only is
23:08 dalek perl6-bench: it confusing now, it will get much worse if I ever add non-Perl-family
23:08 dalek perl6-bench: languages to the compiler suite.
23:08 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/0e5a1cf88c
23:08 dalek perl6-bench: 0663943 | (Geoffrey Broadwell)++ | components.json:
23:08 dalek perl6-bench: Merge branch 'master' of https://github.com/japhb/perl6-bench
23:08 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/0663943f8b
23:20 colomon_ japhb++
23:20 yoleaux 11 Jul 2014 20:24Z <[Coke]> colomon_: https://github.com/sorear/niecza/issues/191
23:30 raiph joined #perl6
23:34 skids joined #perl6
23:49 dalek roast: 88239a0 | coke++ | S06-routine-modifiers/lvalue-subroutines.t:
23:49 dalek roast: unfudge passing tests
23:49 dalek roast: review: https://github.com/perl6/roast/commit/88239a0ace
23:53 xragnar joined #perl6
23:54 [Coke] we are not running any of the S01-perl5-integration tests, but there are fudge directives in them: thoughts on keeping versus removing the fudge?
23:59 [Coke] I will just ignore them for now.

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

Perl 6 | Reference Documentation | Rakudo