mastodon.world is one of the many independent Mastodon servers you can use to participate in the fediverse.
Generic Mastodon server for anyone to use.

Server stats:

9.6K
active users

#GUID

0 posts0 participants0 posts today

Внутренняя кухня UEFI: что это такое и как мы готовим его в YADRO

Привет, Хабр. На связи Сергей Пушкарёв, я руковожу отделом разработки BIOS в YADRO. Расскажу об устройстве UEFI и его применении в компании. Мы разрабатываем и выпускаем разные аппаратные платформы: серверы, системы хранения данных, клиентское и телеком-оборудование. Один из «кирпичиков», который обеспечивает инициализацию и функционирование оборудования, — это BIOS (но правильнее говорить UEFI 🙂). В статье кратко разберем историю этой системы и ее современную реализацию — UEFI. Также поговорим о подходе к разработке и отладке этого ПО в YADRO. Вы узнаете, зачем нам нужна «синяя коробка» Intel, как мы прошиваем BIOS и проводим диагностику «в полях».

habr.com/ru/companies/yadro/ar

ХабрВнутренняя кухня UEFI: что это такое и как мы готовим его в YADROПривет, Хабр. На связи Сергей Пушкарёв, я руковожу отделом разработки BIOS в YADRO . Расскажу об устройстве UEFI и его применении в компании. Мы разрабатываем и выпускаем разные аппаратные платформы:...
Continued thread
Just in case anyone else ever needs a #pseudorandom #Guid generator for #dotnet, here's what I finally did:

	private const int guidSize = 16;
private const int guidStrLen = (guidSize * 2) + 4;
private readonly StringBuilder guidBuilder = new(guidStrLen, guidStrLen);

private string CreatePseudoRandomGuidString(Random r)
{
var bytes = new byte[guidSize];
r.NextBytes(bytes);

// Generate a valid UUID-v4 as per RFC 4122, section 4.4
bytes[6] = (byte)((bytes[6] & 0xfU) | (4U << 4)); // version 4
bytes[8] = (byte)((bytes[8] & 0x3fU) | 0x80U); // variant 1

// Format as a string. We don't use the System.Guid class here
// because it uses some mixed endian internal format which might
// not be portable.
guidBuilder.Clear();
for (int i = 0; i < guidSize; ++i)
{
guidBuilder.Append(bytes[i].ToString("x2"));
if (i % 2 != 0 && i > 2 && i < 10) guidBuilder.Append('-');
}
return guidBuilder.ToString();
}
To get a reproducable sequence of pseudo-random Guids, just seed the Random instance with a fixed value before calling this the first time.

Guid Version 7 in .NET 9 introduces a new way to generate globally unique identifiers (GUIDs) based on timestamps and randomness, making them more suitable for relational databases. Unlike the non-sequential GUID v4, GUID v7 reduces index fragmentation, improving database performance.

okyrylchuk.dev/blog/guid-versi

Oleg Kyrylchuk - .NET Pulse · Guid Version 7 in .NET 9.NET 9 introduces a GUID version 7 implementation. Find out the differences with GUID version 4.

there seems to be a lot of excitement for #uuidV7 these days (timestamp-based). it's very cool, and a good choice if you're using the #uuid or #guid as a database key (to avoid fragmentation)

https://ntietz.com/blog/til-uses-for-the-different-uuid-versions/

i also really like
#ulid for this, and they can be converted to uuids/guids easily and quickly.

one thing i don't see many people talk about when they move to monotonically incrementing ids (like v7/ulid) is this: if you have a distributed database you will end up with poor balancing with these ids. not what
most people do, i guess, but it's something to think about.

ntietz.comTIL: 8 versions of UUID and when to use them | nicole@web