Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-01-12

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

All times shown according to UTC.

Time Nick Message
00:10 samcv nice jnthn i have the aliases working now :-D
00:20 samcv timotimo, how do i warn the user if they use the unicode 1 names in \c
00:20 samcv what mvm command is it?
00:20 samcv err function
00:20 timotimo warn, eh? that'd be outputting to stderr
00:21 samcv yeah what MVM function does that?
00:22 timotimo not sure we actually have one? you could do the equivalent of nqp::sayfh(nqp::getstderr(), "oh no!")
00:22 samcv well what does nqp warn call?
00:22 samcv it just prints to stderr?
00:22 timotimo oh, you were actually hoping to throw a proper warning
00:22 timotimo that's an exception of a special kind being thrown
00:22 samcv well i don't care much about that
00:23 samcv well maybe i do. you tell me
00:23 timotimo if you do it via the warn mechanism it'll be silencable via "quietly"
00:23 samcv and what is that in MVM?
00:24 timotimo i don't actually know
00:24 timotimo for most things like that we register a function via the HLL mechanism that we just invoke, if i'm not mistaken
00:25 timotimo (though that means the op that does it has to be marked invokish, if i'm not mistaken)
00:31 samcv and fprintf(stderr, "") would be bad because you couldn't quiet it right
00:31 samcv is there a way to check if we are running quietly?
00:32 timotimo "quietly" works by installing an exception handler for warnings that just doesn't print the warning
00:32 timotimo warnings are implemented as resumable exceptions
00:32 timotimo the default handler prints and resumes, quietly installs one that just resumes
00:32 samcv ah kk
00:33 samcv would it be the worst thing ever to just print to stderr?
00:33 samcv especially since i don't think anybody is actually using this in practice
00:34 samcv though i guess it won't print the line number. eh
00:35 samcv but i mean we use it in cursor, so i really think it would be shitty to handle it on the nqp side
00:35 timotimo we can try with the different throw ops we have
00:35 samcv let me know how i would do that and i'll try it out
00:36 pyrimidine joined #moarvm
00:36 timotimo or implement something very similar to the throw_adhoc_* functions, but "just" set a WARN category on the exception?
00:36 timotimo i'm not sure if that handles resumption properly?
00:36 timotimo exceptions are definitely a weak part of my moar knowledge
00:39 samcv how do i do quietly?
00:39 samcv yeah no it doesn't resume
00:39 samcv ===SORRY!===
00:39 samcv LINE FEED (LF) << Unicode 1 names are depreciated. Please use LF or LINE FEED
00:43 samcv ===SORRY!===
00:43 samcv In lookup of Unicode character by name, Unicode 1 names are depreciated.
00:43 samcv "LINE FEED (LF)"⏏
00:43 samcv Please use LF or LINE FEED
00:44 samcv this is not the worst error message i guess
00:44 samcv would like it not to kill the program but
00:45 timotimo how do you do that right now?
00:47 samcv MVM_exception_throw_adhoc(tc,
00:47 samcv "In lookup of Unicode character by name, Unicode 1 names are depreciated.\n\"%s\"⏏ \nPlease use LF or LINE FEED", cname);
00:47 timotimo yeah, that's a regular exception
00:47 timotimo we'd need a different function that's able to set the category to WARN
00:47 samcv yeah. how 2 warn? or can i not yet?
00:47 samcv ah kk
00:48 samcv i'm going to try and optimize it so that it takes as little time as possible for non depreciated characters
00:48 samcv to do the check
00:48 timotimo sounds like a good idea, i suppose
00:49 samcv yeah
00:49 timotimo i can totally imagine a workload where we'd want to create a whole lot of chars from string descriptions
00:49 samcv strcmp is not as fast as i'd like
00:49 timotimo always use strncmp please :)
00:49 timotimo just a knee-jerk reaction
00:50 samcv we use strcmp for another thing but it is not user input text
00:50 samcv so yeah strncmp would be good
01:27 pyrimidine joined #moarvm
01:38 Geth MoarVM: samcv++ created pull request #497: Remove Unicode 1 names and add Unicode Name Aliases
01:38 Geth MoarVM: review: https://github.com/MoarVM/MoarVM/pull/497
01:40 samcv timotimo, https://github.com/MoarVM/MoarVM/pull/497/files#diff-cda4ff10539b46b0e2dc52e15c75f6d9R115 if you want to see what i did
01:42 samcv and PR description explains all the changes to functionality
02:01 [Coke] samcv: it's deprecated, not depreciated.
02:01 samcv oops. k
02:08 samcv this is nice though, like can do \c[ZWJ] for ZERO WIDTH JOINER and a bunch of other ones
02:12 samcv heh
02:12 samcv # PADDING CHARACTER and HIGH OCTET PRESET represent
02:12 samcv # architectural concepts initially proposed for early
02:12 samcv # drafts of ISO/IEC 10646-1. They were never actually
02:12 samcv # approved or standardized: hence their designation
02:12 samcv # here as the "figment" type. Formal name aliases
02:12 samcv # (and corresponding abbreviations) for these code
02:12 samcv # points are included here because these names leaked
02:12 samcv # out from the draft documents and were published in
02:12 samcv # at least one RFC whose names for code points was
02:12 samcv # implemented in Perl regex expressions.
02:12 samcv sorry for the big paste
02:13 samcv so i guess Perl implemented a non-finalized unicode standard in their regex and so those are now listed in the aliases :P
02:14 samcv can now do "\c[NBSP]" as well. nice
02:16 samcv interestingly because no characters names can change since unicode 2, there are many corrections in the alias names file. so that's really good for us to support them
02:16 samcv Corrections for serious problems in the character names # haha
02:23 samcv m: say 0xFE18.uniname
02:23 camelia rakudo-moar 8f3476: OUTPUT«PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET␤»
02:24 samcv hehehe misspelled!
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
02:52 pyrimidine joined #moarvm
03:02 geekosaur joined #moarvm
03:15 timotimo i dont know how to grab urls with this android ssh client
03:20 timotimo heres a q gor ypu
03:20 timotimo we encode as ascii and then we strlen
03:21 timotimo but doesnt the size parameter give us that value?
03:21 timotimo samcv ^
03:22 samcv uhm the strlen is for the user suppled one
03:22 samcv oh you mean in the table?
03:22 samcv you mean the length of cname right?
03:23 timotimo yes
03:23 samcv yeah. it does look like that.
03:23 samcv thanks
03:24 timotimo was like tgat before your diff
03:24 timotimo but it jumped out at me
03:24 timotimo but damn code review on a phone... never again
03:24 samcv yeah it was there so i decided to leave it
03:27 timotimo ill return to a proper computer and check the rest of the code
03:27 timotimo later
04:12 pyrimidine joined #moarvm
04:16 timotimo +    for (int i = 0; i < num_unicode_namealias_keypairs; i++) {
04:16 timotimo we have pedantic (or something) turned on, so we'll need to have the "int i" outside of the for loop (at the beginning of the block, before any code lines)
04:16 samcv it compiles fine?
04:17 samcv i can still move it if you wish though
04:17 timotimo it doesn't compile on travis, and won't compile on jnthn's machine
04:17 samcv ah
04:17 geekosaur it compiles fine if you are using gcc or some other compile with c++ extensions in c mode
04:17 timotimo (because ancient MSVC somehow became a design choice)
04:17 samcv ah ok will fix then
04:17 timotimo thanks for putting up with that BS :)
04:40 timotimo i'm going to bed now. i'm already quite late again
04:44 samcv night!
04:44 timotimo nity night
05:43 pyrimidine joined #moarvm
06:27 pyrimidine joined #moarvm
06:47 pyrimidine joined #moarvm
07:06 domidumont joined #moarvm
07:13 domidumont joined #moarvm
07:55 Geth MoarVM/even-moar-jit: 36f1fe9460 | (Bart Wiegmans)++ | src/jit/linear_scan.c
07:55 Geth MoarVM/even-moar-jit: Resolve ordering of synthetic tiles
07:55 Geth MoarVM/even-moar-jit:
07:55 Geth MoarVM/even-moar-jit: Synthetic tiles do not have a 'proper' order number in the list, which
07:55 Geth MoarVM/even-moar-jit: could potentially cause a situation in which a live range was defined
07:55 Geth MoarVM/even-moar-jit: and expired prior to its use (causing it to be overwrritten). By
07:55 Geth MoarVM/even-moar-jit: doubling the tile index and adding a +1/-1 bias for synthetics we use
07:55 Geth MoarVM/even-moar-jit: the additional number space to ensure a correct ordering.
07:55 Geth MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/36f1fe9460
07:59 pyrimidine joined #moarvm
08:04 pyrimidine joined #moarvm
08:26 zakharyas joined #moarvm
08:45 pyrimidine joined #moarvm
08:48 brrt joined #moarvm
08:48 brrt good * #moarvm
08:48 brrt the commit above solves my headache issue
08:49 brrt to be honest, almost amazingly elegantly, too
08:54 brrt (if there's no space on the number line, just double it)
08:58 zakharyas joined #moarvm
09:01 arnsholt Classic Cantor hotel solution =)
09:25 * brrt is not aware of cantor hotel solution?
09:25 brrt hmm, hang on, cantor is a mathematicion isn't he
09:29 arnsholt Yeah, worked on infinity
09:29 arnsholt There are a bunch of problems like this, but the one I always remember is:
09:29 brrt just a question
09:29 brrt am i overengineering the JIT?
09:29 arnsholt The Hotel Cantor is a hotel with an infinite number of rooms, all of which are occupied.
09:30 arnsholt Then a tour bus arrives, with an infinite number of new guests.
09:30 arnsholt How do you allocate rooms to both the existing and new guests, so that everyone gets a room?
09:31 arnsholt The solution being to allocate the existing guests from room n to room 2n, and put the new guests in the odd numbered rooms, which arae now free =)
09:31 brrt :-)
09:31 brrt cool
09:31 arnsholt As to your question of overengineering: I have no idea, sorry =)
09:32 brrt well, that was the comment i got when i explained this solution to a colleague
09:33 lizmat it's always a fine line between delivering incomplete early and never delivering complete
09:33 lizmat afk&
09:35 brrt hmmm, fair point
09:36 samcv have you guys gotten Cannot bind attributes in a VMNull type object ?
09:36 samcv i haven't been paying attention, got it on uh. MVM from yesterday or maybe day before?
09:37 samcv checked my server saw those messages
09:37 samcv which uses threading and other things
09:38 brrt haven't recently seen that… no
09:40 masak arnsholt: Hilbert's Hotel, actually
09:46 arnsholt masak: Oh, right!
09:47 pyrimidine joined #moarvm
09:49 masak my main takeaway from that "paradox" is that if you want to treat countable-infinity as a cardinal, then you'll also have to get used to the fact that it doesn't behave exactly like finite ones
09:49 masak the whole "proper subset of itself" in particular is new
09:50 masak it's a "paradox" because people go "but... but that's *impossible*". no, it's not. it's consistent. it's cardinality, Jim, but not as we know it
10:03 masak most likely it's to do with the fact that actual infinities don't occur in our everyday lives, at least not so obviously
10:10 brrt :-)
10:10 brrt the line between proper and over-engineering is a fine one…
10:10 brrt and how do you know on which side of the line you are?
10:11 nwc10 both sides. at the same time.
10:11 nwc10 (dear scrollback, some point I'll get to you)
10:11 jnthn It gets worse. Proper engineering takes longer than over-engineering, because a simple but sufficient design is hard.
10:11 nwc10 mmm yes, good insight
10:11 nwc10 not thought of that
10:12 nwc10 jnthn: I locally merged master into your ASAN-whatever-it-was branch
10:12 nwc10 and have spectest6 going again and again in a loop
10:12 nwc10 oh, *interesting*
10:12 nwc10 spectest6 doesn't exit false if it fails
10:12 nwc10 mmm, bugh
10:12 nwc10 anyway, it *had* been going in a loop for 12 hours
10:12 nwc10 but now I can't tell you if it actually failed
10:13 nwc10 because I had assumed that it would stop on failure
10:14 jnthn d'oh
10:15 nwc10 yep
10:15 nwc10 oh, actually
10:15 nwc10 hangon
10:15 nwc10 it *is* good
10:15 nwc10 because IIRC if ASAN aborts the test *harness* script
10:15 nwc10 then make exits with failure
10:15 jnthn Oh :)
10:15 nwc10 so if it's been looping for 10 hours
10:15 jnthn Wow
10:15 nwc10 it means that there have been neither ASAN failures
10:16 nwc10 nor those other strange "method not found" errors
10:16 jnthn And this was with the branch fix-inline-and-threads?
10:16 nwc10 which I'm starting to wonder if those were "random new thing has arrived in the same memory as a stale pointer"
10:16 nwc10 yes, that branch
10:16 nwc10 with master merged into it
10:16 jnthn OK
10:16 jnthn Hmmm
10:16 jnthn I wonder why I was getting occasional SEGV yesterday
10:16 nwc10 ie, that branch seems to fix stuff
10:16 nwc10 OK. mmm.
10:16 nwc10 not seen them
10:17 jnthn My SEGVs looked totally different from anything to do with what the branch fixed
10:17 jnthn Will have to do fresh builds of stuff just in case.
10:20 samcv jnthn, if we run out of synthetic graphemes what happens
10:20 pyrimidine joined #moarvm
10:20 brrt jnthn: true, but there are hordes of engineering managers who furiously disagree
10:20 brrt (re: 'proper' engineering)
10:25 jnthn samcv: All the negative numbers = space for over 2 billion synthetics. Each synthetic allocates a struct to store info about the synthetic. Once you factor in the trie entry and synthetic metadata, there's easily 100 bytes of data stored per synthetic, perhaps more. If we used the full synthetic space that'd be 214 gigabytes of RAM used.
10:25 jnthn I think we're going to run out of memory before the run out of synthetic graphemes. :)
10:26 samcv nice
10:26 nwc10 other question - what's the shortest UTF-8 representation of the sequence of code points needed to generate the 2**31 synthetics
10:27 nwc10 which might start with "what's the shortest sequence of NFC codepoints needed to generate 2**31 synthetics?"
10:27 samcv well that many base characters
10:27 samcv at least
10:27 nwc10 I can't remmeber how many combining accents are part of NFG
10:27 nwc10 it has to be at least 2**32 code points
10:28 samcv well we can combine 2 different accents
10:28 nwc10 yes, but I forget
10:28 nwc10 1) how many base characters
10:28 samcv so let's say it's 1 + 1, 1 + 2, so round to 1+ 1.5
10:28 nwc10 2) how many combining code points (I think it's 2000 at most)
10:28 samcv the base chars are enough to be irrelevant
10:28 samcv msotly
10:28 samcv well i guess they are if you want to check every possible thing
10:29 nwc10 my *guess* to get to 2**31 was you'd need every permuation of base, accent, accent
10:29 nwc10 ie 6 billion code points
10:29 nwc10 but I never did the maths properly
10:30 nwc10 and basically any program that you can feed 6 billion code points to - you probably already had a DOS attack there :-)
10:33 samcv jnthn, oh and you missed conversation, but my newest PR it throws and kills the MoarVM and idk if we have a way to continue execution
10:33 samcv but i have the alias names implemented, and we have a nice error message when anybody use the Unicode 1 names
10:33 jnthn Hm, where did the error handling for that get put?
10:33 samcv since I think we need to do that at least for a little while just in case anybody is using them
10:33 jnthn I think a warning might be best
10:34 samcv just adhoc
10:34 samcv how 2warn
10:34 jnthn Just have MoarVM throw over not recognized
10:34 samcv tell me and i will do it
10:34 jnthn Put a CATCH inside of the place we do the lookup
10:34 jnthn Then check if it's one of the bad names and warn
10:34 jnthn That is, do it at Perl 6 level, not Moar level.
10:34 samcv it will fail to compile
10:34 jnthn What will?
10:35 samcv well i guess maybe not if we do that. but
10:35 jnthn Oh, 'cus \c[...] is compile time
10:35 samcv it is
10:35 samcv yep
10:35 jnthn Still, at some point we must call down to the OP
10:35 samcv see https://github.com/MoarVM/MoarVM/pull/497
10:35 jnthn *op
10:35 jnthn And we must be able to CATCH that error
10:36 jnthn Probably the best bet is to just let it die in NQP
10:36 jnthn And in Perl 6's actions override the action method for \c[...]
10:36 samcv uhm but we call it directly in cursor
10:36 jnthn And handle the error there, and call .worry
10:36 samcv i guess i could write a bunch of things eh
10:36 jnthn In Cursor?
10:37 samcv actions i mean
10:37 jnthn Where?
10:37 jnthn Yes
10:37 samcv https://github.com/MoarVM/MoarVM/pull/497/files#diff-cda4ff10539b46b0e2dc52e15c75f6d9R129
10:37 samcv see this
10:37 jnthn And Rakudo already inherits from the actions in NQP
10:37 samcv yep
10:38 jnthn Yes, I'm saying that this code could go inside of the actions
10:38 samcv yeah i can do that tomorrow
10:38 samcv that works for me i guess. since nobody else is using moarvm
10:38 jnthn But NQP doesn't have a compiler warning mechanism
10:39 jnthn So I think it'd need to be Rakudo specific
10:39 samcv but rakudo inherits it?
10:39 jnthn Yes
10:39 samcv so how to make it specific?
10:39 jnthn Just a method override
10:39 jnthn Rakudo's regex actions inherit from the NQP ones.
10:39 samcv ah ok
10:39 samcv gotcha
10:39 samcv makes sense
11:25 pyrimidine joined #moarvm
11:41 pyrimidine joined #moarvm
11:47 pyrimidine joined #moarvm
13:09 pyrimidine joined #moarvm
13:41 pyrimidine joined #moarvm
14:07 pyrimidine joined #moarvm
14:14 FROGGS joined #moarvm
14:54 hoelzro joined #moarvm
14:55 pyrimidine joined #moarvm
14:57 hoelzro joined #moarvm
15:09 pyrimidine joined #moarvm
15:16 njmurphy joined #moarvm
15:19 pyrimidine joined #moarvm
15:42 pyrimidine joined #moarvm
15:56 pyrimidine joined #moarvm
16:08 pyrimidine joined #moarvm
16:17 Geth MoarVM: MasterDuke17++ created pull request #498: Convert MVM_malloc+memset to MVM_calloc
16:17 Geth MoarVM: review: https://github.com/MoarVM/MoarVM/pull/498
16:37 pyrimidine joined #moarvm
17:00 TimToady .
17:04 pyrimidine joined #moarvm
17:19 pyrimidine joined #moarvm
17:25 pyrimidine joined #moarvm
18:32 pyrimidine joined #moarvm
18:37 domidumont joined #moarvm
19:02 pyrimidine joined #moarvm
19:17 pyrimidine joined #moarvm
19:44 zakharyas joined #moarvm
20:05 pyrimidine joined #moarvm
20:31 zakharyas joined #moarvm
20:35 Ven joined #moarvm
21:04 Ven joined #moarvm
21:32 pyrimidine joined #moarvm
21:37 Ven joined #moarvm
22:04 Ven joined #moarvm
22:09 pyrimidine joined #moarvm
22:24 Ven joined #moarvm
22:44 Ven joined #moarvm
23:04 Ven joined #moarvm
23:11 pyrimidine joined #moarvm
23:24 Ven joined #moarvm
23:27 pyrimidine joined #moarvm
23:43 Ven joined #moarvm
23:45 pyrimidine joined #moarvm

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