Тёмный

Rust Day 2 - Reading the Manual 

Titus Tech Talk
Подписаться 51 тыс.
Просмотров 4 тыс.
50% 1

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 10   
@TurntableTV
@TurntableTV 4 месяца назад
I rewrote all my dad jokes in Rust.
@JannisAdmek
@JannisAdmek 4 месяца назад
blazingly fast, memory safe dad jokes!
@caedis_
@caedis_ 4 месяца назад
Having a project/goal is a good way to learn a new language. I am wanting to do the same with Go
@StephenHall-zz2ym
@StephenHall-zz2ym 4 месяца назад
I've been learning go with bubbletea and been loving it.
@Lado93
@Lado93 4 месяца назад
Rust is difficult first especially borrow checker. Just don't try do a double linked list in it lol Rc
@vei_bean
@vei_bean 4 месяца назад
I have to point out that chat is wrong about how signed numbers work in binary. ALSO some rust things you might wanna know They are correct that the most significant bit is the signed bit, they are wrong in how it works. For an example, let's assume chat is correct, and I'll use 8 bits because I'm lazy, chat says -1 would be represented as 10000001 But that has a few issues for one 10000000 would be -0 which isn't real and a waste of space, it would also mean a (software) overflow of a signed integer would result in -0. If you know anything about overflows you should know that in reality you actually get the minimum possible value, for 8 bits that would be -128. There are other issues with chats idea such as having to swap add and sub operations based on if the number is negative or not which also requires the CPU to be aware of whether you are using signed numbers, on a CPU more logic means more space which is something we want to avoid. In reality, computers, in addition to using the most significant bit as the signed bit, also give it a numerical value i.e. 10000000 would be -128 instead of -0 and 10000001 would be -127 instead of -1, -1 is actual 11111111 (this means -1 + 1 is a (real) overflow that results in 0). The benefits of this approach are a slightly larger range as -0 doesn't take up a possible value, the logic for add/sub is the same for negative and positive integers and the CPU doesn't need any knowledge of if a value is signed or not (which means less logic and less space). Also, I mentioned real and software overflows, the difference is very simple. A software overflow is not a real overflow, but the software still considers it an overflow because the software knows something the hardware doesn't, that being that the number is signed. 127 + 1 on a signed 8-bit number is a software overflow as it goes from 01111111 to 1000000 the binary doesn't wrap around, but the software knows that it did because the software knows it's signed. On the other hand -1 + 1 is a real overflow as it goes from 11111111 to 00000000 you can see that the binary wrapped around this time, of course the latter case won't be considered overflowed by the software because the number was signed but if it was unsigned software would say it's an overflow. Also also, The saturating methods will not overflow, but clamp at the maximum or minimum value. Think of a tuple as an unnamed type with unnamed fields instead of an array, as that is literally what it is. () unit/empty tuple IS void, they use it instead of void because it's not a special type like void would have to be, after compilation they are represented the same i.e. not existing
@StephenHall-zz2ym
@StephenHall-zz2ym 4 месяца назад
me like
@nittani.
@nittani. 4 месяца назад
Wow 5 comments chris you fell off bro jk jk can u teach me rust too
@JasonTudisco
@JasonTudisco 3 месяца назад
Just use GO already. Your going to save hours. Lol.
Далее
How Rust rose to dominance (by accident)
11:01
Просмотров 38 тыс.
Async Rust Is A Bad Language | Prime Reacts
28:46
Просмотров 97 тыс.
r/webdev BANS HTMX??
5:28
Просмотров 150 тыс.
Microservices are Technical Debt
31:59
Просмотров 327 тыс.
Truth About Photography On Linux
8:35
Просмотров 7 тыс.
All Rust string types explained
22:13
Просмотров 173 тыс.
The BEST Solo/Duo Base In RUST - Base Design (2024)
6:18
why rust libraries may never exist.
7:26
Просмотров 257 тыс.
The Rust Survival Guide
12:34
Просмотров 149 тыс.
What if The World's Largest Chipmaker Disappeared?
5:41
Where is Rust being used?
11:46
Просмотров 85 тыс.