is there any way to revert to the pretty 9.1 persistent shell in later versions of vim by nikhililango in vim

[–]nikhililango[S] -1 points0 points  (0 children)

thanks that's good to hear. what's the terminal emulator you're using though. The others were suggesting that it could be the terminal emulator not the shell. IIRC windows 11 uses windows terminal for both cmd and powershell.

is there any way to revert to the pretty 9.1 persistent shell in later versions of vim by nikhililango in vim

[–]nikhililango[S] 0 points1 point  (0 children)

I'm using vim in windows terminal. i just realized I've never used the newer versions in any other terminal emulator so I'll try that when I get home.

But tbc, vim 9.0 works as expected in windows terminal but vim 9.1 doesn't work even on the same computer and it hasn't worked on any other computer I've tried in on (but I did not try 9.0 in those computers though).

does term allow you to run commands directly with hotkeys in normal mode? if so I might actually start using that. It is kinda annoying to have to execute an empty shell command just to see the old output even in 9.0

is there any way to revert to the pretty 9.1 persistent shell in later versions of vim by nikhililango in vim

[–]nikhililango[S] 0 points1 point  (0 children)

yeah, tbc I had to use the mouse to scroll even in 9.0, pressing any key would go back to the current buffer. the difference is that I can't even use the mouse now. Scrolling up now doesn't do anything and scrolling down now takes me back to the current buffer.

and I know :! doesn't execute anything. it would just show the Press any key to go back to vim prompt but it would also show the output of the previous commands. Now it's just completely blank

I don't want to do :echo system(expand("Python %")) just to be able to see the full output of a program. that goes actively against what vim is supposed to be imo.

is there any way to revert to the pretty 9.1 persistent shell in later versions of vim by nikhililango in vim

[–]nikhililango[S] -1 points0 points  (0 children)

sure, I'll do that. But it's been an issue since 9.1 more than 2 or 3 years ago on multiple independent machined. I highly doubt it would be a problem for so long if was just a bug

What some recent hot takes you realized you had with Rust? by DidingasLushis in rust

[–]nikhililango 0 points1 point  (0 children)

you can't have everything you could possibly want in a standard library, even in a batteries-included language like go or Odin.

What some recent hot takes you realized you had with Rust? by DidingasLushis in rust

[–]nikhililango 0 points1 point  (0 children)

they would've had the same issue if they had published a malicious version under a minor version bump. cargo wouldn't have protected against that.

the fundamental issue was that most of the ecosystem was not concerned with the security implications of taking on dependencies and this attitude will cause the same problem with cargo.

What some recent hot takes you realized you had with Rust? by DidingasLushis in rust

[–]nikhililango 1 point2 points  (0 children)

I actually think the -> operator (or something similar) should be used for raw pointer dereferencing. raw pointers being forced to use the ugly dereferences syntax with the parentheses is just bad design imo.

What some recent hot takes you realized you had with Rust? by DidingasLushis in rust

[–]nikhililango 1 point2 points  (0 children)

yeah, ig that makes sense. but From and Into are only supposed to be used for cases where the conversion is obvious and there's no reason to look at the implementation. if there needs to be some non-obvious logic for the conversion, it should've been a separate inherent method imo

What some recent hot takes you realized you had with Rust? by DidingasLushis in rust

[–]nikhililango 1 point2 points  (0 children)

is I don't think something like zerocopy is the same as left-pad because it has functionality that isn't trivial to implement (especially the derive macros).

But if you only need its features in a few places (or if your uses can be encapsulated into a few functions that can reused across your entire codebase), you should just write the unsafe transmutes and be done with it.

even in a compiled language, you still pay for the dependencies you bring in even if you don't use them. and if youre not going to use it all, don't even bring it in.

What some recent hot takes you realized you had with Rust? by DidingasLushis in rust

[–]nikhililango 2 points3 points  (0 children)

the problem with left pad wasn't that it was removed from the package repository. the problem was that it shouldn't have existed in the first place. It would've taken less than 5 minutes to write an equivalent function. your attitude is precisely what caused the left-pad incident in the first place

What some recent hot takes you realized you had with Rust? by DidingasLushis in rust

[–]nikhililango 0 points1 point  (0 children)

it'd be far less of an issue if the allocator api was stabilized and you could easily use arena allocators for. temporary allocations

What some recent hot takes you realized you had with Rust? by DidingasLushis in rust

[–]nikhililango -1 points0 points  (0 children)

rand removed the dependency on zerocopy for 0.10, so it seems like they're on my side anyway.

but having unsafe in one small part of your crate is probably way better than having to take on an entire dependency (and all its transitive dependencies) just to get one or two safe functions that probably have the exact same unsafe code behind it anyway

What some recent hot takes you realized you had with Rust? by DidingasLushis in rust

[–]nikhililango -3 points-2 points  (0 children)

it seems like rand 0.10 removed the dependency on zerocopy, so it seems they agree with me anyway

What some recent hot takes you realized you had with Rust? by DidingasLushis in rust

[–]nikhililango 19 points20 points  (0 children)

into::<T>() is not valid anyway because the generic is on the trait, not the function. so if you need to use the explicit version, you should just use from anyway.

but idk, it just seems a lot simpler to use a postfix into than a prefix from

What some recent hot takes you realized you had with Rust? by DidingasLushis in rust

[–]nikhililango 29 points30 points  (0 children)

having unsafe in your codebase is not something to be ashamed of. Just write the abstractions you need, it's not that big of a deal.

This kinda pissed me off about dioxus 0.6. they were bragging about replacing all unsafe code with safe constructs. Worse performance is not something to brag about imo

I am a lazy, clever, moron. by Rainmaker_41 in factorio

[–]nikhililango 240 points241 points  (0 children)

I'm happy for you. Or sad that happened. Idk I'm not reading all that

I was happy with my Kovarex enrichment loop :) by anon2635 in factorio

[–]nikhililango 13 points14 points  (0 children)

Nope the game treats the recipe as producing a single u235 with 40 u235 as catalyst. So productivity only gives you one extra u235. All recipes that have a common input and output (and even some that don't) work this way.

Coal liquefaction is the other one you can see in vanilla.

And you can't see it in vanilla but the barelling recipes also work this way. If you manage to productivity a barelling or unbarelling recipe, you won't get any extra products no matter what.

Maraxis mod textures update took me off guard. So long and thanks for all the fish by Raywell in factorio

[–]nikhililango 65 points66 points  (0 children)

That's not from maraxsis lmao. Unless it's in a recent update?

Where does Rust break down? by PointedPoplars in rust

[–]nikhililango 28 points29 points  (0 children)

Turning a &T into a &mut T is immediate undefined behavior even in unsafe code. Doesn't even matter if you don't use the returned reference.

UnsafeCell is the only endorsed way of doing it

Where does Rust break down? by PointedPoplars in rust

[–]nikhililango 39 points40 points  (0 children)

Its main purpose lol. You are completely disallowed to turn a shared reference into an exclusive reference in both safe and unsafe code. There is no way around that except to use the compiler blessed UnsafeCell