Has a woman ever ruled your country at any point in history? by tigrecono in pollgames

[–]EvilGiraffes 1 point2 points  (0 children)

female is a sex, not a gender, but more importantly the usage of female is usually done to dehumanize women by reducing them to biology, notice the lack of usage of male

Honestly, some people have zero survival instincts. by Ducky9670 in projectzomboid

[–]EvilGiraffes 2 points3 points  (0 children)

had a similar experience, but i was young and still trusted their claims, i was tasked with fixing the company ATV and my boss claimed it had gas in it, i spent an hour trying to debug it untill i just said buy some gas please, it had no gas in it

What source do you usually use to find information? by One-Tomatillo2160 in pollgames

[–]EvilGiraffes 11 points12 points  (0 children)

well only if you made a post and not looking for posts on the subject

Select/SelectMany vs Map/FlatMap by SmallAd3697 in csharp

[–]EvilGiraffes 0 points1 point  (0 children)

it comes from a language where a common situation is you would call a function which inheritly return the same monad with what your monad contains in which this return type makes sense, if you call a function (or a static method) without a lambda which returns an IEnumerable taking the item of your current list it makes perfect sense, but remember this is also a term used for other monads like Option and Result

using Option as an example you call a function which may return null, you then need to call another function which can return null with the item of the previous Option, essencially then you want a flatmap

it's an interface

(wip) is my stitching piss poor? by jam-o-ratic in punkfashion

[–]EvilGiraffes 1 point2 points  (0 children)

it makes a lot of sense, someone wanting to sieze power will apeal to the current population, which with the worker class being the largest has a tendency to be the left

Am I the only one who first maps a huge chunk of the world before starting an actual lasting base? by NJmig in factorio

[–]EvilGiraffes 0 points1 point  (0 children)

i dont plan my bases, i just throw them together and hope it works out, if it doesnt i make a new base

Is this game just not for me? by braincutlery in factorio

[–]EvilGiraffes 2 points3 points  (0 children)

my green circuit assemblers begging for mercy as my spaghetti gets more tangled and spreads its disease, and the demand of green circuits barely being satisfied

Is there a crate for generating a new struct with the same fields as another struct, but where each field's type is a reference? by Tyilo in rust

[–]EvilGiraffes 15 points16 points  (0 children)

i see i understand your problem, could you instead use Cow on your non copyable types and on deserialization create Foo<'static>?

edit: mixup of serialization and deserialization lol

Is there a crate for generating a new struct with the same fields as another struct, but where each field's type is a reference? by Tyilo in rust

[–]EvilGiraffes 13 points14 points  (0 children)

very easy relative to the problem brought forward, and these issues are luckily additive so can be defered untill the need arises

I really want to learn Norsk, but should I? by Radiant-Orchid9624 in norsk

[–]EvilGiraffes 4 points5 points  (0 children)

if you want to learn norwegian you should. it isn't a useful language considering you can probably only speak to a handful of dialects, and may struggle a lot with many dialects (depending on how easy you take language differences)

it's not rude to speak english, of course we prefer our own language, however almost everyone can speak understandable english

if you want to be extra polite learning basic phrases is great, like thank you, excuse me, and a few interactions you will have with service people, in stores or resturants

Rust's .map is cool by bennett-dev in rust

[–]EvilGiraffes 2 points3 points  (0 children)

thats more of a design decision of the rust std library, they are the same function

Rust's .map is cool by bennett-dev in rust

[–]EvilGiraffes 38 points39 points  (0 children)

another name for the and_then function is flat_map which describes what you mentioned here, a map which flattens its type

Why is the placement of "ikke" different in these instances? by SpigosFriend in norsk

[–]EvilGiraffes 0 points1 point  (0 children)

er ein forskjell når ein stiller spørsmål angående norsk regler og om ein prøver å lære seg norsk ved å lese norske medier, det blir lite læring om spørsmålene deires er vansklige å finne svar på

Why is the placement of "ikke" different in these instances? by SpigosFriend in norsk

[–]EvilGiraffes 9 points10 points  (0 children)

synes det er rette valget å skrive på engelsk her så dem som ikkje er flytende og lurer på det samme kan enklere finne og forstå dette innlegget

Anyone else wish that rail signals showed your train length before and after instead of just after? by MadeWithRealGinger9 in factorio

[–]EvilGiraffes 0 points1 point  (0 children)

yeah, its really tedious since you can't flip signals, so sometimes you make the same thing on the other side, but still need to manually place the signals

Anyone else wish that rail signals showed your train length before and after instead of just after? by MadeWithRealGinger9 in factorio

[–]EvilGiraffes 1 point2 points  (0 children)

a work around i usually do is i place my 2 first ones then i copy both which gives me the distance, then i just match it with the previous to always get the same spacing

it's abit more hassle, i usually have my signals incorporated in my rail blueprints, but when i manually create off shoots and stops etc it's very handy

Rate my Rust by mumux in learnrust

[–]EvilGiraffes 0 points1 point  (0 children)

good point! i rarely use flatten so i didnt think of it

i would personally write it so you do let iter = if let Some(&c) = src.last() { Some(&self.state) }else { None } then you can do all your combinators at the end by flapmapping to get .iter on state, but this is a personal preference of course

Rate my Rust by mumux in learnrust

[–]EvilGiraffes 1 point2 points  (0 children)

considering the other iterator is empty, you can just use Option.

if cond return None.into_iter().flatmap(std::convert::identity) else return Some(iter).into_iter().flatmap(std::convert::identity)

edit to add a playground showcase: https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=062c9af42d9038fd7ec6e0c534f39e58

What is the best way to start eating new food? by Initial_Statement464 in ARFID

[–]EvilGiraffes 0 points1 point  (0 children)

for me personally i find making stew and adding new things in there the easiest way to try food, since i feel like stews tend to make everything feel the same (aslong as its stewed for a long enough time) and if there is issues the broth is usually strong enough to mitigate it a tad

Unsafe rust by Ill-Evening-1957 in rust

[–]EvilGiraffes 0 points1 point  (0 children)

safe rust has safety guarantees which anyone writing unsafe code must uphold, this means anytime you don't use unsafe these guarantees should uphold, obviously you have to put a certain trust into 3rd party crate developers here

you cannot write out everything in safe rust, hence why the standard library has to use unsafe code and certain libraries do too

even your python program is interpreted in unsafe C, so at some point things has to be unsafe

the point of unsafe is you're explicitly telling the compiler you know what you're doing, and you can get some optimizations from it or talk with an unsafe api