Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-03-28

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

All times shown according to UTC.

Time Nick Message
00:58 MasterDuke timotimo: notice anything obvious in the diff?
01:07 timotimo i didn't notice the diff appeared :S
01:07 timotimo sorry
01:07 timotimo and now i'm in game
01:09 timotimo i can't see a problem in the diff :\
01:10 timotimo does it still give trouble when you just bindattr_i instead of bindattr_u?
01:10 timotimo i.e.: how far does it get?
01:10 MasterDuke hm, let me see
01:14 MasterDuke exact same error and backtrace
01:22 timotimo oh
01:22 timotimo there's more than one buildplan interpreter, isn't there?
01:26 evalable6 joined #moarvm
01:26 MasterDuke oh, yeah, copied my # 99 stuff down to the second one
01:26 timotimo ah
01:26 timotimo hmm.
01:26 MasterDuke building now
01:27 timotimo but wait, it's crashing inside create_BUILDPLAN
01:27 timotimo not in the interpreter
01:28 timotimo hm, could $_ refer to something else inside the if $typespec?
01:28 timotimo quite unlikely
01:28 mst joined #moarvm
01:36 MasterDuke now dies the way it used to (pre any change i made)
01:37 MasterDuke wait, doesn't die, just gives a negative number
01:37 MasterDuke m: class :: { has uint64 $.foo; }.new( foo => 9223372036854775808 ).foo.say
01:37 camelia rakudo-moar 5ca924: OUTPUT: «Cannot unbox 64 bit wide bigint into native integer␤  in block <unit> at <tmp> line 1␤␤»
01:38 timotimo well, i did tell you to turn bindattr_u into bindattr_i :)
01:38 MasterDuke now i get -9223372036854775808
01:38 MasterDuke i changed it back
01:39 MasterDuke i may need to start from a blank slate with my moar changes
01:39 MasterDuke but that'll probably be an experiment for tomorrow, tonight is video game or iron fist
01:40 samcv iron fist is good
01:40 MasterDuke about half-way through so far, ep 6 or 7
01:48 ilbot3 joined #moarvm
01:48 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
02:04 samcv i watched it all. really good
02:04 samcv time to rubber duck debug this code here. argh
02:05 samcv and least i've solved the performance problem. but sometimes it's traversing the strings improperly and it's hard to keep track of in your mind. when you have so many variables and possible ways of traversing the string
02:43 vendethiel joined #moarvm
04:10 vendethiel- joined #moarvm
04:13 samcv MasterDuke, how does this sound for a function MVM_string_equal_at_ignore_case_INTERNAL_loop
04:13 samcv it's just an internal loop that ends up getting inlined so i can share the code between eqatic and indexic and also helps the indexic code from getting... way too messy
04:14 samcv just ditched what i had done so far and just factored that code out to its own function, so now everything seems good
04:42 vendethiel joined #moarvm
04:52 Geth ¦ MoarVM: samcv++ created pull request #565: Refactor eqatic and indexic and make Perl 6 :i regex 1.8x faster
04:52 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/pull/565
04:53 samcv there we go :) done
05:04 vendethiel- joined #moarvm
05:18 domidumont joined #moarvm
05:25 domidumont joined #moarvm
06:14 brrt joined #moarvm
06:49 domidumont joined #moarvm
07:16 brrt joined #moarvm
07:17 vendethiel joined #moarvm
07:47 Geth ¦ MoarVM: 16fc44089f | (Samantha McVey)++ | 2 files
07:47 Geth ¦ MoarVM: UTF-8 Provide a better error when failing to encode surrogates
07:47 Geth ¦ MoarVM:
07:47 Geth ¦ MoarVM: Check the general category is "Cs" (Control, Surrogates) and if so show
07:47 Geth ¦ MoarVM: a more useful error message.
07:47 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/16fc44089f
07:47 Geth ¦ MoarVM: e18b4ce78a | (Samantha McVey)++ | 3 files
07:47 Geth ¦ MoarVM: Share the exception code between both utf8 and utf8-c8
07:47 Geth ¦ MoarVM:
07:47 Geth ¦ MoarVM: Have a new function MVM_exception_throw_utf8 so code does not have to
07:47 Geth ¦ MoarVM: be repeated between utf8.c and utf8_c8.c implementations.
07:47 Geth ¦ MoarVM:
07:47 Geth ¦ MoarVM: In addition add a seperate exception message if the codepoint that
07:47 Geth ¦ MoarVM: is attempted to be encoded is > 0x10FFFF which is the legal limit for
07:47 Geth ¦ MoarVM: UTF8
07:47 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/e18b4ce78a
07:47 Geth ¦ MoarVM: 79526619f5 | (Samantha McVey)++ | 3 files
07:47 Geth ¦ MoarVM: Merge pull request #563 from samcv/surrogate
07:47 Geth ¦ MoarVM:
07:47 Geth ¦ MoarVM: UTF-8 Provide a better error when failing to encode surrogates or out of bounds characters
07:47 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/79526619f5
07:50 zakharyas joined #moarvm
07:53 geekosaur joined #moarvm
07:56 brrt \o
08:20 samcv o/ brrt
08:24 brrt how do you like hacking moarvm :-)
08:25 samcv it is fun :)
08:26 brrt even though it's mostly in C? C has a bad reputation these days
08:26 samcv C was the first language I learned
08:27 samcv so it is all good :)
08:27 brrt oh really?
08:27 samcv yea
08:27 brrt well, for me, C was the first 'real' language, after BASIC
08:27 samcv i think i programmed on the calculators at school in high school but i can't remember anything at all about it
08:28 samcv other than that it was really a horrible language
08:28 brrt from a programmers perspective, i agree
08:28 brrt from a learners perspective, i disagree
08:29 brrt it does very few things, and that makes it pretty easy to learn
08:29 samcv yeah i guess so lol
08:30 samcv i think i took a C class in highschool sometime. then didn't think much of it until later. have been in IT since i was 16 (summers). went to college studies chemistry, did not graduate, but afterwords went back into IT doing linux stuff and started programming (again?)
08:30 samcv idk i've used linux forever and knew bash scripts but never considered that 'programming'
08:31 samcv so i guess that was my first language I actually learned. and used for more than a few weeks seriously
08:32 samcv i guess i never considered it programming because i was just 'making some task work' or i thought about it as just achieving the goal maybe
08:33 lizmat hmmm... I'm not sure I understand what 84a730f does
08:33 samcv but then started learning C seriously, did stuff with pointers, processing a BMP file with C and resizing it with no non stadard libraries, and did some linked tree pointers and just kept learning i guess
08:33 samcv uh it makes a test pass in roast
08:33 lizmat it was my impression that overflow / underflow on natives were *not* supposed to throw ?
08:33 samcv with int overflow
08:34 samcv let me see the roast tests
08:35 samcv yeah it tests that they throw EVAL "my $type \$var = {$maxval+1}"
08:36 samcv not sure what it should do, but there's tests in roast to that effect
08:37 lizmat that there are tests there, doesn't mean they're correct  :-)
08:37 samcv or maybe it was this https://github.com/perl6/roast/blob/master/S02-types/int-uint.t#L26
08:38 samcv hard to tell it doesn't tell me line numbers ;(
08:38 samcv setting int64 to more than 9223372036854775807 throws and setting int64 to less than -9223372036854775808 throws
08:38 samcv ^ those are the two tests that now pass
08:39 lizmat I wonder what jnthn thinks of this
08:39 * lizmat has to be afk for a few hours again
08:39 brrt C is one of those language that makes it pretty easy to make fatal mistakes in, and yet, you never blame the language, but only yourself, cheerful that you've learned yet another thing
08:40 samcv lizmat, see https://github.com/MoarVM/MoarVM/pull/557
08:40 samcv for his comments
08:41 samcv oh looks like it fixes "Unboxing bigint to native has a problem with detecting "overflow to negative" boundary"
08:42 * brrt is surprised by how nice an interface it is
08:42 samcv oh this seems the reason https://github.com/MoarVM/MoarVM/pull/557/commits/84a730fd41fba82ded7518089780e815db83c3ad
08:43 samcv this commit description seems to describe it. i haven't checked out the commit itself. but seems it handles it for negative how it did for positive overflow or something?
08:46 mtj_ joined #moarvm
08:48 mtj_ joined #moarvm
08:57 domidumont joined #moarvm
09:07 JimmyZ joined #moarvm
09:18 domidumont1 joined #moarvm
10:16 geekosaur joined #moarvm
10:17 ilmari[m] joined #moarvm
10:53 vendethiel joined #moarvm
11:00 japhb joined #moarvm
11:39 brrt left #moarvm
11:39 brrt joined #moarvm
12:45 dogbert17 jnthn: sry if I'm being a nuisance :) did the second gist reveal anything worthy of further pursuit? https://gist.github.com/dogbert17/3eb15ea55019d93590e8ea1d4966f7b2
13:03 vendethiel- joined #moarvm
13:24 woolfy joined #moarvm
15:08 brrt joined #moarvm
15:12 jnthn dogbert17: Sorry, bit of a busy week here
15:12 jnthn dogbert17: Yes, that gist looks interesting
15:59 brrt okay, so i'm pondering something (while writing a blog post)
15:59 brrt suppose I have:
15:59 brrt (if (foo) (bar) (call …)) - the value of (bar) and the result value of (call) are nicely allocated to the same register
16:00 brrt however, in linear code order that looks like:
16:01 brrt test foo; ifz goto alt; %result = compure-bar; goto end; alt: %result = call …; end;
16:01 dogbert17 jnthn: thx, then I'll ask AlexDaniel to add it to the RT
16:02 brrt from the perspecitve of the register allocator, the live range of %result is live in arround the call
16:06 brrt but in the block that does the call, it is a): garbage and b): should not overwrite the result of the call
16:06 brrt i can get away with that because the result of the call (in %rax) is not allocatable
16:07 brrt so as long as i insert the copy from %rax to whatever result register we want to use *after* any restores (garbage or not) i'm good
16:13 brrt joined #moarvm
16:14 brrt i can haz blag
16:14 brrt http://brrt-to-the-future.blogspot.com/2017/03/function-call-milestone.html
16:15 brrt decommute &
16:37 TimToady samcv: some might consider it slightly more awesome if those encoding errors put out U+hex numbers instead of decimal, since a lot of us autorecognize certain ranges based on the hex values
16:42 TimToady well, maybe 0x would be better than U+ there, since by definition they aren't valid unicode :)
16:43 TimToady but I do think most of the unicodey community would consider the hex "name" more normative than the decimal...
16:48 TimToady and it doesn't seem like the sort of situation where an intentionally obscure "guru meditation number" is warranted. :)
16:48 TimToady you can tell how slow my brain is working today, since it took me ten minutes to say that... :)
16:49 timotimo a good guru meditates for many minutes before saying a single thing
16:50 domidumont joined #moarvm
16:58 TimToady thing
17:13 timotimo i wonder why i don't read anything about xchg instructions in that blog post by brrt
17:18 timotimo brrt, in the second-to-last paragraph, i'd probably call it "from 'old' to 'young' objects" instead
17:55 woolfy left #moarvm
18:29 * [Coke] hurms https://github.com/xoreaxeaxeax/movfuscator for brrt
18:51 vendethiel joined #moarvm
19:17 timotimo i wonder why we don't have a submodule for libatomic_ops
19:18 jnthn Well, after the chaos of last time we switched something to a submodule, then the reason we aren't going to have one is I don't want to subject our downstream users to that again. :P
19:18 timotimo yeah
19:18 timotimo we could, however, grab latest code from upstream?
19:19 jnthn We could do that, yes
19:19 timotimo do we want to properly import history from the libatomic_ops repo? there's not really a need to, i don't think
19:19 timotimo maybe that way i can get the flood of warnings to stop when i compile moar
19:20 samcv good *
19:20 timotimo yo samcv
19:21 samcv TimToady, some of the errors do have hex. i will make even the generic ones use hex as well though
19:23 timotimo https://gist.github.com/timo/d528aaa26562c2afd9bb1afc6dfa06c4 - this isn't b0rked, right? i didn't mess up precedence or something?
19:23 timotimo perhaps a set of parenthesis can be removed here
19:24 AlexDaniel joined #moarvm
19:26 samcv TimToady, i think `decimal (hex)` sounds like a good convention, because everywhere else when you print something out it gives you decimal. so showing decimal first makes sense. but also the hex for that info is very good too
19:29 jnthn timotimo: Not sure we need to do that, no
19:30 timotimo the history from libaa_tomi_cops?
19:30 AlexDaniel dogbert17: I wonder, why can't you add it yourself? :)
19:30 yoleaux2 16:03Z <dogbert17> AlexDaniel: if possible could you add https://gist.github.com/dogbert17/3eb15ea55019d93590e8ea1d4966f7b2 to RT #131003
19:30 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131003
19:47 brrt joined #moarvm
20:01 Geth ¦ MoarVM: 36360063b8 | (Timo Paulssen)++ | src/math/bigintops.c
20:01 Geth ¦ MoarVM: fix for compilers that don't have sizeof(void *)
20:01 Geth ¦ MoarVM:
20:01 Geth ¦ MoarVM: i saw this explode on an appveyor build somewhere
20:01 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/36360063b8
20:02 samcv jnthn, did you look at my PR for the case insensitive string search?
20:03 jnthn samcv: Yeah, but I'm so tired I couldn't think clearly enough to review it today :(
20:04 jnthn Will look tomorrow, when I'm rested
20:07 timotimo oh, we don't have an appveyor set up for moarvm?
20:10 timotimo src/strings/nfg.h:84:11: note: expected ‘MVMGrapheme32 ** {aka int **}’ but argument is of type ‘const MVMCodepoint ** {aka const int **}’
20:10 timotimo MVMuint32 MVM_nfg_get_case_change(MVMThreadContext *tc, MVMGrapheme32 codepoint, MVMint32 case_, MVMGrapheme32 **result);
20:10 timotimo is this something we have changed recently?
20:16 samcv yeah timotimo i have it fixed in my patch
20:16 samcv the PR
20:16 samcv so don't touch that. my PR fixes that warning
20:17 timotimo OK!
20:20 timotimo src/strings/normalize.c:492:25: warning: '&&' within '||'
20:20 timotimo (twice)
20:20 timotimo do you fix that, too? :)
20:21 mst joined #moarvm
20:22 * TimToady hates on compilers that force superstitious parens...
20:22 timotimo :)
20:25 TimToady everyone should just to pronounce it right, and then it's obvious: "This 'n That OOOOOORRRR the Other Thing"
20:25 TimToady *just learn
20:26 * TimToady should just to type right...
20:27 timotimo "to be OOOOOOORRRRRRRRR not to be"
20:28 TimToady .oO(that is the kvetching)
20:28 samcv lol timotimo
20:28 samcv did not fix that
20:28 samcv which compilier is this?
20:29 timotimo clang
20:29 timotimo you see it on travis where there's apples
20:29 samcv let me do clang
20:29 samcv i think i usually do clang
20:30 samcv don't see that for clang. will look at TVS
20:31 timotimo anyway, i should be able to build GTK::Simple on appveyor now
20:32 timotimo i find it a little annoying that travis-ci builds all start with 2 minutes of downloading strawberry perl
20:32 timotimo why don't they have like a caching proxy in there or something?
20:33 samcv you mean appveyor?
20:33 samcv or travis. or both
20:35 timotimo appveyor
20:35 timotimo sorry
20:54 * AlexDaniel wonders how to pronounce (… and … || … and …) and whether it should include swear words
20:57 samcv heh AlexDaniel
21:07 zakharyas joined #moarvm
21:21 Geth ¦ MoarVM: 285b62a0fa | (Samantha McVey)++ | src/strings/utf8.c
21:21 Geth ¦ MoarVM: Use both hex and decimal for UTF8 encoding error messages
21:21 Geth ¦ MoarVM:
21:21 Geth ¦ MoarVM: As suggested by @TimToady
21:21 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/285b62a0fa
21:22 * samcv checks the precedence rules for C
21:34 Geth ¦ MoarVM: 7de16be02b | (Samantha McVey)++ | 4 files
21:34 Geth ¦ MoarVM: Add parentheses various places to suppress compiler warnings
21:34 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/7de16be02b
21:34 samcv just to double check before blindly trusting what the compiler tells me :P
21:46 Geth ¦ MoarVM: 782dedc229 | (Samantha McVey)++ | .travis.yml
21:46 Geth ¦ MoarVM: Add uname -a to Travis CI script so it can show up in build logs
21:46 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/782dedc229
21:51 samcv timotimo, how to get frame.c to print out messages
21:51 samcv going to fix all of our compile errors
21:52 samcv but i need to know how to test the fprintf's there
21:52 samcv something called dlog
21:58 samcv ok well i tested on another file. seems it worked. kk. still curious, but not as important anymore i guess
22:05 Geth ¦ MoarVM: 634a6434ae | (Samantha McVey)++ | .travis.yml
22:05 Geth ¦ MoarVM: Try and get Travis working again. Somehow `uname -a` failed
22:05 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/634a6434ae
22:05 timotimo i don't know what you mean by that!
22:05 timotimo oh
22:05 samcv odd. i get uname –a
22:05 samcv uname: extra operand `–a'
22:06 timotimo the dlog is the dynamic variable cache log
22:06 samcv something in frame.c with fprintf's. i tested the same format in another file using PRIu64 and made sure it worked
22:06 samcv ah ok timotimo
22:06 samcv cause sometimes i've messed up the PRI things and it'll just show up as a string
22:07 samcv uname: extra operand `–-help'
22:07 samcv Try `uname --help' for more information.
22:07 samcv :O
22:08 samcv travis sucks
22:08 geekosaur `–-
22:08 geekosaur those look different here
22:08 samcv --help
22:08 samcv i put the ` in myself sorry
22:08 samcv travisci line says:     - uname –-help
22:08 geekosaur u: –
22:08 unicodable6 geekosaur, U+2013 EN DASH [Pd] (–)
22:09 samcv wow. i must have hit compose key on accident
22:09 geekosaur the ` was a paste-o
22:09 geekosaur this font distinguishes hyphen, en dash, and em dash pretty well :)
22:09 timotimo maybe travis fakes out uname?
22:10 Geth ¦ MoarVM: f9b5a67950 | (Samantha McVey)++ | .travis.yml
22:10 Geth ¦ MoarVM: Really fix travis. Accidentally had an n-dash where a normal dash should be
22:10 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/f9b5a67950
22:10 samcv on closer look i could see it in my code editor
22:10 samcv –—―−
22:10 samcv i have n-dash, M-dash, minus sign, and horizontal bar all on compose
22:11 travis-ci joined #moarvm
22:11 travis-ci MoarVM build errored. Samantha McVey 'Try and get Travis working again. Somehow `uname -a` failed'
22:11 travis-ci https://travis-ci.org/MoarVM/MoarVM/builds/216127363 https://github.com/MoarVM/MoarVM/compare/782dedc2297e...634a6434ae27
22:11 travis-ci left #moarvm
22:12 samcv ok everything should be fine now on latest push
22:18 MasterDuke did anybody here see that post in the Perl 6 facebook group about MoarVM and an FPGA?
22:20 Geth ¦ MoarVM: samcv++ created pull request #567: Use PRIu64 in fprintf's to fix compiler warning RE incorrect types
22:20 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/pull/567
22:20 MasterDuke "I know nothing about the MoarVM instruction set (yet), but I own an Altera Cyclone IV FPGA and a decent amount of curiosity. How plausible would it be to use Verilog / VHDL to make a Moar physical machine? Would I need to write a gcc target for Moar, or is that a separate issue? If I did make a Moar physical machine (and bearing in mind the Cyclone IV is limited to 200MHz), would that spur anyone else to develop a Moar target fo
22:20 samcv is that... possible?
22:21 MasterDuke beats me
22:23 geekosaur extension opcodes would be ... interestinhg
22:24 geekosaur have to use the ancient MacOS method of hooking the invalid opcode trap
22:25 timotimo MasterDuke: cut off after "develop a Moar target for"
22:29 samcv not sure if that %lui is a typo or intentional
22:29 samcv https://github.com/MoarVM/MoarVM/blob/master/src/moar.c#L237
22:29 samcv see this line
22:30 samcv %lui renders as: 99i for example if the variable given were 99
22:31 travis-ci joined #moarvm
22:31 travis-ci MoarVM build passed. Samantha McVey 'Really fix travis. Accidentally had an n-dash where a normal dash should be'
22:31 travis-ci https://travis-ci.org/MoarVM/MoarVM/builds/216128776 https://github.com/MoarVM/MoarVM/compare/634a6434ae27...f9b5a67950d4
22:31 travis-ci left #moarvm
22:34 * geekosaur thinks typo, or thinko (someone thought u was a modifier)
22:35 samcv yeah that's what i think
22:35 * samcv has made that mistake before
22:36 samcv i don't see anything similar anywhere else so i think typo
22:36 timotimo i wonder if the analysis tools all handle that extra u properly :D
22:36 timotimo or maybe "the analysis tools" are just one-liners with grep and awk? :P
22:40 samcv see this warning https://travis-ci.org/MoarVM/MoarVM/jobs/216131896#L542
22:41 samcv i think (void *) casts magically to any other pointer type yes?
22:42 samcv also here https://travis-ci.org/MoarVM/MoarVM/jobs/216131896#L518
22:42 samcv err duh. it's char * because literally it's 8 bits wide. heh. there might be some things that are char * that i'm not sure if the _actually_ point to something 8 bits wide though
22:43 samcv like the first link, though i haven't detangled that mess there
22:43 geekosaur (void *) *can* be cast to other types. and on any architecture we care about, the comparison will work without a cast
22:44 geekosaur but for proper portability you want the cast
22:45 samcv yeah
22:46 timotimo we might want to cast these to intptr_t
22:47 samcv trying this out and it's really nice actually. https://github.com/so-fancy/diff-so-fancy trying it out with git log -p and quite nice colors
22:47 samcv https://i.imgur.com/Slvcwgt.png
22:51 AlexDaniel samcv: yet another cool thing that is not in debian repos… where do you find this stuff? :)
22:51 AlexDaniel I've been using colordiff for sligthly better than shitty diffs
22:51 timotimo i always diff stuff with "git diff --no-index"
22:52 timotimo but i've been too lazy to set that up as an alias
22:52 samcv idk
22:53 samcv this is really nice though :3
22:53 samcv brb more tea. and wait for travis
22:56 timotimo uargh, this "booth talk" has the background noise louder than the speaker
23:07 samcv what is "booth talk"
23:08 timotimo you know GDC, the game developer's conference?
23:08 MasterDuke timotimo: huh, i see it all. but the rest was just: "... gcc?" - Paul Bennett
23:09 timotimo yes, of course you see it all :)
23:09 timotimo your irc client doesn't display what others get sent
23:10 timotimo it just displays what you send
23:10 timotimo the server is the one that gets to decide how much to keep
23:10 MasterDuke ah
23:12 MasterDuke it doesn't let me put in unlimited text, but i guess its (the web client) limit is more than yours. oh, and the weblogs have one char less than you
23:13 timotimo hah
23:14 timotimo i'm not sure if the server will tell the client during the initial connection process what the limit per line is
23:14 geekosaur it does, but it's harder than that
23:14 timotimo samcv: basically you have a big hall where lots of companies have their little booths, and a booth talk is when they hold a little presentation directly at their booth
23:14 geekosaur you get a maximum message size. that is modified by the protocol overhead in a message
23:15 geekosaur which will include your nick, the target channel, the command, etc.
23:15 timotimo samcv: and in this case the presenter totally had a mic next to their mouth, but for some reason a different mic was used
23:15 geekosaur (and if the server doesn;t tell you, the max message size is 512 bytes per the RFC)
23:23 MasterDuke timotimo, geekosaur: think it's possible to make a MoarPM?
23:25 timotimo Moar Perl Mongers?
23:26 samcv Moar Private Messaging? Moar PM. what time is it Moar PM, as opposed to Moar AM
23:27 stmuk joined #moarvm
23:28 MasterDuke MoarPhysicalMachine
23:30 timotimo Moar Prime Minister
23:31 geekosaur I don't know details of moarvm bytecode well enough. but in theory you could do it, aside from extension opcodes possibly being problematic
23:32 timotimo of course if you wanted to have rakudo on MoarPM, the extops rakudo uses would become part of MoarPM
23:32 timotimo but the opcodes are kind of polymorphic
23:32 timotimo so a bindpos_i could be handled a couple of different ways
23:33 geekosaur whether it's worth the effort is another question. the more high level structures it directly supports (e.g. hashes, strings with grapheme support, ...), the harder a hardware impl would be
23:33 timotimo and our opcodes also directly have much more complicated stuff in 'em, like our hash objects for example
23:36 geekosaur anything can be done with a 2-level (microcode) implementation. again, whether it's worth doing is another question
23:36 MasterDuke well, i can't really imagine he meant it for any practical purpose
23:36 geekosaur and on an FPGA it could end up being no faster than the current one
23:39 MasterDuke changing topics, does the change i mention in the last comment of https://github.com/MoarVM/MoarVM/issues/561 make sense?
23:40 timotimo i'd actually put in both checks
23:40 timotimo i.e. first check if introspection is non-null, then check if is_tty is non-null
23:40 timotimo and only then try to execute it
23:40 geekosaur ^
23:41 MasterDuke yeah, definitely would do that if the the check for is_tty is correct
23:42 timotimo it's a check for "does this kind of handle even know how to is_tty", right?
23:44 geekosaur looks like it, yes
23:44 geekosaur ./src/io/syncpipe.c:static const MVMIOIntrospection introspection = { NULL, mvm_fileno };
23:45 geekosaur *boom*
23:45 geekosaur although arguably that should be a function that always returns false
23:46 timotimo hm
23:49 MasterDuke MVM_io_is_tty always return false?
23:49 geekosaur "syncpipe.c"
23:49 geekosaur it's specific to pipes, which are always not ttys
23:49 geekosaur (at least on unix... but $DEITY help you on Windows, since mintty uses a windows named pipe as its tty abstraction)
23:51 geekosaur (msys2/cygwin isatty() is a scary beast, it has to look up the OS name of the handle to see if it's a cygwin/msys2 tty emulation pipe)
23:51 MasterDuke wait, i'm still not following, MVM_io_is_tty is in src/io/io.c. syncfile.c and syncstream.c have an is_tty in their introspection
23:55 geekosaur I can't tell where it gets set by a quick grep, sigh
23:56 geekosaur MVM_io_is_tty just calls the introspection is_tty function, looks like
23:57 geekosaur but it does it wrapped in a mutex
23:58 geekosaur so you have things reversed, MVM_io_is_tty is not the low level implementation, it's the high level interface for when you're not already holding a mutex like you are in the guts of the file operations
23:59 MasterDuke right, that's pretty much how i read things
23:59 geekosaur I am saying the introspection is_tty function for pipes shouldn't be NULL, it should be a function that always returns false
23:59 geekosaur so you don't have to deal with this special case

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