»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:07 Akagi201 joined
TimToady_ rosettacode.org/wiki/Ranking_methods#Perl_6 <-- right in Perl 6's wheelhouse 00:11
TimToady dinner &
timotimo ouch! right in the wheelhouse!
00:11 Akagi201 left 00:15 xenoterracide joined
[Coke] tries TEST_JOBS=12 for rakudo-moar on his 8 core box. 00:36
00:37 ardeshir joined
[Coke] yay, 144s 00:38
00:39 ardeshir is now known as sepahsalar 00:40 itz_ joined
dalek ecs: bd845bf | (Stéphane Payrard)++ | S99-glossary.pod:
S99: DFS
00:52
01:00 BenGoldberg joined
hoelzro I know he's asleep, but jnthn++ for the profiler 01:06
I just used it on a benchmarking script I wrote for Moar a while back, very nice
01:08 Akagi201 joined, xenoterracide left, xenoterracide joined 01:11 xdoctor joined
flussence throws his idle i7 server at make spectest 01:12
01:13 Akagi201 left
flussence I haven't done this on anything for a few months... whoa, this is fast. 01:14
(166 secs total)
(...plus 3 failures) 01:15
01:16 FROGGS_ joined 01:19 dayangkun joined
[Coke] flussence: rakudo-moar? it's testingclean here. 01:25
can you run those 3 separately and see if it's a stress issue?
flussence r-m + --enable-jit, just because :) 01:30
01:30 en joined, sepahsalar left, en left
[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
I don't want to remove the install directory, because it's not a local install.
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
r: say 0.base(2)
camelia rakudo-jvm 399faa: OUTPUT«(timeout)»
..rakudo-{parrot,moar} 399faa: OUTPUT«0␤»
flussence base.t fails there, returns «''» instead of 0 01:39
arith.t is failing 11 and 12
and when in-loop.t fails... «non-invokable object is non-invokable» right after emitting the test plan 01:42
the stacktrace points to the "for 1..10" line in there every time. 01:43
01:48 itz joined, itz_ left 01:51 Sqirrel joined
flussence possibly related: I see a "make stresstest" target, would that be useful data? 01:52
01:53 itz left, itz joined
[Coke] just runs a few more test files. 01:56
4 more, having just counted.
I just realized the daily run should be running those.
flussence hm, I'll poke at those failures again tomorrow when more people are around... 02:00
dalek Heuristic branch merge: pushed 101 commits to rakudo/S26-WHY by hoelzro 02:03
02:09 Akagi201 joined 02:13 Akagi201 left 02:22 xenoterracide left 02:24 xenoterracide joined 02:28 njmurphy joined
japhb hoelzro: How long before S26-WHY can merge? 02:28
Or rather, what's left? Last time I asked, you seemed very close ...
hoelzro soon 02:31
it's so close
I just need it to pass on JVM and parrot
www.smbc-comics.com/comics/20060302.gif 02:32
02:37 noganex joined
hoelzro apparently, on jakudo, I can do $*POD_BLOCKS[0] in NQP land but not Perl 6 land? 02:39
02:39 Alula_ joined 02:56 Alula_ left, Alula_ joined 03:09 Akagi201 joined 03:14 Akagi201 left 03:16 njmurphy left 03:18 xenoterracide left 03:28 rindolf joined
hoelzro I guess I should always be using nqp::atpos for NQPArrays 03:30
japhb: good news; if these spectests run clean (should be about an hour), I'll be merging tonight 03:39
03:48 cognome joined 03:50 Alina-malina joined, telex left 03:51 BooK joined, psch joined, telex joined 04:10 Akagi201 joined 04:15 Akagi201 left 04:21 kaare_ joined
dalek Heuristic branch merge: pushed 87 commits to roast/S26-WHY by hoelzro 04:25
kudo/S26-WHY: 171dcd4 | (Rob Hoelz)++ | src/core/traits.pm:
Fix documentation for JVM

One should use nqp::atpos to index NQPArrays from Perl 6 land
04:28
hoelzro all spectests are clean 04:37
eh, you know what they say about forgiveness and permission... 04:38
dalek Heuristic branch merge: pushed 88 commits to roast by hoelzro
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 04:47 BenGoldberg left 05:06 ecocode_ joined
sergot hi o/ 05:22
05:25 SamuraiJack joined, [Sno] joined 05:40 gfldex joined 05:46 aborazmeh joined 05:53 anaeem1_ joined 05:55 anaeem1_ left 06:09 gfldex left 06:16 telex left 06:18 telex joined 06:22 mr-foobar joined 06:26 darutoko joined 06:31 aborazmeh left 06:40 kurahaupo joined 06:42 danaj joined 06:43 lizmat joined
lizmat good *, #perl6! 07:04
diakopter good *, lizmat 07:05
also, good **
lizmat got home yesterday and slept 16 hours after that... 07:06
FROGGS_ I wish I had sleep too 07:09
07:12 anaeem1 joined 07:15 Shozan is now known as SHODAN 07:17 anaeem1__ joined 07:18 anaeem1 left 07:27 SamuraiJack left 07:28 brrt joined 07:30 zakharyas joined 08:16 ilogger2 joined, ChanServ sets mode: +v ilogger2 08:18 xdoctor joined, djanatyn joined 08:23 dakkar joined 08:25 kaleem joined 08:26 lestrrat joined
brrt why would the <anon> frame not be JIT-ted yet? 08:27
or is that just the toplevel
timotimo which one?
one of those that have an Entries count of 1? :) 08:28
i wonder why load_setting is entered twice, though
probably depends on what counts as an "enter"
brrt still a lot we can win with JITting it seems 08:29
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)
brrt hmm 08:32
if i'm still going to the austrian perl workshop, i'd like to use that time to do some JIT work
FROGGS_ sure, that's why there is a hackathon :o)
brrt i.e. maybe we could start doing the better-codegen thingy for arithmetic by then
FROGGS_ ideas+motivation+time
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
ccl4.org/~nick/profile-1409128263.29805.html
and ccl4.org/~nick/jitlog-1409128263.29805.txt.gz
timotimo those are surprisingly few bails. 08:34
nwc10 I stress *should*. I reran the build
also, the profiler doesn't seem to record the version of MoarVM it was run on
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
nwc10 but "find a way" is important. bytecode is bytecode - why does MoarVM care what it is?
timotimo oh, this was just --profile-compile? 08:36
08:39 kjs_ joined 08:41 anaeem1_ joined
brrt yeah, i suspected so timotimo :-) 08:42
i want jnthn++'s input on those still
in that i don't want to slow down the interpreter just to make it easier to JIT
nwc10 this was just --profile-compile
er,
I stress *should*. I reran the *same* build
timotimo well, the jit log would still cover the entire run 08:43
08:44 Ven joined 08:45 Sterver joined
Sterver Hi. I have little problem with hashes: WARNINGS: 08:47
Useless use of "," in expression "my $hash = :j(\"Jedna\"), :d(\"Dva\")" in sink
context (line 7)
.... Code is: my $hash = :j("Jedna"), :d("Dva"); ..... What am I doing wrong?Hi. I have little problem with hashes: WARNINGS:
Useless use of "," in expression "my $hash = :j(\"Jedna\"), :d(\"Dva\")" in sink
context (line 7)
.... Code is: my $hash = :j("Jedna"), :d("Dva"); ..... What am I doing wrong?
Hi. I have little problem with hashes: WARNINGS:
Useless use of "," in expression "my $hash = :j(\"Jedna\"), :d(\"Dva\")" in sink
context (line 7)
.... Code is: my $hash = :j("Jedna"), :d("Dva"); ..... What am I doing wrong?Hi. I have little problem with hashes: WARNINGS:
Useless use of "," in expression "my $hash = :j(\"Jedna\"), :d(\"Dva\")" in sink
timotimo (although with my little grep thingie, there is no way to tell how big the frame is that was bailed on 08:48
)
m: my %hash = :j<Jedna>, :d<Dva>;
camelia ( no output )
timotimo if you assign to a $variable, it will not work the way you expect it to 08:49
however, you can try it like this:
m: my $hash = %(:j<Jedna>, :d<Dva>);
camelia ( no output )
FROGGS_ m: my $hash = {:j<Jedna>, :d<Dva>}; # or this
camelia ( no output )
timotimo have another example, hopefully that'll clear it up:
FROGGS_ m: my $hash = {:j<Jedna>, :d<Dva>}; say $hash
camelia rakudo-moar bf1b4d: OUTPUT«{"d" => "Dva", "j" => "Jedna"}␤»
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)␤»
timotimo oh, hah
anyway, what froggs said :)
Sterver oh, thanks :) my $hash = %(:j<Jedna>, :d<Dva>); works well
FROGGS_ Sterver: both will give you an itemized hash, which is what a $ variable implies - a single item 08:51
Sterver ok, thanks 08:52
09:00 fhelmberger joined
Ven where are destructors specced, btw? 09:09
I don't remember even reading about them.
09:10 itz_ joined 09:11 pecastro joined 09:17 itz joined 09:19 itz_ left
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:20
09:21 dg_subrata joined 09:23 Sterver left 09:27 anaeem1_ left, anaeem1_ joined
moritz nine_: what type is $product in p6 land? 09:28
nine_: and where's that repo? 09:29
nine_ moritz: class Perl5Object { has OpaquePointer $.ptr; has PerlInterpreter $.perl5;
moritz: github.com/niner/Inline-Perl5
lizmat_ Ven: there are no built-in destructors in Perl 6 09:30
nine_: cool! perhaps diakopter has some pointers that could be helpful to you 09:31
09:31 SamuraiJack joined
nine_ lizmat_: so how does one release resources on object destruction? 09:31
lizmat you're responsible for resource release yourself 09:32
please note there are some things that will help you with that
specifically LEAVE phasers
{ my $dbh = DBI.connect(...); .... do stuff ... LEAVE $dbh.disconnect }
nine_ So the user would have to do this for every Perl 5 object she uses. Sounds like non-fun. 09:34
moritz in the long run, we have to implement some DESTROYish stuff 09:35
there's no way around it
nine_ I really can't see a way around that either.
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.
lizmat but for internal stuff? Why??
my class A {...}; # why would this need a DESTROY method?
the GC will take care of it 09:37
destruction of objects *is* part of Perl 6
the *timely* part is *not*
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
and many objects do that (database transactions, file handles, sockets, ...) 09:39
lizmat there is something that's specced, but still not fully operational
that would allow you to do:
my $dbh will leave *.disconnect
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
moritz because it passes the responsiblitiy to the caller
lizmat well, technically, a "connect" could push a LEAVE phaser to the scope where the .connect is done
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
this is maybe a premature optimization
huf would that disconnect even if the value isnt gone when you leave the block? (just the variable) 09:42
09:42 dg_subrata left
huf { my $dbh = ...; put_in_some_global_structure($dbh); LEAVE $dbh.disconnect } # what would this do? 09:43
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
lizmat huf: that would disconnect 09:46
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
s: is the P6 version refcounted in the P5 one ?
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.
moritz lizmat: yes, nine_'s example is clearly in the "external resources" example
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.
lizmat ok
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"
lizmat well, before we get anything done in that area, we would need a stable .WHICH in P6 land (on Moar)
*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.
lizmat it still wouldn't be timely
moritz lizmat: and it doesn't need to be 09:51
nine_ lizmat: it doesn't have to be timely at all.
moritz nine_: in general, when you're juggling libraries around, you need position independent code (PIC)
09:51 Alula_ joined
lizmat I hope jnthn will be able to chime in on this soonish 09:51
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').
moritz nine_: there's some unspecced hook for that 09:53
nine_: and my reason for cloning the repo is implementing just that :-)
nine_: want to give me a commit bit? :-)
nine_ moritz: just tell me where I have to click and I'll do anything ;) 09:54
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)
ah, good :-)
eeks, the -fPIC didn't work :(
lizmat nine_: S12:611 09:58
synopsebot Link: perlcabal.org/syn/S12.html#line_611
lizmat but that doesn't seem implemented yet ?
m: Nil.foo
camelia ( no output )
lizmat m: say Nil.foo # this uses some fallback mechanism
camelia rakudo-moar bf1b4d: OUTPUT«Nil␤»
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
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.
moritz nine_: there is
lizmat nine_: it does, but it's only documented by example :-)
moritz nine_: it just needs some small hack
nine_: gimme 15min
10:02 ggoebel111111111 joined
nine_ One of the 8 million features has to work in our favor :) 10:03
lizmat I guess I should write some TODO spec tests for FALLBACK :-) 10:04
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... :-)
nine_ It probably doesn't need much change anyway. 10:07
nwc10 no, not much.
moritz eeks, $*ENV doesn't work in constants 10:09
lizmat %*ENV you mean ?
moritz erm
it might help to spell it correctly
lizmat++
rindolf lizmat: hi, what's up? 10:11
lizmat YAPC::EU fallout ? 10:12
or maybe better phrased: a lot of movement from Perl 5 towards Perl 6
in which YAPC::EU was a catalyst 10:13
moritz victory! 10:17
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 :-)
Ven mrf: welcome aboard :)
moritz nine_: no tests yet, but it works in a small, informal test
mrf nine_ helped considerably with his lightning talk on perl5 compat
OOI what does the := operator do. 10:19
nine_ moritz++ # perfect!
mrf has found there are some very (to his mind) strange operators in perl6 ($^, *, ... etc)
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'
Ven m: my $a = 1; my $b := $a; $a = 42; say $b; # mrf
camelia rakudo-moar bf1b4d: OUTPUT«42␤»
Ven it's binding it 10:20
nine_ moritz: we should probably rename the call method now
sergot tadzik: LWP::UserAgent doesn't provide http auth
Ven mrf: maybe you'd be interested in learnxinyminutes.com/docs/perl6/ :)
moritz mrf: doc.perl6.org/language/containers
sergot tadzik: WWW::Mechanize does
mrf Ven: I have been doing that. They are good but a little jumpy
moritz nine_: or remove it from Perl5Object
Ven mrf: they are good?
mrf Ven: the learnXinY for perl6 are useful 10:21
moritz nine_: but rename $.ptr and $.perl5, or make them private
Ven mrf: well, if something feels too confusing, feel free to PM me, I'll update it accordingly
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
Ven yea, there's quite a lot to learn :)
lizmat moritz: isn't FALLBACK implementation as simple as adding a method FALLBACK to Mu with the proper .add_fallback magic?
nine_ pushed an updated to the README 10:23
moritz lizmat: don't do that
lizmat: the presence of a fallback makes method caches less effective
10:24 Util joined
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
Ven mrf: warrants more explanations, in your opinion?
lizmat moritz: ack, will try that
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:26
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
Ven mrf: noted 10:28
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 :)
huf mrf: 1, 1, are initial values, *+* is like an anonymous sub, the last * means 'inf' :)
mrf so the first *+* is doing 1+1 then 1+2 and so on? 10:30
Ven yep
huf start with 1, 1, generate new elements by running *+*, until you reach * (inf)
mrf so the *+* is instead of writing a recursive sub.
thats.....insanely cool 10:31
Ven :D.
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 }
Ven arnsholt: yes 10:33
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
ven++
huf++
carlin oh the smoke tests haven't been updated in a while :(
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.
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
Ven yes, that's part of the things I don't really address in the tutorial.
mostly because I don't know p5
mrf fair. 10:37
If I find any more I will let you know...or come up with some kind of P6 for the P5 dev
Ven mrf: there's already one, fwiw :)
10:37 spider-mario joined
moritz there's always perlgeek.de/en/article/5-to-6 10:37
huf yeah, there was a series of ... that.
mrf yay comunity :D
moritz contributions to that are always welcome too 10:38
Ven mrf: github.com/adambard/learnxinyminut...e7f061285d :)
mrf Ven++ # making docs clearer :D 10:40
10:40 mberends joined
mrf moritz: noted 10:41
10:41 mj41 joined
mrf Ven: in the fib example is there any reason to use @fib := rather than @fib = 10:41
Ven: justrakudoit.wordpress.com/2010/12/...s-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?
Ven mrf: err, shouldn't be, I think. 10:43
I think it used to be needed for infinite lists (?)
lizmat nine_: yes, that's the idea
masak mrf: binding, because otherwise the assignment will eagerly try to eat the whole thing.
Ven masak: no
lizmat although it doesn't seem to be reflected in ^methods
nine_ lizmat: that's even better than what I was looking for :)
moritz nine_: yes
masak m: my @fib = 0, 1, *+* ... Inf; say "alive"
camelia rakudo-moar bf1b4d: OUTPUT«alive␤»
Ven ;)
masak ok, apparently not. 10:44
Ven assignment isn't eager
masak right.
Ven it's just for the last example
that reuses @fib inside of its declaration, I think
masak is assignment "mostly eager", though?
moritz assignemtn to an array variable is mostly eager
lizmat m: say Nil.foo; say Nil.^methods # does not contain "foo", this is probably a bug
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␤»
moritz that is, it reifies lazy lists, unless they are (potentially) infinite
Ven moritz: point is, it doesn't make a difference here 10:45
lizmat: I distinctly remember the commit "calls on Nil should be Nil", though
10:47 Ven left
mrf Thanks guys you have all been a great help. Back to the docs I go :D 10:48
10:49 _thou joined
masak is it just me or do we have some new people active in here after YAPC::EU? 10:50
nine_ (Conference Driven Development)++
flussence we had a few during too :)
nwc10 masak: it's not just you 10:51
lizmat what can I say? C-Day is coming! 10:53
10:53 _thou left
masak C as in "candy"??? 10:54
"combustion"?
"cranberries"!
nwc10 Cider!
I like cider. I hope that it's cider.
or chcocolate. I like that too
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
masak TimToady: re 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:55
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
camelia rakudo-moar bf1b4d: OUTPUT«-Inf 0␤»
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␤␤»
flussence Range.reverse just flips the endpoints and returns a new range, it looks like.
masak discrimination!
lizmat C can be anything you want :-)
masak boggles
kurahaupo flussence: so how does it get -Inf instead of Inf?
lizmat kurahaupo: a Whatever as the first in range will do that 10:58
nwc10 Coffee!
masak complex numbers! 10:59
lizmat kurahaupo: from the code
multi method new(Whatever $min, $max, :$excludes_min, :$excludes_max) {
nqp::create(self).BUILD(-Inf, $max, $excludes_min, $excludes_max)
}
Maybe C stands for "Easter" :-)
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
masak seems a perfectly cromulent range to me. and a cute smiley.
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
kurahaupo lizmat: and it doesn't negate the "by" step
colomon "by" (which doesn't really exist anymore, does it?) cannot be negative
m: my $a = -Inf..Inf; say $a.bounds 11:02
camelia rakudo-moar bf1b4d: OUTPUT«-Inf Inf␤»
kurahaupo m: my $r = 0..3; $r.reverse.say; # looks a lot like step by -1 to me
camelia rakudo-moar bf1b4d: OUTPUT«3 2 1 0␤»
colomon m: my $r = 0..3; $r.reverse.WHAT.say 11:03
camelia rakudo-moar bf1b4d: OUTPUT«(List)␤»
colomon not a Range anymore
after the call to .reverse
kurahaupo hence -Inf is wrong
11:03 MilkmanDan joined
colomon ???? 11:03
kurahaupo after the call to .reverse
masak 602c0af back in July 2011 (pmichaud++) adds the "not a valid range" constructor. 11:04
I'm gonna rebuild without that error and spectest, just for fun.
colomon m: my $r = *..0; say $r.reverse
flussence m: say (*..0)[*-10]
colomon you can't turn *..0 into a list
camelia rakudo-moar bf1b4d: OUTPUT«(timeout)»
kurahaupo m: my $r=0..*; $r.reverse.WHAT.say;
camelia rakudo-moar bf1b4d: OUTPUT«(Failure)␤»
colomon though perhaps it should fail more gracefully 11:05
flussence m: say (*..0)[^10]
camelia rakudo-moar bf1b4d: OUTPUT«-Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf␤»
flussence seems you can't do much of use with that either way...
sergot m: class A { method new(*%args is copy) { %args<test> = 'test' }; say A.new.perl;
camelia rakudo-moar bf1b4d: OUTPUT«===SORRY!=== Error while compiling /tmp/Cceo5_X4CX␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/Cceo5_X4CX:1␤------> %args<test> = 'test' }; say A.new.perl;⏏<EOL>␤ expecting any of…»
kurahaupo m: my $r=0..*; $r.reverse.max.say;
camelia rakudo-moar bf1b4d: OUTPUT«-Inf␤»
sergot m: class A { method new(*%args is copy) { %args<test> = 'test' }}; say A.new.perl;
camelia rakudo-moar bf1b4d: OUTPUT«"test"␤»
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;
camelia rakudo-moar bf1b4d: OUTPUT«A.new()␤»
masak flussence: you can smartmatch against a range, for example.
sergot m: class A { has $.test; method new(*%args is copy) { %args<test> = 'test'; self.bless(|%args) }}; say A.new.perl;
camelia rakudo-moar bf1b4d: OUTPUT«A.new(test => "test")␤»
flussence oh, good point.
masak flussence: or check its endpoints. all are valid operations.
flussence: also, your argument would also invalidate *..0, which is currently legal.
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)␤»
colomon smartmatching is the entire point of allowing *..0
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
not ok 60 - *..* is illegal
blaming that...
also, pmichaud. Aug 2010, d2b95d7, "[t/spec]: *..* is no longer a valid Range, per S02." 11:10
ok, checking S02 from that era.
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")␤»
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
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.
lizmat masak: well, the fix seems easy enough...
colomon look in the irclogs around Aug 2010, d2b95d7 ?
masak colomon: ooh, good idea. 11:16
masak does so
irclog.perlgeek.de/perl6/2010-08-15#i_2704870 11:17
huh. I find no discussion at all about it. :/ 11:19
ok, here's what we'll do.
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:20
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
11:21 kurahaupo_ joined
lizmat masak: I would simply fix the code and the test 11:21
jnthn Well, the discussion may have been shortly before...
lizmat and reference this discussion here
jnthn What would *..* mean? 11:22
-Inf..Inf?
lizmat yup
jnthn o/
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.
masak jnthn: since *..0 means -Inf..0, I assume *..* would mean -Inf..Inf
11:24 Ven joined
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
lizmat indeed, it only catches the *..* case 11:24
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.
jnthn masak: Well, I'd wait to see if TimToady++ recalls, givne it ws a spec ruling...
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.
Ven m: for *..* { .say; last }
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␤␤»
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
m: for -Inf..Inf { .say; last }
camelia rakudo-moar bf1b4d: OUTPUT«-Inf␤»
masak colomon: I can't think of an argument that would disallow *..* but also allow *..0
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:28 anaeem1_ left
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:30
masak sometimes wishes that kind of error message would tell which types were actually passed 11:32
11:32 anaeem1_ joined
lizmat jnthn: haven't noticed any great changes there :-( 11:32
flussence oh right, those spectest things from last night are still failing for me... gist.github.com/flussence/e0b40c9f9d4934073968 11:35
timotimo masak: me, too :S
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
colomon apologizes for disappearing there, but he had to start Court Jester for his son.
lizmat Files=915, Tests=33099, 183 wallclock secs ( 9.04 usr 3.27 sys + 1141.30 cusr 132.88 csys = 1286.49 CPU)
colomon I suspect the reasoning went something like this:
1) we have to allow 0..* 11:38
2) we should allow *..0 by symmetry
3) but allowing *..* creates more confusion than it does utility 11:39
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 article.gmane.org/gmane.comp.lang.l...eral/58908 - very interesting
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.
sometimes you want a check that'll let any item whatsoever pass
and if you don't have the opportunity to pass True as the smart matcher ...
jnthn nine: Oh wow! :)
nine++
11:42 mberends left
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)
colomon timotimo: but you can still pass -Inf..Inf
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
lizmat jnthn: nine++ 's work is hindered by the fact we cannot have *any* code run just before destruction
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
lizmat he needs that to be able to resolve refcount issues with the P5 interface
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.
jnthn lizmat: If its not timely, how reliable is it? :)
Anyway, it needs VM work... 11:45
nine jnthn: as reliable as garbage collection of any Perl 6 object
jnthn Do we need to provide any kind of thread affinity?
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.
jnthn And added to a queue
And that queue is examined *last*
Ven "don't lock in destructors" -- every c++ guy
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
11:47 ren1us joined
colomon nine: I briefly tried Inline::Perl5 last night, got this in make: 11:47
gcc p5helper.c `perl -MExtUtils::Embed -e ccopts -e ldopts` -shared -o lib/Inline/p5helper.so -fPIC -g
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
Ven (in virtual* destructors, actually.)
jnthn Actually I think you don't even need the bit.
Anyway, basically you just keep the object (and its graph) alive one GC longer
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
hoelzro morning #perl6 11:49
colomon nine: hmmm, I have no clue how to do what with perlbrew
masak Ven: article.gmane.org/gmane.comp.lang.l...eral/58908 -- wow! 11:51
nine colomon: try adding -Dcccdlflags=-fPIC -Duseshrplib to your perlbrew install command line
Ven masak: LuaJIT is incredible. And to say it's mostly the work of only one guy ... 11:52
(well, mostly sponsored work)
colomon nine: trying...
masak m: say Int ~~ Real 11:56
camelia rakudo-moar bf1b4d: OUTPUT«True␤»
hoelzro so, for those of you who haven't noticed, S26 is now merged 11:57
FROGGS_ ohh, wow :o)
hoelzro please keep in mind that if anything unexpected breaks, I am likely at fault
=)
FROGGS_ *g*
hoelzro .oO( I don't know why I'm smiling... )
11:59 prevost joined
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
hoelzro: did you test perl6/doc htmlify.p6?
hoelzro moritz: it's on the list I just started going through =) 12:00
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:03
does that make sense? 12:04
12:05 ren1us2 joined 12:06 raiph joined 12:07 ren1us left
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
would it be possible to throw the offending expression in there somehow?
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 kurahaupo_ left
hoelzro even if it's just a variable, that would be good enough 12:09
lizmat nine: I'm slightly worried about standard Clib calls done both in Moar and Perl 5 12:10
they should both use the re-entrant version
which is what multiplicity=1 takes care of, afaik 12:11
nwc10 might want to correct me there
nwc10 offhand I'm not totally sure
and I'm juggling too much to check, right now
I suspect that multiplicity is going to be needed
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
I'm trying to find Josette a list of Postgresql using firms in the Perl world in Austria
lizmat Josette++ , please say hi to her from us 12:13
nwc10 because, well, act.useperl.at/apw2014/sponsors.html
and ideally we'd like 2ndquadrant.com/en/ on there
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:14
12:14 ggoebel111111111 left
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-linux-thread-multi/CORE/libperl.so'
For what it's worth, 12:16
Inline-Perl5$ perl -v
This is perl 5, version 20, subversion 0 (v5.20.0) built for x86_64-linux
so something is going badly wrong here.
nine colomon: yep, there's still a hard coded path to libperl.so. But moritz++ added support for a P5SO env variable.
colomon ah
nine colomon: this is because libperl.so doesn't seem to be in the ld path usually. 12:17
hoelzro oh, wait, that was just Pod::To::HTML 12:18
working on doc now 12:19
12:19 rurban1 joined 12:20 BizarreCake left
colomon nine: progress! 12:21
nine: t/call.t ................ Can't locate object method "test" via package "main".
hoelzro perl6/doc has a *lot* of undefinedness issues 12:24
nine colomon: that's....weird.
hoelzro slogging through them now... 12:25
colomon nine: I also get a seg fault in t/p5_to_p6.t. And all the tests fail one way or another. 12:26
nine colomon: what's the perlbrew line you used? I'd like to try it here and see if I can reproduce. 12:27
12:28 Ven left
colomon nine: perlbrew install 5.20.0 -Dcccdlflags=-fPIC -Duseshrplib 12:28
nine: that box is running a couple-years-old version of Ubuntu 12:29
hoelzro should I update the code example on perl6advent.wordpress.com/2011/12/1...ng-perl-6/ to be S26 compliant?
lizmat colomon++ nine++ moritz++ # just glad to see all of this happening 12:30
moritz hoelzro: yes pelase 12:32
nine: the problem on debian is that there's no libperl.so, just a libperl.so.5.$MAJOR 12:33
nine I guess making Inline::Perl5 installable is the hard part. Not writing it... 12:34
moritz can floats and strings be marshalled already? 12:35
moritz hasn't tried yet
nine moritz: strings yes. Floats not yet
moritz: floats are only a couple of lines to add though.
moritz nine: would be awesome 12:36
nine I pretty much ported Inline::Python's py2pl.c code to Perl 6 for the marshalling.
moritz nine: also, it would be nice if you made dalek report commits to Inline::Perl5 here; see github.com/perl6/mu/blob/master/mi...k-push.txt for instructions 12:37
12:37 _thou joined
hoelzro moritz: done 12:38
nine moritz: done 12:40
12:40 PotatoGim^Home joined, telex joined
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:40
dalek c: 1a8dfe3 | (Rob Hoelz)++ | / (3 files):
Update .content calls to .contents
12:41
12:41 Rounin left
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:41
hoelzro I'm seeing a bunch of warnings coming from slurp of all places 12:42
12:42 _thou left
hoelzro I'm wondering if the spectest should check warning counts 12:42
moritz nine: the problem is likely that private methods aren't initialized from .new() by default 12:43
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.
moritz nine: that's weird 12:45
nine: can you do a say @args[$i].perl; before the call to p6_to_p5? 12:46
nine moritz: paste.scsys.co.uk/419085 12:47
dalek ecs: 6989f5a | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
Add :max :id to start { }

