mom can we have emacs no we have emacs at home emacs at home: 42:05
@bart2019 Жыл бұрын
2k per node is not a lot for modern computers, but at 1024 nodes per tree that is 2MB, and that is a lot for modern CPU caches. On its own you won't notice it, but on a heavily loaded computer you might notice it because 2MB is easily a quarter of the entire CPU cache. In this case, a theoretically much slower approach but with a much much compact storage, for example with a simple comparison loop in a linked list, would put much less strain on the cache.
@miniflint242310 ай бұрын
How could I achieve something like this guy do. He’s so good
@arkadiymel59872 жыл бұрын
you can mark the end of the word not with bool flag, but instead put empty node at \0 in children
@derekburlingame2132 жыл бұрын
That doesn't work for cases where words like "dog" and "dogged" are both in the structure, since the first 'g' would have children, but also be the end of a word.
@DylanNelsonSA2 жыл бұрын
@@derekburlingame213 They meant adding a node at index 0, not having 0 children. So it would be like treating the word as a c-style string with a null terminator.
@lolcat696 ай бұрын
It would be interesting to use this data structure for AI, imagine like passing binary files to this and passing ut to an AI, it could figure out a file is X type based on the signature or smth and ut would learn to clasify files or smth like that
@ratherbyexploring48982 жыл бұрын
Missed opportunity to call this repo "Tsrie"
@zahir.parkerАй бұрын
Which font is this ?
@lishugupta2 жыл бұрын
U earned a sub just by the title of video🔥🔥
@hrisheekeshdandekar51262 жыл бұрын
What is the theme this guy is using???
@petsesto2 жыл бұрын
34:17 children[69] ... Tsodin nooooo🤣
@trejohnson76772 жыл бұрын
We have the same brain but not the same muscle memory or gut.
@dream11tatyabichoo924 ай бұрын
how to donate from India
@L1Q2 жыл бұрын
29:03 cope
@miezekatze35362 жыл бұрын
Where is Emacs?
@tokiomutex41482 жыл бұрын
error: Where: command not found
@sahilbaori90522 жыл бұрын
@@tokiomutex4148 Lame.
@tokiomutex41482 жыл бұрын
@@sahilbaori9052 error: Lame.: command not found.
@yukwa86722 жыл бұрын
🔥🔥
@tobeypeters2 жыл бұрын
Did you say, There’s no Switch...case in c?, around 1:18:00 ? Idk ... Anyhow would love to see how to do this in python.
@TsodingDaily2 жыл бұрын
No, I didn't say that there is no switch-case in c. Please listen to what I've said again. You missed two important words.
@ricoh512 жыл бұрын
No switch for string 😉
@anon_y_mousse2 жыл бұрын
@@TsodingDaily Fun fact, AMD's optimization manual had an example of how to simulate string switching by hashing constants ahead of time. With C++'s constexpr you could have base that allowed adding words with minimal effort. (Hopefully you'll be back and posting in the near future.)
@tokiomutex41482 жыл бұрын
So you're using Vim now
@MoeQ_2 жыл бұрын
discord link please ?
@qerdcv2 жыл бұрын
Второй
@dibyojyotibhattacherjee42792 жыл бұрын
Why no cpp?
@latinoce2 жыл бұрын
why cpp
@dibyojyotibhattacherjee42792 жыл бұрын
@@latinoce cuz, it's an awesome language.
@avananana2 жыл бұрын
@@dibyojyotibhattacherjee4279 brainfuck is an awesome language as well
@dibyojyotibhattacherjee42792 жыл бұрын
@@avananana Haven't used it before, gonna check it today, thanks for the suggestion 🙂
@dibyojyotibhattacherjee42792 жыл бұрын
@@SimGunther ohh, yea, Tsoding's subscribers are really nice people.
@experiment00032 жыл бұрын
So, this guy could work for any company he wants (Google, Tesla, Amazon, etc) and be a senior engineer at the least! instead, he chooses to make his living via streaming.
@Chaosman882 жыл бұрын
If I could just code 4 times slower than him, I would be a respected member of my team
@venkateshgunda252 жыл бұрын
It could be because at a large company, coding only comprises about 40 to 50 per cent of the time. Rest is projects, meetings, presentations and other corporate BS that eats up valuable time.
@richienguyen27032 жыл бұрын
not every software engineer wants to work for big tech companies. They're all big so their development process is more bureaucratic, and some people just purely love coding.
@AndrewTSq Жыл бұрын
agile ruins the fun of coding.
@BboyKeny Жыл бұрын
@@dill__pickles Well you are a God on earth. So all other people, aside from you, fit your description.
@dingalong142 жыл бұрын
Haven't watched in a couple of weeks, glad to see you've switched to the *objectively superior* text editor. Jokes aside, nice stream. I always pick up at least one or two little things I didn't know about previously.
@Nick-lx4fo2 жыл бұрын
Gedit, you mean, is the objectively superior text editor
@arroba32182 жыл бұрын
THIS is what programming looks like. I'm into web development, I don't feel a programmer at all
@JustSomeAussie12 жыл бұрын
Because you're not :)
@lonelyfloat25822 жыл бұрын
Just do what you enjoy doing, doing anything else (unless it's for a job or something similar obviously) is stupid IMO
@Leonhart_935 ай бұрын
Not sure what people work on in web dev to say that they don't do stuff like this. Writing elegant programs that do a specific task efficiently should be the target in anything you use. If I write a 1000 line JS program for a specific page to have some arcane functionality, then it's clear that I need to apply a lot of programming paradigms to do it well.
@kernelk19312 жыл бұрын
looks like you've uploaded a brand new quality content, tsoding!!
@larryd95772 жыл бұрын
Instead of maintaining a bool in every node: A memory-efficient solution (for reasonably large trees) for marking the end would be to use a guard-noded (one should be enough) which is inserted as a leaf of every end of a word.
@Rohan-bg8ci2 жыл бұрын
"That is much productive than Java enterprise edition developer" -chad Tsoding
@DJohn0012 жыл бұрын
Hello, what's the reason that you're not binding your local branch with your remote one? for example: `git push -u origin ` then you did have to type your branch each time you commit. Instead you can just use `git push`
@froggoboom2 жыл бұрын
the man types fast
@Teacher_Ali2 жыл бұрын
One of the coolest channels on internet world.
@geovanniportilla71592 жыл бұрын
This dude is just insane!!! Pure data estructure, algorithm and design. This is pure gold.
@coffee-is-power2 жыл бұрын
you dont need to create the project, when you push to an repository that doesnt exist and you have permission to create repositories, it creates automatically
@baka_geddy2 жыл бұрын
How so? Can you share it?
@N00byEdge Жыл бұрын
Another way to indicate the end of a word is to set index 0 of the children array to something, just like you would have a null terminator in a c-style string
@bigbluebiosphere Жыл бұрын
commit-ee commit-ee pushy-ee pushy-ee made me LMAO. But nowhere near as much as cucumbersome did.
@alexzander__63342 жыл бұрын
you just moved to vim from emacs?
@geovanniportilla71592 жыл бұрын
Pure data structure, algorithm, and design. This is pure gold. I follow your content and here is an idea: maybe, would be nice to have a project that created a programming language for database management. I don't know something basic: relational algebra, join, or some k-tree search algorithms. May be is something you are not working in the past and it's challenging for you. Peace!!
@trungthanhbp2 жыл бұрын
this guy is funny, haha
@lieryan91372 жыл бұрын
For the use case of autocomplete, especially one that needs to work on Unicode, I think a regular binary search tree would work better than a trie. For finding candidate completions, you'll want a binary tree search implementation that returns all nodes in a range. For example, if you want to find all words that has a prefix of "sal", you'll want a search function that returns all nodes whose values matches `"sal"
@edusandalo2 жыл бұрын
How would this approach work with Unicode? Would the search be `"...A"
@s000x Жыл бұрын
Ur emacs config got me to patch my neovim so current line number is aligned with relnum lol
@kuwapt9512 жыл бұрын
Hello hello
@Simon-xi8tb2 жыл бұрын
Unrelated: How can I get accepted into discord ? I joined the server, but can't type messages. I did accept the rules
@MaxHeroGamer2 жыл бұрын
The go thing made me thing why Erlang is so brilliant.
@keldwikchaldain9545 Жыл бұрын
To compress memory the primary way would be to use an array mapped trie, which trades memory footprint for increased memory allocations, but with pooling that can be reduced as well.
@rogo73302 жыл бұрын
Not watched the whole video yet, but what i think is storing pointers to every character is kinda pointless. What we are really care about is branches. That saying we really wanna store pointers to each individual string (null-terminated, btw, that way we not gonna waste 2kibi on each character lol) and then just cat them together. Btw, we can do the same trick with null termination with our pointers! LMAO А потом всё превратится в ад из незнания сколько на самом деле памяти занимает наша программа, кек
@anon_y_mousse2 жыл бұрын
Exactly, and then the index into the string and a length. That said, I really wish people would stop using those ldlotic prefixes. Other than storage device manufacturers who rip people off, no one ever meant kilobyte as 1000 bytes. I will never use those prefixes and just keep saying kilobyte and meaning 1024.
@bonchonmaru11 ай бұрын
1:47:12 is it possible to prevent stackoverflow in `print_autocomplete` for deep trees?
@TsodingDaily11 ай бұрын
You probably can by using a bigger stack. Which might mean increasing the size of the callstack itself or implementing a non-recursive solution that maintains its own stack. In the later case you can have whatever size of the stack you want.
@crankyunicorn44232 жыл бұрын
Yello!
@ItzAnameOk Жыл бұрын
Amazing
@هلالمجيد-ظ3ك2 жыл бұрын
What kind of linux does he use?
@narigoncs2 жыл бұрын
Debian
@hindenburg30382 жыл бұрын
Where I can get the link to his discord server?
@csbnikhil2 жыл бұрын
Twitch About Page
@archavez1002 жыл бұрын
How did you zoom and add that spotlight to your cursor? At 11:08
@iuc7254 Жыл бұрын
He wrote an application in nim to help him do that.... you can find it on one of his github repos under the name of Boomer
@Q_202 жыл бұрын
proud to be a reckless java code duplicator
@johndowson18522 жыл бұрын
1:08 CAN YOUR GITHUB DO THIS?
@tentative_flora26902 жыл бұрын
I hadn't thought before about someone using recursion in an intuitive solution before. This was really cool.
@yramagicman6752 жыл бұрын
Once you start working with recursion it becomes more and more intuitive. There are a number of problems that are actually easier to solve with recursion than they are with iteration. Zipping 2 arrays is one example of this that I used recently. I implemented the recursive algorithm for it in less time than it would have taken to figure out how to do it iteratively.
@tentative_flora26902 жыл бұрын
@@yramagicman675 I guess I am so used to trying to stuff things into while loops I miss out on a lot of good use cases.
@yramagicman6752 жыл бұрын
@@tentative_flora2690 get out of your comfort zone and try a language that forces you to use recursion. Lisps are an easy way to do that, and the easiest one of those to get started with is probably Racket. I really enjoy Racket. It has taken Pythons place as my go to language for basic scripting.