Coding My Own Text Editor Again (Ded S02E01)

  Рет қаралды 90,630

Tsoding Daily

Tsoding Daily

Күн бұрын

References:
- Source Code: github.com/tsoding/ded
- Rope Data Structure: en.wikipedia.org/wiki/Rope_%2...
- Noed Text Editor: github.com/tsoding/noed
- do/while(0) trick: stackoverflow.com/questions/1...

Пікірлер: 131
@alexs6986
@alexs6986 Жыл бұрын
I think it would be really cool if you did Advent of Code using only tools that you built: text editor (ded), programming language (porth), ...
@gustavoh5143
@gustavoh5143 Жыл бұрын
the most impressive skill this man has in my opinion is to be able to code without having a colorful code
@kiryls1207
@kiryls1207 11 ай бұрын
at the beginning of my dev journey i didn't like colors so i programmed without syntax highlighting black text on white background also I can't see s#it anymore
@nofeah89
@nofeah89 10 ай бұрын
isnt he using syntax highlighting?
@0ia
@0ia 8 ай бұрын
Took me a month to get used to no syntax highlighting. Improved my ability to reason about code.
@SoftBreadSoftware
@SoftBreadSoftware 6 ай бұрын
@@nofeah89 a minimal syntax highlighting yea, keywords, variable names, comments.
@biggestthreattoyourexistence
@biggestthreattoyourexistence Жыл бұрын
You know you're nuts when you code your own text editor.
@mitya
@mitya Жыл бұрын
It's nice to see the way of thinking and the insights of a fellow developer :) One small note: your way of handling line ends assumes that EOL is always one character. You may want to reconsider that, in order to be able to handle files with ' '
@jan_harald
@jan_harald Жыл бұрын
just store the line ending char, replace it with one character (like ) and then replace back ;P basically dos2unix file.c;$EDITOR file.c;unix2dox file.c
@ocaly
@ocaly Жыл бұрын
I was about to comment this. Microsoft Windows problems :D
@mitya
@mitya Жыл бұрын
@@jan_harald well, hey, good luck with that and to whoever hires you to do a software engineer job :)
@mitya
@mitya Жыл бұрын
@@ocaly No, it is not. We don't always choose the source of the files we need to work with. It a complex world, with multiple OSes and their quirks. Basic compatibility is important. Otherwise you're just going the way of Microsoft, Apple and others whose motto is: "It's our way or the highway". Linux is about freedom of choice as well.
@jan_harald
@jan_harald Жыл бұрын
@@mitya you basically never want mixed line endings anyway, and use tr, unix2dos, sed, python, or whatever, with text files it's easy and common to convert them like that, heck, git loves to auto-convert the files FOR you, so go ahead and fire git's developers while at it ;P obviously nothing applies 100% of the time, but I doubt that you'll be working with text files which must contain mixed line endings, or which cannot be converted like that, nobody sane writes literal newlines into strings and stuff, if they care about what bytes come out the other side
@Zwiebelgian
@Zwiebelgian Жыл бұрын
<a href="#" class="seekto" data-time="117">1:57</a> „… like all other text editors…“ Vim:
@TsodingDaily
@TsodingDaily Жыл бұрын
Interesting! I never noticed that! Even though I've been using vim for quite some time already...
@root317
@root317 Жыл бұрын
exactly my thought lol
@batatavoadora1136
@batatavoadora1136 Жыл бұрын
@@TsodingDaily I'm pretty sure you can enable the cursor wrap, but the default is off
@mndtr0
@mndtr0 Жыл бұрын
@@batatavoadora1136 set whichwrap+=,h,l,[,] I'm find that
@lucaslindgren3237
@lucaslindgren3237 Жыл бұрын
You're really good at coding bro
@ecosta
@ecosta Жыл бұрын
About the limits of C around <a href="#" class="seekto" data-time="2760">46:00</a>. I never thought about it, but I would love to see what Tsoding thinks about using a subset of C++ just to overcome C limitations, since C++ is meant to be compatible with C.
@Bobbias
@Bobbias Жыл бұрын
I can't speak for him, but I get the feeling that if he viewed that approach favorably he'd be writing code that way in his videos. It's not difficult to write C with a few C++ features sprinkled in if you want to (though I believe there would need to be some changes to accommodate the switch). If I had to guess, I suspect the downsides of C++ would outweigh the benefits, even given that you can still write C++ in a very C-like manner.
@kurciqs8355
@kurciqs8355 Жыл бұрын
finally saw the keyboard
@peduran1987
@peduran1987 Жыл бұрын
Awesome stream, thank you thank you thank you!
@amosnimos
@amosnimos Жыл бұрын
The text editor I coded added nothing original, but yours actually inovated the ehole concept by using a dynamic camera system. It may not be the most practical thing but it's very cool and unique, I don't like the rainbow color and would like a green crt glow instead but that's a good start. By taking some inspiration from the cool retro terminal this project could really shine.
@Jack-sy6di
@Jack-sy6di 10 ай бұрын
a realistic green phosphor look, so when it's very zoomed in you can actually see scanlines and bloom, would be cool
@titanovsky
@titanovsky Жыл бұрын
с новым годом!
@Tiger_CZ
@Tiger_CZ Жыл бұрын
Hello, great video. I just want to point out (idk how to say it politely, but I dont want to offend you) you have or youtube has a mistake in references. The link to rope data structure is missing ")", but it is actually written after the link.
@j-wenning
@j-wenning Жыл бұрын
I was kinda hoping this would involve some sort of interacting with a piece table. I guess the point of this isn't necessarily to make an absurdly efficient editor though.
@nvpyt2235
@nvpyt2235 Жыл бұрын
Hey man, I was looking for a great place to start learning python (or how and where to learn it) and I was wondering if you have any good places that you know of that I can learn? Nice video BTW
@Ryan-xq3kl
@Ryan-xq3kl Жыл бұрын
holy fuck amazing work dude
@energyman100
@energyman100 Жыл бұрын
What did you use to do that zoom in and highlight with your mouse at <a href="#" class="seekto" data-time="20">0:20</a> ?
@CarterColeisInfamous
@CarterColeisInfamous Жыл бұрын
YATTSE - Yet Another Text TSoding Editor
@IveGotBeef
@IveGotBeef Жыл бұрын
<a href="#" class="seekto" data-time="2466">41:06</a> i did not expect that reference
@BryanChance
@BryanChance Жыл бұрын
Briliant!
@mndtr0
@mndtr0 Жыл бұрын
Is you usually use Emacs?
@alexvitkov
@alexvitkov Жыл бұрын
the 2nd link in description is missing the closing bracket
@luizfelipeg.5364
@luizfelipeg.5364 Жыл бұрын
Okay, in my mind noed, cannonically stands for 'no one escapes ded'
@NateROCKS112
@NateROCKS112 Жыл бұрын
<a href="#" class="seekto" data-time="422">7:02</a> I haven't finished yet, but couldn't you just store the indices to the beginning of each line? The next newline is just at the next `lines` index minus one.
@izergaer
@izergaer Жыл бұрын
ne again, a snova
@MrRegdis
@MrRegdis Жыл бұрын
have you ever considered setting another camera just for your hands/keyboard?
@pedropesserl
@pedropesserl Жыл бұрын
actually GREAT idea. I would be very entertained by that
@abrarmasumabir3809
@abrarmasumabir3809 8 ай бұрын
He is using hhkb that's a great keyboard!
@KoshakMine
@KoshakMine Жыл бұрын
Чел харош, редактор "Дед"
@D-V-O-R-A-K
@D-V-O-R-A-K 9 ай бұрын
<a href="#" class="seekto" data-time="450">7:30</a> Why store the location of , when always == (the next line's start position - 1)?
@rakanottrubick1857
@rakanottrubick1857 Жыл бұрын
dude im quite new to programming and tell me how it is even possible to make text float like that, changing color mid-character? That seems literally impossible
@TsodingDaily
@TsodingDaily Жыл бұрын
But if a video game was doing something like that you would not be surprised?
@kawaikaede2269
@kawaikaede2269 Жыл бұрын
yay
@lucifer-5ybtn
@lucifer-5ybtn Жыл бұрын
<a href="#" class="seekto" data-time="85">1:25</a> what is the name (model) of the keyboard that you’re using? It sounds really nice
@rubenarce5514
@rubenarce5514 Жыл бұрын
It seems like HappyHacking keyboard
@c4llv07e
@c4llv07e Жыл бұрын
It is qwerty keyboard.
@SimGunther
@SimGunther Жыл бұрын
HHKB2
@hanqnero
@hanqnero Жыл бұрын
@@SimGunther Hell that costs a lot
@ValuedValue
@ValuedValue Жыл бұрын
@@c4llv07e 😑
@berndeckenfels
@berndeckenfels Ай бұрын
<a href="#" class="seekto" data-time="2930">48:50</a> when doubling clamp it to a max increment (2gb) and also to maxinteger
@TheApgreyd
@TheApgreyd Жыл бұрын
Рад, что наткнулся на канал
@noeldc
@noeldc Жыл бұрын
What's with the stats at the bottom of the screen? :)
@shivampatel4595
@shivampatel4595 Жыл бұрын
I noticed that too😂
@ltvnf
@ltvnf Жыл бұрын
seems like Apple epic keynote shit. :o "One more thing to C"
@bibliusz777
@bibliusz777 9 ай бұрын
could you do a video on using GPU framework independent?
@robimuhammad95
@robimuhammad95 Жыл бұрын
This is lit 🔥🔥 This will be great if we use it on VR virtual monitor 🔥 Is this the future of text editor? 🔥
@chriskerwell-gresla4403
@chriskerwell-gresla4403 Жыл бұрын
Hhkb - tasteful
@CaterpillarOGM
@CaterpillarOGM Жыл бұрын
porn folder 8.1 Gb?
@user-jm3xl7rg5k
@user-jm3xl7rg5k 8 ай бұрын
Only 8.1 GB?? )))
@eyephpmyadmin6988
@eyephpmyadmin6988 Жыл бұрын
Have your text editor have an auto word finishing but with some python or rust, I've always wanted one that works for rust
@texoport
@texoport Жыл бұрын
pog
@Omena0
@Omena0 6 күн бұрын
Bussin GriddyCode????
@gsilva877
@gsilva877 Жыл бұрын
My text editor 🤣🤣🤣🤣🤣🤣
@sangramsingha11
@sangramsingha11 Жыл бұрын
Here me configuring neovim.. 😀
@ValuedValue
@ValuedValue Жыл бұрын
? Bro what's written in the bottom? Corn folder : 8.1gb
@Solomonwo
@Solomonwo Жыл бұрын
Lmaooo
@twentyeightO1
@twentyeightO1 Жыл бұрын
He probably made his own porn in C, you know using his own graphics library.
@abdullahkhaled6162
@abdullahkhaled6162 Жыл бұрын
<a href="#" class="seekto" data-time="20">0:20</a> how do you do this in x11?
@flleaf
@flleaf Жыл бұрын
his application called "boomer" on github. can't post links on youtube because youtube
@LongestYardstick
@LongestYardstick Жыл бұрын
where did you go? I miss your videos :( we will support you with patreon if you want money
@xnhp3
@xnhp3 3 ай бұрын
<a href="#" class="seekto" data-time="67">1:07</a>:26 still see some tea left.
@callisto960
@callisto960 Жыл бұрын
What keyboard
@rubenarce5514
@rubenarce5514 Жыл бұрын
It seems like HappyHacking keyboard
@starc0w
@starc0w Жыл бұрын
<a href="#" class="seekto" data-time="3042">50:42</a> Thx for sharing your stuff! Isn't it a problem if you lose your old pointer (da)->items when realloc fails?
@rndtrash
@rndtrash Жыл бұрын
as you can see in the code, after failed realloc tsoding is gonna ram-shame you :)
@starc0w
@starc0w Жыл бұрын
@@rndtrash Haha, yes, true! :-) (Nonsense was written here)
@VojtaJavora
@VojtaJavora Жыл бұрын
@@starc0w you have to define NDEBUG for assert to do nothing. Just don't do that and problem solved.
@starc0w
@starc0w Жыл бұрын
@@VojtaJavora(Nonsense was written here)
@VojtaJavora
@VojtaJavora Жыл бұрын
@@starc0w what release mode?
@neilvninja
@neilvninja 2 ай бұрын
HHKB :D
@______9364
@______9364 Жыл бұрын
<a href="#" class="seekto" data-time="2465">41:05</a> :)
@nneural
@nneural Жыл бұрын
bro i would give away all my money for that.
@crazygames1144
@crazygames1144 Жыл бұрын
How bout you make a text editor inside your text editor
@OggieSutrisna
@OggieSutrisna Жыл бұрын
what font is he use?
@francoisdulaurier6365
@francoisdulaurier6365 Жыл бұрын
Victor Mono
@auntiecarol
@auntiecarol Жыл бұрын
@@francoisdulaurier6365 Looks more like Iosevka to me.
@francoisdulaurier6365
@francoisdulaurier6365 Жыл бұрын
@@auntiecarol Thanks for a nice font I didn't know! Tsoding said he used Victor on a previous video.
@auntiecarol
@auntiecarol Жыл бұрын
@@francoisdulaurier6365 I am happy to be proved wrong! How else do we learn?
@cyanmargh
@cyanmargh Жыл бұрын
ha, дед
@ItsSchwifty
@ItsSchwifty Жыл бұрын
ded
@RuslanKovtun
@RuslanKovtun Жыл бұрын
You are moving 4M of data on each insert/remove operation and caring about view/representation of the cursor..
@wubsyman5796
@wubsyman5796 Жыл бұрын
Hahah took me way too long to realise the text at the bottom is a joke lmao
@zyxyuv1650
@zyxyuv1650 Жыл бұрын
My comment got censored check your quarantine.
@yashkalyan
@yashkalyan Жыл бұрын
Code - Gym - Temple - Repeat. But you look like just code bro, take your health also in consideration.
@SimGunther
@SimGunther Жыл бұрын
If you take the good parts of C, JAI, Odin, Racket, Rust, Erlang, Prolog, Verse, HolyC, and Smalltalk, I'm sure that'll make for a much better language that most would be willing to work in. The big problem however is that legacy code exists, so we'll just have to empower people to make new legacy code with this "uber-language" that fixes plenty of problems with C but introduces its own problems like you said in the C rant ;)
@5omebody
@5omebody Жыл бұрын
but what are the good parts of each language?! it's worth noting that many of the languages have conflicting goals... a lot of things exist as a duality - you can have one at a time, or the other, but not both. and often optimizing for one means your language needs to be designed around it, preventing you from optimizing for the other. and if you try to do everything... y'know what they say - jack of all trades, master of none. in this case it's forced, by not prioritizing one over the other you _must not_ optimize for one usecase by making another usecase less optimized. and as a result you end up with a language architecture well suited for none of the things, and badly suited for all of them
@FelixNielsen
@FelixNielsen Жыл бұрын
C is a good language. C is a proper language. C is great! Seriously, it hurts me to my soul, to hear you say such things about C, not because I feel any need to defend C, it is hardly necessary, but because it rather affects my (for lag of a better term) respect for you. I thought you where one of the few who actually understood C, end perhaps even understood the value of not abstracting away, everything that is fun and interesting, and how counterproductive it really is to do so. This is not to say that C is perfect, not even close, and it never will be, until such time as we can all agree on what makes the perfect language, and I think we can at least agree, that this is never going to happen, so we have to make due with the resemblance of perfection, that is C, for the foreseeable future at least, as I very much fear that C is, slowly but surely, going the way of C++, looking at the C23 specs. I sure hope that I am wrong. There was a time when C++ too was great, when even I, used and appreciated it, but now there's basically nothing left, of the C++ I knew, so I do C instead, and quite frankly, I'm happy to do so. I'm glad to be forced into comprehension, in order for things to actually work, and I do not believe for a second, that any other language is really more efficient or enables higher productivity, as so many would claim. In short, it simple creates harder problems/bugs, which can then be solved after release, maybe, when the paying user has had plenty of time to appreciere the flaws, which will then, in turn, create other problems, and so on and so forth, for no other reason, than not enforcing the comprehension that enables developers to do their work properly, because of the illusion of increased productivity. Well, enough ranting, and I may well be an utter moron, but I firmly believe these things, and I have a very hard time respecting anyone, who actually labels C, a bad language. Seriously, I cannot believe you're actually serious. Must be a language barrier, or something.
@Ryan-xq3kl
@Ryan-xq3kl Жыл бұрын
Modern C++ is quite nice too, it is just not fun for messing around with or writing small scripts. Whenever I write C++ with a focused goal and design for my program I get clean fast small highly abstractable code. Smart pointers for example are a blessing and clean up much of the issue with raw pointers and garbage collection in one swing.
@FelixNielsen
@FelixNielsen Жыл бұрын
@@Ryan-xq3kl I must admit that I have been out of the loop, when it comes to C++, for rather a long time, since I gave up, keeping up, but that being said, back they, it was rather my impression that many, if not most, wrote wrote code in C++, including myself, didn't really write C++, but rather C, employing a few nice too haves from the C++ superset, but never really using the language, as indented. Perhaps it is indeed the case, that the days of constant and significant changes, and not least additions, to the language, quite often in an entirely wrong direction, seemingly without any consideration for the larger picture, are over. Perhaps I should investigate further, though it won't really change all that much, as I will never become a fan of OOP and excessive, and unnecessary, abstraction. In fact, I am rather of the opinion, arrogant though it may sound, that any programmer who honestly prefer that kind of abstraction, that outright discourages fundamental comprehension, is not any more of a programmer, than the average jocker, is an Olympic sprinter. Learning a programming language, does not a programmer make, anymore than learning Chinese makes you, well, Chinese. You have to understand their society, history and culture, to even come close, and even then, it may be so foreign to you, that you're really not able to. This is exactly what I see as the greatest problem, in the software industry. You take what others have done, and blindly add what is missing, and expect things to just work, because that is how it is supposed to work, lean back, and accept people to just accept the status que, and hand over their money, in return for a defektive product that may, at some point in the future, get fixed to a point, where it is actually useable. I really don't know why I cannot sit down, at a keyboard, without ranting for hours on end, about things, that normal people care little about, but there you have it. The sad thing is, i actually mis rather significant parts of C++, still, but at least I know what I'm doing, even though I'm getting nowhere fast.
@reinhold1616
@reinhold1616 Жыл бұрын
he says he hates all languages equally. plus you put way too many commas.
@_inetuser
@_inetuser Жыл бұрын
@@FelixNielsen but do you think in a complicated world it is feasable to not use others peoples code and still be time effective?
@FelixNielsen
@FelixNielsen Жыл бұрын
​@@_inetuser Yes and no. It's a balance act. I'm not saying not to stand on the shoulders of others, simply not to do so blindly, and to not have others stand on your shoulders, at the same time, to employ, I think, a reasonably apt analogy. As for the time efficiency argument, if you keep your deadline, and thus am time efficient, but release a product that is so flawed, that it doesn't live up to even the most reasonable of expectations, which rather seem to be the norm these days, considering the time you'll spend fixing it, customer support, not to speak of the bad press, administration of refunds and so on, I hardly think you can actually claim to have kept your deadline, but of course, on paper, it very much looks like it, and that is what matters to those in power.
@krillin3613
@krillin3613 Жыл бұрын
This is so cool i would love to get this working on windows! does anyone have the current version working on windows?
@markcuello5
@markcuello5 Жыл бұрын
HELP
@OSeuGall
@OSeuGall Жыл бұрын
sorry, maybe this is not, but i read: "Porn-folder" in the code editors footer. just commenting
@BrainChili
@BrainChili Жыл бұрын
WHY ARE YOU WEIRD
@kamal3777
@kamal3777 Жыл бұрын
The waffle house has found its new host
@ruman3726
@ruman3726 Жыл бұрын
Че по английски шпрехаешь, а не на родном великом и могучем?
@hahamartin6595
@hahamartin6595 Жыл бұрын
hi tsoding ,my english is bad ,but l like your stream about programming , recently i watch your stream about context free grammar but now l can't find the stream url . can u packing the stream ,and upload the youtube? thanks @Tsoding Daily
If you cringe at your old code, you're improving! (Ded S02E02)
2:01:55
Newton's Method in C
1:33:17
Tsoding Daily
Рет қаралды 20 М.
Backstage 🤫 tutorial #elsarca #tiktok
00:13
Elsa Arca
Рет қаралды 45 МЛН
A pack of chips with a surprise 🤣😍❤️ #demariki
00:14
Demariki
Рет қаралды 46 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:19
CRAZY GREAPA
Рет қаралды 17 МЛН
Faster than Rust and C++: the PERFECT hash table
33:52
strager
Рет қаралды 518 М.
I Designed My Own 16-bit CPU
15:46
AstroSam
Рет қаралды 1,9 МЛН
Can you actually see more than 30 FPS?
1:41:36
Tsoding Daily
Рет қаралды 20 М.
This Algorithm is 1,606,240% FASTER
13:31
ThePrimeagen
Рет қаралды 730 М.
Read a paper: Ropes-- an alternative to Strings
6:51
Vivek Haldar
Рет қаралды 7 М.
3D in TypeScript using Ray Casting
3:14:03
Tsoding Daily
Рет қаралды 18 М.
I Coded a Video Editor (and it kind of sucks)
18:35
GamesWithGabe
Рет қаралды 232 М.
I made my own Text Editor (in Rust)
8:16
FaceDev
Рет қаралды 93 М.
Нашел еще 70+ нововведений в iOS 18!
11:04
How To Unlock Your iphone With Your Voice
0:34
요루퐁 yorupong
Рет қаралды 25 МЛН
5 НЕЛЕГАЛЬНЫХ гаджетов, за которые вас посадят
0:59
Кибер Андерсон
Рет қаралды 1,6 МЛН
сюрприз
1:00
Capex0
Рет қаралды 1,6 МЛН
Samsung S24 Ultra professional shooting kit #shorts
0:12
Photographer Army
Рет қаралды 26 МЛН