Inspired by jnthn++'s talk at YAPC::EU about image processing. I felt that the throttling code needed some system support.
12:48
lizmat jnthn: ^^
moritz nine: WTF
nine moritz: I'm at a complete loss. 12:49
dalek kudo/nom: bda84e7 | (Rob Hoelz)++ | src/core/IO.pm:
Perform standard handle check after defined checking $path
PerlJam lizmat++
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:53 anaeem1_ left
dalek line-Perl5: 2c02383 | moritz++ | lib/Inline/Perl5.pm6:
Be more precise in p6_to_p5 signatures

all undefined values should result in undef; the type-specific code only works for defined values, not for the type objects
12:54
nine moritz++ # that's what I was hoping for: someone adding some real knowledge about Perl 6 12:56
dalek kudo/nom: b613f0a | (Tobias Leich)++ | src/core/Buf.pm:
implement Blob.assign_pos
13:00
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
dalek line-Perl5: 7a1d25d | moritz++ | / (2 files):
Better error message for p6 objects that cannot marshalled to p5
13:10
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 line-Perl5: 90fa698 | moritz++ | t/p5_to_p6.t:
avoid warning in t/p5_to_p6.t

is() compares by string, so it is not the best for undefined values
lizmat moritz: maybe we should make "is" smarter ? 13:13
moritz lizmat: nope
lizmat and give it a specific diag message for undefined values ?
dalek kudo/nom: b0e3d6d | (Rob Hoelz)++ | src/core/Pod.pm:
Rename .content to .contents for Pod::Raw
13:14
nine moritz: why not? Perl 5's is compares undefs without warning.
lizmat t would still fail, but without the warning and tell the tester it was undef
moritz nine: p5 has a single undef
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␤»
moritz nine: that makes it easier to derive sane semantics
lizmat: hm, ok, maybe not such a bad idea
lizmat but do we want is() to fail on a comparison with a type object or not ? 13:16
apparently "" eq Str returns true
moritz well, I can think of 4 sensible-ish behaviors:
1) error
2) test that the LHS is undefined too 13:17
3) compare both sides with === if the RHS is undefined
4) test that the LHS is '' in string context
4) is what we do now 13:18
lizmat I'm fine with what 'eq' is doing 13:20
I was talking about is() behaviour
moritz I'm talking about is() 13:21
hoelzro lizmat: I was thinking that is should be smarter as well
moritz maybe 2) from above? 13:22
13:23 Alina-malina joined, guru joined 13:24 guru is now known as Guest96008, Guest96008 is now known as ajr_
hoelzro commute & 13:24
brrt lizmat: interesting slides from YAPC::EU 13:25
i could add another argument to that
i'd argue that the 'other dynamic languages' (php / python / ruby and even js) aren't doing so well as is assumed 13:26
e.g. python is apparantly being moved out of production in google
twitter has all but replaced ruby with java / scala
and even facebook is busy replacing the php interpreter and ultimately the php language with ... stuff of their own design 13:27
my conclusion would be that these languages, much like perl5, are gettin gold
ugh missspace
lizmat :-)
brrt getting old
dalek line-Perl5: f9ca3a0 | moritz++ | t/p6_to_p5.t:
more p6 -> p5 tests
13:28 Alina-malina left
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
and i'd argue that in that respect, perl6 has actually quite good credentials
arnsholt Yeah, scalability is probably a very real reason
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
moritz well, it has gradual typing, which is a better fit than pure dynamic typing
lizmat scalability would be one of Perl 6's forte's
brrt basically the red queen hypothesis for programming languages :-)
arnsholt Yeah, I think gradual typing can be a very real strength
Should let you get a good mix between static guarantees and whip-it--uptitude 13:31
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
flussence came across something interesting while doing random reading: github.com/TestAnything/Specification/ 13:33
brrt we have a spec, and multiple implementations, which is also a big thing these days 13:34
13:36 Alina-malina joined 13:41 Rounin joined 13:42 Alula_ left 13:45 PotatoGim^Home left 13:48 kaleem left 13:54 aborazmeh joined 13:55 Alina-malina left 13:56 Alina-malina joined, Alula_ joined 14:02 aborazmeh left
_sri doesn't think ruby, python and node.js have problems with concurrency... it's just parallelism where they are lacking 14:04
brrt nitpicking much? :-) 14:05
no, that is true-ish
_sri ruby has fibers, python generators, and node.js will be getting async/await through v8 updates
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
brrt i haven't used that 14:07
_sri i'm mostly working in perl5... sooo i'm jealous :S
brrt i have used multiprocessing and threading directly
14:07 kaleem joined
brrt and while these work, they are no better than say, java's threading support 14:07
and people have lots of problems with that
_sri what's the problem with java threading? i see it more as a good primitive for stuff like akka 14:08
14:08 Alula_ left
[Coke] poke 53272,21 14:08
HI THERE 14:09
brrt the problem is that it is low-level and idiosyncratic imho
i.e. all objects are basically locks and condition variables in one 14:10
and the rules for synchronization are ... complex
the fact that you can build stuff like akka on top of it doesn't make it a good basis 14:11
lizmat going back to jnthn++'s second talk at YAPC::EU 14:15
I wonder whether we could need something like Array.remove-first 14:16
14:16 ecocode_ joined
lizmat which would basically splice out the first entry in the array that matches 14:16
14:16 grondilu joined
lizmat using first-index 14:16
I realize from a functional point of view, the grep would be better 14:17
*functional programming
grondilu is looking at www.liz.nl/C-DayIsComingYAPCEU.pdf and loled quite hard when he reached the slides where camelia slowly creeps into the P5 bunker :)
lizmat++
lizmat
.oO( mission accomplished )
14:18
14:19 ggoebel111116 joined
lizmat otoh, maybe an array for keeping which threads are running, may be sub-optimal 14:19
and a hash would be better
brrt hmm
i'm also wondering about sugaring that 14:20
start up-to $number is perhaps possible?
lizmat brrt: github.com/perl6/specs/commit/6989f5a798 14:21
brrt oh, /me likes
i suppose we're to implement that with a queueing thingy 14:22
14:22 Alula_ joined
brrt but then, if you have a threadpool, you have to manage that anyway it seems 14:23
14:24 BizarreCake joined
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:24
colomon: I wonder if a perlbrew perl can even be used for embedding. Maybe I'll try the perlembed examples later on 14:25
14:25 chenryn joined 14:26 _thou joined
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
lizmat to the scheduler :-)
well, that's how I see it implemented anyway
brrt i think it has, though 14:28
lizmat initial implementation would use a hash, keyed to the id 14:29
14:29 xinming joined
lizmat the value would be a lock and an hash with the promises 14:30
or maybe an array... hmmm... still not sure about that
14:30 _thou left
brrt hmm 14:31
i don't know it offhand either 14:32
japhb Is there a way (env var or rakudo command line option perhaps?) to force a concurrent program to run single-threaded? 14:34
14:34 SamuraiJack left
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 )
japhb heh
jnthn More helpfully, you can set $*SCHEDULER to whatever you like
Including forcing it to have a small number - or even just one - worker thread in the pool.
diakopter heh, 0
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?
jnthn Well, if you set $*SCHEDULER = CurrentThreadScheduler; I guess you get foreground-only, at least if we mean the same thing...
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
japhb I was wondering if CurrentThreadScheduler is the same as the pooled scheduler with 1 thread
jnthn No, it's not
japhb Ah, hmmm.
Well, at least that difference might be useful to notice.
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 kjs_ left
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)
jnthn Depends if he main thread will be active or not...
If its just going to set up work and then await, should be OKish 14:40
CurrentThreadScheduler should be harmless with the debugger
14:40 ggoebel111116 left
japhb Ah, so the ThreadPoolScheduler count doesn't include the main thread? I was always including that when calculating maximum threads I needed. 14:40
14:40 Alina-malina left
japhb (Although the first thread on r-j has id ~10 on my system, IIRC) 14:41
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
japhb: In fact, if you create 2 thread pool schedulers with 2 threads each, you'll get 4 in total (+ the main one) 14:43
14:44 _thou joined
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:44
14:45 ggoebel111116 joined
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
lizmat because the XML::LibXML interface is really a hodgepodge of ad-hoc mapping 14:45
in P5... I've always hated working with it 14:46
japhb
.oO( MAP ALL THE AD HOCS! )
lizmat feels to me P6 could use a better interface...
brrt chuckles at the notion of a good interface to xml
jnthn japhb: No, in fact the scheduling is left to be high level code. 14:47
lizmat
.oO( one can dream, can't one? )
jnthn japhb: Custom schedulers are perfectly reasonable things to implement.
japhb: Really, the way to see a scheduler is "something I can give work to that will run it somewhere appropriate"
14:47 ggoebel111116 left
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.
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: github.com/jnthn/perl6-reactive-sa...le.pm6#L43 if you are curious.
japhb: Ah, OK 14:50
Well, GTK::S::S *is* a singleton...
PerlJam .oO( Does japhb have the TPS reports? )
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
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
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.
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/
hoelzro japhb: sure did =)
right after you asked, actually
well, more or less =)
jnthn lizmat: (your spec commit) funnily enough given the thing japhb and I are discussing, the throttling thing should really be a scheduler :P
japhb Yeah, saw the highlight. Unfortunately, by then I was not near IRC 14:53
14:53 ggoebel111116 joined
jnthn japhb: Yes, I hadn't seen the potential for confusion, but it's clearly one. :) 14:53
japhb: Also on my todo list is p6doc content for the concurrency stuff.
lizmat jnthn: so basically create a new scheduler for each id ?
japhb lizmat: Ah, nice
jnthn lizmat: Yeah, the :id thing is really fragile.
hoelzro I had the same thought when I was reading the talk 14:54
japhb er, jnthn: Ah, nice
hoelzro s/talk/talk slides/
japhb (damn fingers, never listening to my brain)
lizmat but I would need to keep a hash with id -> scheduler mapping, no ?
jnthn lizmat: It'll be a delegating scheduler, or decorating, or however you like to think of it.
lizmat: No, the instance would be the ID
14:55 chenryn left
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...
camelia rakudo-moar b0e3d6: OUTPUT«Buf:0x<01 16 03>␤»
jnthn FROGGS: It's fine, though not exhaustive
14:57 chenryn joined
japhb hoelzro: So now that you have merged, can I s:g/'#='/'#|'/ 14:57
FROGGS jnthn: in what way?
japhb ?
hoelzro japhb: yessir
japhb OK, cool beans
hoelzro please test the heck out of the S26 stuff
let's find problems =)
japhb :-)
hoelzro I already know of a few
I should file tickets for them
FROGGS m: #= foo␤sub bar { }␤#| baz␤say &bar.WHY 14:58
camelia rakudo-moar b0e3d6: OUTPUT«(Any)␤»
FROGGS hoelzro: is that syntax correct?
PerlJam FROGGS: you have them flipped
FROGGS ohh
m: #| foo␤sub bar { }␤#= baz␤say &bar.WHY
camelia rakudo-moar b0e3d6: OUTPUT«foo␤baz␤»
FROGGS \o/ 14:59
PerlJam hoelzro++ :)
FROGGS hoelzro++ # yeah
hoelzro =)
japhb
.oO( IT'S ... SO ... AWESOME! )
hoelzro just don't try it on roles with parameters (yet)
FROGGS m: #| foo␤sub bar { }␤#= baz␤say &bar.WHY.perl
camelia rakudo-moar b0e3d6: OUTPUT«Pod::Block::Declarator.new(WHEREFORE => sub bar () { #`(Sub|140227205115736) ... }, config => ().hash, contents => ["foo\nbaz"])␤»
hoelzro that breaks things in a not-so-fun way
I have something that fixes it, but it's encroaching into dodgy territory 15:00
actually, maybe jnthn could sanity check my train of thought
jnthn: right now, if I have a role Foo, and I call Foo.defined, the defined call is dispatched to the pun
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.
hoelzro: Hmmm
hoelzro: Well, there's already .DEFINITE for the "is it a type object"... 15:02
hoelzro: .defined is the higher-level thing
hoelzro ah ha
does .DEFINITE dispatch to the pun?
FROGGS jnthn: I see... I'll leave that open until I hit it in my code
brrt japhb: actually, you could use something like gson
hoelzro I could use that instead
brrt indeed using the standard json libraries it is terribly painful
jnthn hoelzro: It does'nt dispatch cus it ain't a method call :) 15:03
brrt but gson can map it automagically to classes
jnthn It's basically nqp::isconcrete + coerce to Perl 6 bool
hoelzro when I modified punning to dispatch WHY, set_why, and defined directly to Mu for ParametricRoleGroupHOWs, parameterized roles are doc'able
jnthn: oh, great =)
15:06 avs_ joined
brrt much progress, very impress 15:08
15:09 xdoctor left 15:14 jdv79_ joined, jdv79_ is now known as jdv79, jdv79 left 15:17 pmichaud joined
FROGGS /o/ 15:17
15:18 chenryn left, chenryn joined, fhelmberger left, jdv79 joined
lizmat cycling& 15:18
jdv79 what is the * in grep(!*) ?
15:18 fhelmberger joined 15:19 ilbot3 joined
jnthn jdv79: "whatever" 15:19
jdv79 that's what i thought - i need to read up on it. thanks. 15:20
jnthn m: say (1, 2, 3).map(* + 1)
camelia rakudo-moar b0e3d6: OUTPUT«2 3 4␤»
15:20 ashleydev joined
jnthn Forms a closure in many contexts 15:20
15:20 rurban1 left, lestrrat left, apejens left 15:21 fhelmberger left 15:22 rurban1 joined, lestrrat joined, synopsebot joined, diakopter joined, SHODAN joined, mr-foobar joined, noganex joined, bowtie_ joined, awwaiid joined, PerlJam joined, cotto joined, clkao joined, arnsholt joined, mhasch joined, Ulti joined, carlin joined, [Coke] joined, epochbell joined, apejens joined
colomon nine: yeah, I just launched a build of 5.18.1 to see if Inline::Perl5 would work with that one. 15:23
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.
colomon oh, cool!
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 15:24 ajr_ left, guru is now known as ajr_
nine colomon: well it does do exactly the same as the Inline family in Perl 5. 15:24
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
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:26
15:27 donaldh joined
colomon yeah, just looking at the Inline::C docs now 15:27
I may retract my objection to the name. :) 15:28
colomon needs to get back to $work, but will be monitoring this channel / running p6 experiments in the background. 15:29
mj41 lizmat: Hi. Feel free to ask me if you need up-to-date charts. New one here github.com/mj41/Perl6-Analytics-re...opm-prev1/ . I consider this one github.com/mj41/Perl6-Analytics-re...d02t03.png nice. 15:32
15:32 chenryn left 15:38 zoosha joined 15:42 treehug88 left
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:42
15:42 spider-mario left 15:43 ggoebel111116 left 15:45 ggoebel111117 joined 15:47 chenryn joined 15:49 moritz left 15:50 moritz joined
nine colomon: I got it! 15:50
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 15:52 spider-mario joined
dalek line-Perl5: 8db0586 | nine++ | README.md:
Fix documentation wrt perlbrew compilation, need --multi for now
15:54
15:56 prevost left
[Coke] mj41: hey! 15:57
mj41 [Coke]: hi 15:58
15:58 mberends joined
dalek kudo-star-daily: 3a98594 | coke++ | log/ (14 files):
today (automated commit)
16:09
rl6-roast-data: 86b91ae | coke++ | / (6 files):
today (automated commit)
[Coke] rakudo.jvm creeping up to -5- failures..
all in the very flappy S32-io/IO-Societ-IENT
INET
16:10 rurban1 left 16:13 ecocode_ left
Timbus haha *nervously fans shirt collar* uhh pity we will never figure out whose to blame for making that awful module 16:13
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:15
16:20 treehug88 joined 16:37 renormalist joined
nine Can someone tell me what -> \self, |args { $!perl5.call($name, $!ptr, args.list); } does? 16:40
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
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)
nine geekosaur: many thanks! 16:47
geekosaur: many thanks! 16:50
[Coke] FROGGS: why the extra check only on !parrot on Blob.assign_pos ? 16:51
16:52 kurahaupo joined
BizarreCake japhb: I added the -e and --version options. 16:52
16:53 pecastro left, colomon joined
colomon nine: also, still doesn't work for me. :( 16:53
nine colomon: still the same error? 16:56
17:00 chenryn left
dalek line-Perl5/transparent_method_call_regression: de16799 | nine++ | t/call.t:
Tests demonstrating a failure to call methods on P5 objects

