Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-11-13

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:06 timotimo not 100% sure why nqp-jvm explodes there
00:06 timotimo nqp: say("i'm fine");
00:06 camelia nqp-{moarvm,parrot}: OUTPUT«i'm fine␤»
00:06 camelia ..nqp-jvm: OUTPUT«(signal ABRT)»
00:06 timotimo that might explain it :)
00:07 ugexe ha timotimo++
00:31 kjs_ joined #perl6
00:31 BenGoldberg joined #perl6
00:45 timotimo a frame with 8 set instructions and 6 "actual" instructions
00:47 cognominal joined #perl6
00:52 thou joined #perl6
01:01 timotimo https://gist.github.com/timo/85052abeab6aa330ff0c
01:13 anaeem1 joined #perl6
01:15 lizmat joined #perl6
01:16 [Tux] joined #perl6
01:16 japhb Can you alias a class during import?  (Can you say 'use Some::Really::Long::Class::Name as Foo;' or somesuch?)
01:16 woolfy joined #perl6
01:18 timotimo you should be able to
01:18 * timotimo has never done "advanced" uses
01:18 awwaiid joined #perl6
01:18 timotimo i think you can use import after a use to alias something like that
01:18 timotimo well, "alias" in scare quotes
01:20 anaeem1 joined #perl6
01:21 jfredett joined #perl6
01:25 davido___ joined #perl6
01:46 ugexe re: hash keys; is it intended that all keys are stringified? or should the key's type be checked so the appropriate unbox_ can be applied to it?
01:49 timotimo are you talking about nqp or perl6?
01:51 ugexe rakudo/src/core/Hash.pm, so that its not neccesary to use ~ on hash keys in certain situations
01:51 timotimo you can define your hash to have Any keys instead of Str
01:51 timotimo then you'll have object keys
01:51 timotimo that will not get stringified for you
01:51 timotimo https://gist.github.com/timo/e879a950bea3d4c2340e ← you've gotta love our code-gen
01:55 ugexe rather i want to use an Int as a hashkey so i want it stringified. i can do that explicitly with %h{~$someInt} but was wondering if thats how it should be done or if automatic stringification was NYI
01:56 timotimo er
01:56 ugexe well, for exists_key, delete_key
01:56 timotimo automatic stringification should happen
01:56 timotimo oh
01:56 ugexe sorry i meant for those
01:56 timotimo exists_key and delete_key are "internal"
01:56 timotimo and they expect you've done all the work already
01:57 ugexe right on
01:58 timotimo japhb: are you still here? :)
02:08 chenryn joined #perl6
02:11 ab5tract joined #perl6
02:13 xinming_ joined #perl6
02:15 dalek nqp: 005b2f3 | ugexe++ | docs/ops.markdown:
02:15 dalek nqp: Document ops.markdown cleanup; ambigious two/to
02:15 dalek nqp:
02:15 dalek nqp: Fixes statements that could be interpreted multiple ways. i.e.:
02:15 dalek nqp:
02:15 dalek nqp: Return non-zero if $l is greater than or equal two $r. ('two' should be 'to' for equals-to, not 2 for 2*$r)
02:15 dalek nqp: Return non-zero if $l is greater than two $r. ('two' left in from c&p?)
02:15 dalek nqp: review: https://github.com/perl6/nqp/commit/005b2f3a64
02:15 dalek nqp: 1e8c67e | jimmy++ | docs/ops.markdown:
02:15 dalek nqp: Merge pull request #201 from ugexe/patch-1
02:15 dalek nqp:
02:15 dalek nqp: Document ops.markdown cleanup; ambigious two/to
02:15 dalek nqp: review: https://github.com/perl6/nqp/commit/1e8c67e1cd
02:22 dj_goku timotimo: you around?
02:26 timotimo yup, hey
02:27 dj_goku timotimo: so you wrote the gtk-simple bindings. I think I want to try that for qt, but have no idea where to start.
02:28 KCL joined #perl6
02:34 wolv- joined #perl6
02:34 kjs_ joined #perl6
02:36 timotimo oh
02:36 timotimo well, building bindings for a C++ library is about 20000000000 times harder
02:36 timotimo but if you do build qt bindings, i'll happily use them :)
02:36 tinyblak joined #perl6
02:36 timotimo because i like qt a lot more than i do gtk
02:37 timotimo there's something called SMOKE
02:38 dj_goku I don't even know where to start.
02:38 timotimo it's basically a C API with which you can get information about classes, methods, ...
02:39 kaare_ joined #perl6
02:39 timotimo well, i've wanted to start building a qt binding for perl6 a swell
02:39 timotimo and i didn't get anywhere at all
02:41 timotimo i don't want to discourage you ... but starting with a C++ binding when there is no "prior art" is a big challenge
02:41 anaeem1 joined #perl6
02:42 BenGoldberg It seems to me, the place to start would be find a way to do C++ bindings :)
02:45 timotimo well ... yeah
02:45 timotimo there's lots of binding generators out there
02:45 timotimo SWIG and shiboken come to mind
02:45 timotimo in python space alone there's like four different ones
02:45 timotimo SWIG, Boost::Python, shiboken and SIP
02:45 BenGoldberg What's used for binding qt to perl5?
02:45 timotimo SMOKE
02:45 timotimo i'll be AFK for a bit
02:54 anaeem1 joined #perl6
02:54 yeahnoob joined #perl6
02:57 dj_goku is there a binding for qt anymore for perl5? qt4 is the last binding I could find.
02:57 dj_goku KDE has perl5 qt bindings, but nothing for the general public.
03:07 anaeem1 joined #perl6
03:17 tinyblak joined #perl6
03:25 dj_goku this might sounds kind of weird. but could you write a C binding them just use the C binding?!
03:25 dj_goku sounds like something like inception.
03:27 dj_goku found this: http://irclog.perlgeek.de/perl6/2013-10-23
03:27 dj_goku with bits of C++ comments.
03:50 tinyblak joined #perl6
03:51 timotimo dj_goku: building a C API around a C++ api is how most (if not all) c++ binding generator approaches work
03:56 * timotimo is off
04:00 ab5tract joined #perl6
04:00 dj_goku timotimo: interesting. I think for now I'll just write tests for perl6 rosettacode.
04:02 adu joined #perl6
04:04 rmgk_ joined #perl6
04:09 Juerd_ joined #perl6
04:09 clkao_ joined #perl6
04:10 kst` joined #perl6
04:11 ugexe_ joined #perl6
04:11 sorear joined #perl6
04:12 erdic_ joined #perl6
04:12 Tekk_` joined #perl6
04:12 ChoHag joined #perl6
04:12 Tekk_` joined #perl6
04:12 _sri joined #perl6
04:12 salv0 joined #perl6
04:14 anaeem1_ joined #perl6
04:14 telex joined #perl6
04:15 anaeem1_ joined #perl6
04:17 m_athias joined #perl6
04:19 zakharyas joined #perl6
04:20 bowtie joined #perl6
04:21 yogan joined #perl6
04:23 ab5tract joined #perl6
04:27 kaleem joined #perl6
04:38 kaare_ joined #perl6
04:41 chenryn joined #perl6
04:59 raiph joined #perl6
05:21 tinyblak_ joined #perl6
05:32 jfredett joined #perl6
05:46 kjs_ joined #perl6
05:48 [Sno] joined #perl6
05:49 xenoterracide joined #perl6
05:50 ugexe nqp: my @arr; say(nqp::push_i(@arr, 2));
05:50 camelia nqp-parrot: OUTPUT«1␤»
05:50 camelia ..nqp-moarvm: OUTPUT«MVMArray: push expected object register␤   at /tmp/tmpfile:1  (<ephemeral file>:<mainline>:24)␤ from gen/moar/stage2/NQPHLL.nqp:1234  (/home/camelia/rakudo-inst-2/languages/nqp/lib/NQPHLL.moarvm:eval:172)␤ from gen/moar/stage2/NQPHLL.nqp:1427  (/home/camelia…»
05:50 camelia ..nqp-jvm: OUTPUT«(signal ABRT)»
05:52 ugexe anyway know what moarvm is supposed to return?
05:53 ugexe docs mention return values for jvm and parrot only
05:56 TimToady it would appear from the code in interp.c that it simply returns the array you pushed to
05:57 TimToady but it needs to be allocated with nqp::list_i or so
05:57 TimToady or maybe my int @arr
05:58 ugexe yeah, but no typed arrays yet :(
05:58 TimToady my @data := nqp::list_i;
05:58 TimToady er @arr
05:58 ugexe oh cool
05:58 TimToady nqp: my @arr := nqp::list_i; say(nqp::push_i(@arr, 2));
05:58 camelia nqp-jvm: OUTPUT«(signal ABRT)»
05:58 camelia ..nqp-moarvm: OUTPUT«2␤»
05:58 camelia ..nqp-parrot: OUTPUT«[ 2 ]␤»
06:00 ugexe parrot is giving a different result from that then my untyped example. why is that?
06:02 TimToady is probably just a different 'say'
06:02 ugexe well it should return 1
06:03 TimToady p5think
06:03 ugexe according to the docs that is
06:03 TimToady still p5think :)
06:03 ugexe Return the number of elements of @arr on Parrot
06:03 TimToady it just returns the array object, which won't be the number of elems unless you + it
06:03 TimToady nqp: my @arr := nqp::list_i; say(+nqp::push_i(@arr, 2));
06:03 camelia nqp-parrot: OUTPUT«get_number() not implemented in class 'ResizableIntegerArray'␤current instr.: '<mainline>' pc 49 ((file unknown):42) (/tmp/tmpfile:1)␤»
06:03 camelia ..nqp-jvm: OUTPUT«(signal ABRT)»
06:03 camelia ..nqp-moarvm: OUTPUT«2␤»
06:03 TimToady hmm
06:04 TimToady nqp: my @arr := nqp::list_i; say(nqp::elems(nqp::push_i(@arr, 2)));
06:04 camelia nqp-parrot: OUTPUT«1␤»
06:04 camelia ..nqp-jvm: OUTPUT«(signal ABRT)»
06:04 camelia ..nqp-moarvm: OUTPUT«This representation (P6int) does not support elems␤   at /tmp/tmpfile:1  (<ephemeral file>:<mainline>:27)␤ from gen/moar/stage2/NQPHLL.nqp:1234  (/home/camelia/rakudo-inst-2/languages/nqp/lib/NQPHLL.moarvm:eval:172)␤ from gen/moar/stage2/NQPHLL.nqp:1427  (/h…»
06:04 TimToady hmm
06:05 * TimToady doesn't understand what's going on there
06:05 TimToady but the moar code is just returning the object
06:05 ugexe heh. im not actually using it, just clarifying/correcting the docs
06:07 TimToady nqp: my @arr := nqp::list_i; say(nqp::atpos_i(nqp::push_i(@arr, 2),0));
06:07 camelia nqp-parrot: OUTPUT«2␤»
06:07 camelia ..nqp-moarvm: OUTPUT«This representation (P6int) does not support positional access␤   at /tmp/tmpfile:1  (<ephemeral file>:<mainline>:28)␤ from gen/moar/stage2/NQPHLL.nqp:1234  (/home/camelia/rakudo-inst-2/languages/nqp/lib/NQPHLL.moarvm:eval:172)␤ from gen/moar/stage2/NQPHLL.n…»
06:07 camelia ..nqp-jvm: OUTPUT«(signal ABRT)[thread 140634437474048 also had an error]␤#␤# There is insufficient memory for the Java Runtime Environment to continue.␤# »
06:07 TimToady odd
06:08 TimToady I guess moar is just returning the 2
06:08 TimToady nqp: my @arr := nqp::list_i; say(nqp::push_i(@arr, 42));
06:08 camelia nqp-parrot: OUTPUT«[ 42 ]␤»
06:08 camelia ..nqp-jvm: OUTPUT«(signal ABRT)»
06:08 camelia ..nqp-moarvm: OUTPUT«42␤»
06:09 TimToady which is kinda not what I'd expect
06:10 flussence joined #perl6
06:10 ugexe Return the number of elements of @arr on Parrot, $v on JVM. -> Return @arr on Parrot, $v on JVM/moar ?
06:10 TimToady I don't see anywhere in nqp where the value is used, actually
06:10 TimToady er, in nom/src I should say
06:12 TimToady might be best to say the return value is currently undefined
06:13 ugexe roger that
06:16 gfldex joined #perl6
06:26 kaleem joined #perl6
06:36 Woodi joined #perl6
06:46 sqirrel_ joined #perl6
06:55 bjz_ joined #perl6
06:59 KCL_ joined #perl6
07:05 KCL_ joined #perl6
07:10 _sri joined #perl6
07:11 Alina-malina joined #perl6
07:21 erkan joined #perl6
07:21 erkan joined #perl6
07:26 darutoko joined #perl6
07:43 rurban joined #perl6
07:44 masaq joined #perl6
07:44 masaq morning, #perl6
07:48 ptc_p6 joined #perl6
07:48 [Sno] joined #perl6
08:21 revdiablo joined #perl6
08:22 erkan joined #perl6
08:26 ingy joined #perl6
08:27 lizmat commute to Copenhagen&
08:31 masaq TypeError: __init__() got an unexpected keyword argument 'setup'
08:31 masaq look, even Python 2 gets this right! :P
08:32 dayangkun joined #perl6
08:32 ab5tract joined #perl6
08:37 abraxxa joined #perl6
08:40 Mso150 joined #perl6
08:41 woolfy left #perl6
08:45 FROGGS joined #perl6
08:49 molaf_ joined #perl6
08:53 smls joined #perl6
08:56 smls m: say (^2 Z ^2).perl; say (^2 X ^2).perl
08:56 camelia rakudo-moar 1d3d97: OUTPUT«((0, 0), (1, 1)).list␤(0, 0, 0, 1, 1, 0, 1, 1).list␤»
08:56 smls ^ Why does Z preserve the nested Parcels but X doesn't?
08:57 jnthn masaq: And handles interface consistency how? :P
08:57 masaq smls: yeah, that seems odd.
08:58 [Tux] joined #perl6
08:58 masaq jnthn: I was trying to be inflammatory, not rational :P
08:58 masaq jnthn: Python doesn't.
08:58 jnthn :)
08:58 jnthn As I remember, it also made delegating to the base class a pain...
08:59 masaq yes, but inheritance is in place, so...
08:59 masaq the need for interface consistency should be just as big.
08:59 masaq the only explanation I can think of is "they just don't consider it that important"
09:00 jnthn Trouble is, many (most?) good uses of inheritance do involve a call to super. :)
09:00 jnthn (Should qualify that with: most uses of inheritance I see in the real world are questionably good.)
09:04 masaq I've become more sensitive to the kind of inheritance that just uses its base class as a container for utility methods.
09:04 masaq since I teach Python right now, I see that quite a lot.
09:04 abraxxa joined #perl6
09:06 jnthn Seen it a bunch in C# too.
09:09 masaq it's one of those "...everything starts looking like a nail" things, with inheritance the hammer.
09:20 denis_boyun_ joined #perl6
09:25 Alina-malina joined #perl6
09:33 masaq did I mention this? I might've. jQuery is "re-uniting" their 1.x and 2.x lineages into a 3.x lineage: http://blog.jquery.com/2014/10/29/jquery-3-0-the-next-generations/
09:33 masaq do read the post. don't read the comments.
09:36 kurahaupo joined #perl6
09:37 moritz the only weird thing (IMHO) is that they call the recommended version "jquery compat" and the leading edge "jquery"
09:38 masaq yes, I found that weird too.
09:38 moritz it would make more sense to name them "jquery" and "jquery-slim" or so
09:39 masaq I guess there's a little wishful thinking and "betting on the future" in the naming.
09:39 masaq leaving aside whether it'll turn out to be a good idea or not.
09:39 masaq I don't get the sense that jQuery Compat will stay the recommended version for most people for long.
09:40 masaq maybe it already isn't, but the market still prefers it.
09:40 fhelmberger joined #perl6
09:43 moritz it's kinda more fun to not bother yourself with IE8 support :-)
09:44 sqirrel_ joined #perl6
09:44 masaq and increasingly feasible.
09:45 * masaq was going to link to http://theie8countdown.com/ but it seems down
09:45 jnthn .oO( down for the count? )
09:46 moritz but at least we aren't discussin IE6 countdowns anymore :-)
09:50 espadrine` joined #perl6
09:51 masaq and the generational churn makes it hard even to explain to neophyte web devs how utterly horrible it used to be just 5 years ago.
09:52 dakkar joined #perl6
09:59 rindolf joined #perl6
10:03 pecastro joined #perl6
10:16 erdic joined #perl6
10:27 virtualsue joined #perl6
10:48 ghostlines joined #perl6
11:04 ggoebel111111118 joined #perl6
11:05 arnsholt jnthn: In a QAST tree, do Blocks and Vars share a namespace or are they stored separately?
11:08 denis_boyun_ joined #perl6
11:09 timotimo arnsholt: we refer to blocks with a BVal and pass the block object directly into the :value IIRC
11:14 virtualsue joined #perl6
11:15 * timotimo learns about the --no-checkout option to git bisect
11:18 chenryn joined #perl6
11:18 arnsholt timotimo: Right, so a Block(:name<foo>) and a Var(:name<foo>) are distinct
11:20 timotimo i think the :name for a block is only informative
11:22 arnsholt Oh, of course. BVals are constructed by passing the block itself, not itsname
11:22 arnsholt Derp =)
11:23 timotimo yes
11:28 not_tadzik joined #perl6
11:28 not_tadzik Juerd: ping
11:41 timotimo hey not_tadzik, what's not_up?
11:44 * masaq .oO( not_much )
11:45 jnthn arnsholt: QAST::Block's :name just sets it for introspection, rather than installs it anywhere
11:46 timotimo jnthn: did you see my hilarious examples of unfortunate code-gen from last night?
11:46 arnsholt Yeah, timotimo set me straight
11:46 jnthn timotimo: Well, it's probably because lots of cheaper things got turned into a set.
11:46 arnsholt Now just I need to figure out why I break EXPR_reduce >.<
11:46 timotimo jnthn: the sets, yeah, no problem
11:47 jnthn timotimo: uh, lots of costlier things...
11:47 timotimo jnthn: but how about the const_s and const_i64_16? %)
11:47 jnthn I agree we'd like to opt 'em out
11:47 timotimo https://gist.github.com/timo/e879a950bea3d4c2340e
11:47 timotimo i may try to give set removal a new try actually
11:48 timotimo do you have an idea why sometimes the optimize_method_lookup thing seems to generate two getspeshslot instructions that read from different spesh slots into the same register directly in succession?
11:49 jnthn timotimo: Yes, the first one is looking up the high level code object probably, and then we get the low level one out of it, and for some reason don't lose the prior instruction
11:50 timotimo oh, interesting
11:50 timotimo what's the optimization called that does that transformation?
11:50 timotimo may just need a properly placed usages--
11:50 jnthn Well, you can't usages-- it because it's the same target register
11:50 jnthn I wrote this code before we had temp registers
11:50 timotimo ah, so that may be the proper way to fix it
11:51 jnthn It's optimize_call or so. Same thing that inlines if we can
11:51 jnthn Yes, probbly
11:51 s6fllosc joined #perl6
11:51 jnthn iirc, you can't just unconditionally go deleting the first lookup
11:51 not_tadzik timotimo: I'm sad that I can't access feather :(
11:51 jnthn 'cus it may be used for something.
11:52 timotimo another thing i've started working on (and made the nqp build explode violently by implementing) is "tracking" boxing and unboxing throughout the SSA
11:52 jnthn Yeah, that'll need care between BB boundaries, I suspect...
11:52 jnthn But worthwhile opt when we can do it.
11:52 timotimo that may be the reason why it didn't work actually
11:52 timotimo i added a fact that basically says "this register basically just contains a boxed representation of the writer's first argument"
11:53 timotimo i found a piece of code where infix:<<> got in-lined twice in a row and ended up having p6bool unnecessarily inside the same BB
11:53 timotimo though of course the "p6bool basically works like box_i" thing is a tiny bit wrong
11:54 jnthn Correct.
11:54 jnthn It'll normalize the value
11:54 timotimo yeah
11:54 jnthn May make a difference
11:54 timotimo but it's correct for almost all values
11:55 timotimo (namely: all but finitely many values)
11:56 jnthn If you know how it's going to be used (like, in an if) and that this is the only use of it, then you have some space.
11:56 jnthn (To do the opt)
11:56 jnthn But if it's more involved than that, a bit less so.
11:57 masaq not_tadzik: I'm sad that I can't access feather, too :/
11:57 sqirrel_ joined #perl6
11:57 masaq not_tadzik: it's a foretaste of feather shutting down, I guess.
11:57 timotimo correct
11:58 not_tadzik yeah, I think so
11:58 timotimo how should i write code that has to do BB-border-considerations?
11:58 not_tadzik I'd be happy if I could have my last login to read the backlog and tidy stuff up
11:58 timotimo a) make sure i abort if i see a BB border is between two instructions
11:58 not_tadzik before I move the IRC session someplace else
11:58 timotimo b) write the code good in the first place so that it doesn't break
11:58 timotimo :P
12:00 timotimo jnthn: can i refer to an older version of a register and the after-spesh-codegen will make sure the value gets kept properly?
12:00 timotimo (i do realize this question boils down to "does our SSA implementation totally suck?", but ... just to be sure)
12:01 timotimo because i'd like to replace multiple occurences of const_i64_16 $reg, any(0, 1) with backreferences - maybe only if they're in the same BB or something
12:06 jnthn timotimo: No, it won't. It transforms out of SSA form by throwing out the indexes.
12:07 timotimo oh
12:07 timotimo i may have to keep that in mind
12:10 JimmyZ joined #perl6
12:10 timotimo are we going to keep the SSA-back-transformation that simple for long?
12:11 jnthn Forever as far as I'm concerned.
12:12 jnthn It's part of the frame consistency stuff that deopt depends on.
12:12 timotimo hm, OK
12:12 jnthn So unless we want a much more complex deopt design...
12:12 timotimo so we don't "compress" frames by throwing out registers that end up unused either
12:12 jnthn Correct, 'cus we'd then have to resize them if we deopt'd.
12:13 jnthn Keeping deopt relatively cheap means we can afford it to happen.
12:13 timotimo i wonder if some of my previous optimization attempts failed because i didn't know about this
12:13 jnthn Quite possibly ;)
12:13 jnthn Note that we use usage counts as part of the deopt strategy too
12:14 jnthn Sometimes you'll see something gets a higher count than you may expect. That happens when deopt might cause it to be needed, evne though the original instruction that used it got deleted.
12:14 timotimo we don't deopt if something we've assumed about a register we don't care about no longer holds? :P
12:14 timotimo ah!
12:14 timotimo yeah, i've seen mysterious usage counts and theorized it may be for deopt
12:14 timotimo it's good to know for sure
12:15 jnthn Yeah, it was a surprisingly elegant way to handle it.
12:15 Mouq joined #perl6
12:16 * JimmyZ wonders whether jnthn++ saw the allocation sinking optimization or not  :)
12:16 timotimo JimmyZ: i was just thinking a bit more about that right now
12:17 jnthn JimmyZ: I saw the link, but I was on vacation and didn't read it... ;)
12:17 timotimo the fact that i must not move the writer of a register beyond the next write to it is a bit of a challenge... but i probably should get some example code up before thinking much more about this
12:17 JimmyZ timotimo: Did you see this one too? http://lua-users.org/lists/lua-l/2011-03/msg01096.html
12:18 timotimo jnthn: TL;DR: escape analysis is fine and good, but it quite often falls short because things get allocated before a lopsided branch happens and thus variables that only rarely escape will get treated as "always escaping"
12:18 JimmyZ jnthn:  The above link  is some detail about it, in case you missed this one
12:20 JimmyZ timotimo: usually escape analysis is for un-escapled var, but this one is for escapled var
12:20 JimmyZ :P
12:20 timotimo JimmyZ: are you interested in spending a bit of brainpower on a bit of code that would help people immensely?
12:21 timotimo (and by people, i mean "at least me" :P )
12:21 JimmyZ timotimo: allocation sinking optimization is addition to( or based on) escape analysis
12:22 JimmyZ s/or/and/
12:22 JimmyZ timotimo: ok, Did you see the benchmark code yet?
12:23 timotimo the benchmark code in lua?
12:24 JimmyZ Allocation sinking requires store forwarding and store sinking. It needs alias analysis and escape analysis.  -- Said in http://lua-users.org/lists/lua-l/2011-03/msg01096.html
12:24 jnthn Yeah. None of which are easy :P
12:24 timotimo oh well :S
12:25 jnthn (We did plenty of uneasy things already, though. :))
12:25 timotimo JimmyZ: anyway, perhaps you can figure out what's wrong with moarvm's origin/finite_callgraph_depth ?
12:25 jnthn Still, I think in MoarVM we'll soon want to put our opt focus on optimizing parametric 6model stuff that'll land in the next weeks (hopefully)
12:25 JimmyZ timotimo: in java or C++ is OK
12:25 jnthn And thus native array things.
12:26 timotimo jnthn: would "parametric 6model stuff" also cover having the information about a native call more readily available in code-gen or so?
12:26 JimmyZ timotimo: the key part : return new Point(x + b.x, y + b.y);
12:27 jnthn No,
12:27 jnthn timotimo:Well, I dont immediately see the connection :)
12:28 JimmyZ The optimization makes the Point Objection allocation sink  to the the another frame to avoid the Point Object Allocation since it's attribute will read by another frame immediately
12:28 JimmyZ timotimo: ^^
12:28 JimmyZ timotimo: return means it escapled. ..
12:29 JimmyZ *escaped
12:29 timotimo well, unless we've inlined that
12:29 timotimo :P
12:30 timotimo jnthn: the call to "deopt_all" that we generate for every nativecallinvoke bothers me
12:30 timotimo it goes through the argument list and inspects every argument for a "can('cstr')"
12:30 JimmyZ the article said it  needs alias analysis and escape analysis, didn't say inline :P
12:31 jnthn timotimo: Yes, that's more a "be expedient" thing than a "be good" ting :)
12:31 jnthn *thing
12:32 * masaq .oO( 鼎 )
12:32 timotimo er
12:32 timotimo why did i say "deopt_all"?
12:32 timotimo i meant "decont_all"
12:33 jnthn I read decont_all too :P
12:33 timotimo good :)
12:33 timotimo well, i'm sure it's helpful, but spesh can't make anything of it
12:33 jnthn Right.
12:34 timotimo at least it's using an nqp-level loop with an iter rather than a perl6 list iteration :P
12:34 jnthn There's a number of ways in which we might want to re-visit the way we're doing native call code-gen...
12:34 jnthn ...but it's a big project.
12:36 timotimo i can imagine >_<
12:38 jnthn I suspect my tuits for the rest of the year will be focused on stability things and native array things.
12:38 jnthn (As in, rest of 2014)
12:39 timotimo yeah, it kind of seems like stability has been suffering a little bit
12:39 leont joined #perl6
12:39 timotimo it'd be cool if we could find a champion for JVM issues
12:40 timotimo for example: i don't know where exactly our "call jvm methods directly" thing is currently at
12:40 timotimo did my "dispatch based on arity" code make it into master yet?
12:43 jnthn I think on arity did.
12:45 timotimo that's reassuring :)
12:46 Ugator Hello p6 :-) I had some idea ;) is it possible to add some :nodebug flag to vars at declaration, so that code only made of those will be (hopefully much) faster?
12:47 moritz Ugator: no, but type annotations help to make code faster
12:47 Ugator :-( so just typing and shaping is all - we dont want more?
12:48 masaq also, the JIT helps make code faster.
12:48 jnthn As a Perl 6 compiler implementor, I can only say "I can't see how a :nodebug flag will help me make things faser" :)
12:48 jnthn *faster
12:48 moritz Ugator: well, I don't even know what :nodebug would do
12:48 masaq it doesn't sound like a viable idea, on the face of it.
12:48 jnthn The language is already pretty well designed for being able to optimize such things without programmer hints.
12:49 JimmyZ neither java or C# did it :
12:49 JimmyZ :)
12:49 jnthn Even when the name survives until runtime, we don't actually look variables up by name in almost all cases.
12:49 guru joined #perl6
12:50 masaq right, it's all down to numerical indices.
12:50 masaq thanks to the way static lookup hangs together.
12:50 Ugator *happy :-)
12:51 Ugator does this reflect in benchmarks yet? (concerning typed vars)
12:51 timotimo native typed vars reflect very well in benchmarks
12:51 jnthn Well, in native types certainly.
12:51 timotimo and having lexicals vs using a hash or something is also much better :P
12:52 timotimo i suppose one could build a benchmark that artificially uses indirect lookup for lexical variables?
12:52 timotimo just to compare against?
12:52 timotimo doesn't seem very informative to me, though
12:53 cognominal joined #perl6
12:56 telex joined #perl6
12:57 masaq no; we're already fast in that sense.
12:57 masaq no need to linger on the past :)
12:57 masaq we have enough of the future to worry about
12:58 timotimo true
12:58 tinyblak joined #perl6
13:02 masaq not to mention the present
13:05 timotimo hm
13:05 timotimo so what's the sanest way to figure out if a register's value gets phi'd?
13:05 timotimo or "has gone through a PHI"
13:06 timotimo i suppose i could walk the *prev linked list until i either find the BB boundary or the writer of the register in question
13:06 timotimo well, or a PHI that writes that register
13:06 kaleem joined #perl6
13:07 timotimo actually, i would have to abort if anything writes to that register, even at a different version
13:22 adu joined #perl6
13:24 chenryn joined #perl6
13:24 raiph joined #perl6
13:25 timotimo cool. on the one hand, the optimization gets used a few times during nqp and rakudo build, on the other hand, the build still completes cleanly
13:26 timotimo interesting: This representation (Null) cannot unbox to other types
13:27 tinyblak_ joined #perl6
13:29 timotimo at <unknown>:1  (/home/timo/perl6/rakudo/../install/languages/perl6/runtime/./CORE.setting.moarvm::4294967295)
13:29 timotimo that doesn't look healthy
13:37 jnthn Nope
13:37 jnthn That probably means you tossed an unbox you shouldn't have
13:37 jnthn And now the register just contains a null
13:38 timotimo even segfaults in trans.rakudo.moar
13:38 timotimo i only ever toss unboxes that ould have been the result of an if_o or unless_o anyway
13:38 timotimo the segfault happens in MVM_bigint_bool, interestingly enough
13:40 timotimo bool_I r4(3), r0(1)
13:40 timotimo p6bool r5(1), r4(3)
13:40 timotimo that's funny to me
13:40 timotimo (though correct)
13:40 jnthn Did the r0(1) instruction setting get eliminated?
13:41 timotimo this is just the first result when searching for bool_I
13:41 timotimo it's actually from a "Before:"
13:42 mst joined #perl6
13:42 jnthn ah, I see
13:42 Mouq perl6 -e'say $~MAIN'
13:42 Mouq Slang.new(:grammar(Perl6::Grammar), :actions(Perl6::Actions))
13:42 timotimo it's really pretty annoying that i can't dump the full traceback when attached to a core dump :(
13:44 dalek rakudo/nom: 93987f1 | Mouq++ | / (6 files):
13:44 dalek rakudo/nom: Initial stab at getting $~Vars to work
13:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/93987f136c
13:45 jnthn Wow
13:45 jnthn Mouq++
13:47 Ulti what are $~vars ?
13:47 * nwc10 was wondering this and got as far as http://doc.perl6.org/language/variables#The_~_Twigil
13:47 nwc10 but I don't see any good examples that make it clear to me
13:48 moritz that's because the mechanism isn't clear to anybody
13:48 nwc10 oh.
13:48 timotimo https://s3.amazonaws.com/static.tumblr.com/7ebynbs/8tBlhhoe4/secret_00000.png
13:49 sergot_ joined #perl6
13:49 sergot_ o/
13:49 Mouq Pretty much :9 Perl 6's parser is made up of a bunch of sub-languages.. MAIN, the quote lang, the Regex lang.. and any slangs added by users. $~Vars are supposed to access them
13:49 timotimo ohai sergot!
13:50 timotimo how are you doing?
13:50 sergot_ hi timotimo o/
13:50 Ulti can you write to them to set a different grammar and actions then?
13:50 sergot_ I'm fine, thanks, and you?
13:50 Mouq Ulti: Not yet
13:50 timotimo oooh
13:50 Mouq Ulti: And the semantics of that are still being figured out
13:50 sergot_ timotimo: actually, I have a problem.... Why feather doesn not work? :(
13:51 timotimo sergot_: no idea ;(
13:51 timotimo many people are plagued by that very problem
13:51 Ulti Mouq cool
13:51 sergot_ :(
13:51 timotimo jnthn: now that i actually output a BB's memory address, i can just output an instruction's BB's address in debug output to correlate where exactly my optimization fired
13:51 Juerd not_tadzik: pong
13:52 rurban Is today a US holiday?
13:53 not_tadzik Juerd: can you help me regain access to feather? SSH cuts the connection whenever I try to get to it
13:53 Juerd not_tadzik: I'm rebooting it now. More than just ssh was broken.
13:54 sergot_ Juerd++
13:54 not_tadzik okay :)
13:54 Juerd It looks like someone upgraded it to systemd while the kernel is too old (doesn't have the features that systemd requires)
13:54 Juerd Probably not on purpose, as systemd comes with regular dist-upgrades in unstable
13:57 dayangkun joined #perl6
13:57 xtreak joined #perl6
13:57 Juerd This will take a while.
13:58 timotimo yikes
13:58 not_tadzik I feel a great disturbance in the force
13:59 not_tadzik quick, write a perl one-line that greps weechat logs from the last 48 hours for your nickname :)
13:59 donaldh joined #perl6
14:01 moritz Juerd: is there some kind of packet blacklisting that can prevent that from happening again?
14:01 timotimo pinning should cover that feature, i believe
14:01 Juerd moritz: No need, I've just upgraded the kernel.
14:01 chenryn joined #perl6
14:01 Juerd Manually :)
14:02 Juerd It's up
14:02 moritz Juerd: \o/
14:02 timotimo you've heard it here first, kids: reboot your servers regularly
14:02 Juerd timotimo: Rebooting feather1 is only done when everything else fails :)
14:03 moritz http://www.cyberciti.biz/faq/debian-ubuntu-linux-apt-get-blacklisting-packages-using-hold-option/ also has an option
14:03 Juerd Even with upgrades that clearly said "you should really, really reboot now" I haven't done so. Can't just kill that many irc connections just because some postinst script says so.
14:03 moritz but of course upgrading the kernel looks like the better option
14:03 Juerd With this kind of virtualization setup, the kernel lives outside the VM
14:04 Juerd So not even with root access on feather can someone upgrade it.
14:04 Juerd This used to be a great approach, and then software started *depending* on new features, instead of only using them if they're there.
14:05 Juerd One of the original rationales for this setup was that this way, people couldn't kill their vps by upgrading the kernel to a broken one.
14:05 Juerd Now with systemd it's the other way around: now you kill your vps because upgrading your kernel is impossible.
14:06 Juerd [  OK  ] Started (null).
14:06 Juerd I wonder what that service is.
14:06 Juerd Did someone not bother to name their backdoor? :D
14:09 ptc_p6 joined #perl6
14:10 j4jackj joined #perl6
14:10 Juerd Hm, don't people autostart their screen/tmux + irssi sessions on reboot? :)
14:10 Juerd All it takes is "crontab -e" and "@reboot screen -dmS irc irssi"
14:12 alexghacker joined #perl6
14:12 tadzik joined #perl6
14:13 tadzik \o/
14:13 yoleaux 11 Nov 2014 17:53Z <PerlJam> tadzik: Merge my PR to the synopsebot  :)
14:16 [Coke] joined #perl6
14:16 [Coke] Juerd++
14:18 * alexghacker wonders what an "immutable Mu' is and what it's good for
14:18 alexghacker (and also why he's finding them)
14:19 alexghacker http://pastebin.com/EFLLsHFa
14:19 alexghacker oh, morning #perl6!  :)
14:21 tinyblak joined #perl6
14:22 [Coke] good day
14:23 tinyblak_ joined #perl6
14:26 alexghacker I'm probably just doing (multiple) something(s) wrong in my attempt to write a deepclone, but so far I've been breaking my teeth on that nut
14:27 moritz m: Mu = 42
14:27 camelia rakudo-moar 93987f: OUTPUT«Cannot modify an immutable Mu␤  in block <unit> at /tmp/huamtkXcC2:1␤␤»
14:27 moritz alexghacker: that's where you get that error from
14:27 moritz or
14:27 moritz m: my $x := Mu; $x = 42
14:27 camelia rakudo-moar 93987f: OUTPUT«Cannot assign to an immutable value␤  in block <unit> at /tmp/2Efqh1seDQ:1␤␤»
14:27 moritz m: sub f() { Mu }; f() = 42
14:27 camelia rakudo-moar 93987f: OUTPUT«Cannot modify an immutable Mu␤  in block <unit> at /tmp/t4ko3LMDjg:1␤␤»
14:28 alexghacker ah, so I'd guess then I'm seeing that error because $i{'b'}[2] isn't a hash (like it's supposed to be)
14:28 jfredett joined #perl6
14:30 tinyblak joined #perl6
14:34 sergot joined #perl6
14:34 alexghacker changing line 15 to read "{ %hash2; }" makes everything happy.  Is there a better way to do that?
14:38 moritz alexghacker: I'd have to see a bit more of the code to tell
14:38 dalek rakudo/nom: b93fc6d | Mouq++ | src/core/Slang.pm:
14:38 dalek rakudo/nom: Add parse to Slang.pm
14:38 dalek rakudo/nom:
14:38 dalek rakudo/nom: Still too many issues with NQP/Perl 6 interactions, but it at least
14:38 dalek rakudo/nom: makes $~vars a little easier to play with
14:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b93fc6d28e
14:38 moritz alexghacker: { %hash2 } copies the hash and puts the result into item (scalar) context
14:38 moritz alexghacker: if you just want item context, you can say  $%hash2 or %hash2.item
14:42 alexghacker moritz++: but it would probably be better to enforce item context on the call to deepclone on line 22, wouldn't it?
14:45 moritz alexghacker: I haven't seen your line 22, so I can't comment
14:45 moritz alexghacker: oh, you pastebin'ed something
14:46 moritz alexghacker: sorry, I missed that
14:46 alexghacker np
14:47 moritz alexghacker: well, I'd rather make deepclone always return an item if it was passed an item
14:48 alexghacker hrm.... that sounds nice.  I'm afraid I'll have to research that.
14:48 moritz alexghacker: which in turn requires you to tweak the signatures of your multi subs, because binding to an array param flattens out the item
14:48 moritz m: sub f(@a) { @a }; .say for f [1, 2]
14:48 camelia rakudo-moar 93987f: OUTPUT«1␤2␤»
14:50 alexghacker so, "multi d(Hash:D %h) { ... }" and "multi d(Hash:D $h) { ... }"?  or just the latter?
14:50 guru joined #perl6
14:51 Mouq joined #perl6
14:52 moritz Hash:D %h   would be a hash containing hashes
14:52 moritz and $h forces itemization
14:52 moritz so you need   (Hash:d \h)
14:53 thou joined #perl6
14:53 alexghacker o
14:54 * alexghacker has been completely misusing signatures
14:54 moritz m: sub f(Hash:d \h) { h.WHO ~~ Scalar }; say f { a => 1 }; say f %( a => 1)
14:54 camelia rakudo-moar 93987f: OUTPUT«False␤False␤»
14:54 moritz hrm
14:54 moritz m: say { a => 1}.WHO.^name
14:54 camelia rakudo-moar 93987f: OUTPUT«Stash␤»
14:54 Mouq m: sub (Associative:D \h) { h.perl.say }(%(a => b ))
14:54 camelia rakudo-moar 93987f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/uToa3R2p03â�¤Undeclared routine:â�¤    b used at line 1â�¤â�¤Â»
14:54 moritz m: say %( a => 1}.^name
14:54 camelia rakudo-moar 93987f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/V0s4yYlc9Aâ�¤Unable to parse expression in contextualizer; couldn't find final ')' â�¤at /tmp/V0s4yYlc9A:1â�¤------> [32msay %( a => 1[33mâ��[31m}.^name[0mâ�¤    expecting any of:â�¤        post…»
14:54 Mouq m: sub (Associative:D \h) { h.perl.say }(%(a => 1 ))
14:54 camelia rakudo-moar 93987f: OUTPUT«("a" => 1).hash␤»
14:54 moritz m: say { a => 1}.^name
14:54 camelia rakudo-moar 93987f: OUTPUT«Hash␤»
14:55 moritz m: say %( a => 1 ).WHO.^name
14:55 camelia rakudo-moar 93987f: OUTPUT«Stash␤»
14:55 moritz how the heck do I find out if a hash is itemized?
14:56 JimmyZ m: say { a => 1; }.WHO.^name
14:56 camelia rakudo-moar 93987f: OUTPUT«Stash␤»
14:56 Mouq m: sub is_item (Associative:D \h) { nqp::iscont(h).say }; say is_item %( a=>1);
14:56 camelia rakudo-moar 93987f: OUTPUT«0␤True␤»
14:56 moritz m: sub is_item (Associative:D \h) { nqp::iscont(h).say } is_item { a=> 1}
14:56 camelia rakudo-moar 93987f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/qtLlXKyFTgâ�¤Two terms in a rowâ�¤at /tmp/qtLlXKyFTg:1â�¤------> [32mssociative:D \h) { nqp::iscont(h).say } [33mâ��[31mis_item { a=> 1}[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤ …»
14:56 moritz m: sub is_item (Associative:D \h) { nqp::iscont(h).say };  is_item { a=> 1}
14:56 camelia rakudo-moar 93987f: OUTPUT«1␤»
14:56 Mouq s/say/Bool/
14:57 moritz Mouq: but using nqp:: is cheating
14:57 moritz Mouq: that's fine for the setting, but not for user-space code
14:57 jnthn m: say { a => 1; }.VAR ~~ Scalar
14:57 camelia rakudo-moar 93987f: OUTPUT«True␤»
14:57 Mouq jnthn++
14:57 moritz oh, it's .VAR, now .WHO
14:57 jnthn .WHO is the stash
14:57 Mouq .WHO is the namespace
14:57 moritz right
14:58 Mouq or stash or yeah
14:58 pdcawley joined #perl6
15:03 pdcawley joined #perl6
15:05 alexghacker m: sub d(Array:D is copy) { for $a.list -> $s { $s = 7 } }; my $t = [ 1, 2, 3 ]; d($t)
15:05 camelia rakudo-moar 93987f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/jXDNQaUUXfâ�¤Variable '$a' is not declaredâ�¤at /tmp/jXDNQaUUXf:1â�¤------> [32msub d(Array:D is copy) { for $a.list[33mâ��[31m -> $s { $s = 7 } }; my $t = [ 1, 2, 3 ][0mâ�¤    expecting any of:…»
15:05 alexghacker m: sub d(Array:D $a is copy) { for $a.list -> $s { $s = 7 } }; my $t = [ 1, 2, 3 ]; d($t)
15:05 camelia rakudo-moar 93987f: OUTPUT«Cannot assign to a readonly variable or a value␤  in sub d at /tmp/zW2pDmtdXS:1␤  in block <unit> at /tmp/zW2pDmtdXS:1␤␤»
15:06 alexghacker does 'is copy' imply 'is ro'?
15:07 JimmyZ $s?
15:07 alexghacker or am I carrying over bad habits from perl5?
15:07 ptc_p6 joined #perl6
15:07 moritz -> $s implies ro
15:08 moritz <-> $s   for rw
15:08 moritz m: sub d(Array:D $a is copy) { for $a.list <-> $s { $s = 7 } }; my $t = [ 1, 2, 3 ]; d($t)
15:08 camelia rakudo-moar 93987f: ( no output )
15:08 moritz m: sub d(Array:D $a is copy) { for $a.list <-> $s { $s = 7 }; say $a}; my $t = [ 1, 2, 3 ]; d($t); say $t
15:08 camelia rakudo-moar 93987f: OUTPUT«7 7 7␤7 7 7␤»
15:08 alexghacker moritz++
15:08 alexghacker thanks
15:09 moritz alexghacker: but 'is copy' on an an itemized array parameter will just copy the references
15:09 moritz (it's not a deep clone :-)
15:09 alexghacker yes, I'm well aware of that
15:10 alexghacker I've been trying to implement a general (non-safe for data structures with internal references) deep clone
15:11 tadzik nice!
15:12 alexghacker I'm making it harder than it ought to be, though, as my years of perl5 keep creeping into my perl6
15:12 alexghacker I like perl6 better than perl5 (I think), and I LOVE perl5.
15:13 alexghacker but I'm starting to see why someone who's really invested in perl5 might not like perl6
15:15 alexghacker the two feel similar, but doing perl6 naively like you did perl5 is setting traps for yourself
15:16 Diederich well said, alexghacker++
15:18 FROGGS joined #perl6
15:21 jnthn decommute &
15:25 kaare_ joined #perl6
15:28 dalek doc: 1fa6313 | Mouq++ | / (2 files):
15:28 dalek doc: Begin to document Metamethods
15:28 dalek doc: review: https://github.com/perl6/doc/commit/1fa63137e4
15:28 dalek doc: e459ac8 | Mouq++ | lib/Language/mop.pod:
15:28 dalek doc: Document .VAR
15:28 dalek doc: review: https://github.com/perl6/doc/commit/e459ac8bc6
15:29 kjs_ joined #perl6
15:29 hoelzro o/ #perl6
15:33 JimmyZ \o
15:42 hoelzro would it be a terrible idea to add gist to some of the NQP data types?
15:42 hoelzro it's frustrating when I call .^methods on something and the REPL complains because NQPRoutine doesn't have a gist method =/
15:42 rurban joined #perl6
15:43 beastd joined #perl6
15:48 nine TimToady: you made it into LWN's quotes of the week section: http://lwn.net/Articles/619442/
15:50 sqirrel_ joined #perl6
15:51 ugexe can i use internal opcodes directly from nqp code? like substr3 for example
15:54 Diederich nine++: thank you for the pointer
15:55 ugexe im aware they are not inteded to be used, im just curious
15:56 raiph joined #perl6
15:59 treehug88 joined #perl6
16:02 Ugator joined #perl6
16:04 timotimo hey hoelzro
16:04 timotimo how are you today? :)
16:04 hoelzro ahoy timotimo
16:04 hoelzro not bad
16:04 hoelzro slowly updating perl6/syntax this week =/
16:05 timotimo oh, syntax highlighting stuff?
16:06 PerlJam joined #perl6
16:06 LLamaRider joined #perl6
16:09 thou joined #perl6
16:09 JimmyZ good night
16:09 hoelzro timotimo: yup
16:09 hoelzro trying to unify everything there
16:09 hoelzro I adapted your code to generate lists of builtin operators/classes/etc
16:10 hoelzro but then after looking at the results, it occurred to me that just because a class or whatever is in Rakudo, doesn't mean it's in the spec =(
16:10 hoelzro so I'm combing through the spec to make my lists
16:10 zakharyas joined #perl6
16:11 timotimo oh, damn
16:13 hoelzro I started a template for generating the pygments lexer
16:13 hoelzro after that's good to go, I'll start on a Vim one
16:13 hoelzro and then Kate
16:13 hoelzro and then Textmate
16:14 timotimo that sounds lovely
16:14 timotimo may i suggest you prioritize textmate over kate, as github is going to be using that soon (whenever that would be)
16:14 ugexe actually it looks like substr2 and substr3 are no longer used by nqp? could their mention in the docs possibly be removed?
16:15 timotimo ugexe: i suspect the compiler inspects the number of arguments to substr and emits a call to substr2 or substr3 depending on what it finds?
16:16 hoelzro timotimo: sure
16:16 hoelzro I'm not too worried about them rolling that out soon, though
16:16 hoelzro holidays are coming, but I'm hoping that this won't take me too long after I finish the builtin lists
16:17 hoelzro I think TM highlighting is basically a list of keywords anyway
16:17 hoelzro which will make the highlighting of more complex constructions interesting =/
16:17 timotimo hey, cool, i've been looking at this problem from the wrong angle the whole time!
16:17 ugexe timotimo: ill check it out more, thanks for the info. Im not familiar with quast::op
16:18 ugexe i am confused at why i can call some internal functions (like nqp::indexfrom) but not others (nqp::substr3)
16:18 timotimo in line 2111 of QASTOperationsMAST.nqp in nqp you can see there's only substr and the code-gen inserts a constant -1 if there's no third argument
16:19 ugexe i should have been grepping for substr not substr3 i see :)
16:20 timotimo perhaps :)
16:26 japhb timotimo: You asked yesterday if I was still around ...?
16:26 timotimo oh
16:26 timotimo yeah, and now i even remember what i meant to ask!
16:27 timotimo can there be an option or something for "bench history" to not only show dates, but also commit IDs?
16:29 japhb timotimo: Are you looking for the full SHA1 or something like the output of `git describe`?
16:33 timotimo the latter
16:34 jdv79 where are the :U and :D (like Int:D) modifiers documented?
16:36 timotimo "type smileys"?
16:37 jdv79 I could only find it in the advent calendar after searching the web for quite some time.
16:38 hoelzro jdv79: I think S12
16:38 jdv79 would it make sense for that to be on http://doc.perl6.org/ somewhere?
16:39 hoelzro http://perlcabal.org/syn/S12.html#Abstract_vs_Concrete_types
16:39 jdv79 ah, nice.  google failed to find that for me.
16:39 timotimo it would make sense, aye
16:39 hoelzro I think a doc on types would be nice
16:40 hoelzro types + signatures
16:40 hoelzro jdv79: I have a local check out of the specs; I don't rely on Google anymore =/
16:40 hoelzro a more intelligent search engine for S* would be nice
16:41 jdv79 yeah, i was just poking around and found it difficult to find docs quickly and easily for pieces of syntax i don't know about in examples or signatures or related.
16:41 PerlJam S12:1625
16:41 dalek perl6-roast-data: 01504f4 | coke++ | / (5 files):
16:41 dalek perl6-roast-data: today (automated commit)
16:41 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/01504f4633
16:42 jdv79 its a bit exhausting but i guess one could argue more rewarding to have to hunt down random bits
16:44 PerlJam jdv79: it allows for serendipity
16:44 jdv79 is there something like Devel::NYTProf yet?
16:46 timotimo there's only the parrot-based profiler that outputs a kcachegrind-compatible file and moarvm's profiler that's per-callframe
16:46 jdv79 yeah, not like enough:)
16:47 jdv79 i meant :(
16:47 hoelzro I thought there was a moar profiler that jnthn++ wrote?
16:48 jdv79 i didn't find it easy to use.  NYTProf is quite polished.
16:49 japhb timotimo: Distracted this morning, could you add your perl6-bench request as another github issue so I don't lose it?
16:50 hoelzro jdv79: polish is something we're missing a bit at the moment
16:50 timotimo sure
16:50 hoelzro barring tadzik, that is =P
16:50 japhb timotimo: thanks
16:51 guru joined #perl6
16:52 timotimo no, thank *you* :)
16:58 [Coke] jdv79: didn't find it easy to generate the profile, or navigate the output?
16:58 hoelzro do we have a forum for submitting library module names that anyone can create?
16:58 jdv79 navigate the output
16:58 [Coke] hoelzro: like, a most wanted?
16:58 zakharyas joined #perl6
16:58 [Coke] if so,
16:58 hoelzro [Coke]: well, instead of which modules I want, more like, "I came up with a name I found clever.  Use it if you want"
16:58 [Coke] https://github.com/perl6/perl6-most-wanted
16:59 [Coke] ... that seems like a strange list to keep. :)
17:00 hoelzro yeah, it's really "Rob's list of awful puns"
17:00 hoelzro =)
17:01 timotimo hah
17:01 timotimo i'd like to see some of those
17:01 jdv79 [Coke]: is there a way to navigate the moarvm profiler output in a code view type way?
17:01 hoelzro timotimo: off the top of my head...
17:01 hoelzro "Orly - a simple ORM for Perl 6"
17:02 hoelzro and "Speculaas - a spec testing library for Perl 6"
17:03 dalek rakudo/nom: f8f6feb | (Timo Paulssen)++ | src/vm/moar/ops/perl6_ops.c:
17:03 dalek rakudo/nom: a p6bool "basically" boxes an int.
17:03 dalek rakudo/nom:
17:03 dalek rakudo/nom: may want to invent a second flag "BOXED_NORMALIZED" or
17:03 dalek rakudo/nom: so that would only allow boxing/unboxing skipping if the
17:03 dalek rakudo/nom: result is used in an if/unless op.
17:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f8f6febb49
17:03 timotimo i don't get speculaas :(
17:03 hoelzro spec + ulaas
17:03 hoelzro I told you, they're terrible =)
17:03 hoelzro http://en.wikipedia.org/wiki/Speculoos
17:04 jdv79 ORMs are a nightmare and always a ball of comprimises - surely there are better things to do;)
17:04 [Coke] jdv79: no; everything is by sub, I think.
17:04 [Coke] so you can get "Routines" or "Call Graph", but not by file.
17:04 hoelzro jdv79: interestingly enough, I don't really care for ORMs for spec-based tseting =)
17:05 hoelzro but some people do, so I would try my hand at writing one if I had time
17:05 timotimo oh
17:05 [Coke] I don't think I've ever worked on a project where I wanted an ORM or thought "wow, this ORM really simplifies things"
17:05 timotimo i know them as "spekulatius"
17:05 timotimo (and they are frigging amazing)
17:05 [Coke] almost always it's just been a nightmare the client has demanded.
17:05 timotimo [Coke]: you can get "by file" ... well, at least you can filter by file name
17:06 guru joined #perl6
17:06 davido___ joined #perl6
17:06 hoelzro [Coke]: https://twitter.com/j_simone/status/531968828247265284
17:07 hoelzro I wholeheartedly agree with the linked tweet (and you)
17:07 [Coke] timotimo: fair enough, but I mean "a file showing a code listing, in order..."
17:07 hoelzro so jdv79 is probably right in that there are better things to do with my time
17:07 [Coke] part of the issue there is you might be running against pre-compiled code.
17:08 guru joined #perl6
17:08 timotimo didn't tadzik build a tool at some point that does that?
17:08 timotimo [Coke]: what do you mean, "pre-compiled code"?
17:10 [Coke] e.g. when you install a module, it's compiled down to .moarvm files, and then later, when you use the module, you're using that precompiled file rather than the .p6. No?
17:12 [Coke] I would love to see more info on the profiler. e.g. ont he OSR/Deopt. I see a count.... is that number good?
17:13 kaleem joined #perl6
17:14 Mouq joined #perl6
17:14 timotimo [Coke]: the fewer deopts, the better
17:14 timotimo and the moarvm profiler operates on the bytecode level
17:15 timotimo so precompiled doesn't cause trouble
17:15 timotimo you would still want to fetch the source in order to get a good output going on
17:15 [Coke] Yes. but while you might have your source lying about, you might not have the source that was used to generate an installed .moarvm file.
17:15 timotimo nowadays we install the source along with the moarvm file, too :)
17:15 [Coke] but that's just a convention.
17:16 timotimo mhm
17:16 [Coke] You know people are going to ship stuff that is just .moarvm files. :)
17:16 timotimo well, that's kind of like perf ... if you install the kernel debug symbols it gives you a whole lot more info
17:17 [Coke] m: say Date.new(1764,2,1).day-of-week.WHAT
17:17 camelia rakudo-moar b93fc6: OUTPUT«(Int)␤»
17:17 [Coke] ^^ how hard would it be to make that an int, since it can't ever not fit?
17:17 kjs_ joined #perl6
17:18 [Coke] Or, how can I force it to compare with ints against a literal 7? (And, would forcing it to be an int make the code run faster on moar?)
17:18 timotimo can we actually return non-boxed values from methods and subs?
17:19 regreg joined #perl6
17:19 Mouq m: sub (Int:Foobar $x) { }(5) # ಠ_ಠ
17:19 camelia rakudo-moar b93fc6: ( no output )
17:19 Mouq std: sub (Int:Foobar $x) { }(5)
17:19 Mouq Sorry camelia T_T
17:20 jdv79 He might not appreciate me repeating this but I once asked Siracusa, the author of Rose::DB::OBject, why he created it after we were discussing some limitations and bugs and stuff.  He said "youthful indiscretion".
17:20 timotimo [Coke]: when your code gets spesh'd, the day-of-week method may be in-lined and with my most recent commits to moarvm, a boxing before and unboxing after returning from the in-lined method would probably be skipped
17:20 Mouq viv dies with "In parameter declaration, typename 'Int:Foobar' must be predeclared (or marked as declarative with :: prefix)"
17:21 camelia joined #perl6
17:21 timotimo what feature is this you're testing here?
17:21 timotimo doesn't seem familiar to me
17:21 Mouq me?
17:22 camelia std : OUTPUT«Can't chdir to '/home/camelia/std/snap': No such file or directory at lib/EvalbotExecuter.pm line 166.␤    EvalbotExecuter::_auto_execute(HASH(0x1c009c8), "sub (Int:Foobar \$x) { }(5)", GLOB(0x8f27898), "/tmp/FxxVKsIoeQ", "std") called at lib/EvalbotExecuter.pm line 114…»
17:22 Mouq because I'm testing the Rakudobug that lets Int:T slip through even though :T isn't implemented
17:22 timotimo oh
17:23 timotimo i see
17:31 tony-o anyone else getting a connection refused error using panda right now?
17:34 timotimo oh, tadzik did you have to restart the panda server on feather? :)
17:35 timotimo the next thing i ought to do is give set removal another try ... :S
17:35 arnsholt Anyone know what could cause a "Can't pop from an empty array" error in HLL::Grammar.EXPR_reduce?
17:37 timotimo https://github.com/sillymoose/Perl6-One-Liners - yay, something fun to contribute to!
17:38 tadzik timotimo: yeah, should :)
17:39 tadzik just ipv4 now, will fix it Soon[tm]
17:39 panchiniak joined #perl6
17:39 timotimo OK, thanks :)
17:40 Mouq arnsholt: Maybe if you have one of `proto token {prefix,infix,postfix}` but no candidates?
17:40 Mouq Or no, wait
17:40 Mouq I have no clue :P
17:40 arnsholt No, looks like the termstack is somehow empty...
17:40 * arnsholt tries updating NQP
17:42 arnsholt Nope >.<
17:44 Mouq arnsholt: Empty as in it's called as EXPR_reduce([], @opstack)?
17:54 arnsholt Aha!
17:54 arnsholt I had a postcircumfix with :assoc<left>, which made it look for TWO operands
17:54 arnsholt Setting :assoc<unary> fixed it
17:58 TimToady interesting failure mode
18:00 arnsholt Yeah, a bit =)
18:00 * TimToady notes that you can only get in this situation if you specify your associativity directly, rather than just cloning the attributes of an existing operator
18:01 arnsholt True. This is in NQP for my Python compiler though, so I think I have to do it directly =)
18:01 TimToady ah
18:01 arnsholt In fact, I don't think Rakudo's grammars have an EXPR by default
18:02 TimToady nope, one is expected to supply one's own bottom-up parsers
18:02 arnsholt Quite
18:02 arnsholt I'm considering contributing a post on that for this year's advent calendar, in fact
18:03 arnsholt Basically a simplistic clone of NQP's EXPR in Perl 6
18:03 TimToady at one point I went through STD's EXPR and marked the six or so lines that were Perl 6 specific
18:03 TimToady but we never did anything with that
18:08 gfldex joined #perl6
18:12 KCL_ joined #perl6
18:15 shlomif joined #perl6
18:16 erkan joined #perl6
18:18 araujo joined #perl6
18:26 64MAA11YR joined #perl6
18:32 arnsholt jnthn++ # NQP and QAST and things in general
18:37 perltricks joined #perl6
18:39 timotimo oh yes
18:40 arnsholt Doing this Python stuff in NQP is turning out to be pretty feasible, for a rough draft at least
18:40 timotimo that's nice :)
18:42 arnsholt Working on function definitions now
18:42 perltricks A collection of Perl6 one liners: https://github.com/sillymoose/Perl6-One-Liners contributions, feedback welcome!
18:43 timotimo perltricks: i went ahead and posted that about an hour ago :)
18:43 timotimo some of these perl5 one-liners are ... just lol.
18:44 timotimo as in:
18:44 timotimo perl6 has a primitive that turns that into basically a single method call or two
18:44 perltricks ahh cool, thanks. Yeah I suspect that many of my translations are verbose due to my P6 ignorance
18:44 timotimo oh
18:45 timotimo no, i meant the *original* perl5 lines :)
18:46 perltricks lol yeah. objective #1 is to get a decent translation of most of the original P5 ones. #2 would be to add some new chapters
18:47 perltricks this is my fave so far: perl6 -e 'print ("0".."z").roll(15)'
18:47 timotimo hum. 0..z, eh?
18:47 timotimo m: say @("0".."z")
18:47 camelia rakudo-moar f8f6fe: OUTPUT«0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z␤»
18:48 timotimo well, that doesn't really surprise me
18:48 timotimo i suppose it could be what you want? %)
18:48 perltricks yes, psw generator
18:48 perltricks for example
18:48 timotimo m: say roll "0".."z", 15
18:48 camelia rakudo-moar f8f6fe: OUTPUT«===SORRY!===␤No such method 'pred' for invocant of type 'Range'␤»
18:48 kjs_ joined #perl6
18:48 timotimo m: say roll 15, "0".."z"
18:48 camelia rakudo-moar f8f6fe: OUTPUT«v l c K 1 k > ? : D 2 e V q O␤»
18:48 timotimo this version avoids havign to put ( ) around the range
18:49 anaeem1 joined #perl6
18:49 guru joined #perl6
18:50 perltricks timotimo: hah! very nice. It gets addictive
18:53 timotimo hah :)
19:05 anaeem1 joined #perl6
19:05 Mouq perltricks: Oh, you === sillymoose?
19:05 Mouq I made you a PR :) https://github.com/sillymoose/Perl6-One-Liners/pull/1
19:05 perltricks Mouq: yeah guilty
19:06 TimToady timotimo: p5 is getting signatures now, which is arguably p6-inspired
19:06 perltricks Mouq: thanks!
19:07 timotimo TimToady: method signatures, and heavily cut down as well, AFAICT
19:07 timotimo wait. no. subroutine signatures*
19:08 TimToady m: say roll "0".."z": 15
19:08 camelia rakudo-moar f8f6fe: OUTPUT«E S K n H j : m V i S q L C Q␤»
19:09 perltricks Mouq: merged, so much nicer without $*ARGFILES
19:09 timotimo oh, we have that now, too
19:09 timotimo perltricks: yeah, the point of argfiles is that you don't have to spell it out
19:09 tony-o m: say roll 'a'..'z':15
19:09 camelia rakudo-moar f8f6fe: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/HJQgSAUqhYâ�¤Two terms in a rowâ�¤at /tmp/HJQgSAUqhY:1â�¤------> [32msay roll 'a'..'z'[33mâ��[31m:15[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or meta-…»
19:09 TimToady arguably somewhat obfuscated
19:09 tony-o m: say roll 'a'..'z': 15
19:10 camelia rakudo-moar f8f6fe: OUTPUT«i r d r m c y w q d r e i s b␤»
19:10 perltricks TimToady: thanks, adding to examples!
19:10 TimToady arguably somewhat obfuscated, with that complicated of an object expressoin
19:19 vendethiel joined #perl6
19:20 psch joined #perl6
19:20 psch hi #perl6 o/
19:21 timotimo heyo psch
19:21 psch m: say set( set(1,2), set(2,3))
19:21 camelia rakudo-moar f8f6fe: OUTPUT«set(set(1, 2), set(2, 3))␤»
19:21 psch \o timotimo
19:22 Ven joined #perl6
19:22 psch i was scared that invocation of set would be weird, re the discussion yesterday.  it's not though :)
19:22 vendethiel .tell masak http://www.ccs.neu.edu/home/dherman/research/papers/esop08-hygiene.pdf
19:22 yoleaux vendethiel: I'll pass your message to masak.
19:22 vendethiel o/, #perl6.
19:26 psch m: say "hi { (.tc, '/', $_ ~ 'dethiel' given "ven") }"
19:26 camelia rakudo-moar f8f6fe: OUTPUT«hi Ven / vendethiel␤»
19:26 * psch .oO( not only for regexes )
19:26 Ven yes
19:26 Ven wat
19:26 timotimo jnthn: would it be bad if i were to give spesh a second pass that does set squishing?
19:27 psch Ven: i saw masa(q|k) doing regex-y things somewhen in the backlog... :P
19:27 Ven please :(
19:31 ab5tract joined #perl6
19:32 masak joined #perl6
19:32 masak ohayo, #perl6
19:32 yoleaux 19:22Z <vendethiel> masak: http://www.ccs.neu.edu/home/dherman/research/papers/esop08-hygiene.pdf
19:32 masak so hygiene!
19:32 vendethiel such macro
19:32 vendethiel and so on and so forth
19:32 * masak pushes URL onto growing to-read list
19:32 masak still can't access feather :/
19:32 masak though I saw in the backlog that Juerd++ was fixing things
19:33 masak I have a different error message now: "ssh: connect to host feather.perl6.nl port 22: Network is unreachable"
19:33 Juerd Sorry, fysical box crashed
19:33 Juerd Just replaced the PSU and it's now fsck'ing
19:33 vendethiel masak: you don't say :/. I think I've been suffering from a severe burnout. I've like 15 commits this month, compared to 100 commits previous months
19:33 Juerd s/fy/phy/
19:34 masak Juerd: wow. ok.
19:34 Juerd Let's hope it's entirely unrelated to the kernel upgrade that was necessary earlier :P
19:34 masak vendethiel: yeah, rest periods are important. I'm feeling the weight of $work and the lack of vacation, too.
19:35 vendethiel masak: problem is.. I've had vacations. I went to apw. It was great. But now I'm even more tired than before
19:36 jnthn Just don't take a vacation taht give you enough jetlag you need several days to recover after... :P
19:36 timotimo :)
19:36 nine vendethiel: I have to admit, while workshops are awesome and inspiring, they are not exactly vacation. I was at LPW last weekend and really want to bulldoze through work. But there's no energy...
19:37 Juerd Aaaaand feather's up again
19:37 masak vendethiel: I'm sorry, I have no automatic global fixes to this. but make sure you do something about it, is my suggestion.
19:37 vendethiel nine: haha. I'd still do it again :-)
19:37 Juerd Just expect a lot of slow IO while everything's still booting.
19:37 hugme joined #perl6
19:37 masak Juerd++!
19:37 Juerd The host has a load of 10 now
19:37 Juerd (1 minute avg)
19:37 nine vendethiel: same here ;) Just trying to say: workshops are no substitute for real time off
19:38 vendethiel indeed.
19:38 jnthn Workshops are not restful at all for me. :P
19:38 masak joined #perl6
19:39 nwc10 I only found the workshop restful once we got to the hackathon, and basically Denis did a wonderful job of taking care of everything
19:39 jnthn Typically, I lose sleep preparing presentation, then lose sleep drinking beer, which makes my sleep worse, then it's so fun to see people that I talk with them until 2am, and then I get home happy and exhausted. :P
19:39 masak \o/ feather!
19:39 vendethiel nwc10: thanks for your work <3
19:39 nine What's also not restful: coming home from work and having to work on a master's thesis just to satisfy some arbitrary minimum pages requirement...
19:39 nwc10 (and to be fair, pepl did a wonderful job of keeping everything roughly under control at the workshop proper)
19:39 timotimo welcome back, le masaque!
19:39 [Coke] joined #perl6
19:40 jnthn nine: Bigger font? ;)
19:40 nwc10 nine: is there a maximum font size you're permitted to use?
19:40 nwc10 (more words, took longer to type)
19:40 nwc10 line spacing?
19:40 nine jnthn: comforting to hear that I'm not the only one losing sleep over the things you mentioned ;)
19:40 nwc10 k e r n i n g ?
19:40 nine There's a latex template we have to use, so not much room for typographical adjustments
19:41 nwc10 crafty buggers
19:41 masak nwc10: kemming! :P
19:41 masak er, keming*
19:42 nwc10 is it Friday?
19:42 masak almost
19:42 timotimo Intemational Keming Dæ?
19:42 tadzik joined #perl6
19:43 nwc10 jnthn: have you considered going to Tivoli for your next holiday?
19:44 jnthn nwc10: So queue! :( So Danish lager! :(
19:44 colomon joined #perl6
19:44 jnthn So no, that doesn't really appeal :P
19:45 timotimo jnthn: in spesh's optimize_bb we iterate through all "children" of a BB; that's a tree, yes?
19:45 PerlJam joined #perl6
19:45 timotimo we don't optimize_bb the same bb twice?
19:45 jnthn timotimo: Specifically, iirc, walk over the dominance tree
19:45 jnthn timotimo: Whcih has some nice properties
19:45 timotimo ah
19:45 jnthn but yes, once per bb
19:45 virtualsue joined #perl6
19:46 timotimo good
19:47 psch i think i don't quite understand how lexical symbols and lexical containers interact
19:47 psch the "copy and adjust stuff from somewhere else"-method brought me the following:
19:47 jnthn (Generally worth knowing, is that pred/succ on BBs are about linear order, whereas parent/child is about dominance)
19:47 psch $ ./perl6 -e'my sub a { 1 }; &a := { 2 }; say &a() ~ " " ~ a'
19:47 psch 2 1
19:48 psch so binding to the container clearly works, but i'd have to rebind stuff to the symbol, because symbol and container are not identical
19:49 jnthn psch: You're really not meant to rebind subs...we probalby should whine about that.
19:49 timotimo dominance is about what other BBs are impacted by changes in registers or something?
19:49 psch jnthn: there's a ticket somewhere that says we should be able to, iirc.  or maybe it's just tests that assume we should be able to
19:49 psch jnthn: we currently die with X::Bind "Cannot bind to this RHS"
19:50 timotimo "to this RHS"?
19:50 psch err, LHS :)
19:50 timotimo are we supporting R:= now? :)
19:51 * timotimo reads the wikipedia article on SSA and is enlightened
19:51 jnthn psch: If we can't forbid that, we can't inline, and if we can't inline, we're screwed, so... :)
19:51 timotimo AFAIK we're not doing any BB-spanning optimizations yet, is that correct?
19:51 timotimo (unless you count changing branching ops into gotos or throwing them out as "spanning BBs")
19:51 psch jnthn: oh, alright.  i guess throwing out the tests is the thing to do, if anything
19:56 perltricks Hey was the -f option from S19 dropped?
19:57 PerlJam perltricks: what did -f do?
19:58 perltricks oh sorry I meant "-F". I think it was to specify the autosplit expression
19:59 perltricks maybe with methods like .words, .chars etc it was considered unnecessary?
20:00 PerlJam often one wants to split on ":" or "|" or something instead, so I doubt .words caused it to go away
20:00 psch perltricks: it's there, under "Unchanged Syntactic Features".  it might be NYI though
20:00 PerlJam was it ever actually implemented?
20:01 psch there is this shiny new cli opt parser PR sitting around... :)
20:03 psch although that's probably only slightly related
20:04 telex joined #perl6
20:07 psch oh.  nevermind the "toss the tests" bit above.  those aren't testing for subs but for &-lexicals
20:07 psch binding to &-lexicals doesn't work right now, because they are wrapped in a QAST::Op(:op<ifnull>).  i'm not sure walking past that could break anything, but it did pass the tests.
20:08 hugme joined #perl6
20:08 psch apparently the assumption that 'sub a { }' and 'my &a = { }' are equivalent was wrong on my part
20:09 [Sno] joined #perl6
20:11 spider-mario joined #perl6
20:15 moritz m: sub a { }; &a := sub { 42 }; say a()
20:15 camelia rakudo-moar f8f6fe: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/6QSoYc9l15â�¤Cannot use bind operator with this left-hand sideâ�¤at /tmp/6QSoYc9l15:1â�¤------> [32msub a { }; &a := sub { 42 }[33mâ��[31m; say a()[0mâ�¤    expecting any of:â�¤        postfix…»
20:15 moritz m: sub a { }; &a = sub { 42 }; say a()
20:15 camelia rakudo-moar f8f6fe: OUTPUT«Cannot modify an immutable Sub␤  in block <unit> at /tmp/j0eqrKN_Q_:1␤␤»
20:16 psch m: my &a = { }; &a := { 1 }; say a();
20:16 camelia rakudo-moar f8f6fe: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/DTOr0RmcAeâ�¤Cannot use bind operator with this left-hand sideâ�¤at /tmp/DTOr0RmcAe:1â�¤------> [32mmy &a = { }; &a := { 1 }[33mâ��[31m; say a();[0mâ�¤    expecting any of:â�¤        postfixâ�¤ …»
20:18 ab5tract joined #perl6
20:23 ugexe nqp: sub f3 ($x, $y?, $text?) { if ! nqp::defined($y) && ! nqp::defined($text) { say('ok 4 # unpassed optional args are undef'); } else { say('ok ', $x - $y, $text); } }; f3(2); f3(8,3, ' # optional args get passed values');
20:23 camelia nqp-jvm: OUTPUT«(signal ABRT)»
20:23 camelia ..nqp-{moarvm,parrot}: OUTPUT«ok 4 # unpassed optional args are undef␤ok 5 # optional args get passed values␤»
20:23 sergot joined #perl6
20:23 ugexe ^ does that mean the test here can be uncommented? https://github.com/perl6/nqp/blob/a0842ef500e25616862f56c5c43c017283f70da6/t/nqp/22-optional-args.t#L16
20:25 ugexe its in regards to using 'defined' on an optional subroutine argument
20:28 kurahaupo joined #perl6
20:30 [Coke] nqp doesn't have fudging, so the test will fail on jvm.
20:38 denis_boyun_ joined #perl6
20:42 japhb OOC, why is nqp-jvm ABRT'ing?
20:43 PerlJam Why doesn't nqp have fudging?  Has it just not been needed?  Or, is it just that the bang/buck ratio isn't there for the 1 or 2 tests that would benefit from it
20:43 PerlJam ?
20:44 Mouq Request: Request Supply methods that are sensitive to arity. Specifically, .tap and .act
20:44 Mouq s:2nd/Request//
20:47 [Coke] PerlJam: IME, it's that we rely on rakudo's testing to catch issues in nqp
20:47 [Coke] "fix fast, forget fudge"
20:48 tony-o .tell froggs thank you for Tuxic, this slang stuff is getting interesting
20:48 yoleaux tony-o: I'll pass your message to froggs.
20:51 bbkr joined #perl6
20:52 bbkr hi. is Promise object available somehow within start { } scope?
20:53 PerlJam bbkr: you mean the one that start is creating for you?
20:53 bbkr yes
20:53 tony-o bbkr: start returns a promise
20:53 PerlJam I doubt it.  But you can make your own Promise and use that with start
20:53 timotimo tony-o: that's not what he wants :)
20:54 moritz bbkr: just curious, what would you use it for?
20:54 timotimo PerlJam: the big benefit of using the start mechanism is that you get the promise keep/break thing "guaranteed" because it handles leaving the block for you
20:55 bbkr I have a sub that takes $task param that should be ran on thread. and within that sub it may fail... so I need Promise.vow there to break promise.
20:55 tony-o m: await start { sleep 1; 'here'.say; }; '/here'.say;
20:55 camelia rakudo-moar f8f6fe: OUTPUT«here␤/here␤»
20:55 FROGGS joined #perl6
20:55 tony-o timotimo: oic ^^
20:56 bbkr what do you meen by guaranteed? how to break promise from the start block?
20:57 bbkr my $p = start { oops_something_went_wrong }; await $p; # expect $p to be Broken
20:57 moritz bbkr: but if you simply die() from the start block, the promise will be broken
20:58 tony-o m: my $p = start { die 'dead'; }; await $p; $p.kept.say;
20:58 camelia rakudo-moar f8f6fe: OUTPUT«===SORRY!===␤dead␤»
20:58 bbkr I've tried that
20:58 moritz m: my $promise = start { die 42 }; say try $promise.result
20:58 camelia rakudo-moar f8f6fe: OUTPUT«Nil␤»
20:58 moritz m: my $promise = start { die 42 }; say try $promise.result; say $!
20:58 camelia rakudo-moar f8f6fe: OUTPUT«Nil␤42␤  in block  at /tmp/XmyRMv9cUH:1␤  in block  at src/gen/m-CORE.setting:20730␤  in block  at src/gen/m-CORE.setting:20522␤␤»
20:58 tony-o m: my $p = start { die 'dead'; }; await $p; $p.result.say;
20:58 camelia rakudo-moar f8f6fe: OUTPUT«===SORRY!===␤dead␤»
20:58 tony-o m: my $p = start { $p.break; }; await $p; $p.result.say;
20:58 camelia rakudo-moar f8f6fe: OUTPUT«===SORRY!===␤Access denied to keep/break this Promise; already vowed␤»
20:59 PerlJam $promise.status will tell you Kept/Broken
20:59 PerlJam (IIRC)
20:59 moritz m: my $promise = start { die 42 }; await $promise; say $promise.status
20:59 camelia rakudo-moar f8f6fe: OUTPUT«===SORRY!===␤42␤»
20:59 moritz m: my $promise = start { fail 42 }; await $promise; say $promise.status
20:59 camelia rakudo-moar f8f6fe: OUTPUT«===SORRY!===␤Could not find symbol '&Return'␤»
20:59 PerlJam huh
21:00 PerlJam that second one is surely LTA
21:00 masak agreed.
21:00 masak please submit.
21:00 Mouq m: await (start { die }).then({.status.say})
21:00 camelia rakudo-moar f8f6fe: OUTPUT«Broken␤»
21:00 tony-o is there a slang tutorial or is that a good topic
21:00 arnsholt Bah. Python's scoping rules are annoying >.<
21:01 PerlJam um ... I'm not currently in a state where I can easily submit a rakudo bug
21:01 masak arnsholt: yes.
21:01 masak arnsholt: I can only imagine they're annoying to implement, too.
21:01 masak PerlJam: I'll do it.
21:01 arnsholt Also, interact annoyingly with how I wanted to implement them too
21:01 * masak submits rakudobug
21:02 Mouq Did camelia ignore me?
21:02 arnsholt But any problem can be solved with another layer of indirection
21:02 Mouq m: await (start { die }).then({.status.say})
21:02 camelia rakudo-moar f8f6fe: OUTPUT«Broken␤»
21:02 arnsholt (In this case, another grammar rule)
21:02 bbkr that method will be ok, thanks!
21:02 arnsholt Which is needed to force a new NQP-level scope =D
21:04 bbkr r: my $p = Promise.new; $p.start( {die} );
21:04 camelia rakudo-moar f8f6fe: OUTPUT«Invocant requires a type object, but an object instance was passed␤  in method start at src/gen/m-CORE.setting:20726␤  in block <unit> at /tmp/tmpfile:1␤␤»
21:04 camelia ..rakudo-parrot f8f6fe: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared name:â�¤    Promise used at line 1â�¤â�¤Â»
21:05 bbkr what is "type object" ?
21:05 moritz m: my $p = Promise.start( {die })
21:05 FROGGS o/
21:05 yoleaux 20:48Z <tony-o> FROGGS: thank you for Tuxic, this slang stuff is getting interesting
21:05 camelia rakudo-moar f8f6fe: ( no output )
21:05 moritz bbkr: Promise is a type object. As is Int or Str
21:06 masak m: given Str { unless .defined { say "it's probably a type object!" } }
21:06 camelia rakudo-moar f8f6fe: OUTPUT«it's probably a type object!␤»
21:06 moritz bbkr: that is, an object that represents the actual clas
21:07 masak or role, or enum, or subtype.
21:09 masak 'night, #perl6
21:10 masak 'night, feather
21:10 Mouq 'night masak
21:10 bbkr I see. A bit misleading error message - type object or object instance is passed implicitly to .start body. I thought error was about passed param inside - {die} in this case.
21:11 kjs_ joined #perl6
21:17 tony-o FROGGS: is there docs for slangs or am i best to look at tuxic and STD ?
21:18 FROGGS tony-o: no docs yet, because we are still just doing experiments
21:18 FROGGS Tuxic and v5's Perl5.pm might do
21:19 bbkr another riddle... why "await ($p).then(-> $p { say $p.status});" does not print die that happens in Promise while "$p.then(-> $p { say $p.status}); await $p" prints it?
21:20 bbkr r: my $p = Promise.start( { die 666 } ); $p.then(-> $p { say $p.status}); await $p;
21:20 camelia rakudo-moar f8f6fe: OUTPUT«Broken␤===SORRY!===␤666␤»
21:20 camelia ..rakudo-parrot f8f6fe: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared name:â�¤    Promise used at line 1â�¤Undeclared routine:â�¤    await used at line 1â�¤â�¤Â»
21:22 FROGGS tony-o: I said a little bit about slang here: http://irclog.perlgeek.de/perl6/2014-11-10#i_9638493
21:22 FROGGS (and the following lines)
21:22 lizmat joined #perl6
21:24 woolfy joined #perl6
21:25 Mso150 joined #perl6
21:25 * Mouq is going to have something on doc.perl6.org soon-ish about using slangs now
21:26 timotimo \o/
21:26 btyler_ sub prefix:<&>($thing) { OpaquePointer.new($thing.WHERE) } # level of "omg no", 1-10? 7?
21:26 Mouq timotimo: Soonish = a few days
21:26 tony-o Mouq: can i get a sneak preview ?
21:27 tony-o i'm having a lot of trouble trying to figure out where i'm falling short
21:27 timotimo that's good enough :)
21:27 Mouq tony-o: Heh, uh, ok, it's very rough, but I'll pm you
21:28 FROGGS btyler_: 10, because .WHERE can change
21:29 btyler_ FROGGS: doh, ok
21:29 btyler_ thanks
21:29 timotimo FROGGS: don't we pin objects when we get a .WHERE?
21:29 FROGGS btyler_: so do not even think about pointers that point to things managed by a GC :o)
21:29 timotimo or does that require an nqp:: op?
21:29 arnsholt Whoa. Functions! \o/
21:30 FROGGS timotimo: I am not sure
21:30 timotimo arnsholt: is this the future?!
21:30 FROGGS m: my $a; say $a.WHERE; my @a = ^10_000; say $a.WHERE
21:30 camelia rakudo-moar f8f6fe: OUTPUT«32877560␤32877560␤»
21:30 FROGGS m: my $a; say $a.WHERE; my @a = ^10_000_000; say $a.WHERE
21:31 camelia rakudo-moar f8f6fe: OUTPUT«39377912␤Memory allocation failed; could not allocate 1048576 bytes␤»
21:31 FROGGS m: my $a; say $a.WHERE; my @a = ^100_000; say $a.WHERE
21:31 camelia rakudo-moar f8f6fe: OUTPUT«42548216␤42548216␤»
21:31 FROGGS hmmm
21:31 FROGGS I dunno
21:31 timotimo you can force_gc
21:32 FROGGS m: my $a; say $a.WHERE; nqp::force_gc; say $a.WHERE
21:32 camelia rakudo-moar f8f6fe: OUTPUT«51006456␤51006456␤»
21:32 FROGGS m: my $a; say $a.WHERE; nqp::force_gc; nqp::force_gc; say $a.WHERE
21:32 camelia rakudo-moar f8f6fe: OUTPUT«45579256␤45579256␤»
21:32 timotimo m: my $a; say $a.WHERE; nqp::force_gc for ^100_000; say $a.WHERE
21:32 FROGGS looks like it is stable not
21:32 btyler_ encouraging
21:32 FROGGS now*
21:32 jnthn .WHERE is not stable
21:32 jnthn Or designed to be
21:32 FROGGS see :o)
21:32 jnthn Use .WHICH if you need a persistent identifier for an object.
21:32 camelia rakudo-moar f8f6fe: OUTPUT«(timeout)34139128␤»
21:32 timotimo m: my $a; say $a.WHERE; nqp::force_gc for ^1_000; say $a.WHERE
21:32 camelia rakudo-moar f8f6fe: OUTPUT«37665784␤37665784␤»
21:33 timotimo jnthn: if you rely on this, you'll get into some massive trouble ... but that's your own fault in that case :D
21:33 jnthn timotimo: Right. :)
21:33 FROGGS gnight
21:33 timotimo gnite froggs!
21:33 btyler_ night FROGGS, thanks for the pointer
21:33 jnthn About "die" inside of start, yes, it gives a broken Promise. But using "await" unpacks and rethrows any exception.
21:34 jnthn So you don't lose it.
21:34 jnthn That's usually a good thing. :)
21:34 arnsholt timotimo: See head of snake repo if you're interesting (since it looks like there's no commitbot)
21:34 arnsholt s/interesting/interested/ # =D
21:35 timotimo i am very interesting!
21:35 timotimo oh ...
21:35 timotimo :S
21:35 btyler_ jnthn: is there a way to get something suitable for initializing OpaquePointer? .WHICH seemed a good fit there. mostly I'm stumbling around trying to figure out how to do ** in NativeCall
21:36 PerlJam for some reason I expect 'head of snake' to come with GI Joe puns
21:36 timotimo arnsholt: i was expecting to see example code in the t/ folder :)
21:37 btyler_ see: https://libgit2.github.com/docs/guides/101-samples/#repositories_init_simple . I have it "working" by essentially doing "my $repo := OpaquePointer.new(OpaquePointer.new().WHICH);" and feeding that to git_repository_init
21:37 jnthn Oh, that likely won't work out well at all
21:38 timotimo oh yikes
21:38 jnthn I think the usual idiom there is to exploit a one element pointer array being the same as a pointer to a pointer.
21:38 timotimo yeah
21:38 btyler_ I think I used that trick but with a single member struct for the discount bindings
21:38 btyler_ and felt like I was cheating horribly
21:40 * lizmat waves to jnthn
21:41 * jnthn waves over the sund to lizmat
21:41 jnthn lizmat: Fine journey?
21:41 lizmat yeah, the ferry accidentally had some delay, so we made it just on it and it left
21:42 lizmat just after we boarded
21:42 jnthn occasionally, delays work out useful :)
21:42 lizmat yup...
21:44 lizmat so all in all it was just an 11 hour trip, with a visit to friends in Groningen for lunch  :-)
21:44 anaeem1 joined #perl6
21:45 jnthn Not bad.
21:49 ab5tract TimToady: last night's discussion of composers vs coercers inspired me, the result of which is enough writing to fill a blog post on the distinction
21:50 ab5tract i guess i'll have to start a blog now :)
21:52 woolfy1 joined #perl6
22:07 kjs_ joined #perl6
22:11 ab5tract next time i will make sure to consult the relevant synopses before getting so excited
22:16 arnsholt timotimo: Yeah, I've been neglecting t/
22:16 arnsholt Should probably do something about that...
22:17 kjs_ joined #perl6
22:21 tony-o i'm still getting connect refused from panda, is something happening going on?
22:31 timotimo that would be not so awesome
22:31 timotimo i wanted to run a perl6-bench, which requires installing lots of modules as dependencies
22:31 timotimo well, not really that many
22:34 ugexe panda is working for me
22:36 arnsholt Oh. FFS, Python. Whether a list has elements or not has consequences for whether the iterator variables are defined or not >.<
22:38 timotimo "the iterator variables"?
22:38 timotimo you mean iter([]) gives an undefined object back?
22:38 timotimo as in... None?
22:39 arnsholt No
22:39 arnsholt for x in thing: ...
22:39 arnsholt If thing is empty, x is undefined
22:40 arnsholt And accessing it will throw an exception
22:40 arnsholt If thing is non-empty, accessing x after the loop will work find
22:40 arnsholt *fine
22:40 timotimo aaaah
22:41 arnsholt Exactly!
22:41 arnsholt =)
22:41 timotimo tony-o: need to turn off ipv6 support
22:42 timotimo tadzik: maybe panda wants to learn how to retry with a different protocol or something?
22:43 * arnsholt heads sleepwards
22:43 arnsholt G'night!
22:43 timotimo gnite arnsholt!
22:44 lizmat good night, arnsholt
22:45 * lizmat also is very tired and definitely had too many Baileys
22:45 lizmat so good night, #perl6!
22:45 timotimo :)
22:48 timotimo tony-o: you can write 193.200.132.135    feather.perl6.nl  ← this line into your /etc/hosts
22:49 timotimo actually ... that doesn't work
22:50 timotimo yeah, i get "connection refused"
22:50 timotimo even with v4-only tools and stuff
22:50 timotimo tadzik, what's wrong?
22:52 rurban joined #perl6
22:53 rurban1 joined #perl6
22:53 tony-o ugexe: are you able to connect with 'panda update' ?
22:55 ugexe no
22:59 tadzik timotimo: should be all good now
23:00 timotimo thank you
23:01 tadzik another feather reboot brought it down before
23:01 timotimo ah
23:01 timotimo where can i find the code for the daemon and the cron job that updates the metadata list thingie?
23:03 timotimo tadzik: also, you should probably bring the link to the smoke report up to date
23:06 espadrine` joined #perl6
23:09 raiph joined #perl6
23:12 panchiniak left #perl6
23:14 eternaleye joined #perl6
23:20 kjs_ joined #perl6
23:22 woolfy1 left #perl6
23:23 bbkr joined #perl6
23:25 colomon_ joined #perl6
23:33 jfredett joined #perl6
23:35 tadzik timotimo: in /home/tjs on feather, heh :)
23:53 regreg joined #perl6

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

Perl 6 | Reference Documentation | Rakudo