Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-08-27

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:07 Akagi201 joined #perl6
00:10 TimToady_ http://rosettacode.org/wiki/Ranking_methods#Perl_6  <-- right in Perl 6's wheelhouse
00:11 TimToady dinner &
00:11 timotimo ouch! right in the wheelhouse!
00:15 xenoterracide joined #perl6
00:36 * [Coke] tries TEST_JOBS=12 for rakudo-moar on his 8 core box.
00:37 ardeshir joined #perl6
00:38 [Coke] yay, 144s
00:40 itz_ joined #perl6
00:52 dalek specs: bd845bf | (Stéphane Payrard)++ | S99-glossary.pod:
00:52 dalek specs: S99: DFS
00:52 dalek specs: review: https://github.com/perl6/specs/commit/bd845bf122
01:00 BenGoldberg joined #perl6
01:06 hoelzro I know he's asleep, but jnthn++ for the profiler
01:06 hoelzro I just used it on a benchmarking script I wrote for Moar a while back, very nice
01:08 Akagi201 joined #perl6
01:08 xenoterracide joined #perl6
01:11 xdoctor joined #perl6
01:12 * flussence throws his idle i7 server at make spectest
01:14 flussence I haven't done this on anything for a few months... whoa, this is fast.
01:14 flussence (166 secs total)
01:15 flussence (...plus 3 failures)
01:16 FROGGS_ joined #perl6
01:19 dayangkun joined #perl6
01:25 [Coke] flussence: rakudo-moar? it's testingclean here.
01:25 [Coke] can you run those 3 separately and see if it's a stress issue?
01:30 flussence r-m + --enable-jit, just because :)
01:30 en left #perl6
01:30 en joined #perl6
01:30 en left #perl6
01:33 [Coke] I have built a rakudo using moar. how can I force it to recreate another moar (because I'm using the enable jit option, and it's not comparing that, it's just seeing I have a new enough version)
01:33 [Coke] I don't want to remove the install directory, because it's not a local install.
01:38 flussence t/spec/S03-operators/arith.t and t/spec/S32-num/base.t are consistently failing for me (with 2 and 1 fails), also t/spec/S04-phasers/in-loop.rakudo.moar seems to be flapping...
01:38 flussence r: say 0.base(2)
01:38 camelia rakudo-jvm 399faa: OUTPUT«(timeout)»
01:38 camelia ..rakudo-{parrot,moar} 399faa: OUTPUT«0␤»
01:39 flussence base.t fails there, returns «''» instead of 0
01:39 flussence arith.t is failing 11 and 12
01:42 flussence and when in-loop.t fails... «non-invokable object is non-invokable» right after emitting the test plan
01:45 flussence the stacktrace points to the "for 1..10" line in there every time.
01:48 itz joined #perl6
01:51 Sqirrel joined #perl6
01:52 flussence possibly related: I see a "make stresstest" target, would that be useful data?
01:53 itz joined #perl6
01:56 [Coke] just runs a few more test files.
01:56 [Coke] 4 more, having just counted.
01:56 [Coke] I just realized the daily run should be running those.
02:00 flussence hm, I'll poke at those failures again tomorrow when more people are around...
02:03 dalek Heuristic branch merge: pushed 101 commits to rakudo/S26-WHY by hoelzro
02:09 Akagi201 joined #perl6
02:24 xenoterracide joined #perl6
02:28 njmurphy joined #perl6
02:28 japhb hoelzro: How long before S26-WHY can merge?
02:28 japhb Or rather, what's left?  Last time I asked, you seemed very close ...
02:31 hoelzro soon
02:31 hoelzro it's so close
02:31 hoelzro I just need it to pass on JVM and parrot
02:32 hoelzro http://www.smbc-comics.com/comics/20060302.gif
02:37 noganex joined #perl6
02:39 hoelzro apparently, on jakudo, I can do $*POD_BLOCKS[0] in NQP land but not Perl 6 land?
02:39 Alula_ joined #perl6
02:56 Alula_ joined #perl6
03:09 Akagi201 joined #perl6
03:28 rindolf joined #perl6
03:30 hoelzro I guess I should always be using nqp::atpos for NQPArrays
03:39 hoelzro japhb: good news; if these spectests run clean (should be about an hour), I'll be merging tonight
03:48 cognome joined #perl6
03:50 Alina-malina joined #perl6
03:51 BooK joined #perl6
03:51 psch joined #perl6
03:51 telex joined #perl6
04:10 Akagi201 joined #perl6
04:21 kaare_ joined #perl6
04:25 dalek Heuristic branch merge: pushed 87 commits to roast/S26-WHY by hoelzro
04:27 dalek rakudo/S26-WHY: 171dcd4 | (Rob Hoelz)++ | src/core/traits.pm:
04:28 dalek rakudo/S26-WHY: Fix documentation for JVM
04:28 dalek rakudo/S26-WHY:
04:28 dalek rakudo/S26-WHY: One should use nqp::atpos to index NQPArrays from Perl 6
04:28 dalek rakudo/S26-WHY: land
04:28 dalek rakudo/S26-WHY: review: https://github.com/rakudo/rakudo/commit/171dcd4748
04:37 hoelzro all spectests are clean
04:38 hoelzro eh, you know what they say about forgiveness and permission...
04:38 dalek Heuristic branch merge: pushed 88 commits to roast by hoelzro
04:39 dalek Heuristic branch merge: pushed 103 commits to rakudo/nom by hoelzro
04:39 hoelzro we'll see what problems people find over the next few days =)
04:40 Akagi201 joined #perl6
05:06 ecocode_ joined #perl6
05:22 sergot hi o/
05:25 SamuraiJack joined #perl6
05:25 [Sno] joined #perl6
05:40 gfldex joined #perl6
05:46 aborazmeh joined #perl6
05:53 anaeem1_ joined #perl6
06:18 telex joined #perl6
06:22 mr-foobar joined #perl6
06:26 darutoko joined #perl6
06:40 kurahaupo joined #perl6
06:42 danaj joined #perl6
06:43 lizmat joined #perl6
07:04 lizmat good *, #perl6!
07:05 diakopter good *, lizmat
07:05 diakopter also, good **
07:06 lizmat got home yesterday and slept 16 hours after that...
07:09 FROGGS_ I wish I had sleep too
07:12 anaeem1 joined #perl6
07:17 anaeem1__ joined #perl6
07:28 brrt joined #perl6
07:30 zakharyas joined #perl6
08:00 lizmat_ joined #perl6
08:01 cognome_ joined #perl6
08:01 nebuchad` joined #perl6
08:01 ggoebel111111110 joined #perl6
08:01 kst`` joined #perl6
08:02 firnsy_ joined #perl6
08:02 firnsy_ joined #perl6
08:02 pmichaud joined #perl6
08:03 raydiak_ joined #perl6
08:03 lee joined #perl6
08:04 mattp_ joined #perl6
08:04 jercos_ joined #perl6
08:04 Tene_ joined #perl6
08:04 Tene_ joined #perl6
08:05 petercom1and joined #perl6
08:05 jtpalmer_ joined #perl6
08:05 telex joined #perl6
08:05 Shozan joined #perl6
08:05 Shozan joined #perl6
08:05 diakopte1 joined #perl6
08:07 yeltzooo joined #perl6
08:08 Colby` joined #perl6
08:08 betterwo1ld joined #perl6
08:10 mtj__ joined #perl6
08:11 synopsebot joined #perl6
08:12 nwc10 jnthn: This one is more current http://ccl4.org/~nick/profile-1409127038.5515.html
08:12 nwc10 (Also available as .gz)
08:15 broquaint joined #perl6
08:16 * nwc10 sees that <dependencies+deserialize> has dropped down the profile
08:16 dayangkun joined #perl6
08:16 timotimo well, the exclusive time is still quite big
08:16 ilogger2 joined #perl6
08:18 xdoctor joined #perl6
08:18 djanatyn joined #perl6
08:23 dakkar joined #perl6
08:25 kaleem joined #perl6
08:26 lestrrat joined #perl6
08:27 brrt why would the <anon> frame not be JIT-ted yet?
08:27 brrt or is that just the toplevel
08:27 timotimo which one?
08:28 timotimo one of those that have an Entries count of 1? :)
08:28 timotimo i wonder why load_setting is entered twice, though
08:28 timotimo probably depends on what counts as an "enter"
08:29 brrt still a lot we can win with JITting it seems
08:30 timotimo nwc10: could you also post a jit log created by MVM_JIT_LOG=foobar.txt for that same workload?
08:30 FROGGS_ and that is just the beginning of the journey :o)
08:32 brrt hmm
08:32 brrt if i'm still going to the austrian perl workshop, i'd like to use that time to do some JIT work
08:32 FROGGS_ sure, that's why there is a hackathon :o)
08:32 brrt i.e. maybe we could start doing the better-codegen thingy for arithmetic by then
08:32 FROGGS_ ideas+motivation+time
08:33 brrt and then, slowly convert stuff from the 'old jit' to the 'new jit' much in the same way we've introduced jit step-by-step this summer
08:33 nwc10 timotimo: OK, rerun which should be the same
08:33 nwc10 http://ccl4.org/~nick/prof​ile-1409128263.29805.html
08:33 nwc10 and http://ccl4.org/~nick/jitl​og-1409128263.29805.txt.gz
08:34 timotimo those are surprisingly few bails.
08:34 nwc10 I stress *should*. I reran the build
08:34 nwc10 also, the profiler doesn't seem to record the version of MoarVM it was run on
08:35 nwc10 and it doesn't find a way to interrogate the running code for version
08:35 timotimo 15 + 8 + 7 bails (the top 3) are all param_* ops :P
08:35 nwc10 but "find a way" is important. bytecode is bytecode - why does MoarVM care what it is?
08:36 timotimo oh, this was just --profile-compile?
08:39 kjs_ joined #perl6
08:41 anaeem1_ joined #perl6
08:41 brrt yeah, i suspected so timotimo :-)
08:42 brrt i want jnthn++'s input on those still
08:42 brrt in that i don't want to slow down the interpreter just to make it easier to JIT
08:42 nwc10 this was just --profile-compile
08:42 nwc10 er,
08:42 nwc10 I stress *should*. I reran the *same* build
08:43 timotimo well, the jit log would still cover the entire run
08:44 Ven joined #perl6
08:45 Sterver joined #perl6
08:47 Sterver Hi. I have little problem with hashes: WARNINGS:
08:47 Sterver Useless use of "," in expression "my $hash = :j(\"Jedna\"), :d(\"Dva\")" in sink
08:47 Sterver context (line 7)
08:47 Sterver .... Code is: my $hash = :j("Jedna"), :d("Dva"); ..... What am I doing wrong?Hi. I have little problem with hashes: WARNINGS:
08:47 Sterver Useless use of "," in expression "my $hash = :j(\"Jedna\"), :d(\"Dva\")" in sink
08:47 Sterver context (line 7)
08:47 Sterver .... Code is: my $hash = :j("Jedna"), :d("Dva"); ..... What am I doing wrong?
08:47 Sterver Hi. I have little problem with hashes: WARNINGS:
08:47 Sterver Useless use of "," in expression "my $hash = :j(\"Jedna\"), :d(\"Dva\")" in sink
08:47 Sterver context (line 7)
08:47 Sterver .... Code is: my $hash = :j("Jedna"), :d("Dva"); ..... What am I doing wrong?Hi. I have little problem with hashes: WARNINGS:
08:47 Sterver Useless use of "," in expression "my $hash = :j(\"Jedna\"), :d(\"Dva\")" in sink
08:47 timotimo (although with my little grep thingie, there is no way to tell how big the frame is that was bailed on
08:48 timotimo )
08:48 timotimo m: my %hash = :j<Jedna>, :d<Dva>;
08:48 camelia rakudo-moar bf1b4d: ( no output )
08:48 timotimo if you assign to a $variable, it will not work the way you expect it to
08:49 timotimo however, you can try it like this:
08:49 timotimo m: my $hash = %(:j<Jedna>, :d<Dva>);
08:49 camelia rakudo-moar bf1b4d: ( no output )
08:49 FROGGS_ m: my $hash = {:j<Jedna>, :d<Dva>}; # or this
08:49 camelia rakudo-moar bf1b4d: ( no output )
08:49 timotimo have another example, hopefully that'll clear it up:
08:49 FROGGS_ m: my $hash = {:j<Jedna>, :d<Dva>}; say $hash
08:49 camelia rakudo-moar bf1b4d: OUTPUT«{"d" => "Dva", "j" => "Jedna"}␤»
08:50 timotimo m: my $foobar; my $baz, $foobar = :j<Jedna>, :d<Dva>; say $foobar; say $baz;
08:50 camelia rakudo-moar bf1b4d: OUTPUT«WARNINGS:␤Useless use of "," in expression "my $baz, $foobar = :j<Jedna>, :d<Dva>" in sink context (line 1)␤"j" => "Jedna"␤(Any)␤»
08:50 timotimo oh, hah
08:50 timotimo anyway, what froggs said :)
08:50 Sterver oh, thanks :) my $hash = %(:j<Jedna>, :d<Dva>); works well
08:51 FROGGS_ Sterver: both will give you an itemized hash, which is what a $ variable implies - a single item
08:52 Sterver ok, thanks
09:00 fhelmberger joined #perl6
09:09 Ven where are destructors specced, btw?
09:09 Ven I don't remember even reading about them.
09:10 itz_ joined #perl6
09:11 pecastro joined #perl6
09:17 itz joined #perl6
09:20 nine_ lizmat_: I made a bit of progress since YAPC. I can now use our DBIx::Class schema from Perl 6 :) perl6 -Ilib -e 'use Inline::Perl5; my $i = p5_init_perl(); $i.run("use Atikon::DB::Timemngt; 1;"); my $schema = $i.call("connect", "Atikon::DB::Timemngt", "dbi:Pg:database=timemngt"); my $products = $schema.call("resultset", "Product"); my $product = $products.call("find", 1234); say $product.call("article_id");'
09:21 dg_subrata joined #perl6
09:23 Sterver left #perl6
09:27 anaeem1_ joined #perl6
09:28 moritz nine_: what type is $product in p6 land?
09:29 moritz nine_: and where's that repo?
09:29 nine_ moritz: class Perl5Object { has OpaquePointer $.ptr; has PerlInterpreter $.perl5;
09:29 nine_ moritz: https://github.com/niner/Inline-Perl5
09:30 lizmat_ Ven: there are no built-in destructors in Perl 6
09:31 lizmat_ nine_:  cool!   perhaps diakopter has some pointers that could be helpful to you
09:31 SamuraiJack joined #perl6
09:31 nine_ lizmat_: so how does one release resources on object destruction?
09:31 lizmat you're responsible for resource release yourself
09:32 lizmat please note there are some things that will help you with that
09:32 lizmat specifically LEAVE phasers
09:32 lizmat { my $dbh = DBI.connect(...); .... do stuff ...  LEAVE $dbh.disconnect }
09:34 nine_ So the user would have to do this for every Perl 5 object she uses. Sounds like non-fun.
09:35 moritz in the long run, we have to implement some DESTROYish stuff
09:35 moritz there's no way around it
09:35 nine_ I really can't see a way around that either.
09:36 lizmat I can see we need something for object managing external resources
09:36 nine_ Having to manually do this makes using Perl 5 modules on a broad scale tedious and error prone and really defeats the purpose of using such a high level language.
09:36 lizmat but for internal stuff?  Why??
09:36 lizmat my class A {...}; # why would this need a DESTROY method?
09:37 lizmat the GC will take care of it
09:37 lizmat destruction of objects *is* part of Perl 6
09:37 lizmat the *timely* part is *not*
09:38 nine_ lizmat: for my use case it doesn't have to be timely. I just _have_ to be able to run some custom code on destruction.
09:38 moritz because nine_ is managing external resources
09:39 moritz and many objects do that (database transactions, file handles, sockets, ...)
09:39 lizmat there is something that's specced, but still not fully operational
09:39 lizmat that would allow you to do:
09:39 lizmat my $dbh will leave *.disconnect
09:40 moritz that's still not the right level
09:40 lizmat which would call the disconnect method on the $dbh when the scope is left
09:40 moritz because it passes the responsiblitiy to the caller
09:40 lizmat well, technically, a "connect" could push a LEAVE phaser to the scope where the .connect is done
09:41 lizmat unfortunately, if the system doesn't see any phasers for a block at compile time, it doesn't honour them when they are added at runtime
09:41 lizmat this is maybe a premature optimization
09:42 huf would that disconnect even if the value isnt gone when you leave the block? (just the variable)
09:43 huf { my $dbh = ...; put_in_some_global_structure($dbh); LEAVE $dbh.disconnect } # what would this do?
09:44 nine_ Disconnect is one thing. With connection caching you may even never disconnect anyway. What I'm really worried about is leaking every single Perl 5 object you don't manually release. That's the $schema, $products and $product objects in my simple example.
09:44 Ven huf: be bad
09:44 BizarreCake joined #perl6
09:46 lizmat huf: that would disconnect
09:47 moritz nine_: I'm now compiling a perl with -fPIC, because that's what p5helper compilation currently complains about
09:47 lizmat nine_: your example links P6 objects to P5 object
09:47 lizmat s: is the P6 version refcounted in the P5 one ?
09:48 lizmat and is the problem really that P5 then doesn't see P6 be destructed ?
09:48 nine_ moritz: you may also remove -fPIC from the p5helper Makefile. I only added it because I seem to need it on my machine. This really needs to be looked at by someone who knows how this ought to work.
09:48 moritz lizmat: yes, nine_'s example is clearly in the "external resources" example
09:49 huf lizmat: yeah, thought so. so no facility for doing the right thing in that case yet?
09:49 nine_ lizmat: I'm wrapping a pointer to the P5 object in a P6 object and increase the P5 object's refcount when doing so (or at least I should). So I need to decrease its refcount when the P6 object gets destroyed.
09:49 lizmat ok
09:49 moritz nine_: then I get "relocation R_X86_64_32 against `PL_memory_wrap' can not be used when making a shared object; recompile with -fPIC"
09:49 lizmat well, before we get anything done in that area, we would need a stable .WHICH in P6 land (on Moar)
09:50 lizmat *then* I could see something like a bit set on each P6 object, telling it to look somewhere for code to execute when it gets garbage collected
09:50 nine_ moritz: ok. It's nice that the compiler tells you how to fix that.
09:50 lizmat it still wouldn't be timely
09:51 moritz lizmat: and it doesn't need to be
09:51 nine_ lizmat: it doesn't have to be timely at all.
09:51 moritz nine_: in general, when you're juggling libraries around, you need position independent code (PIC)
09:51 Alula_ joined #perl6
09:51 lizmat I hope jnthn will be able to chime in on this soonish
09:52 lizmat hopefully this could then be part of the .WHICH refactor
09:52 nine_ lizmat: the other feature I'm missing is any kind of AUTOLOAD. $schema.call('resultset', 'Product') works, but I'd really like to be able to just call $schema.resultset('Product').
09:53 moritz nine_: there's some unspecced hook for that
09:53 moritz nine_: and my reason for cloning the repo is implementing just that :-)
09:53 moritz nine_: want to give me a commit bit? :-)
09:54 nine_ moritz: just tell me where I have to click and I'll do anything ;)
09:55 nine_ moritz: I just added you as a collaborator on github.
09:55 moritz nine_: in the repo homepage "settings" (in the right bar) -> "Collaborators" (left bar)
09:55 moritz ah, good :-)
09:55 moritz eeks, the -fPIC didn't work :(
09:58 lizmat nine_: S12:611
09:58 synopsebot Link: http://perlcabal.org/syn/S12.html#line_611
09:58 lizmat but that doesn't seem implemented yet ?
09:58 lizmat m: Nil.foo
09:58 camelia rakudo-moar bf1b4d: ( no output )
09:58 lizmat m: say Nil.foo  # this uses some fallback mechanism
09:58 camelia rakudo-moar bf1b4d: OUTPUT«Nil␤»
09:59 moritz no, we need the $class.^add_fallback hack
09:59 nine_ lizmat: git grep says no :( src/RESTRICTED.setting:    method FALLBACK(|) { restricted(self.^name) }  # NYI, but see S12
10:01 lizmat moritz: maybe it's time to implement FALLBACK  ?
10:01 nine_ Doesn't Perl 6 have all sorts of meta stuff? I find it hard to believe that there's no way yet to define how method resolution of a certain class should work.
10:01 moritz nine_: there is
10:01 lizmat nine_: it does, but it's only documented by example  :-)
10:01 moritz nine_: it just needs some small hack
10:01 moritz nine_: gimme 15min
10:02 ggoebel111111111 joined #perl6
10:03 nine_ One of the 8 million features has to work in our favor :)
10:04 lizmat I guess I should write some TODO spec tests for FALLBACK  :-)
10:06 nine_ lizmat: that's what ought to make Inline::Perl5 easier than e.g. Inline::Python: we can change both languages respectively their implementations.
10:06 lizmat I don't think we can change Perl 5 that much, though...  :-)
10:07 nine_ It probably doesn't need much change anyway.
10:07 nwc10 no, not much.
10:09 moritz eeks, $*ENV doesn't work in constants
10:09 lizmat %*ENV you mean ?
10:09 moritz erm
10:09 moritz it might help to spell it correctly
10:09 moritz lizmat++
10:11 rindolf lizmat: hi, what's up?
10:12 lizmat YAPC::EU fallout ?
10:12 lizmat or maybe better phrased: a lot of movement from Perl 5 towards Perl 6
10:13 lizmat in which YAPC::EU was a catalyst
10:17 moritz victory!
10:18 mrf As a perl5er I felt much more confident about moving to perl6 as a result of YAPC::EU::2014
10:18 moritz nine_: please pull :-)
10:18 Ven mrf: welcome aboard :)
10:18 moritz nine_: no tests yet, but it works in a small, informal test
10:18 mrf nine_ helped considerably with his lightning talk on perl5 compat
10:18 mrf OOI what does the := operator do.
10:19 nine_ moritz++ # perfect!
10:19 * mrf has found there are some very (to his mind) strange operators in perl6 ($^, *, ... etc)
10:19 nine_ We're now up to: nine@sphinx:~/Inline-Perl5 (master=)> perl6 -Ilib -e 'use Inline::Perl5; my $i = p5_init_perl(); $i.run("use Atikon::DB::Timemngt; 1;"); my $schema = $i.call("connect", "Atikon::DB::Timemngt", "dbi:Pg:database=timemngt"); my $products = $schema.resultset("Product"); my $product = $products.find(1234); say $product.article_id'
10:19 Ven m: my $a = 1; my $b := $a; $a = 42; say $b; # mrf
10:19 camelia rakudo-moar bf1b4d: OUTPUT«42␤»
10:20 Ven it's binding it
10:20 nine_ moritz: we should probably rename the call method now
10:20 sergot tadzik: LWP::UserAgent doesn't provide http auth
10:20 Ven mrf: maybe you'd be interested in learnxinyminutes.com/docs/perl6/ :)
10:20 moritz mrf: http://doc.perl6.org/language/containers
10:20 sergot tadzik: WWW::Mechanize does
10:20 mrf Ven: I have been doing that. They are good but a little jumpy
10:20 moritz nine_: or remove it from Perl5Object
10:20 Ven mrf: they are good?
10:21 mrf Ven: the learnXinY for perl6 are useful
10:21 moritz nine_: but rename $.ptr and $.perl5, or make them private
10:21 Ven mrf: well, if something feels too confusing, feel free to PM me, I'll update it accordingly
10:22 sergot tadzik: do we want our ua to do this?
10:22 mrf Ven: cool will do. My feeling is more. I need to get to the end then go again and it will all be better
10:22 Ven yea, there's quite a lot to learn :)
10:22 lizmat moritz: isn't FALLBACK implementation as simple as adding a method FALLBACK to Mu with the proper .add_fallback magic?
10:23 nine_ pushed an updated to the README
10:23 moritz lizmat: don't do that
10:23 moritz lizmat: the presence of a fallback makes method caches less effective
10:24 Util joined #perl6
10:24 moritz lizmat: the right thing (IMHO) is to check in Actions.nqp if a method name is FALLBACK, and if yes, install a fallback
10:24 mrf Ven: as a p5 programmer @foo = *+* ... * seems like voodoo
10:24 Ven mrf: warrants more explanations, in your opinion?
10:24 lizmat moritz: ack, will try that
10:26 mrf Ven: maybe. I personally am not entirely sure of how {$^a + $^b} or *+* actually work in comparison to p5. But that might be my lack of understanding of some functional paradims or some such
10:27 Ven mrf: well, assuming perl5.20, {$^a + $^b} is like sub ($a, $b) { $a + $b }
10:27 mrf Ven: I can grock @fib := 1,1,*+* ... *; as being a lazy fib list generator. But have no idea how it works
10:28 Ven mrf: noted
10:29 mrf Ven: so in a lazy list where to the input $a and $b come from?
10:29 Ven mrf: the previous elements in the list :)
10:29 huf mrf: 1, 1, are initial values, *+* is like an anonymous sub, the last * means 'inf' :)
10:30 mrf so the first *+* is doing 1+1 then 1+2 and so on?
10:30 Ven yep
10:30 huf start with 1, 1, generate new elements by running *+*, until you reach * (inf)
10:30 mrf so the *+* is instead of writing a recursive sub.
10:31 mrf thats.....insanely cool
10:31 Ven :D.
10:32 * mrf suspects that that syntax is more familiar to a haskell programmer than a p5 :P
10:32 arnsholt IIRC you can desugar the *+* to something like sub($a, $b) { $a + $b }
10:33 Ven arnsholt: yes
10:34 mrf yeah. but until I worked out where $a and $b came from it didn't help much. Once I know that and that *+* is the same thing then it all makes sense
10:34 mrf ven++
10:34 mrf huf++
10:34 carlin oh the smoke tests haven't been updated in a while :(
10:35 Ven mrf++ # making me add more explanations to the learnxiny
10:35 colomon carlin: smoke tests have been wildly broken, and I haven't had time to try to figure out how to fix them.
10:36 nine_ moritz: I removed call (you didn't use it anyway) and made the attributes private
10:36 mrf I think the hardest thing for me has been the new syntax and operators. Some things that were hacks in p5 are hard to realise you don't need in p6
10:36 Ven yes, that's part of the things I don't really address in the tutorial.
10:36 Ven mostly because I don't know p5
10:37 mrf fair.
10:37 mrf If I find any more I will let you know...or come up with some kind of P6 for the P5 dev
10:37 Ven mrf: there's already one, fwiw :)
10:37 spider-mario joined #perl6
10:37 moritz there's always http://perlgeek.de/en/article/5-to-6
10:37 huf yeah, there was a series of ... that.
10:37 mrf yay comunity :D
10:38 moritz contributions to that are always welcome too
10:38 Ven mrf: https://github.com/adambard/learnxinyminutes-docs​/commit/013112b9b338d5f05d33e6d1d85e39e7f061285d :)
10:40 mrf Ven++ # making docs clearer :D
10:40 mberends joined #perl6
10:41 mrf moritz: noted
10:41 mj41 joined #perl6
10:41 mrf Ven: in the fib example is there any reason to use @fib :=  rather than @fib =
10:42 mrf Ven: http://justrakudoit.wordpress.com/2010/​12/29/perl-6-fibonacci-versus-haskell/
10:42 nine_ moritz: do I understand this correctly, that add_fallback is called only needed on the first invocation of a previously not seen method and afterwards it's already there?
10:43 Ven mrf: err, shouldn't be, I think.
10:43 Ven I think it used to be needed for infinite lists (?)
10:43 lizmat nine_: yes, that's the idea
10:43 masak mrf: binding, because otherwise the assignment will eagerly try to eat the whole thing.
10:43 Ven masak: no
10:43 lizmat although it doesn't seem to be reflected in ^methods
10:43 nine_ lizmat: that's even better than what I was looking for :)
10:43 moritz nine_: yes
10:43 masak m: my @fib = 0, 1, *+* ... Inf; say "alive"
10:43 camelia rakudo-moar bf1b4d: OUTPUT«alive␤»
10:43 Ven ;)
10:43 masak ok, apparently not.
10:43 Ven assignment isn't eager
10:44 masak right.
10:44 Ven it's just for the last example
10:44 Ven that reuses @fib inside of its declaration, I think
10:44 masak is assignment "mostly eager", though?
10:44 moritz assignemtn to an array variable is mostly eager
10:44 lizmat m: say Nil.foo; say Nil.^methods # does not contain "foo", this is probably a bug
10:44 camelia rakudo-moar bf1b4d: OUTPUT«Nil␤new iterator reify gist at_pos at_key bind_pos bind_key Str iterator elems infinite item fmt Int Num Numeric Str␤»
10:44 moritz that is, it reifies lazy lists, unless they are (potentially) infinite
10:44 Ven moritz: point is, it doesn't make a difference here
10:45 Ven lizmat: I distinctly remember the commit "calls on Nil should be Nil", though
10:48 mrf Thanks guys you have all been a great help. Back to the docs I go :D
10:49 _thou joined #perl6
10:50 masak is it just me or do we have some new people active in here after YAPC::EU?
10:50 nine_ (Conference Driven Development)++
10:50 flussence we had a few during too :)
10:50 nwc10 masak: it's not just you
10:53 lizmat what can I say?  C-Day is coming!
10:53 masak C as in "candy"???
10:54 masak "combustion"?
10:54 masak "cranberries"!
10:54 nwc10 Cider!
10:54 nwc10 I like cider. I hope that it's cider.
10:54 nwc10 or chcocolate. I like that too
10:55 kurahaupo m: my $r=0..*; $r.reverse.max.say; # is this a bug?
10:55 camelia rakudo-moar bf1b4d: OUTPUT«-Inf␤»
10:55 Possum joined #perl6
10:55 masak TimToady: re http://irclog.perlgeek.de/​perl6/2014-08-26#i_9243518 -- not sure what factors you are weighing, but let me ruminate a bit on the roles of the AST and the (temp name warning) PSI: the AST fully serves the compiler. do optimizations and stuff there to your heart's content. the PSI serves the user and IDEs. if the structure is too different from (an idealized version of) what's on the screen, something is off.
10:56 masak TimToady: in the specific case of op=, I don't see offhand why that wouldn't just be a (part of a bigger) EXPR PSI node.
10:56 flussence m: say (*..0).bounds
10:56 camelia rakudo-moar bf1b4d: OUTPUT«-Inf 0␤»
10:57 masak m: say (*..*).bounds
10:57 camelia rakudo-moar bf1b4d: OUTPUT«*..* is not a valid range␤  in method <anon> at src/gen/m-CORE.setting:13255␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2632␤  in any find_method at src/gen/m-Metamodel.nqp:946␤  in block <unit> at /tmp/QvtTNx3Y7D:1␤␤»
10:57 flussence Range.reverse just flips the endpoints and returns a new range, it looks like.
10:57 masak discrimination!
10:57 lizmat C can be anything you want  :-)
10:57 * masak boggles
10:57 kurahaupo flussence: so how does it get -Inf instead of Inf?
10:58 lizmat kurahaupo: a Whatever as the first in range will do that
10:58 nwc10 Coffee!
10:59 masak complex numbers!
10:59 lizmat kurahaupo: from the code
10:59 lizmat multi method new(Whatever $min, $max, :$excludes_min, :$excludes_max) {
10:59 lizmat nqp::create(self).BUILD(-Inf, $max, $excludes_min, $excludes_max)
10:59 lizmat }
10:59 lizmat Maybe C stands for "Easter"  :-)
11:00 masak why is *..* not a valid range?
11:00 kurahaupo lizmat: I see why the implementation does that ... except that max picks -Inf over 0 somehow
11:00 masak seems a perfectly cromulent range to me. and a cute smiley.
11:01 masak imagine I create a range programmatically. sometimes either or both of the endpoints are *. then some bastard exception prevents me from having nice code.
11:01 * masak does a git blame
11:01 kurahaupo lizmat: and it doesn't negate the "by" step
11:01 colomon "by" (which doesn't really exist anymore, does it?) cannot be negative
11:02 colomon m: my $a = -Inf..Inf; say $a.bounds
11:02 camelia rakudo-moar bf1b4d: OUTPUT«-Inf Inf␤»
11:02 kurahaupo m: my $r = 0..3; $r.reverse.say; # looks a lot like step by -1 to me
11:02 camelia rakudo-moar bf1b4d: OUTPUT«3 2 1 0␤»
11:03 colomon m: my $r = 0..3; $r.reverse.WHAT.say
11:03 camelia rakudo-moar bf1b4d: OUTPUT«(List)␤»
11:03 colomon not a Range anymore
11:03 colomon after the call to .reverse
11:03 kurahaupo hence -Inf is wrong
11:03 MilkmanDan joined #perl6
11:03 colomon ????
11:03 kurahaupo after the call to .reverse
11:04 masak 602c0af back in July 2011 (pmichaud++) adds the "not a valid range" constructor.
11:04 masak I'm gonna rebuild without that error and spectest, just for fun.
11:04 colomon m: my $r = *..0; say $r.reverse
11:04 flussence m: say (*..0)[*-10]
11:04 colomon you can't turn *..0 into a list
11:04 camelia rakudo-moar bf1b4d: OUTPUT«(timeout)»
11:04 camelia rakudo-moar bf1b4d: OUTPUT«(timeout)»
11:04 kurahaupo m: my $r=0..*; $r.reverse.WHAT.say;
11:04 camelia rakudo-moar bf1b4d: OUTPUT«(Failure)␤»
11:05 colomon though perhaps it should fail more gracefully
11:05 flussence m: say (*..0)[^10]
11:05 camelia rakudo-moar bf1b4d: OUTPUT«-Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf␤»
11:05 flussence seems you can't do much of use with that either way...
11:05 sergot m: class A { method new(*%args is copy) { %args<test> = 'test' }; say A.new.perl;
11:05 camelia rakudo-moar bf1b4d: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Cceo5_X4CXâ�¤Unable to parse expression in block; couldn't find final '}' â�¤at /tmp/Cceo5_X4CX:1â�¤------> [32m %args<test> = 'test' }; say A.new.perl;[33mâ��[31m<EOL>[0mâ�¤    expecting any of…»
11:05 kurahaupo m: my $r=0..*; $r.reverse.max.say;
11:05 camelia rakudo-moar bf1b4d: OUTPUT«-Inf␤»
11:05 sergot m: class A { method new(*%args is copy) { %args<test> = 'test' }}; say A.new.perl;
11:05 camelia rakudo-moar bf1b4d: OUTPUT«"test"␤»
11:06 masak flussence: who says I plan to iterate the range, duh :P
11:06 sergot m: class A { method new(*%args is copy) { %args<test> = 'test'; self.bless(|%args) }}; say A.new.perl;
11:06 camelia rakudo-moar bf1b4d: OUTPUT«A.new()␤»
11:06 masak flussence: you can smartmatch against a range, for example.
11:06 sergot m: class A { has $.test; method new(*%args is copy) { %args<test> = 'test'; self.bless(|%args) }}; say A.new.perl;
11:06 camelia rakudo-moar bf1b4d: OUTPUT«A.new(test => "test")␤»
11:06 flussence oh, good point.
11:06 masak flussence: or check its endpoints. all are valid operations.
11:06 masak flussence: also, your argument would also invalidate *..0, which is currently legal.
11:07 sergot m: class A { has $.test; method new(*%args is copy) { %args<test> = 1; self.bless(|%args) }}; say A.new.perl;
11:07 camelia rakudo-moar bf1b4d: OUTPUT«A.new(test => 1)␤»
11:07 colomon smartmatching is the entire point of allowing *..0
11:08 * colomon doesn't remember why *..* was disallowed, but obviously there was a point to doing so, it wasn't some random accident
11:08 masak yep, one test fails in t/spec/S02-types/range.t :)
11:09 masak not ok 60 - *..* is illegal
11:09 masak blaming that...
11:10 masak also, pmichaud. Aug 2010, d2b95d7, "[t/spec]:  *..* is no longer a valid Range, per S02."
11:10 masak ok, checking S02 from that era.
11:11 sergot m: class A { has $.test; has $.test2 = 'test2'; method new(*%args is copy) { %args<test> = 1; self.bless(|%args) }}; say A.new.perl;
11:11 camelia rakudo-moar bf1b4d: OUTPUT«A.new(test => 1, test2 => "test2")␤»
11:12 sergot m: class A { has $.test; has $.test2 is rw = 'test2'; method new(*%args is copy) { %args<test> = 1; self.bless(|%args) }}; say A.new.perl;
11:12 camelia rakudo-moar bf1b4d: OUTPUT«A.new(test => 1, test2 => "test2")␤»
11:12 bjz joined #perl6
11:14 flussence I went digging in the ir clogs around 602c0af, looks like it was just a thing carried forward during the nom branch rewrite (jeez, that was over 3 years ago already?)
11:14 masak I find no reference in S02, either now or then, to *..* being illegal.
11:14 lizmat masak: well, the fix seems easy enough...
11:14 colomon look in the irclogs around Aug 2010, d2b95d7 ?
11:16 masak colomon: ooh, good idea.
11:16 * masak does so
11:17 masak http://irclog.perlgeek.de/​perl6/2010-08-15#i_2704870
11:19 masak huh. I find no discussion at all about it. :/
11:19 masak ok, here's what we'll do.
11:20 masak I challenge that *..* should be illegal. if, after some time, no-one has come up with a good defense that it should be illegal (when 0..* and *..0 and -Inf..0 and -Inf..Inf are all legal), I'll make it legal in Rakudo and roast.
11:21 masak my reason is that I can trace the change back to the day when it was made, but then the trail goes cold. no mention in S02, no discussion on that day.
11:21 kurahaupo_ joined #perl6
11:21 lizmat masak: I would simply fix the code and the test
11:21 jnthn Well, the discussion may have been shortly before...
11:21 lizmat and reference this discussion here
11:22 jnthn What would *..* mean?
11:22 jnthn -Inf..Inf?
11:22 lizmat yup
11:22 lizmat jnthn o/
11:23 masak jnthn: I went several days back. found no discussion.
11:23 colomon masak: I dunno, I'm inclined to say if you cannot figure out why it was explicitly disallowed, you probably shouldn't change it.
11:23 masak jnthn: since *..0 means -Inf..0, I assume *..* would mean -Inf..Inf
11:24 Ven joined #perl6
11:24 colomon it doesn't stop anything, after all -- if you want -Inf..Inf, you can say so
11:24 masak colomon: it was disallowed "per S02", which doesn't now and didn't then mention *..* by any search I can think of.
11:24 treehug88 joined #perl6
11:24 lizmat indeed, it only catches the *..* case
11:25 jnthn o/ lizmat
11:25 masak colomon: I'm annoyed partly at that inconsistency. Perl 6 does not typically disallow corner cases that can be interpreted in some fairly obvious way.
11:25 jnthn masak: Well, I'd wait to see if TimToady++ recalls, givne it ws a spec ruling...
11:26 jnthn It *may* be the reason has come and gone...
11:26 masak colomon: I *thought* S02 would say something like "it means $^a..$^b, which is crazy" -- but I can't find that either.
11:26 Ven m: for *..* { .say; last }
11:26 camelia rakudo-moar bf1b4d: OUTPUT«*..* is not a valid range␤  in method gist at src/gen/m-CORE.setting:13251␤  in sub say at src/gen/m-CORE.setting:14184␤  in method say at src/gen/m-CORE.setting:1094␤  in block <unit> at /tmp/3JzvKtbecs:1␤␤»
11:26 masak colomon: and in either case, it doesn't mean $^a..$^b when used outside of an indexing operation.
11:27 Ven *..* is too good a smiley :p
11:27 Ven m: for -Inf..Inf { .say; last }
11:27 camelia rakudo-moar bf1b4d: OUTPUT«-Inf␤»
11:27 masak colomon: I can't think of an argument that would disallow *..* but also allow *..0
11:28 flussence .oO( uh oh, I'm becoming obsessive over running `make spectest` again... )
11:28 jnthn lizmat: Hopefully yesterday's startup time improvement made your spectest a little faster. ;)
11:29 timotimo m: my @fib := 1, 1, (@fib Z+ @fib[1..*]); say @fib[^10]
11:29 camelia rakudo-moar bf1b4d: OUTPUT«Cannot call 'postcircumfix:<[ ]>'; none of these signatures match:␤:(Any \SELF, int $pos)␤:(Any \SELF, int $pos, \assignee)␤:(Any \SELF, int $pos, :BIND($BIND)!)␤:(Any \SELF, int $pos, Any :SINK($SINK)!, *%other)␤:(Any \SELF, int $pos, Any :delet…»
11:32 * masak sometimes wishes that kind of error message would tell which types were actually passed
11:32 anaeem1_ joined #perl6
11:32 lizmat jnthn: haven't noticed any great changes there  :-(
11:35 flussence oh right, those spectest things from last night are still failing for me... https://gist.github.com/flu​ssence/e0b40c9f9d4934073968
11:35 timotimo masak: me, too :S
11:36 jnthn lizmat: OK, will just settle for the 14MB lower base memory then... :P
11:36 timotimo i think that's the bug where the @fib isn't bound to anything when the RHS gets "evaluated"
11:37 lizmat jnthn: also, the additional S26 tests maybe skewing the numbers
11:37 * colomon apologizes for disappearing there, but he had to start Court Jester for his son.
11:37 lizmat Files=915, Tests=33099, 183 wallclock secs ( 9.04 usr  3.27 sys + 1141.30 cusr 132.88 csys = 1286.49 CPU)
11:37 colomon I suspect the reasoning went something like this:
11:38 colomon 1) we have to allow 0..*
11:38 colomon 2) we should allow *..0 by symmetry
11:39 colomon 3) but allowing *..* creates more confusion than it does utility
11:40 nine jnthn: my little Hello World has grown somewhat. We can now use DBIx::Class in Perl 6 :)  use Inline::Perl5; my $i = p5_init_perl(); $i.run("use Atikon::DB::Timemngt; 1;"); my $schema = $i.call("connect", "Atikon::DB::Timemngt", "dbi:Pg:database=timemngt"); my $products = $schema.resultset("Product"); say $products.search({id => {"<" => 20}}).all.perl;
11:40 Ven http://article.gmane.org/gman​e.comp.lang.lua.general/58908 - very interesting
11:41 colomon 3.1) specifically, it's useless taken as a list, and corresponds to "no check at all" when smartmatched
11:41 timotimo "no check at all" is fine, IMO.
11:41 timotimo sometimes you want a check that'll let any item whatsoever pass
11:41 timotimo and if you don't have the opportunity to pass True as the smart matcher ...
11:41 jnthn nine: Oh wow! :)
11:41 jnthn nine++
11:42 colomon 3.2) 'a'..* is legal as well, no?  part of the argument may be that one whatever still allows you to specify what the included type of the Range is.
11:42 lizmat with MVM_SPESH_DISABLE: Files=915, Tests=33099, 173 wallclock secs ( 8.73 usr  3.11 sys + 1096.28 cusr 103.48 csys = 1211.60 CPU)
11:42 colomon timotimo: but you can still pass -Inf..Inf
11:43 timotimo hm.
11:43 colomon timotimo: so disallowing *..* has just made you type a few more characters to get what you mean, while blocking misguided thinking that *..* might be a WhateverCode which takes two arguments
11:43 lizmat jnthn: nine++ 's work is hindered by the fact we cannot have *any* code run just before destruction
11:44 lizmat please note: *not* timely
11:44 * colomon doesn't necessarily agree that *..* should be disallowed, but is trying to think of why it might be
11:44 lizmat he needs that to be able to resolve refcount issues with the P5 interface
11:44 nine jnthn: yep. I'd really like to have a working destructor on Perl5Objects so I can decrease the referenced object's refcount in there.
11:44 jnthn lizmat: If its not timely, how reliable is it? :)
11:45 jnthn Anyway, it needs VM work...
11:45 nine jnthn: as reliable as garbage collection of any Perl 6 object
11:45 jnthn Do we need to provide any kind of thread affinity?
11:46 jnthn Typically the way it's done is that objects needing destruction get a bit set
11:46 nine jnthn: probably yes. The Perl 5 interpreter is very probably not thread safe.
11:46 jnthn And added to a queue
11:46 jnthn And that queue is examined *last*
11:46 Ven "don't lock in destructors" -- every c++ guy
11:46 jnthn If the queue has the only reference then you remove it from the queue and push it onto a place to async invoke some destruction code.
11:47 ren1us joined #perl6
11:47 colomon nine: I briefly tried Inline::Perl5 last night, got this in make:
11:47 colomon gcc p5helper.c `perl -MExtUtils::Embed -e ccopts -e ldopts` -shared -o lib/Inline/p5helper.so -fPIC -g
11:47 colomon nux/CORE/libperl.a(op.o): relocation R_X86_64_32S against `PL_sv_yes' can not be used when making a shared object; recompile with -fPIC
11:47 Ven (in virtual* destructors, actually.)
11:47 jnthn Actually I think you don't even need the bit.
11:47 jnthn Anyway, basically you just keep the object (and its graph) alive one GC longer
11:48 jnthn Or as many s it takes for the destructor to get run.
11:48 nine colomon: I think moritz ran into the same issue and had to recompile his Perl 5 with -fPIC
11:49 hoelzro morning #perl6
11:49 colomon nine: hmmm, I have no clue how to do what with perlbrew
11:51 masak Ven: http://article.gmane.org/gman​e.comp.lang.lua.general/58908 -- wow!
11:51 nine colomon: try adding  -Dcccdlflags=-fPIC -Duseshrplib to your perlbrew install command line
11:52 Ven masak: LuaJIT is incredible. And to say it's mostly the work of only one guy ...
11:52 Ven (well, mostly sponsored work)
11:52 colomon nine: trying...
11:56 masak m: say Int ~~ Real
11:56 camelia rakudo-moar bf1b4d: OUTPUT«True␤»
11:57 hoelzro so, for those of you who haven't noticed, S26 is now merged
11:57 FROGGS_ ohh, wow :o)
11:57 hoelzro please keep in mind that if anything unexpected breaks, I am likely at fault
11:57 hoelzro =)
11:57 FROGGS_ *g*
11:57 * hoelzro .oO( I don't know why I'm smiling... )
11:59 prevost joined #perl6
11:59 moritz colomon, nine: in fact I didn't have much luck with recompiling with -fPIC; instead I used the system perl, which is compiled with -fPIC
11:59 moritz hoelzro: did you test perl6/doc htmlify.p6?
12:00 hoelzro moritz: it's on the list I just started going through =)
12:03 lizmat nine, jnthn, nwc10: fwiw, I think we can force an unthreaded but with multiplicity=1 as a prerequisite for a Perl 5 embedding
12:04 lizmat does that make sense?
12:05 ren1us2 joined #perl6
12:06 raiph joined #perl6
12:09 hoelzro I've been noticing that the undefined interpolation warning is something along the lines of "use of uninitialized value of type Any in string context"
12:09 hoelzro would it be possible to throw the offending expression in there somehow?
12:09 nine lizmat: I'm not sure if we even have to force multiplicity=1. If we replace the remaining 4 Perl_* functions by functions in perl5 helper that call the appropriate macros, this is taken care of as far as I can tell.
12:09 hoelzro even if it's just a variable, that would be good enough
12:10 lizmat nine: I'm slightly worried about standard Clib calls done both in Moar and Perl 5
12:10 lizmat they should both use the re-entrant version
12:11 lizmat which is what multiplicity=1 takes care of, afaik
12:11 lizmat nwc10 might want to correct me there
12:11 nwc10 offhand I'm not totally sure
12:11 nwc10 and I'm juggling too much to check, right now
12:11 nwc10 I suspect that multiplicity is going to be needed
12:12 * lizmat is juggling stuff as well, but probably not nearly as many as nwc10, so feels for nwc10
12:12 nwc10 no, I really don't know for sure
12:12 nwc10 I'm trying to find Josette a list of Postgresql using firms in the Perl world in Austria
12:13 lizmat Josette++ , please say hi to her from us
12:13 nwc10 because, well, http://act.useperl.at/apw2014/sponsors.html
12:13 nwc10 and ideally we'd like http://2ndquadrant.com/en/ on there
12:14 nwc10 I think Josette's chance of attendance at Perl events would go up, if she is able to list firms using Perl and PostgreqSQL
12:15 hoelzro moritz: tested and patched up
12:15 colomon nine: hmm, adding that to perlbrew seems to have built a perl that works with your makefile, BUT all tests fail with Cannot locate native library '/usr/lib/perl5/5.18.1/x86_64-lin​ux-thread-multi/CORE/libperl.so'
12:16 colomon For what it's worth,
12:16 colomon Inline-Perl5$ perl -v
12:16 colomon This is perl 5, version 20, subversion 0 (v5.20.0) built for x86_64-linux
12:16 colomon so something is going badly wrong here.
12:16 nine colomon: yep, there's still a hard coded path to libperl.so. But moritz++ added support for a P5SO env variable.
12:16 colomon ah
12:17 nine colomon: this is because libperl.so doesn't seem to be in the ld path usually.
12:18 hoelzro oh, wait, that was just Pod::To::HTML
12:19 hoelzro working on doc now
12:19 rurban1 joined #perl6
12:21 colomon nine: progress!
12:21 colomon nine: t/call.t ................ Can't locate object method "test" via package "main".
12:24 hoelzro perl6/doc has a *lot* of undefinedness issues
12:24 nine colomon: that's....weird.
12:25 hoelzro slogging through them now...
12:26 colomon nine: I also get a seg fault in t/p5_to_p6.t.  And all the tests fail one way or another.
12:27 nine colomon: what's the perlbrew line you used? I'd like to try it here and see if I can reproduce.
12:28 colomon nine: perlbrew install 5.20.0 -Dcccdlflags=-fPIC -Duseshrplib
12:28 colomon nine: that box is running a couple-years-old version of Ubuntu
12:29 hoelzro should I update the code example on http://perl6advent.wordpress.com​/2011/12/10/documenting-perl-6/ to be S26 compliant?
12:30 lizmat colomon++ nine++ moritz++  # just glad to see all of this happening
12:32 moritz hoelzro: yes pelase
12:33 moritz nine: the problem on debian is that there's no libperl.so, just a libperl.so.5.$MAJOR
12:34 nine I guess making Inline::Perl5 installable is the hard part. Not writing it...
12:35 moritz can floats and strings be marshalled already?
12:35 * moritz hasn't tried yet
12:35 nine moritz: strings yes. Floats not yet
12:35 nine moritz: floats are only a couple of lines to add though.
12:36 moritz nine: would be awesome
12:36 nine I pretty much ported Inline::Python's py2pl.c code to Perl 6 for the marshalling.
12:37 moritz nine: also, it would be nice if you made dalek report commits to Inline::Perl5 here; see https://github.com/perl6/mu/bl​ob/master/misc/dalek-push.txt for instructions
12:37 _thou joined #perl6
12:38 hoelzro moritz: done
12:40 nine moritz: done
12:40 PotatoGim^Home joined #perl6
12:40 telex joined #perl6
12:40 nine moritz: can you please have a look at my latest commit? I changed attributes to be private and all tests pass, but I get strange errors when trying to use DBIx::Class with it.
12:41 dalek doc: 1a8dfe3 | (Rob Hoelz)++ | / (3 files):
12:41 dalek doc: Update .content calls to .contents
12:41 dalek doc: review: https://github.com/perl6/doc/commit/1a8dfe3c4a
12:41 nine moritz: I get a Cannot call 'p6_to_p5'; none of these signatures match: error in the my $schema = $i.call("connect", ...) call which should not even be affected by it.
12:42 hoelzro I'm seeing a bunch of warnings coming from slurp of all places
12:42 hoelzro I'm wondering if the spectest should check warning counts
12:43 moritz nine: the problem is likely that  private methods aren't initialized from .new() by default
12:44 moritz oh, but wrote a BUILD submethod that does it
12:44 nine moritz: and the $i.call call should not be affected by the change, since there is not even a Perl5Object involved.
12:45 moritz nine: that's weird
12:46 moritz nine: can you do a  say @args[$i].perl;  before the call to p6_to_p5?
12:47 nine moritz: http://paste.scsys.co.uk/419085
12:48 dalek specs: 6989f5a | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
12:48 dalek specs: Add :max :id to start { }
12:48 dalek specs:
12:48 dalek specs: Inspired by jnthn++'s talk at YAPC::EU about image processing.  I felt that the
12:48 dalek specs: throttling code needed some system support.
12:48 dalek specs: review: https://github.com/perl6/specs/commit/6989f5a798
12:48 lizmat jnthn: ^^
12:48 moritz nine: WTF
12:49 nine moritz: I'm at a complete loss.
12:49 dalek rakudo/nom: bda84e7 | (Rob Hoelz)++ | src/core/IO.pm:
12:49 dalek rakudo/nom: Perform standard handle check after defined checking $path
12:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bda84e7512
12:49 PerlJam lizmat++
12:52 nine moritz: now it doesn't even work with the previous commit anymore. I have to go back to 6d349f9 to fix it.
12:52 moritz nine: can you try to turn it into a failing test that doesn't need much extra p5?
12:53 nine moritz: I'll try
12:54 dalek Inline-Perl5: 2c02383 | moritz++ | lib/Inline/Perl5.pm6:
12:54 dalek Inline-Perl5: Be more precise in p6_to_p5 signatures
12:54 dalek Inline-Perl5:
12:54 dalek Inline-Perl5: all undefined values should result in undef; the type-specific code only works for defined values,
12:54 dalek Inline-Perl5: not for the type objects
12:54 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/2c023830eb
12:56 nine moritz++ # that's what I was hoping for: someone adding some real knowledge about Perl 6
13:00 dalek rakudo/nom: b613f0a | (Tobias Leich)++ | src/core/Buf.pm:
13:00 dalek rakudo/nom: implement Blob.assign_pos
13:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b613f0a3b0
13:09 nine colomon: I can reproduce your failures with perlbrew 5.20.0
13:09 * Ulti just used p6 over p5 for a quick one liner because Z=> exists
13:10 dalek Inline-Perl5: 7a1d25d | moritz++ | / (2 files):
13:10 dalek Inline-Perl5: Better error message for p6 objects that cannot marshalled to p5
13:10 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/7a1d25dce3
13:12 Ulti I have a feeling once anyone learns P6 they will start to reach for it over P5, just need to get people to learn it *somehow*
13:12 dalek Inline-Perl5: 90fa698 | moritz++ | t/p5_to_p6.t:
13:12 dalek Inline-Perl5: avoid warning in t/p5_to_p6.t
13:12 dalek Inline-Perl5:
13:12 dalek Inline-Perl5: is() compares by string, so it is not the best for undefined values
13:12 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/90fa69812d
13:13 lizmat moritz: maybe we should make "is" smarter ?
13:13 moritz lizmat: nope
13:13 lizmat and give it a specific diag message for undefined values ?
13:14 dalek rakudo/nom: b0e3d6d | (Rob Hoelz)++ | src/core/Pod.pm:
13:14 dalek rakudo/nom: Rename .content to .contents for Pod::Raw
13:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b0e3d6d433
13:14 nine moritz: why not? Perl 5's is compares undefs without warning.
13:14 lizmat t would still fail, but without the warning and tell the tester it was undef
13:14 moritz nine: p5 has a single undef
13:15 lizmat m: say "" eq Str
13:15 camelia rakudo-moar bf1b4d: OUTPUT«use of uninitialized value of type Str in string context  in block <unit> at /tmp/aAmq0A5uAn:1␤␤True␤»
13:15 moritz nine: that makes it easier to derive sane semantics
13:15 moritz lizmat: hm, ok, maybe not such a bad idea
13:16 lizmat but do we want is() to fail on a comparison with a type object or not ?
13:16 lizmat apparently "" eq Str returns true
13:16 moritz well, I can think of 4 sensible-ish behaviors:
13:16 moritz 1) error
13:17 moritz 2) test that the LHS is undefined too
13:17 moritz 3) compare both sides with === if the RHS is undefined
13:17 moritz 4) test that the LHS is '' in string context
13:18 moritz 4) is what we do now
13:20 lizmat I'm fine with what 'eq' is doing
13:20 lizmat I was talking about is() behaviour
13:21 moritz I'm talking about is()
13:21 hoelzro lizmat: I was thinking that is should be smarter as well
13:22 moritz maybe 2) from above?
13:23 Alina-malina joined #perl6
13:23 guru joined #perl6
13:24 hoelzro commute &
13:25 brrt lizmat: interesting slides from YAPC::EU
13:25 brrt i could add another argument to that
13:26 brrt i'd argue that the 'other dynamic languages' (php / python / ruby and even js) aren't doing so well as is assumed
13:26 brrt e.g. python is apparantly being moved out of production in google
13:26 brrt twitter has all but replaced ruby with java / scala
13:27 brrt and even facebook is busy replacing the php interpreter and ultimately the php language with ... stuff of their own design
13:27 brrt my conclusion would be that these languages, much like perl5, are gettin gold
13:27 brrt ugh missspace
13:27 lizmat :-)
13:27 brrt getting old
13:27 dalek Inline-Perl5: f9ca3a0 | moritz++ | t/p6_to_p5.t:
13:27 dalek Inline-Perl5: more p6 -> p5 tests
13:27 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/f9ca3a0979
13:29 brrt i suppose the reason for that is that 'scalability' as a thing happened, both in the codebase sense and the serving-people sense
13:29 brrt and i'd argue that in that respect, perl6 has actually quite good credentials
13:29 arnsholt Yeah, scalability is probably a very real reason
13:30 brrt as in, we have optional static typing, we have real threads and built-in async support
13:30 arnsholt And both Ruby and Python have very real problems with concurrency
13:30 moritz well, it has gradual typing, which is a better fit than pure dynamic typing
13:30 lizmat scalability would be one of Perl 6's forte's
13:30 brrt basically the red queen hypothesis for programming languages :-)
13:30 arnsholt Yeah, I think gradual typing can be a very real strength
13:31 arnsholt Should let you get a good mix between static guarantees and whip-it--uptitude
13:32 nine I immediately started using types when I wrote my first Perl 6 code and it allowed the compiler catching many little mistakes.
13:32 brrt node.js has also real problems with concurrency
13:33 * flussence came across something interesting while doing random reading: https://github.com/TestAnything/Specification/
13:34 brrt we have a spec, and multiple implementations, which is also a big thing these days
13:36 Alina-malina joined #perl6
13:41 Rounin joined #perl6
13:53 aborazmeh joined #perl6
13:56 Alina-malina joined #perl6
13:56 Alula_ joined #perl6
14:04 * _sri doesn't think ruby, python and node.js have problems with concurrency... it's just parallelism where they are lacking
14:05 brrt nitpicking much? :-)
14:05 brrt no, that is true-ish
14:05 _sri ruby has fibers, python generators, and node.js will be getting async/await through v8 updates
14:05 brrt except that - speaking from experience - python concurrency isn't really what it's cracked up to be
14:06 _sri yield from is kinda neat
14:07 brrt i haven't used that
14:07 _sri i'm mostly working in perl5... sooo i'm jealous :S
14:07 brrt i have used multiprocessing and threading directly
14:07 kaleem joined #perl6
14:07 brrt and while these work, they are no better than say, java's threading support
14:07 brrt and people have lots of problems with that
14:08 _sri what's the problem with java threading? i see it more as a good primitive for stuff like akka
14:08 [Coke] poke 53272,21
14:09 [Coke] HI THERE
14:09 brrt the problem is that it is low-level and idiosyncratic imho
14:10 brrt i.e. all objects are basically locks and condition variables in one
14:10 brrt and the rules for synchronization are ... complex
14:11 brrt the fact that you can build stuff like akka on top of it doesn't make it a good basis
14:15 lizmat going back to jnthn++'s second talk at YAPC::EU
14:16 lizmat I wonder whether we could need something like Array.remove-first
14:16 ecocode_ joined #perl6
14:16 lizmat which would basically splice out the first entry in the array that matches
14:16 grondilu joined #perl6
14:16 lizmat using first-index
14:17 lizmat I realize from a functional point of view, the grep would be better
14:17 lizmat *functional programming
14:17 * grondilu is looking at http://www.liz.nl/C-DayIsComingYAPCEU.pdf and loled quite hard when he reached the slides where camelia slowly creeps into the P5 bunker :)
14:17 grondilu lizmat++
14:18 lizmat .oO( mission accomplished )
14:19 ggoebel111116 joined #perl6
14:19 lizmat otoh, maybe an array for keeping which threads are running, may be sub-optimal
14:19 lizmat and a hash would be better
14:19 brrt hmm
14:19 brrt i'm also wondering about sugaring that
14:20 brrt start up-to $number is perhaps possible?
14:21 lizmat brrt: https://github.com/perl6/specs/commit/6989f5a798
14:21 brrt oh, /me likes
14:22 brrt i suppose we're to implement that with a queueing thingy
14:22 Alula_ joined #perl6
14:23 brrt but then, if you have a threadpool, you have to manage that anyway it seems
14:24 BizarreCake joined #perl6
14:24 nine colomon: I now tried using a perlbrew compiled perl with the exact same flags as my system perl and I still get those failures.
14:25 nine colomon: I wonder if a perlbrew perl can even be used for embedding. Maybe I'll try the perlembed examples later on
14:25 chenryn joined #perl6
14:26 _thou joined #perl6
14:27 lizmat brrt: it's all about scheduling the jobs...  the threadpool will do its own meta-scheduling...  start {} will just throttle scheduling
14:27 brrt i have no idea how / if moarvm has implemented a threadpool
14:27 lizmat to the scheduler  :-)
14:27 lizmat well, that's how I see it implemented anyway
14:28 brrt i think it has, though
14:29 lizmat initial implementation would use a hash, keyed to the id
14:29 xinming joined #perl6
14:30 lizmat the value would be a lock and an hash with the promises
14:30 lizmat or maybe an array... hmmm... still not sure about that
14:31 brrt hmm
14:32 brrt i don't know it offhand either
14:34 japhb Is there a way (env var or rakudo command line option perhaps?) to force a concurrent program to run single-threaded?
14:36 japhb I've got a deeply concurrent program that NPE's r-j in a place I'm having trouble tracking down, and I'd like to be able to see if it's a threading problem, or something I can just debug and golf down.
14:36 jnthn .oO( RAKUDO_PLEASE_DEADLOCK_RIGHT_AWAY_WHEN_I_AWAIT )
14:36 japhb heh
14:36 jnthn More helpfully, you can set $*SCHEDULER to whatever you like
14:36 jnthn Including forcing it to have a small number - or even just one - worker thread in the pool.
14:36 diakopter heh, 0
14:37 jnthn I...don't know what it will do if you give it 0. Maybe ignore all work :D
14:37 japhb Is there a difference between a thread pool of one and a foreground-only scheduler?
14:37 jnthn Well, if you set $*SCHEDULER = CurrentThreadScheduler; I guess you get foreground-only, at least if we mean the same thing...
14:38 japhb Yeah, that's the one I was thinking of.
14:38 jnthn I don't know if it has a clue how to do time-based scheduling, mind
14:38 japhb I was wondering if CurrentThreadScheduler is the same as the pooled scheduler with 1 thread
14:38 jnthn No, it's not
14:38 japhb Ah, hmmm.
14:38 japhb Well, at least that difference might be useful to notice.
14:39 lizmat maybe we need a OneThreadSchduler...
14:39 jnthn Pooled scheduler with one thread = will create 1 thread to run work given to it
14:39 jnthn lizmat: ThreadPoolScheduler with max of 1 degenerates to that...
14:39 japhb Will the debugger work with the pooled scheduler and 1 thread, or is CurrentThreadScheduler the best for that (barring time-based scheduling)
14:39 jnthn Depends if he main thread will be active or not...
14:40 jnthn If its just going to set up work and then await, should be OKish
14:40 jnthn CurrentThreadScheduler should be harmless with the debugger
14:40 japhb Ah, so the ThreadPoolScheduler count doesn't include the main thread?  I was always including that when calculating maximum threads I needed.
14:41 japhb (Although the first thread on r-j has id ~10 on my system, IIRC)
14:42 FROGGS @perl6: I am considering porting XML::LibXML from P5, so that we then can port XML::Compile
14:42 jnthn japhb: No, thread pool scheduler = thing that schedules work on a pool of threads it owns
14:43 jnthn japhb: In fact, if you create 2 thread pool schedulers with 2 threads each, you'll get 4 in total (+ the main one)
14:44 _thou joined #perl6
14:44 japhb jnthn: I guess my mental model had the main thread bootstrapped into the TPS.  But that's because I didn't realize you could create several and have them be separate.  I guess I assumed it was a singleton or so.  (As in, a TPS allowed you to use the thread pool of the underlying VM, as opposed to creating a new pool of threads)
14:45 ggoebel111116 joined #perl6
14:45 * japhb considers the repurcussions of this new info
14:45 lizmat FROGGS: would you want to do that with exactly the same interface that P5 has?
14:45 Alina-malina joined #perl6
14:45 lizmat because the XML::LibXML interface is really a hodgepodge of ad-hoc mapping
14:46 lizmat in P5...  I've always hated working with it
14:46 japhb .oO( MAP ALL THE AD HOCS! )
14:46 lizmat feels to me P6 could use a better interface...
14:46 * brrt chuckles at the notion of a good interface to xml
14:47 jnthn japhb: No, in fact the scheduling is left to be high level code.
14:47 lizmat .oO( one can dream, can't one? )
14:47 jnthn japhb: Custom schedulers are perfectly reasonable things to implement.
14:47 jnthn japhb: Really, the way to see a scheduler is "something I can give work to that will run it somewhere appropriate"
14:48 japhb brrt: I've been taking an Android dev class this week, and have discovered much to my surprise that you can make JSON be completely non-fluent ... by parsing it with Java.
14:48 jnthn japhb: For example, I wrote GTK::Simple::Scheduler as part of GTK::Simple, which schedules work to run in the idle handler of the GTK event loop.
14:49 japhb jnthn: That actually might have been part of my problem -- just like GTK::S::S let you use GTK's underlying event loop, I has assumed TPS let you use the VM's underlying thread pool.  I saw them as "means of accessing a scheduling system" rather than "things that provide schedulable resources"
14:49 jnthn japhb: https://github.com/jnthn/perl6-reactive-samples​/blob/master/golf-helper/lib/GTK/Simple.pm6#L43 if you are curious.
14:50 jnthn japhb: Ah, OK
14:50 jnthn Well, GTK::S::S *is* a singleton...
14:50 * PerlJam .oO( Does japhb have the TPS reports? )
14:50 FROGGS lizmat: markov said the same... he'd prefer when constructors would let you pass more stuff, instead of calling methods for every bit of data
14:51 japhb PerlJam: I got the memo, really I did, I just forgot this time ... Bob told me all about it already ....
14:51 hoelzro moritz: perl6/doc now works with the new S26 stuff
14:51 japhb jnthn: Perhaps this is worth pointing out in future talks?  I can't be the only one to have come to the wrong conclusion on this.
14:52 PerlJam japhb: you're not.  My thinking was similar to yours until I read IRC just now.
14:52 japhb hoelzro: you merged, yay!  \o/
14:52 hoelzro japhb: sure did =)
14:52 hoelzro right after you asked, actually
14:52 hoelzro well, more or less =)
14:52 jnthn lizmat: (your spec commit) funnily enough given the thing japhb and I are discussing, the throttling thing should really be a scheduler :P
14:52 japhb Yeah, saw the highlight.  Unfortunately, by then I was not near IRC
14:53 ggoebel111116 joined #perl6
14:53 jnthn japhb: Yes, I hadn't seen the potential for confusion, but it's clearly one. :)
14:53 jnthn japhb: Also on my todo list is p6doc content for the concurrency stuff.
14:53 lizmat jnthn: so basically create a new scheduler for each id ?
14:53 japhb lizmat: Ah, nice
14:53 jnthn lizmat: Yeah, the :id thing is really fragile.
14:54 hoelzro I had the same thought when I was reading the talk
14:54 japhb er, jnthn: Ah, nice
14:54 hoelzro s/talk/talk slides/
14:54 japhb (damn fingers, never listening to my brain)
14:54 lizmat but I would need to keep a hash with id -> scheduler mapping, no ?
14:54 jnthn lizmat: It'll be a delegating scheduler, or decorating, or however you like to think of it.
14:54 jnthn lizmat: No, the instance would be the ID
14:56 jnthn sub resize-worker(...) { my $*SCHEDULER = ThrottlingScheduler.new(wrap => CALLER::<$SCHEDULER>); for blah() { start { stuff() } } } # or so
14:56 FROGGS m: my $b = Buf.new(1, 2, 3); $b[1] = 22; say $b # jnthn: I implemented Blob.assign_pos and I hope it is not against spec or humanity or so...
14:56 camelia rakudo-moar b0e3d6: OUTPUT«Buf:0x<01 16 03>␤»
14:56 jnthn FROGGS: It's fine, though not exhaustive
14:57 chenryn joined #perl6
14:57 japhb hoelzro: So now that you have merged, can I s:g/'#='/'#|'/
14:57 FROGGS jnthn: in what way?
14:57 japhb ?
14:57 hoelzro japhb: yessir
14:57 japhb OK, cool beans
14:57 hoelzro please test the heck out of the S26 stuff
14:57 hoelzro let's find problems =)
14:57 japhb :-)
14:57 hoelzro I already know of a few
14:57 hoelzro I should file tickets for them
14:58 FROGGS m: #= foo␤sub bar { }␤#| baz␤say &bar.WHY
14:58 camelia rakudo-moar b0e3d6: OUTPUT«(Any)␤»
14:58 FROGGS hoelzro: is that syntax correct?
14:58 PerlJam FROGGS: you have them flipped
14:58 FROGGS ohh
14:58 FROGGS m: #| foo␤sub bar { }␤#= baz␤say &bar.WHY
14:58 camelia rakudo-moar b0e3d6: OUTPUT«foo␤baz␤»
14:58 FROGGS \o/
14:59 PerlJam hoelzro++   :)
14:59 FROGGS hoelzro++ # yeah
14:59 hoelzro =)
14:59 japhb .oO( IT'S ... SO ... AWESOME! )
14:59 hoelzro just don't try it on roles with parameters (yet)
14:59 FROGGS m: #| foo␤sub bar { }␤#= baz␤say &bar.WHY.perl
14:59 camelia rakudo-moar b0e3d6: OUTPUT«Pod::Block::Declarator.new(WHEREFORE => sub bar () { #`(Sub|140227205115736) ... }, config => ().hash, contents => ["foo\nbaz"])␤»
14:59 hoelzro that breaks things in a not-so-fun way
15:00 hoelzro I have something that fixes it, but it's encroaching into dodgy territory
15:00 hoelzro actually, maybe jnthn could sanity check my train of thought
15:00 hoelzro jnthn: right now, if I have a role Foo, and I call Foo.defined, the defined call is dispatched to the pun
15:01 hoelzro do you see any issue with it being dispatched to Mu?
15:01 jnthn FROGGS: Slice syntax I think still goes to at_pos and wants lvalue stuff... Or maybe some other cases.
15:01 jnthn hoelzro: Hmmm
15:02 jnthn hoelzro: Well, there's already .DEFINITE for the "is it a type object"...
15:02 jnthn hoelzro: .defined is the higher-level thing
15:02 hoelzro ah ha
15:02 hoelzro does .DEFINITE dispatch to the pun?
15:02 FROGGS jnthn: I see... I'll leave that open until I hit it in my code
15:02 brrt japhb: actually, you could use something like gson
15:02 hoelzro I could use that instead
15:02 brrt indeed using the standard json libraries it is terribly painful
15:02 jnthn hoelzro: It does'nt dispatch cus it ain't a method call :)
15:03 brrt but gson can map it automagically to classes
15:03 jnthn It's basically nqp::isconcrete + coerce to Perl 6 bool
15:03 hoelzro when I modified punning to dispatch WHY, set_why, and defined directly to Mu for ParametricRoleGroupHOWs, parameterized roles are doc'able
15:03 hoelzro jnthn: oh, great =)
15:06 avs_ joined #perl6
15:08 brrt much progress, very impress
15:19 ilbot3 joined #perl6
15:19 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
15:19 jnthn jdv79: "whatever"
15:20 jdv79 that's what i thought - i need to read up on it.  thanks.
15:20 jnthn m: say (1, 2, 3).map(* + 1)
15:20 camelia rakudo-moar b0e3d6: OUTPUT«2 3 4␤»
15:20 ashleydev joined #perl6
15:20 jnthn Forms a closure in many contexts
15:22 rurban1 joined #perl6
15:22 lestrrat joined #perl6
15:22 synopsebot joined #perl6
15:22 diakopter joined #perl6
15:22 SHODAN joined #perl6
15:22 mr-foobar joined #perl6
15:22 noganex joined #perl6
15:22 bowtie_ joined #perl6
15:22 awwaiid joined #perl6
15:22 PerlJam joined #perl6
15:22 cotto joined #perl6
15:22 clkao joined #perl6
15:22 arnsholt joined #perl6
15:22 mhasch joined #perl6
15:22 Ulti joined #perl6
15:22 carlin joined #perl6
15:22 [Coke] joined #perl6
15:22 epochbell joined #perl6
15:22 apejens joined #perl6
15:22 nine colomon: darn! I just discovered, that perlbrew perl does work with Inline::Perl5. I just did not have $P5SO set in the same shell I was testing on. Trying to narrow it down to the compilation option that makes it work.
15:23 colomon nine: yeah, I just launched a build of 5.18.1 to see if Inline::Perl5 would work with that one.
15:23 colomon oh, cool!
15:23 colomon btw, I'm thinking Inline::Perl5 isn't quite the right name for it.  But I don't have a better suggestion yet.  :)
15:23 guru joined #perl6
15:24 nine colomon: well it does do exactly the same as the Inline family in Perl 5.
15:25 colomon nine: except (if I recall correctly) don't those allow you to use (say) C code directly in p5, rather than in a string?
15:25 * colomon admits he hasn't looked at the Inline modules in probably a decade.
15:25 Khisanth joined #perl6
15:26 nine colomon: Inline::Perl5 doesn't allow you to use P5 code directly either. It only allows string eval. And it provides a function interface and calling methods on P5 objects. But the same is true for Inline::Python for example.
15:27 donaldh joined #perl6
15:27 colomon yeah, just looking at the Inline::C docs now
15:28 colomon I may retract my objection to the name.  :)
15:30 * colomon needs to get back to $work, but will be monitoring this channel / running p6 experiments in the background.
15:31 brrt left #perl6
15:31 mj41 lizmat: Hi. Feel free to ask me if you need up-to-date charts. New one here https://github.com/mj41/Perl6-Analytics-res​ults/blob/master/slides/mj41-brnopm-prev1/ . I consider this one https://github.com/mj41/Perl6-Analytics-results/bl​ob/master/slides/mj41-brnopm-prev1/pres-d02t03.png nice.
15:35 mj41 timotimo: lizmat or anybody interested: Also I can probably invite you to GoodData project ^^^. Just ping me on michal.jurosz >a.t< gooddata.com
15:40 ggoebel111117 joined #perl6
15:45 zoosha joined #perl6
15:48 nine colomon: I got it!
15:48 nine colomon: perlbrew install 5.20.0 -Dcccdlflags=-fPIC -Duseshrplib --multi  (you might want to add -j12 -n --noman to compile faster)
15:50 woosley joined #perl6
15:50 chenryn joined #perl6
15:50 moritz joined #perl6
15:52 spider-mario joined #perl6
15:54 dalek Inline-Perl5: 8db0586 | nine++ | README.md:
15:54 dalek Inline-Perl5: Fix documentation wrt perlbrew compilation, need --multi for now
15:54 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/8db0586056
15:57 [Coke] mj41: hey!
15:58 mj41 [Coke]: hi
15:58 mberends joined #perl6
16:05 dalek rakudo-star-daily: 3a98594 | coke++ | log/ (14 files):
16:05 dalek rakudo-star-daily: today (automated commit)
16:05 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/3a985941f2
16:05 dalek perl6-roast-data: 86b91ae | coke++ | / (6 files):
16:05 dalek perl6-roast-data: today (automated commit)
16:05 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/86b91aebf4
16:06 [Coke] rakudo.jvm creeping up to -5- failures..
16:06 [Coke] all in the very flappy S32-io/IO-Societ-IENT
16:06 [Coke] INET
16:13 Timbus haha *nervously fans shirt collar* uhh pity we will never figure out whose to blame for making that awful module
16:14 nine moritz: I'm still struggling with that strange error. Have narrowed it down to: perl6 -Ilib -e 'use Inline::Perl5; my $i = p5_init_perl(); $i.run("use DBI;"); my $schema = $i.call("connect", "DBI", "dbi:Pg:");'
16:20 treehug88 joined #perl6
16:37 renormalist joined #perl6
16:40 nine Can someone tell me what -> \self, |args { $!perl5.call($name, $!ptr, args.list); } does?
16:45 geekosaur it's a pointy block (anonymous lambda). first parameter is a sigilless name "self", indicating that it's an anonymous method; second is the other parameters as a capture; this retrieves a private attribute $!perl5 and invokes its call method, passing it $name, a private attribute $ptr, and the captured arguments as a list
16:45 geekosaur saying more requires some additional context as I can only guess as to $!perl5, $name, and $!ptr (but I assume this is related to the perl5-in-perl6 stuff)
16:47 nine geekosaur: many thanks!
16:50 nine geekosaur: many thanks!
16:51 [Coke] FROGGS: why the extra check only on !parrot on Blob.assign_pos ?
16:52 kurahaupo joined #perl6
16:52 BizarreCake japhb: I added the -e and --version options.
16:53 colomon joined #perl6
16:53 colomon nine: also, still doesn't work for me.  :(
16:56 nine colomon: still the same error?
17:00 dalek Inline-Perl5/transparent_method_call_regression: de16799 | nine++ | t/call.t:
17:00 dalek Inline-Perl5/transparent_method_call_regression: Tests demonstrating a failure to call methods on P5 objects
17:00 dalek Inline-Perl5/transparent_method_call_regression:
17:00 dalek Inline-Perl5/transparent_method_call_regression: Chaining method calls on objects returned by $i.call works, but saving
17:00 dalek Inline-Perl5/transparent_method_call_regression: the object into a variable and calling methods on that fails with
17:00 dalek Inline-Perl5/transparent_method_call_regression: add_fallback trying to add a fallback for "call". Seels like $!perl5
17:00 dalek Inline-Perl5/transparent_method_call_regression: is a Perl5Object instead of a PerlInterpreter in this case.
17:00 dalek Inline-Perl5/transparent_method_call_regression:
17:00 dalek Inline-Perl5/transparent_method_call_regression: Can be fixed by making all Perl5Object attributes public and removing
17:00 dalek Inline-Perl5/transparent_method_call_regression: the BUILD method.
17:00 dalek Inline-Perl5/transparent_method_call_regression: review: https://github.com/niner/Inl​ine-Perl5/commit/de167995c9
17:00 chenryn joined #perl6
17:00 nine moritz: I managed to write a failing test with only inline Perl 5.
17:01 kjs_ joined #perl6
17:02 FROGGS [Coke]: no idea, the code is stolen from Array.pm or so
17:02 FROGGS [Coke]: err, there also is an !parrot switch
17:02 colomon nine: https://gist.github.com/co​lomon/ffb6814a3e64d7609f90
17:03 [Coke] FROGGS: meh. ok.
17:04 nine colomon: you absolutely sure you compiled your perl with --multi this time and $P5SO points to a libperl.so compiled this way? I lost two hours because my test setup was wrong...
17:07 colomon nine: pretty sure
17:08 dalek rakudo/nom: cb1d0e3 | TimToady++ | lib/Test.pm:
17:08 dalek rakudo/nom: Say what you expected before you say what you got!
17:08 dalek rakudo/nom:
17:08 dalek rakudo/nom: Expectations happen before the operation, what you got happens as a
17:08 dalek rakudo/nom: result of the operation.  Saying them in the wrong order has bugged me
17:08 dalek rakudo/nom: for years, but for some mystical reason I'm usually distracted by some
17:08 dalek rakudo/nom: other bug when I see a test failure, and keep forgetting to fix this.
17:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cb1d0e3ed7
17:09 [Coke] did you test the test test suite? :P
17:09 [Coke] .seen petdance
17:09 yoleaux I haven't seen petdance around.
17:10 [Coke] .seen alester
17:10 yoleaux I haven't seen alester around.
17:10 chenryn joined #perl6
17:10 TimToady I tested a test, and now I'm testing the test suite :)  I expect it will work :)
17:10 mattp_ joined #perl6
17:11 tgt joined #perl6
17:13 zakharyas joined #perl6
17:16 chenryn joined #perl6
17:17 kurahaupo joined #perl6
17:18 dalek roast: 191d550 | coke++ | S04-declarations/constant.t:
17:18 dalek roast: Add a test for RT #122604
17:18 dalek roast: review: https://github.com/perl6/roast/commit/191d550bee
17:18 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=122604
17:19 TimToady actually, doesn't have to be fib...0..* will do
17:19 TimToady and will run faster
17:19 dalek Inline-Perl5: a3bb367 | nine++ | / (3 files):
17:19 dalek Inline-Perl5: Access libperl.so only through p5helper.so
17:19 dalek Inline-Perl5:
17:19 dalek Inline-Perl5: Avoids having to use a hard coded path to libperl.so or an environment variable.
17:19 dalek Inline-Perl5: Also works now with Perls that have multiplicity enabled or disabled because
17:19 dalek Inline-Perl5: we use the proper macros now for everything.
17:19 dalek Inline-Perl5:
17:19 dalek Inline-Perl5: Makes Inline::Perl5 much simpler to use.
17:19 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/a3bb367660
17:19 nine colomon: please test with this commit ^^
17:20 MilkmanDan joined #perl6
17:20 nine colomon: should not matter anymore now how you compile your libperl.so as long as it's compiled with -fPIC.
17:20 colomon nine++ # works!
17:20 nine colomon: $P5SO is history, too.
17:20 nine colomon: wow, that was fast!
17:21 colomon nine: cooking nom and nothing needed for the next two minutes, so I saw your message right away
17:21 [Coke] m: say so 'a' ~~ /<[]>/;
17:21 camelia rakudo-moar b0e3d6: OUTPUT«===SORRY!===␤Iteration past end of iterator␤»
17:21 colomon ooo, does work with P5SO!
17:23 araujo joined #perl6
17:25 [Coke] m: if 42, 44, 22 -> *@a { say @a.perl }
17:25 camelia rakudo-moar b0e3d6: OUTPUT«Array.new()␤»
17:25 [Coke] n: if 42, 44, 22 -> *@a { say @a.perl }
17:25 camelia niecza v24-109-g48a8de3: OUTPUT«(42, 44, 22)␤»
17:28 Juerd The physical machine underneath feather[123] has suffered a double hard disk crash
17:28 Juerd (raid 6)
17:28 dalek roast: 94e9ccb | TimToady++ | S04-declarations/constant.t:
17:28 dalek roast: faster to test the .[100000] bug with ..
17:28 dalek roast:
17:28 dalek roast: And works just well to flush the bug.
17:28 dalek roast: review: https://github.com/perl6/roast/commit/94e9ccbc78
17:29 diakopter Juerd: uh oh
17:29 Juerd Please refrain from doing anything IO-heavy the next few days as the array rebuilds
17:29 Juerd Double degraded is **slow**
17:29 Juerd I may have to kill feather1 if it's used for heavy stuff anyway.
17:29 Juerd I've stopped cron
17:30 [Coke] That woudl explain the slowness we were seeing. :|
17:30 Juerd Yes, it seems now that the past slowness was caused by one of the hard drives
17:30 Juerd That's why I replaced it an hour ago. During resynchronisation, another disk failed.
17:30 [Coke] urk
17:31 PerlJam :(
17:31 [Coke] don't touch anything else! :)
17:31 Juerd Don't touch anything on feather that may cause more than a line written to a log file :P
17:31 TimToady yeah, looked like disk from all the D states [Coke]++ saw
17:32 Juerd What are "D states"?
17:32 TimToady wait states indicated by ps or top
17:32 Juerd Oh, those
17:32 [Coke] when we build c files in rakudo-parrot, are we using the same flags parrot setup for compiling?
17:33 TimToady if a lot of things are waiting on the disk, that usually means a lot of things are waiting on the disk :)
17:33 arnsholt [Coke]: Yeah
17:34 arnsholt IIRC there's a program called parrot-config or some such we get it from
17:35 arnsholt Incidentally that's why there are so many warnings when compiling on Parrot. It enables a lot of warnings
17:35 Ven joined #perl6
17:35 PerlJam does recompiling rakudo count as IO-heavy?
17:35 Juerd Yes, almost anything does.
17:35 Juerd I want to keep the box running because people rely on it for irc
17:36 PerlJam yeah, about all i do on feather is IRC.
17:36 Juerd RAID rebuid will take another 950 minutes.
17:36 PerlJam I was wondering because I thought camelia or something might be on feather3
17:36 Juerd (under current load)
17:36 Juerd feather[1-3] run on the same box
17:36 diakopter camelia's not on feather, last I knew
17:37 PerlJam oh good
17:37 Juerd I've disabled cron on feather1 and some other non-feather vm's, and I've disabled backups altogether
17:37 Juerd 950 minutes is acceptable. The first indication was over 5000 minutes. That wasn't something I could accept. :)
17:38 PerlJam Juerd++ thanks for keeping feather running  :)
17:38 Juerd Double RAID failure really sucks, but it's better than having to restore from backups. Let's hope that the three remaining drives will not break.
17:39 Juerd md3 : active raid6 sdf6[5] sda6[6](F) sde6[7](F) sdd6[3] sdc6[2] sdb6[1]
17:39 Juerd 2094723072 blocks level 6, 64k chunk, algorithm 2 [5/3] [_UUU_]
17:39 Juerd [>....................]  recovery =  4.2% (29602304/698241024) finish=1654.2min speed=6736K/sec
17:39 Juerd Meh.
17:40 diakopter has it been slowing down or speeding up or neither
17:40 diakopter sometimes they slow down greatly
17:40 Juerd Overall, it's been speeding up.
17:40 PerlJam I bet the last bit goes fairly fast.
17:40 PerlJam :)
17:40 Juerd But when one of the VMs does anything, it's reflected in the "finish" ETA, like in the paste
17:41 Juerd Random access IO really kills the sequential IO performance
17:41 Juerd And the 14 MB/s it gets sequentially isn't really fast to begin with.
17:42 nine Juerd: echo 14000 > /proc/sys/dev/raid/speed_limit_min
17:42 Juerd I'm not sure I want to do that right now
17:43 Juerd OTOH, screw functionality. Doing it.
17:43 nine Juerd: I guess having sucking system performance beats a complete fail due to another disk dying at the wrong moment
17:43 PerlJam Just migrate the live VMs off to that spare machine you have lying around and it's no problem   ;)
17:43 Juerd nine: Yes, and the longer it takes, the more out of date (datetime, really :P) the backups will be.
17:44 Juerd PerlJam: Migration will definitely kill whatever's remaining, because that would also require reading from the double degraded array.
17:45 nine Juerd: very nice tips: http://www.cyberciti.biz/tips/linux-ra​id-increase-resync-rebuild-speed.html
17:45 Juerd nine: How's speed_limit_min different from sync_speed_min? I'm setting both now, but I've never used the latter.
17:46 Juerd Ah, that answers that :)
17:46 Juerd Oh, no, it doesn't :)
17:48 Juerd nine: Wow, the NCQ one really helped.
17:48 Juerd I don't even understand why it helps. I thought NCQ made things faster :)
17:49 Juerd [=>...................]  recovery =  5.6% (39228696/698241024) finish=321.4min speed=34172K/sec
17:49 PerlJam nine++
17:49 hoelzro m: role R[::T] {} ; say(R)
17:49 camelia rakudo-moar b0e3d6: OUTPUT«None of the parametric role variants for 'R' matched the arguments supplied.␤Cannot call ''; none of these signatures match:␤:(Mu ::$?CLASS ::::?CLASS, Mu ::T)␤  in any specialize at src/gen/m-Metamodel.nqp:2188␤  in any compose at src/gen/m-Metamo…»
17:50 hoelzro it would be nice if I could print a parametric role, but I'm not sure what the right thing to do for this would be
17:51 nine Juerd: could be because it moves all queue management to the kernel and thus allows the kernel to prioritize RAID rebuild in the first place
17:53 diakopter hoelzro: replace the T with what replaces it?
17:53 diakopter oh you mean the generic one
17:53 hoelzro yeah
17:54 diakopter the stringification in MSIL/CIL just puts a comma
17:55 diakopter er no
17:55 diakopter it appends `X where X is the arity of paramters
17:55 diakopter parameters
17:55 diakopter http://stackoverflow.com/questions/​1482160/why-does-the-runtime-shows-​the-generic-types-as-generictypen
17:55 diakopter .. as if that helps.
17:56 diakopter I don't know how it expresses constraints on parameters
17:57 hoelzro yeah, I'm not exactly sure what the output should look like
17:57 hoelzro just that it shouldn't throw an exception =)
17:59 kjs_ joined #perl6
18:02 gfldex joined #perl6
18:08 molaf__ joined #perl6
18:10 flussence Juerd: ...what's the kernel version on that server?
18:10 flussence because - https://lwn.net/Articles/608896/
18:11 Juerd 2.6.32 :(
18:14 Juerd flussence: Thanks for letting me know. Not really anything we can do except hope for the best. Rebooting is incredibly dangerous too.
18:14 telex joined #perl6
18:15 Juerd Or emergency remount r/o
18:15 flussence it sounds like it happens only when the filesystem and the recovery stuff write to the same xxKB chunk at the same time. As long as nobody's causing heavy writes that shouldn't be too likely...
18:16 flussence (definitely needs a fsck after it's done though)
18:16 Juerd Yeah, that's going to take a long time too, with downtime.
18:16 Juerd But let's first resync. Twice. :(
18:17 flussence :(
18:18 [Sno] joined #perl6
18:24 zacts joined #perl6
18:24 zacts hi #perl6
18:25 PerlJam zacts: greetings
18:31 Ven joined #perl6
18:35 kst joined #perl6
18:39 Rotwang joined #perl6
18:53 ggoebel111116 joined #perl6
18:59 Ven joined #perl6
19:07 firefish5000 joined #perl6
19:15 tadzik diakopter! \o/
19:16 brrt joined #perl6
19:23 tadzik zacts! \o/
19:24 * tadzik in the far end of Bulgaria
19:24 guru joined #perl6
19:28 ecocode_ joined #perl6
19:29 timotimo so much backscroll ...
19:30 nine tadzik: having fun?
19:30 tadzik nine: oh indeed
19:30 tadzik nine: the hotel owner said "staying for one night only? I have to convince you otherwise"
19:31 nine tadzik: oh that sounds great :)
19:31 tadzik so I spent the entire evening tasting his catalogue of pepper, cheese and rakija, which he makes in his basement
19:32 tadzik it's such a natural thing apparently, "oh, you're the guest here for a bargain price? Let me host you with the best I have"
19:32 jack_rabbit_ joined #perl6
19:32 tadzik and I thought this place is going to suck because booking.com doesn't list any great hotels nearby.. o_0
19:33 flussence .oO( maybe that's why they're always hiring )
19:34 tadzik they should send someone to go and have a drinkup with this corner of the world
19:36 nine tadzik: sounds like you were a little lucky there ;)
19:39 tadzik possible :)
19:49 ggoebel111116 joined #perl6
19:52 Ovid joined #perl6
19:52 Guest8704 is there an equivalent to ‘perldoc -f’ for Perl 6?
19:53 curtispoe In particular, I was wondering if say should default to using $_?
19:53 FROGGS std: say
19:54 camelia std ee1ef48: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/185xjhymzW line 1:�------> [32msay[33m�[31m<EOL>[0m�Check failed�FAILED 00:01 120m�»
19:54 curtispoe Cheers.
19:55 curtispoe perl6: say $_ if $_.is-prime for 1..10;
19:55 FROGGS there is no perldoc -f sadly, only this: http://doc.perl6.org/routine/say
19:55 FROGGS which is not very helpful here
19:55 camelia rakudo-{parrot,jvm,moar} cb1d0e, niecza v24-109-g48a8de3: OUTPUT«2␤3␤5␤7␤»
19:55 curtispoe That prints four blanks lines for me, but changing that to .say works.
19:55 FROGGS yes, a bare say in rakudo should explode like std does
19:56 curtispoe Should explode like std does? I don’t know what that means.
19:56 curtispoe I just installed perl6 with rakudobrew and in the REPL, it ran without exceptions, but had four blank lines.
19:56 curtispoe I don’t want to file a bug because I don’t know what I should expect here :)
19:57 FROGGS std: say # that is what rakudo should do
19:57 camelia std ee1ef48: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/l5n6Qr0hDp line 1:�------> [32msay[33m�[31m # that is what rakudo should do[0m�Check failed�FAIL…»
19:57 FROGGS m: say # but it does not, which is a bug
19:57 camelia rakudo-moar cb1d0e: OUTPUT«␤»
19:59 * FROGGS filed it as RT #122630
19:59 * synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=122630
19:59 curtispoe Thank you!
19:59 FROGGS you're welcome :o)
20:00 ggoebel111117 joined #perl6
20:00 curtispoe Also, wasn’t there a tiny one-liner using await/for/sleep that jnthn used to show concurrency in Perl6? Trying to include a small snippet in a blog post.
20:03 FROGGS curtispoe: like this? http://jnthn.net/papers/201​4-yapceu-async.pdf#page=26
20:03 curtispoe Never mind. I recreated it.
20:03 curtispoe Heh.
20:04 kjs_ joined #perl6
20:12 raiph fyi re: p6doc -f: "experimental -f support for methods if index.data exists" http://irclog.perlgeek.de/​perl6/2014-08-02#i_9123593
20:13 FROGGS ahh, nice
20:13 FROGGS that is shipped with rakudo star me thinks
20:13 anaeem1_ joined #perl6
20:14 raiph FROGGS: commit was 25 days ago
20:15 FROGGS raiph: thank you
20:23 itz FROGGS: p6doc -f say will now work if you run p6doc-index first
20:23 FROGGS good to know... will test that after $sleep :o)
20:24 itz if it doesn't work hassle me :)
20:24 curtispoe If I run “$ time perl6 -e 'for 1 .. 100 { start { rand.sleep } }’”, it completes very quickly since promises don’t block. What happens to those promises if the code completes before they do?
20:26 FROGGS curtispoe: I think you'd have to ask jnthn or lizmat for that
20:27 curtispoe OK. Cheers.
20:35 lizmat curtispoe: the threads that are spawned by "start" are taken down when the main thread exits
20:35 lizmat what you want is to wait for the promises to be kept
20:35 lizmat await do for ... { start { ... } }
20:35 lizmat will do that
20:35 curtispoe lizmat: does that mean that we might be partway through updating a database and get a rollback if we didn’t wait?
20:36 brrt m: nqp::mod_i(4, 0); # this is now fixed
20:36 camelia rakudo-moar cb1d0e: OUTPUT«(signal )»
20:36 lizmat yes, at the moment that is so
20:36 * brrt afk
20:36 brrt left #perl6
20:36 curtispoe lizmat: I had the “await do …” bit, but I wanted to see what happened if I left it out :)
20:36 lizmat ok
20:36 curtispoe Does that mean that normal “end of scope” semantics kick in? (Filehandles closed, for example)
20:36 lizmat this is the same as ithreads in Perl 5, btw
20:36 curtispoe OK
20:37 Ven jnthn: will you update your website to add the yapc::eu talks? was a bit hard to find them :)
20:37 lizmat we're still not sure whether this is a good thing or not?
20:37 lizmat Ven: the URL's were posted on #perl6
20:37 ecocode_ joined #perl6
20:38 Ven lizmat: I did say "were hard to find" :p
20:38 lizmat curtispoe: there are no "end of scope" semantics (if you mean something akin to DESTROY)
20:38 lizmat there is a LEAVE phaser
20:38 curtispoe Oh, that’s interesting. I keep forgetting that terminology is different.
20:39 lizmat which terminology ?
20:39 FROGGS we do not have DESTROY (yet?) because we don't have a refcounted GC
20:39 PerlJam lizmat: "phaser" probably.
20:39 lizmat ah, ok  :-)
20:41 FROGGS gnight
20:41 lizmat gnight FROGGS
20:41 curtispoe Yes, I the “phaser” terminology stunned me for a minute.
20:41 * curtispoe will show himself out.
20:41 PerlJam FROGGS: sleep well! :)
20:41 colomon joined #perl6
20:42 PerlJam curtispoe: you keep punning like that and you won't be able to leave :)
20:42 curtispoe I keep punning like that and my wife will tell me stay here.
20:43 curtispoe Is there a Perl 6 equivalent to __END__?
20:44 PerlJam curtispoe: sorta.  It's done through POD now
20:44 curtispoe OK
20:44 hoelzro curtispoe: =begin finish
20:45 rurban joined #perl6
20:46 curtispoe Except that as soon as I add that to a program, it hangs!
20:46 * hoelzro wonders if that's his fault
20:46 PerlJam hoelzro: probably  :)
20:46 curtispoe I grabbed the code from http://learnxinyminutes.com/docs/perl6/
20:47 hoelzro hmm...it worked for me
20:47 curtispoe And I put your POD before the line: my $a = $condition ?? $value-if-true !! $value-if-false;
20:47 curtispoe If I simply delete all code after that, it runs fine.
20:47 colomon curtispoe: which version of rakudo are you using?
20:47 curtispoe $ perl6 -v
20:47 curtispoe This is perl6 version 2014.08-120-gbf1b4db built on MoarVM version 2014.08-36-g7938703
20:48 hoelzro m: say 'hi';␤=begin finish␤␤The End␤␤=end finish
20:48 camelia rakudo-moar cb1d0e: OUTPUT«hi␤»
20:48 curtispoe What’s the preferred past solution here?
20:49 curtispoe s/past/paste/
20:49 colomon gist.github.com
20:49 hoelzro curtispoe: I don't know if there is one; I prefer gists
20:50 colomon hoelzro: I think curtispoe's version may be before your changes?
20:50 hoelzro colomon: I don't think so; I have 2014.08-123 here
20:50 hoelzro which just includes my changes from this morning (my morning, that is)
20:50 colomon oh, never mind, read the git SHAs wrong
20:51 curtispoe https://gist.github.com/Ovid/8fd431ae2f047c5fb7f0
20:51 colomon hoelzro: I'll turn this back over to you, then.  ;)
20:51 hoelzro oh my
20:51 hoelzro that's quite a lot of code
20:51 curtispoe Line 220 is where I entered the POD. I took it from  http://learnxinyminutes.com/docs/perl6/
20:51 curtispoe I wanted to include that in a blog entry, but it has a few problems :)
20:52 curtispoe I’ll try to create a smaller test case.
20:52 curtispoe OK, I have a much smaller test case. Waiting for a bit to see if it finishes.
20:53 hoelzro I wonder if it's the absence of =end finish?
20:53 hoelzro m: say 'hi';␤=begin finish␤␤The End␤
20:53 camelia rakudo-moar cb1d0e: OUTPUT«(timeout)»
20:53 hoelzro seems to be
20:54 curtispoe Take a look at it now. Deleting the =begin finish line makes it work.
20:54 rurban1 joined #perl6
20:55 curtispoe Can anyone replicate this?
20:55 hoelzro I didn't mess with any of the =begin/=end stuff with my work
20:55 hoelzro curtispoe: yes
20:55 hoelzro unfortunately, quite easily
20:55 curtispoe Awesome.
20:55 hoelzro well, somewhat fortunately =)
20:55 * hoelzro files rakudobug
20:55 curtispoe (Well, awesome that it’s not just me) :)
20:55 curtispoe hoelzro++
20:56 hoelzro I'll file the bug and forward it to my home machine
20:57 hoelzro it's 16:00 by me, so it'll be a few hours before I can really take a look
20:57 hoelzro bwah
20:57 hoelzro =begin finish isn't even in roast!
20:57 curtispoe That’s two bugs in one quick session. That’s going to throw a kink in my writeup.
20:57 hoelzro =(
20:57 hoelzro well, at least we're finding them =)
20:57 hoelzro curtispoe++ # finding bugs
20:57 curtispoe Yes :)
20:59 hoelzro huh, I can't assign it to myself
21:02 curtispoe File another bug then :)
21:02 hoelzro heh =
21:02 hoelzro =)
21:04 hoelzro curtispoe: what was the other bug you found?
21:05 curtispoe https://rt.perl.org//Public​/Bug/Display.html?id=122630
21:05 curtispoe I found that with the REPL when I wrote “say if $_.is-prime for 1..10”
21:06 hoelzro wow, I'm shocked at that
21:06 hoelzro curtispoe: wanna learn how to fix it? =)
21:06 curtispoe I should have been .say, but instead it printed four blank lines instead of throwing an exception.
21:06 curtispoe Sure :)
21:06 * curtispoe is just glad he’ll never touch PASM again ;)
21:06 lizmat I seem to recall that the REPL overloads say
21:07 hoelzro curtispoe: well, say is implemented in src/core/IO.pm
21:07 hoelzro I'm guessing it's a multi method, so it *should* simply be a matter of implementing an argless candidate
21:07 hoelzro lizmat: oh, really?
21:07 Ven joined #perl6
21:08 hoelzro it prints nothing for me sans REPL
21:08 lizmat hmmm... indeed
21:09 curtispoe http://blogs.perl.org/users/ovid/2014/08/tr​y-rakudobrew-and-play-with-concurrency.html
21:09 kjs_ joined #perl6
21:10 colomon base say seems to  print newline from simple script or -e argument to rakudo.
21:10 curtispoe So say is both a multi sub and a multi method?
21:11 hoelzro curtispoe++ # blog post
21:11 hoelzro yes
21:11 curtispoe Yeah, that last line of the blog post will cause me some grief with some folks, I think :)
21:11 hoelzro curtispoe: let me know if you end up porting that web framework; I'm very interested in such a development =)
21:12 TimToady std: say if $_.is-prime for 1..10
21:12 camelia std ee1ef48: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/Oa_9HF0Zmu line 1:�------> [32msay[33m�[31m if $_.is-prime for 1..10[0m�Check failed�FAILED 00:0…»
21:12 TimToady someone should port over that error to rakudo
21:12 curtispoe God, I would kill to do so. I really, really enjoy hacking on Perl 6, but right now I’m working on two separate contracts and still have more talks to write for conferences.
21:12 * lizmat has a memory of doing just that
21:12 TimToady .oO(killing?)
21:12 PerlJam I thought rakudo already had that one
21:13 hoelzro TimToady: I'm trying to get curtispoe to do it =)
21:13 SamuraiJack joined #perl6
21:13 TimToady m: say if $_.is-prime for 1..10
21:13 camelia rakudo-moar cb1d0e: OUTPUT«␤␤␤␤»
21:13 itz Method content (from Pod::Block) called at: lib/Pod/To/SectionFilter.pm, lines 5,9
21:13 curtispoe Well, at the very least there’s a select list of people I would kill for said opportunity, but I’ll skip the names lest I incriminate myself ;)
21:13 itz Please use Pod::Block.contents instead.
21:13 curtispoe (Dear NSA: I’m kidding)
21:13 hoelzro curtispoe: fair enough. I would like to work on such a thing myself, but ENOTIME
21:14 TimToady the NSA already knows we're all radicals, so they don't bother monitoring us anymore... :)
21:14 * lizmat is going to bed now
21:14 curtispoe Heh
21:14 curtispoe night, lizmat.
21:14 hoelzro itz: yes, .content is deprecated
21:14 hoelzro o/ lizmat
21:14 lizmat if nobody has ported the bare say to be up to spec, I'll do it tomorrow
21:14 lizmat sleep&
21:14 TimToady lizmat++, curtispoe++
21:16 hoelzro curtispoe: regarding the method/sub nature of say, you only have to worry about the sub version
21:16 curtispoe OK
21:16 hoelzro since the thing to print for a method is obvious as the invocant
21:20 curtispoe Is there any place I can read to get up to speed on nqp? I sort of understand most of it, but I can’t quite make it out. Does it need a ‘multi sub say() {…}; section?
21:20 curtispoe (Note the lack of args)
21:21 hoelzro curtispoe: jnthn's notes from last year's workshop are a good source
21:21 hoelzro curtispoe: by "it", do you mean src/core/IO.pm?
21:21 curtispoe Yes, I meant src/core/IO.pm, sorry.
21:21 hoelzro no @*WORRIES
21:21 hoelzro ;)
21:22 hoelzro you probably don't have to worry about NQP for this patch
21:23 hoelzro hmm...I could've sworn sorry() was a builtin
21:24 hoelzro curtispoe: here's the aforementioned material on NQP: http://6guts.wordpress.com/2013/09/17/materi​al-from-the-rakudo-and-nqp-internals-course/
21:24 curtispoe Thanks!
21:24 nine curtispoe: until you ported that web framework, I'll be working on using the existing ones ;) https://github.com/niner/Inline-Perl5
21:24 hoelzro curtispoe: np
21:25 curtispoe I like how the blog says there are 4 responses, but only shows 3.
21:25 hoelzro curtispoe's inquiries are inspiring me to get moving on writing my "Hacking On Rakudo" blog post
21:25 curtispoe Ah, the pingback, I suspect.
21:26 curtispoe Perl 6 definitely needs: “hacking on Rakudo” and a “Perl 6 quickstart”.
21:26 curtispoe Or I just need to find those :)
21:27 TimToady http://learnxinyminutes.com/docs/perl6/ is kind of the latter
21:27 hoelzro curtispoe: I have copious notes from my last two months of learning, I just need to condense them into a post =)
21:28 curtispoe TimToady: trying to run the latter is part of what led me here. It’s OK(ish), but I made the mistake of trying to run the code :)
21:28 TimToady ah
21:28 TimToady it's very...new...still
21:31 Ven curtispoe: running the whole file?
21:31 curtispoe Well, in this case, it’s the code which has a few issues. I don’t think it’s Perl 6 which is falling down.
21:32 Ven it's not meant to.
21:32 Ven There should be several infinite loops in it
21:32 curtispoe Ven: Yeah, I tried to run the whole file. Silly me.
21:32 curtispoe I am not a clever man.
21:32 Ven not what I'm saying. I just wonder what it should be meant to produce?
21:32 Ven did you expect some kind of meaningful output?
21:33 curtispoe I wanted to see what it would do. I was very impressed with the error messages!
21:34 curtispoe (seriously)
21:35 Ven for example, the redeclaration errors will never get fixed.
21:35 Ven the "variable $condition is undef
21:35 Ven " looks good to me. No reason to make that file runnable, tbh...
21:35 Ven I might try doing something about it tho
21:36 TimToady put an exit as the first statement, and put everything else in an EVAL :)
21:40 Ven TimToady: hey, I have some self-respect
21:44 [Coke] FROGGS: that's a duplicate of 72844.
21:44 ggoebel111117 joined #perl6
21:45 hoelzro [Coke]: are you one of the RT groundskeepers?
21:45 [Coke] yup.
21:45 [Coke] Closing 122630 as a dup.
21:45 [Coke] er, merging it.
21:46 hoelzro [Coke]: would you mind giving me the ability to assign tickets to myself?
21:46 BenGoldberg joined #perl6
21:46 hoelzro as well as to tag issues, maybe? (I'd really like to tag POD-related things I found as POD)
21:46 [Coke] you have 2 accounts on RT. which one?
21:46 [Coke] ... ah, i'll do both.
21:47 hoelzro heh, ok
21:47 [Coke] one of your accounts already had access. now both do.
21:47 hoelzro \o/
21:47 hoelzro thanks [Coke]
22:00 Ven err, is there a list of editor plugins for p6?
22:00 hoelzro Ven: there's a simple perl6.vim in vim-perl, but it's pretty bad
22:00 Vlavv joined #perl6
22:01 hoelzro I say this as one of the stewards of said file =/
22:01 Ven hoelzro: I know you do :P
22:04 Ven hoelzro: which one would be better for vim?
22:04 * Ven switched to emacs and evil-mode...
22:04 hoelzro Ven: unfortunately, I think that's the best one we have for Vim =(
22:04 hoelzro making it better is on my long TODO list
22:12 kjs_ joined #perl6
22:19 FROGGS joined #perl6
22:25 Ven joined #perl6
22:31 BenGoldberg How hard would it be, to create a program in perl which uses the perl6 grammar to take some perl6 source code and generate from it a ctags-format tag index file?
22:31 Psyche^_ joined #perl6
22:40 hoelzro BenGoldberg: I think if you wrote something in NQP using Perl6::Grammar, it wouldn't be so hard
22:40 * hoelzro knocks on wood
22:40 huf doesnt such a thing already exist?
22:41 huf wasnt there some kind of syntax checker written in p5?
22:43 hoelzro huf: are you thinking of std?
22:45 arnsholt Extracting the statically available information should be doable
22:46 arnsholt But keep in mind that 100% parsing of Perl 6, like many other dynamic languages, actually requires your parser to be able to execute arbitrary code during parsing
22:46 * flussence speculates whether it'd be less taxing on one's sanity to write a full-featured vim.p6 than a full-featured perl6.vim...
22:48 arnsholt vim.p6, definitely, I think =)
22:48 * TimToady has considered that question himownself...
22:48 flussence .oO( actually, one of p6's selling points is that you can read its code without syntax highlighting... )
22:49 BenGoldberg Sure, but syntax highlighting would make it prettier ;)
22:49 TimToady it would make it easy to write an incremental compiler, if you know which piece of code you're modifying
22:56 ab5tract joined #perl6
22:58 xragnar_ joined #perl6
22:58 colomon joined #perl6
22:58 dalek specs: ed80b33 | TimToady++ | S03-operators.pod:
22:58 dalek specs: spec jittability of div_i
22:58 dalek specs: review: https://github.com/perl6/specs/commit/ed80b33d5e
23:04 dalek rakudo/nom: 98c32aa | TimToady++ | src/core/Int.pm:
23:04 dalek rakudo/nom: div and % throw for division by 0 on native int
23:04 dalek rakudo/nom:
23:04 dalek rakudo/nom: When used on native integer types, div and % need to be very fast and jittable.
23:04 dalek rakudo/nom: Returning failure interferes with this, so for these low-level ops, we rely on
23:04 dalek rakudo/nom: the hardware to throw an exception.  Use something higher-level if you want
23:04 dalek rakudo/nom: higher-level semantics.
23:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/98c32aaa8b
23:05 ab5tract i have a question about passing lists of lists
23:06 dalek rakudo/nom: 0124507 | TimToady++ | src/core/Int.pm:
23:06 dalek rakudo/nom: declare that div(int,int) returns int
23:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0124507ce9
23:06 ab5tract sub say_a_list( *@list ) { @list.map.perl.say };
23:08 ab5tract how can i pass lists such that say_a_list( @a, @b ); # ... , @j, @k. ...
23:09 TimToady declare int **@list to get LoL semantics
23:09 TimToady s/int/it/
23:10 ab5tract :D
23:11 ab5tract sub symmetric_difference( **@list ) {  my %seen;  for @list.values.kv -> $idx,$num { %seen{$num}{$idx} = 1; }; return %seen.kv.map(-> $num,%times { $num if %times.keys == 1; }); }
23:12 TimToady why not just use sets?
23:12 ab5tract oops, this is #perl6, not a repl
23:12 ab5tract no reason not to
23:13 ab5tract bags are awesome
23:13 ab5tract but i'm still exploring the basics of perl 6
23:14 ab5tract so doing it in a handrolled fashion seemed like a fun exercise
23:15 TimToady m: say <a b c> (^) <b c d>
23:15 camelia rakudo-moar cb1d0e: OUTPUT«set(a, d)␤»
23:15 TimToady what, having fun!?!  that's not allowed...
23:16 ab5tract :D :D
23:16 TimToady m: say <a b c> ⊖ <b c d>
23:16 camelia rakudo-moar cb1d0e: OUTPUT«set(a, d)␤»
23:18 ab5tract it's nice to get that kind of response when asking "what's the colloquil phrasing of a basic list operation"
23:21 ab5tract very perl-ish
23:26 ab5tract i'm having a failure of imagination with making it work with an arbitrary a list of lists though
23:27 ab5tract m: <1 4 2 4 54 5 2 -1> (^) ( <24 5 -21 244 53 > (^) <24 -1 4> )
23:27 camelia rakudo-moar cb1d0e: ( no output )
23:27 ab5tract m: say <1 4 2 4 54 5 2 -1> (^) ( <24 5 -21 244 53 > (^) <24 -1 4> )
23:27 camelia rakudo-moar cb1d0e: OUTPUT«set(1, 2, 54, -21, 244, 53)␤»
23:27 cognome joined #perl6
23:32 ab5tract m: <1 4 2 4 54 5 2 -1> (^) ( <24 5 -21 244 53 > (^) <24 -1> )
23:32 camelia rakudo-moar 012450: ( no output )
23:32 ab5tract m: say <1 4 2 4 54 5 2 -1> (^) ( <24 5 -21 244 53 > (^) <24 -1> )
23:32 camelia rakudo-moar 012450: OUTPUT«set(1, 4, 2, 54, -21, 244, 53)␤»
23:32 TimToady m: say <1 4 2 4 54 5 2 -1> (^) <24 5 -21 244 53 > (^) <24 -1 4>
23:32 camelia rakudo-moar 012450: OUTPUT«Too many positional parameters passed; got 3 but expected 2␤  in sub infix:<(^)> at src/gen/m-CORE.setting:17210␤  in block <unit> at /tmp/mv0uRauYlb:1␤␤»
23:32 TimToady hmm, that shouldn't happen
23:32 ab5tract ah :)
23:33 TimToady ooh, there's another one of those got/expected things
23:33 TimToady should say "expected 2 but got 3"
23:34 TimToady but should generally come before the adversative
23:34 cognome joined #perl6
23:35 TimToady I wanted to go to the park but it rained.  # OK
23:35 TimToady It rained but I wanted to go to the park.  # NOT SO MUCH
23:36 ab5tract indeed
23:36 ab5tract but now i am confused
23:36 ab5tract is (^) also supposed to handle 3 ( or more )>
23:37 Ven joined #perl6
23:37 ab5tract s/>/?/
23:37 BenGoldberg m: say [R,] 1..4;
23:37 camelia rakudo-moar 012450: OUTPUT«Too many positional parameters passed; got 4 but expected 2␤  in block  at src/gen/m-CORE.setting:17804␤  in sub  at src/gen/m-CORE.setting:17954␤  in block <unit> at /tmp/5HO1_dYGCn:1␤␤»
23:37 BenGoldberg m: say [R+^] 1..4;
23:37 camelia rakudo-moar 012450: OUTPUT«4␤»
23:38 BenGoldberg m: (1 ^ 2 ^ 3).say;
23:38 camelia rakudo-moar 012450: OUTPUT«one(1, 2, 3)␤»
23:38 BenGoldberg m: (1 R^ 2 R^ 3).say;
23:38 camelia rakudo-moar 012450: OUTPUT«Too many positional parameters passed; got 3 but expected 2␤  in block  at src/gen/m-CORE.setting:17804␤  in block <unit> at /tmp/U25Xfna_Oi:1␤␤»
23:39 ab5tract because it also seemed natural to use parantheses, if slightly less perl-ish ;)
23:40 ab5tract BenGoldberg: what does the R mean in this context?
23:41 BenGoldberg R is a meta-operator, which produces a new operator with reversed arguments.
23:41 BenGoldberg m: say (1 / 3); say (1 R/ 3);
23:41 camelia rakudo-moar 012450: OUTPUT«0.333333␤3␤»
23:41 BenGoldberg m: say (1 - 3); say (1 R- 3);
23:41 camelia rakudo-moar 012450: OUTPUT«-2␤2␤»
23:45 TimToady ab5tract: yes, it's in the junctive-or precedence level, which is list associative, so the compiler calls in n-ary, but the function isn't expecting it
23:45 TimToady so just a bug
23:48 TimToady looks like union and intersection were rewritten to be listy, but not some of the others
23:50 ab5tract good to know. i'm still trying to parse out how to programmatically process a LoL with (^)
23:50 TimToady rewriting (^) and friends to work like (|) and (&) would be LHF for someone
23:51 ab5tract i'm imagining it has something to do with the [+^] syntax i saw BenGoldberg using
23:52 Juerd Feather update: first disk synced, so there's N+1 redundancy again, now syncing second disk. After that, the VMs will be rebooted for fsck's
23:52 TimToady m: sub infix:<op>(**@lol) { [(^)] @lol }; say <1 4 2 4 54 5 2 -1> op <24 5 -21 244 53 > op <24 -1 4>
23:52 camelia rakudo-moar 012450: OUTPUT«set(1, 2, 54, -21, 244, 53)␤»
23:54 TimToady or course, that really oughtn't to have worked by rights, since [(^)] should've notice it was list-associative, and called (^) as a list...
23:56 ab5tract m: sub x( **@l ) { [(^)] @l }; x( < 4 23 33 21 22 21 >, <12 23 22 41 2>, <5 7 2>);
23:56 camelia rakudo-moar 012450: OUTPUT«Too many positional parameters passed; got 3 but expected 2␤  in sub infix:<(^)> at src/gen/m-CORE.setting:17210␤  in sub  at src/gen/m-CORE.setting:17954␤  in sub x at /tmp/Su4QK9fn5u:1␤  in block <unit> at /tmp/Su4QK9fn5u:1␤␤»
23:56 ab5tract so, same bug, but there's my answer i guess :)
23:59 ab5tract two bugs, one op
23:59 TimToady m: sub x( **@l ) { [(^)] @l }; say x( < 4 23 33 21 22 21 >; <12 23 22 41 2>; <5 7 2>)
23:59 camelia rakudo-moar 012450: OUTPUT«Too many positional parameters passed; got 3 but expected 2␤  in sub infix:<(^)> at src/gen/m-CORE.setting:17210␤  in sub  at src/gen/m-CORE.setting:17954␤  in sub x at /tmp/EAMws0gW6I:1␤  in block <unit> at /tmp/EAMws0gW6I:1␤␤»

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

Perl 6 | Reference Documentation | Rakudo