Chaining method calls on objects returned by $i.call works, but saving the object into a variable and calling methods on that fails with add_fallback trying to add a fallback for "call". Seels like $!perl5 is a Perl5Object instead of a PerlInterpreter in this case.
Can be fixed by making all Perl5Object attributes public and removing the BUILD method.
17:00
17:00 chenryn joined
nine moritz: I managed to write a failing test with only inline Perl 5. 17:00
17:01 kjs_ joined
FROGGS [Coke]: no idea, the code is stolen from Array.pm or so 17:02
[Coke]: err, there also is an !parrot switch
colomon nine: gist.github.com/colomon/ffb6814a3e64d7609f90
[Coke] FROGGS: meh. ok. 17:03
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:04
17:05 chenryn left
colomon nine: pretty sure 17:07
17:08 kjs_ left
dalek kudo/nom: cb1d0e3 | TimToady++ | lib/Test.pm:
Say what you expected before you say what you got!

Expectations happen before the operation, what you got happens as a result of the operation. Saying them in the wrong order has bugged me for years, but for some mystical reason I'm usually distracted by some other bug when I see a test failure, and keep forgetting to fix this.
17:08
[Coke] did you test the test test suite? :P 17:09
.seen petdance
yoleaux I haven't seen petdance around.
[Coke] .seen alester 17:10
yoleaux I haven't seen alester around.
17:10 chenryn joined
TimToady I tested a test, and now I'm testing the test suite :) I expect it will work :) 17:10
17:10 mattp_ joined 17:11 tgt joined, donaldh left, kurahaupo left 17:13 zakharyas joined 17:15 MilkmanDan left 17:16 chenryn left, chenryn joined 17:17 kurahaupo joined
dalek ast: 191d550 | coke++ | S04-declarations/constant.t:
Add a test for RT #122604
17:18
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122604
17:18 chenryn left
TimToady actually, doesn't have to be fib...0..* will do 17:19
and will run faster
dalek line-Perl5: a3bb367 | nine++ | / (3 files):
Access libperl.so only through p5helper.so

