sukhmel

joined 3 years ago
[–] sukhmel@programming.dev 3 points 1 month ago

In general, yes

In this case it's more like if everyone is selling eggs $1/egg, but the tag shows the price based on the last transaction, so when someone buys an egg for $10 you suddenly increase everyone's worth ten times. If they start selling the price may collaps faster than they can sell

[–] sukhmel@programming.dev 11 points 1 month ago

Yeah, totally justified then

[–] sukhmel@programming.dev 3 points 1 month ago

Some offensive jokes don't try to smear the ones they try to offend, I'm perfectly fine with those

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

I don't know, they have their charm. I wonder if those look worse or better in real life, but I wouldn't run away from a place serving those utensils

[–] 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 2 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 2 months ago (1 children)

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

view more: ‹ prev next ›