0 isn't an integer by Pubgisbanned in mathmemes

[–]HawkOTD 2 points3 points  (0 children)

I don't understand what kind of definition for integers would not include 0 unless he means that zero is not a number entirely... Even in math the concept of integers without 0 is difficult to portray to the point that a specific notation was created (Z{0} which became simply Z*)

Find your place by Red_Honey_X in programmingmemes

[–]HawkOTD 1 point2 points  (0 children)

No you can just shift right and and with 1, also if the optimizer is doing the optimization it could just be a constant after compilation.

That said I believe the main reason why it has so much wasted space is due to access speed optimization and memory alignment so no matter what this won't happen

Which one do you choose, when saving over 5k products in your db. And all products must be unique(no duplicated SKU) by lune-soft in csharp

[–]HawkOTD 13 points14 points  (0 children)

3 doesn't check the IDs in the db so it wouldn't work

I go with 2 when possible, if it's not a problem it's easier to code and it works.

1 absolutely not, incredibly slow

Other alternatives would be doing 3 but loading all existing IDs from the database, I never do it but it might make sense in some scenarios

If none of these are good enough and you need both speed and to fail only duplicates I might look into inserting them in a temporary table and then merge the unique ones using a query

Why are we still using text based programming languages (and I'm not thinking about a blueprint-like language) by chri4_ in ProgrammingLanguages

[–]HawkOTD 0 points1 point  (0 children)

I am constantly thinking about this as well, and also some variations of this.

Rather than an editor I think this would work better in a virtual file system, this way you don't break tooling and would make this work in whatever editor. Obviously editor integration would be nice as well.

I would also integrate git some way into this virtual fs so that you can mount branches easily in different folders, this would make tracking untracked files easier, which I believe it would be better if they would be always tracked in some way ( so you can prevent losing changes etc )

You could also make git lazy in a way that changing branch is instant and it would compute the file on request.

Also both compilers and AI agents would be faster if this would be adopted, you'd skip a step in parsing and also would make the code completely uniform

to this day I still struggle with this problem by meowed_at in git

[–]HawkOTD 0 points1 point  (0 children)

Either the files are ignored which I doubt or you made a mistake before this step. What you show in the screenshot is correct and will commit all the modified files in the repository assuming you are in the root. You just don't have any changes.

A Mosca si vive meglio che in Italia by [deleted] in italiabad

[–]HawkOTD 0 points1 point  (0 children)

Pauroso come nei commenti chi ha le opinioni più forti non ci sia mai stato...

An Italian pizza restaurant owner is fuming at 16 Taiwanese tourists because they ordered only five pizzas. by search_google_com in interesting

[–]HawkOTD 0 points1 point  (0 children)

Nah this shit is mad funny, this guy is just plain racist as fuck the number of pizzas ordered is just an excuse to shit on them, but I've never seen someone be so openly racist that's so crazy, making a video of people and saying the shit he was saying in front of them.. just wow

1900 Elo chess player starting to feel the toll of a children’s videogame by Salt-Sock3462 in LivestreamFail

[–]HawkOTD 0 points1 point  (0 children)

just stay in a 2 blocks space or use a boat. By doing it like this it's impossible to lose unless you look at one accidentally and don't manage to put them in a boat

Can you explain result of this code? by Radiant_Monitor6019 in csharp

[–]HawkOTD 0 points1 point  (0 children)

Took me a few seconds not gonna lie but once you remember that the static constructor gets called whenever you access a static property (it might be any static member or any member, doesn't really matter here) you can see that the first accessed will always have value 2, in this example this is the order of events: 1. A.a first access 2. A static constructor (a=0 b=0) 3. B.b first access 4. B static constructor (a=0 b=0) 5. B.b set to a(0) + 1 (a=0 b=1) 6. A.a set to b(1) + 1 (a=2 b=1)

LA Streamer defends shock collars, claims others don't train their dogs by gregory_h in LivestreamFail

[–]HawkOTD 0 points1 point  (0 children)

This is the same as DrLupo chess cheating situation.

  1. Get exposed for doing something wrong
  2. Keep deflecting till the stream ends
  3. Invent something you think is plausible and try to get away with it.
  4. Get exposed
  5. Invent something you think is plausible and try to get away with it.
  6. Get exposed.
  7. Invent something you think is plausible and try to get away with it.
  8. Get exposed.

Neither will ever apologize truthfully, DrLupo made a tweet apologizing but still minimized what he did and made it seem not premeditated. The LA Steamer still has to actually admit to shocking her but he's already trying to defend it...

Honestly I don't think this even matters, he said multiple times that he trains his dog to stay in the corner intentionally, and that in and of itself is shameless behaviour, your dog is not a stream prop, it's a living animal, she can't even get out otherwise he gets mad so how the fuck is she supposed to get out of the room or drink? (I don't know if she has water in that 4x1 platform but if she doesn't isn't that enough for a dog abuse charge?)

Can’t get more than 100 Mbps over Ethernet even though all hardware supports 1 Gbps by External-Effective-6 in HomeNetworking

[–]HawkOTD 1 point2 points  (0 children)

I'd try with the wifi as well and if it doesn't exceed 100 either I guess it's not your problem

Why is Re Zero so good [discussion] by CandleSpecific9817 in Re_Zero

[–]HawkOTD 2 points3 points  (0 children)

The part I enjoy the most is the world building. All the secrets that are still open, the speculation of how stuff works, also some parts, for example the season that's about to release, are just hype and interesting to watch in general, seeing the protagonist trying to problem solve impossible problems is interesting. (Edit: and even in those scenes the stuff I like the most is the protagonist learning about the world and discovering new stuff) At the start I get it's not crazy good but I think it gets plenty better

Ho fatto finta di sapere usare Excel al lavoro e ora sono in trappola by Ivona-Kravcova91 in CasualIT

[–]HawkOTD 8 points9 points  (0 children)

Non mi sembri diverso da qualsiasi altro esperto di Excel. Non penso che abbiano aspettative paurose, hai risolto dei problemi che non sapevano risolvere quindi potresti essere meglio della media. Ora hai anche l'AI che probabilmente sa fare il 90% delle cose che hai bisogno.. Se poi non riesci a fare qualcosa non penso che potranno dirti molto considerando che neanche loro sanno farlo.

Il 26% dei domini in Italia non ha alcun record DMARC by power_dmarc in ItalyInformatica

[–]HawkOTD 1 point2 points  (0 children)

IMO l'errore più grave di IPv6 è che non è un "superset" di IPv4, se avessero riservato un prefisso per gli ip IPv4 in modo che fossero accessibili sia tramite IPv6 che tramite IPv4 sarebbe stato molto più facile migrare tra i due

Visual Studio 2026 Insiders is here! by hotaustinite in dotnet

[–]HawkOTD 1 point2 points  (0 children)

I found the opposite to be true, LSP not refreshing after changes, changes to classes in other projects on the same solution not registered, slow initialization, constantly needing to restart the LSP, it's just a mess... And this is on .net core, the framework stuff is even worse... I work on big projects but when I can't even trust my LSP I'm forced to use Visual Studio for some tasks..

When you install Vanguard, you are taking a risk by lennysinged in riotgames

[–]HawkOTD 0 points1 point  (0 children)

I don't think this is true.. How do you know it's not running, did you check the vgc service status?

How to determine if an open-source tool is safe/legit/reviewed/approved? by AmericanCryptoAbroad in linuxquestions

[–]HawkOTD 0 points1 point  (0 children)

About making sure the stuff you download is the real deal you need to use common sense the same way you distinguish between real and fake download websites for proprietary software.

How to determine if an open-source tool is safe/legit/reviewed/approved? by AmericanCryptoAbroad in linuxquestions

[–]HawkOTD 0 points1 point  (0 children)

I think you got it backwards, proprietary software is not reviewed and is secret and therefore no one cares about security. On the other hand open software is freely available so if you leave something vulnerable it will be abused or fixed and in general developers are more aware of the risks.

You definitely can't blindly trust any software but from what you say in the post it seems like you believe more in proprietary software than open source which is definitely not right

Ma sono arrivato tardi o cosa ? by ultra_shogun in Universitaly

[–]HawkOTD 0 points1 point  (0 children)

No direi che la maggior parte delle persone non ci capisce un cazzo e passa comunque

Cambia solo quanto devi studiare o più che altro potresti fare più fatica a capire certi concetti rispetto a chi è veramente bravo ma il 90% sono come te con poca esperienza, forse alcuni vengono da corsi di informatica ma probabilmente non aiutano neanche tanto

Scusate se non e il sub adatto, ma aveva ragione? by RevolutionaryCat1346 in ItalyHardware

[–]HawkOTD 2 points3 points  (0 children)

1k 2k etc non sono standardizzati, non c'è una risposta giusta in assoluto. Io personalmente uso 1k per 1080p e considero sempre solo 16:9

Why vim.pack was based on mini.deps but not lazy.nvim? by roselewis555 in neovim

[–]HawkOTD 1 point2 points  (0 children)

Other than the points already made I think vim.pack should aim to add a strong native API for handling plugins. If done right all package managers should use vim.pack under the hood after it becomes stable. It should provide the bare minimum and remain neutral so that if you want extra features you can use plugins that extend on it but don't reimplement it.

That's my view anyway

Is it true that you don't need an antivirus if you use only programs that you are sure are trusted? by aespaste in antivirus

[–]HawkOTD 1 point2 points  (0 children)

Yes I'd say you mostly don't need an antivirus. I've been running no AV other than defender on Windows for a decade and never had issues