Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-04-23

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

All times shown according to UTC.

Time Nick Message
00:00 TimToady unless constant accepts that in the name slot, which I tend to doubt
00:03 MasterDuke_ thanks, that helps. was looking at https://rt.perl.org/Public/Bug/Display.html?id=113954 and trying to figure which parameters needed to be checked for spaces
00:03 samcv TimToady, yeah i assume all his are Artistic-2.0, i think he might have said that in channel actually
01:49 ilbot3 joined #moarvm
01:49 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
04:14 geekosaur joined #moarvm
06:34 domidumont joined #moarvm
06:39 domidumont joined #moarvm
07:35 samcv ok guys. so now i need to think about the indexic op. and how to return the information about how long the haystack match it found was.
07:36 samcv not sure what our choices are. but we need to return the index of the located needle's beginning in haystack.
07:36 samcv we also need to convey how many haystack chars expanded or just return back the index of the last cp of the match
07:37 samcv but more important is do i have it return an array object? or what? how do we handle returning multiple values i know uhm
07:38 samcv i know with radix we return an array
07:38 samcv where out[0] is the numerical value of the radix number, out[1] is the number of digits converted
07:38 samcv and out[2] is the offset after consumisg digits
07:40 samcv not sure why it returns both number of cp's converted and the offset afterward, is that for convenience?
07:40 samcv or is there something i'm not thinking of and why we do that. MasterDuke_ do you know
07:40 samcv https://github.com/perl6/nqp/blob/master/docs/ops.markdown#radix or can out[2] be always determined from out[1] + the offset it was handed off
07:41 samcv but i could do it exactly the same way as radix. and then it would be consistent as well
07:44 lizmat samcv: I think that would be a good start  :-)
07:57 BinGOs joined #moarvm
08:02 timotimo joined #moarvm
08:21 samcv lizmat, :)
08:22 samcv testing now on the eqatic op... cause i know if i mess it up i can actually launch up nqp and rakudo still :) and not have it die horribly with crazy errors
08:22 samcv my @list := nqp::eqatic('stst', 'stst', 0); say(@list[0] ~ " " ~ @list[1])
08:22 samcv get back "1 2" woo
08:22 samcv 1st is boolean on if it matched or not, second is the number of cp's the haystack expanded in the check
08:22 samcv nice.
08:22 samcv i dream of a day where this works :)
08:23 samcv m: say 'sta' ~~ m:i/st/
08:23 camelia rakudo-moar f9ebd2: OUTPUT: «「sta」␤»
08:23 samcv getting closer every month
08:25 lizmat samcv: so it's returning an array of opaque Ints ?  rather than a list_i ?
08:25 samcv uh. it's doing the exact same that uhm
08:25 samcv radix does
08:25 lizmat ah, this is nqp, not Perl 6
08:25 samcv well it'd still work in perl6 just like radix does
08:26 samcv but it's box int
08:26 samcv result = MVM_repr_alloc_init(tc, MVM_hll_current(tc)->slurpy_array_type);
08:26 samcv does that depend on the HLL in effect nqp vs perl6:?
08:26 samcv just copy pasting from radix heh
08:27 lizmat samcv: please ignore me, should have looked up nqp::radix more closely
08:27 lizmat afk&
08:27 samcv np
09:27 timotimo samcv: in theory we could have an nqp:: op with multiple w registers
09:27 samcv hm
09:27 timotimo i just don't know how the rest of moar and nqp and rakudo will handle that :D
09:27 samcv k
09:27 samcv well help me with something
09:27 samcv lemme push this nqp branch
09:27 timotimo uh oh
09:28 samcv you know more about this..
09:28 samcv i am flying basically blind i have no clue how this works. or uh
09:28 samcv https://github.com/samcv/nqp/commit/3090cd79e4fd0e2822f265f40590d69e3824267b
09:29 samcv so i made a $o0 register. or something like that. holds objects. since now nqp::eqatic returns an object
09:29 samcv and i want to shift the first element of this array into the integer regestir that the eqatic op *used* to put the result directly into it
09:29 samcv how do
09:30 timotimo wow, my face when i restart the computer and chrome looks totally different
09:30 samcv ok so it pushes to @ins, this op() thingy
09:30 samcv and the left thing is always the op
09:30 samcv the 2nd arg is the register the **result** is put into? yes or no
09:31 samcv i'm just guessing here. as i am very confused
09:31 timotimo from a register standpoint you are essentially "reading a register" here
09:31 timotimo even though you are mutating the object that is pointed at by the register
09:31 samcv uhm so the eqaticop takes what's in $s0
09:31 samcv and puts result into $i0
09:32 samcv yes or no
09:32 samcv and %!reg<tgt> holds idk. and %!reg<pos. holds the haystack start position sent to eqatic?
09:32 samcv err or tgt is the string
09:32 timotimo um, i don't know? what does your moarvm patch look like?
09:32 samcv eqatic('string', 'string2', %!reg<pos)
09:32 samcv it returns an array
09:33 samcv and shift works on it
09:33 samcv same type of array radix returns
09:33 samcv with two elements
09:33 timotimo oh, now i think i see how your stuff looks
09:33 samcv 1st element is the normal return value of eqatic
09:34 timotimo well, if you're changing the type of register for the first one in eqatic, you'll need a deprecation cycle or something
09:34 samcv so i need to get that first item in the array into where the return value used to go
09:34 samcv it's only used in that one
09:34 samcv place in nqp
09:34 timotimo OK
09:34 samcv it was only added in like 1 month ago
09:34 samcv before it was inaccessible completely inside nqp or rakudo
09:35 timotimo i think you have shift reversed
09:35 samcv yeah idk what i'm doing
09:35 timotimo shift_o             w(obj) r(obj)
09:35 timotimo i'll have to afk in a little bit
09:35 samcv ok
09:36 samcv ok so look at the register to see how it lines up with that
09:36 timotimo i don't see why we wouldn't use a list_i for this task, though
09:36 samcv i don't either
09:36 timotimo if you're already unpacking it in the compiler anyway
09:36 samcv i've never worked with MVMObjects that are lists in Moar before
09:36 timotimo i.e. if we don't expect any user to ever write nqp::eqatic in their code
09:36 timotimo no problem, you just use the functions in reprconv.h
09:37 samcv also what's bad about a list_i. you can use list_i normally right. well as list_i's i've used them before
09:38 timotimo yeag
09:38 timotimo you konw how to create one inside moarvm?
09:38 samcv nope
09:38 timotimo you'll want the BOOTIntArray
09:39 timotimo grep for other uses of that and you'll be able to steal code i bet
09:39 timotimo BBL
09:51 timotimo don't forget you'll have to change the type of the register in the oplist and regenerate all the files from that
09:55 AlexDaniel joined #moarvm
09:57 samcv i did that already yeah
09:58 timotimo OK
11:38 jnthn samcv: Yeah, I'm happy with AL2; I really need to get around to going through all of my modules and doing housekeeping
11:38 jnthn (Making sure they all have license, META.info => META6.json in a few, etc.)
13:14 Ven joined #moarvm
15:32 ggoebel joined #moarvm
16:08 domidumont joined #moarvm
18:01 samcv kk thx jnthn
18:47 Ven joined #moarvm
18:49 samcv jnthn, not sure what's going on with this license https://github.com/jnthn/json-path
18:50 samcv it says MIT (X11) but the license text is clearly the MIT one. since the X11 license contains a clause about not advertising products and mentioning Xorg foundation in the promotion of it or something
18:50 samcv so not relevant, and text is the standard MIT
19:13 jnthn I've no idea :)
19:13 jnthn I co-authored that module with masak long ago and he added the LICENSE file, and we did it as a port of the Perl 5 module
19:14 jnthn And seem to have inehrited the license from that
19:14 jnthn Thanks for all the PRs :)
19:14 jnthn samcv++
19:15 samcv :-)
19:15 samcv well the text of the license is the MIT license
19:16 samcv it says MIT license. but in one place says MIT (X11)
19:16 samcv and X11 is the MIT license but an extra clause about advertising related to Xorg foundation. which clearly is ridiculous applied to this project
19:16 samcv so i'm guessing it was unintentional
19:16 geekosaur I would consider that a historical thinko
19:16 geekosaur the X11 license used to be the best known example of the MIT license
19:17 samcv *an* MIT license? cuase they added a cluase right?
19:17 samcv argh can't type
19:19 jnthn Feels like historical accident, yes
19:19 geekosaur it's complicated >.> much of X11 was still under MIT license for a couple decades
19:19 jnthn If you're PRing, I guess could remove the X11 mention given that isn't what the actual license is
19:21 samcv yeah
19:21 samcv i checked the full text of it against MIT to make sure no differences just to be extra sure
19:23 samcv basically like writing `BSD 2 clause (3 clause) license`
19:23 samcv which is confusing
19:56 geekosaur joined #moarvm
20:17 zakharyas joined #moarvm

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