Avoids having to use a hard coded path to libperl.so or an environment variable. Also works now with Perls that have multiplicity enabled or disabled because we use the proper macros now for everything.
Makes Inline::Perl5 much simpler to use.
nine colomon: please test with this commit ^^
17:20 MilkmanDan joined
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!
nine colomon: $P5SO is history, too.
colomon: wow, that was fast!
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' ~~ /<[]>/;
camelia rakudo-moar b0e3d6: OUTPUT«===SORRY!===␤Iteration past end of iterator␤»
colomon ooo, does work with P5SO!
17:23 ajr_ left, araujo joined
[Coke] m: if 42, 44, 22 -> *@a { say @a.perl } 17:25
camelia rakudo-moar b0e3d6: OUTPUT«Array.new()␤»
[Coke] n: if 42, 44, 22 -> *@a { say @a.perl }
camelia niecza v24-109-g48a8de3: OUTPUT«(42, 44, 22)␤»
17:26 dakkar left
Juerd The physical machine underneath feather[123] has suffered a double hard disk crash 17:28
(raid 6)
dalek ast: 94e9ccb | TimToady++ | S04-declarations/constant.t:
faster to test the .[100000] bug with ..

And works just well to flush the bug.
diakopter Juerd: uh oh 17:29
Juerd Please refrain from doing anything IO-heavy the next few days as the array rebuilds
Double degraded is **slow**
I may have to kill feather1 if it's used for heavy stuff anyway.
I've stopped cron
[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
That's why I replaced it an hour ago. During resynchronisation, another disk failed.
[Coke] urk
PerlJam :( 17:31
[Coke] don't touch anything else! :)
Juerd Don't touch anything on feather that may cause more than a line written to a log file :P
TimToady yeah, looked like disk from all the D states [Coke]++ saw
Juerd What are "D states"? 17:32
TimToady wait states indicated by ps or top
Juerd Oh, those
[Coke] when we build c files in rakudo-parrot, are we using the same flags parrot setup for compiling?
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
IIRC there's a program called parrot-config or some such we get it from 17:34
Incidentally that's why there are so many warnings when compiling on Parrot. It enables a lot of warnings 17:35
17:35 Ven joined
PerlJam does recompiling rakudo count as IO-heavy? 17:35
Juerd Yes, almost anything does.
I want to keep the box running because people rely on it for irc
PerlJam yeah, about all i do on feather is IRC. 17:36
Juerd RAID rebuid will take another 950 minutes.
PerlJam I was wondering because I thought camelia or something might be on feather3
Juerd (under current load)
feather[1-3] run on the same box
diakopter camelia's not on feather, last I knew
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
950 minutes is acceptable. The first indication was over 5000 minutes. That wasn't something I could accept. :)
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.
md3 : active raid6 sdf6[5] sda6[6](F) sde6[7](F) sdd6[3] sdc6[2] sdb6[1] 17:39
2094723072 blocks level 6, 64k chunk, algorithm 2 [5/3] [_UUU_]
[>....................] recovery = 4.2% (29602304/698241024) finish=1654.2min speed=6736K/sec
Meh.
diakopter has it been slowing down or speeding up or neither 17:40
sometimes they slow down greatly
Juerd Overall, it's been speeding up.
PerlJam I bet the last bit goes fairly fast.
:)
Juerd But when one of the VMs does anything, it's reflected in the "finish" ETA, like in the paste
Random access IO really kills the sequential IO performance 17:41
And the 14 MB/s it gets sequentially isn't really fast to begin with.
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
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
PerlJam Just migrate the live VMs off to that spare machine you have lying around and it's no problem ;)
Juerd nine: Yes, and the longer it takes, the more out of date (datetime, really :P) the backups will be.
PerlJam: Migration will definitely kill whatever's remaining, because that would also require reading from the double degraded array. 17:44
nine Juerd: very nice tips: www.cyberciti.biz/tips/linux-raid-i...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.
Ah, that answers that :) 17:46
Oh, no, it doesn't :)
nine: Wow, the NCQ one really helped. 17:48
I don't even understand why it helps. I thought NCQ made things faster :) 17:49
[=>...................] recovery = 5.6% (39228696/698241024) finish=321.4min speed=34172K/sec
PerlJam nine++
hoelzro m: role R[::T] {} ; say(R)
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…»
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:50
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:51
diakopter hoelzro: replace the T with what replaces it? 17:53
oh you mean the generic one
hoelzro yeah
diakopter the stringification in MSIL/CIL just puts a comma 17:54
17:54 Ven left
diakopter er no 17:55
it appends `X where X is the arity of paramters
parameters
stackoverflow.com/questions/1482160...nerictypen
.. as if that helps.
I don't know how it expresses constraints on parameters 17:56
hoelzro yeah, I'm not exactly sure what the output should look like 17:57
just that it shouldn't throw an exception =)
17:59 kjs_ joined 18:02 gfldex joined 18:07 BizarreCake left 18:08 molaf__ joined
flussence Juerd: ...what's the kernel version on that server? 18:10
because - lwn.net/Articles/608896/
Juerd 2.6.32 :( 18:11
18:14 telex left
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
18:14 telex joined
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...
(definitely needs a fsck after it's done though) 18:16
Juerd Yeah, that's going to take a long time too, with downtime.
But let's first resync. Twice. :(
flussence :( 18:17
18:18 [Sno] joined 18:24 zacts joined
zacts hi #perl6 18:24
PerlJam zacts: greetings 18:25
18:31 Ven joined 18:35 kst joined 18:36 kaleem left 18:39 Rotwang joined 18:42 zakharyas left 18:43 kjs_ left 18:46 ggoebel111117 left 18:52 Ven left 18:53 ggoebel111116 joined 18:59 Ven joined 19:07 firefish5000 joined
tadzik diakopter! \o/ 19:15
19:16 brrt joined
tadzik zacts! \o/ 19:23
tadzik in the far end of Bulgaria
19:24 guru joined, guru is now known as Guest42916, Guest42916 is now known as ajr_ 19:28 ecocode_ joined
timotimo so much backscroll ... 19:29
nine tadzik: having fun? 19:30
tadzik nine: oh indeed
nine: the hotel owner said "staying for one night only? I have to convince you otherwise"
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
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
19:32 jack_rabbit_ joined
tadzik and I thought this place is going to suck because booking.com doesn't list any great hotels nearby.. o_0 19:32
flussence
.oO( maybe that's why they're always hiring )
19:33
tadzik they should send someone to go and have a drinkup with this corner of the world 19:34
nine tadzik: sounds like you were a little lucky there ;) 19:36
tadzik possible :) 19:39
19:42 ggoebel111116 left 19:45 mj41 left 19:49 ggoebel111116 joined 19:52 Ovid joined, Ovid is now known as Guest8704
Guest8704 is there an equivalent to ‘perldoc -f’ for Perl 6? 19:52
19:52 Guest8704 is now known as Ovidius 19:53 Ovidius is now known as curtispoe
curtispoe In particular, I was wondering if say should default to using $_? 19:53
FROGGS std: say
camelia std ee1ef48: OUTPUT«===SORRY!===␤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:␤------> say⏏<EOL>␤Check failed␤FAILED 00:01 120m␤» 19:54
curtispoe Cheers.
perl6: say $_ if $_.is-prime for 1..10; 19:55
FROGGS there is no perldoc -f sadly, only this: doc.perl6.org/routine/say
which is not very helpful here
camelia rakudo-{parrot,jvm,moar} cb1d0e, niecza v24-109-g48a8de3: OUTPUT«2␤3␤5␤7␤»
curtispoe That prints four blanks lines for me, but changing that to .say works.
FROGGS yes, a bare say in rakudo should explode like std does
curtispoe Should explode like std does? I don’t know what that means. 19:56
I just installed perl6 with rakudobrew and in the REPL, it ran without exceptions, but had four blank lines.
I don’t want to file a bug because I don’t know what I should expect here :)
FROGGS std: say # that is what rakudo should do 19:57
camelia std ee1ef48: OUTPUT«===SORRY!===␤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:␤------> say⏏ # that is what rakudo should do␤Check failed␤FAIL…»
FROGGS m: say # but it does not, which is a bug
camelia rakudo-moar cb1d0e: OUTPUT«␤»
FROGGS filed it as RT #122630 19:59
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122630
curtispoe Thank you!
FROGGS you're welcome :o)
20:00 ggoebel111117 joined
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:00
20:03 ggoebel111116 left
FROGGS curtispoe: like this? jnthn.net/papers/2014-yapceu-async.pdf#page=26 20:03
curtispoe Never mind. I recreated it.
Heh.
20:04 kjs_ joined
raiph fyi re: p6doc -f: "experimental -f support for methods if index.data exists" irclog.perlgeek.de/perl6/2014-08-02#i_9123593 20:12
FROGGS ahh, nice 20:13
that is shipped with rakudo star me thinks
20:13 anaeem1_ joined
raiph FROGGS: commit was 25 days ago 20:14
FROGGS raiph: thank you 20:15
20:16 colomon left
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)
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:25
FROGGS curtispoe: I think you'd have to ask jnthn or lizmat for that 20:26
curtispoe OK. Cheers. 20:27
lizmat curtispoe: the threads that are spawned by "start" are taken down when the main thread exits 20:35
what you want is to wait for the promises to be kept
await do for ... { start { ... } }
will do that
curtispoe lizmat: does that mean that we might be partway through updating a database and get a rollback if we didn’t wait?
brrt m: nqp::mod_i(4, 0); # this is now fixed 20:36
camelia rakudo-moar cb1d0e: OUTPUT«(signal )»
lizmat yes, at the moment that is so
brrt afk
20:36 brrt left
curtispoe lizmat: I had the “await do …” bit, but I wanted to see what happened if I left it out :) 20:36
lizmat ok
curtispoe Does that mean that normal “end of scope” semantics kick in? (Filehandles closed, for example)
lizmat this is the same as ithreads in Perl 5, btw
curtispoe OK
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 ecocode_ left
lizmat Ven: the URL's were posted on #perl6 20:37
20:37 ecocode_ joined
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)
there is a LEAVE phaser
curtispoe Oh, that’s interesting. I keep forgetting that terminology is different.
lizmat which terminology ? 20:39
FROGGS we do not have DESTROY (yet?) because we don't have a refcounted GC
PerlJam lizmat: "phaser" probably.
lizmat ah, ok :-)
FROGGS gnight 20:41
lizmat gnight FROGGS
curtispoe Yes, I the “phaser” terminology stunned me for a minute.
curtispoe will show himself out.
PerlJam FROGGS: sleep well! :)
20:41 colomon joined
PerlJam curtispoe: you keep punning like that and you won't be able to leave :) 20:42
20:42 ecocode_ left
curtispoe I keep punning like that and my wife will tell me stay here. 20:42
Is there a Perl 6 equivalent to __END__? 20:43
PerlJam curtispoe: sorta. It's done through POD now 20:44
curtispoe OK
hoelzro curtispoe: =begin finish
20:45 rurban joined
curtispoe Except that as soon as I add that to a program, it hangs! 20:46
hoelzro wonders if that's his fault
PerlJam hoelzro: probably :)
curtispoe I grabbed the code from learnxinyminutes.com/docs/perl6/
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;
If I simply delete all code after that, it runs fine.
colomon curtispoe: which version of rakudo are you using?
curtispoe $ perl6 -v
This is perl6 version 2014.08-120-gbf1b4db built on MoarVM version 2014.08-36-g7938703
20:47 Rotwang left
hoelzro m: say 'hi';␤=begin finish␤␤The End␤␤=end finish 20:48
camelia rakudo-moar cb1d0e: OUTPUT«hi␤»
curtispoe What’s the preferred past solution here?
s/past/paste/ 20:49
colomon gist.github.com
hoelzro curtispoe: I don't know if there is one; I prefer gists
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
which just includes my changes from this morning (my morning, that is)
colomon oh, never mind, read the git SHAs wrong
curtispoe gist.github.com/Ovid/8fd431ae2f047c5fb7f0 20:51
colomon hoelzro: I'll turn this back over to you, then. ;)
hoelzro oh my
that's quite a lot of code
curtispoe Line 220 is where I entered the POD. I took it from learnxinyminutes.com/docs/perl6/
I wanted to include that in a blog entry, but it has a few problems :)
I’ll try to create a smaller test case. 20:52
OK, I have a much smaller test case. Waiting for a bit to see if it finishes.
hoelzro I wonder if it's the absence of =end finish? 20:53
m: say 'hi';␤=begin finish␤␤The End␤
camelia rakudo-moar cb1d0e: OUTPUT«(timeout)»
hoelzro seems to be
curtispoe Take a look at it now. Deleting the =begin finish line makes it work. 20:54
20:54 rurban1 joined, rurban1 left
curtispoe Can anyone replicate this? 20:55
hoelzro I didn't mess with any of the =begin/=end stuff with my work
curtispoe: yes
unfortunately, quite easily
curtispoe Awesome.
hoelzro well, somewhat fortunately =)
hoelzro files rakudobug
curtispoe (Well, awesome that it’s not just me) :)
hoelzro++
hoelzro I'll file the bug and forward it to my home machine 20:56
it's 16:00 by me, so it'll be a few hours before I can really take a look 20:57
bwah
=begin finish isn't even in roast!
curtispoe That’s two bugs in one quick session. That’s going to throw a kink in my writeup.
hoelzro =(
well, at least we're finding them =)
curtispoe++ # finding bugs
curtispoe Yes :)
hoelzro huh, I can't assign it to myself 20:59
21:02 Ven left
curtispoe File another bug then :) 21:02
hoelzro heh =
=)
curtispoe: what was the other bug you found? 21:04
curtispoe rt.perl.org//Public/Bug/Display.html?id=122630 21:05
I found that with the REPL when I wrote “say if $_.is-prime for 1..10”
hoelzro wow, I'm shocked at that 21:06
curtispoe: wanna learn how to fix it? =)
curtispoe I should have been .say, but instead it printed four blank lines instead of throwing an exception.
Sure :)
curtispoe is just glad he’ll never touch PASM again ;)
lizmat I seem to recall that the REPL overloads say
hoelzro curtispoe: well, say is implemented in src/core/IO.pm 21:07
21:07 kjs_ left
hoelzro I'm guessing it's a multi method, so it *should* simply be a matter of implementing an argless candidate 21:07
lizmat: oh, really?
21:07 Ven joined
hoelzro it prints nothing for me sans REPL 21:08
lizmat hmmm... indeed
curtispoe blogs.perl.org/users/ovid/2014/08/t...rency.html 21:09
21:09 kjs_ joined
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?
hoelzro curtispoe++ # blog post 21:11
yes
curtispoe Yeah, that last line of the blog post will cause me some grief with some folks, I think :)
hoelzro curtispoe: let me know if you end up porting that web framework; I'm very interested in such a development =)
TimToady std: say if $_.is-prime for 1..10 21:12
camelia std ee1ef48: OUTPUT«===SORRY!===␤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:␤------> say⏏ if $_.is-prime for 1..10␤Check failed␤FAILED 00:0…»
TimToady someone should port over that error to rakudo
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.
lizmat has a memory of doing just that
TimToady
.oO(killing?)
PerlJam I thought rakudo already had that one
hoelzro TimToady: I'm trying to get curtispoe to do it =) 21:13
21:13 SamuraiJack joined
TimToady m: say if $_.is-prime for 1..10 21:13
camelia rakudo-moar cb1d0e: OUTPUT«␤␤␤␤»
itz Method content (from Pod::Block) called at: lib/Pod/To/SectionFilter.pm, lines 5,9
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 ;)
itz Please use Pod::Block.contents instead.
curtispoe (Dear NSA: I’m kidding)
hoelzro curtispoe: fair enough. I would like to work on such a thing myself, but ENOTIME
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
curtispoe Heh
night, lizmat.
hoelzro itz: yes, .content is deprecated
o/ lizmat
lizmat if nobody has ported the bare say to be up to spec, I'll do it tomorrow
sleep&
TimToady lizmat++, curtispoe++
21:16 colomon left
hoelzro curtispoe: regarding the method/sub nature of say, you only have to worry about the sub version 21:16
curtispoe OK
hoelzro since the thing to print for a method is obvious as the invocant
21:16 kjs_ left
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
(Note the lack of args)
hoelzro curtispoe: jnthn's notes from last year's workshop are a good source 21:21
curtispoe: by "it", do you mean src/core/IO.pm?
curtispoe Yes, I meant src/core/IO.pm, sorry.
hoelzro no @*WORRIES
;)
you probably don't have to worry about NQP for this patch 21:22
hmm...I could've sworn sorry() was a builtin 21:23
curtispoe: here's the aforementioned material on NQP: 6guts.wordpress.com/2013/09/17/mate...ls-course/ 21:24
curtispoe Thanks!
nine curtispoe: until you ported that web framework, I'll be working on using the existing ones ;) github.com/niner/Inline-Perl5
hoelzro curtispoe: np
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
curtispoe Ah, the pingback, I suspect.
Perl 6 definitely needs: “hacking on Rakudo” and a “Perl 6 quickstart”. 21:26
Or I just need to find those :)
21:27 gfldex left
TimToady 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 =)
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
it's very...new...still
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.
Ven it's not meant to. 21:32
There should be several infinite loops in it
curtispoe Ven: Yeah, I tried to run the whole file. Silly me.
I am not a clever man.
Ven not what I'm saying. I just wonder what it should be meant to produce?
did you expect some kind of meaningful output?
curtispoe I wanted to see what it would do. I was very impressed with the error messages! 21:33
(seriously) 21:34
21:34 SamuraiJack left
Ven for example, the redeclaration errors will never get fixed. 21:35
the "variable $condition is undef
" looks good to me. No reason to make that file runnable, tbh...
I might try doing something about it tho
TimToady put an exit as the first statement, and put everything else in an EVAL :) 21:36
21:38 ggoebel111117 left
Ven TimToady: hey, I have some self-respect 21:40
21:44 ggoebel111117 joined
[Coke] FROGGS: that's a duplicate of 72844. 21:44
hoelzro [Coke]: are you one of the RT groundskeepers? 21:45
[Coke] yup.
Closing 122630 as a dup.
er, merging it.
hoelzro [Coke]: would you mind giving me the ability to assign tickets to myself? 21:46
21:46 BenGoldberg joined
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?
... ah, i'll do both.
hoelzro heh, ok 21:47
[Coke] one of your accounts already had access. now both do.
hoelzro \o/
thanks [Coke]
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
hoelzro I say this as one of the stewards of said file =/ 22:01
Ven hoelzro: I know you do :P
hoelzro: which one would be better for vim? 22:04
Ven switched to emacs and evil-mode...
hoelzro Ven: unfortunately, I think that's the best one we have for Vim =(
making it better is on my long TODO list
22:04 ajr_ left 22:09 Ven left 22:12 kjs_ joined 22:18 kjs_ left 22:19 FROGGS joined 22:25 Ven joined 22:30 tgt left
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
22:31 Psyche^_ joined
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
huf doesnt such a thing already exist?
wasnt there some kind of syntax checker written in p5? 22:41
22:42 treehug88 left
hoelzro huf: are you thinking of std? 22:43
arnsholt Extracting the statically available information should be doable 22:45
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 anaeem1_ left
arnsholt vim.p6, definitely, I think =) 22:48
TimToady has considered that question himownself...
22:48 spider-mario left
flussence
.oO( actually, one of p6's selling points is that you can read its code without syntax highlighting... )
22:48
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 22:58 xragnar_ joined, xragnar_ is now known as xragnar, colomon joined
dalek ecs: ed80b33 | TimToady++ | S03-operators.pod:
spec jittability of div_i
22:58
23:00 Ven left
dalek kudo/nom: 98c32aa | TimToady++ | src/core/Int.pm:
div and % throw for division by 0 on native int

When used on native integer types, div and % need to be very fast and jittable. Returning failure interferes with this, so for these low-level ops, we rely on the hardware to throw an exception. Use something higher-level if you want higher-level semantics.
23:04
ab5tract i have a question about passing lists of lists 23:05
dalek kudo/nom: 0124507 | TimToady++ | src/core/Int.pm:
declare that div(int,int) returns int
23:06
ab5tract sub say_a_list( *@list ) { @list.map.perl.say };
how can i pass lists such that say_a_list( @a, @b ); # ... , @j, @k. ... 23:08
TimToady declare int **@list to get LoL semantics 23:09
s/int/it/
ab5tract :D 23:10
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:11
TimToady why not just use sets? 23:12
ab5tract oops, this is #perl6, not a repl
no reason not to
bags are awesome 23:13
but i'm still exploring the basics of perl 6
so doing it in a handrolled fashion seemed like a fun exercise 23:14
TimToady m: say <a b c> (^) <b c d> 23:15
camelia rakudo-moar cb1d0e: OUTPUT«set(a, d)␤»
TimToady what, having fun!?! that's not allowed...
ab5tract :D :D 23:16
TimToady m: say <a b c> ⊖ <b c d>
camelia rakudo-moar cb1d0e: OUTPUT«set(a, d)␤»
ab5tract it's nice to get that kind of response when asking "what's the colloquil phrasing of a basic list operation" 23:18
very perl-ish 23:21
i'm having a failure of imagination with making it work with an arbitrary a list of lists though 23:26
m: <1 4 2 4 54 5 2 -1> (^) ( <24 5 -21 244 53 > (^) <24 -1 4> ) 23:27
camelia ( no output )
ab5tract m: say <1 4 2 4 54 5 2 -1> (^) ( <24 5 -21 244 53 > (^) <24 -1 4> )
camelia rakudo-moar cb1d0e: OUTPUT«set(1, 2, 54, -21, 244, 53)␤»
23:27 cognome joined
ab5tract m: <1 4 2 4 54 5 2 -1> (^) ( <24 5 -21 244 53 > (^) <24 -1> ) 23:32
camelia ( no output )
23:32 _thou left
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 cognome left
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␤␤»
TimToady hmm, that shouldn't happen
ab5tract ah :)
TimToady ooh, there's another one of those got/expected things 23:33
should say "expected 2 but got 3"
but should generally come before the adversative 23:34
23:34 cognome joined
TimToady I wanted to go to the park but it rained. # OK 23:35
It rained but I wanted to go to the park. # NOT SO MUCH
ab5tract indeed 23:36
but now i am confused
is (^) also supposed to handle 3 ( or more )>
23:37 Ven joined
ab5tract s/>/?/ 23:37
BenGoldberg m: say [R,] 1..4;
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␤␤»
BenGoldberg m: say [R+^] 1..4;
camelia rakudo-moar 012450: OUTPUT«4␤»
BenGoldberg m: (1 ^ 2 ^ 3).say; 23:38
camelia rakudo-moar 012450: OUTPUT«one(1, 2, 3)␤»
BenGoldberg m: (1 R^ 2 R^ 3).say;
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␤␤»
ab5tract because it also seemed natural to use parantheses, if slightly less perl-ish ;) 23:39
BenGoldberg: what does the R mean in this context? 23:40
BenGoldberg R is a meta-operator, which produces a new operator with reversed arguments. 23:41
m: say (1 / 3); say (1 R/ 3);
camelia rakudo-moar 012450: OUTPUT«0.333333␤3␤»
BenGoldberg m: say (1 - 3); say (1 R- 3);
camelia rakudo-moar 012450: OUTPUT«-2␤2␤»
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
so just a bug
23:46 Ven left
TimToady looks like union and intersection were rewritten to be listy, but not some of the others 23:48
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
ab5tract i'm imagining it has something to do with the [+^] syntax i saw BenGoldberg using 23:51
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>
camelia rakudo-moar 012450: OUTPUT«set(1, 2, 54, -21, 244, 53)␤»
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:54
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␤␤»
ab5tract so, same bug, but there's my answer i guess :)
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>)
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␤␤»