Show more

@alexbuzzbee nor even for IPC, 'cause 32-bit and 64-bit processes can coexist. You need to also ban all not-fixed length int types, then it'll work.

@alexbuzzbee ... doesn't work either, different machines may use different byte order or integer sizes

Sorry for ruining your toots :D

@alexbuzzbee most of the thing need to be monomorphized and need `unsafe`. Take Vec and Box for example.

I'm a fan of Rust, but you might have better luck here with a safe language that doesn't monomorphize. Like Java.

@alexbuzzbee no, my point is, in C you've got this nice property that code that's written as a part of the library stays in the binary of the library (so the dylib). In Rust that's not true, code written as a part of std (and other crates) gets build into *your* binary

@alexbuzzbee that won't work either, you need to monomorphize stdlib code for program-defined types

@alexbuzzbee *that*'s not really possible because you need unsafe to implement basic things such as stdlib

but it reminds me of this: github.com/nebulet/nebulet

#Better is a privacy tool for the Safari browser on iPhone, iPad and Mac which protects you from being tracked.

You can find out more at the official site:

better.fyi

You can follow them on the Fediverse at:

@better

#Safari #Privacy #MacOS #iOS

Reading up on nanokernels

Thinking how I'd design my own (even more nano- since we can shift message dispatching to userspace, since every process runs on Rust/tokio anyway ...right?)

Trying — and failing — to explain how it all fits together to @YaLTeR

Various vulnerability mitigation technologies (ASLR, W^X, stack guards, FORTIFY_SOURCE, ...) only try to minimize the security impact of code errors (or improper architecture that makes it impossible to write solid code). They don't make the problems with code go away, they just make them harder to exploit.

RiiR'ing on the other hand does exactly that.

@alexbuzzbee OTOH I'm not even sure this would link; perhaps you'd be better off using dlsym()

@alexbuzzbee worse, I believe you have to do this:

in the library:

extern "C" {
my_main();
}

fn main() {
my_main();
}

in the main program:

#[no_mangle]
pub extern "C" fn my_main() {
}

what is the "analogue loophole"? why do people say that removing the headphone jack would allow companies to restrict your ability to listen to music? (long, serious) 

@YaLTeR @federicomena @SuperFloppies I've no idea about WinAPI, but NSSliderCell and the like only send the event using target-action when it comes from the user, not when the value is changed programmatically (as it's the case with -take{}ValueFrom:). You can of course ask to simulate user input, e.g. with -[NSButtonCell performClick:] (even as an action of some other control!), and then the action would fire.

@federicomena @SuperFloppies

(Oh, did I mention? You can set these target-action associations in Interface Builder, by Ctrl-dragging from one control to another, no w/o code. But that's not necessarily a good thing — code is much easier to manage (code review, version control...) than nibs.)

@federicomena @SuperFloppies
One famous example is you can make a slider and a number input field continuously sync their values, without writing a single line of code, by setting them as each other's targets and -takeIntegerValueFrom: as their actions.

(2/2)

@federicomena @SuperFloppies exactly — you can set up all the controls in a window to work on the window controller object, or you can have the individual listener-like objects (but objc doesn't have inline/anonymous classes, so you'll have to declare them separately), or you can make controls directly manipulate your model (skipping the view/window controller), or you can even make one control manipulate other control.

(1/2)

@SuperFloppies @federicomena similarly, GObject has "signals" that are built in to the type system.

Cocoa uses the target-action pattern instead. When clicked, a button runs the specified action (basically invokes a specified method) on the given target. For example,

[submitButton setTarget: request];
[submitButton setAction: @selector(submit)];

And it'll call [request submit] when tapped. So there's no intermediate listener object — the control performs the action directly.

(2/2)

Show more
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either! We adhere to an adapted version of the TootCat Code of Conduct and have documented a list of blocked instances. Ash is the admin and is supported by Fuzzface, Brian!, and Daniel Glus as moderators. Hosting costs are largely covered by our generous supporters on Patreon – thanks for all the help!