No video

Wrap Your Brain around 'Patch' and 'Diff' on Linux

  Рет қаралды 62,861

Luke Smith

Luke Smith

Күн бұрын

WEBSITE: lukesmith.xyz 🌐❓🔎
DONATE NOW: lukesmith.xyz/... 💰😎👌💯

Пікірлер: 133
@bruderdasisteinschwerermangel
@bruderdasisteinschwerermangel 5 жыл бұрын
I never knew these tools existed, but now I realize they are most likely the heart and soul of git.
@skybldev
@skybldev 5 жыл бұрын
they are, git uses external programs to generate a diff, the default on linux is diff iirc.
@wcasa
@wcasa 21 күн бұрын
3 way merge is done by calculating the diff between the common parent and the 2 commits which are merged. Resultant patch is then applied at that parent as a new commit
@mbednarek360
@mbednarek360 5 жыл бұрын
If you edit code with an editor and not a magnetized needle your existence is literally bloat.
@avocado4877
@avocado4877 5 жыл бұрын
git is bloat i only use diff and patch
@shipiboconibo
@shipiboconibo 5 жыл бұрын
Depends on scale of the job. I large project with dozens (or even just more than 1) of people making changes all the time is a much less maddening task with a good vcs. It's great to know though, I've definitely been guilty of using git on simple projects where where using diff/patch & maybe just a good versioning backup job would have sufficed.
@martinprochazka3714
@martinprochazka3714 5 жыл бұрын
That's what I call an "antidote to employment"
@MrPolluxxxx
@MrPolluxxxx 5 жыл бұрын
@@shipiboconibo large projects are bloat
@chaoky
@chaoky 5 жыл бұрын
@@shipiboconibo git also sufficed and you hadn't to think about it, what are the benefits of using diff/patch?
@shipiboconibo
@shipiboconibo 5 жыл бұрын
@@MrPolluxxxx bloated projects are bloat.
@GoodOwl0
@GoodOwl0 5 жыл бұрын
The video stuck on 9:11. Can this be more controversial?
@kquote03
@kquote03 3 жыл бұрын
@Torin Jensen youtube has really gone to shit hasn't it
@mc4444
@mc4444 5 жыл бұрын
Git uses its own implementation of diff. You can use `git diff --no-index` to get a git-style diff of any two files without creating a repository. One of it's best features is that it can show you not just a diff of lines but also a diff of words with the `--color-words` flag and a diff of characters with `--color-words=.`, which is useful when something just got renamed or there are a lot of lines with small changes so the regular diff output just isn't clear.
@LumenArty
@LumenArty 5 жыл бұрын
Computers are bloat. I only use charcoal and tree bark.
@MoreChannelNoise
@MoreChannelNoise 4 жыл бұрын
I use poo and a wall
@blackrastafarian
@blackrastafarian 4 жыл бұрын
I'd like to see how you set up your charcoal and tree bark to stream KZfaq as I'm having trouble with mine.
@LumenArty
@LumenArty 4 жыл бұрын
@@blackrastafarian Did you try waiting for lightning to strike your tree? edit: btw I can't help you if you use SystemTree, shit's pure buggy bloat.
@LukeSmithxyz
@LukeSmithxyz 5 жыл бұрын
I wonder if they noticed my secret message to investigate WTC 7 🤔
@LANstorm.
@LANstorm. 5 жыл бұрын
Y0s
@alexis3170
@alexis3170 5 жыл бұрын
UNIX Chad just won't stop streaming and patching!
@andrejshm
@andrejshm 5 жыл бұрын
When you're writing TeX, you should break after every sentence (every colon). This makes it easy to diff (and hence use git on) sentences.
@Element_Finland
@Element_Finland 5 жыл бұрын
That thumbnail may be the best thing I've seen all week.
@aaaa9r
@aaaa9r 5 жыл бұрын
Man, those thumbnails. Please don't stop making them. In fact, make a gallery, Instagram account or something to enjoy them apart from your KZfaq channel. They are a state of art. Whenever you release a video with those meme thumbnails I think "the next video can't beat the fucking laugh I'm having with this one", and yet you manage to prove me wrong every single time. Creativity 100
@kenba8176
@kenba8176 3 жыл бұрын
Instagram🤢
@jorgen0lsen863
@jorgen0lsen863 3 жыл бұрын
Only me cried watching this? So beautiful
@FoxywithaRubikscube
@FoxywithaRubikscube 3 жыл бұрын
When he patched the original thesis without making a backup, my heart died. I didn't know about the -R flag so when he whipped that out, huuuuge plot twist.
@pypeetpy
@pypeetpy 4 жыл бұрын
I am learning to use dwm, but i have problem with how to do about error of patch , and after i watch your video everything is clear. Thank you Luke.
@naomist.claire8419
@naomist.claire8419 5 жыл бұрын
My roflcopter goes soi soi soi~
@Griimnak
@Griimnak 5 жыл бұрын
Wow, i think diff and patch are the unaccredited souls/influencers of git Git initial release: 7 April 2005 Diff Initial release: June 1974 Patch Initial release: May 24, 1985
@TB-pf5nt
@TB-pf5nt 5 жыл бұрын
Git does all this and has a simpler, more unified interface. Just like systemd, amirite guise?
@an2qzavok
@an2qzavok 5 жыл бұрын
I have to rtfm every time I need to do anything more advanced than git pull.
@danielstevenson3903
@danielstevenson3903 4 жыл бұрын
Pretty sure Git uses diff and patch under the hood.
@cmdlp4178
@cmdlp4178 5 жыл бұрын
I use vim/gvim to look for changes/differences of two files. gvim has the option in the file menu. You can even change both files in parallel and the differences are displayed
@paolobassi544
@paolobassi544 5 жыл бұрын
The Little head shake at 00:53 , when you say about the times you were a normie 🤣🤣🤣🤣🤣
@xdevs23
@xdevs23 4 жыл бұрын
I think that using a VCS like git would make this a lot easier since you can see a history of all changes and reset to any revision. Plus, git has conflict resolution features and allows you to push the stuff to a remote repository.
@bananmanx4764
@bananmanx4764 5 жыл бұрын
Good video, I had the "error message" a day or two ago and this was just what I needed. By the way if you are a gentoo user reading this you can apply patches by putting them in /etc/portage/patches/mypkgcategory/mypkg/ and they will be applied on emerge. If you encounter the "error message" you can fix it like in the video and then compile, install and qmerge the ebuild(don't re-emerge as that will re unpack the source code and not apply your changes).
@melanovapedia7924
@melanovapedia7924 Жыл бұрын
Beautiful!, thanks Luke!
@tanko.engineering1300
@tanko.engineering1300 5 жыл бұрын
This is too unbloat. I'd rather user git!
@FirstOfJuneIX
@FirstOfJuneIX 3 жыл бұрын
this is brilliant, your explanations were extremely clear, thanks so much, i just subscribed :)
@ccrial
@ccrial 5 жыл бұрын
Your research of minimalistic systems will bring you on BSD's OS.
@KingZero69
@KingZero69 5 жыл бұрын
another great video... keep spreading the good word of suckless and dwm...
@jan_harald
@jan_harald 5 жыл бұрын
9:09-9:12 FREEZE
@patrickprucha5522
@patrickprucha5522 Жыл бұрын
Excellent video. Thanks! 👍
@parthhanda6828
@parthhanda6828 4 жыл бұрын
Thanks for the nice video. Started watching your channel recently and love your content.
@robertorolo
@robertorolo 4 жыл бұрын
You should definitely get those solid colors icons back to the statusbar in LARBS. It looks soo much better than colored emoji.
@alexmiller7879
@alexmiller7879 5 жыл бұрын
I had been looking for something like diff. Didn't even realize it was built in.
@LumenArty
@LumenArty 5 жыл бұрын
I'd just like to interject for a moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX. Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called "Linux", and many of its users are not aware that it is basically the GNU system, developed by the GNU Project. There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called "Linux" distributions are really distributions of GNU/Linux.
@caigner
@caigner 4 жыл бұрын
A nice alternative to diff is icdiff. Try it!
@Vulto166
@Vulto166 5 жыл бұрын
Have you ever consider to get a lpi certification ?
@TheSugus38
@TheSugus38 5 жыл бұрын
It costs money, that's too bad
@Haka1009
@Haka1009 5 жыл бұрын
Vimdiff is pretty nice if you use a decent colorscheme, especially if you have many conflicts between the two files.
@Dluzak1
@Dluzak1 5 жыл бұрын
or even between 3 or more files
@MrG0CE
@MrG0CE 3 жыл бұрын
WELL, FOR THE PARTICULAR CASE OF TEX FILES, THERE'S OVERLEAF.
@Viken43
@Viken43 5 жыл бұрын
Might add dwm to ArchBang, of course I will credit Mr Smith...
@adrianhartwig2646
@adrianhartwig2646 5 жыл бұрын
AWESOME! That was the missing part to start with DWM^^
@MuresanVladMihail
@MuresanVladMihail 5 жыл бұрын
Very useful as always, keep it going!
@fuseteam
@fuseteam 5 жыл бұрын
Loving the searchable titles 👍
@azngoku666
@azngoku666 5 жыл бұрын
>green lines pointing to the right
@leoliu2079
@leoliu2079 5 жыл бұрын
God, this is smart
@addygreen8919
@addygreen8919 5 жыл бұрын
What do you guys think of the Olimex Teres 1? Should I get one or an old Thinkpad?
@artaway6647
@artaway6647 5 жыл бұрын
Nice video, thanks!
@iqwrjwqioprwjriopqrjpqowir
@iqwrjwqioprwjriopqrjpqowir 5 жыл бұрын
Oh my God. Dwm made your face bigger
@MrHatoi
@MrHatoi 5 жыл бұрын
Pretty sure git does use patch and diff, I know on github you can view the diff files generated for each commit.
@Klayperson
@Klayperson 5 жыл бұрын
>hermeticism Luke just wanted us all to know right off the bat that he's a wizard
@yoshi314
@yoshi314 5 жыл бұрын
> not using quilt
@superspectator123
@superspectator123 5 жыл бұрын
That was a good video. Thanks.
@Andrath
@Andrath 5 жыл бұрын
Git diff is completely compatible with patch.
@tionerd8534
@tionerd8534 2 ай бұрын
I use diff a lot, but patch has patched my brain!
@bennguyen1313
@bennguyen1313 3 жыл бұрын
I understand you can find the diff between an old and new file, and then use .patch to apply the changes to all other other copies of that old file.. But why, not just directly copy/over-write the old file.. I can't imagine it's about the .patch file being tiny compared to the actual file, so what's the advantage?
@kirigayatoshiro2793
@kirigayatoshiro2793 5 жыл бұрын
Thanks I needed this, the thing I patched dwm with the alpha patch of transparency it did succeed but when compiling it gives you errors of you have like prev dwm install, I tried to do it directly without actually installing dwm only after patching but sadly it didn't work even with Compton running
@azngoku666
@azngoku666 5 жыл бұрын
what's your process like for applying dwm patches? (e.g. you find one on the site that doesn't mesh with the latest source off git)
@not_herobrine3752
@not_herobrine3752 3 жыл бұрын
how do you come up with ideas for your thumbnails
@victorprokop2240
@victorprokop2240 4 жыл бұрын
If you're using suckless programs (and you're newbie) NEVER use "patch < file" use "patch -p1 < file"
@paulgrougnie7028
@paulgrougnie7028 4 жыл бұрын
Speaking of suckless programmes, I have a problem: I tried to install the download manager patch for surf (after many hours of research on the internet, it seems that I can't curl a document from my college's Moodle...). But it seems that the diff file was generated based on an already patched surf sources or on old surf version (but I can't find the version anywhere): The patch fail and some of the functions used in it does not exist in the original files. Do you know where to get a list of patches that I have to install, the version that was used for the patch or the original source code of the patch? Thank you for your help!
@telotawa
@telotawa 5 жыл бұрын
hunks owo
@secwriteups
@secwriteups 5 жыл бұрын
Did you find a way to get the webcam mpv instance (mpvfloat) to be floating ?
@Clutter.monkey
@Clutter.monkey 5 жыл бұрын
is vimdiff bloat?
@mtothem1337
@mtothem1337 5 жыл бұрын
So this is basically like git?
@sittingnut1
@sittingnut1 5 жыл бұрын
got uses patch and diff
@channel11121
@channel11121 5 жыл бұрын
Wallpaper? I know you have them on your github, but what's the name of this specific one?
@jalepezo
@jalepezo 2 жыл бұрын
SORCERY!
@alexstone691
@alexstone691 5 жыл бұрын
it hurts me when i see spaces or capital letters in name of anything
@johndoe-fu3qr
@johndoe-fu3qr 5 жыл бұрын
Is the podcast canceled ?
@n92
@n92 4 жыл бұрын
Thanks a lot mate.. there are tons of shitty stackoverflow answers out there on this topic but your video kills it...
@unknown8088928
@unknown8088928 4 жыл бұрын
Wait you don't hard wrap your lines?
@pt8306
@pt8306 3 жыл бұрын
Gay Boomer shows us his hunk collection for 10 minutes and 20 seconds
@dutchdaedalus
@dutchdaedalus 5 жыл бұрын
My hooknosed neighbor, who always wears a funny little hat, said he was being targeted by skinhead hackers who pretended to be Japanese cartoon school girls. Who of you guys was it? My neighbor wants his khazaar screensaver back.
@4932gb
@4932gb 3 жыл бұрын
Another reason to use text files.
@rolfingbomb
@rolfingbomb 5 жыл бұрын
Benis.
@umka7536
@umka7536 5 жыл бұрын
Brilliant as usual! Thanks a lot!
@ravimali2814
@ravimali2814 5 жыл бұрын
😲 @Luke Smith you are using mouse ... Can't believe
@sauron1427
@sauron1427 5 жыл бұрын
9:58 "I can make a diff file and send it to myself" - yes, but you can also send the whole file at that point, it's not like text files are going to be more than a few KB anyway. I would say this is more useful when you make changes on different machines to different parts of the file and you want to merge them.
@RaftProduction
@RaftProduction 5 жыл бұрын
"Don't use git just send the whole project bro"
@sauron1427
@sauron1427 5 жыл бұрын
@@lucaswiens1884 exactly, but I don't really see it as a good way to sync configurations across machines.
@fuseteam
@fuseteam 5 жыл бұрын
me during the video: Oooh so that's how git works ..... luke: "Maybe git uses them as the back end or something they definitely can generate diff files"
@maniacZesci
@maniacZesci 4 жыл бұрын
No Git does not work like that for it's main task of making commits. It does however uses some kind of diff program to list differences between files just like it uses some kind of external text editor for writing commit messages. Which diff and which editor will use (and more) can be set in the Git .config file.
@fuseteam
@fuseteam 4 жыл бұрын
@@maniacZesci interesting
@maniacZesci
@maniacZesci 4 жыл бұрын
@@fuseteam In short when staging and committing git uses SHA 1 to hash file names, converts everything to blobs and maintains internal tree. It's complicated stuff but programs like diff and patch have nothing to do with it, git has it's own internal mechanisms. By the way, for its networking capabilities git internally uses CURL library. But note the word library, it doesn't call external curl program, it uses CURL API and calls actual code from CURL library.
@fuseteam
@fuseteam 4 жыл бұрын
@@maniacZesci oh my how does that work
@purplecxcx5791
@purplecxcx5791 5 жыл бұрын
screw this. i'm installing xfce
@blankexpression2u
@blankexpression2u 5 жыл бұрын
Patch is bloat. I rewrite source code with psychic powers
@divingradish
@divingradish 5 жыл бұрын
Nah. I use butterfly.
@vladserbu1117
@vladserbu1117 5 жыл бұрын
Why does diff print ASCII art? diff should print ed commands to turn one file into another, thus removing the need for patch. man.cat-v.org/plan_9_2nd_ed/1/diff
@bruderdasisteinschwerermangel
@bruderdasisteinschwerermangel 5 жыл бұрын
LaTeX is bloat ConTeXt ftw
@sharperguy
@sharperguy 4 жыл бұрын
I'm interested to know if someone has a decent setup for combinging makepkg with suckless tools. What I'm hoping for are PKGBUILD files that build your local source tree for some tool, but with the source tree still tracked by git and able to be pushed to a fork on github (or whatever).
@shooksnc
@shooksnc 5 жыл бұрын
Nice Video
@meyimagalot9497
@meyimagalot9497 5 жыл бұрын
vimdiff is way better :P
@abdullahal-ahmati5030
@abdullahal-ahmati5030 5 жыл бұрын
>reddit spacing
@chrisbohn3746
@chrisbohn3746 5 жыл бұрын
Brainlet tier question, how do you get different items on your xsetroot (dwm status) to sleep for different amounts of time? I can't seem to get it to work.
@LukeSmithxyz
@LukeSmithxyz 5 жыл бұрын
Here's my bar script: github.com/LukeSmithxyz/voidrice/blob/voiddwm/.local/bin/dwmbar
@chrisbohn3746
@chrisbohn3746 5 жыл бұрын
Thanks, but from what I can tell everything in that script sleeps for 1 minute. It's not too big of a deal, but I like for my volume status to update more frequently, then say the weather, mail, or stock ticker. My current solution is to have things that don't need to refresh often set to a key-binding in DWM and I just receive a notification with the weather or whatever. I was just hoping for a cleaner solution.
@LukeSmithxyz
@LukeSmithxyz 5 жыл бұрын
github.com/LukeSmithxyz/voidrice/blob/voiddwm/.local/bin/refbar
@MaximeCroquant
@MaximeCroquant 5 жыл бұрын
Could you share your patch for dwm ?
@LANstorm.
@LANstorm. 5 жыл бұрын
Luke Smith is bloated.
@ertwro
@ertwro 5 жыл бұрын
But I know how to use git...oh, right. For patching.
@NeuronalAxon
@NeuronalAxon 5 жыл бұрын
Analytics like comments.
@Marcus_Halberstram
@Marcus_Halberstram 5 жыл бұрын
Geist = geblasen
@moritzbaumgart6781
@moritzbaumgart6781 5 жыл бұрын
Vcs for poor people 😅😂
@the_blahhh
@the_blahhh 5 жыл бұрын
>Not forcing your computer illiterate project collaborators to use git Shameful
@sharp14x
@sharp14x 5 жыл бұрын
Plebbit spacing.
@gorgecunth1581
@gorgecunth1581 2 жыл бұрын
Oh no spaces - The guy who put's all kinds of horrible characters into his video titles XD
@jan_harald
@jan_harald 5 жыл бұрын
amazing video ID ;P -CiLU9-RAGk CILUG RACK no meaning, just cool
@janfisher8333
@janfisher8333 5 жыл бұрын
Use that as your secret identity now.
@amir78989
@amir78989 5 жыл бұрын
UwU
@sk8sbest
@sk8sbest 5 жыл бұрын
First
@vivekverma30494
@vivekverma30494 5 жыл бұрын
No
@MickeyD2012
@MickeyD2012 5 жыл бұрын
.tex? What the hell is wrong with you?
Programs that Suck Less! suckless
11:14
Luke Smith
Рет қаралды 139 М.
Some bashrc recommendations and what I use
19:17
Luke Smith
Рет қаралды 114 М.
PEDRO PEDRO INSIDEOUT
00:10
MOOMOO STUDIO [무무 스튜디오]
Рет қаралды 18 МЛН
Кадр сыртындағы қызықтар | Келінжан
00:16
🩷🩵VS👿
00:38
ISSEI / いっせい
Рет қаралды 27 МЛН
Happy birthday to you by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 12 МЛН
AI Will Make (Has Made) the Internet Mediocre...
12:14
Luke Smith
Рет қаралды 59 М.
Vim Tips You Probably Never Heard of
12:11
Luke Smith
Рет қаралды 117 М.
Linux Crash Course - The diff Command
22:21
Learn Linux TV
Рет қаралды 17 М.
Vim Tips I Wish I Knew Earlier
23:00
Sebastian Daschner
Рет қаралды 59 М.
groff/troff: MUH MINIMALIST Documents
13:21
Luke Smith
Рет қаралды 168 М.
I Will Be Throwing Away My Computers.
11:56
Luke Smith
Рет қаралды 97 М.
you need to learn tmux RIGHT NOW!!
17:46
NetworkChuck
Рет қаралды 525 М.
Harder Drive: Hard drives we didn't want or need
36:47
suckerpinch
Рет қаралды 1,6 МЛН
Protect Your Data from Glowfriends! (Recovering & Deleting Data)
17:31
Patching Suckless Programs Made Easy
21:26
Mental Outlaw
Рет қаралды 90 М.
PEDRO PEDRO INSIDEOUT
00:10
MOOMOO STUDIO [무무 스튜디오]
Рет қаралды 18 МЛН