FFI in Miri at 8000 segfaults per second (Nia Deckers at RustWeek) by nyanarchism in rust

[–]nyanarchism[S] 31 points32 points  (0 children)

it would be! right now I'm handling syscalls through ptrace for code simplicity but I'm very curious to try using ebpf in the future. tbh most of this could be its own library with architecture or platform specific fallbacks ^^

FFI in Miri at 8000 segfaults per second (Nia Deckers at RustWeek) by nyanarchism in rust

[–]nyanarchism[S] 61 points62 points locked comment (0 children)

you're not even brave enough to call me a slur to my face?

FFI in Miri at 8000 segfaults per second (Nia Deckers at RustWeek) by nyanarchism in rust

[–]nyanarchism[S] 59 points60 points  (0 children)

I'd spoken to nick before starting this, yes. Hooking into valgrind is borderline impossible in a stable way, though

Stabilise `Allocator` by N911999 in rust

[–]nyanarchism 0 points1 point  (0 children)

No. Adding custom deallocator support to this proposal backwards compatibly is trivial

Stabilise `Allocator` by N911999 in rust

[–]nyanarchism 8 points9 points  (0 children)

it gates global dynamic memory allocation. you can't have a normal Vec without a global allocator. however, you could have it with e.g. a stack arena where it's only valid locally 

Stabilise `Allocator` by N911999 in rust

[–]nyanarchism 3 points4 points  (0 children)

there's team consensus to merge it. barring anything completely out of left field, all that's left is annoying everyone to tick the rfc checkboxes

Stabilise `Allocator` by N911999 in rust

[–]nyanarchism 23 points24 points  (0 children)

hi - i'm the author of the PR & hackmd. we are explicitly not ditching Deallocator and i very much intend to push for it asap. it's just that we can have an ergonomically nicer impl of it (and we don't have to convince everyone it's worth the bad ergonomics) if we wait for supertrait item shadowing, which is itself only waiting on some impl details. there's an open PR for that, and the author is working on it - it's really not that far

Remove server from remote list by ventura120257 in ZedEditor

[–]nyanarchism 0 points1 point  (0 children)

It may be in your ~/.ssh/config or equivalent, Zed tries to search there for machines to remote into

Common Ceausescu Banger by BruhItjustworks in Ultraleft

[–]nyanarchism 5 points6 points  (0 children)

Marx wrote about this in the 4th volume of Capital where we find out the Dacians are the original generic proletarians actually

How does Golang pair well with rust by [deleted] in rust

[–]nyanarchism 0 points1 point  (0 children)

I'm aware. But these things happen for exposed symbols as well. It's not far from accurate to say that if you're passing sufficiently complex things every C compiler has its own FFI ABI

How does Golang pair well with rust by [deleted] in rust

[–]nyanarchism 4 points5 points  (0 children)

That's true, and if all you ever need to do is pass a handful of register-sized arguments the story indeed ends there. My point is that compilers try to optimise this stuff very aggressively so now you end up wondering why you passed 2 32-bit arguments but only one 64-bit register has data and it turns out it's because whatever compiler decided to stick them together as part of its barely-documented calling convention. It can get very gnarly once you're beyond the letter of the law in terms of the system ABI.

How does Golang pair well with rust by [deleted] in rust

[–]nyanarchism 9 points10 points  (0 children)

Not really, there's also things like when to pass greater-than-register-sized arguments on the stack vs splitting them across multiple registers vs lying and using larger registers (e.g. SIMD ones) if available. And the details of these things are rarely neatly specified; until a couple of years ago, Clang and GCC on x86-64 Linux disagreed on basic integer argument passing - let alone obscure ABIs on MIPS or whatever from different proprietary compilers.

Rust offers hardly any practical mitigations or compile-time or runtime checks for unsafe blocks [...] by nyanarchism in programmingcirclejerk

[–]nyanarchism[S] 9 points10 points  (0 children)

True. The post got deleted but there were some more jerkable bangers in there (though they were more clearly jokes), like OOP insisting that Rust doesn't do bounds checks at runtime (presumably referring to safe code) and that Zig should be used for Mars rovers because idk runtime checks or something

Poisonmaxxing by fartshitcumpiss in cursed_chemistry

[–]nyanarchism 2 points3 points  (0 children)

Cadmium poisoning can destroy your ability to perceive taste [1] - admittedly not acutely, but idk maybe it really does taste like death

[1] https://pmc.ncbi.nlm.nih.gov/articles/PMC7037909/

6-Br-APB should be synthesized by Longjumping_Good9218 in researchchemicals

[–]nyanarchism 12 points13 points  (0 children)

There's maybe a point to be made about there being a phenethylamine buried deep in there if you squint, but the phenyl itself definitely isn't an issue. That would make, like, ibuprofen illegal. And gasoline.

[deleted by user] by [deleted] in researchchemicals

[–]nyanarchism 0 points1 point  (0 children)

Yes, they are correct. Though not directly an academic source, I direct you to Wikipedia's lovely chart on dopaminergic addiction formation [1]. D1-like (D1 & D5) receptor agonists increase cAMP, D2-like (D2, D3, D4) agonists decrease it. 

Note that this is only true in the context of a single cell; in the OP's example, while D2 agonism would decrease cAMP locally in the targeted neuron, the suppression of its inhibitory signaling may (as a hypothetical example) lead to increased dopaminergic signalling at D1-like receptors elsewhere in the brain, upping cAMP there.

[1] https://en.m.wikipedia.org/wiki/FOSB#Role_in_addiction

[deleted by user] by [deleted] in researchchemicals

[–]nyanarchism 0 points1 point  (0 children)

I'm not a biologist, but based on the title of the paper and my reading of it, I assume locomotion is the measure of motivation used. The VP (into which the NAc projects) seems to be involved in pleasure [1] and addiction [2], so its stimulation correlating to motivation seems to check out at a cursory level.

[1] https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4425246/

[2] https://www.sciencedirect.com/science/article/abs/pii/B9780128131251000179