Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2016-12-29

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

All times shown according to UTC.

Time Nick Message
01:06 samcv anybody here? MVMGrapheme32 this holds just a codepoint right, since we store codepoints in 32 bit integers
01:40 timotimo no, more than a codepoint
01:41 timotimo samcv: because we create synthetic codepoints that represent graphemes that unicode didn't allocate a codepoint for
01:41 samcv ah
01:42 samcv so that grapheme holds the whole grapheme?
01:44 timotimo yup
01:44 timotimo we hang the extra information off of some fancy datastructure
01:45 samcv ok so in string compare we need to check if it has property Mark or Mn Mo Mc
01:45 samcv and if so, to compare the next character after
01:45 samcv err codepoint
01:45 samcv only if the characters are the same after the diacritic do we need to compare based on diacritic/mark
01:46 samcv if you saw what i was saying in #perl6
01:46 timotimo we don't implement codepoint-level strings, though
01:46 samcv we need some way to be able to compare two graphemes though
01:47 timotimo oh, you mean for cases when we have a + umlaut vs ä?
01:47 timotimo but strings in moar are always in NFG
01:47 timotimo that's NFC + some extra magic
01:47 timotimo so if two graphemes are equal, they are also the same codepoint
01:47 samcv well ä > b
01:47 samcv or can be. not sure about that specific case
01:47 timotimo oh, *compare*
01:48 timotimo i thought you meant only equality checks
01:48 samcv m: say  'ä' cmd 'b'
01:48 camelia rakudo-moar ea67ce: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> say  'ä'⏏ cmd 'b'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier␤…»
01:48 samcv yeah no
01:48 samcv m: say  'ä' cmp 'b'
01:48 camelia rakudo-moar ea67ce: OUTPUT«More␤»
01:48 samcv j: say  'ä' cmp 'b'
01:48 camelia rakudo-jvm 8ca367: OUTPUT«More␤»
01:48 samcv in nqp we call MVM_string_compare
01:48 samcv and it checks by grapheme
01:48 samcv for the cmp command
01:50 samcv but it only checks if the graphemes are < each other
01:50 samcv and that doesn't take anything into account
01:50 samcv except the internal representation of them
01:51 timotimo ah
01:51 timotimo yeah, that's wrong
01:51 samcv yeah :(
01:51 timotimo we ought to compare the graphemes to 0 and get the nfg info for the individual characters
01:51 timotimo you should be able to find more about that in ops like "baseord" or "basecharord" or whatever it's called
01:51 samcv compare to 0?
01:51 timotimo yeah, synthetic graphemes are negative
01:52 samcv ah
01:52 samcv m: say 'ä'.NFC
01:52 camelia rakudo-moar ea67ce: OUTPUT«NFC:0x<00e4>␤»
01:52 samcv m: say 'ä'.NFG
01:52 camelia rakudo-moar ea67ce: OUTPUT«No such method 'NFG' for invocant of type 'Str'␤  in block <unit> at <tmp> line 1␤␤»
01:52 samcv m: say 'ä'.NFD
01:52 camelia rakudo-moar ea67ce: OUTPUT«NFD:0x<0061 0308>␤»
01:52 samcv m: say 'ä'.NFCK
01:52 camelia rakudo-moar ea67ce: OUTPUT«No such method 'NFCK' for invocant of type 'Str'␤  in block <unit> at <tmp> line 1␤␤»
01:52 samcv m: say 'ä'.NFKC
01:53 camelia rakudo-moar ea67ce: OUTPUT«NFKC:0x<00e4>␤»
01:53 samcv m: say 'ä'.NFKD
01:53 camelia rakudo-moar ea67ce: OUTPUT«NFKD:0x<0061 0308>␤»
01:53 samcv i suspected as much, we need to compare NFD
01:54 samcv so timotimo NFG stores it as uh? more like NFD or NFC
01:55 samcv m: say 'ä'.ords
01:55 camelia rakudo-moar ea67ce: OUTPUT«(228)␤»
01:56 timotimo NFG is NFC + a bit more
01:56 samcv ok
01:56 samcv so we would need to decompose them then
01:56 timotimo we'd have to decompose all everything ever
01:56 timotimo not just synthetics
01:56 timotimo but you already know that i guess
01:56 timotimo i'm packing and getting to bed, because ... super tired
01:56 samcv we can always check if the character is Mn Mo Mc
01:57 samcv and only then decompose
01:57 timotimo oh, fair enough
01:57 samcv oh wait
01:57 timotimo anyway, functions with _nfg_ in their name probably help figuring this out while i'm gone
01:57 samcv m: 'ä'.uniprop
01:57 camelia rakudo-moar ea67ce: ( no output )
01:57 samcv m: 'ä'.uniprop.say
01:57 camelia rakudo-moar ea67ce: OUTPUT«Ll␤»
01:57 timotimo and the grapheme iterator ought to help you not mess up moving along the a and b strings
01:58 samcv there must be another property that tests decomposition
01:58 samcv and if the character decomposes, we should decompose it and check the property of the codepoints
01:58 timotimo right. maybe you can find it in our implementation of NFD or NFKC?
01:58 samcv yeah that seems the right way™
01:58 samcv if there's no decomposition then we should be fine
01:58 samcv until we implement unicode collation algorithm ;P
01:59 samcv which is very complex
01:59 timotimo the composed grapheme takes on the properties of the base character
01:59 timotimo that may be ... interesting
01:59 timotimo i must afk now, else i'll fall over
02:00 samcv well that's true timotimo that's not very relevant
02:00 samcv it is interesting though
02:01 samcv well relavant but we can ignore that, since we will check decomposition
02:01 samcv m: "ȧ".uniprop('NFD_QC').say
02:01 camelia rakudo-moar ea67ce: OUTPUT«␤»
02:01 samcv m: "ȧ".uniprop('NFD_Quick_Check').say
02:01 camelia rakudo-moar ea67ce: OUTPUT«␤»
02:02 samcv m: "ȧ".uniprop-bool('NFD_Quick_Check').say
02:02 camelia rakudo-moar ea67ce: OUTPUT«False␤»
02:02 samcv i don't think that works atm
02:02 samcv at least for uniprop
02:03 samcv m: 0x03D3.uniprop('NFD_QC').say
02:03 camelia rakudo-moar ea67ce: OUTPUT«␤»
02:03 samcv yea
02:05 mojca joined #moarvm
02:18 samcv seems we don't have a property to check if a character changes on decomposition
02:18 samcv looking at the normalization code
02:18 samcv we have NFC and NFD quickcheck properties but they only tell us what form it's CURRENTLY in
02:19 samcv not whether or not it changes on decomp
02:21 samcv i could be wrong though, just looking at this quickly but i don't see anything there
02:21 samcv but we could also just use the unicode collation algorithm which assigns values to each character
02:22 samcv and for now just implement it not completely which should be good for most cases
02:22 samcv i.e. just look up the priority of said NFC codepoint and then apply that priority
02:23 samcv TimToady, thoughts on the Unicode Collation algorithm? should cmp on two strings use it to compare?
02:34 samcv m: 'ȧ'.ord.base(16)
02:34 camelia rakudo-moar ea67ce: ( no output )
02:35 samcv m: 'ȧ'.ord.base(16).say
02:35 camelia rakudo-moar ea67ce: OUTPUT«227␤»
02:35 samcv m: 'ȧ'.uniname.say
02:35 camelia rakudo-moar ea67ce: OUTPUT«LATIN SMALL LETTER A WITH DOT ABOVE␤»
02:37 samcv m: say (0x0EC0.chr ~ 0x0EDF.chr).chars
02:37 camelia rakudo-moar ea67ce: OUTPUT«2␤»
02:48 ilbot3 joined #moarvm
02:48 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
04:04 hoelzro joined #moarvm
07:57 domidumont joined #moarvm
08:02 domidumont joined #moarvm
08:34 pyrimidine joined #moarvm
09:10 domidumont joined #moarvm
10:21 dogbert2 joined #moarvm
10:28 pyrimidi_ joined #moarvm
10:36 TimToady joined #moarvm
10:36 avar joined #moarvm
11:19 samcv any moarvm hackers around?
11:51 domidumont joined #moarvm
11:54 pyrimidine joined #moarvm
12:20 jnthn samcv: I sorta am...
12:21 jnthn Just left a comment on the PR
12:24 samcv oh hey
12:24 samcv what name to make it then?
12:25 samcv MVM_string_uni_cmp?
12:25 samcv err compare
12:30 jnthn Just commented on that
12:30 jnthn I was thinking about op as in the MoarVM op
12:31 jnthn The C function I don't mind quite so much :)
12:31 jnthn fwiw, adding an op is adding to src/core/oplist (there's instructions at the top), running tools/update-ops.p6 or so, and then adding an entry to interp.c
12:32 jnthn Also, not changing the existing thing will probably make your debugging easier. :-)
12:32 samcv ah kk
12:32 jnthn If you're getting really weird errors, I *think* precedence comparison uses cmp_s
12:32 jnthn (In the parser)
12:32 samcv ah
12:33 samcv XD
12:33 jnthn Meaning if it's busted enough you might get some *really* interesting parses :D
12:33 samcv yeha i got some weird things
12:33 samcv uni_cmp i kind of like better i think. i mean. i think it should be used anytime you want to do a unicode compare. not just a generic string compare
12:34 samcv as for the op though
12:34 samcv we would want a possibility of having a language
12:34 samcv and to choose which levels to take into account
12:34 samcv there's 3
12:35 jnthn Guess an int register for the level is easy :)
12:35 jnthn Language..hmm :)
12:35 samcv i'm thinking
12:35 samcv country + language code
12:35 samcv like en_US etc
12:36 samcv rakudo can implement something nicer but for the op we should use that
12:36 jnthn Yeah, the op interface is pretty low level
12:36 samcv uhm
12:36 jnthn Note that we try to avoid _ in op names by convention (they're smash-case) except for type indicators (e.g. all the bigint things end in _I) and a prefix for ops that are spesh-emitted
12:36 samcv also level 1 doesn't take case into account
12:36 samcv level 3 does case
12:38 jnthn What would the default level be?
12:38 jnthn If we're changing cmp I guess 3 would be needed since it's case-sensitive today and I don't think we can go busting that. :)
12:39 samcv uhm
12:39 samcv level 2 is diacritic
12:40 samcv i think default is all 3 levels
12:40 samcv which is closest to str_cmp today
12:40 samcv though more like 0 levels
12:40 samcv but there are differences between any change in the characters
12:41 samcv also about the precidence thingy. jvm doesn't do cmp_s with the same precidence as moarvm
12:41 samcv *atm* at least
12:41 samcv but i think adding a new op is fine.
12:43 samcv By default, the algorithm makes use of three fully-customizable levels.
12:43 samcv customizableeee
12:43 samcv heh
12:43 samcv but i think just we want language and country code, plus some way to note if we either only want some leveles and not others
12:44 samcv and 4th level is basically “Whatever you want”
12:44 samcv which isn't a real level
12:44 samcv also jnthn how is the naming of the unicode properties
12:44 samcv MVM_COLLATION_PRIMARY
12:45 samcv i think makes it clear it's not a real normal unicode property. also since unicode properties rarely change
12:45 samcv and clear it's not available on anything but MVM
12:46 * dogbert2 is running a spectest with ~45k nursery ...
12:46 jnthn Hmm
12:46 jnthn It's OK, but will it end up accidentally exposed via uniprop somehow?
12:47 jnthn That said, I probably already ended up with us having an NFG_QC that is exposed that way...
12:47 samcv uhm
12:47 samcv no it doesn't
12:48 samcv well i added a new type for generation in ucdc.pl or whatever its name
12:48 samcv for generating integer properties
12:48 samcv since somehow it didn't exist before
12:48 jnthn OK
12:48 samcv which kind of sucked but
12:48 jnthn :)
12:48 samcv i somehow did it
12:48 samcv in one night
12:48 jnthn Think you've figured that script out better than I've managed to :)
12:48 samcv but i am getting better at that script
12:48 samcv slowly…
12:49 jnthn Yeah, I grokked it enough to put various things in (case mapping, primary composite table, etc.)
12:49 samcv i will need to eventually add a lot more comments
12:49 samcv nice
12:49 samcv but .uniprop('MVM_COLLATION_PRIMARY') will work
12:49 jnthn Hmm
12:49 samcv but shouldn't unimatch for anything
12:50 samcv since it's not an enum
12:50 jnthn So long as we don't spectest it it's not really in the language :)
12:50 samcv yeah
12:50 samcv i mean
12:50 samcv it's all uppercase and no unicode properties are
12:50 samcv antd MVM
12:50 samcv in front
12:50 jnthn Right :)
12:50 samcv plus it's nice to be able to check it for diagnostic purposes
12:50 jnthn Yes
12:51 jnthn We can do it that way for now; if we need a standard cross-backend abstraction for it later on, then we can cross that bridge then.
12:51 samcv yeah
12:51 samcv so uh how do i add an op?
12:51 jnthn I wrote that a few moments ago? :)
12:51 samcv oh
12:51 jnthn 12:31 < jnthn> fwiw, adding an op is adding to src/core/oplist (there's instructions at the top), running tools/update-ops.p6 or so, and then adding an entry to interp.c
12:52 samcv when
12:52 samcv oh
12:52 jnthn Well, 20 mins is maybe more than a few moments :)
12:52 samcv so add to that file. run that, then 3rd add entry to interp.c
12:52 samcv yeah
12:52 jnthn Yup
12:54 samcv ok renaming it and putting the old one back
12:54 samcv MVM_unicode_string_compare
12:54 samcv that can be changed fairly easily though right
12:54 samcv since nobody uses them but internal
12:54 jnthn The MVM_COLLATION_PRIMARY thing, you mean?
12:54 samcv oh no
12:54 jnthn Or function names?
12:55 samcv MVM_unicode_string_compare
12:55 jnthn Yeah
12:55 jnthn As long as you don't mark it MVM_PUBLIC then we can change it :)
12:55 samcv kk
12:55 jnthn We only really mark things up that way for embedding, extops, etc.
12:55 jnthn And there's no reason I can see to do that for what you're adding.
12:55 samcv yeha
12:56 jnthn Oh, there's a 4th step when you add an op, though its in the NQP repo: add a mapping to QASTOperationsMAST.nqp
12:56 jnthn (It's just a one-line addition; look for the cmp_s one)
12:56 jnthn (And then copy/tweak)
12:56 jnthn That makes the association between nqp::something and a MoarVM opcode
12:56 samcv how do i mark something optional
12:57 jnthn Optional where?
12:57 samcv in the ops
12:57 samcv in moar
12:57 jnthn Ah
12:57 samcv or is anything optional
12:57 jnthn There's no such thing :)
12:57 samcv kk
12:57 jnthn But you can always pass null or null_s as an operand
12:58 samcv maybe the levels can be
12:58 jnthn (for "no object here" and "no string here")
12:58 samcv 3 = do 3; 2 = do 2, 1 = do 1; 5= do 2+3
12:58 samcv 7 etc
12:58 samcv :)
12:58 samcv or uh
12:58 samcv oh yeah
12:58 samcv well
12:58 jnthn Maybe a bit field?
12:58 samcv we can just do 1 2 4
12:58 samcv idk
12:59 samcv like unix permisions
12:59 jnthn Yeah
12:59 samcv 1 2 4 i guess. idk
12:59 samcv and we can always add a 4th level
12:59 jnthn I somehow thought from them being levels then doing 3 would *subsume* doing 1 and 2
12:59 samcv oh
12:59 samcv not for a core op tho
12:59 samcv what if you don't care about the other parts
13:00 samcv and only want to compare that level
13:00 jnthn (I don't *know* and this is Unicode and I've no idea, I was guessing. :))
13:00 samcv you usually do. i mean
13:00 samcv you must do 1, but don't have to do 2 or 3
13:00 samcv so it says
13:00 samcv but
13:00 samcv yeah 1 is mostly assumed
13:01 samcv but if we are making an op that shouldn't change we should allow for the future of being able to do that
13:01 jnthn Anyway, if you should be able to pick and choose then I'd prefer a bit field (1/2/4 and you or them)
13:01 samcv cause uh
13:01 samcv 3rd level is mostly case for Latin alphabet
13:01 samcv other languages it will be different
13:01 samcv and probably more useful
13:01 samcv so do i set it as an integer?
13:01 jnthn Yes
13:02 samcv cool :) i like that
13:02 samcv and there is a made up 4th level that is custom on top of the other ones being basically their plus custom, though the 1st level isn't supposed to be really
13:02 samcv or it's not technically the unicode collation algorithm or something
13:03 samcv so int16 jnthn ?
13:04 jnthn Hmm
13:04 jnthn If we do that then we can only ever use a literal there
13:05 jnthn Whereas I think at the Perl 6 level we'll want to be able to compute that value
13:05 samcv modified:   lib/MAST/Ops.nqp
13:05 samcv modified:   src/core/oplabels.h
13:05 samcv modified:   src/core/oplist
13:05 samcv modified:   src/core/ops.c
13:05 samcv modified:   src/core/ops.h
13:05 samcv modified:   src/strings/ops.c
13:05 samcv modified:   src/strings/unicode_ops.c
13:05 samcv hmm
13:05 samcv that seemed to update everything
13:05 jnthn So r(int64) is probably better
13:05 samcv well i updated the ones in strings folder
13:05 jnthn Yes, the script updates various things :)
13:05 samcv nice
13:05 jnthn It'd be tedious otherwise :)
13:05 samcv ok will make it 64
13:06 samcv back in my day we looked up the unicode character properties out of a dictionary!
13:06 samcv or something idk
13:06 samcv didn't have computers
13:06 samcv uni_cmp_s           w(int64) r(str) r(str) w(int64) :pure
13:07 jnthn I'd prefer unicmp_s
13:07 jnthn food delivery, bbs
13:08 samcv i like that too
13:09 samcv better
13:09 samcv it's a unicmp not a cmp on a uni
13:12 * dogbert2 and the spectest is done, only t/spec/S32-io/socket-recv-vs-read.t caused problems (but we knew that could happen)
13:14 samcv ok so we want to do iso_3166 integers
13:14 samcv not strings, because names change etc
13:14 samcv numbers are stable
13:14 samcv well. countries names could change, or be renamed etc whatever but they have numbers
13:15 samcv don't think moarvm is the place for that, though i guess we could do it or resolve names and things
13:15 samcv jnthn, ?
13:17 dogbert2 guess jnthn is munching his food (bet it's Indian)
13:17 samcv w(int64) r(str) r(str) w(int64) w(int64) :pure # so 1ststring 2ndstring level integer_countrycode
13:17 samcv tho we want language too hmm
13:18 jnthn I'd go with the most stable thing, for the op level of things
13:18 samcv i mean en_US is easy enough
13:18 samcv yeah
13:18 samcv so then we want two fields
13:18 jnthn Sounds like
13:18 samcv so language then country last
13:18 samcv that sounds good
13:18 jnthn Aye
13:18 jnthn Lunch time here; back in a bit
13:18 samcv :)
13:19 jnthn dogbert2: Not Indian for lunch...though will make a cheese jalfrezi for dinner :D
13:19 jnthn dogbert2: If you're GC hunting, somebody filed a GC panic in the MoarVM issue tracker overnight you may be able to reproduce/golf :-)
13:19 jnthn &
13:19 * dogbert2 looks
13:20 dogbert2 hmm, Bailador
13:21 dogbert2 m: class SQLString { }; my $stringy = Str.^find_method("Stringy"); my $handler = $stringy.wrap(method () { SQLString.new(:str(callsame)) }); say "foo".Stringy # niner, Issue #412
13:21 camelia rakudo-moar 19df35: OUTPUT«(signal SEGV)»
13:23 samcv added this to nqp QAST::MASTOperations.add_core_moarop_mapping('unicmp_s', 'unicmp_s');
13:24 samcv MoarVM op 'unicmp_s' is unknown as a core or extension op
13:24 samcv gotta add that other place you said i think
13:25 samcv interp.c
13:30 samcv Unhandled exception: Bytecode validation error at offset 20, instruction 4:
13:30 samcv oh no. nqp
13:30 samcv does not like the opcodes changed i guess
13:30 samcv helppppp
13:34 lizmat samcv: fraid can't help you with that  :-(
13:35 pyrimidi_ joined #moarvm
13:37 geekosaur make sure you added it at the end instead of somewhere in the middle? (which would break every opcode after it)
13:38 samcv ah
13:38 samcv ok
13:38 samcv in moarvm or nqp
13:38 geekosaur moarvm
13:39 samcv which file. oplist or the MAST
13:40 lizmat samcv: i think oplist
13:41 samcv i get Unhandled exception: Bytecode validation error at offset 20, instruction 4:
13:41 samcv hmm
13:41 samcv gonna reset
13:46 samcv oh fuck
13:47 samcv ok. i messed up my nqp i think
13:47 samcv hahah
13:47 samcv let me see
13:47 samcv will use the rakudobrew
13:47 dogbert2 stupid question, what's the difference between 'make spectest' and 'make stresstest'? Looks as if the same tests are run
13:48 geekosaur last time I checked, there was a separate test directory for the stress tests, which spectest skips and stresstest runs
13:52 lizmat dogbert2 stress test runs the test marked "stress" in spectest.data
13:52 lizmat as well
13:52 dogbert2 aha, so more tests are being run than usual then
13:52 lizmat yup
13:52 lizmat about 100K more I think
13:53 dogbert2 cool, maybe I'll find something interesting
13:55 dogbert2 lizmat: how's your optimization work going, are you done with the arrays?
13:58 jnthn samcv: You need to add new ops near the end, but before the specializer ops (those starting sp_); I think the text at the top of oplist describes this.
13:58 samcv yeah i got that working
13:59 jnthn OK, cool
13:59 samcv interp.c doesn't matter right
13:59 jnthn The order?
13:59 samcv yeah
13:59 lizmat dogbert2: for now I'm done with arrays
13:59 jnthn Um...technically no but we try to keep them in order anyway
14:00 jnthn I think C compilers that don't do computed goto are still smart enough to see they can emit a jump table even when we disorder things though.
14:00 samcv what do i add to not pass any value?
14:00 samcv for the extra thingys we don't use
14:01 samcv or should nqp not complain
14:02 samcv and i prolly need to not just copy paste?
14:03 jnthn You'll need to pass the default values
14:03 jnthn Or write some fancier code-gen routine in NQP
14:03 jnthn That emits them when they're missing
14:04 jnthn But I guess we won't use the op in terribly many places, so can just pass values explicitly for now?
14:04 dogbert2 lizmat: what's your current target?
14:05 samcv https://github.com/samcv/MoarVM/blob/unicode_collation/src/core/interp.c#L1464
14:05 samcv do not know how to do…
14:05 samcv help :P
14:06 jnthn Hm, lemme find what you put in oplist
14:06 jnthn But I think that += 6 is wrong
14:06 samcv prolly all wrong haha
14:06 jnthn w(int64) r(str) r(str) r(int64) r(int64)
14:07 jnthn So here, the op operates on 5 registers
14:07 jnthn Registers are encoded as 2 bytes each
14:07 jnthn So needs to be cur_op += 10;
14:07 jnthn Otherwise we'll end up reading junk bytecode afterwards :)
14:08 samcv :)
14:08 samcv wooo!
14:08 samcv seems to work
14:08 jnthn Nice :)
14:08 jnthn Once you need the other args you can get them with the GET_REG macro
14:09 samcv uh in nqp i should make it so it ads them right
14:09 samcv and what to use for undef
14:09 jnthn Well, the latter two are integers
14:09 jnthn So just 0, but we pondered level 3 being the default
14:10 jnthn To see an example of an op that does a fancier nqp:: -> moar mapping and inserts a default value, grep for add_core_op('substr'
14:11 jnthn Or just write nqp::unicmp_s($str_a, $str_b, 4, 0) or whatever at the point of use :)
14:11 samcv level 3 = 7; so
14:11 samcv should be 7,0
14:12 samcv well
14:12 samcv 7,0,0
14:12 samcv aka all 3 levels plus no language and no country specified
14:12 jnthn hm, but the oplist entry is
14:12 jnthn w(int64) r(str) r(str) r(int64) r(int64)
14:12 jnthn That's taking two strings and two integers, not three?
14:12 samcv ah
14:12 samcv need to add one
14:12 samcv should be 3 integers
14:12 jnthn Yeah, and replace the 10 with a 12 :)
14:18 * samcv replaces with 10000
14:20 samcv where do i add those extra numbers?
14:22 jnthn Writing nqp::unicmp_s($str_a, $str_b, 7, 0, 0) already works, by this point? And you want it so you can just write nqp::unicmp_s($str_a, $str_b) ?
14:23 samcv yeah
14:24 jnthn Then in QASTOperationsMAST.nqp we'll need a smarter mapping function
14:24 samcv ah kk
14:24 samcv will that make it any slower?
14:24 jnthn The one for substr does something very similar
14:24 jnthn No, the insertion is at compile time
14:24 jnthn That is, we insert them when compiling the nqp:: op into MoarVM bytecode
14:24 jnthn So by runtime it's exactly the same
14:25 samcv kk
14:26 * jnthn away for a bit
14:29 samcv woo
14:29 samcv working :)
15:15 domidumont joined #moarvm
15:44 samcv jnthn, spectests pass!
15:44 samcv let me change some of my commit messages to be better
16:06 jnthn samcv: Nice! :)
16:06 nwc10 good UGT, #moarvm
16:07 jnthn o/ nwc10
16:20 dogbert2 jnthn: is it ok if we close https://github.com/MoarVM/MoarVM/issues/387 given the fact that it has been fixed?
16:35 jnthn Do we know that the underlying MoarVM segv was fixed?
16:35 jnthn That's what the ticket is addressing. We shouldn't SEGV in this case.
16:41 dogbert2 You mean that the original case should have worked and that binding should not be necessary?
16:41 dogbert2 m: multi sub cross() { }
16:41 camelia rakudo-moar 19df35: ( no output )
16:42 jnthn dogbert2: Well, an error also could have been OK in the original case
16:42 jnthn But not a SEGV
16:43 dogbert2 fair enough, in that case I suppose it is not fixed, just worked around :)
16:43 jnthn Unless the program involved is using NativeCall (in which case, all bets are off), Moar giving SEGV is always wrong. Even if what we were aked to do is bonkers. :)
16:43 jnthn right.
16:43 jnthn *asked
17:12 pyrimidine joined #moarvm
18:08 pyrimidine joined #moarvm
19:30 [Coke] Didn't I just see https://github.com/MoarVM/MoarVM/issues/475 in chat somewhere? hurm.
19:35 geekosaur [29 17:54:08] <jmerelo> Have you ever tried to define a constant like so: my constant this-is-constant = (1+sqrt(5))/2?
19:35 geekosaur in #perl6-dev
19:44 [Coke] so this ticket can probably be rejected as DIHWIDT.
19:46 geekosaur I think they filed it post discussion? but the discussion said to file a ticket requesting a recursion limit, not about this /per se/
19:46 geekosaur so reject and ask them to file the correct one
19:58 notviki [Coke]: discussion: https://irclog.perlgeek.de/perl6-dev/2016-12-29#i_13819854
20:27 samcv jnthn, everything is ready for merge :)
20:40 samcv ok so if anybody wants details uhm. the new change to moar and using that op for cmp in rakudo, is
20:40 samcv only 1% slower
20:43 samcv also anybody have thoughts about "C".uniprop<property>
20:43 samcv how do we handle that for other things
20:45 samcv oh i thought i was in perl6-dev
20:45 lizmat samcv: you need a uniprop() candidate that returns an object that does an AT-KEY
20:45 samcv what would happen for uniprop<thing otherthing>
20:46 samcv return a hash? the original spec called for uniprop to return a hash, which i think could be useful if you want to get like 6 properties
20:46 samcv at key is only one thing right
20:47 lizmat yeah, but building the hash could be expensive, no ?
20:48 lizmat m: sub a() { class { method AT-KEY($a) { $a.uc } }.new }; say a<foo bar>
20:48 camelia rakudo-moar 19df35: OUTPUT«(FOO BAR)␤»
20:49 samcv m: sub a() { class { method AT-KEY($a) { $a.uc } }.new }; say a<foo bar>.perl
20:49 camelia rakudo-moar 19df35: OUTPUT«("FOO", "BAR")␤»
20:49 lizmat m: sub a() { class :: does Associative { method AT-KEY($a) { $a.uc } }.new }; say a<foo bar>
20:49 camelia rakudo-moar 19df35: OUTPUT«(FOO BAR)␤»
20:49 lizmat m: sub a() { class :: does Associative { method AT-KEY($a) { $a.uc } }.new }; say a<foo bar>:p
20:49 camelia rakudo-moar 19df35: OUTPUT«()␤»
20:49 lizmat hmmm
20:49 lizmat m: sub a() { class :: does Associative { method AT-KEY($a) { $a.uc } }.new }; say (a<foo bar>:p)
20:49 camelia rakudo-moar 19df35: OUTPUT«()␤»
20:50 lizmat m: sub a() { class :: does Associative { method AT-KEY($a) { $a.uc } }.new }; say a<foo bar> :p
20:50 camelia rakudo-moar 19df35: OUTPUT«()␤»
20:50 lizmat hmmm
21:38 pyrimidine joined #moarvm
23:55 jnthn samcv: Bit too tired now to review the PR, but will do it when I wake up tomorrow :)
23:55 samcv jnthn, can you read the updated PR description?
23:55 samcv tell me if i need to add anything

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