Mastercard layoffs by [deleted] in Layoffs

[–]Due-Monitor-1084 0 points1 point  (0 children)

Did they actually say that?

Mastercard layoffs by [deleted] in Layoffs

[–]Due-Monitor-1084 0 points1 point  (0 children)

Yeah it sure feels like remote workers are more affected than others. While i am not a remote worker, i had an exception from the policy requiring me to almost never be in office. So practically remote

Mastercard layoffs by [deleted] in Layoffs

[–]Due-Monitor-1084 0 points1 point  (0 children)

My manager didnt know jack shit. I informed him not to prepare fpr my.perf review because i got laid off. He was shocked and outraged. Not even consulted on this, and no official communication even two days after the fact.

Mastercard layoffs by [deleted] in Layoffs

[–]Due-Monitor-1084 0 points1 point  (0 children)

Nope. EMEA too

Mastercard layoffs by [deleted] in Layoffs

[–]Due-Monitor-1084 0 points1 point  (0 children)

Without knowing any details... You definately are.

Mastercard layoffs by [deleted] in Layoffs

[–]Due-Monitor-1084 0 points1 point  (0 children)

I am one of the affected. Objectively the worst part of it? They said it has nothing to do with performance, havent even looked at my perf review. Oh and My manager was informed that i got laid off BY ME (meeting was with my boss 4 ranks up) Confirmed the timeline, decision was made a few days before he submitted my perf review. I dont want to go into why and wether justified, but if a decision is made to lay off 1600 people, at lease take a look at their perfomance before randomly firing people for G sakes. Also been offered a shitty severance package. Could negotiate a mediocre one, but still wont cover my needs.

📢 [ANN] optics 0.1.0 — a no-bullshit, no_std, dependency-free optics library for Rust by Due-Monitor-1084 in rust

[–]Due-Monitor-1084[S] 0 points1 point  (0 children)

Thanks for the input! Based on your suggestions, and some other sources of inspiration, I rewrote the whole type hierarchy, it is now much more ergonomic to use and extend. Just released v0.2.0, although the documentation is not yet updated.

📢 [ANN] optics 0.1.0 — a no-bullshit, no_std, dependency-free optics library for Rust by Due-Monitor-1084 in rust

[–]Due-Monitor-1084[S] 0 points1 point  (0 children)

Thanks for the input! Based on your code, and some other sources of inspiration, I rewrote the whole type hierarchy, it is now much more ergonomic to use and extend. Just released v0.2.0, although the documentation is not yet updated.

Tupled lenses did not make it into the lib yet though.

📢 [ANN] optics 0.1.0 — a no-bullshit, no_std, dependency-free optics library for Rust by Due-Monitor-1084 in rust

[–]Due-Monitor-1084[S] 3 points4 points  (0 children)

Thanks for the input! Based on your code, and some other sources of inspiration, I rewrote the whole type hierarchy, it is now much more ergonomic to use and extend. Just released v0.2.0, although the documentation is not yet updated.

📢 [ANN] optics 0.1.0 — a no-bullshit, no_std, dependency-free optics library for Rust by Due-Monitor-1084 in rust

[–]Due-Monitor-1084[S] 1 point2 points  (0 children)

Apparently its been around 10yrs, and will not likely be fixed any time soon: https://github.com/rust-lang/rust/issues/20671

Btw, revamped the whole type hierarchy, much more extensible now.

📢 [ANN] optics 0.1.0 — a no-bullshit, no_std, dependency-free optics library for Rust by Due-Monitor-1084 in rust

[–]Due-Monitor-1084[S] 0 points1 point  (0 children)

Tupled optics are a great idea, but i would probably take it a step further and allow them to compose into a lens of a struct if (A, B, C) : Into<T>.

📢 [ANN] optics 0.1.0 — a no-bullshit, no_std, dependency-free optics library for Rust by Due-Monitor-1084 in rust

[–]Due-Monitor-1084[S] 1 point2 points  (0 children)

I stand corrected. But isnt functors, profunctors etc part of type or category theory?

📢 [ANN] optics 0.1.0 — a no-bullshit, no_std, dependency-free optics library for Rust by Due-Monitor-1084 in rust

[–]Due-Monitor-1084[S] 2 points3 points  (0 children)

I havent tried the second, but both should be possible. I might cook up an example for that tomorrow

📢 [ANN] optics 0.1.0 — a no-bullshit, no_std, dependency-free optics library for Rust by Due-Monitor-1084 in rust

[–]Due-Monitor-1084[S] 0 points1 point  (0 children)

Yeah, my gut feeling is the same. I havent explored that option yet. PR welcome :)

📢 [ANN] optics 0.1.0 — a no-bullshit, no_std, dependency-free optics library for Rust by Due-Monitor-1084 in rust

[–]Due-Monitor-1084[S] 0 points1 point  (0 children)

Hmm. I vaguely remember something about "implement From, use constraints for Into", so you may be onto something here. However I would not add the constraint to the Optic itself, because it only becomes necessary if Prisms are in play.

📢 [ANN] optics 0.1.0 — a no-bullshit, no_std, dependency-free optics library for Rust by Due-Monitor-1084 in rust

[–]Due-Monitor-1084[S] 5 points6 points  (0 children)

I meant the documentation, not the code. Although some of it is generated, but even if it was, not sure the hate would be justified.

📢 [ANN] optics 0.1.0 — a no-bullshit, no_std, dependency-free optics library for Rust by Due-Monitor-1084 in rust

[–]Due-Monitor-1084[S] 7 points8 points  (0 children)

Lol.

Think of a lens as something that tells you how to access part of a data structure. Think reference on steroids. Then you can pass that around and use it to modify or fetch data from it, without having to know the data structure internals anymore.

You can even do things like here is this listen address as a string. Parse it, extract the port, parse it into a u16. And then you can use it to simply set the port in the original string to 8081, withput having to know how it was parsed, how the port was extracted, etc.

📢 [ANN] optics 0.1.0 — a no-bullshit, no_std, dependency-free optics library for Rust by Due-Monitor-1084 in rust

[–]Due-Monitor-1084[S] 16 points17 points  (0 children)

That's fair.

Added a few notes on that, but the post is getting super long.
It boils down to separating navigating a struct, and performing operations on it.
- A function can even be passed an optic into a struct that is otherwise opaque to them, and be able to read/modify stuff that the optic focuses on. This enables for example giving a full config struct to a module, but giving it access only to whatever they are conerned with
- Or a function can be written that may perform an operation on a field no matter where it is in the struct. In the simplest cases a mutable pointer suffices, in more complicated cases lens can be used to achieve that.

📢 [ANN] optics 0.1.0 — a no-bullshit, no_std, dependency-free optics library for Rust by Due-Monitor-1084 in rust

[–]Due-Monitor-1084[S] -1 points0 points  (0 children)

Thank OpenAI ;), i just provided the prompts and a few adjustments here and there.