sukhmel

joined 3 years ago
[–] sukhmel@programming.dev 11 points 2 months ago (3 children)

Quite often when I hear or see a joke I think a bit further than the surface level and ponder how that joke reflects on the image of someone in real life. Sometimes the answer is 'not good'. The same goes for things other than jokes, so it always makes sense to consider how things you encounter may affect you

[–] sukhmel@programming.dev 4 points 2 months ago

I haven't looked at the code, so my two cents may be irrelevant, but it sounds like you could define a structure that borrows the vector, keeps a separate vector of indices into borrowed vector, and has a current element index.

struct SortFacadeIterator<'a, T: Ord> {
    data: &'a Vec<T>,
    indices: Vec<usize>,
    position: usize,
}

Then in new you would need to sort the original vector but instead of mutating it you would store indices of a resulting sorted elements from the original, i.e. when passed ["b", "a", "c"] you would create index storage of [1, 0, 2]. After that you can iterate both ways, returning an element by index:

impl<'a, T: Ord> SortFacadeIterator<'a, T> {
    fn current(&self) -> &T {
        self.data[self.indices[self.position]]
    }
}

I think, maybe sorting a vector could be done by enumerating original vector and sort_by a value, also I'm not sure you need a full ordering, but I don't remember what a sort expects

[–] sukhmel@programming.dev 2 points 2 months ago

I tried selling various crap like half used duct tape at around 10, I think, and was met by parents by accident. It was awkward and I abandoned that idea then

[–] sukhmel@programming.dev 3 points 2 months ago

I kinda feel Argentina is a bit different to Europe in that their economy was in a very bad shape, in Europe I would expect some Chinese enterprise buying the factory, leaving workers with pretty much nothing

[–] sukhmel@programming.dev 8 points 2 months ago (1 children)

I see you're also very restricted in key presses, my condolences

[–] sukhmel@programming.dev 1 points 2 months ago (1 children)

I think, that was another person's message

[–] sukhmel@programming.dev 4 points 3 months ago

To me it sounds like they took a lot of shortcuts and everyone from the team, barring the last engineer standing, were driven away by the looming Mount Debt

[–] sukhmel@programming.dev 3 points 3 months ago (1 children)

Wikipedia list exactly that in the In Popular Culture section, so yes, I guess

[–] sukhmel@programming.dev 3 points 3 months ago

Yeah, this one works flawlessly, a nice cover it has :)

[–] sukhmel@programming.dev 2 points 3 months ago (2 children)

The link gives me 403 with a pretty weird explanation:

We see that you’re unable to access this resource. Try updating your browser to the latest version.

[–] sukhmel@programming.dev 2 points 3 months ago

Didn't you know that? What are you, a woman?

[–] sukhmel@programming.dev 2 points 3 months ago (1 children)

There are instances that replace some slurs with removed, afaik, so it could be Lemmy, but this time it is not, I think

view more: ‹ prev next ›