Комментарии:
I recently downloaded the musializer project, compiling with nob is pure delicacy ./nob :)
I have been experimenting with nob.h, we hope to have an official version of that promising project. Thanks tsoding
Great stream and really good pieces of advice at the end!!
ОтветитьI wish i could give you money or buy you a book or sth.
Ответитьyou absolutely murdered that semicolon backseating guy
ОтветитьThis is a terrible video. Couldn't learn anything while trying to watch it
Ответитьso the smallest string (using only lowercase letters) that has a djb2 hash of 69 is "glidrn"
Edit: i'm pretty sure it's the smallest string even if you allow the full range of ascii characters
Cool video!
Ответитьat the dead end, semicoloned code much more readable and much more brain computable, from my conservative point of view. but yeah, for "shitting-on-the-go" type of activities python is pretty nice 👍🏼.
Good stream, thanks!
А переполнение беззнакового в сях разве не UB?
ОтветитьYet you dont like PHP just having the feature natively :D
ОтветитьActually GCC should be part of the shell so it can run C code directly
#! /bin/gccsh
Even better, someone should propose an RFC for POSIX to have GCC as a shell.
The guy who suggeted 31 as the multiplier is 100% a Turkish guy
ОтветитьThis is actually an exercise in The C Programming Language by K&R
Ответитьvery dumb hashtable, 100% time improvement!
Ответитьdelta_secs sounds like something that happens at super elite masquerade parties.
Ответитьi learnt to make a hash table in harvard's free cs50 course and it's pretty similar to this so it's pretty cool. writing collections is pretty fun
ОтветитьAwsome t-shirt. I have some like that too - just regionals though, and much better I am at home too because I am more like a slow water makes interesting algs than always in competitive environment ;-)
ОтветитьCoding in C is so painful...
Ответитьi have no programming socks .
ОтветитьWouldn't it be accurate to lowercase first.
ОтветитьJust curious about the performance of these algorithms when compiling with optimization flags (like -O3 -march=native)
ОтветитьNob release when?
ОтветитьI love how you after the message from chat "you forgot a semicolon" just go and remove the only one semicolon. great troll
ОтветитьMy goto hash table implementation is to use an array of arrays to handle the collisions, but I've also used an array of trees and an array of sorted lists and all manner of other combinations. I also always use a power of two for the table size so I can just do a `bitwise and` to normalize the hash and store the unnormalized hash with the keys to make collision checks faster. I also like to use a handy trick to speed up deletions, if that's an operation you even need to support, whereby I swap the key to be deleted with the last key in the table and just fix up the indices for that key then decrement the length of the table. It only reorders two elements with each deletion so it's a lot faster if you don't need the data in a sorted order after every modification, or for that matter need to preserve the order. I've used a DJB hash function every time I've needed string keys and I kind of flip flop on whether *31 or *33 is better, but I'd say play with it for whatever data you're using and either it won't matter or one will be just a bit better. Though, I always initialize it with 5381 as I figure that constant is what designates it as a DJB hash. Maybe I'm just weird.
Ответитьsum makes it's distribution very non-uniform. (basically it is very similar to average)
ОтветитьI'm glad Python exists.
Ответитьperfect timing, i have been implementing some based data structures in c++ for fun these past few days
ОтветитьSAIAGO FEZ ANTES DE VOCÊ !
ОтветитьLove how the djb2 hash function is basically the same thing he did except it starts at 5381 instead of 0 and multiplies by 33 instead of 31
ОтветитьAyo, if the compiler can tell us where we forgot to put a semicolon then it shouldn’t need us to put a semicolon, it should just infer it, I mean js already does it
ОтветитьNext pointers in c pls
ОтветитьGluggalog vandierbloggagglen
ОтветитьThank you for the excellent content! I would like to suggest recording another session that delves into consistent hashing, a technique actively employed in network load balancers.
ОтветитьAre you going to participate in the AoC event this year?
Ответитьyou can also use the clock() function for cpu time. it will give you the total cpu cycles that took between the operation
ОтветитьHow does one write "azozin"?
Ответитьgo rebuild yourself is still the best macro name i've seen
ОтветитьKnob
ОтветитьC# of a normal person
ОтветитьВот это возвращение к истокам...
Кстати, насчет программирования в молодости:
Недавно смотрел интервью 46-летнего Мурыча, где он рассказал об одержимости каждого программиста из 90-ых написать свою виртуалку. Не было ли у тебя такой шальной молодости?))