Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2016-08-15

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

All times shown according to UTC.

Time Nick Message
01:47 ilbot3 joined #moarvm
01:47 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
02:04 TimToady joined #moarvm
02:07 stmuk_ joined #moarvm
02:57 stmuk joined #moarvm
07:12 zakharyas joined #moarvm
07:22 zakharyas joined #moarvm
08:18 domidumont joined #moarvm
08:23 domidumont joined #moarvm
15:58 zakharyas joined #moarvm
16:38 zakharyas joined #moarvm
16:43 domidumont joined #moarvm
17:13 brrt joined #moarvm
17:14 brrt good * #moarvm
17:18 brrt i'm moving the tile list editing code to the tile list
17:19 brrt and i'm going to exploit the fact that free(NULL) and realloc(NULL, size) are dwimmy
17:23 geekosaur be careful with that... they're only dwimmy in some implementations
17:24 brrt then we conditionally compile a check for others
17:27 nwc10 I forget whether I knew whether any implementations where not C89 conformat for free() or realloc()
17:28 nwc10 (that might sound like it has too many negatives, but I can't think of a terser way to be accurate. What I meant was "as long as you don't assume anything that breaches what C89 says can be relied on, I *think* that you're fine. Because I think after 27 years implementations have got *most* things right)
17:29 nwc10 fflush(NULL) - not so sure on that one
17:30 Ven joined #moarvm
17:32 brrt i'd hope so :-)
17:34 timotimo we can just install a multi dispatch candidate for free(NULL) and realloc(NULL, size)
17:34 ilmari anything that doesn't handle free(NULL) ain't C, IMO
17:35 geekosaur the most portable and reliable codebases avoid many of those assumptions though. because it may be right for "most" configurations and then blow up in your face in one key circumstance. :(
17:35 ilmari that's almost in the same territory as sizeof(char) == 1
17:35 brrt geekosaur: we already wrap free and friends in mvm versions
17:36 brrt so that is what i meant by conditionally compiling a check :-)
17:39 brrt in the category of bikeshedding, i'm going to rename MVM_DYNAR_* to MVM_VECTOR_* because that is slightly more common terminolgy today
17:48 brrt2 joined #moarvm
17:50 Ven joined #moarvm
17:52 vendethiel joined #moarvm
17:53 Ven joined #moarvm
17:55 Ven joined #moarvm
18:03 jnthn Yeah, if you wanted to handle platforms that didn't do NULL frees correctly, I'd say just probe for 'em and define MVM_free and friends differently. That's one of the reasons we have 'em. :)
18:07 Ven joined #moarvm
18:07 brrt2 well, i have two-hour commutes for tbe forseeable future in which to implement all this
18:08 brrt2 :-)
18:10 jnthn Every day?
18:11 brrt2 yep....
18:11 jnthn 2 hours all told, or per direction? o.O
18:12 brrt2 currently per direction. after relocating, in total
18:12 jnthn Wowser. 4 hours JIT hacking a day!
18:12 jnthn Hope it won't be too tiresome doing the commute though
18:12 brrt2 hahaha yep :-D
18:13 brrt2 hacking isn't really tiresome though
18:13 jnthn Relocation soon?
18:13 brrt2 hopefully
18:13 jnthn No, but...travel sure as heck can be.
18:13 brrt2 true
18:14 jnthn *sigh* what on earth is with my connection...
18:15 jnthn 1    97 ms    30 ms    27 ms  192.168.0.1
18:15 jnthn ...97ms to the wifi router sat 2 meters away...
18:16 brrt2 that is longish
18:16 jnthn Hm, and on next trace gets it in 1ms...but then hugely variable beyond that. wat.
18:36 nwc10 jnthn: have you got some sort of newfangled IOT fridge, and it and the router are now best mates and having a private party (with your beer) to which you were not invited?
18:37 nwc10 because the numbers do seem rather drunk
18:37 brrt2 can i find easily if the last use of a value is within a given basic block?
18:38 jnthn Hm, a DU chain may help figuring that out, if you're computed them
18:39 jnthn nwc10: Nope...tried restartign the router to see if that might help
18:39 brrt2 i'd like to know if i can prove not having to store thinga :-)
18:39 brrt2 and i kind of assumed that i could
18:40 jnthn "last" is a little interseting to define when there's loops? :)
18:40 arnsholt jnthn: Too many neighbours on the same/adjacent WiFi channels, perhaps?
18:41 jnthn Maybe, but more likely the thing just isn't really built to run for months on end
18:41 lizmat jnthn: DNS ?
18:41 jnthn lizmat: That was was slow as everything else :)
18:41 jnthn It seems much better now
18:41 lizmat did you do the traceroute -n
18:41 lizmat ok
18:41 arnsholt Yeah, that's usually the case for home appliances
18:42 brrt2 not-live-after is what i'm really after
18:42 jnthn I suspect it's been up a couple of months, so... :)
18:42 * brrt2 decommute &
18:42 timotimo i strongly advise against getting anything "internet of things" or "smart home" in the next ~200 years
18:43 timotimo everybody in that business right now has NO BUSINESS selling electronics that decide upon the physical world to people
18:43 timotimo there is so much utterly ridiculous crap out there in that sector
18:45 jnthn You mean I shouldn't buy that toaster that prints reminder notes on my toast?
18:45 jnthn https://cdn1.vox-cdn.com/thumbor/WkWHZTpCAXdRml98AnvWqpACFPY=/307x110:636x329/1280x854/cdn0.vox-cdn.com/uploads/chorus_image/image/50371403/9e1b26219522c6fe03960a399f3211b0_original.0.png
18:46 timotimo that one might be fine
18:47 timotimo just don't get a "smart doorlock" that transmits its password unencrypted over bluetooth whenever you open or close it :)
18:47 jnthn I...what... :P
18:47 timotimo or one that won't let you back in when you were outside during an automatic firmware update
18:47 lizmat jnthn: re ObjAt, how about making  it a list_s rather than a str
18:48 lizmat and then have the appropriate infix:<eq>  for faster comparisons ?
18:48 jnthn lizmat: It's more likely to become an integer + a reference...
18:48 timotimo or a wifi remote controllable electric outlet that makes itself reachable from outside your LAN by tunneling through a server in china, and also that server will let anybody control your outlet who knows or guesses your outlet's manufacturer-assigned ID ... and can't connect to WPA secured wifi networks
18:48 * timotimo takes a deep breath
18:48 jnthn The integer being the hash code and the reference being for comparison
18:48 lizmat ok, if you have ideas about that, I'll ditch mine  :-)
18:49 lizmat jnthn: that would also work for value types, I assume ?
18:49 jnthn The point of ObjAt is primiarly value types, no? :)
18:50 nwc10 timotimo: the "won't let you back in if it automatically upgrades" sounds like the sort of flaw that doesn't require you to explain software engineering to anyone to explain why it isn't fit for purpose. So how come that stuff is even on shelves?
18:50 jnthn lizmat: The key thing is to get rid of all the stringification though
18:50 nwc10 I'm not quite explaining it well - it's like the nest fiasco - it's going to break in normal service. Not when the folks from Defcon start prodding.
18:51 lizmat well, if you can quickly produce a hash of an object
18:51 lizmat as in a SHA type of thing
18:51 jnthn Quickly producing a hash is best done with integers
18:51 jnthn The problem we have now, though...is that we don't have a way of checking "did we get the right thing" back in Perl 6 space
18:52 jnthn Which is why our current ObjAt has to contain an exact specification of everything in the object
18:52 lizmat especially since we don't have true object hashes yet
18:52 lizmat but I guess that's the same issue really
18:52 jnthn Indeed. :)
18:53 jnthn Anyway, moar's hashes need...attention for at least 3 other reasons I can think of.
18:53 lizmat ok...
18:53 lizmat then I won't worry about them in the short term  :-)
18:53 Ven joined #moarvm
18:54 jnthn (Among them, we have to turn all strings into flat Grampheme32 arrays to use them in the hash)
18:57 domidumont joined #moarvm
18:57 lizmat anyways, re RT #128931
18:57 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128931
18:57 lizmat $ 6 '.WHICH.say for ({my class A {}}(), {my class A {}}())'
18:57 lizmat A|140523652015040
18:57 lizmat A|140523652015064
18:58 lizmat jnthn:  does that look like a plan for now?  ^^^
18:58 timotimo ah, i thought we finally had hash codes based on the iterator ...
18:59 jnthn lizmat: Where did you grab the number from?
18:59 lizmat nqp::objectid
19:00 jnthn Of...the type object?
19:00 lizmat jnthn: I basically removed the Mu:U candidate for .WHICH
19:00 lizmat jnthn: yup
19:00 jnthn And there's still a Mu one, unconstrained?
19:01 lizmat yup
19:01 jnthn That seems fine enough
19:01 * lizmat likes fixing bugs by removing code
19:01 lizmat lemme run a spectest to be sure this doesn't break anything
19:02 lizmat Ah, all of the .WHICH tests fail now
19:02 lizmat well, one in 4
19:03 lizmat maybe I should just change those tests to make sure the values are unique
19:03 lizmat rather than checking for a specific value
19:08 jnthn ...they checked for a specific value?
19:08 jnthn D'oh :)
19:08 jnthn Yeah, that's not so robust :)
19:09 jnthn I thought they just checked what .WHICH actually worked...
19:09 jnthn I guess easy way to check they're all unique is set(@a) == @a :)
19:10 jnthn Since the set is constructed on WHICH values :)
19:12 lizmat jnthn: that's using an implementation detail of set to test  :-)
19:17 jnthn I don't think so :)
19:18 jnthn WHICH is now user-space value types implement identity for object hashes, etc.
19:18 jnthn *is how
21:20 hoelzro o/ #moarvm
21:20 hoelzro saw this post a few days back, thought it would be interesting for the Moar crowd: https://medium.com/@MartinCracauer/generational-garbage-collection-write-barriers-write-protection-and-userfaultfd-2-8b0e796b8f7f#.nf0a6b5jw
21:37 kjs_ joined #moarvm
21:56 jnthn Indeed, thanks :)
21:57 jnthn The Moar scheme, fwiw, is a read-test-call scheme fwiw
21:57 jnthn Which has its own bunch of trade-offs
21:59 jnthn The branch isn't so good, which is the bad news. However, the bit is in the object header, so it's most likely already in the L1 since you're already talking about the object. Each thread has its own remembered set so there's not contention around that. There is contention once on setting the bit, but after that it's read-only. But the other win is we have precise information on what objects have inter-gen refs, which makes GC times a little sho
22:02 jnthn The big downside of the Moar scheme is if you were to fork.
22:02 jnthn However...uh...fork + threads = pretty bad idea
22:02 timotimo in general, yeah
22:03 timotimo if we give the user exact control over the underlying APIs, we can say "you can fork, but you'll have to handle the threads properly. haa-haa!"
22:03 jnthn Well, if we want to get it right we should http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_atfork.html
22:03 timotimo oh, there's a thing for that. nice.
22:05 jnthn It's probably going to be a good bit of fun to make it work out though
22:05 jnthn Probably the best way is to stop the world (as if we were going to do a GC)
22:06 jnthn Even then it's still a headache :)

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